Class: CryptomateApi::Mpc::Account
- Defined in:
- lib/cryptomate_api/mpc/account.rb
Overview
The accounts module allows you to create and manage multiple accounts, each with their own wallets. This allows you to manage your crypto assets in a more organized manner, and also allows you to create multiple wallets for the same or different blockchain.
Class Method Summary collapse
-
.create_account(alias_name) ⇒ Object
Create an account cryptomate.me/docs/mpc/create-an-account Response: { “id”: “String”, “alias”: “String”, “wallets”: [] }.
-
.delete_account(account_id) ⇒ Object
Delete account cryptomate.me/docs/mpc/delete-account.
-
.edit_account(account_id, alias_name) ⇒ Object
Edit account: Modifies the account information.
-
.get_all_accounts ⇒ Object
Get all accounts cryptomate.me/docs/mpc#get-all-accounts TODO: check response if it’s an array or a hash Response: { “id”: “string”, “alias”: “string”, “wallets”: [ { “id”: “string”, “alias”: “string”, “wallet_address”: “string”, “blockchain”: “string” } ] }.
Class Method Details
.create_account(alias_name) ⇒ Object
Create an account cryptomate.me/docs/mpc/create-an-account Response:
"id": "String",
"alias": "String",
"wallets": []
39 40 41 |
# File 'lib/cryptomate_api/mpc/account.rb', line 39 def create_account(alias_name) post('/mpc/accounts/create', body: { alias: alias_name }.to_json) end |
.delete_account(account_id) ⇒ Object
Delete account cryptomate.me/docs/mpc/delete-account
67 68 69 |
# File 'lib/cryptomate_api/mpc/account.rb', line 67 def delete_account(account_id) delete("/mpc/account/#{account_id}") end |
.edit_account(account_id, alias_name) ⇒ Object
Edit account: Modifies the account information. cryptomate.me/docs/mpc/edit-account Response: {
"id": "string",
"alias": "string",
"wallets": [
{
"id": "string",
"alias": "string",
"wallet_address": "string",
"blockchain": "string"
}
]
}
60 61 62 |
# File 'lib/cryptomate_api/mpc/account.rb', line 60 def edit_account(account_id, alias_name) put("/mpc/account/#{account_id}", body: { alias: alias_name }.to_json) end |
.get_all_accounts ⇒ Object
Get all accounts cryptomate.me/docs/mpc#get-all-accounts TODO: check response if it’s an array or a hash Response: {
"id": "string",
"alias": "string",
"wallets": [
{
"id": "string",
"alias": "string",
"wallet_address": "string",
"blockchain": "string"
}
]
}
26 27 28 |
# File 'lib/cryptomate_api/mpc/account.rb', line 26 def get_all_accounts get('/mpc/accounts/list') end |