import { IClient } from '@/types'; import { CreateMultisig, CreateMultisigResponse, GetAddressBalance, GetAddressBalanceResponse, GetAddressBalanceResponseWithAsset, GetAddressDeltas, GetAddressDeltasResponse, GetAddressMempool, GetAddressMempoolResponse, GetAddressTxIds, GetAddressUtxos, GetAddressUtxosResponse, GetInfoResponse, GetMemoryInfo, GetMemoryInfoResponse, GetSpentInfo, GetSpentInfoResponse, loggingRequest, SetMockTime, SignMessageWithPrivKey, SignMessageWithPrivKeyResponse, ValidateAddress, ValidateAddressResponse, VerifyMessage } from './types'; /** * @class Misc * @subcategory Methods */ export declare class Misc { private _client; constructor(client: IClient); /** * Returns an object containing various state info. * @deprecated * @returns {Promise} */ getInfo(): Promise; /** * Returns an object containing information about memory usage. * @param params * @param {string=} [params.mode='stats'] Determines what kind of information is returned. This argument is optional, the default mode is \"stats\" * @returns {Promise} */ getMemoryInfo({ mode }: GetMemoryInfo): Promise; /** * Return information about the given raven address. * @param params * @param {string} params.address The raven address to validate * @returns {Promise} */ validateAddress({ address, }: ValidateAddress): Promise; /** * Creates a multi-signature address with n signature of m keys required. * @param params * @param {number} params.nrequired The number of required signatures out of the n keys or addresses. * @param {string} params.keys A json array of keys which are raven addresses or hex-encoded public keys * @returns {Promise} An object with the address and redeemScript */ createMultisig({ nrequired, keys, }: CreateMultisig): Promise; /** * Verify a signed message * @param params * @param {string} params.address The raven address to use for the signature. * @param {string} params.signature The signature provided by the signer in base 64 encoding (see signmessage). * @param {string} params.message The message that was signed. * @returns {Promise} If the signature is verified or not. */ verifyMessage({ address, signature, message, }: VerifyMessage): Promise; /** * Sign a message with the private key of an address * @param params * @param {string} params.privkey The private key to sign the message with. * @param {string} params.message The message to create a signature of. * @returns {Promise} The signature of the message encoded in base 64 */ signMessageWithPrivKey({ privkey, message, }: SignMessageWithPrivKey): Promise; /** * Returns all mempool deltas for an address (requires addressindex to be enabled). * @param params * @param {Array} params.addresses Array of base58check encoded address * @param {boolean=} [params.includeAssets=false] If true this will return an expanded result which includes asset deltas * @returns {Promise} */ getAddressMempool({ addresses, includeAssets, }: GetAddressMempool): Promise; /** * Returns all unspent outputs for an address (requires addressindex to be enabled). * @param params * @param {Array} params.addresses Array of base58check encoded addresses * @param {boolean=} [params.chainInfo=false] Include chain info with results * @param {string=} params.assetName Get UTXOs for a particular asset instead of RVN ('*' for all assets). * @returns {Promise} */ getAddressUtxos(params: GetAddressUtxos): Promise; /** * Returns all changes for an address (requires addressindex to be enabled). * @param params * @param {Array} params.addresses Array of base58check encoded addresses * @param {number} params.start The start block height * @param {number} params.end The end block height * @param {boolean} params.chainInfo Include chain info in results, only applies if start and end specified * @param {string=} params.assetName Get deltas for a particular asset instead of RVN. * @returns {Promise} */ getAddressDeltas(params: GetAddressDeltas): Promise; /** * Returns the txids for an address(es) (requires addressindex to be enabled). * @param params * @param {Array} params.addresses Array of base58check encoded addresses * @param {number=} params.start The start block height * @param {number=} params.end The end block height * @returns {Promise} Array of transaction ids */ getAddressTxIds(params: GetAddressTxIds): Promise; /** * Returns the balance for an address(es) (requires addressindex to be enabled). * @param params * @param {Array} params.addresses Array of base58check encoded addresses * @param {boolean=} [params.includeAssets=false] If true this will return an expanded result which includes asset balances * @returns {Promise} */ getAddressBalance({ addresses, includeAssets, }: GetAddressBalance): Promise; /** * Returns the txid and index where an output is spent. * @param params * @param {string} txid The hex string of the txid * @param {number} index The start block height * @returns {Promise} */ getSpentInfo(params: GetSpentInfo): Promise; /** * Set the local time to given timestamp (-regtest only) * @param params * @param {number} timestamp Unix seconds-since-epoch timestamp. Pass 0 to go back to using the system time. * @returns {Promise} */ setMockTime({ timestamp }: SetMockTime): Promise; /** * 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 raven-cli and the GUI. * * There is no server-side difference. * @returns {Promise} */ echo(): Promise; /** * 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 raven-cli and the GUI. * * There is no server-side difference. * @returns {Promise} */ echojson(): Promise; /** * 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. * @param params * @param {Array} params.include Array of strings. Add debug logging for these categories. * @param {Array} params.exclude Array of strings. Remove debug logging for these categories. * @returns {Promise} A list of the logging categories that are active. */ logging({ include, exclude }: loggingRequest): Promise; }