Gathering detailed insights and metrics for @mcintyre94/rpc-graphql
Gathering detailed insights and metrics for @mcintyre94/rpc-graphql
Gathering detailed insights and metrics for @mcintyre94/rpc-graphql
Gathering detailed insights and metrics for @mcintyre94/rpc-graphql
npm install @mcintyre94/rpc-graphql
Typescript
Module System
Node Version
NPM Version
TypeScript (98.79%)
JavaScript (0.8%)
Shell (0.41%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
2,551 Stars
4,005 Commits
985 Forks
48 Watchers
101 Branches
147 Contributors
Updated on Jul 14, 2025
Latest Version
2.0.0-experimental.f9b30bb
Package Id
@mcintyre94/rpc-graphql@2.0.0-experimental.f9b30bb
Unpacked Size
1.13 MB
Size
141.47 kB
File Count
16
NPM Version
9.8.1
Node Version
18.18.2
Published on
Nov 29, 2023
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
27
This package defines a GraphQL client resolver built on top of the Solana JSON-RPC.
GraphQL is a query language for your API, and a server-side runtime for executing queries using a type system you define for your data.
This library attempts to define a type schema for Solana. With the proper type schema, developers can take advantage of the best features of GraphQL to make interacting with Solana via RPC smoother, faster, more reliable, and involve less code.
On-chain data can be categorized into three main types:
These types encompass everything that can be queried from the Solana ledger.
The Solana RPC provides a parsing method known as jsonParsed
for supported
types, such as accounts and transaction instructions.
This library leverages GraphQL interfaces for each of these types paired
with specific GraphQL types for each jsonParsed
object. This allows for
powerful querying of jsonParsed
data, including nested and chained queries!
Initializing an RPC-GraphQL using @solana/rpc-graphql
requires an RPC client,
either built using @solana/web3.js
or it's child libraries @solana/rpc-core
and @solana/rpc-transport
.
1import { createSolanaRpc, createDefaultRpcTransport } from '@solana/web3.js'; 2import { createRpcGraphQL } from '@solana/rpc-graphql'; 3 4// Set up an HTTP transport 5const transport = createDefaultRpcTransport({ url: 'http://127.0.0.1:8899' }); 6 7// Create the RPC client 8const rpc = createSolanaRpc({ transport }); 9 10// Create the RPC-GraphQL client 11const rpcGraphQL = createRpcGraphQL(rpc);
The RpcGraphQL
type supports one method query(..)
which accepts a string
query source and an optional variableValues
parameter - which is an object
containing any variables to pipe into the query string.
You can define queries with hard-coded parameters.
1const source = ` 2 query myQuery { 3 account(address: "AyGCwnwxQMCqaU4ixReHt8h5W4dwmxU7eM3BEQBdWVca") { 4 lamports 5 } 6 } 7`; 8 9const result = await rpcGraphQL.query(source);
data: {
account: {
lamports: 10290815n,
},
}
You can also pass the variable values.
1const source = ` 2 query myQuery($address: String!) { 3 account(address: $address) { 4 lamports 5 } 6 } 7`; 8 9const variableValues = { 10 address: 'AyGCwnwxQMCqaU4ixReHt8h5W4dwmxU7eM3BEQBdWVca', 11}; 12 13const result = await rpcGraphQL.query(source, variableValues);
data: {
account: {
lamports: 10290815n,
},
}
Queries with variable values can also be re-used!
1const source = ` 2 query myQuery($address: String!) { 3 account(address: $address) { 4 lamports 5 } 6 } 7`; 8 9const lamportsAccountA = await rpcGraphQL.query(source, { 10 address: 'AyGCwnwxQMCqaU4ixReHt8h5W4dwmxU7eM3BEQBdWVca', 11}); 12 13const lamportsAccountB = await rpcGraphQL.query(source, { 14 address: 'CcYNb7WqpjaMrNr7B1mapaNfWctZRH7LyAjWRLBGt1Fk', 15});
The Account
interface contains common fields across all accounts.
src/schema/account/types.ts: AccountInterface
1interface Account { 2 address: String 3 encoding: String 4 executable: Boolean 5 lamports: BigInt 6 owner: Account 7 rentEpoch: BigInt 8}
Any account can be queried by these fields without specifying the specific account type.
1const source = ` 2 query myQuery($address: String!) { 3 account(address: $address) { 4 executable 5 lamports 6 rentEpoch 7 } 8 } 9`; 10 11const variableValues = { 12 address: 'AyGCwnwxQMCqaU4ixReHt8h5W4dwmxU7eM3BEQBdWVca', 13}; 14 15const result = await rpcGraphQL.query(source, variableValues);
data: {
account: {
executable: false,
lamports: 10290815n,
rentEpoch: 0n,
},
}
Each jsonParsed
account type has its own GraphQL type that can be used in a
GraphQL query.
AccountBase58
: A Solana account with base58 encoded dataAccountBase64
: A Solana account with base64 encoded dataAccountBase64Zstd
: A Solana account with base64 encoded data compressed with zstdNonceAccount
: A nonce accountLookupTableAccount
: An address lookup table accountMintAccount
: An SPL mintTokenAccount
: An SPL token accountStakeAccount
: A stake accountVoteAccount
: A vote accountYou can choose how to handle querying of specific account types. For example,
you might only want specifically any account that matches MintAccount
.
1const maybeMintAddresses = [ 2 'J7iup799j5BVjKXACZycYef7WQ4x1wfzhUsc5v357yWQ', 3 'JAbWqZ7S2c6jomQr8ofAYBo257bE1QJtHwbX1yWc2osZ', 4 '2AQ4CSNu6zNUZsUq4aLNUSjyrLv4qFFXQuKs5RTHbg2Y', 5 'EVW3CoyogapBfQxBFFEKGMM1bn3JyoFiqkAJdw3FHX1b', 6]; 7 8const mintAccounts = []; 9 10const source = ` 11 query myQuery($address: String!) { 12 account(address: $address) { 13 ... on MintAccount { 14 data { 15 decimals 16 isInitialized 17 mintAuthority 18 supply 19 } 20 } 21 } 22 } 23`; 24 25for (const address of maybeMintAddresses) { 26 const result = await rpcGraphQL.query(source, { address }); 27 if (result != null) { 28 const { 29 data: { 30 account: { 31 data: mintInfo, 32 }, 33 }, 34 } = result; 35 mintAccounts.push(mintInfo); 36 } 37}
Maybe you want to handle both mints and token accounts.
1const mintOrTokenAccountAddresses = [ 2 'J7iup799j5BVjKXACZycYef7WQ4x1wfzhUsc5v357yWQ', 3 'JAbWqZ7S2c6jomQr8ofAYBo257bE1QJtHwbX1yWc2osZ', 4 '2AQ4CSNu6zNUZsUq4aLNUSjyrLv4qFFXQuKs5RTHbg2Y', 5 'EVW3CoyogapBfQxBFFEKGMM1bn3JyoFiqkAJdw3FHX1b', 6]; 7 8const mintAccounts = []; 9const tokenAccounts = []; 10 11const source = ` 12 query myQuery($address: String!) { 13 account(address: $address) { 14 ... on MintAccount { 15 data { 16 decimals 17 isInitialized 18 supply 19 } 20 meta { 21 type 22 } 23 } 24 ... on TokenAccount { 25 data { 26 isNative 27 mint 28 state 29 } 30 meta { 31 type 32 } 33 } 34 } 35 } 36`; 37 38for (const address of mintOrTokenAccountAddresses) { 39 const result = await rpcGraphQL.query(source, { address }); 40 if (result != null) { 41 const { 42 data: { 43 account: { 44 data: accountParsedInfo, 45 meta: { 46 type: accountType, 47 } 48 } 49 } 50 } = result; 51 if (accountType === 'mint') { 52 mintAccounts.push(accountParsedInfo) 53 } else { 54 tokenAccounts.push(accountParsedInfo) 55 } 56 } 57}
Querying accounts by their encoded data (base58
, base64
, base64+zstd
) is
still fully supported.
1const source = ` 2 query myQuery($address: String!, $encoding: AccountEncoding) { 3 account(address: $address, encoding: $encoding) { 4 ... on AccountBase64 { 5 data 6 } 7 } 8 } 9`; 10 11const variableValues = { 12 address: 'CcYNb7WqpjaMrNr7B1mapaNfWctZRH7LyAjWRLBGt1Fk', 13 encoding: 'base64', 14}; 15 16const result = await rpcGraphQL.query(source, variableValues);
data: {
account: {
data: 'dGVzdCBkYXRh',
},
}
Notice the owner
field of the Account
interface is also an Account
interface. This powers nested queries against the owner
field of an account.
1const source = ` 2 query myQuery($address: String!) { 3 account(address: $address) { 4 address 5 owner { 6 address 7 executable 8 lamports 9 } 10 } 11 } 12`; 13 14const variableValues = { 15 address: 'AyGCwnwxQMCqaU4ixReHt8h5W4dwmxU7eM3BEQBdWVca', 16}; 17 18const result = await rpcGraphQL.query(source, variableValues);
data: {
account: {
address: 'AyGCwnwxQMCqaU4ixReHt8h5W4dwmxU7eM3BEQBdWVca',
owner: {
address: 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA',
executable: true,
lamports: 10290815n,
},
},
}
As you can see, simply defining a nested query with RPC-GraphQL will augment the multiple RPC calls and parsing code required to gather the necessary information!
You can nest queries as far as you want!
1const source = ` 2 query myQuery($address: String!) { 3 account(address: $address) { 4 address 5 owner { 6 address 7 owner { 8 address 9 owner { 10 address 11 } 12 } 13 } 14 } 15 } 16`; 17 18const variableValues = { 19 address: 'AyGCwnwxQMCqaU4ixReHt8h5W4dwmxU7eM3BEQBdWVca', 20}; 21 22const result = await rpcGraphQL.query(source, variableValues);
data: {
account: {
address: 'AyGCwnwxQMCqaU4ixReHt8h5W4dwmxU7eM3BEQBdWVca',
owner: {
address: 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA',
owner: {
address: 'BPFLoader2111111111111111111111111111111111',
owner: {
address: 'NativeLoader1111111111111111111111111111111',
},
},
},
},
}
Nested queries can also be applied to specific account types.
1const source = ` 2 query myQuery($address: String!) { 3 account(address: $address) { 4 ... on MintAccount { 5 address 6 data { 7 mintAuthority { 8 address 9 lamports 10 } 11 } 12 } 13 } 14 } 15`; 16 17const variableValues = { 18 address: 'AyGCwnwxQMCqaU4ixReHt8h5W4dwmxU7eM3BEQBdWVca', 19}; 20 21const result = await rpcGraphQL.query(source, variableValues);
data: {
account: {
address: 'AyGCwnwxQMCqaU4ixReHt8h5W4dwmxU7eM3BEQBdWVca',
data: {
mintAuthority: {
address: 'DpfJkNonoVB3sor9H9ceajhex4XHVPrDAGAq2ahdG4JZ',
lamports: 10290815n,
}
},
},
}
A very common way to query Solana accounts from an RPC is to request all of the accounts owned by a particular program.
With RPC-GraphQL, querying program-owned accounts is a list-based extension of
the account query defined previously. This means program accounts queries will
return a list of objects implementing the Account
interface.
Setting up the query is very similar to the account
query.
1const source = ` 2 query myQuery($programAddress: String!) { 3 programAccounts(programAddress: $address) { 4 executable 5 lamports 6 rentEpoch 7 } 8 } 9`; 10 11const variableValues = { 12 programAddress: 'AmtpVzo6H6qQCP9dH9wfu5hfa8kKaAFpTJ4aamPYR6V6', 13}; 14 15const result = await rpcGraphQL.query(source, variableValues);
data: {
programAccounts: [
{
executable: false,
lamports: 10290815n,
rentEpoch: 0n,
},
{
executable: false,
lamports: 10290815n,
rentEpoch: 0n,
}
]
}
Although specific parsed account types are directly tied to the program which owns them, it's still possible to handle various specific account types within the same program accounts response.
1const source = ` 2 query myQuery($programAddress: String!) { 3 programAccounts(programAddress: $address) { 4 ... on MintAccount { 5 data { 6 decimals 7 isInitialized 8 mintAuthority 9 supply 10 } 11 meta { 12 type 13 } 14 } 15 ... on TokenAccount { 16 data { 17 isNative 18 mint 19 owner 20 state 21 } 22 meta { 23 type 24 } 25 } 26 } 27 } 28`; 29 30const variableValues = { 31 programAddress: 'AmtpVzo6H6qQCP9dH9wfu5hfa8kKaAFpTJ4aamPYR6V6', 32}; 33 34const result = await rpcGraphQL.query(source, variableValues); 35 36const { mints, tokenAccounts } = result.data.programAccounts.reduce( 37 (acc: { mints: any[]; tokenAccounts: any[] }, account) => { 38 const { 39 data: accountParsedInfo, 40 meta: { 41 type: accountType, 42 } 43 } = account; 44 if (accountType === "mint") { 45 acc.mints.push(accountParsedInfo); 46 } else { 47 acc.tokenAccounts.push(accountParsedInfo); 48 } 49 return acc; 50 }, 51 { mints: [], tokenAccounts: [] } 52);
Account data encoding in base58
, base64
, and base64+zstd
is also
supported, as well as dataSlice
and filter
!
1const source = ` 2 query myQuery( 3 $programAddress: String!, 4 $commitment: Commitment, 5 $dataSlice: DataSlice, 6 $encoding: AccountEncoding, 7 ) { 8 programAccounts( 9 programAddress: $programAddress, 10 commitment: $commitment, 11 dataSlice: $dataSlice, 12 encoding: $encoding, 13 ) { 14 ... on AccountBase64 { 15 data 16 } 17 } 18 } 19`; 20 21const variableValues = { 22 programAddress: 'DXngmJfjurhnAwbMPgpUGPH6qNvetCKRJ6PiD4ag4PTj', 23 commitment: 'confirmed', 24 dataSlice: { 25 length: 5, 26 offset: 0, 27 }, 28 encoding: 'base64', 29}; 30 31const result = await rpcGraphQL.query(source, variableValues);
data: {
programAccounts: [
{
data: 'dGVzdCA=',
},
],
}
Querying program accounts and applying nested queries to the objects within the response list is an area where RPC-GraphQL really shines.
Consider an example where we want to get the sum of every lamports balance of every owner of the owner of each token account, while discarding any mint accounts.
1const source = ` 2 query getLamportsOfOwnersOfOwnersOfTokenAccounts { 3 programAccounts(programAddress: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA") { 4 ... on TokenAccount { 5 data { 6 owner { 7 owner { 8 lamports 9 } 10 } 11 } 12 } 13 } 14 } 15`; 16 17const result = await rpcGraphQL.query(source); 18 19const sumOfAllLamportsOfOwnersOfOwnersOfTokenAccounts = result.data 20 .map(o => o.account.data.owner.owner.lamports) 21 .reduce((acc, lamports) => acc + lamports, 0);
The Transaction
interface contains common fields across all transactions.
src/schema/transaction/types.ts: TransactionInterface
1interface Transaction { 2 blockTime: String 3 encoding: String 4 meta: TransactionMeta 5 slot: BigInt 6}
Similar to account types, any transaction can be queried by these fields without specifying the specific transaction type or the transaction meta type.
1const source = ` 2 query myQuery($signature: String!, $commitment: Commitment) { 3 transaction(signature: $signature, commitment: $commitment) { 4 blockTime 5 meta { 6 computeUnitsConsumed 7 logMessages 8 } 9 slot 10 } 11 } 12`; 13 14const variableValues = { 15 signature: '63zkpxATgAwXRGFQZPDESTw2m4uZQ99sX338ibgKtTcgG6v34E3MSS3zckCwJHrimS71cvei6h1Bn1K1De53BNWC', 16 commitment: 'confirmed', 17}; 18 19const result = await rpcGraphQL.query(source, variableValues);
data: {
transaction: {
blockTime: 230860412n,
meta: {
computeUnitsConsumed: 120000n,
logMessages: [
"Program 8tfDNiaEyrV6Q1U4DEXrEigs9DoDtkugzFbybENEbCDz invoke [1]",
"Program 8tfDNiaEyrV6Q1U4DEXrEigs9DoDtkugzFbybENEbCDz consumed 2164 of 452155 compute units",
"Program 8tfDNiaEyrV6Q1U4DEXrEigs9DoDtkugzFbybENEbCDz success",
"Program ComputeBudget111111111111111111111111111111 invoke [1]",
"Program ComputeBudget111111111111111111111111111111 success"
]
},
slot: 230860693n,
},
}
Each jsonParsed
instruction type has its own GraphQL type that can be used in
a GraphQL transaction query.
Instructions for the following programs are supported.
Note at this time Token 2022 extensions are not yet supported.
Similar to accounts, transactions with encoded data are also supported.
TransactionBase58
: A Solana transaction with base58 encoded dataTransactionBase64
: A Solana transaction with base64 encoded dataTransactionJson
: A Solana transaction with JSON dataSpecific instruction types can be used in the transaction's instructions. The
default instruction if it cannot be parsed using jsonParsed
is the JSON
version dubbed GenericInstruction
.
1const source = ` 2 query myQuery($signature: String!, $commitment: Commitment) { 3 transaction(signature: $signature, commitment: $commitment) { 4 ... on TransactionParsed { 5 data { 6 message { 7 accountKeys { 8 pubkey 9 signer 10 source 11 writable 12 } 13 instructions { 14 ... on GenericInstruction { 15 accounts 16 data 17 programId 18 } 19 } 20 } 21 } 22 } 23 } 24 } 25`; 26 27const variableValues = { 28 signature: '63zkpxATgAwXRGFQZPDESTw2m4uZQ99sX338ibgKtTcgG6v34E3MSS3zckCwJHrimS71cvei6h1Bn1K1De53BNWC', 29 commitment: 'confirmed', 30}; 31 32const result = await rpcGraphQL.query(source, variableValues);
data: {
transaction: {
data: {
message: {
accountKeys: [
{
pubkey: '81EBmTWaMkFqW6LPNPfU2478nJkrhCLuiFUPSdvQKQj7',
signer: false,
source: 'transaction',
writable: true,
},
{
pubkey: 'G6TmQyEoxbUzdyncwxVN9GgfALpYErHSkXZeqJj7fwFz',
signer: true,
source: 'transaction',
writable: true,
},
],
instructions: [
{
accounts: [
'81EBmTWaMkFqW6LPNPfU2478nJkrhCLuiFUPSdvQKQj7',
'G6TmQyEoxbUzdyncwxVN9GgfALpYErHSkXZeqJj7fwFz'
]
data: 'WzIsIDU0LCA5LCAgNzYsIDM1LCA2NCwgOCwgOCwgNCwgMywgMiwgNV0=',
programId: 'EksBYH1iSR8farQc9X26pYrXotj1D2JjXGuj8uM8xMcb',
}
]
},
},
},
}
However, whenever JSON-parseable instructions are present in the list of instructions, they can be queried using specific instruction types.
1const source = ` 2 query myQuery($signature: String!, $commitment: Commitment) { 3 transaction(signature: $signature, commitment: $commitment) { 4 ... on TransactionParsed { 5 data { 6 message { 7 instructions { 8 ... on CreateAccountInstruction { 9 data { 10 lamports 11 space 12 } 13 meta { 14 program 15 } 16 } 17 } 18 } 19 } 20 } 21 } 22 } 23`; 24 25const variableValues = { 26 signature: '63zkpxATgAwXRGFQZPDESTw2m4uZQ99sX338ibgKtTcgG6v34E3MSS3zckCwJHrimS71cvei6h1Bn1K1De53BNWC', 27 commitment: 'confirmed', 28}; 29 30const result = await rpcGraphQL.query(source, variableValues);
data: {
transaction: {
data: {
message: {
instructions: [
{
data: {
lamports: 890880n,
space: 0n,
},
meta: {
program: 'system',
},
}
]
},
},
},
}
Querying transactions by their encoded data (base58
, base64
, json
) is
still fully supported.
1const source = ` 2 query myQuery( 3 $signature: String!, 4 $commitment: Commitment, 5 $encoding: TransactionEncoding!, 6 ) { 7 transaction( 8 signature: $signature, 9 commitment: $commitment, 10 encoding: $encoding, 11 ) { 12 ... on TransactionBase64 { 13 data 14 } 15 } 16 } 17`; 18 19const variableValues = { 20 signature: '63zkpxATgAwXRGFQZPDESTw2m4uZQ99sX338ibgKtTcgG6v34E3MSS3zckCwJHrimS71cvei6h1Bn1K1De53BNWC', 21 commitment: 'confirmed', 22 encoding: 'base64', 23}; 24 25const result = await rpcGraphQL.query(source, variableValues);
data: {
transaction: {
data: 'WzIsIDU0LCA5LCAgNzYsIDM1LCA2NCwgOCwgOCwgNCwgMywgMiwgNV0=',
},
}
Since transactions have a relatively large number of data points, they are particularly useful for nested queries!
Similar to nested querying accounts, it's possible to nest queries inside your transaction queries to look up other objects, such as accounts, as they appear in the transaction response.
1const source = ` 2 query myQuery($signature: String!, $commitment: Commitment) { 3 transaction(signature: $signature, commitment: $commitment) { 4 ... on TransactionParsed { 5 data { 6 message { 7 instructions { 8 ... on SplTokenTransferInstruction { 9 data { 10 amount 11 authority { 12 address 13 lamports 14 } 15 destination { 16 ... on TokenAccount { 17 data { 18 address 19 mint { 20 ... on MintAccount { 21 data { 22 address 23 decimals 24 } 25 } 26 } 27 owner { 28 address 29 lamports 30 } 31 } 32 } 33 } 34 source { 35 ... on TokenAccount { 36 data { 37 address 38 mint { 39 ... on MintAccount { 40 data { 41 address 42 decimals 43 } 44 } 45 } 46 owner { 47 address 48 lamports 49 } 50 } 51 } 52 } 53 } 54 meta { 55 program 56 } 57 } 58 } 59 } 60 } 61 } 62 } 63 } 64`; 65 66const variableValues = { 67 signature: '63zkpxATgAwXRGFQZPDESTw2m4uZQ99sX338ibgKtTcgG6v34E3MSS3zckCwJHrimS71cvei6h1Bn1K1De53BNWC', 68 commitment: 'confirmed', 69}; 70 71const result = await rpcGraphQL.query(source, variableValues);
data: {
transaction: {
data: {
message: {
instructions: [
{
data: {
amount: '50',
authority: {
address: 'AHPPMhzDQix9sKULBqeaQ5BUZgrKdz8tg6DzPxsofB12',
lamports: 890880n,
},
destination: {
data: {
address: '2W8mUY75zxqwAcpirn75r3Cc7TStMirFyHwKqo13fmB1',
mint: data: {
address: '8poKMotB2cEYVv5sbjrdyssASZj1vwYCe7GJFeXo2QP7',
decimals: 6,
},
owner: {
address: '7tRxJ2znbTFpwW9XaMMiDsXDudoPEUXRcpDpm8qjWgAZ',
lamports: 890880n,
},
}
},
source: {
data: {
parsed: {
info: {
address: 'BqFCPqXUm4cq6jaZZx1TDTvUR1wdEuNNwAHBEVR6mJhM',
mint: data: {
address: '8poKMotB2cEYVv5sbjrdyssASZj1vwYCe7GJFeXo2QP7',
decimals: 6,
},
owner: {
address: '3dPmVLMD7PC5faZNyJUH9WFrUxAsbjydJfoozwmR1wDG',
lamports: e890880n,
},
}
}
}
},
},
meta: {
program: 'spl-token',
}
}
]
},
},
},
}
Querying blocks is very similar to querying transactions, since a block contains a list of transactions. There's a bit more data at the highest level for a block, but you can query the list of transactions using a block query and transaction types in the same fashion you can query the lsit of accounts using a program accounts query and account types.
1const source = ` 2 query myQuery($slot: BigInt!, $commitment: Commitment) { 3 block(slot: $slot, commitment: $commitment) { 4 blockHeight 5 blockhash 6 parentSlot 7 rewards { 8 commission 9 lamports 10 rewardType 11 } 12 transactions { 13 ... on TransactionParsed { 14 data { 15 message { 16 instructions { 17 ... on CreateAccountInstruction { 18 data { 19 lamports 20 space 21 } 22 meta { 23 program 24 } 25 } 26 } 27 } 28 } 29 } 30 } 31 } 32 } 33`; 34 35const variableValues = { 36 slot: 43596n, 37 commitment: 'confirmed', 38}; 39 40const result = await rpcGraphQL.query(source, variableValues);
data: {
block: {
blockHeight: 196758578n,
blockhash: 'BqFCPqXUm4cq6jaZZx1TDTvUR1wdEuNNwAHBEVR6mJhM',
parentSlot: 230862408n,
rewards: [
{
commission: 0.05,
lamports: 58578n,
rewardType: 'staking',
},
{
commission: 0.05,
lamports: 58578n,
rewardType: 'staking',
}
],
transactions: [
data: {
{
message: {
instructions: [
{
data: {
lamports: 890880n,
space: 0n,
},
meta: {
program: 'system',
},
}
]
},
}
}
],
},
}
No vulnerabilities found.
Reason
security policy file detected
Details
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
binaries present in source code
Details
Reason
SAST tool is not run on all commits -- score normalized to 8
Details
Reason
Found 3/11 approved changesets -- score normalized to 2
Reason
3 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 2
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
18 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More