getBigIntDowncastRequestTransformer

function getBigIntDowncastRequestTransformer(): RpcRequestTransformer;

Creates a transformer that downcasts all BigInt values to Number.

Returns

RpcRequestTransformer

Deprecated

This transformer is no longer used by the default Solana RPC request transformer (getDefaultRequestTransformerForSolanaRpc). The Solana RPC transport serializes bigint values losslessly as large integer literals (via stringifyJsonWithBigInts), and Agave parses JSON integers across the full u64 range without precision loss, so downcasting bigints to (potentially lossy) numbers is unnecessary. It is slated for removal in a future major version.

Example

import { getBigIntDowncastRequestTransformer } from '@solana/rpc-transformers';
 
const requestTransformer = getBigIntDowncastRequestTransformer();

On this page