The base fee for the next block as a hex value. BaseFeeReturnType
Get the fee config for a specific block.
The parameters for the fee config for a specific block. FeeConfigParameters
The fee config for the specified block. FeeConfigReturnType
Get the active rules at a specific timestamp.
The parameters for the active rules at a specific timestamp. GetActiveRulesAtParameters
The active rules at the specified timestamp. GetActiveRulesAtReturnType
Get the chain configuration for the C-Chain.
The chain configuration including chainId, block numbers for various forks, and timestamps for Avalanche-specific upgrades. GetChainConfigReturnType
Retrieves the registration justification for the given validation ID Hex and subnet ID.
If the validation ID corresponds to a bootstrap validator, the justification bytes
produced by ConvertSubnetToL1Tx are returned.
Otherwise, the function searches the Warp logs on the chain where the validator manager is deployed to locate the RegisterL1ValidatorMessage for the specified validation ID.
The GetRegistrationJustificationReturnType instance.
import { createAvalancheClient } from "@avalanche-sdk/client";
import { getRegistrationJustification } from "@avalanche-sdk/client/methods/public";
import { defineChain } from "@avalanche-sdk/client/chains";
import { utils } from "@avalanche-sdk/client/utils";
const chainConfig = defineChain({
id: 28098,
name: "Rough Complexity Chain",
rpcUrls: {
default: {
http: [
"https://base-url-to-your-rpc/ext/bc/28zXo5erueBemgxPjLom6Vhsm6oVyftLtfQSt61fd62SghoXrz/rpc",
],
},
},
});
const publicClient = createAvalancheClient({
chain: chainConfig,
transport: {
type: "http",
},
});
const validationIDHex = utils.bufferToHex(
utils.base58check.decode(
"TEwxg8JzAUsqFibtYkaiiYH9G1h5ZfX56zYURXpyaPRCSppC4"
)
);
const justification = await publicClient.getRegistrationJustification({
validationIDHex,
subnetIDStr: "2DN6PTi2uXNCzzNz1p2ckGcW2eqTfpt2kv2a1h7EV36hYV3XRJ",
maxBootstrapValidators: 200,
chunkSize: 200,
maxChunks: 100,
});
console.log("justification", JSON.stringify(justification, null, 2));
Get the priority fee needed to be included in a block.
The priority fee needed to be included in a block as a hex value. MaxPriorityFeePerGasReturnType
Get the base fee for the next block.