Methods
# createMultisig(params) → {Promise.<CreateMultisigResponse>}
Creates a multi-signature address with n signature of m keys required.
Parameters:
Name | Type | Description |
---|---|---|
params |
||
nrequired |
number
|
The number of required signatures out of the n keys or addresses. |
keys |
string
|
A json array of keys which are avian addresses or hex-encoded public keys |
An object with the address and redeemScript
Promise.<CreateMultisigResponse>
# echo() → {Promise.<unknown>}
Simply echo back the input arguments. This command is for testing.
The difference between echo and echojson is that echojson has argument conversion enabled in the client-side table in avian-cli and the GUI.
There is no server-side difference.
Promise.<unknown>
# echojson() → {Promise.<unknown>}
Simply echo back the input arguments. This command is for testing.
The difference between echo and echojson is that echojson has argument conversion enabled in the client-side table in avian-cli and the GUI.
There is no server-side difference.
Promise.<unknown>
# getAddressBalance(params) → {Promise.<(GetAddressBalanceResponse|Array.<GetAddressBalanceResponseWithAsset>)>}
Returns the balance for an address(es) (requires addressindex to be enabled).
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
params |
||||
addresses |
Array
|
Array of base58check encoded addresses |
||
includeAssets |
boolean
|
<optional> |
false | If true this will return an expanded result which includes asset balances |
Promise.<(GetAddressBalanceResponse|Array.<GetAddressBalanceResponseWithAsset>)>
# getAddressDeltas(params) → {Promise.<Array.<GetAddressDeltasResponse>>}
Returns all changes for an address (requires addressindex to be enabled).
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
params |
|||
addresses |
Array
|
Array of base58check encoded addresses |
|
start |
number
|
The start block height |
|
end |
number
|
The end block height |
|
chainInfo |
boolean
|
Include chain info in results, only applies if start and end specified |
|
assetName |
string
|
<optional> |
Get deltas for a particular asset instead of AVN. |
Promise.<Array.<GetAddressDeltasResponse>>
# getAddressMempool(params) → {Promise.<Array.<GetAddressMempoolResponse>>}
Returns all mempool deltas for an address (requires addressindex to be enabled).
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
params |
||||
addresses |
Array
|
Array of base58check encoded address |
||
includeAssets |
boolean
|
<optional> |
false | If true this will return an expanded result which includes asset deltas |
Promise.<Array.<GetAddressMempoolResponse>>
# getAddressTxIds(params) → {Promise.<Array.<string>>}
Returns the txids for an address(es) (requires addressindex to be enabled).
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
params |
|||
addresses |
Array
|
Array of base58check encoded addresses |
|
start |
number
|
<optional> |
The start block height |
end |
number
|
<optional> |
The end block height |
Array of transaction ids
Promise.<Array.<string>>
# getAddressUtxos(params) → {Promise.<Array.<GetAddressUtxosResponse>>}
Returns all unspent outputs for an address (requires addressindex to be enabled).
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
params |
||||
addresses |
Array
|
Array of base58check encoded addresses |
||
chainInfo |
boolean
|
<optional> |
false | Include chain info with results |
assetName |
string
|
<optional> |
Get UTXOs for a particular asset instead of AVN ('*' for all assets). |
Promise.<Array.<GetAddressUtxosResponse>>
# getInfo() → {Promise.<GetInfoResponse>}
Returns an object containing various state info.
- Deprecated:
- Yes
Promise.<GetInfoResponse>
# getMemoryInfo(params) → {Promise.<GetMemoryInfoResponse>}
Returns an object containing information about memory usage.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
params |
||||
mode |
string
|
<optional> |
'stats' | Determines what kind of information is returned. This argument is optional, the default mode is "stats" |
Promise.<GetMemoryInfoResponse>
# getSpentInfo(params, txid, index) → {Promise.<GetSpentInfoResponse>}
Returns the txid and index where an output is spent.
Parameters:
Name | Type | Description |
---|---|---|
params |
||
txid |
string
|
The hex string of the txid |
index |
number
|
The start block height |
Promise.<GetSpentInfoResponse>
# logging(params) → {Promise.<string>}
Gets and sets the logging configuration.
When called without an argument, returns the list of categories that are currently being debug logged.
When called with arguments, adds or removes categories from debug logging.
The valid logging categories are: " + ListLogCategories() + " libevent logging is configured on startup and cannot be modified by this RPC during runtime.
Parameters:
Name | Type | Description |
---|---|---|
params |
||
include |
Array
|
Array of strings. Add debug logging for these categories. |
exclude |
Array
|
Array of strings. Remove debug logging for these categories. |
A list of the logging categories that are active.
Promise.<string>
# setMockTime(params, timestamp) → {Promise.<null>}
Set the local time to given timestamp (-regtest only)
Parameters:
Name | Type | Description |
---|---|---|
params |
||
timestamp |
number
|
Unix seconds-since-epoch timestamp. Pass 0 to go back to using the system time. |
Promise.<null>
# signMessageWithPrivKey(params) → {Promise.<SignMessageWithPrivKeyResponse>}
Sign a message with the private key of an address
Parameters:
Name | Type | Description |
---|---|---|
params |
||
privkey |
string
|
The private key to sign the message with. |
message |
string
|
The message to create a signature of. |
The signature of the message encoded in base 64
Promise.<SignMessageWithPrivKeyResponse>
# validateAddress(params) → {Promise.<ValidateAddressResponse>}
Return information about the given avian address.
Parameters:
Name | Type | Description |
---|---|---|
params |
||
address |
string
|
The avian address to validate |
Promise.<ValidateAddressResponse>
# verifyMessage(params) → {Promise.<boolean>}
Verify a signed message
Parameters:
Name | Type | Description |
---|---|---|
params |
||
address |
string
|
The avian address to use for the signature. |
signature |
string
|
The signature provided by the signer in base 64 encoding (see signmessage). |
message |
string
|
The message that was signed. |
If the signature is verified or not.
Promise.<boolean>