> ## 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.

# AccountActions

```ts theme={null}
type AccountActions = {
  requestFaucet: (options: Omit<RequestFaucetOptions, "address">) => Promise<SignatureResult>;
  sendTransaction: (options: Omit<SendTransactionOptions, "address">) => Promise<SendTransactionResult>;
  signMessage: (options: Omit<SignMessageOptions, "address">) => Promise<SignatureResult>;
  signTransaction: (options: Omit<SignTransactionOptions, "address">) => Promise<SignTransactionResult>;
  transfer: (options: Omit<TransferOptions, "from">) => Promise<SignatureResult>;
};
```

Defined in: [actions/solana/types.ts:17](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/actions/solana/types.ts#L17)

## Properties

### requestFaucet()

```ts theme={null}
requestFaucet: (options: Omit<RequestFaucetOptions, "address">) => Promise<SignatureResult>;
```

Defined in: [actions/solana/types.ts:38](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/actions/solana/types.ts#L38)

Requests funds from a Solana faucet.

#### Parameters

##### options

`Omit`\<[`RequestFaucetOptions`](/sdks/cdp-sdks-v2/typescript/solana/Types/index#requestfaucetoptions), `"address"`>

Parameters for requesting funds from the Solana faucet.

#### Returns

`Promise`\<[`SignatureResult`](/sdks/cdp-sdks-v2/typescript/solana/Types/index#signatureresult)>

A promise that resolves to the transaction hash.

#### Example

```ts theme={null}
// Create a Solana account
const account = await cdp.solana.createAccount();

// Request funds from the Solana faucet
const result = await account.requestFaucet({
  token: "sol",
});
```

***

### sendTransaction()

```ts theme={null}
sendTransaction: (options: Omit<SendTransactionOptions, "address">) => Promise<SendTransactionResult>;
```

Defined in: [actions/solana/types.ts:183](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/actions/solana/types.ts#L183)

Sends a transaction.

#### Parameters

##### options

`Omit`\<[`SendTransactionOptions`](/sdks/cdp-sdks-v2/typescript/solana/Types/index#sendtransactionoptions), `"address"`>

Parameters for sending the transaction.

#### Returns

`Promise`\<`SendTransactionResult`>

A promise that resolves to the transaction signature.

#### Example

```ts theme={null}
// Create a Solana account
const account = await cdp.solana.createAccount();

// Build your transaction using @solana/kit
import {
  address as solanaAddress,
  appendTransactionMessageInstructions,
  compileTransaction,
  createNoopSigner,
  createSolanaRpc,
  createTransactionMessage,
  getBase64EncodedWireTransaction,
  pipe,
  setTransactionMessageFeePayer,
  setTransactionMessageLifetimeUsingBlockhash,
} from "@solana/kit";
import { getTransferSolInstruction } from "@solana-program/system";

const rpc = createSolanaRpc("https://api.devnet.solana.com");
const { value: { blockhash, lastValidBlockHeight } } = await rpc.getLatestBlockhash().send();

const txMsg = pipe(
  createTransactionMessage({ version: 0 }),
  (tx) => setTransactionMessageFeePayer(solanaAddress(account.address), tx),
  (tx) => setTransactionMessageLifetimeUsingBlockhash(
    { blockhash, lastValidBlockHeight },
    tx,
  ),
  (tx) => appendTransactionMessageInstructions([
    getTransferSolInstruction({
      source: createNoopSigner(solanaAddress(account.address)),
      destination: solanaAddress("3KzDtddx4i53FBkvCzuDmRbaMozTZoJBb1TToWhz3JfE"),
      amount: 10000n,
    }),
  ], tx),
);

// Base64 encode the compiled transaction
const transaction = getBase64EncodedWireTransaction(compileTransaction(txMsg));

// Send the transaction via the CDP API
const { transactionSignature } = await account.sendTransaction({
  transaction,
});
```

***

### signMessage()

```ts theme={null}
signMessage: (options: Omit<SignMessageOptions, "address">) => Promise<SignatureResult>;
```

Defined in: [actions/solana/types.ts:61](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/actions/solana/types.ts#L61)

Signs a message.

#### Parameters

##### options

`Omit`\<[`SignMessageOptions`](/sdks/cdp-sdks-v2/typescript/solana/Types/index#signmessageoptions), `"address"`>

Parameters for signing the message.

#### Returns

`Promise`\<[`SignatureResult`](/sdks/cdp-sdks-v2/typescript/solana/Types/index#signatureresult)>

A promise that resolves to the signature.

#### Example

```ts theme={null}
// Create a Solana account
const account = await cdp.solana.createAccount();

// Sign a message
const { signature } = await account.signMessage({
  message: "Hello, world!",
});
```

***

### signTransaction()

```ts theme={null}
signTransaction: (options: Omit<SignTransactionOptions, "address">) => Promise<SignTransactionResult>;
```

Defined in: [actions/solana/types.ts:121](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/actions/solana/types.ts#L121)

Signs a transaction.

#### Parameters

##### options

`Omit`\<[`SignTransactionOptions`](/sdks/cdp-sdks-v2/typescript/solana/Types/index#signtransactionoptions), `"address"`>

Parameters for signing the transaction.

#### Returns

`Promise`\<`SignTransactionResult`>

A promise that resolves to the signature.

#### Example

```ts theme={null}
// Create a Solana account
const account = await cdp.solana.createAccount();

// Build your transaction using @solana/kit
import {
  address as solanaAddress,
  appendTransactionMessageInstructions,
  compileTransaction,
  createNoopSigner,
  createSolanaRpc,
  createTransactionMessage,
  getBase64EncodedWireTransaction,
  pipe,
  setTransactionMessageFeePayer,
  setTransactionMessageLifetimeUsingBlockhash,
} from "@solana/kit";
import { getTransferSolInstruction } from "@solana-program/system";

const rpc = createSolanaRpc("https://api.devnet.solana.com");
const { value: { blockhash, lastValidBlockHeight } } = await rpc.getLatestBlockhash().send();

const txMsg = pipe(
  createTransactionMessage({ version: 0 }),
  (tx) => setTransactionMessageFeePayer(solanaAddress(account.address), tx),
  (tx) => setTransactionMessageLifetimeUsingBlockhash(
    { blockhash, lastValidBlockHeight },
    tx,
  ),
  (tx) => appendTransactionMessageInstructions([
    getTransferSolInstruction({
      source: createNoopSigner(solanaAddress(account.address)),
      destination: solanaAddress("3KzDtddx4i53FBkvCzuDmRbaMozTZoJBb1TToWhz3JfE"),
      amount: 10000n,
    }),
  ], tx),
);

// Base64 encode the compiled transaction
const transaction = getBase64EncodedWireTransaction(compileTransaction(txMsg));

// Sign the transaction via the CDP API
const { signedTransaction } = await account.signTransaction({
  transaction,
});
```

***

### transfer()

```ts theme={null}
transfer: (options: Omit<TransferOptions, "from">) => Promise<SignatureResult>;
```

Defined in: [actions/solana/types.ts:210](https://github.com/coinbase/cdp-sdk/blob/59b6f4f714b6e359fb2390fa1df724c8c5419568/typescript/packages/cdp-sdk/src/actions/solana/types.ts#L210)

Transfers SOL or SPL tokens between accounts

#### Parameters

##### options

`Omit`\<`TransferOptions`, `"from"`>

Parameters for the transfer.

#### Returns

`Promise`\<[`SignatureResult`](/sdks/cdp-sdks-v2/typescript/solana/Types/index#signatureresult)>

A promise that resolves to the transaction signature, which can be used to wait for the transaction result.

#### Example

```ts theme={null}
const account = await cdp.solana.getAccount({ name: "Account" });

const { signature } = await account.transfer({
  token: "sol",
  amount: 5_000_000_000n, // 5 SOL in lamports
  to: "3KzDtddx4i53FBkvCzuDmRbaMozTZoJBb1TToWhz3JfE",
  network: "devnet",
});
```
