Class

Misc

Misc()

Constructor

# new Misc()

View Source methods/misc/misc.ts, line 2

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

View Source methods/misc/misc.ts, line 226

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.

View Source methods/misc/misc.ts, line 322

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.

View Source methods/misc/misc.ts, line 332

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

View Source methods/misc/misc.ts, line 295

# 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.

View Source methods/misc/misc.ts, line 276

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

View Source methods/misc/misc.ts, line 254

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

View Source methods/misc/misc.ts, line 286

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).

View Source methods/misc/misc.ts, line 264

Promise.<Array.<GetAddressUtxosResponse>>

# getInfo() → {Promise.<GetInfoResponse>}

Returns an object containing various state info.

Deprecated:
  • Yes

View Source methods/misc/misc.ts, line 201

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"

View Source methods/misc/misc.ts, line 209

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

View Source methods/misc/misc.ts, line 304

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.

View Source methods/misc/misc.ts, line 347

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.

View Source methods/misc/misc.ts, line 312

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.

View Source methods/misc/misc.ts, line 245

The signature of the message encoded in base 64

# validateAddress(params) → {Promise.<ValidateAddressResponse>}

Return information about the given avian address.

Parameters:
Name Type Description
params
address string

The avian address to validate

View Source methods/misc/misc.ts, line 217

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.

View Source methods/misc/misc.ts, line 236

If the signature is verified or not.

Promise.<boolean>