@cfxlabsinc/b2b-services
    Preparing search index...
    Index
    instance: (...args: []) => HeliusRpcClient = ...

    The process client; SOLANA_RPC_ENDPOINT is read at each call.

    • An account's decoded bytes, or null when no such account exists.

      The base64 decode lives here rather than at each call site, and null means absent and nothing else — see HeliusRpcClient.call.

      Parameters

      • args: { address: string; commitment?: "confirmed" | "finalized" | "processed" }

      Returns Promise<{ data: Buffer; lamports: number; owner: string } | null>

    • Parameters

      • args: {
            address: string;
            commitment?: "confirmed" | "finalized" | "processed";
            encoding?: "base58" | "base64" | "base64+zstd" | "jsonParsed";
        }

      Returns Promise<SolanaAccountInfo | null>

    • Parameters

      • args: { address: string; commitment?: "confirmed" | "finalized" | "processed" }

      Returns Promise<{ ok: true; value: number }>

    • The current block height, which a blockhash's lastValidBlockHeight is compared to.

      Parameters

      • args: { commitment?: "confirmed" | "finalized" }

      Returns Promise<{ ok: true; value: number }>

    • A block's signatures, or null when the slot holds no block.

      transactionDetails: "signatures" returns no transaction bodies, so the version ceiling should not bite here — it is raised and sent anyway because Helius is not stock Agave and the parameter costs nothing.

      Parameters

      • args: { commitment: "confirmed" | "finalized"; slot: number }

      Returns Promise<SolanaBlockWithSignatures | null>

    • Parameters

      • args: { commitment?: "confirmed" | "finalized" | "processed"; dataLength: number }

      Returns Promise<{ ok: true; value: number }>

    • As getAccountData for up to 100 addresses in one call, in the order given; null for each address with no account.

      Parameters

      • args: { addresses: string[]; commitment?: "confirmed" | "finalized" | "processed" }

      Returns Promise<({ data: Buffer; lamports: number; owner: string } | null)[]>

    • Every account owned by programId, walked one cursor page at a time.

      There is deliberately no single-shot getProgramAccounts here. V1 materialises every match before it replies, so it falls over on a large owner set — Helius refuses the call once its account-index service is loaded (-32603, "please use getProgramAccountsV2 with pagination"), and an owner as large as the upgradeable loader, which owns a loader account for every program on the cluster, is only readable through the cursor. A small owner set costs one page here, so V1 bought nothing worth the footgun of a method that works until the data grows.

      filters narrows what comes back; dataSlice narrows how much of each one does. They are separate because listing loader buffers needs every match and none of the payload — 28 of them on devnet today, ~5 MB if fetched whole — so a caller can filter on bytes it never downloads.

      The node pages over the scan, not over the results, so a page can come back empty and still carry a cursor. Only a null cursor ends the walk.

      Parameters

      • args: {
            commitment?: "confirmed" | "finalized" | "processed";
            dataSlice?: { length: number; offset: number };
            filters?: (
                { dataSize: number }
                | { memcmp: { bytes: string; offset: number } }
            )[];
            programId: string;
        }
        • Optionalcommitment?: "confirmed" | "finalized" | "processed"
        • OptionaldataSlice?: { length: number; offset: number }

          Bytes of each account's data to return. length: 0 returns none.

        • Optionalfilters?: ({ dataSize: number } | { memcmp: { bytes: string; offset: number } })[]
        • programId: string

      Returns Promise<{ ok: true; value: ProgramAccount[] }>

    • Signatures for address, newest first.

      The RPC only ever walks backwards: before picks the page's starting point and until is the older signature it stops at. There is no key that means "newer than X" — an unknown config key is silently ignored by the node, so a misnamed watermark reads as no watermark and returns the full history.

      Parameters

      • args: {
            address: string;
            before?: string;
            commitment: "confirmed" | "finalized";
            limit?: number;
            until?: string;
        }
        • address: string
        • Optionalbefore?: string

          Page backwards starting from this signature (exclusive).

        • commitment: "confirmed" | "finalized"
        • Optionallimit?: number
        • Optionaluntil?: string

          Stop once this already-seen signature is reached (exclusive).

      Returns Promise<
          {
              ok: true;
              value: {
                  blockTime: string;
                  confirmationStatus: "confirmed"
                  | "finalized";
                  err: string;
                  memo: string;
                  signature: string;
                  slot: number;
              }[];
          },
      >

    • An SPL token account's balance, or null when no such account exists.

      A wallet that has never held the token has no associated token account, and the node reports that as an error rather than an empty result — in two wordings, depending on whether the address holds no account at all or holds one that is not a token account. Both are routine, and both are distinct from a node that refused the request, which still throws.

      Parameters

      • args: { address: string; commitment?: "confirmed" | "finalized" | "processed" }

      Returns Promise<
          | {
              amount: string;
              decimals: number;
              uiAmount: number
              | null;
              uiAmountString: string;
          }
          | null,
      >

    • Every token account owner holds, under the SPL Token and Token-2022 programs, by address. A transfer to one appears only in its own signature list, not the owner's.

      Parameters

      • args: { commitment: "confirmed" | "finalized"; owner: string }

      Returns Promise<{ ok: true; value: string[] }>

    • Base units of each mint the owner holds, summed over its token accounts under SPL Token and Token-2022: one call per program, whatever it holds.

      Parameters

      • args: { commitment: "confirmed" | "finalized"; owner: string }

      Returns Promise<{ ok: true; value: Map }>

    • Parameters

      • args: { commitment?: "confirmed" | "finalized" | "processed"; mint: string }

      Returns Promise<
          {
              ok: true;
              value: {
                  amount: string;
                  decimals: number;
                  uiAmount: number
                  | null;
                  uiAmountString: string;
              };
          },
      >

    • A transaction, or null when the node has no record of the signature.

      Goes through HeliusRpcClient.call so an RPC-level error stays an error: the sync activity treats null as "nothing to index" and exits successfully, so folding a failure into it loses the transaction silently.

      Parameters

      • args: { commitment: "confirmed" | "finalized"; txHash: string }

      Returns Promise<SolanaTransaction | null>

    • Parameters

      • args: {
            maxRetries?: number;
            preflightCommitment?: "confirmed" | "finalized" | "processed";
            skipPreflight?: boolean;
            transaction: string;
        }
        • OptionalmaxRetries?: number
        • OptionalpreflightCommitment?: "confirmed" | "finalized" | "processed"
        • OptionalskipPreflight?: boolean
        • transaction: string

          Base64-encoded signed wire transaction

      Returns Promise<
          | { ok: true; value: string }
          | { error: HeliusTransactionError; ok: false },
      >

    • Parameters

      • args: {
            commitment?: "confirmed" | "finalized" | "processed";
            sigVerify?: boolean;
            transaction: string;
        }
        • Optionalcommitment?: "confirmed" | "finalized" | "processed"
        • OptionalsigVerify?: boolean
        • transaction: string

          Base64-encoded serialized transaction

      Returns Promise<
          {
              ok: true;
              value: {
                  accounts: object[]
                  | null;
                  err: string | object | null;
                  logs: string[] | null;
                  unitsConsumed: number | undefined;
              };
          },
      >