> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cdp.coinbase.com/llms.txt
> Use this file to discover all available pages before exploring further.

# WithRawResponseSolanaAccountsClient

> WithRawResponseSolanaAccountsClient API reference.

Package: [`com.coinbase.cdp.resources.solanaaccounts`](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/resources/solanaaccounts/index)

```java theme={null}
public class WithRawResponseSolanaAccountsClient extends Object
```

## Method Details

### `listSolanaAccounts`

**Overload 1**

```java theme={null}
public CdpClientHttpResponse<ListSolanaAccountsResponse> listSolanaAccounts()
```

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:**

[CdpClientHttpResponse](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/core/CdpClientHttpResponse)\<[ListSolanaAccountsResponse](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/resources/solanaaccounts/types/ListSolanaAccountsResponse.md)>

**Overload 2**

```java theme={null}
public CdpClientHttpResponse<ListSolanaAccountsResponse> listSolanaAccounts(ListSolanaAccountsRequest request)
```

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](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/resources/solanaaccounts/requests/ListSolanaAccountsRequest.md)

**Returns:**

[CdpClientHttpResponse](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/core/CdpClientHttpResponse)\<[ListSolanaAccountsResponse](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/resources/solanaaccounts/types/ListSolanaAccountsResponse.md)>

**Overload 3**

```java theme={null}
public CdpClientHttpResponse<ListSolanaAccountsResponse> listSolanaAccounts(RequestOptions requestOptions)
```

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](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/core/RequestOptions.md)

**Returns:**

[CdpClientHttpResponse](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/core/CdpClientHttpResponse)\<[ListSolanaAccountsResponse](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/resources/solanaaccounts/types/ListSolanaAccountsResponse.md)>

**Overload 4**

```java theme={null}
public CdpClientHttpResponse<ListSolanaAccountsResponse> listSolanaAccounts(ListSolanaAccountsRequest request, RequestOptions requestOptions)
```

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](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/resources/solanaaccounts/requests/ListSolanaAccountsRequest.md)

`requestOptions` - [RequestOptions](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/core/RequestOptions.md)

**Returns:**

[CdpClientHttpResponse](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/core/CdpClientHttpResponse)\<[ListSolanaAccountsResponse](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/resources/solanaaccounts/types/ListSolanaAccountsResponse.md)>

### `createSolanaAccount`

**Overload 1**

```java theme={null}
public CdpClientHttpResponse<SolanaAccount> createSolanaAccount()
```

Creates a new Solana account.

**Returns:**

[CdpClientHttpResponse](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/core/CdpClientHttpResponse)\<[SolanaAccount](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/types/SolanaAccount.md)>

**Overload 2**

```java theme={null}
public CdpClientHttpResponse<SolanaAccount> createSolanaAccount(CreateSolanaAccountRequest request)
```

Creates a new Solana account.

**Parameters:**

`request` - [CreateSolanaAccountRequest](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/resources/solanaaccounts/requests/CreateSolanaAccountRequest.md)

**Returns:**

[CdpClientHttpResponse](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/core/CdpClientHttpResponse)\<[SolanaAccount](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/types/SolanaAccount.md)>

**Overload 3**

```java theme={null}
public CdpClientHttpResponse<SolanaAccount> createSolanaAccount(RequestOptions requestOptions)
```

Creates a new Solana account.

**Parameters:**

`requestOptions` - [RequestOptions](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/core/RequestOptions.md)

**Returns:**

[CdpClientHttpResponse](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/core/CdpClientHttpResponse)\<[SolanaAccount](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/types/SolanaAccount.md)>

**Overload 4**

```java theme={null}
public CdpClientHttpResponse<SolanaAccount> createSolanaAccount(CreateSolanaAccountRequest request, RequestOptions requestOptions)
```

Creates a new Solana account.

**Parameters:**

`request` - [CreateSolanaAccountRequest](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/resources/solanaaccounts/requests/CreateSolanaAccountRequest.md)

`requestOptions` - [RequestOptions](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/core/RequestOptions.md)

**Returns:**

[CdpClientHttpResponse](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/core/CdpClientHttpResponse)\<[SolanaAccount](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/types/SolanaAccount.md)>

### `getSolanaAccount`

**Overload 1**

```java theme={null}
public CdpClientHttpResponse<SolanaAccount> getSolanaAccount(String address)
```

Gets a Solana account by its address.

**Parameters:**

`address` - `String`

**Returns:**

[CdpClientHttpResponse](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/core/CdpClientHttpResponse)\<[SolanaAccount](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/types/SolanaAccount.md)>

**Overload 2**

```java theme={null}
public CdpClientHttpResponse<SolanaAccount> getSolanaAccount(String address, GetSolanaAccountRequest request)
```

Gets a Solana account by its address.

**Parameters:**

`address` - `String`

`request` - [GetSolanaAccountRequest](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/resources/solanaaccounts/requests/GetSolanaAccountRequest.md)

**Returns:**

[CdpClientHttpResponse](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/core/CdpClientHttpResponse)\<[SolanaAccount](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/types/SolanaAccount.md)>

**Overload 3**

```java theme={null}
public CdpClientHttpResponse<SolanaAccount> getSolanaAccount(String address, RequestOptions requestOptions)
```

Gets a Solana account by its address.

**Parameters:**

`address` - `String`

`requestOptions` - [RequestOptions](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/core/RequestOptions.md)

**Returns:**

[CdpClientHttpResponse](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/core/CdpClientHttpResponse)\<[SolanaAccount](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/types/SolanaAccount.md)>

**Overload 4**

```java theme={null}
public CdpClientHttpResponse<SolanaAccount> getSolanaAccount(String address, GetSolanaAccountRequest request, RequestOptions requestOptions)
```

Gets a Solana account by its address.

**Parameters:**

`address` - `String`

`request` - [GetSolanaAccountRequest](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/resources/solanaaccounts/requests/GetSolanaAccountRequest.md)

`requestOptions` - [RequestOptions](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/core/RequestOptions.md)

**Returns:**

[CdpClientHttpResponse](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/core/CdpClientHttpResponse)\<[SolanaAccount](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/types/SolanaAccount.md)>

### `updateSolanaAccount`

**Overload 1**

```java theme={null}
public CdpClientHttpResponse<SolanaAccount> updateSolanaAccount(String address)
```

Updates an existing Solana account. Use this to update the account's name or account-level policy.

**Parameters:**

`address` - `String`

**Returns:**

[CdpClientHttpResponse](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/core/CdpClientHttpResponse)\<[SolanaAccount](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/types/SolanaAccount.md)>

**Overload 2**

```java theme={null}
public CdpClientHttpResponse<SolanaAccount> updateSolanaAccount(String address, RequestOptions requestOptions)
```

Updates an existing Solana account. Use this to update the account's name or account-level policy.

**Parameters:**

`address` - `String`

`requestOptions` - [RequestOptions](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/core/RequestOptions.md)

**Returns:**

[CdpClientHttpResponse](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/core/CdpClientHttpResponse)\<[SolanaAccount](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/types/SolanaAccount.md)>

**Overload 3**

```java theme={null}
public CdpClientHttpResponse<SolanaAccount> updateSolanaAccount(String address, UpdateSolanaAccountRequest request)
```

Updates an existing Solana account. Use this to update the account's name or account-level policy.

**Parameters:**

`address` - `String`

`request` - [UpdateSolanaAccountRequest](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/resources/solanaaccounts/requests/UpdateSolanaAccountRequest.md)

**Returns:**

[CdpClientHttpResponse](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/core/CdpClientHttpResponse)\<[SolanaAccount](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/types/SolanaAccount.md)>

**Overload 4**

```java theme={null}
public CdpClientHttpResponse<SolanaAccount> updateSolanaAccount(String address, UpdateSolanaAccountRequest request, RequestOptions requestOptions)
```

Updates an existing Solana account. Use this to update the account's name or account-level policy.

**Parameters:**

`address` - `String`

`request` - [UpdateSolanaAccountRequest](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/resources/solanaaccounts/requests/UpdateSolanaAccountRequest.md)

`requestOptions` - [RequestOptions](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/core/RequestOptions.md)

**Returns:**

[CdpClientHttpResponse](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/core/CdpClientHttpResponse)\<[SolanaAccount](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/types/SolanaAccount.md)>

### `getSolanaAccountByName`

**Overload 1**

```java theme={null}
public CdpClientHttpResponse<SolanaAccount> getSolanaAccountByName(String name)
```

Gets a Solana account by its name.

**Parameters:**

`name` - `String`

**Returns:**

[CdpClientHttpResponse](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/core/CdpClientHttpResponse)\<[SolanaAccount](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/types/SolanaAccount.md)>

**Overload 2**

```java theme={null}
public CdpClientHttpResponse<SolanaAccount> getSolanaAccountByName(String name, GetSolanaAccountByNameRequest request)
```

Gets a Solana account by its name.

**Parameters:**

`name` - `String`

`request` - [GetSolanaAccountByNameRequest](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/resources/solanaaccounts/requests/GetSolanaAccountByNameRequest.md)

**Returns:**

[CdpClientHttpResponse](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/core/CdpClientHttpResponse)\<[SolanaAccount](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/types/SolanaAccount.md)>

**Overload 3**

```java theme={null}
public CdpClientHttpResponse<SolanaAccount> getSolanaAccountByName(String name, RequestOptions requestOptions)
```

Gets a Solana account by its name.

**Parameters:**

`name` - `String`

`requestOptions` - [RequestOptions](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/core/RequestOptions.md)

**Returns:**

[CdpClientHttpResponse](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/core/CdpClientHttpResponse)\<[SolanaAccount](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/types/SolanaAccount.md)>

**Overload 4**

```java theme={null}
public CdpClientHttpResponse<SolanaAccount> getSolanaAccountByName(String name, GetSolanaAccountByNameRequest request, RequestOptions requestOptions)
```

Gets a Solana account by its name.

**Parameters:**

`name` - `String`

`request` - [GetSolanaAccountByNameRequest](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/resources/solanaaccounts/requests/GetSolanaAccountByNameRequest.md)

`requestOptions` - [RequestOptions](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/core/RequestOptions.md)

**Returns:**

[CdpClientHttpResponse](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/core/CdpClientHttpResponse)\<[SolanaAccount](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/types/SolanaAccount.md)>

### `importSolanaAccount`

**Overload 1**

```java theme={null}
public CdpClientHttpResponse<SolanaAccount> importSolanaAccount(ImportSolanaAccountRequest request)
```

Import an existing Solana account into the developer's CDP Project. This API should be called from the [CDP SDK](https://github.com/coinbase/cdp-sdk) to ensure that the associated private key is properly encrypted.

**Parameters:**

`request` - [ImportSolanaAccountRequest](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/resources/solanaaccounts/requests/ImportSolanaAccountRequest.md)

**Returns:**

[CdpClientHttpResponse](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/core/CdpClientHttpResponse)\<[SolanaAccount](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/types/SolanaAccount.md)>

**Overload 2**

```java theme={null}
public CdpClientHttpResponse<SolanaAccount> importSolanaAccount(ImportSolanaAccountRequest request, RequestOptions requestOptions)
```

Import an existing Solana account into the developer's CDP Project. This API should be called from the [CDP SDK](https://github.com/coinbase/cdp-sdk) to ensure that the associated private key is properly encrypted.

**Parameters:**

`request` - [ImportSolanaAccountRequest](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/resources/solanaaccounts/requests/ImportSolanaAccountRequest.md)

`requestOptions` - [RequestOptions](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/core/RequestOptions.md)

**Returns:**

[CdpClientHttpResponse](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/core/CdpClientHttpResponse)\<[SolanaAccount](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/types/SolanaAccount.md)>

### `exportSolanaAccount`

**Overload 1**

```java theme={null}
public CdpClientHttpResponse<ExportSolanaAccountResponse> exportSolanaAccount(String address, ExportSolanaAccountRequest request)
```

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](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/resources/solanaaccounts/requests/ExportSolanaAccountRequest.md)

**Returns:**

[CdpClientHttpResponse](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/core/CdpClientHttpResponse)\<[ExportSolanaAccountResponse](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/resources/solanaaccounts/types/ExportSolanaAccountResponse.md)>

**Overload 2**

```java theme={null}
public CdpClientHttpResponse<ExportSolanaAccountResponse> exportSolanaAccount(String address, ExportSolanaAccountRequest request, RequestOptions requestOptions)
```

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](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/resources/solanaaccounts/requests/ExportSolanaAccountRequest.md)

`requestOptions` - [RequestOptions](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/core/RequestOptions.md)

**Returns:**

[CdpClientHttpResponse](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/core/CdpClientHttpResponse)\<[ExportSolanaAccountResponse](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/resources/solanaaccounts/types/ExportSolanaAccountResponse.md)>

### `exportSolanaAccountByName`

**Overload 1**

```java theme={null}
public CdpClientHttpResponse<ExportSolanaAccountByNameResponse> exportSolanaAccountByName(String name, ExportSolanaAccountByNameRequest request)
```

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](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/resources/solanaaccounts/requests/ExportSolanaAccountByNameRequest.md)

**Returns:**

[CdpClientHttpResponse](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/core/CdpClientHttpResponse)\<[ExportSolanaAccountByNameResponse](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/resources/solanaaccounts/types/ExportSolanaAccountByNameResponse.md)>

**Overload 2**

```java theme={null}
public CdpClientHttpResponse<ExportSolanaAccountByNameResponse> exportSolanaAccountByName(String name, ExportSolanaAccountByNameRequest request, RequestOptions requestOptions)
```

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](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/resources/solanaaccounts/requests/ExportSolanaAccountByNameRequest.md)

`requestOptions` - [RequestOptions](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/core/RequestOptions.md)

**Returns:**

[CdpClientHttpResponse](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/core/CdpClientHttpResponse)\<[ExportSolanaAccountByNameResponse](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/resources/solanaaccounts/types/ExportSolanaAccountByNameResponse.md)>

### `signSolanaTransaction`

**Overload 1**

```java theme={null}
public CdpClientHttpResponse<SignSolanaTransactionResponse> signSolanaTransaction(String address, SignSolanaTransactionRequest request)
```

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](https://solana-labs.github.io/solana-web3.js/classes/Transaction.html) [Versioned transactions](https://solana-labs.github.io/solana-web3.js/classes/VersionedTransaction.html)

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](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/resources/solanaaccounts/requests/SignSolanaTransactionRequest.md)

**Returns:**

[CdpClientHttpResponse](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/core/CdpClientHttpResponse)\<[SignSolanaTransactionResponse](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/resources/solanaaccounts/types/SignSolanaTransactionResponse.md)>

**Overload 2**

```java theme={null}
public CdpClientHttpResponse<SignSolanaTransactionResponse> signSolanaTransaction(String address, SignSolanaTransactionRequest request, RequestOptions requestOptions)
```

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](https://solana-labs.github.io/solana-web3.js/classes/Transaction.html) [Versioned transactions](https://solana-labs.github.io/solana-web3.js/classes/VersionedTransaction.html)

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](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/resources/solanaaccounts/requests/SignSolanaTransactionRequest.md)

`requestOptions` - [RequestOptions](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/core/RequestOptions.md)

**Returns:**

[CdpClientHttpResponse](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/core/CdpClientHttpResponse)\<[SignSolanaTransactionResponse](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/resources/solanaaccounts/types/SignSolanaTransactionResponse.md)>

### `signSolanaMessage`

**Overload 1**

```java theme={null}
public CdpClientHttpResponse<SignSolanaMessageResponse> signSolanaMessage(String address, SignSolanaMessageRequest request)
```

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](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/resources/solanaaccounts/requests/SignSolanaMessageRequest.md)

**Returns:**

[CdpClientHttpResponse](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/core/CdpClientHttpResponse)\<[SignSolanaMessageResponse](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/resources/solanaaccounts/types/SignSolanaMessageResponse.md)>

**Overload 2**

```java theme={null}
public CdpClientHttpResponse<SignSolanaMessageResponse> signSolanaMessage(String address, SignSolanaMessageRequest request, RequestOptions requestOptions)
```

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](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/resources/solanaaccounts/requests/SignSolanaMessageRequest.md)

`requestOptions` - [RequestOptions](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/core/RequestOptions.md)

**Returns:**

[CdpClientHttpResponse](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/core/CdpClientHttpResponse)\<[SignSolanaMessageResponse](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/resources/solanaaccounts/types/SignSolanaMessageResponse.md)>

### `sendSolanaTransaction`

**Overload 1**

```java theme={null}
public CdpClientHttpResponse<SendSolanaTransactionResponse> sendSolanaTransaction(SendSolanaTransactionRequest request)
```

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](https://solana.com/developers/guides/advanced/versions#current-transaction-versions) [Versioned transactions](https://solana.com/developers/guides/advanced/versions)

**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](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/resources/solanaaccounts/requests/SendSolanaTransactionRequest.md)

**Returns:**

[CdpClientHttpResponse](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/core/CdpClientHttpResponse)\<[SendSolanaTransactionResponse](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/resources/solanaaccounts/types/SendSolanaTransactionResponse.md)>

**Overload 2**

```java theme={null}
public CdpClientHttpResponse<SendSolanaTransactionResponse> sendSolanaTransaction(SendSolanaTransactionRequest request, RequestOptions requestOptions)
```

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](https://solana.com/developers/guides/advanced/versions#current-transaction-versions) [Versioned transactions](https://solana.com/developers/guides/advanced/versions)

**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](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/resources/solanaaccounts/requests/SendSolanaTransactionRequest.md)

`requestOptions` - [RequestOptions](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/core/RequestOptions.md)

**Returns:**

[CdpClientHttpResponse](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/core/CdpClientHttpResponse)\<[SendSolanaTransactionResponse](https://docs.cdp.coinbase.com/sdks/cdp-sdks-v2/java/com/coinbase/cdp/resources/solanaaccounts/types/SendSolanaTransactionResponse.md)>
