Represents the RpcClient used for interacting with the Solana RPC.

Hierarchy

Constructors

  • Parameters

    • Optional _connection: Connection

    Returns RpcClient

Properties

_honeycomb: Honeycomb

Accessors

  • get connection(): Connection
  • Gets the connection object used by the RpcClient.

    Returns Connection

    The connection object.

  • get feePayer(): Signer
  • Gets the fee payer's Signer.

    Returns Signer

    The fee payer's signer.

Methods

  • Checks if an account exists for the specified public key.

    Parameters

    • publicKey: PublicKey

      The public key to check.

    • Optional commitment: Commitment

      The desired commitment level.

    Returns Promise<boolean>

    True if the account exists, otherwise false.

  • Requests an airdrop of lamports to the specified public key.

    Parameters

    • to: PublicKey

      The recipient's public key.

    • lamports: number

      The amount of lamports to airdrop.

    Returns Promise<string>

    The transaction signature.

  • Confirms an array of processed contexts as transactions on the Solana network.

    Parameters

    • ctxs: ProcessedContext[]

      An array of processed contexts.

    • Optional commitment: Commitment

      The desired commitment level for the confirmation.

    • Optional doNotThrowOnError: boolean

      If true, it won't throw an error on confirmation failure.

    Returns Promise<ConfirmedContext[]>

    An array of confirmed contexts.

  • Retrieves the account information for the specified public key.

    Parameters

    • publicKey: PublicKey

      The public key for the account.

    • Optional commitment: Commitment

      The desired commitment level.

    Returns Promise<AccountInfo<Buffer>>

    The account information.

  • Retrieves the account balance for the specified public key.

    Parameters

    • publicKey: PublicKey

      The public key to check the balance for.

    • Optional commitment: Commitment

      The desired commitment level.

    Returns Promise<number>

    The account balance.

  • Retrieves the latest blockhash with its block height.

    Parameters

    • Optional commitmentOrConfig: Commitment | GetLatestBlockhashConfig

      Commitment level or configuration.

    Returns Promise<BlockhashWithBlockHeight>

    The blockhash with its block height.

  • Retrieves the account information for multiple public keys.

    Parameters

    • publicKeys: PublicKey[]

      An array of public keys to retrieve account information for.

    • Optional commitment: Commitment

      The desired commitment level.

    Returns Promise<AccountInfo<Buffer>[]>

    An array of account information for the specified public keys.

  • Retrieves program accounts for the specified program ID.

    Parameters

    • programId: PublicKey

      The program ID to query for accounts.

    • Optional configOrCommitment: Commitment | GetProgramAccountsConfig

      Configuration or commitment level.

    Returns Promise<{
        account: AccountInfo<Buffer>;
        pubkey: PublicKey;
    }[]>

    An array of program accounts.

  • Retrieves the minimum balance required to rent an account with the specified data size.

    Parameters

    • bytes: number

      The size of the account data in bytes.

    • Optional commitment: Commitment

      The desired commitment level.

    Returns Promise<number>

    The minimum balance required for rent exemption.

  • Get the Honeycomb client instance associated with the module.

    Returns Honeycomb

    The Honeycomb client instance.

  • Installs the RpcClient into the Honeycomb instance.

    Parameters

    • honeycomb: Honeycomb

      The Honeycomb instance to install the RpcClient into.

    Returns Honeycomb

    The Honeycomb instance with the RpcClient installed.

  • Prepares an array of operation contexts for transaction serialization and signing.

    Parameters

    Returns Promise<PreparedContext[]>

    An array of prepared contexts.

  • Sends a transaction context and confirms it on the Solana network.

    Parameters

    • ctx: OperationContext

      The operation context to send and confirm.

    • Optional confirmOptions: ConfirmOptions

      Options for confirming the transaction.

    Returns Promise<ConfirmedContext>

    The confirmed context.

  • Sends an array of transaction contexts in batches and confirms them on the Solana network.

    Parameters

    • items: OperationContext[]

      An array of operation contexts.

    • Optional options: ConfirmOptions & {
          batchSize?: number;
          doNotStopOnError?: boolean;
          firstBatchSize?: number;
      }

      Options for confirming the transactions in batches.

    Returns Promise<ConfirmedContext[]>

    An array of confirmed contexts.

  • Sends an array of prepared contexts as transactions to the Solana RPC.

    Parameters

    • ctxs: OperationContext[]

      An array of prepared contexts.

    • Optional sendOptions: SendOptions

      Options for sending the transactions.

    Returns Promise<ProcessedContext[]>

    An array of processed contexts.

  • Transfers lamports to the specified destination address.

    Parameters

    • destination: PublicKey

      The recipient's public key.

    • lamports: number

      The amount of lamports to transfer.

    Returns Promise<ConfirmedContext>

    The confirmed context of the transaction.

Generated using TypeDoc