Class: Fireblocks::API

Inherits:
Object
  • Object
show all
Defined in:
lib/fireblocks/api/api.rb,
lib/fireblocks/api/transactions.rb

Overview

Namespace to access Fireblocks api methods

Defined Under Namespace

Classes: Transactions

Class Method Summary collapse

Class Method Details

.create_deposit_address(vault_account_id, asset_id, description: nil) ⇒ Object



34
35
36
37
38
39
# File 'lib/fireblocks/api/api.rb', line 34

def create_deposit_address(, asset_id, description: nil)
  Request.post(
    body: { description: description },
    path: "/v1/vault/accounts/#{}/#{asset_id}/addresses"
  )
end

.create_internal_wallet(name:) ⇒ Object



55
56
57
# File 'lib/fireblocks/api/api.rb', line 55

def create_internal_wallet(name:)
  Request.post(body: { name: name }, path: '/v1/internal_wallets')
end

.create_vault_account(name:) ⇒ Object



11
12
13
# File 'lib/fireblocks/api/api.rb', line 11

def (name:)
  Request.post(body: { name: name }, path: '/v1/vault/accounts')
end

.create_vault_account_asset(vault_account_id, asset_id) ⇒ Object



30
31
32
# File 'lib/fireblocks/api/api.rb', line 30

def (, asset_id)
  Request.post(path: "/v1/vault/accounts/#{}/#{asset_id}")
end

.get_deposit_addresses(vault_account_id, asset_id) ⇒ Object



41
42
43
44
45
# File 'lib/fireblocks/api/api.rb', line 41

def get_deposit_addresses(, asset_id)
  Request.get(
    path: "/v1/vault/accounts/#{}/#{asset_id}/addresses"
  )
end

.get_internal_wallet(wallet_id) ⇒ Object



47
48
49
# File 'lib/fireblocks/api/api.rb', line 47

def get_internal_wallet(wallet_id)
  Request.get(path: "/v1/internal_wallets/#{wallet_id}")
end

.get_internal_walletsObject



51
52
53
# File 'lib/fireblocks/api/api.rb', line 51

def get_internal_wallets
  Request.get(path: '/v1/internal_wallets')
end

.get_supported_assetsObject



59
60
61
# File 'lib/fireblocks/api/api.rb', line 59

def get_supported_assets
  Request.get(path: '/v1/supported_assets')
end

.get_vault_account(id) ⇒ Object



15
16
17
# File 'lib/fireblocks/api/api.rb', line 15

def (id)
  Request.get(path: "/v1/vault/accounts/#{id}")
end

.get_vault_account_asset(vault_account_id, asset_id) ⇒ Object



26
27
28
# File 'lib/fireblocks/api/api.rb', line 26

def (, asset_id)
  Request.get(path: "/v1/vault/accounts/#{}/#{asset_id}")
end

.get_vault_accountsObject



7
8
9
# File 'lib/fireblocks/api/api.rb', line 7

def get_vault_accounts
  Request.get(path: '/v1/vault/accounts')
end

.update_vault_account(vault_account_id, name:) ⇒ Object



19
20
21
22
23
24
# File 'lib/fireblocks/api/api.rb', line 19

def (, name:)
  Request.put(
    body: { name: name },
    path: "/v1/vault/accounts/#{}"
  )
end