@vafanassieff/bitcoin-cli-ts
Version:
Auto-generated Bitcoin client library for bitcoind JSON-RPC API
22 lines • 1.02 kB
TypeScript
import { Bitcoind } from '../../types.js';
type GetBlockFromPeerParams = {
bitcoind: Bitcoind;
blockhash: string;
peer_id: number;
};
/**
* getblockfrompeer "blockhash" peer_id
*
* Attempt to fetch block from a given peer.
* We must have the header for this block, e.g. using submitheader.
* The block will not have any undo data which can limit the usage of the block data in a context where the undo data is needed.
* Subsequent calls for the same block may cause the response from the previous peer to be ignored.
* Peers generally ignore requests for a stale block that they never fully verified, or one that is more than a month old.
* When a peer does not respond with a block, we will disconnect.
* Note: The block could be re-pruned as soon as it is received.
* Returns an empty JSON object if the request was successfully scheduled.
*
*/
export declare function getBlockFromPeer(params: GetBlockFromPeerParams): Promise<any>;
export {};
//# sourceMappingURL=get-block-from-peer.d.ts.map