Class: Razrbit::Wallet
- Inherits:
-
HTTP
- Object
- HTTP
- Razrbit::Wallet
show all
- Defined in:
- lib/razrbit/wallet.rb
Instance Attribute Summary
Attributes inherited from HTTP
#app_id, #app_secret
Instance Method Summary
collapse
Methods inherited from HTTP
#initialize
Constructor Details
This class inherits a constructor from Razrbit::HTTP
Instance Method Details
#balance_from_address(address: address) ⇒ Object
22
23
24
25
26
27
28
29
30
|
# File 'lib/razrbit/wallet.rb', line 22
def balance_from_address(address: address)
uri = create_uri 'wallet/getBalanceFromAddress'
form_data = {
'address' => address
}
post(uri, form_data)
end
|
#create_new_address ⇒ Object
5
6
7
8
|
# File 'lib/razrbit/wallet.rb', line 5
def create_new_address
uri = create_uri 'wallet/createNewAddress'
post(uri)
end
|
#send_amount(from_address_private_key: nil, to_address: nil, satoshi_amount: nil) ⇒ Object
10
11
12
13
14
15
16
17
18
19
20
|
# File 'lib/razrbit/wallet.rb', line 10
def send_amount(from_address_private_key: nil, to_address: nil, satoshi_amount: nil)
uri = create_uri 'wallet/sendAmount'
form_data = {
'fromAddressPrivateKey' => from_address_private_key,
'toAddress' => to_address,
'satoshiAmount' => satoshi_amount
}
post(uri, form_data)
end
|