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

# Solana preview SDK reference

> Every symbol exported by the published @gol/sdk package, generated from its type declarations.

> [!NOTE]
>
> This page is generated from the `@gol/sdk` type declarations by
> `pnpm solana:reference`. It reads the published preview package's Solana declarations. Do not edit it directly.
> Devnet Preview 1 only. See [availability and qualification limits](https://docs.gol.network/examples/solana/index.md). This is not the stable SDK reference.

| Item | Value |
| - | - |
| Package | [`@gol/sdk@0.9.0-solana-preview.1`](https://www.npmjs.com/package/@gol/sdk/v/0.9.0-solana-preview.1) |
| Entry points | `.`, `./server`, `./wallet`, `./agent`, `./solana`, `./solana/server` |
| Node.js | `>=22` |
| Runtime dependency | `viem` |

## How to read this page

Signatures are the published declarations. Install both optional peers explicitly: `@solana/kit@8.4.0` and `@solana/codecs-core@8.4.0`. `Address` and `Instruction` are Kit types. The `golDelegate` and `golMandate` namespaces contain generated program codecs and instruction clients. Validate program ownership, PDA, discriminator, size, version and identities before decoding untrusted accounts. `readDevnetOwner` performs those checks for setup state.

* **Classes** list the constructor options and every method a caller can use, including inherited methods.
* **Functions** are module-level helpers.
* **Values** are exported constants.
* **Types** are interfaces and aliases. Ones generated from the platform contract are listed with the API operation that defines their shape.

## `@gol/sdk/solana`

Browser-safe devnet identities, codecs, canonical transaction verification, independent owner reads, and direct owner safety instructions. This entry point accepts no API credentials.

### Classes

| Class | Options | Methods |
| - | - | - |
| [`SolanaClient`](#solanaclient) | none | 14 |

#### SolanaClient

```ts theme={null}
new SolanaClient(request: SolanaRequest, projectId: string)
```

| Method | Signature | Returns |
| - | - | - |
| `configuration` | `configuration(): Promise<SolanaConfiguration>` | |
| `confirmMandate` | `confirmMandate(draftId: string, signatures: string[]): Promise<{ draft: DraftView; mandate?: MandateView; }>` | |
| `confirmOwnerAction` | `confirmOwnerAction(id: string, draftId: string, signatures: string[]): Promise<{ draft: DraftView; }>` | |
| `createWebhookEndpoint` | `createWebhookEndpoint(input: CreateSolanaWebhookEndpointInput): Promise<CreateSolanaWebhookEndpointResponse>` | Explicit test-only subscription; keep its returned secret on the server. |
| `execution` | `execution(id: string): Promise<ExecutionView>` | |
| `executions` | `executions(mandateId?: string): Promise<{ executions: ExecutionView[]; }>` | |
| `mandate` | `mandate(id: string): Promise<MandateView>` | |
| `mandates` | `mandates(): Promise<{ mandates: MandateSummary[]; }>` | |
| `owner` | `owner(owner: string): Promise<OwnerSnapshot>` | |
| `prepareExecution` | `prepareExecution(actionId: string, input: PrepareExecutionInput): Promise<ExecutionView>` | |
| `prepareMandate` | `prepareMandate(input: PrepareMandateInput): Promise<PreparedMandate>` | |
| `prepareOwnerAction` | `prepareOwnerAction(id: string, action: OwnerAction): Promise<PreparedOwnerAction>` | |
| `refusals` | `refusals(id: string): Promise<{ refusals: Refusal[]; }>` | |
| `submitExecution` | `submitExecution(actionId: string, agentSignature: string): Promise<ExecutionView>` | |

### Functions

| Function | Signature | Returns |
| - | - | - |
| `buildMessage` | `buildMessage(feePayer: Address, blockhash: string, instructions: Instruction[]): Uint8Array` | Builds bytes only. Wallets retain keys and decide whether to sign. |
| `encodeGasPolicy` | `encodeGasPolicy(g: GasPolicy): Uint8Array` | |
| `encodePolicy` | `encodePolicy(spec: PolicySpec): Uint8Array` | Policy wire version 2: rules in ascending tag order. |
| `encodeTerms` | `encodeTerms(t: Terms): Uint8Array` | |
| `gasCharge` | `gasCharge(v: GasChargeInput): { signatureLamports: bigint; priorityLamports: bigint; charge: bigint; }` | Gas formula version 1 (encoding section 10.7), for quotes and reconciliation. |
| `hexBytes` | `hexBytes(value: string, length: number): Uint8Array` | |
| `ownerSafetyInstruction` | `ownerSafetyInstruction(action: OwnerAction, c: OwnerActionContext): Promise<import("@solana/kit").Instruction<string, readonly (import("@solana/kit").AccountMeta<string> \| import("@solana/kit").AccountLookupMeta<string, string>)[]>>` | Build safety instructions without contacting GOL. |
| `readDevnetOwner` | `readDevnetOwner(ownerAddress: string, options?: { rpcUrl?: string; fetch?: typeof fetch; }): Promise<OwnerSnapshot>` | Read-only, finalized devnet state for independent setup verification. No keys are accepted and no transaction is created or sent. |
| `setupContext` | `setupContext(projectId: string, configuration: SolanaConfiguration, input: PrepareMandateInput, owner: OwnerSnapshot, now: number): SetupContext` | Carry forward only remaining, active headroom in the current epoch. |
| `transferPolicy` | `transferPolicy(input: PrepareMandateInput): Uint8Array` | |
| `unsignedTransaction` | `unsignedTransaction(message: Uint8Array): Uint8Array` | Serialized unsigned transaction for Wallet Standard signTransaction. |
| `verifyConfiguration` | `verifyConfiguration(c: SolanaConfiguration): void` | |
| `verifyMessage` | `verifyMessage(base64: string, feePayer: Address, instructions: Instruction[]): Uint8Array` | Decode every instruction and compare the complete account privilege union. The API currently prepares legacy messages. Lookups, v1, extra accounts, extra signers, unused accounts, trailing bytes and privilege escalation fail. |
| `verifyPreparedExecution` | `verifyPreparedExecution(e: ExecutionView, input: PrepareExecutionInput, c: ExecutionContext): Promise<Uint8Array<ArrayBufferLike>>` | |
| `verifyPreparedMandate` | `verifyPreparedMandate(prepared: PreparedMandate, input: PrepareMandateInput, c: SetupContext): Promise<Uint8Array[]>` | Recompute canonical encodings and IDs, then inspect both exact messages. The caller supplies the intent and trusted chain/approval context separately from the API response. No API-supplied bytes alone authorize a signature. |
| `verifyPreparedOwnerAction` | `verifyPreparedOwnerAction(p: PreparedOwnerAction, action: OwnerAction, c: OwnerActionContext): Promise<Uint8Array<ArrayBufferLike>>` | |

### Values

| Name | Value | Notes |
| - | - | - |
| `ACCOUNT_FAMILIES` | `{ readonly keypair: 1; readonly squads_smart_account_single_signer: 2; readonly swig: 3; }` | |
| `addressBytes` | `(value: string) => Uint8Array` | |
| `ASSOCIATED_TOKEN_PROGRAM` | `Address<"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL">` | |
| `associatedTokenAddress` | `(owner: Address, mint?: Address, tokenProgram?: Address) => Promise<Address<string>>` | |
| `BPF_LOADER_UPGRADEABLE` | `Address<"BPFLoaderUpgradeab1e11111111111111111111111">` | |
| `canonicalAddress` | `(value: string) => Address<string>` | |
| `COMPUTE_BUDGET_PROGRAM` | `Address<"ComputeBudget111111111111111111111111111111">` | |
| `DELEGATE_EVENT_AUTHORITY` | `Address<"E49Pho3PGWiFdeLMNKHPpaoLdEdqV5jaACqGdmvi7rqi">` | |
| `delegatePda` | `(owner: Address, mint: Address) => Promise<Address<string>>` | |
| `DEVNET_USDC` | `Address<"4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU">` | |
| `discriminator` | `(program: string, kind: "account" \| "event", name: string) => Uint8Array<ArrayBuffer>` | |
| `ENGINE_VERSION` | `1` | |
| `epochPda` | `(owner: Address) => Promise<Address<string>>` | |
| `GAS_POLICY_LENGTH` | `163` | |
| `gasPolicyId` | `(id: Uint8Array, gasPolicy: Uint8Array) => Uint8Array` | |
| `gasPolicyPda` | `(id: Uint8Array) => Promise<Address<string>>` | |
| `GOL_DELEGATE` | `Address<"GoLDRw6JPXjgzEjbQZJzKQntrM12S99cAASppQiLc9gN">` | |
| `GOL_MANDATE` | `Address<"GoLMV1bcz3ELTt4SLiL5yYid6zkVd5BnivqHbd9aDBeB">` | |
| `golDelegate` | `namespace` | |
| `golMandate` | `namespace` | |
| `grantPda` | `(owner: Address, mint: Address, engine?: Address) => Promise<Address<string>>` | |
| `instructions` | `namespace` | |
| `INSTRUCTIONS_SYSVAR` | `Address<"Sysvar1nstructions1111111111111111111111111">` | |
| `keccak` | `(...parts: Uint8Array[]) => Uint8Array` | |
| `MANDATE_CONFIG` | `Address<"CQKLfVS4byLe7VoZE479suHNJ7VxCXR5oNh7sf2crcb8">` | |
| `MANDATE_ENGINE_AUTHORITY` | `Address<"7KCoXukRNhHBi8ESsdyzqyDb9GMkJtH1gghh1byrQCHe">` | |
| `MANDATE_EVENT_AUTHORITY` | `Address<"9znsPyb6wuV3cWsiFhDGjsoNfXFPsfqD76A9TkSPEzt7">` | |
| `MANDATE_PROGRAM_DATA` | `Address<"4RqcnHzeuZfUKcbrRU9UWFmsjU1s3tHrm8sKgMysU2CL">` | |
| `mandateId` | `(terms: Uint8Array) => Uint8Array` | |
| `mandatePda` | `(id: Uint8Array) => Promise<Address<string>>` | |
| `messageBase64` | `(bytes: Uint8Array) => string` | |
| `messageBytes` | `(base64: string) => Uint8Array<ArrayBuffer>` | |
| `ownerStatePda` | `(owner: Address) => Promise<Address<string>>` | |
| `POLICY_VERSION` | `2` | |
| `profileId` | `(family: keyof typeof ACCOUNT_FAMILIES, authorityProgram?: Address) => Uint8Array` | |
| `RULE_TAGS` | `Record<Rule["rule"], number>` | |
| `SOLANA_DEVNET_GENESIS` | `"EtWTRABZaYq6iMfeYKouRu166VU2xqa1wcaWoxPkrZBG"` | |
| `SOLANA_DEVNET_NETWORK` | `string` | |
| `SOLANA_WEBHOOK_EVENT_TYPES` | `readonly ["solana_mandate.created", "solana_mandate.state_changed", "solana_mandate.closed", "solana_owner.invalidated", "solana_execution.executed", "solana_execution.refused", "solana_execution.settled"]` | |
| `SYSTEM_PROGRAM` | `Address<"11111111111111111111111111111111">` | |
| `TERMS_LENGTH` | `324` | |
| `toHex` | `` (bytes: Uint8Array) => `0x${string}` `` | |
| `TOKEN_2022_PROGRAM` | `Address<"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb">` | |
| `TOKEN_PROGRAM` | `Address<"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA">` | |
| `USDC_DECIMALS` | `6` | |

### Types

#### Caps

```ts theme={null}
interface Caps {
  default: bigint | null;
  rows: [mint: string, cap: bigint][];
}
```

#### CreateSolanaWebhookEndpointInput

```ts theme={null}
interface CreateSolanaWebhookEndpointInput {
  url: string;
  description?: string;
  eventTypes: [SolanaWebhookEventType, ...SolanaWebhookEventType[]];
}
```

#### CreateSolanaWebhookEndpointResponse

```ts theme={null}
interface CreateSolanaWebhookEndpointResponse {
  endpoint: Omit<WebhookEndpoint, "environment" | "eventTypes"> & {
    environment: "test";
    eventTypes: SolanaWebhookEventType[];
  };
  /** Shown once. Keep this on the server and use @gol/sdk/server verifyWebhook. */
  secret: string;
}
```

#### DraftView

```ts theme={null}
interface DraftView {
  id: string;
  kind: "mandate" | "owner_action";
  state: "prepared" | "observing" | "confirmed" | "failed" | "expired";
  mandateId: string | null;
  transactions: {
    message: string;
    signature: string | null;
    state: string;
    error: string | null;
    slot: number | null;
    feeLamports: string | null;
  }[];
}
```

#### ExecutionContext

```ts theme={null}
interface ExecutionContext {
  owner: Address;
  agent: Address;
  actionId: string;
  sequence: bigint;
  configuration: SolanaConfiguration;
  gas: {
    declaredRate: bigint;
    declaredPriorityLamports: bigint;
    maxCharge: bigint;
  } | null;
}
```

#### ExecutionView

```ts theme={null}
interface ExecutionView {
  executionId: string;
  actionId: string;
  mandateId: string;
  sequence: string;
  recipient: string;
  amountBaseUnits: string;
  deadline: number;
  state: string;
  attempt: number;
  message: string | null;
  feePayer: string;
  gas: {
    declaredRate: string;
    declaredPriorityLamports: string;
    maxCharge: string;
  } | null;
  signature: string | null;
  outcome: "executed" | "refused" | "reverted" | null;
  refusalCode: number | null;
  refusal: string | null;
  slot: number | null;
  feeLamports: string | null;
  settlement: {
    amount: string;
    paid: boolean;
    outcome: number;
    signatureLamports: string;
    priorityLamports: string;
    declaredRate: string;
  } | null;
  reconciliation: {
    networkCostLamports: string;
    countedLamports: string;
    countedExactly: boolean;
    networkCostBaseUnits: string;
    chargedBaseUnits: string;
    refundBaseUnits: string;
    shortfallBaseUnits: string;
  } | null;
  error: string | null;
  createdAt: string;
  updatedAt: string;
}
```

#### GasChargeInput

```ts theme={null}
interface GasChargeInput {
  signers: bigint;
  precompileSignatures: bigint;
  cuLimit: bigint;
  cuPrice: bigint;
  declaredPriorityLamports: bigint;
  declaredRate: bigint;
  maxCharge: bigint;
  maxPerAction: bigint;
  maxTotal: bigint;
  spent: bigint;
}
```

#### GasPolicy

```ts theme={null}
interface GasPolicy {
  feeMint: Address;
  submitter: Address;
  recipient: Address;
  attester: Address | null;
  maxPerAction: bigint;
  maxTotal: bigint;
  maxRate: bigint;
  expiresAt: bigint;
  chargeableOutcomes: number;
  formulaVersion: number;
}
```

#### Hex32

```ts theme={null}
type Hex32 = `0x${string}`;
```

#### MandateSummary

```ts theme={null}
interface MandateSummary {
  mandateId: string;
  owner: string;
  agent: string;
  createdSignature: string;
  createdAt: string;
}
```

#### MandateView

```ts theme={null}
interface MandateView {
  mandateId: string;
  address: string;
  network: string;
  owner: string;
  agent: string;
  recipients: string[];
  createdSignature: string;
  onChain: boolean;
  state: "active" | "paused" | "revoked" | "expired" | "closed";
  expiresAt: number | null;
  eventSeq: string | null;
  replayFloor: string | null;
  headroom: {
    tag: number;
    rule: string;
    remaining: string | null;
    [key: string]: unknown;
  }[];
  gasPolicy: {
    id: string;
    revoked: boolean;
    submitter: string;
    recipient: string;
    maxPerActionBaseUnits: string;
    maxTotalBaseUnits: string;
    spentBaseUnits: string;
    maxRate: string;
    expiresAt: number;
  } | null;
}
```

#### OwnerAction

```ts theme={null}
type OwnerAction = "pause" | "resume" | "revoke" | "invalidate" | "revoke_gas_policy" | "close" | "revoke_grant" | "bump_epoch" | "spl_revoke";
```

#### OwnerActionContext

```ts theme={null}
interface OwnerActionContext {
  owner: Address;
  mandateId: Hex32;
  rentPayer: Address;
  hasGas: boolean;
}
```

#### OwnerSnapshot

```ts theme={null}
interface OwnerSnapshot {
  owner: string;
  authorityEpoch: string;
  engineEpoch: string;
  usdc: {
    account: string;
    exists: boolean;
    balanceBaseUnits: string;
    delegate: string | null;
    delegatedBaseUnits: string;
    golDelegate: string;
    delegateIsGol: boolean;
    frozen: boolean;
  };
  grant: {
    address: string;
    status: string;
    epoch: string;
    capBaseUnits: string;
    spentBaseUnits: string;
    expiresAt: number;
  } | null;
}
```

#### PolicySpec

```ts theme={null}
interface PolicySpec {
  mode: "bounded";
  rules: Rule[];
}
```

#### PreparedMandate

```ts theme={null}
interface PreparedMandate {
  draftId: string;
  review: SetupReview;
  transactions: {
    purpose: "connect" | "create";
    message: string;
  }[];
}
```

#### PreparedOwnerAction

```ts theme={null}
interface PreparedOwnerAction {
  draftId: string;
  action: OwnerAction;
  message: string;
  review: {
    action: OwnerAction;
    mandateId: string;
    owner: string;
    program: string;
  };
}
```

#### PrepareExecutionInput

```ts theme={null}
interface PrepareExecutionInput {
  mandateId: string;
  recipient: string;
  amountBaseUnits: string;
  deadline: number;
}
```

#### PrepareMandateInput

```ts theme={null}
interface PrepareMandateInput {
  owner: string;
  agent: string;
  recipients: string[];
  maxPerActionBaseUnits: string;
  totalBaseUnits: string;
  maxActions?: number;
  rollingWindow?: {
    seconds: number;
    capBaseUnits: string;
  };
  validFrom?: number;
  expiresAt: number;
  gas: boolean;
}
```

#### Refusal

```ts theme={null}
interface Refusal {
  id: string;
  mandateId: string;
  signature: string;
  slot: number;
  sequence: string;
  actionId: string;
  refusalCode: number;
  refusal: string;
  ruleTag: number;
  attemptedValue: string;
  remainingHeadroom: string;
  observedAt: string;
}
```

#### Rule

```ts theme={null}
type Rule = {
  rule: "action_allowlist";
  actions: number[];
} | {
  rule: "asset_allowlist";
  addresses: string[];
} | {
  rule: "asset_blocklist";
  addresses: string[];
} | {
  rule: "recipient_allowlist";
  addresses: string[];
} | {
  rule: "recipient_blocklist";
  addresses: string[];
} | {
  rule: "max_amount_per_action";
  caps: Caps;
} | {
  rule: "lifetime_total";
  caps: Caps;
} | {
  rule: "rolling_window";
  windowSeconds: number;
  buckets: number;
  caps: Caps;
} | {
  rule: "action_count_ceiling";
  max: bigint | number;
} | {
  rule: "action_rate";
  windowSeconds: number;
  maxActions: number;
} | {
  rule: "periodic_allowance";
  periodSeconds: number;
  anchor: bigint | number;
  carry?: number;
  caps: Caps;
};
```

#### SetupContext

```ts theme={null}
interface SetupContext {
  projectId: string;
  configuration: SolanaConfiguration;
  authorityEpoch: bigint;
  engineEpoch: bigint;
  now: number;
  approval: {
    approveBaseUnits: bigint;
    grantCapBaseUnits: bigint;
    grantExpiresAt: number;
  };
}
```

#### SetupReview

```ts theme={null}
interface SetupReview {
  network: string;
  owner: string;
  agent: string;
  mint: string;
  recipients: string[];
  maxPerActionBaseUnits: string;
  totalBaseUnits: string;
  maxActions: number | null;
  rollingWindow: {
    seconds: number;
    capBaseUnits: string;
  } | null;
  validFrom: number;
  expiresAt: number;
  approvalExpiresAt: number;
  mandateId: Hex32;
  mandateAddress: string;
  terms: `0x${string}`;
  policy: `0x${string}`;
  gasPolicy: `0x${string}` | null;
  gasPolicyId: Hex32 | null;
  approval: {
    delegate: string;
    approveBaseUnits: string;
    grantCapBaseUnits: string;
    grantExpiresAt: number;
    addedBaseUnits: string;
  };
  rentPayer: string;
}
```

#### SolanaConfiguration

```ts theme={null}
interface SolanaConfiguration {
  environment: "test";
  network: string;
  programs: {
    authority: string;
    engine: string;
  };
  engineVersion: number;
  policyVersion: number;
  asset: {
    mint: string;
    symbol: "USDC";
    decimals: number;
  };
  relayer: {
    submitter: string;
    feeRecipient: string;
  };
  lookupTable: null;
  gas: {
    formulaVersion: number;
    declaredRate: string;
    maxRate: string;
    maxPerActionBaseUnits: string;
    maxTotalBaseUnits: string;
    chargeableOutcomes: string[];
  };
  limits: {
    maxRecipients: number;
    approvalWindowSeconds: number;
  };
}
```

#### SolanaRequest

```ts theme={null}
type SolanaRequest = <T>(method: "GET" | "POST", path: string, body?: unknown, idempotencyKey?: string) => Promise<T>;
```

#### SolanaWebhookEventType

```ts theme={null}
type SolanaWebhookEventType = (typeof SOLANA_WEBHOOK_EVENT_TYPES)[number];
```

#### Terms

```ts theme={null}
interface Terms {
  parentId: Uint8Array;
  owner: Address;
  agent: Address;
  agentKeyType: number;
  accountProfileId: Uint8Array;
  authorityProgram: Address;
  authorityEpoch: bigint;
  installEpoch: bigint;
  projectId: Uint8Array;
  mode: number;
  policyVersion: number;
  policyHash: Uint8Array;
  validFrom: bigint;
  expiresAt: bigint;
  maxDepth: number;
  maxActiveDescendants: number;
  approvalExpiresAt: bigint;
  salt: Uint8Array;
  rentPayer: Address;
}
```

## `@gol/sdk/solana/server`

Server-only createSolanaApiClient transport. Keep the test API key on your application server.

### Functions

| Function | Signature | Returns |
| - | - | - |
| `createSolanaApiClient` | `createSolanaApiClient(options: { baseUrl: string; projectId: string; apiKey: string; fetch?: typeof fetch; }): SolanaClient` | |

## `@gol/sdk/solana: instructions`

Instruction builders exported through the instructions namespace. These build bytes; they do not sign or broadcast.

### Functions

| Function | Signature | Returns |
| - | - | - |
| `approveDelegate` | `approveDelegate(owner: Address, mint: Address, tokenProgram: Address, amount: bigint, decimals: number): Promise<Instruction<string, readonly (import("@solana/kit").AccountMeta<string> \| import("@solana/kit").AccountLookupMeta<string, string>)[]>>` | |
| `bumpEpoch` | `bumpEpoch(owner: Address, payer?: Address): Promise<Instruction<string, readonly (import("@solana/kit").AccountMeta<string> \| import("@solana/kit").AccountLookupMeta<string, string>)[]>>` | |
| `closeGrant` | `closeGrant(owner: Address, mint: Address, rentPayer: Address, engine?: Address<"GoLMV1bcz3ELTt4SLiL5yYid6zkVd5BnivqHbd9aDBeB">): Promise<Instruction<string, readonly (import("@solana/kit").AccountMeta<string> \| import("@solana/kit").AccountLookupMeta<string, string>)[]>>` | |
| `closeMandate` | `closeMandate(owner: Address, id: Uint8Array, rentPayer: Address, hasGas: boolean): Promise<Instruction<string, readonly (import("@solana/kit").AccountMeta<string> \| import("@solana/kit").AccountLookupMeta<string, string>)[]>>` | |
| `createAssociatedTokenAccount` | `createAssociatedTokenAccount(payer: Address, owner: Address, mint?: Address<"4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU">, tokenProgram?: Address<"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA">): Promise<Instruction<string, readonly (import("@solana/kit").AccountMeta<string> \| import("@solana/kit").AccountLookupMeta<string, string>)[]>>` | |
| `createMandate` | `createMandate(owner: Address, rentPayer: Address, terms: Uint8Array, policy: Uint8Array, gasPolicy: Uint8Array \| null): Promise<Instruction<string, readonly (import("@solana/kit").AccountMeta<string> \| import("@solana/kit").AccountLookupMeta<string, string>)[]>>` | |
| `execute` | `execute(e: ExecuteInput): Promise<Instruction<string, readonly (import("@solana/kit").AccountMeta<string> \| import("@solana/kit").AccountLookupMeta<string, string>)[]>>` | |
| `grant` | `grant(owner: Address, payer: Address, mint: Address, cap: bigint, expiresAt: bigint, engine?: Address<"GoLMV1bcz3ELTt4SLiL5yYid6zkVd5BnivqHbd9aDBeB">): Promise<Instruction<string, readonly (import("@solana/kit").AccountMeta<string> \| import("@solana/kit").AccountLookupMeta<string, string>)[]>>` | |
| `invalidate` | `invalidate(owner: Address, payer?: Address): Promise<Instruction<string, readonly (import("@solana/kit").AccountMeta<string> \| import("@solana/kit").AccountLookupMeta<string, string>)[]>>` | |
| `revokeDelegate` | `revokeDelegate(owner: Address, mint?: Address<"4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU">, tokenProgram?: Address<"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA">): Promise<Instruction<string, readonly (import("@solana/kit").AccountMeta<string> \| import("@solana/kit").AccountLookupMeta<string, string>)[]>>` | |
| `revokeGasPolicy` | `revokeGasPolicy(owner: Address, id: Uint8Array): Promise<Instruction<string, readonly (import("@solana/kit").AccountMeta<string> \| import("@solana/kit").AccountLookupMeta<string, string>)[]>>` | |
| `revokeGrant` | `revokeGrant(owner: Address, mint: Address, engine?: Address<"GoLMV1bcz3ELTt4SLiL5yYid6zkVd5BnivqHbd9aDBeB">): Promise<Instruction<string, readonly (import("@solana/kit").AccountMeta<string> \| import("@solana/kit").AccountLookupMeta<string, string>)[]>>` | |
| `setMandateState` | `setMandateState(owner: Address, id: Uint8Array, action: keyof typeof MANDATE_STATE_ACTIONS): Promise<Instruction<string, readonly (import("@solana/kit").AccountMeta<string> \| import("@solana/kit").AccountLookupMeta<string, string>)[]>>` | |

### Values

| Name | Value | Notes |
| - | - | - |
| `MANDATE_STATE_ACTIONS` | `{ readonly pause: 1; readonly resume: 2; readonly revoke: 3; }` | |
| `setComputeUnitLimit` | `(units: number) => Instruction<string, readonly (import("@solana/kit").AccountMeta<string> \| import("@solana/kit").AccountLookupMeta<string, string>)[]>` | |
| `setComputeUnitPrice` | `(microLamports: bigint) => Instruction<string, readonly (import("@solana/kit").AccountMeta<string> \| import("@solana/kit").AccountLookupMeta<string, string>)[]>` | |

### Types

#### ExecuteGas

```ts theme={null}
interface ExecuteGas {
  declaredRate: bigint;
  declaredPriorityLamports: bigint;
  maxCharge: bigint;
  feeDestination: Address;
}
```

#### ExecuteInput

```ts theme={null}
interface ExecuteInput {
  submitter: Address;
  agent: Address;
  owner: Address;
  mandateId: Uint8Array;
  mint: Address;
  tokenProgram: Address;
  destination: Address;
  sequence: bigint;
  actionId: Uint8Array;
  deadline: bigint;
  amount: bigint;
  actionTag?: number;
  schemaVersion?: number;
  gas?: ExecuteGas;
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.