Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

amp-wallet

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

amp-wallet

Amanatpay Blockchain Wallet

  • 1.0.20
  • npm
  • Socket score

Version published
Weekly downloads
34
Maintainers
1
Weekly downloads
 
Created
Source

Amanatpay Wallet Operation

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(distpub)

create new wallet and load 1000 native gas

History(pub)

Wallet's transactions for all assets

createAsset()

CREATE an asset that's are include issue account and distributor

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

transactionHistory(pub)object

Wallet's transactions for all assets

convertTransactionHistory(history)

convert raw transactions list ( payment) to needed details

setupIssuer(Issuer)

change account options for Issuer account( new assets)

createTrustLine(issuer, account, asset)

create trust-line in between issuer account , asset and account

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

ParamTypeDescription
publicKeystring

Wallet public key

isWalletExists(publicKey) ⇒ boolean

Description: confirm the wallet's existence in AmanatPay Blockchain

Kind: global function

ParamTypeDescription
publicKeystring

Wallet public key

getWallet(publicKey) ⇒ AccountResponse

Description: get single wallet in details.

Kind: global function
Returns: AccountResponse -

class of AmanatPay Blockchain account

ParamTypeDescription
publicKeystring

Wallet public key

sendPayment(senderWallet, receiver, amount, asset, issuerAccount, memo, validateWallet)

Description: send payment through Amanatpay blockchain network, using multiple assets.

Kind: global function

ParamTypeDefaultDescription
senderWalletSimpleAccountObj

source/sender Wallet you want to transfer payment from

receiverstring

wallet ID (public key) of receiving party

amountnumber

amount

assetstring

asset you want to transfer

issuerAccountstring

token issuer account public key

memostring

nullable if you need send transfer descriptions

validateWalletbooleanfalse

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

ParamTypeDescription
pubstring

get public key

createWallet(distpub)

create new wallet and load 1000 native gas

Kind: global function

ParamTypeDescription
distpubstring

disturber secret key to load 1000 native gas into the account

History(pub)

Wallet's transactions for all assets

Kind: global function

ParamTypeDescription
pubstring

public key

createAsset()

CREATE an asset that's are include issue account and distributor

Kind: global function

getWalletObj(publicKey) ⇒ AccountResponse

get wallet's object from Amanatpay blockchain

Kind: global function
Returns: AccountResponse -

wallet object on Amanatpay blockchain

ParamTypeDescription
publicKeystring

wallet public key

getAllBalances(wallet) ⇒ array

return array of wallet's balances of different assets

Kind: global function
Returns: array -

array of balances

ParamTypeDescription
walletAccountResponse

wallet as Amanatpay blockchain object

createPair() ⇒ SimpleAccountObj

Create a key pair for creating account

Kind: global function

createAccount(distSecret) ⇒

creat account

Kind: global function
Returns:

(object} accountDetails: direct return from blockchain key: keypair , public and private keys

ParamTypeDescription
distSecretstring

disturber account secret key

friendbot(pub)

load gas from friend-bot

Kind: global function

ParamTypeDescription
pubstring

public key for any wallet

transactionHistory(pub) ⇒ object

Wallet's transactions for all assets

Kind: global function
Returns: object -

list of all wallet's transactions

ParamTypeDescription
pubstring

wallet public key

convertTransactionHistory(history)

convert raw transactions list ( payment) to needed details

Kind: global function

ParamType
historyhistory

setupIssuer(Issuer) ⇒

change account options for Issuer account( new assets)

Kind: global function
Returns:

transaction server transaction result

ParamType
Issuerstring

createTrustLine(issuer, account, asset) ⇒

create trust-line in between issuer account , asset and account

Kind: global function
Returns:

transaction server transaction result

ParamTypeDescription
issuerkeyPair

object of publicKey and secret

accountkeyPair

object of publicKey and secret

assetkeyPair

object of publicKey and secret

Keywords

FAQs

Package last updated on 10 Jan 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc