Skip to main content
Package: com.coinbase.cdp.resources.solanaaccounts

Constructor Details

SolanaAccountsClient

Parameters: clientOptions - ClientOptions

Method Details

withRawResponse

Get responses with HTTP metadata like headers Returns: WithRawResponseSolanaAccountsClient

listSolanaAccounts

Overload 1
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. Returns: ListSolanaAccountsResponse Overload 2
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. Parameters: request - ListSolanaAccountsRequest Returns: ListSolanaAccountsResponse Overload 3
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. Parameters: requestOptions - RequestOptions Returns: ListSolanaAccountsResponse Overload 4
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. Parameters: request - ListSolanaAccountsRequest requestOptions - RequestOptions Returns: ListSolanaAccountsResponse

createSolanaAccount

Overload 1
Creates a new Solana account. Returns: SolanaAccount Overload 2
Creates a new Solana account. Parameters: request - CreateSolanaAccountRequest Returns: SolanaAccount Overload 3
Creates a new Solana account. Parameters: requestOptions - RequestOptions Returns: SolanaAccount Overload 4
Creates a new Solana account. Parameters: request - CreateSolanaAccountRequest requestOptions - RequestOptions Returns: SolanaAccount

getSolanaAccount

Overload 1
Gets a Solana account by its address. Parameters: address - String Returns: SolanaAccount Overload 2
Gets a Solana account by its address. Parameters: address - String request - GetSolanaAccountRequest Returns: SolanaAccount Overload 3
Gets a Solana account by its address. Parameters: address - String requestOptions - RequestOptions Returns: SolanaAccount Overload 4
Gets a Solana account by its address. Parameters: address - String request - GetSolanaAccountRequest requestOptions - RequestOptions Returns: SolanaAccount

updateSolanaAccount

Overload 1
Updates an existing Solana account. Use this to update the account’s name or account-level policy. Parameters: address - String Returns: SolanaAccount Overload 2
Updates an existing Solana account. Use this to update the account’s name or account-level policy. Parameters: address - String requestOptions - RequestOptions Returns: SolanaAccount Overload 3
Updates an existing Solana account. Use this to update the account’s name or account-level policy. Parameters: address - String request - UpdateSolanaAccountRequest Returns: SolanaAccount Overload 4
Updates an existing Solana account. Use this to update the account’s name or account-level policy. Parameters: address - String request - UpdateSolanaAccountRequest requestOptions - RequestOptions Returns: SolanaAccount

getSolanaAccountByName

Overload 1
Gets a Solana account by its name. Parameters: name - String Returns: SolanaAccount Overload 2
Gets a Solana account by its name. Parameters: name - String request - GetSolanaAccountByNameRequest Returns: SolanaAccount Overload 3
Gets a Solana account by its name. Parameters: name - String requestOptions - RequestOptions Returns: SolanaAccount Overload 4
Gets a Solana account by its name. Parameters: name - String request - GetSolanaAccountByNameRequest requestOptions - RequestOptions Returns: SolanaAccount

importSolanaAccount

Overload 1
Import an existing Solana account into the developer’s CDP Project. This API should be called from the CDP SDK to ensure that the associated private key is properly encrypted. Parameters: request - ImportSolanaAccountRequest Returns: SolanaAccount Overload 2
Import an existing Solana account into the developer’s CDP Project. This API should be called from the CDP SDK to ensure that the associated private key is properly encrypted. Parameters: request - ImportSolanaAccountRequest requestOptions - RequestOptions Returns: SolanaAccount

exportSolanaAccount

Overload 1
Export an existing Solana account’s private key. It is important to store the private key in a secure place after it’s exported. Parameters: address - String request - ExportSolanaAccountRequest Returns: ExportSolanaAccountResponse Overload 2
Export an existing Solana account’s private key. It is important to store the private key in a secure place after it’s exported. Parameters: address - String request - ExportSolanaAccountRequest requestOptions - RequestOptions Returns: ExportSolanaAccountResponse

exportSolanaAccountByName

Overload 1
Export an existing Solana account’s private key by its name. It is important to store the private key in a secure place after it’s exported. Parameters: name - String request - ExportSolanaAccountByNameRequest Returns: ExportSolanaAccountByNameResponse Overload 2
Export an existing Solana account’s private key by its name. It is important to store the private key in a secure place after it’s exported. Parameters: name - String request - ExportSolanaAccountByNameRequest requestOptions - RequestOptions Returns: ExportSolanaAccountByNameResponse

signSolanaTransaction

Overload 1
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. Parameters: address - String request - SignSolanaTransactionRequest Returns: SignSolanaTransactionResponse Overload 2
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. Parameters: address - String request - SignSolanaTransactionRequest requestOptions - RequestOptions Returns: SignSolanaTransactionResponse

signSolanaMessage

Overload 1
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. Parameters: address - String request - SignSolanaMessageRequest Returns: SignSolanaMessageResponse Overload 2
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. Parameters: address - String request - SignSolanaMessageRequest requestOptions - RequestOptions Returns: SignSolanaMessageResponse

sendSolanaTransaction

Overload 1
Signs and sends a single Solana transaction using multiple Solana accounts. The transaction may contain several instructions, each of which may require signatures from different account keys. The transaction should be serialized into a byte array and base64 encoded. The API handles recent blockhash management and fee estimation, leaving the developer to provide only the minimal set of fields necessary to send the transaction. Transaction types The following transaction types are supported: Legacy transactions Versioned transactions Instruction Batching To batch multiple operations, include multiple instructions within a single transaction. All instructions within a transaction are executed atomically - if any instruction fails, the entire transaction fails and is rolled back. Network Support The following Solana networks are supported: solana - Solana Mainnet solana-devnet - Solana Devnet The developer is responsible for ensuring that the unsigned transaction is valid, as the API will not validate the transaction. Parameters: request - SendSolanaTransactionRequest Returns: SendSolanaTransactionResponse Overload 2
Signs and sends a single Solana transaction using multiple Solana accounts. The transaction may contain several instructions, each of which may require signatures from different account keys. The transaction should be serialized into a byte array and base64 encoded. The API handles recent blockhash management and fee estimation, leaving the developer to provide only the minimal set of fields necessary to send the transaction. Transaction types The following transaction types are supported: Legacy transactions Versioned transactions Instruction Batching To batch multiple operations, include multiple instructions within a single transaction. All instructions within a transaction are executed atomically - if any instruction fails, the entire transaction fails and is rolled back. Network Support The following Solana networks are supported: solana - Solana Mainnet solana-devnet - Solana Devnet The developer is responsible for ensuring that the unsigned transaction is valid, as the API will not validate the transaction. Parameters: request - SendSolanaTransactionRequest requestOptions - RequestOptions Returns: SendSolanaTransactionResponse