UNPKG

@vafanassieff/bitcoin-cli-ts

Version:

Auto-generated Bitcoin client library for bitcoind JSON-RPC API

25 lines (21 loc) 710 B
// Auto synced from github actions. Don't change this file import { Bitcoind } from '../../types.js' import request from '../../rpc-request.js' type SignMessageParams = { bitcoind: Bitcoind /* The bitcoin address to use for the private key. */ address: string /* The message to create a signature of. */ message: string } /** * signmessage "address" "message" * * Sign a message with the private key of an address * Requires wallet passphrase to be set with walletpassphrase call if wallet is encrypted. * */ export function signMessage(params: SignMessageParams) { const { bitcoind, ...methodParams } = params return request({ method: 'signmessage', params: methodParams }, bitcoind) }