getBlockByHashWithPivotAssumption
Get the requested block if the provided pivot hash is correct, returns an error otherwise.
Usage
import { } from "./client";
const = await .({
: "0x...",
: "0x...",
: 1n,
});import { http, createPublicClient } from 'cive'
import { mainnet } from 'cive/chains'
export const publicClient = createPublicClient({
chain: mainnet,
transport: http(),
})Returns
Block
Parameters
blockHash
- Type:
Hash
const block = await publicClient.getBlockByHashWithPivotAssumption({
blockHash: "0x...",
assumedPivotHash: "0x...",
epochNumber: 1n,
});assumedPivotHash
- Type:
Hash
const block = await publicClient.getBlockByHashWithPivotAssumption({
blockHash: "0x...",
assumedPivotHash: "0x...",
epochNumber: 1n,
});epochNumber
- Type:
bigint
const block = await publicClient.getBlockByHashWithPivotAssumption({
blockHash: "0x...",
assumedPivotHash: "0x...",
epochNumber: 1n,
});JSON-RPC Method
cfx_getBlockByHashWithPivotAssumption