amp-wallet
v1.0.34
Published
Amanatpay Blockchain Wallet
Downloads
9
Readme
Amanatpay Wallet Operation
Functions
getAllAccountBalances(publicKey) ⇒ Array.<object>
Kind: global function
Returns: Array.<object> - returns array of all balance objects
| Param | Type | Description | | --- | --- | --- | | publicKey | string | Wallet public key |
isWalletExists(publicKey) ⇒ boolean
Kind: global function
| Param | Type | Description | | --- | --- | --- | | publicKey | string | Wallet public key |
getWallet(publicKey) ⇒ AccountResponse
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)
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
Kind: global function
Returns: Axios - return axios response
| Param | Type | Description | | --- | --- | --- | | pub | string | get public key |
createWallet(distpub)
Kind: global function
| Param | Type | Description | | --- | --- | --- | | distpub | string | disturber secret key to load 1000 native gas into the account |
History(pub)
Kind: global function
| Param | Type | Description | | --- | --- | --- | | pub | string | public key |
createAsset()
Kind: global function
getWalletObj(publicKey) ⇒ AccountResponse
Kind: global function
Returns: AccountResponse - wallet object on Amanatpay blockchain
| Param | Type | Description | | --- | --- | --- | | publicKey | string | wallet public key |
getAllBalances(wallet) ⇒ array
Kind: global function
Returns: array - array of balances
| Param | Type | Description | | --- | --- | --- | | wallet | AccountResponse | wallet as Amanatpay blockchain object |
createPair() ⇒ SimpleAccountObj
Kind: global function
createAccount(distSecret) ⇒
Kind: global function
Returns: (object} accountDetails: direct return from blockchain key: keypair , public and private keys
| Param | Type | Description | | --- | --- | --- | | distSecret | string | disturber account secret key |
friendbot(pub)
Kind: global function
| Param | Type | Description | | --- | --- | --- | | pub | string | public key for any wallet |
transactionHistory(pub) ⇒ object
Kind: global function
Returns: object - list of all wallet's transactions
| Param | Type | Description | | --- | --- | --- | | pub | string | wallet public key |
convertTransactionHistory(history)
Kind: global function
| Param | Type | | --- | --- | | history | history |
setupIssuer(Issuer) ⇒
Kind: global function
Returns: transaction server transaction result
| Param | Type | | --- | --- | | Issuer | string |
createTrustLine(issuer, account, asset) ⇒
Kind: global function
Returns: transaction server transaction result
| Param | Type | Description | | --- | --- | --- | | issuer | keyPair | object of publicKey and secret | | account | keyPair | object of publicKey and secret | | asset | keyPair | object of publicKey and secret |