Amanatpay Wallet system on blockchain
Functions
- getAllAccountBalances(publicKey) ⇒
Array.<object>
Description: return all wallet's balances includes asset's type
- isWalletExists(publicKey) ⇒
boolean
Description: confirm the wallet's existence in AmanatPay Blockchain
- getWallet(publicKey) ⇒
AccountResponse
Description: get single wallet in details.
- sendPayment(senderWallet, receiver, amount, asset, issuerAccount, memo, validateWallet)
Description: send payment through Amanatpay blockchain network, using multiple assets.
- loadFriendBot(pub) ⇒
Axios
load 1000 friend bot to wallet if it's native balance is below 100
- createWallet(disctpub)
create new wallet and load 1000 native gas
- getWalletObj(publicKey) ⇒
AccountResponse
get wallet's object from Amanatpay blockchain
- getAllBalances(wallet) ⇒
array
return array of wallet's balances of different assets
- createPair() ⇒
SimpleAccountObj
Create a key pair for creating account
- createAccount(distSecret)
creat account
- friendbot(pub)
load gas from friend bot
getAllAccountBalances(publicKey) ⇒ Array.<object>
Description: return all wallet's balances includes asset's type
Kind: global function
Returns: Array.<object>
-
returns array of all balance objects
Param | Type | Description |
---|
publicKey | string | Wallet public key |
isWalletExists(publicKey) ⇒ boolean
Description: confirm the wallet's existence in AmanatPay Blockchain
Kind: global function
Param | Type | Description |
---|
publicKey | string | Wallet public key |
getWallet(publicKey) ⇒ AccountResponse
Description: get single wallet in details.
Kind: global function
Returns: AccountResponse
-
class of AmanatPay Blockchain account
Param | Type | Description |
---|
publicKey | string | Wallet public key |
sendPayment(senderWallet, receiver, amount, asset, issuerAccount, memo, validateWallet)
Description: send payment through Amanatpay blockchain network, using multiple assets.
Kind: global function
Param | Type | Default | Description |
---|
senderWallet | SimpleAccountObj | | source/sender Wallet you want to transfer payment from |
receiver | string | | wallet ID (public key) of receiving party |
amount | number | | amount |
asset | string | | asset you want to transfer |
issuerAccount | string | | token issuer account public key |
memo | string | | nullable if you need send transfer descriptions |
validateWallet | boolean | false | it is false by default, if you need to function do validation of wallets turn true |
loadFriendBot(pub) ⇒ Axios
load 1000 friend bot to wallet if it's native balance is below 100
Kind: global function
Returns: Axios
-
return axios response
Param | Type | Description |
---|
pub | string | get public key |
createWallet(disctpub)
create new wallet and load 1000 native gas
Kind: global function
Param | Type | Description |
---|
disctpub | string | disturber secret key to load 1000 native gas into the account |
getWalletObj(publicKey) ⇒ AccountResponse
get wallet's object from Amanatpay blockchain
Kind: global function
Returns: AccountResponse
-
wallet object on Amanatpay blockchain
Param | Type | Description |
---|
publicKey | string | wallet public key |
getAllBalances(wallet) ⇒ array
return array of wallet's balances of different assets
Kind: global function
Returns: array
-
array of balances
Param | Type | Description |
---|
wallet | AccountResponse | wallet as Amanatpay blockchain object |
createPair() ⇒ SimpleAccountObj
Create a key pair for creating account
Kind: global function
createAccount(distSecret)
creat account
Kind: global function
Param | Type | Description |
---|
distSecret | string | disturber account secret key |
friendbot(pub)
load gas from friend bot
Kind: global function
Param | Type | Description |
---|
pub | string | public key for any wallet |