Functions
createSolanaRpcApi
createSolanaRpcApi<
TRpcMethods
>(config?
):RpcApi
<TRpcMethods
>
Creates a RpcApi implementation of the Solana JSON RPC API with some default behaviours.
The default behaviours include:
- A transform that converts
bigint
inputs tonumber
for compatibility with version 1.0 of the Solana JSON RPC. - A transform that calls the config's Config.onIntegerOverflow | onIntegerOverflow
handler whenever a
bigint
input would overflow a JavaScript IEEE 754 number. See this GitHub issue for more information. - A transform that applies a default commitment wherever not specified
Type Parameters
Type Parameter | Default type |
---|---|
TRpcMethods extends SolanaRpcApiForAllClusters | SolanaRpcApiForTestClusters | SolanaRpcApiForTestClusters |
Parameters
Parameter | Type |
---|---|
config? | Readonly <{ defaultCommitment? : Commitment ; onIntegerOverflow? : IntegerOverflowHandler ; }> |
Returns
RpcApi
<TRpcMethods
>