Wallets
These methods are accessible through profile.wallets()
which exposes a WalletRepository
instance.
Get a list of all wallets with key and value
profile.wallets().all();
Get a list of all wallet keys
profile.wallets().keys();
Get a list of all wallet values
profile.wallets().values();
Create a new wallet from a mnemonic, coin implementation and network
await profile.wallets().importByMnemonic("this is a top secret passphrase", "ARK", "devnet");
Create a new wallet from an address, coin implementation and network
await profile.wallets().importByAddress("D61mfSggzbvQgTUe6JhYKH2doHaqJ3Dyib", "ARK", "devnet");
Find the wallet by the given ID
profile.wallets().findById("D61mfSggzbvQgTUe6JhYKH2doHaqJ3Dyib");
Find the wallet for the given address
profile.wallets().findByAddress("D61mfSggzbvQgTUe6JhYKH2doHaqJ3Dyib");
Find the wallet for the given public key
profile.wallets().findByPublicKey("034151a3ec46b5670a682b0a63394f863587d1bc97483b1b6c70eb58e7f0aed192");
Find all wallets that use the given coin
profile.wallets().findByCoin("ARK");
Forget the wallet for the given ID
profile.wallets().forget("D61mfSggzbvQgTUe6JhYKH2doHaqJ3Dyib");
Forget all wallets (Use with caution!)
profile.wallets().flush();
API Calls
List all transactions that a wallet has sent or received
await wallet.transactions();
List all transactions that a wallet has sent
await wallet.sentTransactions();
List all transactions that a wallet received
await wallet.receivedTransactions();
Get information about a wallet from the network
await wallet.wallet("username");
Get a list of wallets from the network that match the given criteria
await wallet.wallets({ ... });
Get information about a delegate from the network
await wallet.delegate("username");
Get a list of delegates from the network that match the given criteria
await wallet.delegates({ ... });
List all votes that a wallet casted
await wallet.votes();
List all voters that a wallet has
await wallet.voters();
Check if the peer is syncing
await wallet.client().syncing();
Broadcast all of the given transactions
await wallet.client().broadcast([transaction, transaction, transaction]);
Transactions
Create a new transfer transaction
await wallet.transaction().signTransfer(input, options);
Create a new second signature transaction
await wallet.transaction().signSecondSignature(input, options);
Create a new delegate registration transaction
await wallet.transaction().signDelegateRegistration(input, options);
Create a new vote transaction
await wallet.transaction().signVote(input, options);
Create a new multi signature transaction
await wallet.transaction().signMultiSignature(input, options);
Create a new ipfs transaction
await wallet.transaction().signIpfs(input, options);
Create a new multi payment transaction
await wallet.transaction().signMultiPayment(input, options);
Create a new delegate resignation transaction
await wallet.transaction().signDelegateResignation(input, options);
Create a new htlc lock transaction
await wallet.transaction().signHtlcLock(input, options);
Create a new htlc claim transaction
await wallet.transaction().signHtlcClaim(input, options);
Create a new htlc refund transaction
await wallet.transaction().signHtlcRefund(input, options);
Create a new entity registration transaction
await wallet.transaction().signEntityRegistration(input, options);
Create a new entity resignation transaction
await wallet.transaction().signEntityResignation(input, options);
Create a new entity update transaction
await wallet.transaction().signEntityUpdate(input, options);
Messages
Sign a new message
await wallet.message().sign(input);
Verify an existing message
await wallet.message().verify(input);
Ledger
Get the version from ledger
await wallet.ledger().getVersion();
Get a public key from ledger
await wallet.ledger().getPublicKey(path);
Sign a transaction with ledger
await wallet.ledger().signTransaction(path, payload);
Sign a transaction with ledger using schnorr
await wallet.ledger().signTransactionWithSchnorr(path, payload);
Sign a message with ledger
await wallet.ledger().signMessage(path, payload);
Sign a message with ledger using schnorr
await wallet.ledger().signMessageWithSchnorr(path, payload);
Links
Get an explorer link for a block
await wallet.link().block(id);
Get an explorer link for a transaction
await wallet.link().transaction(id);
Get an explorer link for a wallet
await wallet.link().wallet(id);
Last updated 3 months ago
Edit Page