Methods
(static) .createWalletClient(opts) → {RPCWallet}
Factory that creates a RPCWallet client object.
Parameters:
opts
(
Object
)
Properties
url
(
string
)
complete url with port 'http://127.0.0.1:20000' or 'https://127.0.0.1:20000'.
username
(
string
)
<optional>username.
password
(
string
)
<optional>password.
- Source:
(async, inner) .addAddressBook(opts) → {Promise.<object>}
Retrieves entries from the address book.
Parameters:
opts
(
Object
)
Properties
address
(
string
)
Address.
payment_id
(
string
)
<optional>Defaults to "0000000000000000000000000000000000000000000000000000000000000000".
description
(
string
)
<optional>Defaults to "".
- Source:
(async, inner) .autoRefresh(opts) → {Promise.<object>}
Refresh wallet on interval.
Parameters:
opts
(
Object
)
Properties
enable
(
boolean
)
True to enable. False to deactivate.
period
(
number
)
<optional>Interval in seconds. Default is 20.
- Source:
(async, inner) .changeWalletPassword(optsopt) → {Promise.<object>}
Change a wallet password.
Parameters:
opts
(
Object
)
<optional>Properties
old_password
(
string
)
<optional>Current wallet password, if defined.
new_password
(
string
)
<optional>New wallet password, if not blank.
- Source:
(async, inner) .checkReserveProof(opts) → {Promise.<object>}
Proves a wallet has a disposable reserve using a signature.
Parameters:
opts
(
Object
)
Properties
address
(
string
)
Public address of the wallet.
message
(
string
)
<optional>Should be the same message used in get_reserve_proof.
signature
(
string
)
Reserve signature to confirm.
- Source:
(async, inner) .checkSpendProof(opts) → {Promise.<object>}
Prove a spend using a signature. Unlike proving a transaction, it does not requires the destination public address.
Parameters:
opts
(
Object
)
Properties
txid
(
string
)
Transaction id.
message
(
string
)
<optional>Should be the same message used in get_tx_proof.
signature
(
string
)
Transaction signature to confirm.
- Source:
(async, inner) .checkTxKey(opts) → {Promise.<object>}
Check a transaction in the blockchain with its secret key.
Parameters:
opts
(
Object
)
Properties
txid
(
string
)
Transaction id.
tx_key
(
string
)
Transaction secret key.
address
(
string
)
Destination public address of the transaction.
- Source:
(async, inner) .checkTxProof(opts) → {Promise.<object>}
Prove a transaction by checking its signature.
Parameters:
opts
(
Object
)
Properties
txid
(
string
)
Transaction id.
address
(
string
)
Destination public address of the transaction.
message
(
string
)
<optional>Should be the same message used in get_tx_proof.
signature
(
string
)
Transaction signature to confirm.
- Source:
(async, inner) .closeWallet() → {Promise.<object>}
Close the currently opened wallet, after trying to save it.
- Source:
(async, inner) .createAccount(opts) → {Promise.<object>}
Create a new account with an optional label.
Parameters:
opts
(
Object
)
Properties
label
(
string
)
<optional>Label for the account.
- Source:
Example
{
account_index: 1,
address: 'aRS3fTmhpE7JWf1cv4q9LWWEfWMGSEXHYPeMYHxHkupUHrequ4CNs5mCq248sLPmQVBz96yUdVhivNXq5hQr6C4s7sNcWH4LHh'
}
(async, inner) .createAddress(opts) → {Promise.<object>}
Create a new address for an account. Optionally, label the new address.
Parameters:
opts
(
Object
)
Properties
account_index
(
number
)
Create a new address for this account.
label
(
string
)
<optional>Label for the new address.
- Source:
Example
{
address: 'aRS3Pz1Zc2nNEo3K3wcZCWWRQWvVrom7B72XdoZem22wUHtFhyqSMJnAUtGBd2coHZGyqwrzWrXud4q2B6T4rGic3gDgVGoau7',
address_index: 1
}
(async, inner) .createWallet(opts) → {Promise}
Create a new wallet. You need to have set the argument "–wallet-dir" when launching arqma-wallet-rpc to make this work.
Parameters:
opts
(
Object
)
Properties
filename
(
string
)
Wallet file name.
password
(
string
)
<optional>password to protect the wallet.
language
(
string
)
Language for your wallets' seed.
- Source:
(async, inner) .deleteAddressBook(opts) → {Promise.<object>}
Delete an entry from the address book.
Parameters:
opts
(
Object
)
Properties
index
(
number
)
The index of the address book entry.
- Source:
(async, inner) .exportKeyImages() → {Promise.<object>}
Export a signed set of key images.
- Source:
Example
{
signed_key_images:
[
{ key_image: '264d2998d74a60292322f8a1ec4b317bd8e4c16147385cca92aef734bda2e5f7',
signature: '97bc571ce5634117fd96a5fab65bd1817dd35176e11125b752014d9039478f0c4386000f2719c338a8e7db02b6af6a81ccd346fbb3284f5a495e93510272ac09'
},
...
]
}
(async, inner) .exportMultisigInfo() → {Promise.<object>}
Export multisig info for other participants.
- Source:
Example
{ info: '4172516d41206d756c7469736967206578706f72740130d905ab541a07f7b0ace79b045361535cd857210c96dd09c8fc1c5b0ef3735e60418f042f5e870b77e0143f7851983022138ba2b0951352850ab8165fd97a7314428ec0d5320cc02f139b5282f039eb677eaf8045d1e91d835e1240842deef73dd77d76dee2334d19dfa7b9bb7093345b013ce5a31bfc797f22435e1b71d90d06d2cece32f45bc67c5abc64e43de9e37555933f8e17044ead5a837fdd6be88cc89527194bb901c797c9911d0fd993f504d7d78718acb521d2911b39e1a3b00968f403c2c8240b' }
(async, inner) .exportOutputs() → {Promise.<object>}
Export all outputs in hex format.
- Source:
(async, inner) .finalizeMultisig(opts) → {Promise.<object>}
Turn this wallet into a multisig wallet, extra step for N-1/N wallets.
Parameters:
opts
(
Object
)
Properties
multisig_info
(
Array.<string>
)
List of multisig string from peers.
password
(
string
)
Wallet password.
- Source:
(async, inner) .generateFromKeys(opts) → {Promise.<object>}
Restore wallet using mnemonic seed.
Parameters:
opts
(
Object
)
Properties
restore_height
(
number
)
<optional>Start height for scanning the blockchain.
filename
(
string
)
Wallet filename.
address
(
string
)
Wallet address.
spendkey
(
string
)
<optional>Wallet spend key.
viewkey
(
string
)
Wallet view key.
password
(
string
)
<optional>Wallet password.
autosave_current
(
boolean
)
<optional>Save wallet.
- Source:
Example
{
address: 'ar47HiRLKrEcQdgRhN2FTfEnJwkXoUWKH8WAwTucZ8RP9QxB2WMhh6Ffzhfh2panETahxdMX7cjhaiV6ShvG5gdY2iALecvcL',
info: 'Wallet has been restored successfully.',
seed: 'pulp peeled picked succeed wildly lymph edgy sushi limits hitched balding rising syndrome omission getting unafraid feline hornet darted mixture napkin remedy uptight wield unafraid',
was_deprecated: false
}
(async, inner) .getAccounts(optsopt) → {Promise.<object>}
Get all accounts for a wallet. Optionally filter accounts by tag.
Parameters:
opts
(
Object
)
<optional>Properties
tag
(
string
)
<optional>Tag for filtering accounts.
- Source:
Example
{
subaddress_accounts:
[
{
account_index: 0,
balance: 0,
base_address: 'ar2ucUkifo5g39rBYsGk4KKkCySVhQcZtd8iazcvnrH8jVFTEZBnQYifVDj89prrYMeBah6BRm6HtN7n5aKuZwd72yZvbzmNL',
label: 'Primary account',
tag: '',
unlocked_balance: 0
}
],
total_balance: 0,
total_unlocked_balance: 0
}
(async, inner) .getAccountTags() → {Promise.<object>}
Get a list of user-defined account tags.
- Source:
(async, inner) .getAddress(opts) → {Promise.<object>}
Return the wallet's addresses for an account. Optionally filter for specific set of subaddresses.
Parameters:
opts
(
Object
)
Properties
account_index
(
number
)
Return subaddresses for this account.
address_index
(
Array.<number>
)
<optional>List of subaddresses to return from an account.
- Source:
Example
{
address: 'ar2ucUkifo5g39rBYsGk4KKkCySVhQcZtd8iazcvnrH8jVFTEZBnQYifVDj89prrYMeBah6BRm6HtN7n5aKuZwd72yZvbzmNL',
addresses:
[
{
address: 'ar2ucUkifo5g39rBYsGk4KKkCySVhQcZtd8iazcvnrH8jVFTEZBnQYifVDj89prrYMeBah6BRm6HtN7n5aKuZwd72yZvbzmNL',
address_index: 0,
label: 'Primary account',
used: false
}
]
}
(async, inner) .getAddressBook(opts) → {Promise.<object>}
Retrieves entries from the address book.
Parameters:
opts
(
Object
)
Properties
entries
(
Array.<number>
)
Indices of the requested address book entries.
- Source:
Example
{
entries:
[
{
address: 'ar3oJsuAn3f31weg11zx27AoReEBPRtv5XRLtoYJRGVcQFNuXJcPtftBvcZz4YW7Fj4c4iV9G81299rz1ZB72kie2M3afy6ho',
description: 'test',
index: 0,
payment_id: '0000000000000000000000000000000000000000000000000000000000000000'
}
]
}
(async, inner) .getAddressIndex(opts) → {Promise.<object>}
Get account and address indexes from a specific (sub)address.
Parameters:
opts
(
Object
)
Properties
address
(
string
)
(sub)address to look for.
- Source:
(async, inner) .getAttribute(opts) → {Promise.<object>}
Get arbitrary attribute.
Parameters:
opts
(
Object
)
Properties
key
(
string
)
Attribute name.
- Source:
(async, inner) .getBalance(opts) → {Promise.<object>}
Return the wallet's balance.
Parameters:
opts
(
Object
)
Properties
account_index
(
number
)
Return balance for this account.
address_indices
(
Array.<number>
)
<optional>Return balance detail for those subaddresses.
- Source:
(async, inner) .getBulkPayments(opts) → {Promise.<object>}
Get a list of incoming payments using a given payment id, or a list of payments ids, from a given height. This method is the preferred method over get_payments because it has the same functionality but is more extendable. Either is fine for looking up transactions by a single payment ID.
Parameters:
opts
(
Object
)
Properties
payment_ids
(
Array.<string>
)
Payment IDs used to find the payments (16 characters hex).
min_block_height
(
number
)
The block height at which to start looking for payments.
- Source:
Example
{
payments:
[
{
address: 'as3ne6ewX5GBfSkQZsWi5YWjTG9xRSA5fMYBM7sfawiqWr2n1qd5Y4JJEWKXE1dKRCNuVWQLeknUmWascmFBNwKi1zyBaB9n2',
amount: 1100000000,
block_height: 8667,
payment_id: '8ca523f5e9506fed',
subaddr_index: [Object],
tx_hash: '577d8d53135d49b46238c37fe2429e38610b0fcc4f06799969a7b60c69388d53',
unlock_time: 0
},
...
]
}
(async, inner) .getHeight() → {Promise.<object>}
Returns the wallet's current block height.
- Source:
(async, inner) .getLanguages() → {Promise.<object>}
Get a list of available languages for your wallet's seed.
- Source:
Example
{
languages:
[
'Deutsch',
'English',
'Español',
'Français',
'Italiano',
'Nederlands',
'Português',
'русский язык',
'日本語',
'简体中文 (中国)',
'Esperanto',
'Lojban'
]
}
(async, inner) .getPayments(opts) → {Promise.<object>}
Get a list of incoming payments using a given payment id.
Parameters:
opts
(
Object
)
Properties
payment_id
(
string
)
Payment ID used to find the payments (16 characters hex).
- Source:
Example
{
payments:
[
{
address: 'as3ne6ewX5GBfSkQZsWi5YWjTG9xRSA5fMYBM7sfawiqWr2n1qd5Y4JJEWKXE1dKRCNuVWQLeknUmWascmFBNwKi1zyBaB9n2',
amount: 1100000000,
block_height: 8667,
payment_id: '8ca523f5e9506fed',
subaddr_index: [Object],
tx_hash: '577d8d53135d49b46238c37fe2429e38610b0fcc4f06799969a7b60c69388d53',
unlock_time: 0
},
...
]
}
(async, inner) .getReserveProof(opts) → {Promise.<object>}
Generate a signature to prove of an available amount in a wallet.
Parameters:
opts
(
Object
)
Properties
all
(
boolean
)
Proves all wallet balance to be disposable.
account_index
(
number
)
Specify the account from witch to prove reserve. (ignored if all is set to true).
amount
(
number
)
Amount (in atomic units) to prove the account has for reserve. (ignored if all is set to true).
message
(
string
)
<optional>Should be the same message used in get_tx_proof.
- Source:
(async, inner) .getSpendProof(opts) → {Promise.<object>}
Generate a signature to prove a spend. Unlike proving a transaction, it does not requires the destination public address.
Parameters:
opts
(
Object
)
Properties
txid
(
string
)
Transaction id.
message
(
string
)
<optional>Add a message to the signature to further authenticate the prooving process.
- Source:
(async, inner) .getTransferByTxId(opts) → {Promise.<object>}
Show information about a transfer to/from this address.
Parameters:
opts
(
Object
)
Properties
txid
(
string
)
Transaction ID used to find the transfer.
account_index
(
string
)
<optional>Index of the account to query for the transfer.
- Source:
Example
{
transfer:
{
address: 'as3ne6ewX5GBfSkQZsWi5YWjTG9xRSA5fMYBM7sfawiqWr2n1qd5Y4JJEWKXE1dKRCNuVWQLeknUmWascmFBNwKi1zyBaB9n2',
amount: 12000000000,
confirmations: 918,
double_spend_seen: false,
fee: 24240,
height: 7924,
note: '',
payment_id: '8ca523f5e9506fed',
subaddr_index: { major: 0, minor: 0 },
suggested_confirmations_threshold: 1,
timestamp: 1558474233,
txid: 'cf51c2ce7c0197a7cc813b264d6289095170b06c0ef2540ad8f22f36cd656869',
type: 'in',
unlock_time: 0
},
transfers:
[
{
address: 'as3ne6ewX5GBfSkQZsWi5YWjTG9xRSA5fMYBM7sfawiqWr2n1qd5Y4JJEWKXE1dKRCNuVWQLeknUmWascmFBNwKi1zyBaB9n2',
amount: 12000000000,
confirmations: 918,
double_spend_seen: false,
fee: 24240,
height: 7924,
note: '',
payment_id: '8ca523f5e9506fed',
subaddr_index: [Object],
suggested_confirmations_threshold: 1,
timestamp: 1558474233,
txid: 'cf51c2ce7c0197a7cc813b264d6289095170b06c0ef2540ad8f22f36cd656869',
type: 'in',
unlock_time: 0
}
]
}
(async, inner) .getTransfers(optsopt) → {Promise.<object>}
Returns a list of transfers.
Parameters:
opts
(
Object
)
<optional>Properties
in
(
boolean
)
<optional>Include incoming transfers.
out
(
boolean
)
<optional>Include outgoing transfers.
pending
(
boolean
)
<optional>Include pending transfers.
failed
(
boolean
)
<optional>Include failed transfers.
pool
(
boolean
)
<optional>Include transfers from the daemon's transaction pool.
filter_by_height
(
boolean
)
<optional>Filter transfers by block height.
min_height
(
boolean
)
<optional>Minimum block height to scan for transfers, if filtering by height is enabled.
max_height
(
boolean
)
<optional>Maximum block height to scan for transfers, if filtering by height is enabled.
account_index
(
number
)
<optional>Index of the account to query for transfers. (defaults to 0).
subaddr_indices
(
Array.<number>
)
<optional>List of subaddress indices to query for transfers. (defaults to 0).
- Source:
Example
{
in:
[
{ address: 'as3ne6ewX5GBfSkQZsWi5YWjTG9xRSA5fMYBM7sfawiqWr2n1qd5Y4JJEWKXE1dKRCNuVWQLeknUmWascmFBNwKi1zyBaB9n2',
amount: 303838957143,
confirmations: 960,
double_spend_seen: false,
fee: 105040,
height: 7878,
note: '',
payment_id: '0000000000000000',
subaddr_index: [Object],
suggested_confirmations_threshold: 16,
timestamp: 1558406226,
txid: '666d97c738679527d0943e2c03bcfec5889b488ad4b84cb6f0b40d8f0970bc4a',
type: 'in',
unlock_time: 0
},
...
]
}
(async, inner) .getTxKey(opts) → {Promise.<object>}
Get transaction secret key from transaction id.
Parameters:
opts
(
Object
)
Properties
txid
(
string
)
Transaction id.
- Source:
(async, inner) .getTxNotes(opts) → {Promise.<object>}
Get string notes for transactions.
Parameters:
opts
(
Object
)
Properties
txids
(
Array.<string>
)
Transaction ids.
- Source:
(async, inner) .getTxProof(opts) → {Promise.<object>}
Get transaction signature to prove it.
Parameters:
opts
(
Object
)
Properties
txid
(
string
)
Transaction id.
address
(
string
)
Destination public address of the transaction.
message
(
string
)
<optional>Add a message to the signature to further authenticate the prooving process.
- Source:
Example
{
signature: 'InProofV1MupvkPBMgUS3Se3X1jjJqjFmZpv2DfrU7AVPoSe7fizkC3C6fcXxEpFfPqVxzmWu8d1wcoBvqjaQoJUD7Wh133PzbG1CdRC2WfABu5kkg3Ko1e4nPjRZhgzLeDY464TVoTTJ'
}
(async, inner) .getVersion() → {Promise.<object>}
Get RPC version Major & Minor integer-format, where Major is the first 16 bits and Minor the last 16 bits.
- Source:
(async, inner) .importKeyImages(opts) → {Promise.<object>}
Import signed key images list and verify their spent status.
Parameters:
opts
(
Object
)
Properties
signed_key_images
(
Array.<string>
)
Signed key images.
Properties
key_image
(
string
)
Key image.
signature
(
string
)
Signature.
- Source:
(async, inner) .importMultisigInfo(opts) → {Promise.<object>}
Import multisig info from other participants.
Parameters:
opts
(
Object
)
Properties
info
(
Array.<string>
)
List of multisig info in hex format from other participants.
- Source:
(async, inner) .importOutputs(opts) → {Promise.<object>}
Import outputs in hex format.
Parameters:
opts
(
Object
)
Properties
outputs_data_hex
(
string
)
Wallet outputs in hex format.
- Source:
(async, inner) .incomingTransfers(opts) → {Promise.<object>}
Return a list of incoming transfers to the wallet.
Parameters:
opts
(
Object
)
Properties
transfer_type
(
string
)
"all": all the transfers, "available": only transfers which are not yet spent, OR "unavailable": only transfers which are already spent.
account_index
(
number
)
<optional>Return transfers for this account. (defaults to 0).
subaddr_indices
(
Array.<number>
)
<optional>Return transfers sent to these subaddresses.
verbose
(
boolean
)
<optional>Enable verbose output, return key image if true.
- Source:
Example
{
transfers:
[
{
amount: 262791826099,
global_index: 11793,
key_image: '44fb690de7d1cd53b8e8541bf7e15b107cbf9d6f3df22b15cd3ce969913f48c5',
spent: false,
subaddr_index: [Object],
tx_hash: 'f10f1629f2196466aa084aa2431a603f2f600178e6fb56019654a51f9c82f44f',
tx_size: 763
},
...
]
}
(async, inner) .isMultisig() → {Promise.<object>}
Check if a wallet is a multisig one.
- Source:
(async, inner) .labelAccount(opts) → {Promise.<object>}
Label an account.
Parameters:
opts
(
Object
)
Properties
account_index
(
number
)
Apply label to account at this index.
label
(
string
)
Label for the account.
- Source:
(async, inner) .labelAddress(opts) → {Promise.<object>}
Label an address.
Parameters:
opts
(
Object
)
Properties
index.major
(
number
)
Account index for the subaddress.
index.minor
(
number
)
Index of the subaddress in the account.
label
(
string
)
Label for the new address.
- Source:
(async, inner) .makeIntegratedAddress(optsopt) → {Promise.<object>}
Make an integrated address from the wallet address and a payment id.
Parameters:
opts
(
Object
)
<optional>Properties
standard_address
(
string
)
<optional>Defaults to primary address. Destination public address.
payment_id
(
string
)
<optional>Defaults to a random ID. 16 characters hex encoded.
- Source:
Example
{
integrated_address: 'aRi1jaEgqSRHvoAkNKDLGKB8xVtSxUMf6e8UW7nKdVb6KFLxtYXBQqR6p9EstjPcqTZ5yb4L6RcWeXf5ijwo68MiCgHwN7uH3J843oBLn3e1Z',
payment_id: '8ca523f5e9506fed'
}
(async, inner) .makeMultisig(opts) → {Promise.<object>}
Make a wallet multisig by importing peers multisig string.
Parameters:
opts
(
Object
)
Properties
multisig_info
(
Array.<string>
)
List of multisig string from peers.
threshold
(
number
)
Amount of signatures needed to sign a transfer. Must be less or equal than the amount of signature in multisig_info.
password
(
string
)
Wallet password.
- Source:
Example
{
address: 'as23DCaEx6j3ta9ZUrp1KYDeWehshV9uPNqw7EY8tsNW2XBdSc7g6UeWX7oPxam8m6SZpLFh9uZuT4btcg3vV6Xq1jBADk8Dj',
multisig_info: ''
}
(async, inner) .makeUri(opts) → {Promise.<object>}
Create a payment URI using the official URI spec.
Parameters:
opts
(
Object
)
Properties
address
(
string
)
Wallet address.
amount
(
number
)
<optional>The integer amount to receive, in atomic units.
payment_id
(
string
)
<optional>16 or 64 character hexadecimal payment id.
recipient_name
(
string
)
<optional>Name of the payment recipient.
tx_description
(
string
)
<optional>Description of the reason for the tx.
- Source:
Example
{
uri: 'arqma:as3ne6ewX5GBfSkQZsWi5YWjTG9xRSA5fMYBM7sfawiqWr2n1qd5Y4JJEWKXE1dKRCNuVWQLeknUmWascmFBNwKi1zyBaB9n2?tx_payment_id=8ca523f5e9506fed&tx_amount=1.000000000&recipient_name=stagenet%20B&tx_description=test'
}
(async, inner) .openWallet(opts) → {Promise.<object>}
Open a wallet. You need to have set the argument "–wallet-dir" when launching arqma-wallet-rpc to make this work.
Parameters:
opts
(
Object
)
Properties
filename
(
string
)
Wallet name stored in –wallet-dir.
password
(
string
)
<optional>Only needed if the wallet has a password defined.
- Source:
(async, inner) .parseUri(opts) → {Promise.<object>}
Parse a payment URI to get payment information.
Parameters:
opts
(
Object
)
Properties
uri
(
string
)
This contains all the payment input information as a properly formatted payment URI.
- Source:
Example
{
uri:
{
address: 'as3ne6ewX5GBfSkQZsWi5YWjTG9xRSA5fMYBM7sfawiqWr2n1qd5Y4JJEWKXE1dKRCNuVWQLeknUmWascmFBNwKi1zyBaB9n2',
amount: 1000000000,
payment_id: '8ca523f5e9506fed',
recipient_name: 'stagenet B',
tx_description: 'test'
}
}
(async, inner) .prepareMultisig() → {Promise.<object>}
Prepare a wallet for multisig by generating a multisig string to share with peers.
- Source:
Example
{
multisig_info: 'MultisigV1Wqtpx5Nt5A3aLE5TKVwnTX7jvyCz7ZoKAHWhzM2fB3jnHDN4TPAY9Gbd5nfErL1KVjXG6rUCfL9NDdnnpNvtS4GyGGT7UxpDCtFGEyHUfRkU4ce9xX8vtoLMKLN8U62rL8RxHzLzjExt8WR1ZTa8PqzbzJj2MxeKFxbtoB7iyu522u13'
}
(async, inner) .queryKey(opts) → {Promise.<object>}
Return the spend or view private key.
Parameters:
opts
(
Object
)
Properties
key_type
(
string
)
Which key to retrieve: "mnemonic" - the mnemonic seed (older wallets do not have one) OR "view_key" OR "spend_key".
- Source:
(async, inner) .refresh(optsopt) → {Promise.<object>}
Refresh a wallet after opening.
Parameters:
opts
(
Object
)
<optional>Properties
start_height
(
number
)
<optional>The block height from which to start refreshing.
- Source:
(async, inner) .relayTx(opts) → {Promise.<object>}
Relay a transaction previously created with "do_not_relay":true.
Parameters:
opts
(
Object
)
Properties
hex
(
string
)
Transaction metadata returned from a transfer method with get_tx_metadata set to true.
- Source:
Example
{
fee: 0,
tx_blob: '',
tx_hash: 'd5131629c1fea507ff9e1aae4da4207c7addc7fe1700343834304aa1208fe284',
tx_key: ''
}
(async, inner) .rescanBlockchain(optsopt) → {Promise}
Rescan the blockchain from scratch. When hard is set to true any information which can not be recovered from the blockchain itself will be lost. This includes destination addresses, tx secret keys, tx notes, etc.
Parameters:
opts
(
Object
)
<optional>Properties
hard
(
boolean
)
<optional>default is false.
- Source:
(async, inner) .rescanSpent() → {Promise}
Refresh a wallet after opening.
- Source:
(inner) .resetNonces()
Convenience Digest function to reset nc to '00000001' and generate a new cnonce
- Source:
(async, inner) .restoreDeterministicWallet(opts) → {Promise.<object>}
Restore wallet using mnemonic seed.
Parameters:
opts
(
Object
)
Properties
restore_height
(
number
)
<optional>Start height for scanning the blockchain.
filename
(
string
)
Wallet filename.
seed
(
string
)
Mnemonic seed.
seed_offset
(
string
)
<optional>Seed offset.
password
(
string
)
<optional>Wallet password.
language
(
string
)
<optional>Language for the wallet seed.
- Source:
Example
{
address: 'ar47HiRLKrEcQdgRhN2FTfEnJwkXoUWKH8WAwTucZ8RP9QxB2WMhh6Ffzhfh2panETahxdMX7cjhaiV6ShvG5gdY2iALecvcL',
info: 'Wallet has been restored successfully.',
seed: 'pulp peeled picked succeed wildly lymph edgy sushi limits hitched balding rising syndrome omission getting unafraid feline hornet darted mixture napkin remedy uptight wield unafraid',
was_deprecated: false
}
(async, inner) .setAccountTagDescription(opts) → {Promise.<object>}
Set description for an account tag.
Parameters:
opts
(
Object
)
Properties
tag
(
string
)
The tag to add description.
description
(
string
)
Description for the tag.
- Source:
(async, inner) .setAttribute(opts) → {Promise.<object>}
Set arbitrary attribute.
Parameters:
opts
(
Object
)
Properties
key
(
string
)
Attribute name.
value
(
string
)
Attribute value.
- Source:
(async, inner) .setDaemon(opts) → {Promise.<object>}
Set the daemon to connect with.
Parameters:
opts
(
Object
)
Properties
address
(
string
)
Use daemon instance at
trusted
(
boolean
)
<optional>Enable commands which rely on a trusted daemon.
ssl_support
(
string
)
<optional>Enable SSL on daemon RPC connections: enabled, disabled, autodetect.
ssl_private_key_path
(
string
)
<optional>Path to a PEM format private key.
ssl_certificate_path
(
string
)
<optional>Path to a PEM format certificate.
ssl_ca_file
(
string
)
<optional>Path to file containing concatenated PEM format certificate(s) to replace system CA(s).
ssl_allowed_fingerprints
(
Array.<string>
)
<optional>List of valid fingerprints of allowed RPC servers.
ssl_allow_any_cert
(
boolean
)
<optional>Allow any SSL certificate from the daemon.
- Source:
(async, inner) .setLogCategories(optsopt) → {Promise.<object>}
Set the daemon log categories. Categories are represented as a comma separated list of
Parameters:
opts
(
Object
)
<optional>Properties
categories
(
string
)
<optional>Daemon log categories to enable.
- Source:
(async, inner) .setLogLevel(opts) → {Promise.<object>}
Set the daemon log level. By default, log level is set to 0.
Parameters:
opts
(
Object
)
Properties
level
(
number
)
Wallet log level to set from 0 (less verbose) to 4 (most verbose).
- Source:
(async, inner) .setTxNotes(opts) → {Promise.<object>}
Set arbitrary string notes for transactions.
Parameters:
opts
(
Object
)
Properties
txids
(
Array.<string>
)
Transaction ids.
notes
(
Array.<string>
)
Notes for the transactions.
- Source:
(async, inner) .sign(opts) → {Promise.<object>}
Sign a string.
Parameters:
opts
(
Object
)
Properties
data
(
string
)
Anything you need to sign.
- Source:
Example
{ signature: 'SigV1DXD2ELMXAZyREwEoVMinMyXww7nfdtwCje47UbUGHjDY8Qk6QF9Ckdz7EnbcpkXQ3h3FCDSNBr7Us3cqaPnoQswn' }
(async, inner) .signMultisig(opts) → {Promise.<object>}
Sign a transaction in multisig.
Parameters:
opts
(
Object
)
Properties
tx_data_hex
(
string
)
Multisig transaction in hex format, as returned by transfer under multisig_txset.
- Source:
Example
{ tx_data_hex: '4172516d ... ',
tx_hash_list: [ 'bf54ffccfaf56f4d6af9ca103eb35fc4ede31325eaead960bef296f4c7ea0a07' ]
}
(async, inner) .signTransfer(opts) → {Promise.<object>}
Set description for an account tag.
Parameters:
opts
(
Object
)
Properties
unsigned_txset
(
string
)
Set of unsigned tx returned by "transfer" or "transferSplit" methods.
export_raw
(
boolean
)
<optional>If true, return the raw transaction data. (Defaults to false).
- Source:
Example
{
signed_txset:'4172516d41207 ...',
tx_hash_list: ['11dc58c45e048cf4596ff4726b0130bf389933c55bc0b48f82d168980eca122e']
}
(async, inner) .splitIntegratedAddress(opts) → {Promise.<object>}
Retrieve the standard address and payment id corresponding to an integrated address.
Parameters:
opts
(
Object
)
Properties
integrated_address
(
string
)
Integrated address.
- Source:
Example
{
is_subaddress: false,
payment_id: 'e558803fb1958fc8',
standard_address: 'as3ne6ewX5GBfSkQZsWi5YWjTG9xRSA5fMYBM7sfawiqWr2n1qd5Y4JJEWKXE1dKRCNuVWQLeknUmWascmFBNwKi1zyBaB9n2'
}
(inner) .sslRejectUnauthorized()
If not false, the server certificate is verified against the list of supplied CAs.
- Source:
(async, inner) .startMining(opts) → {Promise.<object>}
Start mining in the ArQmA daemon.
Parameters:
opts
(
Object
)
Properties
threads_count
(
number
)
Number of threads created for mining.
do_background_mining
(
boolean
)
Allow to start the miner in smart mining mode.
ignore_battery
(
boolean
)
Ignore battery status (for smart mining only).
- Source:
(async, inner) .stopMining() → {Promise.<object>}
Refresh a wallet after opening.
- Source:
(async, inner) .stopWallet() → {Promise.<object>}
Stops the wallet, storing the current state.
- Source:
(async, inner) .store() → {Promise.<object>}
Save the wallet file.
- Source:
(async, inner) .submitMultisig(opts) → {Promise.<object>}
Submit a signed multisig transaction.
Parameters:
opts
(
Object
)
Properties
tx_data_hex
(
string
)
Multisig transaction in hex format, as returned by sign_multisig under tx_data_hex.
- Source:
(async, inner) .submitTransfer(opts) → {Promise.<object>}
Set description for an account tag.
Parameters:
opts
(
Object
)
Properties
tx_data_hex
(
string
)
Set of signed tx returned by "sign_transfer".
- Source:
(async, inner) .sweepAll(opts) → {Promise.<object>}
Send all unlocked balance to an address.
Parameters:
opts
(
Object
)
Properties
address
(
string
)
Destination public address.
account_index
(
number
)
Sweep transactions from this account.
subaddr_indices
(
Array.<number>
)
<optional>Sweep from this set of subaddresses in the account.
priority
(
number
)
<optional>Priority for sending the sweep transfer, partially determines fee.
mixin
(
number
)
Number of outputs from the blockchain to mix with (0 means no mixing).
ring_size
(
number
)
Sets ringsize to n (mixin + 1).
unlock_time
(
number
)
Number of blocks before the ARQ can be spent (0 to not add a lock).
payment_id
(
string
)
<optional>Random 32-byte/64-character hex string to identify a transaction.
get_tx_keys
(
boolean
)
<optional>Return the transaction keys after sending.
below_amount
(
number
)
<optional>Include outputs below this amount.
do_not_relay
(
boolean
)
<optional>If true, do not relay this sweep transfer. (Defaults to false).
get_tx_hex
(
boolean
)
<optional>Return the transactions as hex encoded string. (Defaults to false).
get_tx_metadata
(
boolean
)
<optional>Return the transaction metadata as a string. (Defaults to false).
- Source:
Example
{
amount_list: [ 322790663594, 303554155996, 322790933785, 263080732210 ],
fee_list: [ 105300, 105300, 105300, 97200 ],
multisig_txset: '',
tx_hash_list:
[
'1b192df60976e25f64aa161a6c8101aa58f9a4df8a807eda6efb45f6cc4c9954',
'9ab16dc055543b93fd6cdb72088841453d8f0434c2c4fe0b973731a9802d2833',
'cfdbb18284f0e48e2c3e90e365ff1fc027773016176cc5b45d6961b9783dcfb9',
'7a515c0f87d5a1f330b46fe2b21eb13466b15499c2374c705f0e98ec7fd64471'
],
unsigned_txset: ''
}
(async, inner) .sweepDust(opts) → {Promise.<object>}
Send all dust outputs back to the wallet's, to make them easier to spend (and mix).
Parameters:
opts
(
Object
)
Properties
get_tx_keys
(
boolean
)
<optional>Return the transaction keys after sending.
do_not_relay
(
boolean
)
<optional>If true, the newly created transaction will not be relayed to the ArQmA network. (Defaults to false).
get_tx_hex
(
boolean
)
<optional>Return the transactions as hex string after sending. (Defaults to false).
get_tx_metadata
(
boolean
)
<optional>Return list of transaction metadata needed to relay the transfer later. (Defaults to false).
- Source:
(async, inner) .sweepSingle(opts) → {Promise.<object>}
Send all of a specific unlocked output to an address.
Parameters:
opts
(
Object
)
Properties
address
(
string
)
Destination public address.
account_index
(
number
)
Sweep transactions from this account.
subaddr_indices
(
Array.<number>
)
<optional>Sweep from this set of subaddresses in the account.
priority
(
number
)
<optional>Priority for sending the sweep transfer, partially determines fee.
mixin
(
number
)
Number of outputs from the blockchain to mix with (0 means no mixing).
ring_size
(
number
)
Sets ringsize to n (mixin + 1).
unlock_time
(
number
)
Number of blocks before the ARQ can be spent (0 to not add a lock).
payment_id
(
string
)
<optional>Random 32-byte/64-character hex string to identify a transaction.
get_tx_keys
(
boolean
)
<optional>Return the transaction keys after sending.
below_amount
(
number
)
<optional>Include outputs below this amount.
do_not_relay
(
boolean
)
<optional>If true, do not relay this sweep transfer. (Defaults to false).
get_tx_hex
(
boolean
)
<optional>Return the transactions as hex encoded string. (Defaults to false).
get_tx_metadata
(
boolean
)
<optional>Return the transaction metadata as a string. (Defaults to false).
- Source:
Example
{
amount: 20178483807,
fee: 32280,
multisig_txset: '',
tx_blob: '',
tx_hash: 'c71baea6d6e159def22666487d43b7bb9d5ee4bd141497bf5b289714d0089b46',
tx_key: '',
tx_metadata: '',
unsigned_txset: ''
}
(async, inner) .tagAccounts(opts) → {Promise.<object>}
Apply a filtering tag to a list of accounts.
Parameters:
opts
(
Object
)
Properties
tag
(
string
)
Tag for the accounts.
accounts
(
Array.<number>
)
Tag this list of accounts.
- Source:
(async, inner) .transfer(opts) → {Promise.<object>}
Send ARQ to a number of recipients.
Parameters:
opts
(
Object
)
Properties
destinations
(
Array.<string>
)
Array of destinations to receive ARQ.
Properties
amount
(
number
)
Amount to send to each destination, in atomic units.
address
(
string
)
Destination public address.
account_index
(
number
)
<optional>Transfer from this account index. (Defaults to 0).
subaddr_indices
(
Array.<number>
)
<optional>Transfer from this set of subaddresses. (Defaults to 0).
priority
(
number
)
Set a priority for the transaction. Accepted Values are: 0-3 for: default, unimportant, normal, elevated, priority.
mixin
(
number
)
Number of outputs from the blockchain to mix with (0 means no mixing).
ring_size
(
number
)
Number of outputs to mix in the transaction (this output + N decoys from the blockchain).
unlock_time
(
number
)
Number of blocks before the ARQ can be spent (0 to not add a lock).
payment_id
(
string
)
<optional>Random 32-byte/64-character hex string to identify a transaction.
get_tx_key
(
boolean
)
<optional>Return the transaction key after sending.
do_not_relay
(
boolean
)
<optional>If true, the newly created transaction will not be relayed to the ArQmA network. (Defaults to false).
get_tx_hex
(
boolean
)
<optional>Return the transaction as hex string after sending (Defaults to false).
get_tx_metadata
(
boolean
)
<optional>Return the metadata needed to relay the transaction. (Defaults to false).
- Source:
Example
{
amount: 1000000000,
fee: 121500,
multisig_txset: '',
tx_blob: '',
tx_hash: '90796ef384f803d2aca1e32f0fce91a07b86ab8745cfaa1ebe60f7ae07c7e0d8',
tx_key: '',
tx_metadata: '',
unsigned_txset: ''
}
(async, inner) .transferSplit(opts) → {Promise.<object>}
Same as transfer, but can split into more than one tx if necessary.
Parameters:
opts
(
Object
)
Properties
destinations
(
Array.<string>
)
Array of destinations to receive ARQ.
Properties
amount
(
number
)
Amount to send to each destination, in atomic units.
address
(
string
)
Destination public address.
account_index
(
number
)
<optional>Transfer from this account index. (Defaults to 0).
subaddr_indices
(
Array.<number>
)
<optional>Transfer from this set of subaddresses. (Defaults to 0).
mixin
(
number
)
Number of outputs from the blockchain to mix with (0 means no mixing).
ring_size
(
number
)
Sets ringsize to n (mixin + 1).
unlock_time
(
number
)
Number of blocks before the ARQ can be spent (0 to not add a lock).
payment_id
(
string
)
<optional>Random 32-byte/64-character hex string to identify a transaction.
get_tx_keys
(
boolean
)
<optional>Return the transaction keys after sending.
priority
(
number
)
Set a priority for the transaction. Accepted Values are: 0-3 for: default, unimportant, normal, elevated, priority.
do_not_relay
(
boolean
)
<optional>If true, the newly created transaction will not be relayed to the ArQmA network. (Defaults to false).
get_tx_hex
(
boolean
)
<optional>Return the transactions as hex string after sending.
new_algorithm
(
boolean
)
<optional>True to use the new transaction construction algorithm, defaults to false.
get_tx_metadata
(
boolean
)
<optional>Return list of transaction metadata needed to relay the transfer later.
- Source:
Example
{
amount_list: [ 10000000000 ],
fee_list: [ 121500 ],
multisig_txset: '',
tx_hash_list:
[ '550a0ad4520bc6dc93e039e9d5e752302d27e13526e877074536948faf3c5a1f' ],
unsigned_txset: ''
}
(async, inner) .untagAccounts(opts) → {Promise.<object>}
Remove filtering tag from a list of accounts.
Parameters:
opts
(
Object
)
Properties
accounts
(
Array.<number>
)
Remove tag from this list of accounts.
- Source:
(async, inner) .validateAddress(opts) → {Promise.<object>}
Parse an address to validate if it's a valid ArQmA address.
Parameters:
opts
(
Object
)
Properties
address
(
string
)
Wallet address to check.
any_net_type
(
boolean
)
<optional>If true check on all nets (mainnet, testnet, stagenet), else check if same net as the conencted wallet. Default is false.
allow_openalias
(
boolean
)
<optional>If true resolve the Openalias to an address. Default is false.
- Source:
Example
{
integrated: false,
nettype: 'stagenet',
openalias_address: '',
subaddress: false,
valid: true
}
(async, inner) .verify(opts) → {Promise.<object>}
Verify a signature on a string.
Parameters:
opts
(
Object
)
Properties
data
(
string
)
What should have been signed.
address
(
string
)
Public address of the wallet used to sign the data.
signature
(
string
)
Signature generated by sign method.
- Source: