@did-btc1/method
    Preparing search index...

    Interface IBitcoinRpc

    Interface for the Bitcoin Core RPC client.

    interface IBitcoinRpc {
        abandonTransaction(txid: string): Promise<void>;
        abortRescan(): Promise<void>;
        addMultiSigAddress(
            __namedParameters: AddMultiSigAddressParams,
        ): Promise<string>;
        addWitnessAddress(address: string): Promise<void>;
        backupWallet(destination: string): Promise<void>;
        bumpFee(txid: string, options?: BumpFeeOption): Promise<BumpFeeResult>;
        clearBanned(): Promise<void>;
        combineRawTransaction(txs: string[]): Promise<string>;
        command<R extends unknown>(methods: BatchOption[]): Promise<readonly R[]>;
        createMultiSig(
            nrequired: number,
            keys: string[],
        ): Promise<CreateMultiSigResult>;
        createRawTransaction(__namedParameters: CreateRawTxParams): Promise<string>;
        createWallet(
            __namedParameters: CreateWalletParams,
        ): Promise<CreateWalletResult>;
        decodeRawTransaction(hexstring: string): Promise<DecodedRawTransaction>;
        decodeScript(hexstring: string): Promise<ScriptDecoded>;
        disconnectNode(address?: string, nodeid?: number): Promise<void>;
        dumpPrivKey(address: string): Promise<string>;
        dumpWallet(filename: string): Promise<{ filename: string }>;
        encryptWallet(passphrase: string): Promise<void>;
        estimateSmartFee(
            conf_target: number,
            estimate_mode?: FeeEstimateMode,
        ): Promise<{ blocks?: number; errors?: string[]; feerate?: number }>;
        fundRawTransaction(
            hexstring: string,
            options: FundRawTxOptions,
        ): Promise<{ changepos: number; fee: number; hex: string }>;
        getBlock(
            __namedParameters: GetBlockParams,
        ): Promise<undefined | BlockResponse>;
        getBlockchainInfo(): Promise<ChainInfo>;
        getBlockCount(): Promise<number>;
        getBlockHash(height: number): Promise<string>;
        getConnectionCount(): Promise<number>;
        getDifficulty(): Promise<number>;
        getMempoolInfo(): Promise<MempoolInfo>;
        getMiningInfo(): Promise<MiningInfo>;
        getNewAddress(account?: string): Promise<string>;
        getPeerInfo(): Promise<PeerInfo[]>;
        sendRawTransaction(
            hexstring: string,
            allowhighfees?: boolean,
        ): Promise<void>;
        sendToAddress(
            address: string,
            amount: number,
            comment?: string,
            comment_to?: string,
            subtreactfeefromamount?: boolean,
            replaceable?: boolean,
            conf_target?: number,
            estimate_mode?: FeeEstimateMode,
        ): Promise<string>;
        validateAddress(address: string): Promise<ValidateAddressResult>;
        verifyMessage(
            address: string,
            signature: string,
            message: string,
        ): Promise<boolean>;
        walletLock(passphrase: string, timeout: number): Promise<void>;
    }
    Index

    Methods

    • Marks a transaction and its in-wallet descendants as abandoned, allowing their inputs to be respent.

      Parameters

      • txid: string

      Returns Promise<void>

    • Combines multiple raw transactions into a single transaction.

      Parameters

      • txs: string[]

      Returns Promise<string>

    • Disconnects a node by address or node ID.

      Parameters

      • Optionaladdress: string
      • Optionalnodeid: number

      Returns Promise<void>

    • Dumps all wallet keys and metadata to a file.

      Parameters

      • filename: string

      Returns Promise<{ filename: string }>

    • Estimates the fee rate for a given confirmation target.

      Parameters

      Returns Promise<{ blocks?: number; errors?: string[]; feerate?: number }>

    • Sends raw transaction hex to the Bitcoin network.

      Parameters

      • hexstring: string
      • Optionalallowhighfees: boolean

      Returns Promise<void>

    • Sends bitcoins to a specified address.

      Parameters

      • address: string
      • amount: number
      • Optionalcomment: string
      • Optionalcomment_to: string
      • Optionalsubtreactfeefromamount: boolean
      • Optionalreplaceable: boolean
      • Optionalconf_target: number
      • Optionalestimate_mode: FeeEstimateMode

      Returns Promise<string>

    • Verifies a signed message.

      Parameters

      • address: string
      • signature: string
      • message: string

      Returns Promise<boolean>

    • Locks the wallet, requiring a passphrase to unlock.

      Parameters

      • passphrase: string
      • timeout: number

      Returns Promise<void>