Variable OpenApiSolanaMethodsConst

OpenApiSolanaMethods: {
    createSolanaAccount: (
        createSolanaAccountBody?: CreateSolanaAccountBody,
        options?: string,
    ) => Promise<SolanaAccount>;
    getSolanaAccount: (
        address: string,
        options?: string,
    ) => Promise<SolanaAccount>;
    getSolanaAccountByName: (
        name: string,
        options?: string,
    ) => Promise<SolanaAccount>;
    listSolanaAccounts: (
        params?: ListSolanaAccountsParams,
        options?: string,
    ) => Promise<ListSolanaAccounts200>;
    requestSolanaFaucet: (
        requestSolanaFaucetBody: RequestSolanaFaucetBody,
        options?: string,
    ) => Promise<RequestSolanaFaucet200>;
    signSolanaMessage: (
        address: string,
        signSolanaMessageBody: SignSolanaMessageBody,
        options?: string,
    ) => Promise<SignSolanaMessage200>;
    signSolanaTransaction: (
        address: string,
        signSolanaTransactionBody: SignSolanaTransactionBody,
        options?: string,
    ) => Promise<SignSolanaTransaction200>;
} = ...

Type declaration

  • createSolanaAccount: (
        createSolanaAccountBody?: CreateSolanaAccountBody,
        options?: string,
    ) => Promise<SolanaAccount>

    Creates a new Solana account.

  • getSolanaAccount: (address: string, options?: string) => Promise<SolanaAccount>

    Gets a Solana account by its address.

  • getSolanaAccountByName: (name: string, options?: string) => Promise<SolanaAccount>

    Gets a Solana account by its name.

  • listSolanaAccounts: (
        params?: ListSolanaAccountsParams,
        options?: string,
    ) => Promise<ListSolanaAccounts200>

    Lists the Solana accounts belonging to the developer. The response is paginated, and by default, returns 20 accounts per page.

    If a name is provided, the response will contain only the account with that name.

  • requestSolanaFaucet: (
        requestSolanaFaucetBody: RequestSolanaFaucetBody,
        options?: string,
    ) => Promise<RequestSolanaFaucet200>
  • signSolanaMessage: (
        address: string,
        signSolanaMessageBody: SignSolanaMessageBody,
        options?: string,
    ) => Promise<SignSolanaMessage200>

    Signs an arbitrary message with the given Solana account.

    WARNING:* Never sign a message that you didn't generate, as it can be an arbitrary transaction. For example, it might send all of your funds to an attacker.

  • signSolanaTransaction: (
        address: string,
        signSolanaTransactionBody: SignSolanaTransactionBody,
        options?: string,
    ) => Promise<SignSolanaTransaction200>

    Signs a transaction with the given Solana account. The unsigned transaction should be serialized into a byte array and then encoded as base64.

    Transaction types*

    The following transaction types are supported: Legacy transactions Versioned transactions

    The developer is responsible for ensuring that the unsigned transaction is valid, as the API will not validate the transaction.