This page is generated from the
@gol/sdk type declarations by
pnpm sdk:reference. It reads the built dist/index.d.ts and
dist/server.d.ts of the sdk repository. Do not edit it directly.
This version matches current availability and the published package.| Item | Value |
|---|---|
| Package | @gol/sdk@0.9.0 |
| Entry points | ., ./server, ./wallet, ./agent, ./solana, ./solana/server |
| Node.js | >=22 |
| Runtime dependency | viem |
How to read this page
Signatures are the declarations the package exports, not a rewritten summary.Address, Hex, and PublicClient are viem types that the package does not re-export, so install viem alongside the SDK. A client parameter is narrowed to the read methods the SDK calls, which a viem PublicClient satisfies.
- 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
Browser-safe policy encoding, owner wallet payloads, owner operations, and verification. Safe to import from a web page, a mobile bundle, or a server.
Classes
| Class | Options | Methods |
|---|---|---|
ApprovalSessionClient | none | 8 |
GolApiError | none | 6 |
GolError | none | 4 |
GolTransportError | none | 0 |
GolYieldSafeQuoteError | none | 4 |
ApprovalSessionClient
Capability-only public transport. API keys are deliberately not accepted.new ApprovalSessionClient(options?: { baseUrl?: string; fetch?: typeof fetch; allowLocalhost?: boolean; })
| Method | Signature | Returns |
|---|---|---|
authorize | authorize(id: string, capability: string, signature: Hex): Promise<AuthorizedApproval | ApprovalSession> | |
authorizeOwnerAction | authorizeOwnerAction(id: string, capability: string, signature: Hex): Promise<import("./hosted-actions.js").OwnerActionSession | { operationTicket: string; observationCapability: string; transaction: { to: Hex; data: Hex; gas?: string; nonce?: string; authorizationList?: unknown[]; }; session: import("./hosted-actions.js").OwnerActionSession; }> | |
get | get(id: string, capability: string): Promise<ApprovalSession> | |
getOwnerAction | getOwnerAction(id: string, capability: string): Promise<import("./hosted-actions.js").OwnerActionSession> | |
observe | observe(id: string, capability: string, operationTicket: string, transactionHash: Hex): Promise<ApprovalSession> | |
observeOwnerAction | observeOwnerAction(id: string, capability: string, operationTicket: string, transactionHash: Hex): Promise<import("./hosted-actions.js").OwnerActionSession> | |
reject | reject(id: string, capability: string): Promise<ApprovalSession> | |
rejectOwnerAction | rejectOwnerAction(id: string, capability: string): Promise<import("./hosted-actions.js").OwnerActionSession> |
GolApiError
new GolApiError(status: number, code: string, message: string, correlationId: string | null, options?: { retryable?: boolean; retryAfterSeconds?: number | null; })
GolError.
| Method | Signature | Returns |
|---|---|---|
code | code: string | |
correlationId | correlationId: string | null | |
requestId | requestId: string | null | |
retryable | retryable: boolean | |
retryAfterSeconds | retryAfterSeconds: number | null | |
status | status: number |
GolError
new GolError(code: string, message: string, options?: { requestId?: string | null; retryable?: boolean; retryAfterSeconds?: number | null; })
Error.
| Method | Signature | Returns |
|---|---|---|
code | code: string | |
requestId | requestId: string | null | |
retryable | retryable: boolean | |
retryAfterSeconds | retryAfterSeconds: number | null |
GolTransportError
new GolTransportError(message: string, options?: ErrorOptions)
Error.
GolYieldSafeQuoteError
new GolYieldSafeQuoteError(code: GolYieldSafeQuoteErrorCode, message: string)
GolError.
| Method | Signature | Returns |
|---|---|---|
code | code: string | |
requestId | requestId: string | null | |
retryable | retryable: boolean | |
retryAfterSeconds | retryAfterSeconds: number | null |
Functions
| Function | Signature | Returns |
|---|---|---|
accountExecuteCall | accountExecuteCall(family: AccountFamily, account: Address, target: Address, data: Hex): OwnerAccountCall | Make the account call target through its own execution path. |
assertAccountImplementation | assertAccountImplementation(client: AccountReader, family: AccountFamily, account: Address, chainIdOrBlockNumber?: number | bigint, selectedBlockNumber?: bigint): Promise<void> | Read a fixed block for a consistent preflight. Call before each owner approval and agent submission. A bigint fourth argument preserves the original Base Sepolia historical-block API. A number fourth argument selects the chain explicitly, with an optional fifth block. |
assertReviewedAccountConfiguration | assertReviewedAccountConfiguration(client: PublicClient, family: AccountFamily, account: Address, core: Address, blockNumber: bigint, installed?: boolean): Promise<void> | The account’s runtime, implementation or delegation, and every compiled configuration pin of its family, at one block. It does not look at mandates or gas policies, so owner safety preparation and account status can use it too. |
buildWalletSigningPayload | buildWalletSigningPayload(input: WalletSigningInput): WalletSigningPayload | Build the exact eth_signTypedData_v4 payload whose hash the selected account’s reviewed owner path checks for a core digest. A delegated EOA (nexus7702) signs the GOL payload itself, so its hash is the digest. |
collectHostedOwnerSignature | collectHostedOwnerSignature(configuration: HostedOwnerConfiguration, expectedHash: Hex, signatures: Hex[], incoming: Hex): Promise<{ signatures: `0x${string}`[]; signers: `0x${string}`[]; complete: boolean; packed: `0x${string}`; }> | |
combinedApprovalStructHash | combinedApprovalStructHash(mandateId: Hex, gasPolicyId: Hex): Hex | |
computeUserOpHash | computeUserOpHash(value: unknown): Hex | Pure ERC-4337 v0.7 derivation. Review and account binding are separate required checks. |
contractProjectId | contractProjectId(projectUuid: string): Hex | Version 1: canonical UUID bytes followed by 16 zero bytes. |
coreDomain | coreDomain(chainId: number, core: Address): { readonly name: "GOL Mandate"; readonly version: "3"; readonly chainId: number; readonly verifyingContract: `0x${string}`; } | |
coreDomainSeparator | coreDomainSeparator(chainId: number, core: Address): Hex | EIP-712 domain separator of the version 3 core. |
createCallbackOwnerSigner | createCallbackOwnerSigner(options: CallbackOwnerSignerOptions): CallbackOwnerSigner | Adapter for a browser EIP-1193 or passkey signer. It never receives an owner private key. |
createGolAccountClient | createGolAccountClient(options: GolAccountClientOptions): GolAccountClient | Fixed account routes from the mounted public controllers. No arbitrary request method/path. |
createGolAgentAuthClient | createGolAgentAuthClient(options: GolAgentsClientOptions): GolAgentAuthClient | Public proof and agent-session routes. No owner or agent bearer is sent. |
createGolAgentRequestsClient | createGolAgentRequestsClient(options: GolAgentRequestsClientOptions): GolAgentRequestsClient | Agent-only request inbox and mutations. The bearer never enters owner-only routes. |
createGolApiOwnerClient | createGolApiOwnerClient(options: GolApiOwnerClientOptions): GolApiOwnerClient | |
createGolBrowserSessionClient | createGolBrowserSessionClient(options: GolBrowserSessionOptions): GolBrowserSessionClient | Typed browser-session transport for the source POST/GET/DELETE /v1/auth/session contract. |
createGolChainsClient | createGolChainsClient(options: GolChainsClientOptions): GolChainsClient | Public read of the Base chains this deployment serves. An empty list means none. |
createGolClient | createGolClient(options: GolClientOptions): GolClient | Browser-safe public transport. Endpoint resources are generated from the reviewed OpenAPI snapshot. |
createGolDeviceLoginClient | createGolDeviceLoginClient(options: GolDeviceLoginClientOptions): GolDeviceLoginClient | Server-only device login for local tools. The poll secret authenticates only its own request, and the returned owner session token belongs in the caller’s local session store. |
createGolDevicesClient | createGolDevicesClient(options: GolDevicesClientOptions): GolDevicesClient | |
createGolFaucetClient | createGolFaucetClient(options: GolOwnerRouteOptions): GolFaucetClient | |
createGolHomeClient | createGolHomeClient(options: GolHomeClientOptions): GolHomeClient | Fixed, reviewed owner Home routes. No arbitrary path or agent-bearer escape hatch. |
createGolHostedAgentClient | createGolHostedAgentClient(options: GolAgentRequestsClientOptions): GolHostedAgentClient | |
createGolMoneyClient | createGolMoneyClient(options: GolMoneyClientOptions): GolMoneyClient | Fixed browser-safe Money routes. The Platform remains authoritative for amounts and policy. |
createGolOnrampClient | createGolOnrampClient(options: GolOwnerRouteOptions): GolOnrampClient | |
createGolOwnerAgentRequestsClient | createGolOwnerAgentRequestsClient(options: GolOwnerAgentRequestsClientOptions): GolOwnerAgentRequestsClient | Browser owner request inbox. Approval only builds an unsigned operation for owner signing. |
createGolOwnerAgentsClient | createGolOwnerAgentsClient(options: GolOwnerAgentsClientOptions): GolOwnerAgentsClient | Owner-only routes. An ags_ bearer is refused locally; the platform remains the authority. |
createGolOwnerDelegationsClient | createGolOwnerDelegationsClient(options: GolMandatesOptions): { build(input: GolGrantIntent, expectedAccount: GolExpectedGrantAccount, opt?: GolMandatesRequestOptions): Promise<GolResponse<{ permissionId: string; account: { id: string; address: string; chainId: 8453 | 84532; }; humanSummary: string; enableUserOp: components["schemas"]["GrantUnsignedUserOp"]; userOpHash: string; }>>; enable(input: GolSignedGrantEnable, expectedAccount: GolExpectedGrantAccount, build: GolGrantBuild, opt?: GolMandatesRequestOptions): Promise<GolResponse<{ userOp: components["schemas"]["OwnerUserOpReceipt"]; delegation: components["schemas"]["Delegation"] | null; }>>; list(accountId?: string, opt?: GolMandatesRequestOptions): Promise<GolResponse<{ id: string; permissionId: string; name: string; kind: "grant"; delegateeAddress: string; chain: string; chainId: 8453 | 84532; status: "active" | "frozen" | "expired" | "revoked"; policySet: { [key: string]: unknown; }; spentToDate: { [key: string]: unknown; }[]; humanSummary: string; createdAt?: string; expiresAt?: string | null; mandateId?: string; mandateVersion?: number; grantExecutor?: string; }[]>>; detail(delegationId: string, opt?: GolMandatesRequestOptions): Promise<GolResponse<{ id: string; permissionId: string; name: string; kind: "grant"; delegateeAddress: string; chain: string; chainId: 8453 | 84532; status: "active" | "frozen" | "expired" | "revoked"; policySet: { [key: string]: unknown; }; spentToDate: { [key: string]: unknown; }[]; humanSummary: string; createdAt?: string; expiresAt?: string | null; mandateId?: string; mandateVersion?: number; grantExecutor?: string; }>>; snapshots(delegationId: string, opt?: GolMandatesRequestOptions): Promise<GolResponse<Record<string, unknown>[]>>; buildFreeze(delegationId: string, expectedAccount: GolExpectedOperationAccount, opt?: GolMandatesRequestOptions): Promise<GolResponse<{ intentType: "delegation_freeze" | "delegation_unfreeze" | "delegation_revoke" | "delegated_action"; userOp: components["schemas"]["GrantUnsignedUserOp"]; userOpHash: string; humanSummary: string; riskReducing: boolean; instant: boolean; gasless: boolean; }>>; buildUnfreeze(delegationId: string, expectedAccount: GolExpectedOperationAccount, opt?: GolMandatesRequestOptions): Promise<GolResponse<{ intentType: "delegation_freeze" | "delegation_unfreeze" | "delegation_revoke" | "delegated_action"; userOp: components["schemas"]["GrantUnsignedUserOp"]; userOpHash: string; humanSummary: string; riskReducing: boolean; instant: boolean; gasless: boolean; }>>; buildRevoke(delegationId: string, expectedAccount: GolExpectedOperationAccount, opt?: GolMandatesRequestOptions): Promise<GolResponse<{ intentType: "delegation_freeze" | "delegation_unfreeze" | "delegation_revoke" | "delegated_action"; userOp: components["schemas"]["GrantUnsignedUserOp"]; userOpHash: string; humanSummary: string; riskReducing: boolean; instant: boolean; gasless: boolean; }>>; } | |
createGolOwnerDeviceLoginClient | createGolOwnerDeviceLoginClient(options: GolOwnerDeviceLoginClientOptions): GolOwnerDeviceLoginClient | Browser-safe owner consent client. An agent ags_ bearer is refused locally. |
createGolOwnerHostedAgentClient | createGolOwnerHostedAgentClient(options: GolOwnerAgentsClientOptions): GolOwnerHostedAgentClient | |
createGolOwnerMandatesClient | createGolOwnerMandatesClient(options: GolMandatesOptions): { capability(opt?: GolMandatesRequestOptions): Promise<GolResponse<GolMandateCapability>>; list(agentId: string, accountId?: string, opt?: GolMandatesRequestOptions): Promise<GolResponse<{ id: string; accountId: string; agentId: string; label: string; createdAt: string; versions: components["schemas"]["MandateVersion"][]; }[]>>; create(agentId: string, input: GolCreateMandate, opt?: GolMandatesRequestOptions): Promise<GolResponse<{ id: string; accountId: string; agentId: string; label: string; createdAt: string; versions: components["schemas"]["MandateVersion"][]; }>>; addVersion(agentId: string, mandateId: string, input: { bounds: GolMandateBounds; }, opt?: GolMandatesRequestOptions): Promise<GolResponse<{ version: number; bounds: components["schemas"]["MandateBounds"]; boundsHash: string; frozenAt: string | null; status: "draft" | "granted"; }>>; narrow(agentId: string, mandateId: string, input: { bounds: GolMandateBounds; }, opt?: GolMandatesRequestOptions): Promise<GolResponse<{ version: number; bounds: components["schemas"]["MandateBounds"]; boundsHash: string; frozenAt: string | null; status: "draft" | "granted"; }>>; editDraft(agentId: string, mandateId: string, number: number, input: { bounds: GolMandateBounds; }, opt?: GolMandatesRequestOptions): Promise<GolResponse<{ version: number; bounds: components["schemas"]["MandateBounds"]; boundsHash: string; frozenAt: string | null; status: "draft" | "granted"; }>>; confirm(_agentId: string, _mandateId: string, _version: number): Promise<never>; } | |
createGolRulesClient | createGolRulesClient(options: GolRulesClientOptions): GolRulesClient | |
createGolSignRequestsClient | createGolSignRequestsClient(options: GolSignRequestsClientOptions): GolSignRequestsClient | Owner browser signing handoff and local terminal wait routes. The Platform validates each intent. |
createGolTelegramClient | createGolTelegramClient(options: GolClientOptions): GolTelegramClient | Browser-safe public API only. The client neither signs nor persists tokens. |
createGolUserOpsClient | createGolUserOpsClient(options: GolUserOpsClientOptions): GolUserOpsClient | Owner UserOps client. Platform remains authoritative for owner operation policy. |
createGolYieldAgentsClient | createGolYieldAgentsClient(options: GolClientOptions): GolYieldAgentsClient | Browser-safe Yield Agents API. It never signs or stores an owner key. |
createGolYieldAgentsTradingClient | createGolYieldAgentsTradingClient(options: GolClientOptions): GolYieldAgentsTradingClient | |
createGolYieldClient | createGolYieldClient(options: GolClientOptions): { getScan(request?: { signal?: AbortSignal; }): Promise<GolResponse<GolYieldScan>>; getSepoliaReadiness(request?: { signal?: AbortSignal; }): Promise<GolResponse<GolYieldSepoliaReadiness>>; getSepoliaAccountPreflight(account: `0x${string}`, request?: { signal?: AbortSignal; }): Promise<GolResponse<GolYieldSepoliaAccountPreflight>>; getDecisions(account: `0x${string}`, request?: { signal?: AbortSignal; }): Promise<GolResponse<GolYieldDecisionRecord[]>>; getPositions(account: `0x${string}`, request?: { signal?: AbortSignal; }): Promise<GolResponse<GolYieldPositionSnapshot>>; getComparisons(account: `0x${string}`, request?: { signal?: AbortSignal; }): Promise<GolResponse<GolYieldComparison[]>>; } | Public, browser-safe Yield reads. |
createGolYieldOnboardingClient | createGolYieldOnboardingClient(options: GolClientOptions & { chainId?: GolChainId; }): { getCompatibility(account: `0x${string}`, request?: { signal?: AbortSignal; }): Promise<GolResponse<GolYieldCompatibility>>; getState(account: `0x${string}`, profileId: `0x${string}`, request?: { signal?: AbortSignal; }): Promise<GolResponse<GolYieldOnboardingState>>; prepareInstall(body: { account: `0x${string}`; profileId: `0x${string}`; owner: `0x${string}`; }, idempotencyKey: string): Promise<GolResponse<GolYieldPreparedOwnerOperation>>; submitOwnerOperation(body: { userOp: Record<string, string>; signature: `0x${string}`; }, idempotencyKey: string): Promise<GolResponse<{ txHash: `0x${string}`; }>>; prepareMandate(body: { account: `0x${string}`; profileId: `0x${string}`; }, idempotencyKey: string): Promise<GolResponse<GolYieldMandateDraft>>; submitMandate(body: { draftId: string; signature: `0x${string}`; }, idempotencyKey: string): Promise<GolResponse<{ account: `0x${string}`; mandateId: `0x${string}`; txHash: `0x${string}`; }>>; } | Public Base owner onboarding. The caller reviews every prepared operation before signing. |
createGolYieldSafeBaseMainnetCandidateManifestV2 | createGolYieldSafeBaseMainnetCandidateManifestV2(agent: Address): GolYieldSafeManifestV2 | Build a structural Base Mainnet V2 CANDIDATE with an explicit public agent. The caller must obtain the agent from a reviewed deployment record bound to its production KMS signer. An accepted address is not evidence of custody, trust, live deployment, or release approval. Independently verify live code hashes, Safe ownership, and session authority before onboarding. This offline factory uses the compiler-derived epoch implementation candidate and ten vaults; it does not deploy, connect a wallet, sign, broadcast, or activate production. |
createGolYieldSafeOnboardingClient | createGolYieldSafeOnboardingClient(options: GolYieldSafeOnboardingClientOptionsV1): GolYieldSafeOnboardingClientV1 | Fixed candidate public routes. The hosted availability flag remains unavailable. |
createGolYieldSafeOnboardingClientV2 | createGolYieldSafeOnboardingClientV2(options: GolYieldSafeOnboardingClientOptionsV2): GolYieldSafeOnboardingClientV2 | Version 2 routes retain a recovery call after expiry; only a fresh quote returns an owner transaction. |
createGolYieldVaultClient | createGolYieldVaultClient(options: GolClientOptions & { chainId?: GolChainId; }): { inspectAccount(body: { chainId: string; owner: Address; account: Address; profileId: Hex; }): Promise<GolResponse<GolYieldVaultAccountEvidence>>; getState(body: GolYieldVaultIdentity): Promise<GolResponse<{ draftId: string; status: "prepared" | "confirmed" | "indeterminate"; receipt: GolYieldVaultCreationReceipt | GolYieldOwnerDepositReceipt | null; }>>; prepareCreation(body: { owner: Address; index: string; profileId: Hex; }, idempotencyKey: string, options?: { accountKind?: GolYieldVaultAccountKind; }): Promise<GolResponse<GolYieldVaultCreationDraft>>; submitCreation(body: GolYieldVaultIdentity & { signature: Hex; }, idempotencyKey: string): Promise<GolResponse<GolYieldVaultCreationReceipt>>; prepareDeposit(body: GolYieldVaultDepositInput, idempotencyKey: string): Promise<GolResponse<GolYieldVaultDepositDraft>>; submitDeposit(body: GolYieldVaultIdentity & { signature: Hex; }, idempotencyKey: string): Promise<GolResponse<GolYieldOwnerDepositReceipt>>; buildFundingTransfer(body: { account: Address; amount: string; }): { chainId: string; to: `0x${string}`; value: "0"; data: `0x${string}`; }; } | Public owner onboarding. Wallet funding is explicit; owner deposit receipts are not agent proofs. |
createOperationStorage | createOperationStorage(storage: StorageAdapter, namespace?: string): OperationStorage | Supply localStorage or an equivalent adapter. Handles contain public metadata only. |
decodeHostedTransferPolicy | decodeHostedTransferPolicy(policy: Hex): { asset: "0x036CbD53842c5426634e7929541eC2318f3dCF7e"; recipients: `0x${string}`[]; maxPerActionBaseUnits: bigint; maxTotalBaseUnits: bigint; } | Decode TLV policy bytes, then re-encode. Unknown tags, reordered rules and trailing bytes fail. |
decodeKernelExecuteCalls | decodeKernelExecuteCalls(value: unknown): KernelExecutionCall[] | null | Decode only the exact Kernel v3.3 default single/batch execute forms used by GOL. |
decodeLifiV3Route | decodeLifiV3Route(call: Readonly<KernelCall>): RouteReview | ABI recognition is separate from router-address trust and durable settlement evidence. |
developerRelayerTransaction | developerRelayerTransaction(execution: GasExecutionResponse, expected?: { submitter?: Address; core?: Address; }): DeveloperRelayerTransaction | The exact EIP-1559 transaction a developer-operated relayer signs for an execution in external_pending, after checking that its calldata is the agent’s signed transfer under this execution’s mandate, action, and policy. The relayer chooses its own nonce and a priority fee not above maxFeePerGas, signs with its own key, and submits the raw bytes. |
discoverAccountProfile | discoverAccountProfile(client: AccountProfileReader, input: { chainId: number; account: Address; profile: AccountProfileCandidate; }): Promise<CompatibilityResult> | Read the account’s identity, proxy code hash, ERC-1967 implementation slot or Safe singleton, and chain id at one pinned block, and compare every field against the selected candidate profile (ADR 0008 section 4, ADR 0009 sections 3-4). Unknown or mismatched accounts fail closed with a stable status; the profile is never inferred from an owner address. |
eip7702AuthorizationHash | eip7702AuthorizationHash(nonce: bigint | number | string): Hex | keccak256(0x05 || rlp([chainId, address, nonce])) for the reviewed delegate on Base Sepolia. |
encodeCreateChildMandate | encodeCreateChildMandate(terms: MandateTermsInput, mandatePolicy: Hex, authorization: Hex): Hex | Child mandate creation. authorization is the parent agent’s 65-byte signature over the child’s MandateTerms; anyone may send the call. |
encodeCreateMandateWithGas | encodeCreateMandateWithGas(terms: MandateTermsInput, mandatePolicy: Hex, gasPolicy: GasPolicyInput, packedOwnerSignature: Hex): Hex | |
encodeKernelExecuteBatch | encodeKernelExecuteBatch(calls: KernelExecutionCall[]): Hex | |
encodeKernelExecuteSingle | encodeKernelExecuteSingle(to: Address, value: bigint, data: Hex): Hex | |
encodeOwnerInstallation | encodeOwnerInstallation(family: AccountFamily, account: Address, core: Address, entityId?: number): OwnerAccountCall | |
encodePermanentRemoval | encodePermanentRemoval(family: AccountFamily, account: Address, core: Address, options?: { safePreviousModule?: Address; alchemyEntityId?: number; }): OwnerAccountCall | |
encodeRevokeGasPolicy | encodeRevokeGasPolicy(gasPolicyId: Hex, deadline: number, packedOwnerSignature: Hex): Hex | Relayed revocation with an owner signature; deadline = 0 and empty signature is the direct owner form. |
encodeSafetyAction | encodeSafetyAction(mandateId: Hex, actionCode: SafetyActionCode, deadline: number, packedOwnerSignature: Hex): Hex | Relayed owner pause, resume, or revoke; a direct account call uses deadline 0 and no signature. |
encodeTransferInput | encodeTransferInput(asset: Address, recipient: Address, amount: bigint): Hex | The 96-byte fungible_asset.transfer@1 input: abi.encode(asset, recipient, amount). |
encodeTransferPolicy | encodeTransferPolicy(input: TransferPolicyInput): Hex | Canonical bounded fungible_asset.transfer@1 policy (encoding section 3): action, asset, and recipient allowlists plus per-action and lifetime caps. |
expectedConfig | expectedConfig(family: AccountFamily): { lane: number; config: Hex; } | |
gasActionTypedData | gasActionTypedData(message: GasActionAuthorizationMessage, core: Address, chainId?: number): { domain: { readonly name: "GOL Mandate"; readonly version: "3"; readonly chainId: number; readonly verifyingContract: `0x${string}`; }; types: { readonly GasActionAuthorization: readonly [{ readonly name: "mandateId"; readonly type: "bytes32"; }, { readonly name: "actionTag"; readonly type: "uint32"; }, { readonly name: "schemaVersion"; readonly type: "uint16"; }, { readonly name: "actionId"; readonly type: "bytes32"; }, { readonly name: "capabilityDigest"; readonly type: "bytes32"; }, { readonly name: "deadline"; readonly type: "uint48"; }, { readonly name: "inputHash"; readonly type: "bytes32"; }, { readonly name: "gasPolicyId"; readonly type: "bytes32"; }, { readonly name: "maxCharge"; readonly type: "uint128"; }]; }; primaryType: "GasActionAuthorization"; message: { mandateId: `0x${string}`; actionTag: number; schemaVersion: number; actionId: `0x${string}`; capabilityDigest: `0x${string}`; deadline: number; inputHash: `0x${string}`; gasPolicyId: `0x${string}`; maxCharge: bigint; }; } | Typed data the executing mandate’s agent signs for one inline-settled action. |
golOwnerPayloadStructHash | golOwnerPayloadStructHash(payload: GolOwnerPayload): Hex | EIP-712 struct hash of a GOL owner payload. |
hashGasActionAuthorization | hashGasActionAuthorization(message: GasActionAuthorizationMessage, core: Address, chainId?: number): Hex | |
hashGasMandate | hashGasMandate(terms: GasMandateTerms, chainId: number, core: Address): Hex | |
hashOwnerGasPolicy | hashOwnerGasPolicy(policy: OwnerGasPolicy, chainId: number, core: Address): Hex | |
hostedActionCall | hostedActionCall(p: HostedOwnerAction, signature: Hex): OwnerAccountCall | |
hostedApprovalFingerprint | hostedApprovalFingerprint(prepared: PreparedGasPolicy): Hex | |
hostedApprovalTransaction | hostedApprovalTransaction(prepared: PreparedGasPolicy, signature: Hex): { to: `0x${string}`; data: `0x${string}`; } | |
hostedOwnerActionFingerprint | hostedOwnerActionFingerprint(p: HostedOwnerAction): Hex | |
hostedOwnerOperationSnapshot | hostedOwnerOperationSnapshot(operation: OwnerOperation): HostedOwnerAction["execution"] | |
isAccountProfileCandidate | isAccountProfileCandidate(value: unknown): value is AccountProfileCandidate | Fail-closed structural check for an untrusted or unknown profile shape, mirroring the @gol/schema AccountProfileCandidate Zod contract field for field. |
nexus133CodeHash | nexus133CodeHash(chainId: number): Hex | undefined | The reviewed delegate runtime hash on chainId, or undefined on any other chain. |
nexus133InitData | nexus133InitData(core: Address): Hex | The canonical Nexus 1.3.3 initialization of a nexus7702 account (encoding section 6.4): no validator, the version 3 core as the only executor, and no hook, fallback, or pre-validation hook. |
openOwnerApproval | openOwnerApproval(launch: ApprovalLaunch | OwnerActionLaunch, options?: { mode?: "popup" | "redirect"; onPopupBlocked?: "error" | "redirect"; timeoutMs?: number; allowLocalhost?: boolean; }): Promise<ApprovalResult> | Call directly from a click handler. Results are notifications; re-read your server’s session before granting access. |
ownerOperationForProfile | ownerOperationForProfile(input: { profile: AccountProfileCandidate; account: Address; }): OwnerAccountCall | Build the owner-signed operation for the profile’s registered installation call, through the selected profile’s owner dialect. Executor lanes transfer their own tokens and must not leave a residual ERC-20 allowance to MandateCore (ADR 0008). The allowance lane and any profile without verified atomic batch support are refused before any operation is built (ADR 0008 sections 2-3; design decision 2). The profile is never inferred from account; a mismatch fails closed instead of guessing. |
ownerSafetySigningHash | ownerSafetySigningHash(client: AccountReader, family: AccountFamily, account: Address, digest: Hex, chainId?: number): Promise<Hex> | Safety digests remain preparable after implementation drift. This does not grant authority. |
ownerSigningHash | ownerSigningHash(client: AccountReader, family: AccountFamily, account: Address, digest: Hex, chainId?: number): Promise<Hex> | The owner signs this hash with its wallet. The SDK never accepts an owner key. |
ownerUserOpNonceKey | ownerUserOpNonceKey(family: UserOperationFamily): bigint | EntryPoint v0.7 nonce key for owner UserOperations. Safe and the delegated EOA have no selected UserOperation path. |
ownerUserOpSigningHash | ownerUserOpSigningHash(family: UserOperationFamily, userOpHash: Hex): Hex | |
packAlchemyExecuteBatch | packAlchemyExecuteBatch(account: Address, calls: { to: Address; data: Hex; }[]): OwnerAccountCall | Pack a zero-value batch through the account’s own Alchemy Modular Account executeBatch. |
packErc7579ExecuteBatch | packErc7579ExecuteBatch(account: Address, calls: { to: Address; data: Hex; }[]): OwnerAccountCall | Pack a zero-value batch through the account’s own ERC-7579 execute(mode, executionCalldata). This is the standard, owner-facing entry point, distinct from the executor-only executeFromExecutor that MandateCore calls during agent execution. |
packOwnerSignature | packOwnerSignature(family: AccountFamily, signature: Hex): Hex | Preserve a Safe threshold payload or pack the reviewed single-owner dialect. |
packOwnerUserOpSignature | packOwnerUserOpSignature(family: UserOperationFamily, signature: Hex): Hex | |
packSafeMultiSendBatch | packSafeMultiSendBatch(calls: { to: Address; data: Hex; }[]): OwnerAccountCall | Pack a zero-value Safe batch through MultiSendCallOnly. Each call is a plain CALL, never a delegatecall. |
parseOperationHandle | parseOperationHandle(value: unknown): OperationHandle | Validate a public recovery handle before storing or using it. |
parseUnsignedUserOperation | parseUnsignedUserOperation(value: unknown): UnsignedUserOperation | Validate the exact fields the owner reviews. A signed or unknown-version build fails closed. |
parseYieldVaultCreation | parseYieldVaultCreation(value: unknown, chainId: string, expected: { owner: Address; index: string; profileId: Hex; accountKind?: GolYieldVaultAccountKind; }): GolYieldVaultCreationDraft | |
prepareCombinedGasApproval | prepareCombinedGasApproval(client: Pick<PublicClient, "getChainId" | "getBytecode" | "getStorageAt" | "readContract">, family: AccountFamily, chainId: number, core: Address, terms: GasMandateTerms, mandatePolicy: Hex, gasPolicy: OwnerGasPolicy): Promise<CombinedGasApproval> | Prepare one owner signature after the account installation has been verified. |
prepareGasRevocation | prepareGasRevocation(client: Pick<PublicClient, "getChainId" | "getBytecode" | "getStorageAt" | "readContract">, family: AccountFamily, chainId: number, core: Address, account: Address, policyId: Hex, deadline: number): Promise<PreparedGasRevocation> | Owner safety action. It remains preparable after an account implementation drift. |
prepareOwnerInstallation | prepareOwnerInstallation(client: AccountReader, family: AccountFamily, account: Address, core: Address, entityId?: number, chainId?: number): Promise<OwnerAccountCall> | Prepare account self-call calldata after a fresh implementation preflight. |
prepareOwnerOperation | prepareOwnerOperation(client: Pick<PublicClient, "getChainId" | "readContract" | "estimateFeesPerGas">, family: AccountFamily, account: Address, call: OwnerAccountCall, options?: OwnerOperationOptions): Promise<OwnerOperation> | |
preparePermanentRemoval | preparePermanentRemoval(client: AccountReader, family: AccountFamily, account: Address, core: Address, options?: { safePreviousModule?: Address; alchemyEntityId?: number; chainId?: number; }): Promise<OwnerAccountCall> | Prepare tested invalidate-then-remove calldata, including after slot drift. The owner must authorize it. |
prepareProjectBoundGasApproval | prepareProjectBoundGasApproval(client: Parameters<typeof prepareCombinedGasApproval>[0], family: AccountFamily, chainId: number, core: Address, projectUuid: string, terms: GasMandateTerms, mandatePolicy: Hex, gasPolicy: OwnerGasPolicy): Promise<CombinedGasApproval> | Bind a platform project UUID before any owner signing request is prepared. |
readHostedOwnerConfiguration | readHostedOwnerConfiguration(client: PublicClient, family: AccountFamily, account: Address, blockNumber?: bigint): Promise<HostedOwnerConfiguration> | |
rebuildHostedOwnerOperation | rebuildHostedOwnerOperation(client: PublicClient, p: HostedOwnerAction): Promise<OwnerOperation> | Regenerate the canonical account-native envelope with the frozen nonce and gas bounds. |
relayAndWait | relayAndWait(options: WaitOptions & { relay: () => Promise<OperationHandle>; }): Promise<WaitResult> | |
requireGolChain | requireGolChain(value: unknown): GolChainId | |
resumeOperation | resumeOperation(options: WaitOptions & { operationId: string; attemptId: string; }): Promise<WaitResult> | |
resumeOwnerApproval | resumeOwnerApproval(): ApprovalResult | null | Consume a correlated mobile callback once, removing the result fragment from history. |
returnOwnerApproval | returnOwnerApproval(session: ApprovalSession | OwnerActionSession, options?: { mode?: "popup" | "redirect"; }): ApprovalResult | Hosted page only: emit a minimal notification to the registered destination. No capabilities or signatures. |
revocationStructHash | revocationStructHash(gasPolicyId: Hex, nonce: bigint, deadline: number): Hex | |
safeOwnerTypedData | safeOwnerTypedData(account: Address, call: OwnerAccountCall, nonce: bigint): TypedDataPayload | Canonical Safe 1.4.1 owner transaction with no refund or additional ETH value. |
safetyActionStructHash | safetyActionStructHash(mandateId: Hex, actionCode: SafetyActionCode, nonce: bigint, deadline: number): Hex | |
selfSentEip7702Setup | selfSentEip7702Setup(prepared: PreparedEip7702Setup, expected?: { account?: Address; core?: Address; }): { to: Address; data: Hex; value: 0n; authorization: null | { chainId: number; address: Address; nonce: number; }; } | The setup for a wallet that sends type-4 transactions itself: it signs the authorization for authorization.nonce (the account nonce plus one, because the sender’s nonce increments first) and sends data to its own address. |
signOwnerOperation | signOwnerOperation(signer: OwnerSigner, operation: OwnerOperation): Promise<Hex> | Sign a prepared owner operation with a caller-supplied owner wallet. |
signPreparedChildMandate | signPreparedChildMandate(parentAgent: AgentSigner, prepared: PreparedChildMandate, expected?: PreparedChildMandateExpectations): Promise<{ authorization: Hex; submission: { to: Address; data: Hex; }; }> | Verify, ask the parent agent to sign the child’s MandateTerms, and return the authorization for submitChildMandate plus the call anyone may send to create the child without GOL’s sponsorship. |
signPreparedEip7702Setup | signPreparedEip7702Setup(signers: { authorization?: Eip7702AuthorizationSigner; initialization: RawHashSigner; }, prepared: PreparedEip7702Setup, expected?: { account?: Address; core?: Address; }): Promise<SubmitEip7702SetupInput> | Verify a prepared setup, collect the owner’s authorization (when the EOA is not yet delegated) and initialization signature, and check both recover to the account before returning the sponsored submission body. The SDK never receives the owner key. |
signPreparedGasExecution | signPreparedGasExecution(signer: AgentSigner, prepared: PrepareGasExecutionResponse, expected?: PreparedGasExecutionExpectations): Promise<{ mandateId: string; gasPolicyId: string; recipient: string; amountBaseUnits: string; deadline: number; maxChargeWei: string; agentSignature: string; }> | Verify, ask the agent wallet to sign, and return the submission body for submitGasExecution. The signature must recover to the prepared agent. |
signPreparedGasPolicy | signPreparedGasPolicy(signer: OwnerSigner, prepared: PreparedGasPolicy, expected?: PreparedGasPolicyExpectations): Promise<{ to: Address; data: Hex; }> | Verify, ask the owner wallet to sign, and return the core call anyone may send. |
signPreparedRevocation | signPreparedRevocation(signer: OwnerSigner, prepared: PreparedPolicyRevocation): Promise<{ to: Address; data: Hex; }> | Verify a prepared relayed revocation, sign it with the owner wallet, and return the core call. |
signPreparedSafetyAction | signPreparedSafetyAction(signer: OwnerSigner, prepared: PreparedMandateSafetyAction, expected?: { mandateId?: Hex; action?: SafetyActionName; }): Promise<{ to: Address; data: Hex; }> | Recompute the core digest and wallet payload before signing an owner pause, resume, or revoke of any mandate in the policy’s tree. |
signWalletSigningPayload | signWalletSigningPayload(signer: OwnerSigner, payload: WalletSigningPayload): Promise<Hex> | Ask the owner wallet to sign, then pack the reviewed account-family signature. |
toGasMandateTerms | toGasMandateTerms(terms: MandateTermsInput): GasMandateTerms | Normalize API mandate terms into the typed form the encoders hash. |
userOperationHash | userOperationHash(op: PackedUserOperation, chainId?: number): Hex | EntryPoint v0.7 user operation hash, computed locally. |
verifyGolYieldSafeQuoteV1 | verifyGolYieldSafeQuoteV1(value: unknown, options: { manifest: GolYieldSafeManifestV1; codeReader: GolYieldSafeCodeReaderV1; expected: GolYieldSafeQuoteExpectationV1; now?: number; }): Promise<GolYieldSafeFundingTransactionV1> | Verifies every quote commitment and live identity before returning the only owner transaction in this flow. It never signs, persists a key, or broadcasts. |
verifyGolYieldSafeQuoteV2 | verifyGolYieldSafeQuoteV2(value: unknown, options: { manifest: GolYieldSafeManifestV2; codeReader: GolYieldSafeCodeReaderV2; expected: GolYieldSafeQuoteExpectationV2; now?: number; }): Promise<GolYieldSafeFundingTransactionV1> | Verifies reviewed facts and two independent CREATE2 derivations before exposing the only owner transaction. |
verifyHostedApprovalAccount | verifyHostedApprovalAccount(client: PublicClient, session: ApprovalSession, walletAccount: Address): Promise<{ session: ApprovalSession; terms: import("./gas-approval.js").GasMandateTerms; transfer: { asset: "0x036CbD53842c5426634e7929541eC2318f3dCF7e"; recipients: `0x${string}`[]; maxPerActionBaseUnits: bigint; maxTotalBaseUnits: bigint; }; signing: import("./owner.js").WalletSigningPayload; }> | |
verifyHostedApprovalSession | verifyHostedApprovalSession(input: ApprovalSession): { session: ApprovalSession; terms: import("./gas-approval.js").GasMandateTerms; transfer: { asset: "0x036CbD53842c5426634e7929541eC2318f3dCF7e"; recipients: `0x${string}`[]; maxPerActionBaseUnits: bigint; maxTotalBaseUnits: bigint; }; signing: import("./owner.js").WalletSigningPayload; } | Return a detached verified snapshot and reconstructed terms. Never render an unverified API summary. |
verifyHostedDeployment | verifyHostedDeployment(client: PublicClient, family: AccountFamily, blockNumber: bigint): Promise<void> | |
verifyHostedOwnerActionAccount | verifyHostedOwnerActionAccount(client: PublicClient, input: OwnerActionSession, walletAccount: Address): Promise<{ session: OwnerActionSession; action: HostedOwnerActionName; }> | |
verifyHostedOwnerActionSession | verifyHostedOwnerActionSession(input: OwnerActionSession): { session: OwnerActionSession; action: HostedOwnerActionName; } | |
verifyHostedOwnerConfiguration | verifyHostedOwnerConfiguration(configuration: HostedOwnerConfiguration): void | |
verifyPreparedChildMandate | verifyPreparedChildMandate(prepared: PreparedChildMandate, expected?: PreparedChildMandateExpectations): void | Recompute a prepared child mandate: its policy bytes from the reviewed intent, its terms and identifier under the version 3 domain, and the parent agent’s signing payload. Throws prepared_child_mismatch on any difference. The core enforces every ancestor’s limits regardless. |
verifyPreparedEip7702Setup | verifyPreparedEip7702Setup(prepared: PreparedEip7702Setup, expected?: { account?: Address; core?: Address; }): void | Recompute a prepared setup without trusting the API: the delegate, chain, authorization hash, canonical initialization, and both call forms. Throws prepared_setup_mismatch on any difference. |
verifyPreparedGasExecution | verifyPreparedGasExecution(prepared: PrepareGasExecutionResponse, expected?: PreparedGasExecutionExpectations): void | Recompute the agent’s GasActionAuthorization from the typed transfer without trusting the API. Throws prepared_execution_mismatch on any difference, including a maxChargeWei above the agent’s own ceiling. |
verifyPreparedGasPolicy | verifyPreparedGasPolicy(prepared: PreparedGasPolicy, expected?: PreparedGasPolicyExpectations): void | Recompute a prepared approval without trusting the API: the policy bytes against the reviewed intent, mandate and gas-policy IDs, the combined digest, and the wallet payload. Optional expectations pin what the application asked for. Throws prepared_policy_mismatch on any difference. |
verifyWalletSigningPayload | verifyWalletSigningPayload(payload: WalletSigningPayload, expected: WalletSigningInput): void | Recompute a payload received from the API. Throws unless it is the exact reviewed shape for the family, account, and digest. |
yieldAgentsAuthMessage | yieldAgentsAuthMessage(input: GolYieldAgentAuthMessageInput): string | Exact UTF-8 text the owner wallet signs for a Yield Agents mutation. |
yieldVaultCreationDigest | yieldVaultCreationDigest(draft: GolYieldVaultCreationDraft): Hex | |
yieldVaultCreationFactory | yieldVaultCreationFactory(accountKind: GolYieldVaultAccountKind): Address | |
yieldVaultDepositCallData | yieldVaultDepositCallData(calls: ReturnType<typeof yieldVaultDepositCalls>): Hex | |
yieldVaultDepositCalls | yieldVaultDepositCalls(asset: Address, vault: Address, account: Address, amount: string): { to: `0x${string}`; value: string; data: `0x${string}`; }[] |
Values
| Name | Value | Notes |
|---|---|---|
BASE_MAINNET_CHAIN_ID | 8453 | |
BASE_SEPOLIA_CHAIN_ID | 84532 | |
BASE_SEPOLIA_USDC | "0x036CbD53842c5426634e7929541eC2318f3dCF7e" | |
CHARGEABLE_OUTCOMES | { readonly success: 1; readonly refusal: 2; readonly revert: 4; } | |
CORE_DOMAIN_NAME | "GOL Mandate" | |
CORE_DOMAIN_VERSION | "3" | |
ENTRY_POINT_V07 | "0x0000000071727De22E5E9d8BAf0edAc6f37da032" | |
ENTRYPOINT_V07 | "0x0000000071727De22E5E9d8BAf0edAc6f37da032" | |
ERC1967_IMPLEMENTATION_SLOT | "0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc" | |
GAS_ACTION_TYPES | { readonly GasActionAuthorization: readonly [{ readonly name: "mandateId"; readonly type: "bytes32"; }, { readonly name: "actionTag"; readonly type: "uint32"; }, { readonly name: "schemaVersion"; readonly type: "uint16"; }, { readonly name: "actionId"; readonly type: "bytes32"; }, { readonly name: "capabilityDigest"; readonly type: "bytes32"; }, { readonly name: "deadline"; readonly type: "uint48"; }, { readonly name: "inputHash"; readonly type: "bytes32"; }, { readonly name: "gasPolicyId"; readonly type: "bytes32"; }, { readonly name: "maxCharge"; readonly type: "uint128"; }]; } | |
GAS_FORMULA_INLINE | 2 | |
GOL_CHAINS | Readonly<{ readonly base: 8453; readonly baseSepolia: 84532; }> | |
GOL_NEXUS_PROVIDER_FACTORY | "0x00000bb19a3579F4D779215dEf97AFbd0e30DB55" | |
GOL_OWNER_PAYLOAD_TYPES | { readonly CombinedGasApproval: readonly [{ readonly name: "mandateId"; readonly type: "bytes32"; }, { readonly name: "gasPolicyId"; readonly type: "bytes32"; }]; readonly GasRevocation: readonly [{ readonly name: "gasPolicyId"; readonly type: "bytes32"; }, { readonly name: "nonce"; readonly type: "uint256"; }, { readonly name: "deadline"; readonly type: "uint48"; }]; readonly SafetyAction: readonly [{ readonly name: "mandateId"; readonly type: "bytes32"; }, { readonly name: "action"; readonly type: "uint8"; }, { readonly name: "nonce"; readonly type: "uint256"; }, { readonly name: "deadline"; readonly type: "uint48"; }]; } | |
GOL_SAFE_PROXY_FACTORY | "0x4e1DCf7AD4e460CfD30791CCC4F9c8a4f820ec67" | |
GOL_YIELD_SAFE_LOCAL_FORK_MANIFEST_V1 | Readonly<{ readonly version: 1; readonly chainId: 8453; readonly asset: Address; readonly factory: Readonly<{ address: Address; codeHash: Hex; }>; readonly singleton: Readonly<{ address: Address; codeHash: Hex; }>; readonly fallbackHandler: Readonly<{ address: Address; codeHash: Hex; }>; readonly setupHelper: Readonly<{ address: Address; codeHash: Hex; }>; readonly module: Readonly<{ address: Address; codeHash: Hex; }>; readonly agent: Address; readonly maxAssetsPerAction: "5000000000"; readonly minSessionDurationSeconds: 7776000; readonly maxSessionDurationSeconds: 7776000; readonly minSessionRemainingSeconds: 7775700; readonly proxyCreationCode: Hex; readonly proxyCreationCodeHash: Hex; readonly proxyRuntimeCodeHash: Hex; readonly admittedVaults: readonly ["0x7BfA7C4f149E7415b73bdeDfe609237e29CBF34A", "0xeE8F4eC5672F09119b96Ab6fB59C27E1b7e44b61", "0xbeeF010f9cb27031ad51e3333f9aF9C6B1228183", "0xBEEFE94c8aD530842bfE7d8B397938fFc1cb83b2", "0x1401d1271C47648AC70cBcdfA3776D4A87CE006B", "0xc1256Ae5FF1cf2719D4937adb3bbCCab2E00A2Ca", "0xc0c5689e6f4D256E861F65465b691aeEcC0dEb12", "0xef417a2512C5a41f69AE4e021648b69a7CdE5D03", "0x1D3b1Cd0a0f242d598834b3F2d126dC6bd774657", "0xBEEFA7B88064FeEF0cEe02AAeBBd95D30df3878F"]; readonly quoteMaxAgeSeconds: 300; }> | |
GOL_YIELD_SAFE_LOCAL_FORK_MANIFEST_V2 | Readonly<{ readonly version: 2; readonly chainId: 8453; readonly asset: `0x${string}`; readonly factory: Readonly<{ address: Address; codeHash: Hex; }>; readonly singleton: Readonly<{ address: Address; codeHash: Hex; }>; readonly fallbackHandler: Readonly<{ address: Address; codeHash: Hex; }>; readonly setupHelper: Readonly<{ address: Address; codeHash: Hex; }>; readonly implementation: Readonly<{ address: Address; codeHash: Hex; }>; readonly agent: Address; readonly maxAssetsPerAction: "5000000000"; readonly sessionDurationSeconds: 2592000; readonly minSessionRemainingSeconds: 2591700; readonly safeSaltNonce: "37902036200216860211856274329712747136041673416574920863093818366860538521791"; readonly moduleProxySalt: Hex; readonly safeProxyCreationCode: `0x${string}`; readonly safeProxyCreationCodeHash: `0x${string}`; readonly safeProxyRuntimeCodeHash: `0x${string}`; readonly moduleProxyCreationCode: Hex; readonly moduleProxyCreationCodeHash: Hex; readonly moduleProxyRuntimeCodeHash: Hex; readonly admittedVaults: readonly ["0x7BfA7C4f149E7415b73bdeDfe609237e29CBF34A", "0xeE8F4eC5672F09119b96Ab6fB59C27E1b7e44b61", "0xbeeF010f9cb27031ad51e3333f9aF9C6B1228183", "0xBEEFE94c8aD530842bfE7d8B397938fFc1cb83b2", "0x1401d1271C47648AC70cBcdfA3776D4A87CE006B", "0xc1256Ae5FF1cf2719D4937adb3bbCCab2E00A2Ca", "0xc0c5689e6f4D256E861F65465b691aeEcC0dEb12", "0xef417a2512C5a41f69AE4e021648b69a7CdE5D03", "0x1D3b1Cd0a0f242d598834b3F2d126dC6bd774657", "0xBEEFA7B88064FeEF0cEe02AAeBBd95D30df3878F"]; readonly quoteMaxAgeSeconds: 300; }> | |
GOL_YIELD_SAFE_LOCAL_FORK_MANIFEST_V2_EPOCH | Readonly<{ readonly implementation: Readonly<{ address: Address; codeHash: Hex; }>; readonly version: 2; readonly chainId: 8453; readonly asset: `0x${string}`; readonly factory: Readonly<{ address: Address; codeHash: Hex; }>; readonly singleton: Readonly<{ address: Address; codeHash: Hex; }>; readonly fallbackHandler: Readonly<{ address: Address; codeHash: Hex; }>; readonly setupHelper: Readonly<{ address: Address; codeHash: Hex; }>; readonly agent: Address; readonly maxAssetsPerAction: "5000000000"; readonly sessionDurationSeconds: 2592000; readonly minSessionRemainingSeconds: 2591700; readonly safeSaltNonce: "37902036200216860211856274329712747136041673416574920863093818366860538521791"; readonly moduleProxySalt: Hex; readonly safeProxyCreationCode: `0x${string}`; readonly safeProxyCreationCodeHash: `0x${string}`; readonly safeProxyRuntimeCodeHash: `0x${string}`; readonly moduleProxyCreationCode: Hex; readonly moduleProxyCreationCodeHash: Hex; readonly moduleProxyRuntimeCodeHash: Hex; readonly admittedVaults: readonly ["0x7BfA7C4f149E7415b73bdeDfe609237e29CBF34A", "0xeE8F4eC5672F09119b96Ab6fB59C27E1b7e44b61", "0xbeeF010f9cb27031ad51e3333f9aF9C6B1228183", "0xBEEFE94c8aD530842bfE7d8B397938fFc1cb83b2", "0x1401d1271C47648AC70cBcdfA3776D4A87CE006B", "0xc1256Ae5FF1cf2719D4937adb3bbCCab2E00A2Ca", "0xc0c5689e6f4D256E861F65465b691aeEcC0dEb12", "0xef417a2512C5a41f69AE4e021648b69a7CdE5D03", "0x1D3b1Cd0a0f242d598834b3F2d126dC6bd774657", "0xBEEFA7B88064FeEF0cEe02AAeBBd95D30df3878F"]; readonly quoteMaxAgeSeconds: 300; }> | |
GOL_YIELD_SAFE_ONBOARDING_V1 | Readonly<{ readonly version: 1; readonly stability: "candidate"; readonly availability: "unavailable"; readonly routes: Readonly<{ quote: "/v1/yield/onboarding/counterfactual/v1/quotes"; funding: "/v1/yield/onboarding/counterfactual/v1/quotes/:quoteId/funding"; status: "/v1/yield/onboarding/counterfactual/v1/quotes/:quoteId"; recovery: "/v1/yield/onboarding/counterfactual/v1/quotes/:quoteId/deployment"; }>; }> | |
GOL_YIELD_SAFE_ONBOARDING_V2 | Readonly<{ readonly version: 2; readonly stability: "candidate"; readonly availability: "unavailable"; readonly routes: Readonly<{ quote: "/v1/yield/onboarding/counterfactual/v2/quotes"; funding: "/v1/yield/onboarding/counterfactual/v2/quotes/:quoteId/funding"; status: "/v1/yield/onboarding/counterfactual/v2/quotes/:quoteId"; recovery: "/v1/yield/onboarding/counterfactual/v2/quotes/:quoteId/deployment"; }>; }> | |
HOSTED_APPROVAL_DEPLOYMENT | Readonly<{ chainId: 84532; core: Address; registry: Address; coreCodeHash: Hex; relayer: Address; attester: Address; profileId: Hex; }> | |
HOSTED_PROFILE_IDS | { readonly safe: "0x777aa14185f7f3d612bdde5af43e3d5612adcebc1cf7c96564ab472bc6c66d3c"; readonly nexus: "0x843fc532e0ee942fab3cbc015ab7e915d57aa0380953026edc8ddb52f70e7648"; readonly kernel: "0x9da0560cf391ab21030e647ae8bbb8f3f600f86622764c69ac9f5ec570bb0e9a"; readonly alchemy: "0xf6f3840b7f310b16d630b614716c20289956d1c1f6baca185ebbc81d690534a5"; readonly nexus7702: "0x78048d49b3b4408bda163a932437f2563ff4a69d18d5237b74366278f02e3bb5"; } | |
HOSTED_TREE_LIMITS | { readonly maxDepth: 2; readonly maxActiveDescendants: 16; } | |
hostedPersonalSigningHash | (hash: Hex) => `0x${string}` | |
KERNEL_EXECUTE_USER_OP_SELECTOR | "0x8dd7712f" | |
MANDATE_TERMS_TYPES | { readonly MandateTerms: readonly [{ readonly name: "parentId"; readonly type: "bytes32"; }, { readonly name: "account"; readonly type: "address"; }, { readonly name: "agent"; readonly type: "address"; }, { readonly name: "accountProfileId"; readonly type: "bytes32"; }, { readonly name: "installEpoch"; readonly type: "uint64"; }, { readonly name: "projectId"; readonly type: "bytes32"; }, { readonly name: "mode"; readonly type: "uint8"; }, { readonly name: "policyVersion"; readonly type: "uint8"; }, { readonly name: "policyHash"; readonly type: "bytes32"; }, { readonly name: "validFrom"; readonly type: "uint48"; }, { readonly name: "expiresAt"; readonly type: "uint48"; }, { readonly name: "maxDepth"; readonly type: "uint32"; }, { readonly name: "maxActiveDescendants"; readonly type: "uint32"; }, { readonly name: "approvalExpiresAt"; readonly type: "uint48"; }, { readonly name: "salt"; readonly type: "bytes32"; }]; } | |
NATIVE_FEE_ASSET | "0x0000000000000000000000000000000000000000" | |
NEXUS_133_BOOTSTRAP | "0x0000B1c0A80cb7DD166a15e7390b8A4Ced4500C6" | |
NEXUS_133_CODEHASH | "0xfc3c26ffa661fd6db8009869d45aa5bf8534c63ae7823bb6d4d0c01cc053e1c7" | |
NEXUS_133_CODEHASHES | { readonly 84532: "0xfc3c26ffa661fd6db8009869d45aa5bf8534c63ae7823bb6d4d0c01cc053e1c7"; readonly 8453: "0x6a83b590cd476572189ed85dfd2e6342e804c6e1f901a4643d24eadab3857929"; } | |
NEXUS_133_DEFAULT_VALIDATOR | "0x0000B1C0790E5a28293276C320d2B95D651dBaD6" | |
NEXUS_133_DELEGATE | "0x0000B1c01cB3b5770D8806f0D214d50131a08a5B" | |
NEXUS_133_DELEGATION_CODE | Hex | |
SAFETY_ACTION_CODES | { readonly pause: 1; readonly resume: 2; readonly revoke: 3; } | |
stableHostedData | (value: unknown) => string | |
TRANSFER_ACTION_TAG | 1 | |
TRANSFER_CAPABILITY_DIGEST | `0x${string}` | |
TRANSFER_SCHEMA_VERSION | 1 |
API request and response types
These aliases are generated from the platform OpenAPI contract, so their shape is exactly the one in the API reference.Operation is the OpenAPI operationId that defines the type.
| Type | Operation | Declaration |
|---|---|---|
AccountStatus | getAccountStatus | type AccountStatus = Json<"getAccountStatus", 200> |
ApiErrorResponse | platform schema | type ApiErrorResponse = components["schemas"]["def-0"] |
ApiKey | platform schema | type ApiKey = components["schemas"]["def-2"] |
ApiKeyIdentityResponse | getApiKeyIdentity | type ApiKeyIdentityResponse = operations["getApiKeyIdentity"]["responses"][200]["content"]["application/json"] |
ApprovalDestination | registerApprovalDestination | type ApprovalDestination = Json<"registerApprovalDestination", 200> |
ApprovalSession | getPublicApprovalSession | type ApprovalSession = Omit<Json<"getPublicApprovalSession", 200>, "prepared" | "ownerConfiguration"> & { prepared: PreparedGasPolicy; ownerConfiguration?: HostedOwnerConfiguration; } |
AuditEvent | platform schema | type AuditEvent = components["schemas"]["def-3"] |
AuthorizedApproval | completeApprovalSession | type AuthorizedApproval = Omit<Extract<Json<"completeApprovalSession", 200>, { operationTicket: string; }>, "session"> & { session: ApprovalSession; } |
ChangeWorkspaceMemberInput | changeWorkspaceMember | type ChangeWorkspaceMemberInput = Body<"changeWorkspaceMember"> |
ChildMandateInclusionEvent | platform schema | type ChildMandateInclusionEvent = components["schemas"]["def-15"] |
ChildMandateObservation | confirmChildMandate | type ChildMandateObservation = Json<"confirmChildMandate", 202> |
ChildMandateRecord | confirmChildMandate | type ChildMandateRecord = Json<"confirmChildMandate", 200> |
ConfirmGasPolicyInput | confirmGasPolicy | type ConfirmGasPolicyInput = Body<"confirmGasPolicy"> |
ConfirmGasPolicyRevocationInput | confirmGasPolicyRevocation | type ConfirmGasPolicyRevocationInput = Body<"confirmGasPolicyRevocation"> |
ConsoleIdentityResponse | getConsoleIdentity | type ConsoleIdentityResponse = operations["getConsoleIdentity"]["responses"][200]["content"]["application/json"] |
CreateApiKeyInput | createApiKey | type CreateApiKeyInput = operations["createApiKey"]["requestBody"]["content"]["application/json"] |
CreateApiKeyResponse | createApiKey | type CreateApiKeyResponse = operations["createApiKey"]["responses"][201]["content"]["application/json"] |
CreateApprovalSessionInput | createApprovalSession | type CreateApprovalSessionInput = Body<"createApprovalSession"> |
CreateGasSimulationInput | createGasSimulation | type CreateGasSimulationInput = operations["createGasSimulation"]["requestBody"]["content"]["application/json"] |
CreateGoogleSessionInput | createGoogleSession | type CreateGoogleSessionInput = operations["createGoogleSession"]["requestBody"]["content"]["application/json"] |
CreateGoogleSessionResponse | createGoogleSession | type CreateGoogleSessionResponse = operations["createGoogleSession"]["responses"][200]["content"]["application/json"] |
CreateProjectInput | createProject | type CreateProjectInput = operations["createProject"]["requestBody"]["content"]["application/json"] |
CreateProjectResponse | createProject | type CreateProjectResponse = operations["createProject"]["responses"][201]["content"]["application/json"] |
CreateWebhookEndpointInput | createWebhookEndpoint | type CreateWebhookEndpointInput = Body<"createWebhookEndpoint"> |
CreateWebhookEndpointResponse | createWebhookEndpoint | type CreateWebhookEndpointResponse = Json<"createWebhookEndpoint", 201> |
CreateWorkspaceInvitationInput | createWorkspaceInvitation | type CreateWorkspaceInvitationInput = Body<"createWorkspaceInvitation"> |
CreateWorkspaceProjectInput | createWorkspaceProject | type CreateWorkspaceProjectInput = Body<"createWorkspaceProject"> |
Eip7702Setup | getEip7702Setup | type Eip7702Setup = Json<"getEip7702Setup", 200> |
Eip7702SetupInclusionEvent | platform schema | type Eip7702SetupInclusionEvent = components["schemas"]["def-16"] |
GasConfiguration | getGasConfiguration | type GasConfiguration = Json<"getGasConfiguration", 200> |
GasExecutionInclusionEvent | platform schema | type GasExecutionInclusionEvent = components["schemas"]["def-13"] |
GasExecutionResponse | getGasExecution | type GasExecutionResponse = operations["getGasExecution"]["responses"][200]["content"]["application/json"] |
GasObservation | confirmGasPolicy | type GasObservation = Json<"confirmGasPolicy", 202> |
GasPolicyInclusionEvent | platform schema | type GasPolicyInclusionEvent = components["schemas"]["def-14"] |
GasPolicyRecord | getGasPolicy | type GasPolicyRecord = Json<"getGasPolicy", 200> |
GasSimulationResponse | getGasSimulation | type GasSimulationResponse = operations["getGasSimulation"]["responses"][200]["content"]["application/json"] |
GolAgentRequestDeclineReason | platform schema | type GolAgentRequestDeclineReason = components["schemas"]["AgentRequest"]["declineReason"] |
GolAgentRequestOwnerDraft | platform schema | type GolAgentRequestOwnerDraft = components["schemas"]["AgentRequestOwnerDraft"] |
GolAgentRequestStatus | platform schema | type GolAgentRequestStatus = components["schemas"]["AgentRequestStatus"] |
GolAgentSessionBinding | platform schema | type GolAgentSessionBinding = components["schemas"]["AgentSessionBinding"] |
GolApiApproval | platform schema | type GolApiApproval = components["schemas"]["AgentApiApproval"] |
GolApiBudget | platform schema | type GolApiBudget = components["schemas"]["AgentApiBudget"] |
GolApiBudgetBuild | platform schema | type GolApiBudgetBuild = components["schemas"]["AgentApiBudgetBuild"] |
GolApiMandate | platform schema | type GolApiMandate = components["schemas"]["AgentApiMandate"] |
GolApiMandateDraft | platform schema | type GolApiMandateDraft = components["schemas"]["AgentApiMandateDraft"] |
GolApiMandateSave | platform schema | type GolApiMandateSave = components["schemas"]["AgentApiMandateSaveResult"] |
GolApiProvider | platform schema | type GolApiProvider = components["schemas"]["AgentApiProvider"] |
GolApiProviderDetail | platform schema | type GolApiProviderDetail = components["schemas"]["AgentApiProviderDetail"] |
GolApiProviderList | platform schema | type GolApiProviderList = components["schemas"]["AgentApiProviderList"] |
GolApiSpendPage | platform schema | type GolApiSpendPage = components["schemas"]["AgentApiSpendPage"] |
GolApiSpendRow | platform schema | type GolApiSpendRow = components["schemas"]["AgentApiSpend"] |
GolDeviceLoginStatus | platform schema | type GolDeviceLoginStatus = components["schemas"]["CliAuthStatusResponse"]["status"] |
GolHostedSignatureRecord | platform schema | type GolHostedSignatureRecord = components["schemas"]["HostedAgentSignatureRecord"] |
GolHostedSigningAttemptRecord | platform schema | type GolHostedSigningAttemptRecord = components["schemas"]["HostedSigningAttemptRecord"] |
InvitationReview | reviewInvitation | type InvitationReview = Json<"reviewInvitation", 200> |
ListApiKeysResponse | listApiKeys | type ListApiKeysResponse = operations["listApiKeys"]["responses"][200]["content"]["application/json"] |
ListAuditEventsResponse | listAuditEvents | type ListAuditEventsResponse = operations["listAuditEvents"]["responses"][200]["content"]["application/json"] |
ListChildMandatesResponse | listChildMandates | type ListChildMandatesResponse = Json<"listChildMandates", 200> |
ListGasExecutionsResponse | listGasExecutions | type ListGasExecutionsResponse = Json<"listGasExecutions", 200> |
ListGasPoliciesResponse | listGasPolicies | type ListGasPoliciesResponse = Json<"listGasPolicies", 200> |
ListMyInvitationsResponse | listMyInvitations | type ListMyInvitationsResponse = Json<"listMyInvitations", 200> |
ListProjectsResponse | listProjects | type ListProjectsResponse = operations["listProjects"]["responses"][200]["content"]["application/json"] |
ListWorkspaceAuditEventsResponse | listWorkspaceAuditEvents | type ListWorkspaceAuditEventsResponse = Json<"listWorkspaceAuditEvents", 200> |
ListWorkspaceInvitationsResponse | listWorkspaceInvitations | type ListWorkspaceInvitationsResponse = Json<"listWorkspaceInvitations", 200> |
ListWorkspaceMembersResponse | listWorkspaceMembers | type ListWorkspaceMembersResponse = Json<"listWorkspaceMembers", 200> |
ListWorkspaceProjectsResponse | listWorkspaceProjects | type ListWorkspaceProjectsResponse = Json<"listWorkspaceProjects", 200> |
ListWorkspacesResponse | listWorkspaces | type ListWorkspacesResponse = Json<"listWorkspaces", 200> |
MemberOffboardingReview | reviewMemberOffboarding | type MemberOffboardingReview = Json<"reviewMemberOffboarding", 200> |
PrepareChildMandateInput | prepareChildMandate | type PrepareChildMandateInput = Body<"prepareChildMandate"> |
PreparedChildMandate | prepareChildMandate | type PreparedChildMandate = Json<"prepareChildMandate", 200> |
PreparedEip7702Setup | prepareEip7702Setup | type PreparedEip7702Setup = Json<"prepareEip7702Setup", 200> |
PreparedGasPolicy | prepareGasPolicy | type PreparedGasPolicy = Json<"prepareGasPolicy", 200> |
PreparedPolicyRevocation | prepareGasPolicyRevocation | type PreparedPolicyRevocation = Json<"prepareGasPolicyRevocation", 200> |
PrepareGasExecutionInput | prepareGasExecution | type PrepareGasExecutionInput = operations["prepareGasExecution"]["requestBody"]["content"]["application/json"] |
PrepareGasExecutionResponse | prepareGasExecution | type PrepareGasExecutionResponse = operations["prepareGasExecution"]["responses"][200]["content"]["application/json"] |
PrepareGasPolicyInput | prepareGasPolicy | type PrepareGasPolicyInput = Body<"prepareGasPolicy"> |
Project | platform schema | type Project = components["schemas"]["def-1"] |
ProjectAccess | getProjectAccess | type ProjectAccess = Json<"getProjectAccess", 200> |
RotateApiKeyInput | rotateApiKey | type RotateApiKeyInput = operations["rotateApiKey"]["requestBody"]["content"]["application/json"] |
RotateApiKeyResponse | rotateApiKey | type RotateApiKeyResponse = operations["rotateApiKey"]["responses"][201]["content"]["application/json"] |
RotateWebhookSecretResponse | rotateWebhookEndpointSecret | type RotateWebhookSecretResponse = Json<"rotateWebhookEndpointSecret", 200> |
SetWorkspaceOnboardingInput | setWorkspaceOnboarding | type SetWorkspaceOnboardingInput = Body<"setWorkspaceOnboarding"> |
StartEmailChallengeInput | startEmailChallenge | type StartEmailChallengeInput = operations["startEmailChallenge"]["requestBody"]["content"]["application/json"] |
StartEmailChallengeResponse | startEmailChallenge | type StartEmailChallengeResponse = operations["startEmailChallenge"]["responses"][202]["content"]["application/json"] |
SubmitChildMandateInput | submitChildMandate | type SubmitChildMandateInput = Body<"submitChildMandate"> |
SubmitDeveloperRelayerTransactionInput | submitDeveloperRelayerTransaction | type SubmitDeveloperRelayerTransactionInput = Body<"submitDeveloperRelayerTransaction"> |
SubmitEip7702SetupInput | submitEip7702Setup | type SubmitEip7702SetupInput = Body<"submitEip7702Setup"> |
SubmitGasExecutionInput | submitGasExecution | type SubmitGasExecutionInput = operations["submitGasExecution"]["requestBody"]["content"]["application/json"] |
UpdateProjectInput | updateProject | type UpdateProjectInput = operations["updateProject"]["requestBody"]["content"]["application/json"] |
UpdateWorkspaceInput | updateWorkspace | type UpdateWorkspaceInput = Body<"updateWorkspace"> |
VerifyEmailChallengeInput | verifyEmailChallenge | type VerifyEmailChallengeInput = operations["verifyEmailChallenge"]["requestBody"]["content"]["application/json"] |
VerifyEmailChallengeResponse | verifyEmailChallenge | type VerifyEmailChallengeResponse = operations["verifyEmailChallenge"]["responses"][200]["content"]["application/json"] |
WebhookDelivery | listWebhookDeliveries | type WebhookDelivery = Json<"listWebhookDeliveries", 200>["data"][number] |
WebhookEndpoint | listWebhookEndpoints | type WebhookEndpoint = Json<"listWebhookEndpoints", 200>["data"][number] |
WebhookEventEnvelope | platform schema | type WebhookEventEnvelope = components["schemas"]["def-12"] |
Workspace | getWorkspace | type Workspace = Json<"getWorkspace", 200> |
WorkspaceInvitation | listWorkspaceInvitations | type WorkspaceInvitation = Json<"listWorkspaceInvitations", 200>["data"][number] |
WorkspaceMember | listWorkspaceMembers | type WorkspaceMember = Json<"listWorkspaceMembers", 200>["data"][number] |
WorkspaceOnboarding | getWorkspaceOnboarding | type WorkspaceOnboarding = Json<"getWorkspaceOnboarding", 200> |
Types
AccountFamily
type AccountFamily = "safe" | "nexus" | "kernel" | "alchemy" | "nexus7702";
AccountProfileCandidate
type AccountProfileCandidate = {
chainId: string;
account: Address;
profileId: Hex;
lane: AccountProfileLane;
supportsBatch: boolean;
status: AccountProfileStatus;
accountId: string;
installation: AccountProfileInstallation;
ownerDialect: AccountProfileOwnerDialect;
};
AccountProfileInstallation
type AccountProfileInstallation = {
to: Address;
value: string;
data: Hex;
};
AccountProfileLane
type AccountProfileLane = (typeof LANES)[number];
AccountProfileOwnerDialect
type AccountProfileOwnerDialect = (typeof OWNER_DIALECTS)[number];
AccountProfileReader
type AccountProfileReader = Pick<PublicClient, "getChainId" | "getBytecode" | "getStorageAt" | "readContract" | "getBlockNumber">;
AccountProfileStatus
type AccountProfileStatus = (typeof PROFILE_STATUSES)[number];
AccountReader
type AccountReader = Pick<PublicClient, "getChainId" | "getBytecode" | "getStorageAt" | "readContract">;
AgentSigner
interface AgentSigner {
signTypedData(typedData: TypedDataPayload): Promise<Hex>;
}
ApiKeyScope
type ApiKeyScope = ApiKey["scopes"][number];
ApprovalLaunch
type ApprovalLaunch = ApprovalSession & {
approvalUrl: string | null;
launchTokenUnavailable: boolean;
};
ApprovalResult
interface ApprovalResult {
type: "gol.owner-approval.result";
version: 1;
sessionId: string;
requestId: string;
authorityFingerprint: string;
state: ApprovalSession["state"] | "closed";
transactionHash: string | null;
}
CallbackOwnerSigner
interface CallbackOwnerSigner {
readonly identity: Readonly<OwnerSignerIdentity>;
assertIdentity(): Promise<void>;
signPersonalMessage(digest: Hex): Promise<Hex>;
dispose(): void;
}
CallbackOwnerSignerOptions
interface CallbackOwnerSignerOptions {
identity: OwnerSignerIdentity;
currentIdentity: () => OwnerSignerIdentity | null | Promise<OwnerSignerIdentity | null>;
signPersonalMessage: (digest: Hex) => Promise<Hex>;
}
CombinedGasApproval
interface CombinedGasApproval {
mandateId: Hex;
gasPolicyId: Hex;
digest: Hex;
ownerSigningHash: Hex;
summary: {
chainId: number;
account: Address;
core: Address;
projectId: Hex;
agent: Address;
submitter: Address;
recipient: Address;
attester: Address;
feeAsset: Address;
maxPerActionWei: bigint;
maxTotalWei: bigint;
chargeableOutcomes: number;
expiresAt: number;
};
encodeSubmission(ownerWalletSignature: Hex): Hex;
}
CompatibilityResult
type CompatibilityResult = {
status: "compatible";
profile: AccountProfileCandidate;
} | {
status: "unsupported";
reason: string;
} | {
status: "wrong_chain";
reason: string;
} | {
status: "profile_mismatch";
reason: string;
} | {
status: "deprecated";
reason: string;
} | {
status: "batch_required";
reason: string;
};
DeveloperRelayerTransaction
interface DeveloperRelayerTransaction {
chainId: 84532;
type: "eip1559";
from: Address;
to: Address;
data: Hex;
value: 0n;
gas: bigint;
maxFeePerGas: bigint;
}
Eip7702AuthorizationSigner
interface Eip7702AuthorizationSigner {
signAuthorization(request: {
chainId: number;
address: Address;
nonce: number;
}): Promise<{
r: Hex;
s: Hex;
yParity?: number | undefined;
v?: bigint | undefined;
}>;
}
GasActionAuthorizationMessage
interface GasActionAuthorizationMessage {
mandateId: Hex;
actionId: Hex;
deadline: number;
inputHash: Hex;
gasPolicyId: Hex;
maxCharge: bigint;
}
GasExecutionSummary
type GasExecutionSummary = ListGasExecutionsResponse["data"][number];
GasMandateTerms
interface GasMandateTerms {
parentId: Hex;
account: Address;
agent: Address;
accountProfileId: Hex;
installEpoch: bigint;
projectId: Hex;
mode: number;
policyVersion: number;
policyHash: Hex;
validFrom: number;
expiresAt: number;
maxDepth: number;
maxActiveDescendants: number;
approvalExpiresAt: number;
salt: Hex;
}
GasPolicyInput
interface GasPolicyInput {
mandateId: Hex;
account: Address;
projectId: Hex;
accountProfileId: Hex;
installEpoch: Numeric;
feeAsset: Address;
submitter: Address;
recipient: Address;
attester: Address;
maxPerAction: Numeric;
maxTotal: Numeric;
expiresAt: Numeric;
chargeableOutcomes: Numeric;
formulaVersion: Numeric;
nonce: Numeric;
}
GolAccount
interface GolAccount {
id: string;
label: string;
address: `0x${string}`;
type: string;
deploymentStatus: "counterfactual" | "deployed";
chainId: GolChainId;
signerAddress: `0x${string}`;
frozen: boolean;
index: number;
hidden: boolean;
purpose: string;
supersededAddress: string | null;
createdAt: string;
}
GolAccountClient
interface GolAccountClient {
/** GET may materialize a counterfactual Base sibling when chainId is supplied. A new owner gets 404. */
get(input?: {
chainId?: GolChainId;
signal?: AbortSignal;
}): Promise<GolResponse<GolAccount>>;
/** GET /balance is read-only and accepts a bound agent session. */
getBalance(options?: GolAccountRequestOptions): Promise<GolResponse<GolUnifiedBalance>>;
/** Returns an unsigned intent only; the SDK does not sign or relay it. */
createDeployIntent(input?: GolAccountCreateInput, options?: GolAccountRequestOptions): Promise<GolResponse<GolAccountDeployIntent>>;
list(options?: GolAccountRequestOptions): Promise<GolResponse<GolAccountView[]>>;
importToken(accountId: string, input: GolAccountImportTokenInput, options?: GolAccountRequestOptions): Promise<GolResponse<GolImportedToken>>;
removeToken(accountId: string, tokenAddress: `0x${string}`, options?: GolAccountRequestOptions): Promise<GolResponse<void>>;
}
GolAccountClientOptions
interface GolAccountClientOptions {
baseUrl: string;
getSessionToken: () => string | null;
fetch?: typeof fetch;
}
GolAccountCreateInput
interface GolAccountCreateInput {
chainId?: GolChainId;
label?: string;
purpose?: "primary" | "acp_spending";
}
GolAccountDeployIntent
interface GolAccountDeployIntent {
account: GolAccount;
deployUserOp: UnsignedUserOperation;
userOpHash: `0x${string}`;
}
GolAccountImportTokenInput
interface GolAccountImportTokenInput {
chainId: GolChainId;
tokenAddress: `0x${string}`;
}
GolAccountRequestOptions
interface GolAccountRequestOptions {
signal?: AbortSignal;
}
GolAccountRules
interface GolAccountRules {
source: "chain";
accountId: string;
chainId: GolChainId;
account: `0x${string}`;
agentGuard: `0x${string}`;
blockNumber: string;
ownerLaneHook: boolean;
guardInitialized: boolean;
frozen: boolean;
addressSets: "confirmed_candidates";
caps: Array<{
token: GolRulesTokenRef;
limit: number;
spent: number;
remaining: number;
period: GolRulesPeriod;
resetsAt: string;
resetsLabel?: string | null;
}>;
perActionMax: Array<{
token: GolRulesTokenRef;
max: number;
}>;
allowlist: GolRulesAllowlist;
summary: {
weeklyLimit: number;
weeklySpent: number;
allowContracts: number;
denyContracts: number;
allowRecipients: number;
};
}
GolAccountView
interface GolAccountView extends GolAccount {
chains: Array<{
chainId: GolChainId;
accountId: string;
deploymentStatus: GolAccount["deploymentStatus"];
frozen: boolean;
authorityCore: boolean;
}>;
/** Absent while the account's portfolio projection is still building. */
totalFiat?: number;
}
GolActivityEvent
interface GolActivityEvent {
id: string;
timestamp: string;
dateLabel?: string | null;
timeLabel?: string | null;
actor: {
name: string;
kind: string;
address?: string | null;
};
action: string;
amount?: number | null;
token?: Record<string, unknown> | null;
chain: string;
chainId: 8453 | 84532 | null;
status: "executed" | "declined" | "pending";
declineReason?: string | null;
provenance: "onchain_reconciled" | "offchain_only";
txHash?: string | null;
auditNonce?: number | null;
prevHash?: string | null;
hash: string;
delegationId?: string | null;
}
GolActivityPage
interface GolActivityPage {
items: GolActivityEvent[];
pageInfo: {
nextCursor: string | null;
hasMore: boolean;
};
}
GolActivityQuery
interface GolActivityQuery {
accountId?: string;
cursor?: string;
limit?: number;
status?: GolActivityEvent["status"];
delegationId?: string;
from?: string;
to?: string;
signal?: AbortSignal;
}
GolAddDeviceInput
interface GolAddDeviceInput {
device: `0x${string}`;
label?: string;
}
GolAgentAuthClient
interface GolAgentAuthClient {
pair(input: GolAgentPairInput, options?: {
signal?: AbortSignal;
}): Promise<GolResponse<{
code: string;
}>>;
issueSessionNonce(address: Hex, options?: {
signal?: AbortSignal;
}): Promise<GolResponse<{
nonce: Hex;
}>>;
mintSession(input: GolAgentSessionInput, options?: {
signal?: AbortSignal;
}): Promise<GolResponse<GolAgentSession>>;
/** Reads a pairing code's claim state with the local key's possession proof. */
pairingStatus(proof: GolAgentPairingProof, options?: {
signal?: AbortSignal;
}): Promise<GolResponse<GolAgentPairingStatus>>;
}
GolAgentPairingProof
interface GolAgentPairingProof {
code: string;
publicKey: Hex;
signature: Hex;
timestamp: number;
}
GolAgentPairingStatus
type GolAgentPairingStatus = {
state: "pending" | "unavailable";
agent: null;
} | {
state: "claimed";
agent: {
id: string;
address: Hex;
};
};
GolAgentPairInput
interface GolAgentPairInput {
code: string;
publicKey: Hex;
timestamp: number;
signature: Hex;
client?: string;
profile?: string;
}
GolAgentRecord
interface GolAgentRecord {
origin?: "local_key" | "hosted_connection";
oauthClientId?: string | null;
id: string;
address: Hex;
publicKey: Hex;
fingerprint: string;
name: string;
client: string | null;
profile: string | null;
enabled: boolean;
connectedAt: string;
lastSeenAt: string | null;
disconnectedAt: string | null;
}
GolAgentRequest
interface GolAgentRequest {
id: string;
accountId: string;
agentId: string;
nonce: string;
kind: "userop";
calls: GolAgentRequestCall[];
declineReason: GolAgentRequestDeclineReason;
reason: string;
raisedAt: string;
expiresAt: string;
status: GolAgentRequestStatus;
draft?: GolAgentRequestOwnerDraft;
userOpHash?: Hex;
userOpId?: string;
txHash?: Hex;
}
GolAgentRequestCall
interface GolAgentRequestCall {
to: Hex;
data: Hex;
value: string;
chainId: GolChainId;
}
GolAgentRequestEvent
interface GolAgentRequestEvent {
requestId: string;
status: GolAgentRequest["status"];
at: string;
}
GolAgentRequestsClient
interface GolAgentRequestsClient {
raise(input: {
calls: GolAgentRequestCall[];
reason: string;
nonce: string;
}, options?: {
signal?: AbortSignal;
}): Promise<GolResponse<GolAgentRequest>>;
list(options?: {
signal?: AbortSignal;
}): Promise<GolResponse<GolAgentRequest[]>>;
withdraw(id: string, options?: {
signal?: AbortSignal;
}): Promise<GolResponse<GolAgentRequest>>;
}
GolAgentRequestsClientOptions
interface GolAgentRequestsClientOptions extends GolAgentsClientOptions {
agentSessionToken: string;
}
GolAgentsClientOptions
interface GolAgentsClientOptions {
baseUrl: string;
fetch?: typeof fetch;
}
GolAgentSession
interface GolAgentSession {
token: `ags_${string}`;
expiresAt: string;
}
GolAgentSessionInput
interface GolAgentSessionInput {
address: Hex;
nonce: Hex;
signature: Hex;
}
GolAgentsRequestOptions
interface GolAgentsRequestOptions {
accountId?: string;
signal?: AbortSignal;
}
GolAgUiAnswerValue
interface GolAgUiAnswerValue {
sources: unknown[];
viz: unknown[];
assets: unknown[];
swaps: unknown[];
followUps: string[];
session: {
freeLeft: number;
credits: number;
unlimited: boolean;
};
}
GolAgUiBaseEvent
interface GolAgUiBaseEvent {
timestamp?: number;
rawEvent?: unknown;
metadata?: GolAgUiMetadata;
}
GolAgUiCardsValue
interface GolAgUiCardsValue {
round: number;
tool: string;
cards: unknown[];
}
GolAgUiClarifyValue
interface GolAgUiClarifyValue {
text: string;
historyText: string;
clarify: {
id: string;
question: string;
options: {
label: string;
detail: string | null;
}[];
multi: boolean;
allowOther: boolean;
};
steps: unknown[];
elapsedMs: number;
}
GolAgUiContentPart
type GolAgUiContentPart = {
type: string;
[key: string]: unknown;
};
GolAgUiContext
interface GolAgUiContext {
description: string;
value: string;
}
GolAgUiCustomEvent
type GolAgUiCustomEvent = GolAgUiBaseEvent & ({
type: "CUSTOM";
name: "gol.answer";
value: GolAgUiAnswerValue;
} | {
type: "CUSTOM";
name: "gol.cards";
value: GolAgUiCardsValue;
} | {
type: "CUSTOM";
name: "gol.clarify";
value: GolAgUiClarifyValue;
} | {
type: "CUSTOM";
name: "gol.notice";
value: GolAgUiNoticeValue;
});
GolAgUiEvent
type GolAgUiEvent = GolAgUiRunStartedEvent | GolAgUiRunFinishedEvent | GolAgUiRunErrorEvent | GolAgUiStepStartedEvent | GolAgUiStepFinishedEvent | GolAgUiToolCallStartEvent | GolAgUiToolCallArgsEvent | GolAgUiToolCallEndEvent | GolAgUiToolCallResultEvent | GolAgUiThinkingStartEvent | GolAgUiThinkingTextMessageContentEvent | GolAgUiThinkingEndEvent | GolAgUiTextMessageStartEvent | GolAgUiTextMessageContentEvent | GolAgUiTextMessageEndEvent | GolAgUiStateSnapshotEvent | GolAgUiCustomEvent;
GolAgUiMessage
type GolAgUiMessage = {
id: string;
role: "developer" | "system" | "assistant" | "user" | "tool" | "activity" | "reasoning";
content: GolAgUiMessageContent | Record<string, unknown>;
name?: string;
toolCallId?: string;
metadata?: GolAgUiMetadata;
[key: string]: unknown;
};
GolAgUiMessageContent
type GolAgUiMessageContent = string | GolAgUiContentPart[];
GolAgUiMetadata
type GolAgUiMetadata = Record<string, unknown>;
GolAgUiNoticeValue
interface GolAgUiNoticeValue {
message: string;
tools: string[];
}
GolAgUiRunAgentInput
interface GolAgUiRunAgentInput {
threadId: string;
runId: string;
messages: GolAgUiMessage[];
tools?: GolAgUiTool[];
context?: GolAgUiContext[];
state?: unknown;
forwardedProps?: unknown;
}
GolAgUiRunErrorEvent
interface GolAgUiRunErrorEvent extends GolAgUiBaseEvent {
type: "RUN_ERROR";
message: string;
code?: string;
}
GolAgUiRunFinishedEvent
interface GolAgUiRunFinishedEvent extends GolAgUiBaseEvent {
type: "RUN_FINISHED";
threadId: string;
runId: string;
result?: unknown;
}
GolAgUiRunStartedEvent
interface GolAgUiRunStartedEvent extends GolAgUiBaseEvent {
type: "RUN_STARTED";
threadId: string;
runId: string;
}
GolAgUiStateSnapshotEvent
interface GolAgUiStateSnapshotEvent extends GolAgUiBaseEvent {
type: "STATE_SNAPSHOT";
snapshot: unknown;
}
GolAgUiStepFinishedEvent
interface GolAgUiStepFinishedEvent extends GolAgUiBaseEvent {
type: "STEP_FINISHED";
stepName: string;
}
GolAgUiStepStartedEvent
interface GolAgUiStepStartedEvent extends GolAgUiBaseEvent {
type: "STEP_STARTED";
stepName: string;
}
GolAgUiTextMessageContentEvent
interface GolAgUiTextMessageContentEvent extends GolAgUiBaseEvent {
type: "TEXT_MESSAGE_CONTENT";
messageId: string;
delta: string;
}
GolAgUiTextMessageEndEvent
interface GolAgUiTextMessageEndEvent extends GolAgUiBaseEvent {
type: "TEXT_MESSAGE_END";
messageId: string;
}
GolAgUiTextMessageStartEvent
interface GolAgUiTextMessageStartEvent extends GolAgUiBaseEvent {
type: "TEXT_MESSAGE_START";
messageId: string;
role: "assistant";
}
GolAgUiThinkingEndEvent
interface GolAgUiThinkingEndEvent extends GolAgUiBaseEvent {
type: "THINKING_END";
}
GolAgUiThinkingStartEvent
interface GolAgUiThinkingStartEvent extends GolAgUiBaseEvent {
type: "THINKING_START";
title?: string;
}
GolAgUiThinkingTextMessageContentEvent
interface GolAgUiThinkingTextMessageContentEvent extends GolAgUiBaseEvent {
type: "THINKING_TEXT_MESSAGE_CONTENT";
delta: string;
}
GolAgUiTool
interface GolAgUiTool {
name: string;
description: string;
parameters?: unknown;
metadata?: GolAgUiMetadata;
}
GolAgUiToolCallArgsEvent
interface GolAgUiToolCallArgsEvent extends GolAgUiBaseEvent {
type: "TOOL_CALL_ARGS";
toolCallId: string;
delta: string;
}
GolAgUiToolCallEndEvent
interface GolAgUiToolCallEndEvent extends GolAgUiBaseEvent {
type: "TOOL_CALL_END";
toolCallId: string;
}
GolAgUiToolCallResultEvent
interface GolAgUiToolCallResultEvent extends GolAgUiBaseEvent {
type: "TOOL_CALL_RESULT";
messageId: string;
toolCallId: string;
content: string | GolAgUiContentPart[];
role?: "tool";
}
GolAgUiToolCallStartEvent
interface GolAgUiToolCallStartEvent extends GolAgUiBaseEvent {
type: "TOOL_CALL_START";
toolCallId: string;
toolCallName: string;
parentMessageId?: string;
}
GolApiOwnerClient
interface GolApiOwnerClient {
listProviders(query: GolApiQuery): Promise<GolResponse<GolApiProviderList>>;
getProvider(providerId: string, query: GolApiQuery): Promise<GolResponse<GolApiProviderDetail>>;
setProviderBlocked(providerId: string, blocked: boolean, selection: GolApiSelection, signal?: AbortSignal): Promise<GolResponse<{
providerId: string;
endpointId: null;
blocked: boolean;
}>>;
setEndpointBlocked(providerId: string, endpointId: string, blocked: boolean, selection: GolApiSelection, signal?: AbortSignal): Promise<GolResponse<{
providerId: string;
endpointId: string;
blocked: boolean;
}>>;
getBudget(agentId: string, selection: GolApiSelection, signal?: AbortSignal): Promise<GolResponse<GolApiBudget>>;
listMandates(selection: GolApiSelection, signal?: AbortSignal): Promise<GolResponse<GolApiMandate[]>>;
getMandate(agentId: string, selection: GolApiSelection, signal?: AbortSignal): Promise<GolResponse<GolApiMandate>>;
saveMandate(agentId: string, draft: GolApiMandateDraft, signal?: AbortSignal): Promise<GolResponse<GolApiMandateSave>>;
setMandateStatus(agentId: string, status: "active" | "paused", selection: GolApiSelection, signal?: AbortSignal): Promise<GolResponse<{
status: "active" | "paused";
}>>;
buildRevoke(agentId: string, selection: GolApiSelection, signal?: AbortSignal): Promise<GolResponse<GolApiBudgetBuild>>;
relayBuild(buildId: string, signed: {
userOp: GolApiBudgetBuild["userOp"];
userOpHash: string;
}, selection: GolApiSelection, signal?: AbortSignal): Promise<GolResponse<UserOpReceipt>>;
commitBuild(buildId: string, selection: GolApiSelection, signal?: AbortSignal): Promise<GolResponse<GolApiMandate>>;
recordRevoke(buildId: string, selection: GolApiSelection, signal?: AbortSignal): Promise<GolResponse<{
status: "removed";
}>>;
listSpend(selection: GolApiSelection & {
agentId?: string;
cursor?: string;
limit?: number;
signal?: AbortSignal;
}): Promise<GolResponse<GolApiSpendPage>>;
listApprovals(selection: GolApiSelection, signal?: AbortSignal): Promise<GolResponse<GolApiApproval[]>>;
approve(approvalId: string, selection: GolApiSelection, signal?: AbortSignal): Promise<GolResponse<GolApiApproval>>;
decline(approvalId: string, selection: GolApiSelection, signal?: AbortSignal): Promise<GolResponse<GolApiApproval>>;
}
GolApiOwnerClientOptions
interface GolApiOwnerClientOptions {
baseUrl: string;
ownerSessionToken: string;
fetch?: typeof fetch;
}
GolApiQuery
interface GolApiQuery extends GolApiSelection {
q?: string;
asset?: string;
limit?: number;
offset?: number;
signal?: AbortSignal;
}
GolApiSelection
interface GolApiSelection {
accountId: string;
chainId: GolChainId;
}
GolBalanceHistoryQuery
interface GolBalanceHistoryQuery {
range?: GolPriceRange;
accountId?: string;
chainRefs?: readonly GolBaseChainRef[];
signal?: AbortSignal;
}
GolBalanceQuery
interface GolBalanceQuery {
accountId?: string;
focusChainRef?: GolBaseChainRef;
signal?: AbortSignal;
}
GolBaseChainRef
type GolBaseChainRef = "eip155:8453" | "eip155:84532";
GolBrowserSession
interface GolBrowserSession {
sessionToken: string;
accountId: string | null;
signerAddress: string;
privyUserId: string | null;
kind: "browser";
clientName: null;
issuedAt: string;
expiresAt: string;
locked: boolean;
}
GolBrowserSessionClient
interface GolBrowserSessionClient {
exchangePrivyToken(privyToken: string, options?: GolBrowserSessionRequestOptions): Promise<GolResponse<GolBrowserSession>>;
get(sessionToken: string, options?: GolBrowserSessionRequestOptions): Promise<GolResponse<GolBrowserSession>>;
revoke(sessionToken: string, options?: GolBrowserSessionRequestOptions): Promise<GolResponse<void>>;
}
GolBrowserSessionOptions
interface GolBrowserSessionOptions {
baseUrl: string;
fetch?: typeof fetch;
}
GolBrowserSessionRequestOptions
interface GolBrowserSessionRequestOptions {
signal?: AbortSignal;
}
GolChainId
type GolChainId = 8453 | 84532;
GolChainsClient
interface GolChainsClient {
list(options?: {
signal?: AbortSignal;
}): Promise<GolResponse<GolEnabledChain[]>>;
}
GolChainsClientOptions
interface GolChainsClientOptions {
baseUrl: string;
fetch?: typeof fetch;
}
GolClient
interface GolClient {
request<T = unknown>(method: "GET" | "POST" | "PATCH" | "DELETE", path: string, options?: GolRequestOptions): Promise<GolResponse<T>>;
}
GolClientOptions
interface GolClientOptions {
baseUrl: string;
fetch?: typeof fetch;
sessionToken?: string;
}
GolCreateMandate
type GolCreateMandate = Schemas["CreateAgentMandate"];
GolDelegation
type GolDelegation = Schemas["Delegation"];
GolDevice
interface GolDevice {
address: `0x${string}`;
label: string | null;
isCurrentSigner: boolean;
}
GolDeviceBuild
interface GolDeviceBuild {
intentType: "device_add" | "device_remove" | "device_threshold";
userOp: GolDeviceUserOp;
userOpHash: `0x${string}`;
humanSummary: string;
riskReducing: boolean;
instant: boolean;
gasless: boolean;
}
GolDeviceLoginClient
interface GolDeviceLoginClient {
start(input: {
clientName: string;
clientVersion?: string | null;
}, options?: GolDeviceLoginRequestOptions): Promise<GolResponse<GolDeviceLoginStart>>;
poll(requestId: string, pollSecret: string, options?: GolDeviceLoginRequestOptions): Promise<GolResponse<GolDeviceLoginPoll>>;
}
GolDeviceLoginClientOptions
interface GolDeviceLoginClientOptions {
baseUrl: string;
fetch?: typeof fetch;
}
GolDeviceLoginConsent
interface GolDeviceLoginConsent {
clientName: string;
clientVersion: string | null;
userCode: string;
status: GolDeviceLoginStatus;
expiresAt: string;
sessionExpiresAt: string | null;
}
GolDeviceLoginPoll
type GolDeviceLoginPoll = {
status: "authorized";
sessionToken: `sess_${string}`;
accountId: string | null;
signerAddress: `0x${string}`;
} | {
status: Exclude<GolDeviceLoginStatus, "authorized">;
};
GolDeviceLoginRequestOptions
interface GolDeviceLoginRequestOptions {
signal?: AbortSignal;
}
GolDeviceLoginStart
interface GolDeviceLoginStart {
requestId: string;
/** One-time poll credential. Keep it in the local tool; never log or display it. */
pollSecret: string;
userCode: string;
verificationUrl: string;
expiresIn: number;
pollIntervalMs: number;
}
GolDevicesClient
interface GolDevicesClient {
get(options?: {
signal?: AbortSignal;
}): Promise<GolResponse<GolDeviceSet>>;
buildAdd(input: GolAddDeviceInput, options?: {
signal?: AbortSignal;
}): Promise<GolResponse<GolDeviceBuild>>;
buildRemove(device: `0x${string}`, options?: {
signal?: AbortSignal;
}): Promise<GolResponse<GolDeviceBuild>>;
buildThreshold(input: GolDeviceThresholdInput, options?: {
signal?: AbortSignal;
}): Promise<GolResponse<GolDeviceBuild>>;
}
GolDevicesClientOptions
interface GolDevicesClientOptions extends GolOwnerRouteOptions {
accountId: string;
accountAddress: `0x${string}`;
chainId: GolChainId;
}
GolDeviceSet
interface GolDeviceSet {
devices: GolDevice[];
threshold: number;
deviceCount: number;
deployed: boolean;
}
GolDeviceThresholdInput
interface GolDeviceThresholdInput {
threshold: 1;
}
GolDeviceUserOp
type GolDeviceUserOp = UnsignedUserOperation;
GolEnabledChain
interface GolEnabledChain {
chainId: GolChainId;
name: "Base Mainnet" | "Base Sepolia";
testnet: boolean;
}
GolEnvironment
type GolEnvironment = Project["environments"][number]["name"];
GolExpectedGrantAccount
type GolExpectedGrantAccount = GolGrantBuild["account"];
GolExpectedOperationAccount
type GolExpectedOperationAccount = Pick<GolExpectedGrantAccount, "address" | "chainId">;
GolFaucetClient
interface GolFaucetClient {
request(input: GolFaucetRequest, options?: {
signal?: AbortSignal;
}): Promise<GolResponse<GolFaucetView>>;
status(id: string, options?: {
signal?: AbortSignal;
}): Promise<GolResponse<GolFaucetView>>;
}
GolFaucetRequest
interface GolFaucetRequest {
chainId: 84532;
accountId: string;
asset: "tUSDC" | "tUSDT";
idempotencyKey: string;
}
GolFaucetState
type GolFaucetState = "reserved" | "submitting" | "pending" | "indeterminate" | "minted" | "failed";
GolFaucetView
interface GolFaucetView {
id: string;
state: GolFaucetState;
chainId: 84532;
asset: GolFaucetRequest["asset"];
recipient: `0x${string}`;
amountBaseUnits: "10000000";
decimals: 6;
transactionHash: `0x${string}` | null;
}
GolGrantBuild
type GolGrantBuild = Schemas["GrantBuild"];
GolGrantIntent
type GolGrantIntent = Schemas["GrantIntent"];
GolGrantOperationBuild
type GolGrantOperationBuild = Schemas["GrantOperationBuild"];
GolGrantReceipt
type GolGrantReceipt = Schemas["GrantReceipt"];
GolHomeClient
interface GolHomeClient {
getBalance(query?: GolBalanceQuery): Promise<GolResponse<GolUnifiedBalance>>;
getBalanceHistory(query?: GolBalanceHistoryQuery): Promise<GolResponse<GolPortfolioHistory>>;
getActivity(query?: GolActivityQuery): Promise<GolResponse<GolActivityPage>>;
}
GolHomeClientOptions
interface GolHomeClientOptions {
baseUrl: string;
/** The upstream frontend resolves its owner bearer for every request, not at client construction. */
getSessionToken: () => string | null;
fetch?: typeof fetch;
}
GolHostedAgentClient
interface GolHostedAgentClient {
/** Reads this session's agent identity through the public API. Also accepts local agent sessions. */
getSelf(options?: {
signal?: AbortSignal;
}): Promise<GolResponse<GolAgentSessionBinding>>;
getPreparedAction(input: {
projectId: string;
actionId: Hex;
}, options?: {
signal?: AbortSignal;
}): Promise<GolResponse<PrepareGasExecutionResponse>>;
signPreparedAction(input: {
projectId: string;
actionId: Hex;
}, options?: {
signal?: AbortSignal;
}): Promise<GolResponse<{
signature: Hex;
digest: Hex;
}>>;
}
GolImportedToken
interface GolImportedToken {
symbol: string;
name: string;
chain: string;
chainId: GolChainId;
tokenAddress: `0x${string}`;
decimals: number;
amount: number;
fiat: number;
price: number;
change24h: number;
isStablecoin: boolean;
peg: null;
source: "imported";
spendable: boolean;
}
GolMandate
type GolMandate = Schemas["AgentMandate"];
GolMandateBounds
type GolMandateBounds = Schemas["MandateBounds"];
GolMandateCapability
type GolMandateCapability = {
status: "ready" | "unavailable";
chainIds: number[];
reason?: string;
};
GolMandatesOptions
interface GolMandatesOptions {
baseUrl: string;
ownerSessionToken: string;
fetch?: typeof fetch;
}
GolMandatesRequestOptions
interface GolMandatesRequestOptions {
signal?: AbortSignal;
}
GolMandateVersion
type GolMandateVersion = Schemas["MandateVersion"];
GolMoneyBuild
interface GolMoneyBuild {
intentType: "send" | "swap";
userOp: GolMoneyUnsignedUserOp;
userOpHash: Hash;
humanSummary?: string | null;
simulation?: {
willSucceed: boolean;
declineReason?: string | null;
[key: string]: unknown;
} | null;
swapQuote?: {
chainId: GolChainId;
toChainId: GolChainId;
accountAddress: Address;
inputAsset: Address;
outputAsset: Address;
amountInRaw: string;
estimatedOutRaw: string;
minimumOutRaw: string;
};
riskReducing: false;
instant: false;
gasless: boolean;
gasPermit?: {
estimatedFee: number;
[key: string]: unknown;
} | null;
usdtApproval?: unknown;
}
GolMoneyClient
interface GolMoneyClient {
buildSend(intent: GolMoneySendIntent, options?: GolMoneyRequestOptions): Promise<GolResponse<GolMoneyBuild>>;
buildSwap(intent: GolMoneySwapIntent, options?: GolMoneyRequestOptions): Promise<GolResponse<GolMoneyBuild>>;
quoteSwap(intent: GolMoneySwapIntent, options?: GolMoneyRequestOptions): Promise<GolResponse<GolMoneySwapQuote>>;
listSwapTokens(query: {
chainId: GolChainId;
query?: string;
signal?: AbortSignal;
}): Promise<GolResponse<GolMoneySwapToken[]>>;
resolveSwapToken(query: {
chainId: GolChainId;
address: Address;
signal?: AbortSignal;
}): Promise<GolResponse<GolMoneySwapToken>>;
getSwapStatus(query: {
txHash: Hash;
fromChainId: GolChainId;
toChainId: GolChainId;
signal?: AbortSignal;
}): Promise<GolResponse<GolMoneySwapStatus>>;
}
GolMoneyClientOptions
interface GolMoneyClientOptions {
baseUrl: string;
/** Live owner session. Agent sessions are accepted only by send/build and swap/build. */
getSessionToken: () => string | null;
fetch?: typeof fetch;
}
GolMoneyGasMethod
type GolMoneyGasMethod = "native" | "sponsored" | "usdc" | "usdt";
GolMoneyRequestOptions
interface GolMoneyRequestOptions {
signal?: AbortSignal;
}
GolMoneyRouteStep
interface GolMoneyRouteStep {
tool: string;
fromSymbol: string;
toSymbol: string;
fromChainId: GolChainId;
toChainId: GolChainId;
}
GolMoneySendIntent
interface GolMoneySendIntent {
chainId: GolChainId;
transfers: GolMoneyTransfer[];
gasMethod?: GolMoneyGasMethod | null;
}
GolMoneySwapIntent
interface GolMoneySwapIntent {
chainId: GolChainId;
fromToken: GolMoneyTokenRef;
toToken: GolMoneyTokenRef;
amountIn: number;
maxSlippageBps?: number | null;
gasMethod?: GolMoneyGasMethod | null;
}
GolMoneySwapQuote
interface GolMoneySwapQuote {
supported: boolean;
crossChain: false;
amountOut: {
symbol: string;
amount: number;
};
amountOutMin: {
symbol: string;
amount: number;
};
rate: number;
priceImpactBps?: number | null;
route: GolMoneyRouteStep[];
fees: {
token: {
symbol: string;
};
amount: number;
}[];
slippageBps: number;
estimatedDurationSec?: number | null;
unsupportedReason?: string | null;
}
GolMoneySwapStatus
interface GolMoneySwapStatus {
state: "bridging" | "delivered" | "refunded" | "failed";
destTxHash?: Hash | null;
message?: string | null;
explorerUrl?: string | null;
}
GolMoneySwapToken
interface GolMoneySwapToken {
symbol: string;
name: string;
address: Address;
decimals: number;
chainId: GolChainId;
priceUsd?: number | null;
verified: boolean;
logoUri?: string | null;
graduationStatus?: "prototype" | "sentient" | "graduated" | "unknown";
}
GolMoneyTokenRef
interface GolMoneyTokenRef {
assetRef?: string | null;
symbol: string;
chainId?: GolChainId | null;
address?: Address | null;
}
GolMoneyTransfer
interface GolMoneyTransfer {
token: GolMoneyTokenRef;
/** Authoritative base-unit magnitude. */
amountRaw?: string;
/** Display amount; the Platform uses amountRaw when present. */
amount: number;
to: Address;
}
GolMoneyUnsignedUserOp
type GolMoneyUnsignedUserOp = Omit<UnsignedUserOperation, "factory" | "factoryData" | "paymaster" | "paymasterData" | "paymasterVerificationGasLimit" | "paymasterPostOpGasLimit"> & {
factory?: Address | null;
factoryData?: `0x${string}` | null;
paymaster?: Address | null;
paymasterData?: `0x${string}` | null;
paymasterVerificationGasLimit?: string | null;
paymasterPostOpGasLimit?: string | null;
};
GolOnrampClient
interface GolOnrampClient {
methods(options?: {
signal?: AbortSignal;
}): Promise<GolResponse<GolOnrampMethod[]>>;
session(input: GolOnrampSessionInput, options?: {
signal?: AbortSignal;
}): Promise<GolResponse<GolOnrampSession>>;
}
GolOnrampMethod
interface GolOnrampMethod {
chainKey: "8453";
defaultToken: string;
}
GolOnrampSession
interface GolOnrampSession {
widgetUrl: string;
}
GolOnrampSessionInput
interface GolOnrampSessionInput {
chainKey: "8453";
accountId?: string;
}
GolOwnerAgentRequestsClient
interface GolOwnerAgentRequestsClient {
list(options?: GolAgentsRequestOptions): Promise<GolResponse<GolAgentRequest[]>>;
detail(id: string, options?: {
signal?: AbortSignal;
}): Promise<GolResponse<GolAgentRequest>>;
events(id: string, options?: {
signal?: AbortSignal;
}): Promise<GolResponse<GolAgentRequestEvent[]>>;
/** Builds a pinned unsigned owner operation. This does not sign, relay, or execute it. */
approve(id: string, options?: {
signal?: AbortSignal;
}): Promise<GolResponse<GolAgentRequestOwnerDraft>>;
decline(id: string, options?: {
signal?: AbortSignal;
}): Promise<GolResponse<GolAgentRequest>>;
}
GolOwnerAgentRequestsClientOptions
type GolOwnerAgentRequestsClientOptions = GolOwnerAgentsClientOptions;
GolOwnerAgentsClient
interface GolOwnerAgentsClient {
claim(code: string, input: {
name: string;
accountId?: string;
}, options?: {
signal?: AbortSignal;
}): Promise<GolResponse<GolAgentRecord>>;
list(options?: GolAgentsRequestOptions): Promise<GolResponse<GolAgentRecord[]>>;
disable(agentId: string, options?: GolAgentsRequestOptions): Promise<GolResponse<GolAgentRecord>>;
enable(agentId: string, options?: GolAgentsRequestOptions): Promise<GolResponse<GolAgentRecord>>;
rename(agentId: string, name: string, options?: GolAgentsRequestOptions): Promise<GolResponse<GolAgentRecord>>;
disconnect(agentId: string, options?: GolAgentsRequestOptions): Promise<GolResponse<void>>;
}
GolOwnerAgentsClientOptions
interface GolOwnerAgentsClientOptions extends GolAgentsClientOptions {
ownerSessionToken: string;
}
GolOwnerDelegationsClient
type GolOwnerDelegationsClient = ReturnType<typeof createGolOwnerDelegationsClient>;
GolOwnerDeviceLoginClient
interface GolOwnerDeviceLoginClient {
consent(requestId: string, options?: GolDeviceLoginRequestOptions): Promise<GolResponse<GolDeviceLoginConsent>>;
/** Resolves `needsOnboarding: true` when the owner has no account to bind yet. */
claim(requestId: string, input?: {
accountId?: string;
}, options?: GolDeviceLoginRequestOptions): Promise<GolResponse<{
needsOnboarding: boolean;
}>>;
deny(requestId: string, options?: GolDeviceLoginRequestOptions): Promise<GolResponse<void>>;
}
GolOwnerDeviceLoginClientOptions
interface GolOwnerDeviceLoginClientOptions extends GolDeviceLoginClientOptions {
ownerSessionToken: string;
}
GolOwnerHostedAgentClient
interface GolOwnerHostedAgentClient {
listSignatures(agentId: string, options?: {
signal?: AbortSignal;
}): Promise<GolResponse<GolHostedSignatureRecord[]>>;
/** Signing attempts, including those whose provider or terminal result is unknown. */
listSigningAttempts(agentId: string, options?: {
signal?: AbortSignal;
}): Promise<GolResponse<GolHostedSigningAttemptRecord[]>>;
}
GolOwnerMandatesClient
type GolOwnerMandatesClient = ReturnType<typeof createGolOwnerMandatesClient>;
GolOwnerPayload
type GolOwnerPayload = {
primaryType: "CombinedGasApproval";
message: {
mandateId: Hex;
gasPolicyId: Hex;
};
} | {
primaryType: "GasRevocation";
message: {
gasPolicyId: Hex;
nonce: Numeric;
deadline: Numeric;
};
} | {
primaryType: "SafetyAction";
message: {
mandateId: Hex;
action: Numeric;
nonce: Numeric;
deadline: Numeric;
};
};
GolOwnerRouteOptions
interface GolOwnerRouteOptions {
baseUrl: string;
getSessionToken: () => string | null;
fetch?: typeof fetch;
}
GolPortfolioHistory
interface GolPortfolioHistory {
range: GolPriceRange;
points: {
t: number;
value: number;
}[];
asOf: string;
currency: "USD";
beginAt: number;
endAt: number;
interval: number;
status: GolPortfolioStatus;
degradedChains: GolBaseChainRef[];
}
GolPortfolioStatus
type GolPortfolioStatus = "ready" | "building" | "degraded";
GolPriceRange
type GolPriceRange = "1D" | "1W" | "1M" | "3M" | "1Y" | "ALL";
GolRequestOptions
interface GolRequestOptions {
body?: unknown;
query?: Record<string, string>;
signal?: AbortSignal;
accountId?: string;
chainId?: GolChainId;
idempotencyKey?: string;
}
GolResponse
interface GolResponse<T> {
data: T;
requestId: string | null;
}
GolRulesAddressEntry
interface GolRulesAddressEntry {
address: `0x${string}`;
name?: string | null;
chainId?: GolChainId | null;
}
GolRulesAllowlist
interface GolRulesAllowlist {
contracts: GolRulesAddressEntry[];
recipients: GolRulesAddressEntry[];
denied: GolRulesAddressEntry[];
}
GolRulesBuild
interface GolRulesBuild {
intentType: "rules_update";
userOp: GolRulesUserOp;
userOpHash: `0x${string}`;
humanSummary?: string | null;
riskReducing: boolean;
instant: false;
gasless: false;
}
GolRulesClient
interface GolRulesClient {
get(options?: {
signal?: AbortSignal;
}): Promise<GolResponse<GolAccountRules>>;
build(input: GolRulesInput, options?: {
signal?: AbortSignal;
}): Promise<GolResponse<GolRulesBuild>>;
}
GolRulesClientOptions
interface GolRulesClientOptions extends GolOwnerRouteOptions {
accountId: string;
accountAddress: `0x${string}`;
chainId: GolChainId;
}
GolRulesInput
interface GolRulesInput {
caps?: Array<{
token: GolRulesTokenRef;
limit: number;
period: GolRulesPeriod;
}>;
allowlist?: GolRulesAllowlist;
perActionMax?: Array<{
token: GolRulesTokenRef;
max: number;
}>;
}
GolRulesPeriod
type GolRulesPeriod = "day" | "week" | "month";
GolRulesTokenRef
interface GolRulesTokenRef {
symbol: string;
assetRef?: string | null;
chainId?: GolChainId | null;
address?: `0x${string}` | null;
}
GolRulesUserOp
type GolRulesUserOp = Omit<UnsignedUserOperation, "factory" | "factoryData" | "paymaster" | "paymasterData" | "paymasterVerificationGasLimit" | "paymasterPostOpGasLimit"> & {
factory?: `0x${string}` | null;
factoryData?: `0x${string}` | null;
paymaster?: `0x${string}` | null;
paymasterData?: `0x${string}` | null;
paymasterVerificationGasLimit?: string | null;
paymasterPostOpGasLimit?: string | null;
};
GolSignedGrantEnable
type GolSignedGrantEnable = Schemas["SignedGrantEnable"];
GolSignRequest
interface GolSignRequest {
id: string;
status: GolSignRequestStatus;
intent: GolSignRequestIntent;
summary: string;
createdAt: string;
expiresAt: string;
ops: GolSignRequestOp[];
opCount: number;
opId: string | null;
txHash: string | null;
declineReason: string | null;
preparation: GolSignRequestPreparation | null;
}
GolSignRequestIntent
type GolSignRequestIntent = Record<string, unknown> & {
kind: GolSignRequestKind;
};
GolSignRequestKind
type GolSignRequestKind = "send" | "swap" | "device.add" | "device.remove" | "device.threshold" | "policy.update" | "delegation.grant" | "delegation.revoke" | "delegation.freeze" | "delegation.unfreeze" | "agent.request.approve";
GolSignRequestKindInfo
interface GolSignRequestKindInfo {
kind: GolSignRequestKind;
summary: string;
buildRoute: string;
relayRoute: string;
available: boolean;
}
GolSignRequestListRow
interface GolSignRequestListRow {
id: string;
kind: GolSignRequestKind;
summary: string;
status: GolSignRequestStatus;
opCount: number;
createdAt: string;
expiresAt: string;
url: string;
}
GolSignRequestOp
interface GolSignRequestOp {
index: number;
status: "pending" | "signed" | "relayed" | "failed";
opId?: string;
txHash?: string;
error?: string;
}
GolSignRequestOptions
interface GolSignRequestOptions {
signal?: AbortSignal;
}
GolSignRequestParked
interface GolSignRequestParked {
id: string;
url: string;
expiresAt: string;
}
GolSignRequestPreparation
type GolSignRequestPreparation = Omit<PublicPreparation, "intentHash" | "signerAddress" | "account" | "operation"> & {
intentHash: Hash;
signerAddress: Address;
account: Omit<PublicPreparation["account"], "address"> & {
address: Address;
};
operation: Omit<Schemas["SignRequestPreparedOperation"], "userOp" | "userOpHash" | "swapQuote"> & Pick<GolMoneyBuild, "userOp" | "userOpHash" | "swapQuote">;
};
GolSignRequestsClient
interface GolSignRequestsClient {
/** Canonical core v3 gas-policy approval requests. Separate from legacy UserOp sign requests. */
mandates: GolMandateRequestsClient;
/** Parks a typed intent; an agent session is allowed only for an owner grant request. */
create(intent: GolSignRequestIntent, options?: GolSignRequestOptions): Promise<GolResponse<GolSignRequestParked>>;
/** Owner/CLI sessions read scoped requests; agents may poll only their own parked grant. */
get(id: string, options?: GolSignRequestOptions): Promise<GolResponse<GolSignRequest>>;
/** Browser owner session only. Freeze and return the server's immutable unsigned preparation. */
build(id: string, options?: GolSignRequestOptions): Promise<GolResponse<GolSignRequestPreparation>>;
list(options?: GolSignRequestOptions): Promise<GolResponse<GolSignRequestListRow[]>>;
/** Receipt coordinates are assertions; the server independently verifies the execution outcome. */
complete(id: string, input: {
opId: string;
txHash?: string | null;
opIndex?: number;
}, options?: GolSignRequestOptions): Promise<GolResponse<GolSignRequest>>;
reject(id: string, options?: GolSignRequestOptions): Promise<GolResponse<GolSignRequest>>;
kinds(options?: GolSignRequestOptions): Promise<GolResponse<GolSignRequestKindInfo[]>>;
}
GolSignRequestsClientOptions
interface GolSignRequestsClientOptions {
baseUrl: string;
getSessionToken: () => string | null;
fetch?: typeof fetch;
}
GolSignRequestStatus
type GolSignRequestStatus = "pending" | "opened" | "relayed" | "rejected" | "expired" | "failed";
GolTelegramChallenge
type GolTelegramChallenge = {
challengeId: string;
message: string;
expiresAt: string;
};
GolTelegramChallengeInput
type GolTelegramChallengeInput = GolTelegramScope & ({
action: "configure";
botToken: string;
enabled: boolean;
} | {
action: "confirm";
chatId: string;
} | {
action: "preferences";
enabled: boolean;
} | {
action: "status" | "disconnect";
});
GolTelegramClient
interface GolTelegramClient {
challenge(input: GolTelegramChallengeInput, idempotencyKey: string): Promise<GolResponse<GolTelegramChallenge>>;
submit(input: {
challengeId: string;
signature: `0x${string}`;
}, idempotencyKey: string): Promise<GolResponse<GolTelegramView>>;
}
GolTelegramScope
type GolTelegramScope = {
chainId: "8453" | "84532";
account: `0x${string}`;
profileId: `0x${string}`;
vault: `0x${string}`;
owner: `0x${string}`;
};
GolTelegramView
type GolTelegramView = GolTelegramScope & {
status: "disconnected" | "pending_start" | "pending_confirmation" | "connected";
enabled: boolean;
botUsername: string | null;
chatId: string | null;
startLink: string | null;
linkExpiresAt: string | null;
};
GolTokenBalance
interface GolTokenBalance {
symbol: string;
name: string;
chain: string;
chainId: 8453 | 84532;
tokenAddress: string;
decimals: number;
amount: number;
fiat: number;
price: number;
change24h: number;
isStablecoin: boolean;
peg: {
symbol: string;
status: "unknown";
asOf: string;
} | null;
spendable: boolean;
source: "discovered" | "imported";
amountRaw: string;
unrecognized?: boolean;
}
GolTradingAgent
interface GolTradingAgent {
id: string;
owner: string;
name: string;
type?: "custom" | "alert";
status: "running" | "paused";
createdAt: number;
strategy: GolTradingStrategy | null;
params?: {
strategy: GolTradingStrategy;
} | {
wallets: string[];
mints: string[];
minUsd: number;
webhook?: string;
};
stats?: {
realizedUsd: number;
unrealizedUsd: number;
investedUsd: number;
trades: number;
buys: number;
sells: number;
skipped: number;
openPositions: number;
winRate: number | null;
lastEventAt: number | null;
};
followed: string[];
realizedUsd: number;
unrealizedUsd: number;
winRate: number | null;
openPositions: GolTradingPosition[];
fills: GolTradingFill[];
skips: GolTradingSkip[];
events: {
at: number;
kind: "alert" | "webhook";
token: string;
symbol: string | null;
detail: string;
mode: "paper";
}[];
equity: {
t: number;
valueUsd: number;
ts?: number;
usd?: number;
}[];
mode: "paper";
}
GolTradingBacktest
interface GolTradingBacktest {
days: 1 | 3 | 7;
signals: number;
trades: number;
skipped?: number;
wallets?: string[];
usdPerTrade?: number;
buys?: number;
sells?: number;
investedUsd?: number;
unrealizedUsd?: number;
skips: GolTradingSkip[];
realizedUsd: number;
winRate: number | null;
maxDrawdownUsd: number;
equity: {
t: number;
valueUsd: number;
ts?: number;
usd?: number;
}[];
fills: GolTradingFill[];
notes: string[];
coverage: {
source: "gol_tape";
hoursCovered: number;
since: number | null;
until: number | null;
trades: number;
pools: number;
wallets: number;
};
}
GolTradingCompileQuestion
interface GolTradingCompileQuestion {
id?: string;
question: string;
options?: string[];
placeholder?: string;
}
GolTradingCompileResult
interface GolTradingCompileResult {
strategy: GolTradingStrategy;
describe: string[];
notes: string[];
via: "llm" | "rules";
explanation?: string[];
warnings?: string[];
questions?: GolTradingCompileQuestion[];
}
GolTradingFill
interface GolTradingFill {
at: number;
ts?: number;
side: "buy" | "sell";
token: string;
mint?: string;
symbol: string | null;
usd: number;
priceUsd: number;
tokenAmount: number;
pnlUsd: number | null;
reason: string;
signal: GolTradingSignal | null;
mode: "paper";
status?: "filled" | "skipped";
source?: {
wallet: string;
tx: string;
side: "buy" | "sell";
mint: string;
symbol: string | null;
usd: number;
priceUsd: number;
ts: number;
via: "tape";
};
}
GolTradingFilter
type GolTradingFilter = {
field: "liquidityUsd" | "marketCapUsd" | "fdvUsd" | "volume24hUsd" | "ageMin" | "holders" | "top10Pct" | "priceChange5mPct" | "priceChange1hPct" | "priceChange24hPct" | "organicScore" | "buyShare1hPct" | "smartBuyers1h";
op: ">" | ">=" | "<" | "<=" | "between";
value: number | [number, number];
} | {
safety: "no_mint_authority" | "no_freeze_authority" | "verified" | "not_flagged";
};
GolTradingIssue
interface GolTradingIssue {
path: string;
message: string;
}
GolTradingPosition
interface GolTradingPosition {
token: string;
symbol: string | null;
entryUsd: number;
entryPrice: number;
priceNow: number;
quantity: number;
pnlUsd: number;
openedAt: number;
peakPrice: number;
}
GolTradingSignal
interface GolTradingSignal {
id: string;
at: number;
token: string;
symbol: string | null;
wallet: string | null;
tx: string | null;
reason: string;
}
GolTradingSkip
interface GolTradingSkip {
at: number;
token: string;
symbol: string | null;
check: string;
detail: string;
}
GolTradingStrategy
interface GolTradingStrategy {
version: 1;
name: string;
description?: string;
trigger: GolTradingTrigger;
filters: GolTradingFilter[];
action: {
type: "buy";
usd: number;
} | {
type: "sell";
pct: number;
} | {
type: "alert";
} | {
type: "webhook";
url: string;
};
exits?: {
takeProfitPct?: number;
stopLossPct?: number;
trailingPct?: number;
maxHoldMin?: number;
sellWhen?: "followed_sells";
};
limits: {
maxOpenPositions: number;
maxPerTokenUsd: number;
dailyBudgetUsd: number;
cooldownMin: number;
maxTradesPerDay: number;
};
}
GolTradingTemplate
interface GolTradingTemplate {
id: string;
title: string;
oneLine: string;
line?: string;
risk: string;
strategy: GolTradingStrategy;
}
GolTradingTrigger
type GolTradingTrigger = {
type: "wallet_trade";
wallets: GolTradingWallets;
side: "buy" | "sell" | "any";
minUsd: number;
} | {
type: "confluence";
wallets: GolTradingWallets;
minWallets: number;
windowMin: number;
side: "buy" | "sell";
} | {
type: "new_token";
source: "launch" | "graduation" | "any";
} | {
type: "price";
mint: string;
op: "above" | "below" | "change_pct";
value: number;
windowMin?: number;
} | {
type: "schedule";
every: "15m" | "1h" | "4h" | "1d" | "1w";
mint: string;
} | {
type: "lp_event";
pools?: string[];
mints?: string[];
event: "exodus" | "large_remove" | "large_add";
minUsd: number;
};
GolTradingValidation
type GolTradingValidation = {
ok: true;
strategy: GolTradingStrategy;
} | {
ok: false;
errors: string[];
issues: GolTradingIssue[];
};
GolTradingWallets
type GolTradingWallets = {
list: string[];
} | {
smartTraders: {
top: number;
days: 1 | 3 | 7;
};
};
GolUnifiedBalance
interface GolUnifiedBalance {
totalFiat: number;
change24h: number;
stablecoinFiat: number;
holdings: GolValuedHolding[];
tokens: GolTokenBalance[];
status: GolPortfolioStatus;
asOf: string;
}
GolUserOpsClient
interface GolUserOpsClient {
/** Submit an operation already signed by the owner. The platform verifies authority and relays it. */
submit(signed: SignedOwnerOp, options?: GolUserOpsRequestOptions): Promise<GolResponse<UserOpReceipt>>;
get(id: string, options?: GolUserOpsRequestOptions): Promise<GolResponse<UserOpReceipt>>;
getByHash(chainId: GolChainId, userOpHash: Hex, options?: GolUserOpsRequestOptions): Promise<GolResponse<UserOpReceipt>>;
}
GolUserOpsClientOptions
interface GolUserOpsClientOptions {
baseUrl: string;
getSessionToken: () => string | null;
fetch?: typeof fetch;
}
GolUserOpsRequestOptions
interface GolUserOpsRequestOptions {
signal?: AbortSignal;
}
GolValuedHolding
interface GolValuedHolding {
assetRef: `${GolBaseChainRef}/${"erc20" | "slip44"}:${string}`;
symbol: string;
amount: number;
priceUsd: number;
fiat: number;
priceAdvisory: boolean;
}
GolYieldAgentAllocation
interface GolYieldAgentAllocation {
venueId: string;
usd: number;
}
GolYieldAgentAllocationView
interface GolYieldAgentAllocationView {
venueId: string;
label: string;
usd: number;
apyPct: number;
}
GolYieldAgentAskEvent
type GolYieldAgentAskEvent = {
event: "step";
data: {
tool: string;
args: unknown;
ok: boolean;
ms: number;
summary: string;
};
} | {
event: "answer";
data: {
text: string;
};
} | {
event: "done";
data: Record<string, never>;
} | {
event: "error";
data: {
message: string;
};
};
GolYieldAgentAskInput
interface GolYieldAgentAskInput {
question: string;
owner?: string;
chain?: GolYieldAgentChain;
}
GolYieldAgentAuthAction
type GolYieldAgentAuthAction = "create" | "pause" | "resume" | "delete" | "tick" | "auto-enable" | "auto-disable" | "auto-agent" | "listing" | "copy";
GolYieldAgentAuthEnvelope
interface GolYieldAgentAuthEnvelope {
owner: string;
issuedAt: number;
signature: string;
}
GolYieldAgentAuthMessageInput
interface GolYieldAgentAuthMessageInput {
action: GolYieldAgentAuthAction;
target: string;
owner: string;
issuedAt: number;
}
GolYieldAgentAutoConfig
interface GolYieldAgentAutoConfig {
on: boolean;
quorumId: string | null;
policyId: string | null;
missing: string[];
problem: string | null;
}
GolYieldAgentAutoEnableInput
interface GolYieldAgentAutoEnableInput {
auth: GolYieldAgentAuthEnvelope;
privyWalletId: string;
perMoveUsd: number;
dailyUsd: number;
days: number;
}
GolYieldAgentAutoGrant
interface GolYieldAgentAutoGrant {
wallet: string;
privyWalletId: string;
perMoveUsd: number;
dailyUsd: number;
expiresAt: number;
enabled: boolean;
}
GolYieldAgentAutoRun
interface GolYieldAgentAutoRun {
at: number;
agentId: string;
description: string;
signature: string;
outcome: string;
reason: string;
}
GolYieldAgentAutoStatus
interface GolYieldAgentAutoStatus {
grant: GolYieldAgentAutoGrant | null;
spentTodayUsd: number;
runs: GolYieldAgentAutoRun[];
}
GolYieldAgentBacktestResult
interface GolYieldAgentBacktestResult {
days: number;
from: number;
to: number;
startUsd: number;
endUsd: number;
returnPct: number;
apyPct: number;
moves: number;
events: {
t: number;
kind: GolYieldAgentDecisionKind;
summary: string;
target: GolYieldAgentAllocation[];
}[];
series: {
t: number;
valueUsd: number;
}[];
benchmarks: {
name: string;
endUsd: number;
apyPct: number;
}[];
coverage: {
venues: number;
missing: string[];
note: string;
};
}
GolYieldAgentCandidate
interface GolYieldAgentCandidate {
venueId: string;
label: string;
scorePct: number;
apyPct: number;
tvlUsd: number;
}
GolYieldAgentChain
type GolYieldAgentChain = "solana" | "base";
GolYieldAgentChainInfo
interface GolYieldAgentChainInfo {
id: GolYieldAgentChain;
name: string;
nativeSymbol: string;
executable: boolean;
}
GolYieldAgentChainsResponse
interface GolYieldAgentChainsResponse {
chains: GolYieldAgentChainInfo[];
}
GolYieldAgentCheck
interface GolYieldAgentCheck {
name: string;
ok: boolean;
detail: string;
}
GolYieldAgentCompileInput
interface GolYieldAgentCompileInput {
text: string;
chain?: GolYieldAgentChain;
}
GolYieldAgentCompileResult
type GolYieldAgentCompileResult = {
ok: true;
strategy: GolYieldAgentStrategy;
describe: string[];
notes: string[];
via: "llm" | "rules";
} | {
ok: false;
issues: GolYieldAgentStrategyIssue[];
};
GolYieldAgentCopyInput
interface GolYieldAgentCopyInput {
auth: GolYieldAgentAuthEnvelope;
mode?: GolYieldAgentMode;
}
GolYieldAgentCreateInput
interface GolYieldAgentCreateInput {
auth: GolYieldAgentAuthEnvelope;
strategy: GolYieldAgentStrategy;
name?: string;
mode: GolYieldAgentMode;
}
GolYieldAgentDecision
interface GolYieldAgentDecision {
kind: GolYieldAgentDecisionKind;
target: GolYieldAgentAllocation[];
summary: string;
checks: GolYieldAgentCheck[];
candidates: GolYieldAgentCandidate[];
excluded: GolYieldAgentExclusion[];
currentScorePct: number;
targetScorePct: number;
gainUsdPerYear: number;
costUsd: number;
}
GolYieldAgentDecisionKind
type GolYieldAgentDecisionKind = "enter" | "rebalance" | "exit" | "hold";
GolYieldAgentDetail
interface GolYieldAgentDetail extends GolYieldAgentSummary {
series: {
t: number;
valueUsd: number;
}[];
basis: Record<string, number>;
lastFull: GolYieldAgentDecision | null;
pending: GolYieldAgentPreparedPlan | null;
}
GolYieldAgentEvent
interface GolYieldAgentEvent {
id: string;
agentId: string;
agentName: string;
at: number;
kind: GolYieldAgentDecisionKind | "error" | "exec" | "created" | "paused" | "resumed";
summary: string;
checks: GolYieldAgentCheck[];
valueUsd: number;
target: GolYieldAgentAllocation[];
txs: GolYieldAgentTxRecord[];
mode: GolYieldAgentMode;
}
GolYieldAgentExclusion
interface GolYieldAgentExclusion {
venueId: string;
label: string;
reason: string;
}
GolYieldAgentExecutionOp
interface GolYieldAgentExecutionOp {
kind: "deposit" | "withdraw";
venueId: string;
amount: number | "max";
}
GolYieldAgentExecutionStatus
type GolYieldAgentExecutionStatus = "pending" | "confirmed" | "failed";
GolYieldAgentExecutionStatusResponse
interface GolYieldAgentExecutionStatusResponse {
status: GolYieldAgentExecutionStatus;
error: string | null;
}
GolYieldAgentFeedResponse
interface GolYieldAgentFeedResponse {
events: GolYieldAgentEvent[];
}
GolYieldAgentFilterField
type GolYieldAgentFilterField = "apyPct" | "apyBasePct" | "apyRewardPct" | "tvlUsd" | "apy7dPct" | "apy30dPct" | "apyStdev30d" | "tvlChange1dPct" | "tvlChange7dPct" | "historyDays";
GolYieldAgentHistoryPoint
interface GolYieldAgentHistoryPoint {
t: number;
apyPct: number;
apyBasePct: number;
tvlUsd: number;
}
GolYieldAgentListing
interface GolYieldAgentListing {
priceUsd: number;
pitch: string;
profitSharePct: number;
}
GolYieldAgentListingInput
interface GolYieldAgentListingInput {
auth: GolYieldAgentAuthEnvelope;
priceUsd: number | null;
pitch: string | null;
profitSharePct: number | null;
}
GolYieldAgentListResponse
interface GolYieldAgentListResponse {
agents: GolYieldAgentSummary[];
}
GolYieldAgentMarketResponse
interface GolYieldAgentMarketResponse {
listings: GolYieldAgentSummary[];
}
GolYieldAgentMode
type GolYieldAgentMode = "paper" | "live";
GolYieldAgentPlanExecutionResponse
interface GolYieldAgentPlanExecutionResponse {
plan: GolYieldAgentPreparedPlan | null;
decision: GolYieldAgentDecision;
}
GolYieldAgentPreparedPlan
interface GolYieldAgentPreparedPlan {
createdAt: number;
decisionSummary: string;
steps: GolYieldAgentExecutionOp[];
labels: string[];
}
GolYieldAgentPreparedTx
interface GolYieldAgentPreparedTx {
op: GolYieldAgentExecutionOp;
description: string;
tx: string;
check: {
ok: true;
feePayer: string;
programs: string[];
signers: number;
};
simulation: {
ok: boolean;
error: string | null;
unitsConsumed: number | null;
} | null;
}
GolYieldAgentPrepareExecutionInput
interface GolYieldAgentPrepareExecutionInput {
chain?: GolYieldAgentChain;
owner: string;
op: GolYieldAgentExecutionOp;
}
GolYieldAgentPrepareExecutionResponse
interface GolYieldAgentPrepareExecutionResponse {
prepared: GolYieldAgentPreparedTx;
}
GolYieldAgentPreviewResponse
interface GolYieldAgentPreviewResponse {
asOf: number;
decision: GolYieldAgentDecision;
}
GolYieldAgentResponse
interface GolYieldAgentResponse {
agent: GolYieldAgentDetail;
}
GolYieldAgentsClient
interface GolYieldAgentsClient {
getChains(request?: GolYieldAgentsRequestOptions): Promise<GolResponse<GolYieldAgentChainsResponse>>;
getVenues(input?: {
chain?: GolYieldAgentChain;
}, request?: GolYieldAgentsRequestOptions): Promise<GolResponse<GolYieldAgentVenuesResponse>>;
getVenueHistory(input: {
chain?: GolYieldAgentChain;
venueId: string;
days: number;
}, request?: GolYieldAgentsRequestOptions): Promise<GolResponse<GolYieldAgentVenueHistoryResponse>>;
getTemplates(request?: GolYieldAgentsRequestOptions): Promise<GolResponse<GolYieldAgentTemplatesResponse>>;
compileStrategy(input: GolYieldAgentCompileInput, idempotencyKey: string, request?: GolYieldAgentsRequestOptions): Promise<GolResponse<GolYieldAgentCompileResult>>;
validateStrategy(input: {
strategy: GolYieldAgentStrategy;
}, idempotencyKey: string, request?: GolYieldAgentsRequestOptions): Promise<GolResponse<GolYieldAgentValidationResult>>;
previewStrategy(input: {
strategy: GolYieldAgentStrategy;
}, idempotencyKey: string, request?: GolYieldAgentsRequestOptions): Promise<GolResponse<GolYieldAgentPreviewResponse>>;
backtestStrategy(input: {
strategy: GolYieldAgentStrategy;
days: 7 | 30 | 90;
}, idempotencyKey: string, request?: GolYieldAgentsRequestOptions): Promise<GolResponse<GolYieldAgentBacktestResult>>;
getAgents(input?: {
owner?: string;
}, request?: GolYieldAgentsRequestOptions): Promise<GolResponse<GolYieldAgentListResponse>>;
getAgentBoard(request?: GolYieldAgentsRequestOptions): Promise<GolResponse<GolYieldAgentListResponse>>;
getAgentStats(request?: GolYieldAgentsRequestOptions): Promise<GolResponse<GolYieldAgentStats>>;
getAgentFeed(input?: {
limit?: number;
}, request?: GolYieldAgentsRequestOptions): Promise<GolResponse<GolYieldAgentFeedResponse>>;
getAgent(id: string, request?: GolYieldAgentsRequestOptions): Promise<GolResponse<GolYieldAgentResponse>>;
getAgentEvents(id: string, input?: {
limit?: number;
}, request?: GolYieldAgentsRequestOptions): Promise<GolResponse<GolYieldAgentFeedResponse>>;
createAgent(input: GolYieldAgentCreateInput, idempotencyKey: string, request?: GolYieldAgentsRequestOptions): Promise<GolResponse<GolYieldAgentResponse>>;
pauseAgent(id: string, input: {
auth: GolYieldAgentAuthEnvelope;
}, idempotencyKey: string, request?: GolYieldAgentsRequestOptions): Promise<GolResponse<GolYieldAgentResponse>>;
resumeAgent(id: string, input: {
auth: GolYieldAgentAuthEnvelope;
}, idempotencyKey: string, request?: GolYieldAgentsRequestOptions): Promise<GolResponse<GolYieldAgentResponse>>;
deleteAgent(id: string, input: {
auth: GolYieldAgentAuthEnvelope;
}, idempotencyKey: string, request?: GolYieldAgentsRequestOptions): Promise<GolResponse<{
ok: true;
}>>;
tickAgent(id: string, input: {
auth: GolYieldAgentAuthEnvelope;
}, idempotencyKey: string, request?: GolYieldAgentsRequestOptions): Promise<GolResponse<GolYieldAgentTickResponse>>;
setAgentListing(id: string, input: GolYieldAgentListingInput, idempotencyKey: string, request?: GolYieldAgentsRequestOptions): Promise<GolResponse<GolYieldAgentResponse>>;
copyAgent(id: string, input: GolYieldAgentCopyInput, idempotencyKey: string, request?: GolYieldAgentsRequestOptions): Promise<GolResponse<GolYieldAgentResponse>>;
getMarket(request?: GolYieldAgentsRequestOptions): Promise<GolResponse<GolYieldAgentMarketResponse>>;
getWallet(input: {
chain?: GolYieldAgentChain;
owner: string;
}, request?: GolYieldAgentsRequestOptions): Promise<GolResponse<GolYieldAgentWalletView>>;
prepareExecution(input: GolYieldAgentPrepareExecutionInput, idempotencyKey: string, request?: GolYieldAgentsRequestOptions): Promise<GolResponse<GolYieldAgentPrepareExecutionResponse>>;
planExecution(input: {
agentId: string;
}, idempotencyKey: string, request?: GolYieldAgentsRequestOptions): Promise<GolResponse<GolYieldAgentPlanExecutionResponse>>;
sendExecution(input: GolYieldAgentSendExecutionInput, idempotencyKey: string, request?: GolYieldAgentsRequestOptions): Promise<GolResponse<GolYieldAgentSendExecutionResponse>>;
getExecutionStatus(input: {
chain?: GolYieldAgentChain;
signature: string;
}, request?: GolYieldAgentsRequestOptions): Promise<GolResponse<GolYieldAgentExecutionStatusResponse>>;
getAutoConfig(request?: GolYieldAgentsRequestOptions): Promise<GolResponse<GolYieldAgentAutoConfig>>;
getAutoStatus(owner: string, request?: GolYieldAgentsRequestOptions): Promise<GolResponse<GolYieldAgentAutoStatus>>;
enableAuto(input: GolYieldAgentAutoEnableInput, idempotencyKey: string, request?: GolYieldAgentsRequestOptions): Promise<GolResponse<{
grant: GolYieldAgentAutoGrant;
}>>;
disableAuto(input: {
auth: GolYieldAgentAuthEnvelope;
}, idempotencyKey: string, request?: GolYieldAgentsRequestOptions): Promise<GolResponse<{
ok: true;
}>>;
setAgentAuto(id: string, input: {
auth: GolYieldAgentAuthEnvelope;
on: boolean;
}, idempotencyKey: string, request?: GolYieldAgentsRequestOptions): Promise<GolResponse<GolYieldAgentResponse>>;
ask(input: GolYieldAgentAskInput, idempotencyKey: string, request?: GolYieldAgentsRequestOptions): Promise<Response>;
}
GolYieldAgentSendExecutionInput
interface GolYieldAgentSendExecutionInput {
chain?: GolYieldAgentChain;
owner: string;
signedTx: string;
agentId?: string;
op?: GolYieldAgentExecutionOp;
}
GolYieldAgentSendExecutionResponse
interface GolYieldAgentSendExecutionResponse {
signature: string;
explorer: string;
status: GolYieldAgentExecutionStatus;
error: string | null;
}
GolYieldAgentsRequestOptions
interface GolYieldAgentsRequestOptions {
signal?: AbortSignal;
}
GolYieldAgentStats
interface GolYieldAgentStats {
running: number;
live: number;
paper: number;
decisions24h: number;
moves24h: number;
earnedUsd: number;
tvlUsd: number;
bestVenue: {
label: string;
apyPct: number;
} | null;
}
GolYieldAgentStatus
type GolYieldAgentStatus = "running" | "paused";
GolYieldAgentsTradingClient
interface GolYieldAgentsTradingClient {
compileStrategy(input: {
text: string;
answers?: Record<string, string> | string[];
}, idempotencyKey: string, options?: {
signal?: AbortSignal;
}): Promise<GolResponse<GolTradingCompileResult>>;
validateStrategy(strategy: unknown, idempotencyKey: string, options?: {
signal?: AbortSignal;
}): Promise<GolResponse<GolTradingValidation>>;
getTemplates(options?: {
signal?: AbortSignal;
}): Promise<GolResponse<{
templates: GolTradingTemplate[];
}>>;
backtestStrategy(input: {
strategy: GolTradingStrategy;
days: 1 | 3 | 7;
}, idempotencyKey: string, options?: {
signal?: AbortSignal;
}): Promise<GolResponse<GolTradingBacktest>>;
createAgent(input: {
auth: GolYieldAgentAuthEnvelope;
name?: string;
strategy: GolTradingStrategy;
} | {
auth: GolYieldAgentAuthEnvelope;
type: "custom";
name?: string;
mode: "paper";
params: {
strategy: GolTradingStrategy;
};
} | {
auth: GolYieldAgentAuthEnvelope;
type: "alert";
name?: string;
params: {
wallets?: string[];
mints?: string[];
minUsd?: number;
webhook?: string;
};
}, idempotencyKey: string, options?: {
signal?: AbortSignal;
}): Promise<GolResponse<{
agent: GolTradingAgent;
}>>;
getAgents(input?: {
owner?: string;
}, options?: {
signal?: AbortSignal;
}): Promise<GolResponse<{
agents: GolTradingAgent[];
}>>;
getAgent(id: string, options?: {
signal?: AbortSignal;
}): Promise<GolResponse<{
agent: GolTradingAgent;
}>>;
pauseAgent(id: string, auth: GolYieldAgentAuthEnvelope, idempotencyKey: string, options?: {
signal?: AbortSignal;
}): Promise<GolResponse<{
agent: GolTradingAgent;
}>>;
resumeAgent(id: string, auth: GolYieldAgentAuthEnvelope, idempotencyKey: string, options?: {
signal?: AbortSignal;
}): Promise<GolResponse<{
agent: GolTradingAgent;
}>>;
deleteAgent(id: string, auth: GolYieldAgentAuthEnvelope, idempotencyKey: string, options?: {
signal?: AbortSignal;
}): Promise<GolResponse<{
ok: true;
}>>;
}
GolYieldAgentStrategy
interface GolYieldAgentStrategy {
version: 1;
name: string;
universe: {
chain: GolYieldAgentChain;
assets: string[];
protocols?: string[];
};
trigger: {
type: "schedule";
every: "1h" | "4h" | "12h" | "1d";
} | {
type: "apy_spread";
minSpreadPct: number;
sustainHours: number;
} | {
type: "apy_below";
pct: number;
};
filters: {
field: GolYieldAgentFilterField;
op: ">" | ">=" | "<" | "<=" | "between";
value: number | [number, number];
}[];
safety: ("executable" | "base_apy_only" | "no_apy_spike" | "proven_history")[];
action: {
type: "allocate";
mode: "best" | "split";
maxVenues: number;
maxPerVenuePct: number;
};
exits: {
minApyPct?: number;
tvlDrop24hPct?: number;
};
limits: {
budgetUsd: number;
minHoldHours: number;
maxMovesPerWeek: number;
breakevenDays: number;
};
}
GolYieldAgentStrategyIssue
interface GolYieldAgentStrategyIssue {
path: string;
message: string;
}
GolYieldAgentSummary
interface GolYieldAgentSummary {
id: string;
chain: GolYieldAgentChain;
name: string;
owner: string | null;
mode: GolYieldAgentMode;
status: GolYieldAgentStatus;
createdAt: number;
strategy: GolYieldAgentStrategy;
describe: string[];
startUsd: number;
valueUsd: number;
pnlUsd: number;
returnPct: number;
realizedApyPct: number;
earnedUsd: number;
series: {
t: number;
valueUsd: number;
}[];
currentApyPct: number;
allocation: GolYieldAgentAllocationView[];
idleUsd: number;
lastDecision: {
at: number;
kind: GolYieldAgentDecisionKind;
summary: string;
} | null;
moves: number;
decisions: number;
autoExecute: boolean;
listing: GolYieldAgentListing | null;
copiedFrom: string | null;
copies: number;
}
GolYieldAgentTemplate
interface GolYieldAgentTemplate {
id: string;
name: string;
pitch: string;
text: string;
strategy: GolYieldAgentStrategy;
describe: string[];
}
GolYieldAgentTemplatesResponse
interface GolYieldAgentTemplatesResponse {
templates: GolYieldAgentTemplate[];
}
GolYieldAgentTickResponse
interface GolYieldAgentTickResponse extends GolYieldAgentResponse {
event: GolYieldAgentEvent;
}
GolYieldAgentTxRecord
interface GolYieldAgentTxRecord {
signature: string;
explorer: string;
description: string;
status: GolYieldAgentExecutionStatus;
error: string | null;
}
GolYieldAgentValidationResult
type GolYieldAgentValidationResult = {
ok: true;
strategy: GolYieldAgentStrategy;
describe: string[];
} | {
ok: false;
issues: GolYieldAgentStrategyIssue[];
};
GolYieldAgentVenue
interface GolYieldAgentVenue {
id: string;
chain: GolYieldAgentChain;
protocol: string;
protocolName: string;
market: string | null;
asset: string;
assetAddress: string;
assetDecimals: number;
apyPct: number;
apyBasePct: number;
apyRewardPct: number;
tvlUsd: number;
apy7dPct: number | null;
apy30dPct: number | null;
apyStdev30d: number | null;
tvlChange1dPct: number | null;
tvlChange7dPct: number | null;
historyDays: number;
executable: boolean;
llamaPool: string | null;
ref: Record<string, string>;
url: string | null;
source: string;
}
GolYieldAgentVenueHistoryResponse
interface GolYieldAgentVenueHistoryResponse {
venueId: string;
points: GolYieldAgentHistoryPoint[];
}
GolYieldAgentVenuesResponse
interface GolYieldAgentVenuesResponse {
chain: GolYieldAgentChain;
asOf: number;
venues: GolYieldAgentVenue[];
problems: string[];
}
GolYieldAgentWalletView
interface GolYieldAgentWalletView {
chain: GolYieldAgentChain;
owner: string;
balances: {
asset: string;
address: string;
amount: number;
usd: number;
}[];
nativeBalance: number;
positions: {
venueId: string;
asset: string;
amount: number;
usd: number;
}[];
problems: string[];
}
GolYieldComparison
type GolYieldComparison = {
decisionIndex: number;
status: "pending" | "refused" | "reverted" | "unavailable";
} | {
decisionIndex: number;
status: "executed";
txHash: `0x${string}`;
blockNumber: string;
blockHash: `0x${string}`;
assetsInDelta: string;
sharesDelta: string;
valueDeltaAssets: string;
favourable: boolean;
};
GolYieldCompatibility
type GolYieldCompatibility = {
candidates: GolYieldProfileCandidate[];
refusals: {
profileId: `0x${string}`;
status: string;
reason: string;
}[];
};
GolYieldDecisionRecord
type GolYieldDecisionRecord = {
index: number;
prevHash: string;
body: Record<string, unknown>;
hash: string;
signature: string;
mandateId: `0x${string}` | null;
legs: number;
};
GolYieldMandateDraft
type GolYieldMandateDraft = {
draftId: string;
mandateId: `0x${string}`;
policy: `0x${string}`;
ownerDigest: `0x${string}`;
ownerDomain: {
name: string;
version: string;
chainId: string;
verifyingContract: `0x${string}`;
};
terms: Record<string, string>;
};
GolYieldOnboardingState
type GolYieldOnboardingState = {
account: `0x${string}`;
profileId: `0x${string}`;
enforcementInstalled: boolean;
};
GolYieldOwnerDepositReceipt
type GolYieldOwnerDepositReceipt = {
kind: "owner_deposit";
account: Address;
vault: Address;
asset: Address;
amount: string;
shares: string;
userOpHash: Hex;
txHash: Hex;
};
GolYieldPositionSnapshot
interface GolYieldPositionSnapshot {
blockNumber: string;
blockHash: `0x${string}`;
asset: `0x${string}`;
idleAssets: string;
positions: {
venueId: string;
vault: `0x${string}`;
shares: string;
valueAssets: string;
}[];
}
GolYieldPreparedOwnerOperation
type GolYieldPreparedOwnerOperation = {
userOpHash: `0x${string}`;
userOp: Record<string, string>;
calls: {
to: `0x${string}`;
value: string;
data: `0x${string}`;
}[];
};
GolYieldProfileCandidate
type GolYieldProfileCandidate = {
chainId: "8453" | "84532";
account: `0x${string}`;
profileId: `0x${string}`;
lane: string;
supportsBatch: boolean;
status: "candidate" | "active" | "deprecated";
accountId: string;
installation: {
to: `0x${string}`;
value: string;
data: `0x${string}`;
};
ownerDialect: string;
};
GolYieldSafeCodeIdentityV1
type GolYieldSafeCodeIdentityV1 = {
address: Address;
codeHash: Hex;
};
GolYieldSafeCodeReaderV1
interface GolYieldSafeCodeReaderV1 {
getBlock(input: {
chainId: 8453;
blockNumber: bigint;
}): Promise<{
hash: Hex;
timestamp: number;
}>;
getCode(input: {
chainId: 8453;
address: Address;
blockNumber: bigint;
}): Promise<Hex>;
}
GolYieldSafeCodeReaderV2
interface GolYieldSafeCodeReaderV2 {
getBlock(input: {
chainId: 8453;
blockNumber: bigint;
}): Promise<{
hash: Hex;
timestamp: number;
}>;
getCode(input: {
chainId: 8453;
address: Address;
blockNumber?: bigint;
}): Promise<Hex>;
getStorageAt(input: {
chainId: 8453;
address: Address;
slot: Hex;
}): Promise<Hex | null>;
readContract(input: {
chainId: 8453;
address: Address;
abi: readonly unknown[];
functionName: string;
args?: readonly unknown[];
}): Promise<unknown>;
}
GolYieldSafeFundingProofV1
type GolYieldSafeFundingProofV1 = {
version: 1;
quoteId: string;
transactionHash: Hex;
blockNumber: string;
blockHash: Hex;
amount: string;
};
GolYieldSafeFundingProofV2
type GolYieldSafeFundingProofV2 = {
version: 2;
quoteId: string;
transactionHash: Hex;
blockNumber: string;
blockHash: Hex;
amount: string;
};
GolYieldSafeFundingTransactionV1
type GolYieldSafeFundingTransactionV1 = {
chainId: 8453;
from: Address;
to: Address;
value: 0n;
data: Hex;
};
GolYieldSafeManifestV1
type GolYieldSafeManifestV1 = {
version: 1;
chainId: 8453;
asset: Address;
factory: GolYieldSafeCodeIdentityV1;
singleton: GolYieldSafeCodeIdentityV1;
fallbackHandler: GolYieldSafeCodeIdentityV1;
setupHelper: GolYieldSafeCodeIdentityV1;
module: GolYieldSafeCodeIdentityV1;
agent: Address;
maxAssetsPerAction: string;
minSessionDurationSeconds: number;
maxSessionDurationSeconds: number;
minSessionRemainingSeconds: number;
proxyCreationCode: Hex;
proxyCreationCodeHash: Hex;
proxyRuntimeCodeHash: Hex;
admittedVaults: readonly Address[];
quoteMaxAgeSeconds: number;
};
GolYieldSafeManifestV2
type GolYieldSafeManifestV2 = {
version: 2;
chainId: 8453;
asset: Address;
factory: GolYieldSafeCodeIdentityV1;
singleton: GolYieldSafeCodeIdentityV1;
fallbackHandler: GolYieldSafeCodeIdentityV1;
setupHelper: GolYieldSafeCodeIdentityV1;
implementation: GolYieldSafeCodeIdentityV1;
agent: Address;
maxAssetsPerAction: string;
sessionDurationSeconds: number;
minSessionRemainingSeconds: number;
safeSaltNonce: string;
moduleProxySalt: Hex;
safeProxyCreationCode: Hex;
safeProxyCreationCodeHash: Hex;
safeProxyRuntimeCodeHash: Hex;
moduleProxyCreationCode: Hex;
moduleProxyCreationCodeHash: Hex;
moduleProxyRuntimeCodeHash: Hex;
admittedVaults: readonly Address[];
quoteMaxAgeSeconds: number;
};
GolYieldSafeOnboardingClientOptionsV1
type GolYieldSafeOnboardingClientOptionsV1 = Omit<GolClientOptions, "sessionToken"> & {
manifest: GolYieldSafeManifestV1;
codeReader: GolYieldSafeCodeReaderV1;
now?: () => number;
};
GolYieldSafeOnboardingClientOptionsV2
type GolYieldSafeOnboardingClientOptionsV2 = Omit<GolClientOptions, "sessionToken"> & {
manifest: GolYieldSafeManifestV2;
codeReader: GolYieldSafeCodeReaderV2;
now?: () => number;
};
GolYieldSafeOnboardingClientV1
interface GolYieldSafeOnboardingClientV1 {
quote(input: GolYieldSafeQuoteExpectationV1, idempotencyKey: string, options?: {
signal?: AbortSignal;
}): Promise<GolResponse<GolYieldSafeQuoteResultV1>>;
submitFundingHash(quote: GolYieldSafeQuoteV1, transactionHash: Hex, idempotencyKey: string, options?: {
signal?: AbortSignal;
}): Promise<GolResponse<GolYieldSafeStatusV1>>;
getStatus(quote: GolYieldSafeQuoteV1, options?: {
signal?: AbortSignal;
}): Promise<GolResponse<GolYieldSafeStatusV1>>;
getRecovery(quote: GolYieldSafeQuoteV1, options?: {
signal?: AbortSignal;
}): Promise<GolResponse<GolYieldSafeWireCallV1>>;
}
GolYieldSafeOnboardingClientV2
interface GolYieldSafeOnboardingClientV2 {
quote(input: GolYieldSafeQuoteExpectationV2, idempotencyKey: string, options?: {
signal?: AbortSignal;
}): Promise<GolResponse<GolYieldSafeQuoteResultV2>>;
submitFundingHash(quote: GolYieldSafeQuoteV2, transactionHash: Hex, idempotencyKey: string, options?: {
signal?: AbortSignal;
}): Promise<GolResponse<GolYieldSafeStatusV2>>;
getStatus(quote: GolYieldSafeQuoteV2, options?: {
signal?: AbortSignal;
}): Promise<GolResponse<GolYieldSafeStatusV2>>;
getRecovery(quote: GolYieldSafeQuoteV2, options?: {
signal?: AbortSignal;
}): Promise<GolResponse<GolYieldSafeWireCallV1>>;
}
GolYieldSafeQuoteErrorCode
type GolYieldSafeQuoteErrorCode = "yield_safe_invalid_quote" | "yield_safe_stale_quote" | "yield_safe_manifest_mismatch" | "yield_safe_code_hash_mismatch" | "yield_safe_initializer_mismatch" | "yield_safe_address_mismatch" | "yield_safe_transfer_mismatch";
GolYieldSafeQuoteExpectationV1
type GolYieldSafeQuoteExpectationV1 = {
owner: Address;
amount: string;
saltNonce?: string;
};
GolYieldSafeQuoteExpectationV2
type GolYieldSafeQuoteExpectationV2 = {
owner: Address;
amount: string;
};
GolYieldSafeQuoteResultV1
type GolYieldSafeQuoteResultV1 = {
quote: GolYieldSafeQuoteV1;
fundingTransaction: GolYieldSafeFundingTransactionV1;
};
GolYieldSafeQuoteResultV2
type GolYieldSafeQuoteResultV2 = {
quote: GolYieldSafeQuoteV2;
fundingTransaction: GolYieldSafeFundingTransactionV1;
};
GolYieldSafeQuoteV1
type GolYieldSafeQuoteV1 = {
version: 1;
quoteId: string;
chainId: 8453;
owner: Address;
account: Address;
asset: Address;
amount: string;
initializer: Hex;
initializerHash: Hex;
saltNonce: string;
proxyCreationCode: Hex;
proxyRuntimeCodeHash: Hex;
factory: GolYieldSafeCodeIdentityV1;
singleton: GolYieldSafeCodeIdentityV1;
fallbackHandler: GolYieldSafeCodeIdentityV1;
setup: GolYieldSafeCodeIdentityV1;
module: GolYieldSafeCodeIdentityV1;
session: {
agent: Address;
validUntil: string;
maxAssetsPerAction: string;
admittedVaults: Address[];
};
transfer: GolYieldSafeWireCallV1;
deployment: GolYieldSafeWireCallV1;
simulation: {
blockNumber: string;
blockHash: Hex;
};
};
GolYieldSafeQuoteV2
type GolYieldSafeQuoteV2 = {
version: 2;
quoteId: string;
chainId: 8453;
owner: Address;
account: Address;
moduleProxy: Address;
asset: Address;
amount: string;
initializer: Hex;
initializerHash: Hex;
saltNonce: string;
proxyCreationCode: Hex;
proxyRuntimeCodeHash: Hex;
moduleProxySalt: Hex;
moduleProxyInitCode: Hex;
moduleProxyRuntimeCodeHash: Hex;
factory: GolYieldSafeCodeIdentityV1;
singleton: GolYieldSafeCodeIdentityV1;
fallbackHandler: GolYieldSafeCodeIdentityV1;
setup: GolYieldSafeCodeIdentityV1;
implementation: GolYieldSafeCodeIdentityV1;
session: {
agent: Address;
validUntil: string;
maxAssetsPerAction: string;
admittedVaults: Address[];
};
transfer: GolYieldSafeWireCallV1;
deployment: GolYieldSafeWireCallV1;
simulation: {
blockNumber: string;
blockHash: Hex;
};
};
GolYieldSafeReadinessReasonV1
type GolYieldSafeReadinessReasonV1 = "ready" | "awaiting_funding" | "awaiting_deployment" | "deployment_indeterminate" | "session_expired" | "session_mismatch";
GolYieldSafeStatusStateV1
type GolYieldSafeStatusStateV1 = "quoted" | "funding_verified" | "deploying" | "indeterminate" | "deployed";
GolYieldSafeStatusV1
type GolYieldSafeStatusV1 = GolYieldSafeQuoteV1 & {
state: GolYieldSafeStatusStateV1;
funding: GolYieldSafeFundingProofV1 | null;
deploymentAttempts: Hex[];
agentReady: boolean;
readinessReason: GolYieldSafeReadinessReasonV1;
};
GolYieldSafeStatusV2
type GolYieldSafeStatusV2 = GolYieldSafeQuoteV2 & {
state: "quoted" | "funding_verified" | "deploying" | "indeterminate" | "deployed";
funding: GolYieldSafeFundingProofV2 | null;
deploymentAttempts: Hex[];
agentReady: boolean;
readinessReason: "ready" | "awaiting_funding" | "awaiting_deployment" | "deployment_indeterminate" | "session_expired" | "session_mismatch";
};
GolYieldSafeWireCallV1
type GolYieldSafeWireCallV1 = {
to: Address;
value: "0";
data: Hex;
};
GolYieldScan
type GolYieldScan = {
status: "never_ran";
} | {
status: "ok";
blockNumber: string;
blockHash: `0x${string}`;
oracle: {
ok: boolean;
reason?: string;
};
admitted: {
venueId: string;
vault: `0x${string}`;
meanYieldBps: number;
historyDays: number;
spotApyBps: number;
}[];
excluded: {
venueId: string;
code: string;
why: string;
}[];
seenNotAdmitted: {
venueId: string;
vault: `0x${string}`;
apyBps: number;
totalAssetsRaw: string;
}[];
enumeratedFrom: string;
enumeratedThrough: string | null;
};
GolYieldSepoliaAccountPreflight
type GolYieldSepoliaAccountPreflight = {
evidenceLevel: "Base Sepolia live testnet read-only";
verdict: "HOLD";
chainId: 84532;
blockNumber: string;
blockHash: `0x${string}`;
account: `0x${string}`;
profileId: `0x${string}`;
vaults: [`0x${string}`, `0x${string}`];
codehash: `0x${string}`;
implementation: `0x${string}`;
reportedImplementation: `0x${string}`;
accountId: "biconomy.nexus.1.0.0";
domainChainId: "84532";
domainVerifier: `0x${string}`;
activeHook: `0x${string}`;
registry: `0x${string}`;
enforcementInstalled: boolean;
executorModuleInstalled: boolean;
usdcRaw: string;
vaultSharesRaw: [string, string];
checks: {
name: string;
status: "passed" | "held";
reason: string | null;
}[];
};
GolYieldSepoliaReadiness
type GolYieldSepoliaReadiness = {
evidenceLevel: "Base Sepolia live testnet read-only";
verdict: "HOLD";
observedAt: string;
rpcEndpointCount: 2;
chainId: 84532;
blockNumber: string;
blockHash: `0x${string}`;
core: `0x${string}`;
coreCodehash: `0x${string}`;
actionRegistry: `0x${string}`;
actionRegistryCodehash: `0x${string}`;
profileRegistry: `0x${string}`;
profileRegistryCodehash: `0x${string}`;
asset: `0x${string}`;
profileId: `0x${string}`;
vaults: [`0x${string}`, `0x${string}`];
vaultStates: [
{
vault: `0x${string}`;
totalAssetsRaw: string;
},
{
vault: `0x${string}`;
totalAssetsRaw: string;
}
];
checks: {
name: string;
status: "passed" | "held";
reason: string | null;
address?: `0x${string}`;
}[];
};
GolYieldVaultAccountEvidence
type GolYieldVaultAccountEvidence = {
chainId: string;
owner: Address;
account: Address;
profileId: Hex;
asset: Address;
enforcementInstalled: boolean;
balances: {
accountBalance: string;
ownerBalance: string;
blockNumber: string;
blockHash: Hex;
};
mandate: {
mandateId: Hex;
state: 1;
expiresAt: string;
now: string;
profileId: Hex;
} | null;
};
GolYieldVaultAccountKind
type GolYieldVaultAccountKind = "nexus" | "safe";
GolYieldVaultCreationDraft
type GolYieldVaultCreationDraft = GolYieldVaultIdentity & {
factory: Address;
profileId: Hex;
index: string;
nonce: Hex;
expiresAt: string;
intentDigest: Hex;
alreadyDeployed: boolean;
};
GolYieldVaultCreationReceipt
type GolYieldVaultCreationReceipt = {
account: Address;
profileId: Hex;
txHash: Hex | null;
alreadyDeployed: boolean;
};
GolYieldVaultDepositDraft
type GolYieldVaultDepositDraft = GolYieldVaultIdentity & GolYieldVaultDepositInput & {
asset: Address;
expiresAt: string;
userOpHash: Hex;
userOp: Record<string, string>;
calls: {
to: Address;
value: string;
data: Hex;
}[];
};
GolYieldVaultDepositInput
type GolYieldVaultDepositInput = {
chainId: string;
account: Address;
owner: Address;
profileId: Hex;
vault: Address;
amount: string;
};
GolYieldVaultIdentity
type GolYieldVaultIdentity = {
draftId: string;
chainId: string;
owner: Address;
account: Address;
};
HostedOwnerAction
interface HostedOwnerAction {
action: HostedOwnerActionName;
draftId: string;
draftExpiresAt: string;
environment: "test";
chainId: 84532;
core: Address;
account: Address;
family: AccountFamily;
review: {
projectId: string;
};
deadline: number;
installEpoch: string;
nonce: string;
gasPolicyId: Hex | null;
mandateId: Hex | null;
ownerCall: OwnerAccountCall | null;
safePreviousModule: Address | null;
execution: null | {
kind: OwnerOperation["kind"];
nonce: string;
typedData: TypedDataPayload | null;
userOperation: Record<string, string> | null;
};
signing: WalletSigningPayload | null;
expectedHash: Hex | null;
ownerConfiguration: HostedOwnerConfiguration;
setup: PreparedEip7702Setup | null;
}
HostedOwnerActionInput
interface HostedOwnerActionInput {
action: HostedOwnerActionName;
account?: string;
family?: AccountFamily;
gasPolicyId?: string;
mandateId?: string;
deadline?: number;
}
HostedOwnerActionName
type HostedOwnerActionName = "pause" | "resume" | "revoke" | "gas_revoke" | "install" | "remove" | "eip7702_setup";
HostedOwnerConfiguration
interface HostedOwnerConfiguration {
owners: Address[];
threshold: number;
fingerprint: Hex;
}
InclusionWebhookEventData
interface InclusionWebhookEventData {
"gas_execution.inclusion_updated": GasExecutionInclusionEvent;
"gas_policy.inclusion_updated": GasPolicyInclusionEvent;
"gas_policy.child_inclusion_updated": ChildMandateInclusionEvent;
"account.eip7702_setup_inclusion_updated": Eip7702SetupInclusionEvent;
}
InclusionWebhookEventType
type InclusionWebhookEventType = "gas_execution.inclusion_updated" | "gas_policy.inclusion_updated" | "gas_policy.child_inclusion_updated" | "account.eip7702_setup_inclusion_updated";
KernelCall
interface KernelCall {
readonly index: number;
readonly target: Address;
readonly valueRaw: string;
readonly data: Hex;
readonly dataHash: Hex;
readonly kind: 'native-transfer' | 'erc20-transfer' | 'erc20-approval' | 'module-installation' | 'unknown';
readonly recipient?: Address;
readonly spender?: Address;
readonly amountRaw?: string;
readonly installation?: ModuleInstallation;
}
KernelExecutionCall
interface KernelExecutionCall {
to: Address;
value: bigint;
data: Hex;
}
MandateTermsInput
interface MandateTermsInput {
parentId: Hex;
account: Address;
agent: Address;
accountProfileId: Hex;
installEpoch: Numeric;
projectId: Hex;
mode: Numeric;
policyVersion: Numeric;
policyHash: Hex;
validFrom: Numeric;
expiresAt: Numeric;
maxDepth: Numeric;
maxActiveDescendants: Numeric;
approvalExpiresAt: Numeric;
salt: Hex;
}
OperationHandle
interface OperationHandle {
readonly version: 1;
readonly binding: Readonly<WalletBinding>;
readonly operationId: string;
readonly attemptId: string;
readonly originalHash: Hash;
readonly userOpHash: Hash;
}
OperationStatus
interface OperationStatus {
readonly version: 1;
readonly state: "pending" | "confirmed" | "failed" | "rejected" | "expired" | "indeterminate";
}
OperationStorage
interface OperationStorage {
save(handle: OperationHandle): Promise<void>;
load(operationId: string, attemptId: string): Promise<OperationHandle | null>;
}
OwnerAccountCall
type OwnerAccountCall = {
to: Address;
data: Hex;
/** Safe must delegatecall MultiSendCallOnly. Other calls target the account itself. */
operation: 0 | 1;
};
OwnerActionLaunch
type OwnerActionLaunch = OwnerActionSession & {
approvalUrl: string | null;
launchTokenUnavailable: boolean;
};
OwnerActionSession
type OwnerActionSession = Omit<ApprovalSession, "prepared"> & {
prepared: HostedOwnerAction;
};
OwnerGasPolicy
interface OwnerGasPolicy {
mandateId: Hex;
account: Address;
projectId: Hex;
accountProfileId: Hex;
installEpoch: bigint;
/** Formula version 2 supports native ETH only. */
feeAsset: Address;
/** The only address that may send an inline-settled action under this policy. */
submitter: Address;
/** The address the account reimburses. */
recipient: Address;
/** Signs revert claims; zero unless the revert bit is set. */
attester: Address;
maxPerAction: bigint;
maxTotal: bigint;
expiresAt: number;
/** 1 = success, 2 = refusal, 4 = revert. */
chargeableOutcomes: number;
formulaVersion: number;
nonce: bigint;
}
OwnerOperation
type OwnerOperation = {
kind: "safe_transaction";
family: "safe";
account: Address;
nonce: bigint;
typedData: TypedDataPayload;
expectedHash: Hex;
/** Encode `execTransaction` after the owners sign `typedData`. */
encode(signatures: Hex): {
to: Address;
data: Hex;
value: 0n;
};
} | {
kind: "eoa_transaction";
family: "nexus7702";
account: Address;
/** The owner's wallet sends this transaction from the account itself. */
transaction: {
from: Address;
to: Address;
data: Hex;
value: 0n;
};
} | {
kind: "user_operation";
family: UserOperationFamily;
account: Address;
userOperation: PackedUserOperation;
userOpHash: Hex;
/** The owner wallet signs `userOpHash` with EIP-191 `personal_sign`. */
message: {
raw: Hex;
};
/** Direct EntryPoint submission from any funded address, or give the signed operation to a bundler. */
encode(ownerSignature: Hex, beneficiary: Address): {
to: Address;
data: Hex;
value: 0n;
gas: bigint;
userOperation: PackedUserOperation;
};
};
OwnerOperationOptions
interface OwnerOperationOptions {
verificationGasLimit?: bigint;
callGasLimit?: bigint;
preVerificationGas?: bigint;
maxFeePerGas?: bigint;
maxPriorityFeePerGas?: bigint;
}
OwnerSigner
interface OwnerSigner {
signTypedData(typedData: TypedDataPayload): Promise<Hex>;
signMessage?(args: {
message: {
raw: Hex;
};
}): Promise<Hex>;
}
OwnerSignerIdentity
interface OwnerSignerIdentity {
readonly address: Address;
readonly chainId: GolChainId;
readonly sessionId: string;
}
PackedUserOperation
interface PackedUserOperation {
sender: Address;
nonce: bigint;
initCode: Hex;
callData: Hex;
accountGasLimits: Hex;
preVerificationGas: bigint;
gasFees: Hex;
paymasterAndData: Hex;
signature: Hex;
}
PreparedChildMandateExpectations
interface PreparedChildMandateExpectations {
core?: Address;
parentMandateId?: Hex;
parentAgent?: Address;
agent?: Address;
recipients?: readonly Address[];
maxPerActionBaseUnits?: bigint;
maxTotalBaseUnits?: bigint;
tree?: {
maxDepth: number;
maxActiveDescendants: number;
};
}
PreparedGasExecutionExpectations
interface PreparedGasExecutionExpectations {
core?: Address;
mandateId?: Hex;
gasPolicyId?: Hex;
agent?: Address;
recipient?: Address;
amountBaseUnits?: bigint;
deadline?: number;
/** The largest network charge the agent accepts for this action. */
maxChargeWei?: bigint;
relayerMode?: "gol" | "developer";
}
PreparedGasPolicyExpectations
interface PreparedGasPolicyExpectations {
/** The platform project UUID the approval must bind. */
projectId?: string;
core?: Address;
account?: Address;
agent?: Address;
recipients?: readonly Address[];
maxPerActionBaseUnits?: bigint;
maxTotalBaseUnits?: bigint;
maxGasPerActionWei?: bigint;
maxGasTotalWei?: bigint;
chargeableOutcomesMask?: number;
/** The relayer the owner intends to approve; for `gol`, the configured relayer and recipient. */
relayer?: {
mode: "gol";
submitter?: Address;
recipient?: Address;
} | {
mode: "developer";
submitter: Address;
recipient: Address;
};
attester?: Address;
tree?: {
maxDepth: number;
maxActiveDescendants: number;
};
}
PreparedGasRevocation
interface PreparedGasRevocation {
account: Address;
policyId: Hex;
nonce: bigint;
deadline: number;
digest: Hex;
ownerSigningHash: Hex;
encodeSubmission(ownerWalletSignature: Hex): Hex;
}
RawHashSigner
interface RawHashSigner {
sign(request: {
hash: Hex;
}): Promise<Hex>;
}
RouteReview
interface RouteReview {
readonly decoder: string;
readonly functionName: string;
readonly router: Address;
readonly recipient: Address;
readonly inputAsset: Address;
readonly outputAsset: Address;
readonly amountInRaw: string;
readonly minimumOutRaw: string;
readonly nativeValueRaw: string;
readonly erc20Deposits: readonly {
readonly token: Address;
readonly amountRaw: string;
}[];
readonly steps: readonly RouteStep[];
}
SafetyActionCode
type SafetyActionCode = (typeof SAFETY_ACTION_CODES)[SafetyActionName];
SafetyActionName
type SafetyActionName = keyof typeof SAFETY_ACTION_CODES;
SignatureFormat
type SignatureFormat = "safe_threshold" | "nexus_k1" | "kernel_root" | "alchemy_entity_zero" | "eoa";
SignedOwnerOp
interface SignedOwnerOp {
userOp: SignedOwnerUserOperation;
userOpHash: Hex;
intentType: string;
}
SignedOwnerUserOperation
interface SignedOwnerUserOperation {
chainId: GolChainId;
sender: Address;
nonce: string;
callData: Hex;
signature: Hex;
entryPoint: Address;
factory?: Address | null;
factoryData?: Hex | null;
paymaster?: Address | null;
paymasterData?: Hex | null;
callGasLimit: string;
verificationGasLimit: string;
preVerificationGas: string;
paymasterVerificationGasLimit?: string | null;
paymasterPostOpGasLimit?: string | null;
maxFeePerGas: string;
maxPriorityFeePerGas: string;
}
TransferPolicyInput
interface TransferPolicyInput {
asset?: Address;
recipients: readonly Address[];
maxPerActionBaseUnits: bigint;
maxTotalBaseUnits: bigint;
}
TypedDataPayload
interface TypedDataPayload {
domain: Record<string, unknown>;
types: Record<string, Array<{
name: string;
type: string;
}>>;
primaryType: string;
message: Record<string, unknown>;
}
UnsignedUserOperation
interface UnsignedUserOperation {
sender: Address;
nonce: string;
callData: Hex;
callGasLimit: string;
verificationGasLimit: string;
preVerificationGas: string;
maxFeePerGas: string;
maxPriorityFeePerGas: string;
signature: "0x";
entryPoint: typeof ENTRYPOINT_V07;
chainId: GolChainId;
factory?: Address;
factoryData?: Hex;
paymaster?: Address;
paymasterData?: Hex;
paymasterVerificationGasLimit?: string;
paymasterPostOpGasLimit?: string;
}
UserOpReceipt
interface UserOpReceipt {
id: string;
userOpHash: Hex;
status: UserOpState;
txHash: Hex | null;
submittedAt: string;
error: string | null;
}
UserOpState
type UserOpState = "pending" | "indeterminate" | "included" | "failed";
WaitResult
type WaitResult = {
kind: "interrupted";
handle: OperationHandle;
} | {
kind: "terminal";
handle: OperationHandle;
status: OperationStatus;
};
WalletBinding
interface WalletBinding {
readonly customerId: string;
readonly sessionId: string;
readonly accountId: string;
readonly accountAddress: string;
readonly ownerAddress: string;
readonly chainId: GolChainId;
}
WalletSigningInput
interface WalletSigningInput {
family: AccountFamily;
account: Address;
core: Address;
payload: GolOwnerPayload;
chainId?: number;
}
WalletSigningPayload
interface WalletSigningPayload {
family: AccountFamily;
method: "eth_signTypedData_v4";
typedData: TypedDataPayload;
expectedHash: Hex;
digest: Hex;
signatureFormat: SignatureFormat;
}
WebhookEventType
type WebhookEventType = WebhookEventEnvelope["type"];
@gol/sdk/server
Typed API clients, polling helpers, and webhook verification. Server-only, because these calls carry your API key or developer session token.
Classes
| Class | Options | Methods |
|---|---|---|
GolApiClient | GolApiClientOptions | 42 |
GolApiError | none | 6 |
GolManagementClient | GolManagementClientOptions | 59 |
GolTransportError | none | 0 |
GolWebhookVerificationError | none | 1 |
GolApiClient
new GolApiClient(options: GolApiClientOptions)
ProjectResources, an internal base class the package does not export.
| Method | Signature | Returns |
|---|---|---|
confirmChildMandate | confirmChildMandate(projectId: string, gasPolicyId: `0x${string}`, draftId: string, transactionHash: `0x${string}`): Promise<{ status: "confirmed"; child: ChildMandateRecord; } | ChildMandateObservation> | Record a child the developer created itself once it reaches the selected head. |
confirmGasPolicy | confirmGasPolicy(projectId: string, draftId: string, transactionHash: `0x${string}`): Promise<{ status: "confirmed"; policy: GasPolicyRecord; } | GasObservation> | Returns final policy confirmation or provisional included/observing status. |
confirmGasPolicyRevocation | confirmGasPolicyRevocation(projectId: string, gasPolicyId: `0x${string}`, transactionHash: `0x${string}`): Promise<{ status: "confirmed"; policy: GasPolicyRecord; } | GasObservation> | |
confirmGasPolicySafetyAction | confirmGasPolicySafetyAction(projectId: string, gasPolicyId: `0x${string}`, input: ConfirmGasPolicySafetyActionInput): Promise<{ status: "confirmed"; policy: GasPolicyRecord; } | SafetyActionObservation> | |
createApprovalSession | createApprovalSession(projectId: string, input: CreateApprovalSessionInput, idempotencyKey: string): Promise<ApprovalLaunch> | Compile the owner’s exact approval. Creates no authority; the owner wallet signs signing. |
createGasSimulation | createGasSimulation(projectId: string, actionId: `0x${string}`, input: CreateGasSimulationInput): Promise<GasSimulationResponse> | Fetch the exact EIP-712 payload for the agent wallet to sign. |
createOwnerActionSession | createOwnerActionSession(projectId: string, input: Omit<CreateApprovalSessionInput, "action"> & { action: import("./hosted-actions.js").HostedOwnerActionInput; }, idempotencyKey: string): Promise<import("./hosted-actions.js").OwnerActionLaunch> | |
createWebhookEndpoint | createWebhookEndpoint(projectId: string, input: CreateWebhookEndpointInput): Promise<CreateWebhookEndpointResponse> | The returned secret is shown once. Store it to verify deliveries. |
deleteWebhookEndpoint | deleteWebhookEndpoint(projectId: string, endpointId: string): Promise<{ id: string; deleted: true; }> | |
getAccountStatus | getAccountStatus(projectId: string, account: `0x${string}`): Promise<AccountStatus> | |
getApprovalSession | getApprovalSession(projectId: string, sessionId: string): Promise<ApprovalSession> | |
getEip7702Setup | getEip7702Setup(projectId: string, account: `0x${string}`, setupId: string): Promise<Eip7702Setup> | A sponsored EIP-7702 setup. Polling is authoritative. |
getGasConfiguration | getGasConfiguration(projectId: string): Promise<GasConfiguration> | |
getGasExecution | getGasExecution(projectId: string, executionId: string): Promise<GasExecutionResponse> | |
getGasPolicy | getGasPolicy(projectId: string, gasPolicyId: `0x${string}`): Promise<GasPolicyRecord> | Current on-chain policy state. Unknown or conflicting chain state reads as unavailable. |
getGasSimulation | getGasSimulation(projectId: string, actionId: `0x${string}`): Promise<GasSimulationResponse> | |
getOwnerActionSession | getOwnerActionSession(projectId: string, sessionId: string): Promise<import("./hosted-actions.js").OwnerActionSession> | |
listApprovalSessionEvents | listApprovalSessionEvents(projectId: string, sessionId: string): Promise<{ data: { id: string; state: ApprovalSession["state"]; version: number; at: string; }[]; }> | |
listApprovalSessions | listApprovalSessions(projectId: string): Promise<{ data: ApprovalSession[]; }> | |
listChildMandates | listChildMandates(projectId: string, gasPolicyId: `0x${string}`): Promise<ListChildMandatesResponse> | Every recorded mandate of the policy’s tree, with state read from chain at one block. |
listGasExecutions | listGasExecutions(projectId: string, options?: PageOptions & { state?: string; }): Promise<ListGasExecutionsResponse> | |
listGasPolicies | listGasPolicies(projectId: string, options?: PageOptions): Promise<ListGasPoliciesResponse> | |
listWebhookDeliveries | listWebhookDeliveries(projectId: string, endpointId: string, limit?: number): Promise<WebhookDelivery[]> | |
listWebhookEndpoints | listWebhookEndpoints(projectId: string): Promise<WebhookEndpoint[]> | |
openGasExecutionDispute | openGasExecutionDispute(projectId: string, executionId: string, reason: string): Promise<{ id: string; }> | Freezes new submissions under the execution’s gas policy until an operator resolves it. |
prepareChildMandate | prepareChildMandate(projectId: string, gasPolicyId: `0x${string}`, input: PrepareChildMandateInput): Promise<PreparedChildMandate> | Compile a child mandate from typed intent. Creates no authority; the parent agent signs signing. |
prepareEip7702Setup | prepareEip7702Setup(projectId: string, account: `0x${string}`): Promise<PreparedEip7702Setup> | Prepare the owner’s EIP-7702 setup of a nexus7702 account. Verify it with verifyPreparedEip7702Setup before the owner signs. |
prepareGasExecution | prepareGasExecution(projectId: string, actionId: `0x${string}`, input: PrepareGasExecutionInput): Promise<PrepareGasExecutionResponse> | Fetch the exact EIP-712 payload for the agent wallet to sign. |
prepareGasPolicy | prepareGasPolicy(projectId: string, input: PrepareGasPolicyInput): Promise<PreparedGasPolicy> | |
prepareGasPolicyRevocation | prepareGasPolicyRevocation(projectId: string, gasPolicyId: `0x${string}`, deadline?: number): Promise<PreparedPolicyRevocation> | |
prepareGasPolicySafetyAction | prepareGasPolicySafetyAction(projectId: string, gasPolicyId: `0x${string}`, input: PrepareGasPolicySafetyActionInput): Promise<PreparedMandateSafetyAction> | |
prepareGasSimulation | prepareGasSimulation(projectId: string, actionId: `0x${string}`): Promise<PrepareGasExecutionResponse> | |
rotateApprovalCapability | rotateApprovalCapability(projectId: string, sessionId: string): Promise<{ approvalUrl: string | null; observationCapability: string | null; }> | |
rotateWebhookSecret | rotateWebhookSecret(projectId: string, endpointId: string): Promise<RotateWebhookSecretResponse> | |
sendWebhookTest | sendWebhookTest(projectId: string, endpointId: string): Promise<{ eventId: string; }> | |
setWebhookEndpointEnabled | setWebhookEndpointEnabled(projectId: string, endpointId: string, enabled: boolean): Promise<WebhookEndpoint> | |
submitChildMandate | submitChildMandate(projectId: string, gasPolicyId: `0x${string}`, draftId: string, authorization: `0x${string}`): Promise<ChildMandateRecord> | Ask GOL’s hosted relayer to create the child with the parent agent’s authorization. |
submitDeveloperRelayerTransaction | submitDeveloperRelayerTransaction(projectId: string, executionId: string, rawSignedTransaction: `0x${string}`): Promise<GasExecutionResponse> | Submit the developer relayer’s signed EIP-1559 transaction for an execution in external_pending. Build it with developerRelayerTransaction. |
submitEip7702Setup | submitEip7702Setup(projectId: string, account: `0x${string}`, input: SubmitEip7702SetupInput): Promise<Eip7702Setup> | Ask GOL’s hosted relayer to send the owner-signed setup at GOL’s cost, within the daily limit. |
submitGasExecution | submitGasExecution(projectId: string, actionId: `0x${string}`, input: SubmitGasExecutionInput): Promise<GasExecutionResponse> | Submit a typed transfer signed by the developer’s agent. The API owns execution logic. |
submitGasSimulation | submitGasSimulation(projectId: string, actionId: `0x${string}`, agentSignature: `0x${string}`): Promise<GasExecutionResponse> | |
whoami | whoami(): Promise<ApiKeyIdentityResponse> |
GolApiError
new GolApiError(status: number, code: string, message: string, correlationId: string | null, options?: { retryable?: boolean; retryAfterSeconds?: number | null; })
GolError, an internal base class the package does not export.
| Method | Signature | Returns |
|---|---|---|
code | code: string | |
correlationId | correlationId: string | null | |
requestId | requestId: string | null | |
retryable | retryable: boolean | |
retryAfterSeconds | retryAfterSeconds: number | null | |
status | status: number |
GolManagementClient
new GolManagementClient(options: GolManagementClientOptions)
ProjectResources, an internal base class the package does not export.
| Method | Signature | Returns |
|---|---|---|
acceptInvitation | acceptInvitation(invitationId: string): Promise<WorkspaceInvitation> | |
changeWorkspaceMember | changeWorkspaceMember(workspaceId: string, memberId: string, input: ChangeWorkspaceMemberInput): Promise<WorkspaceMember> | |
createApiKey | createApiKey(projectId: string, input: CreateApiKeyInput): Promise<CreateApiKeyResponse> | |
createGoogleSession | createGoogleSession(input: CreateGoogleSessionInput): Promise<CreateGoogleSessionResponse> | |
createProject | createProject(input: CreateProjectInput): Promise<Project> | |
createWebhookEndpoint | createWebhookEndpoint(projectId: string, input: CreateWebhookEndpointInput): Promise<CreateWebhookEndpointResponse> | The returned secret is shown once. Store it to verify deliveries. |
createWorkspaceInvitation | createWorkspaceInvitation(workspaceId: string, input: CreateWorkspaceInvitationInput): Promise<WorkspaceInvitation> | |
createWorkspaceProject | createWorkspaceProject(workspaceId: string, input: CreateWorkspaceProjectInput): Promise<Project> | |
declineInvitation | declineInvitation(invitationId: string): Promise<WorkspaceInvitation> | |
deleteWebhookEndpoint | deleteWebhookEndpoint(projectId: string, endpointId: string): Promise<{ id: string; deleted: true; }> | |
getAccountStatus | getAccountStatus(projectId: string, account: `0x${string}`): Promise<AccountStatus> | |
getApprovalSession | getApprovalSession(projectId: string, sessionId: string): Promise<ApprovalSession> | |
getEip7702Setup | getEip7702Setup(projectId: string, account: `0x${string}`, setupId: string): Promise<Eip7702Setup> | A sponsored EIP-7702 setup. Polling is authoritative. |
getGasConfiguration | getGasConfiguration(projectId: string): Promise<GasConfiguration> | |
getGasExecution | getGasExecution(projectId: string, executionId: string, environment?: "test" | "live"): Promise<GasExecutionResponse> | |
getGasPolicy | getGasPolicy(projectId: string, gasPolicyId: `0x${string}`): Promise<GasPolicyRecord> | Current on-chain policy state. Unknown or conflicting chain state reads as unavailable. |
getIdentity | getIdentity(): Promise<ConsoleIdentityResponse> | |
getProjectAccess | getProjectAccess(projectId: string): Promise<ProjectAccess> | |
getWorkspace | getWorkspace(workspaceId: string): Promise<Workspace> | |
getWorkspaceOnboarding | getWorkspaceOnboarding(workspaceId: string): Promise<WorkspaceOnboarding> | |
listApiKeys | listApiKeys(projectId: string): Promise<ListApiKeysResponse> | |
listApprovalDestinations | listApprovalDestinations(projectId: string): Promise<{ data: ApprovalDestination[]; }> | |
listApprovalSessionEvents | listApprovalSessionEvents(projectId: string, sessionId: string): Promise<{ data: { id: string; state: ApprovalSession["state"]; version: number; at: string; }[]; }> | |
listApprovalSessions | listApprovalSessions(projectId: string): Promise<{ data: ApprovalSession[]; }> | |
listAuditEvents | listAuditEvents(projectId: string, limit?: number, cursor?: string): Promise<ListAuditEventsResponse> | |
listChildMandates | listChildMandates(projectId: string, gasPolicyId: `0x${string}`): Promise<ListChildMandatesResponse> | Every recorded mandate of the policy’s tree, with state read from chain at one block. |
listGasExecutions | listGasExecutions(projectId: string, options?: PageOptions & { state?: string; }): Promise<ListGasExecutionsResponse> | |
listGasPolicies | listGasPolicies(projectId: string, options?: PageOptions): Promise<ListGasPoliciesResponse> | |
listMyInvitations | listMyInvitations(): Promise<ListMyInvitationsResponse> | |
listProjects | listProjects(): Promise<ListProjectsResponse> | |
listWebhookDeliveries | listWebhookDeliveries(projectId: string, endpointId: string, limit?: number): Promise<WebhookDelivery[]> | |
listWebhookEndpoints | listWebhookEndpoints(projectId: string): Promise<WebhookEndpoint[]> | |
listWorkspaceAuditEvents | listWorkspaceAuditEvents(workspaceId: string): Promise<ListWorkspaceAuditEventsResponse> | |
listWorkspaceInvitations | listWorkspaceInvitations(workspaceId: string): Promise<ListWorkspaceInvitationsResponse> | |
listWorkspaceMembers | listWorkspaceMembers(workspaceId: string): Promise<ListWorkspaceMembersResponse> | |
listWorkspaceProjects | listWorkspaceProjects(workspaceId: string): Promise<ListWorkspaceProjectsResponse> | |
listWorkspaces | listWorkspaces(): Promise<ListWorkspacesResponse> | |
openGasExecutionDispute | openGasExecutionDispute(projectId: string, executionId: string, reason: string): Promise<{ id: string; }> | Freezes new submissions under the execution’s gas policy until an operator resolves it. |
registerApprovalDestination | registerApprovalDestination(projectId: string, returnUrl: string): Promise<ApprovalDestination> | |
removeWorkspaceMember | removeWorkspaceMember(workspaceId: string, memberId: string): Promise<void> | |
renewSession | renewSession(): Promise<RenewConsoleSessionResponse> | |
resendWorkspaceInvitation | resendWorkspaceInvitation(workspaceId: string, invitationId: string): Promise<WorkspaceInvitation> | |
retryWorkspaceInvitationDelivery | retryWorkspaceInvitationDelivery(workspaceId: string, invitationId: string): Promise<void> | |
reviewInvitation | reviewInvitation(invitationId: string): Promise<InvitationReview> | |
reviewMemberOffboarding | reviewMemberOffboarding(workspaceId: string, memberId: string): Promise<MemberOffboardingReview> | |
revokeApiKey | revokeApiKey(projectId: string, apiKeyId: string): Promise<ApiKey> | |
revokeApprovalDestination | revokeApprovalDestination(projectId: string, id: string): Promise<ApprovalDestination> | |
revokeSession | revokeSession(): Promise<void> | |
revokeWorkspaceInvitation | revokeWorkspaceInvitation(workspaceId: string, invitationId: string): Promise<void> | |
rotateApiKey | rotateApiKey(projectId: string, apiKeyId: string, input: RotateApiKeyInput): Promise<RotateApiKeyResponse> | |
rotateWebhookSecret | rotateWebhookSecret(projectId: string, endpointId: string): Promise<RotateWebhookSecretResponse> | |
sendWebhookTest | sendWebhookTest(projectId: string, endpointId: string): Promise<{ eventId: string; }> | |
setWebhookEndpointEnabled | setWebhookEndpointEnabled(projectId: string, endpointId: string, enabled: boolean): Promise<WebhookEndpoint> | |
setWorkspaceOnboarding | setWorkspaceOnboarding(workspaceId: string, input: SetWorkspaceOnboardingInput): Promise<WorkspaceOnboarding> | |
startEmailChallenge | startEmailChallenge(email: string): Promise<StartEmailChallengeResponse> | |
updateProject | updateProject(projectId: string, input: UpdateProjectInput): Promise<Project> | |
updateWorkspace | updateWorkspace(workspaceId: string, input: UpdateWorkspaceInput): Promise<Workspace> | |
verifyApprovalDestination | verifyApprovalDestination(projectId: string, id: string): Promise<ApprovalDestination> | |
verifyEmailChallenge | verifyEmailChallenge(challengeId: string, code: string): Promise<VerifyEmailChallengeResponse> |
GolTransportError
new GolTransportError(message: string, options?: ErrorOptions)
Error.
GolWebhookVerificationError
new GolWebhookVerificationError(message: string)
Extends Error.
| Method | Signature | Returns |
|---|---|---|
name | name: string |
Functions
| Function | Signature | Returns |
|---|---|---|
checkX402Requirement | checkX402Requirement(prepared: unknown, chainId: GolChainId): X402PaymentReview | Check the server quote even when owner approval blocks local signing. |
createGolAgentDelegationsClient | createGolAgentDelegationsClient(options: GolAgentDelegationsOptions): { list(opt?: GolMandatesRequestOptions): Promise<GolResponse<{ id: string; permissionId: string; name: string; kind: "grant"; delegateeAddress: string; chain: string; chainId: 8453 | 84532; status: "active" | "frozen" | "expired" | "revoked"; policySet: { [key: string]: unknown; }; spentToDate: { [key: string]: unknown; }[]; humanSummary: string; createdAt?: string; expiresAt?: string | null; mandateId?: string; mandateVersion?: number; grantExecutor?: string; }[]>>; buildAction(delegationId: string, input: GolDelegatedTransfer, expectedAccount: GolExpectedOperationAccount, opt?: GolMandatesRequestOptions): Promise<GolResponse<{ intentType: "delegation_freeze" | "delegation_unfreeze" | "delegation_revoke" | "delegated_action"; userOp: components["schemas"]["GrantUnsignedUserOp"]; userOpHash: string; humanSummary: string; riskReducing: boolean; instant: boolean; gasless: boolean; }>>; } | Server-only agent session client. It cannot call owner routes. |
createGolAgentUserOpsClient | createGolAgentUserOpsClient(options: GolUserOpsClientOptions): GolAgentUserOpsClient | Agent client restricted to delegated actions and receipts belonging to that agent. |
createGolApiAgentClient | createGolApiAgentClient(options: GolApiAgentClientOptions): GolApiAgentClient | Server-side agent bearer client. Supply the token from a local key store or session mint. |
createGolDeviceLoginClient | createGolDeviceLoginClient(options: GolDeviceLoginClientOptions): GolDeviceLoginClient | Server-only device login for local tools. The poll secret authenticates only its own request, and the returned owner session token belongs in the caller’s local session store. |
isInclusionWebhookEvent | isInclusionWebhookEvent(event: GolWebhookEvent, type: T): event is GolWebhookEvent<InclusionWebhookEventData[T]> & { type: T; } | Narrow a verified event to one provisional inclusion event type. Inclusion events are delivered only to endpoints that list them. Apply one only when its data.sequence is above the last one processed for the same data.transactionHash; confirmation and settlement still come from the selected-head events or polling. |
reviewX402Call | reviewX402Call(prepared: unknown, chainId: GolChainId, readDomain?: X402DomainReader): Promise<X402PaymentReview> | Refuse paid signing unless the public contract exposes an authorization preimage and the token DOMAIN_SEPARATOR is independently verified on the selected chain. A server-supplied domain separator alone is insufficient authority. |
rpcX402DomainReader | rpcX402DomainReader(rpcUrl?: string): X402DomainReader | Read the token domain from the selected Base chain, never from the API quote. |
verifyWebhook | verifyWebhook(rawBody: string | Uint8Array, headers: Headers | Record<string, string | string[] | undefined>, secrets: string | readonly string[], options?: { toleranceSeconds?: number; now?: Date; }): GolWebhookEvent<Data> | Verify a GOL webhook against the exact raw request body. Accepts the current secret and, during rotation, the previous one. |
waitForChildMandate | waitForChildMandate(client: GolApiClient | GolManagementClient, projectId: string, gasPolicyId: `0x${string}`, mandateId: `0x${string}`, options?: WaitOptions): Promise<ChildMandateRecord> | Poll a child mandate of the policy’s tree until it leaves pending. |
waitForChildMandateInclusion | waitForChildMandateInclusion(client: GolApiClient | GolManagementClient, projectId: string, gasPolicyId: `0x${string}`, mandateId: `0x${string}`, options?: WaitOptions): Promise<ChildMandateRecord> | Resolve when a sponsored child has a checked inclusion result. |
waitForEip7702Setup | waitForEip7702Setup(client: GolApiClient | GolManagementClient, projectId: string, account: `0x${string}`, setupId: string, options?: WaitOptions): Promise<Eip7702Setup> | Poll a sponsored EIP-7702 setup until it is confirmed or failed. |
waitForEip7702SetupInclusion | waitForEip7702SetupInclusion(client: GolApiClient | GolManagementClient, projectId: string, account: `0x${string}`, setupId: string, options?: WaitOptions): Promise<Eip7702Setup> | Resolve on a checked inclusion, reversion, orphan, mismatch, or final setup state. |
waitForGasExecution | waitForGasExecution(client: GolApiClient, projectId: string, executionId: string, options?: WaitOptions & { until?: (execution: GasExecutionResponse) => boolean; }): Promise<GasExecutionResponse> | Poll an execution until until returns true, by default a terminal state. Polling is authoritative. |
waitForGasExecutionInclusion | waitForGasExecutionInclusion(client: GolApiClient, projectId: string, executionId: string, options?: WaitOptions): Promise<GasExecutionResponse> | Resolve when an action or claim has a checked inclusion result. |
waitForGasPolicyConfirmation | waitForGasPolicyConfirmation(client: GolApiClient, projectId: string, draftId: string, transactionHash: `0x${string}`, options?: WaitOptions): Promise<GasPolicyRecord> | Poll confirmation until the approval reaches the hosted service’s selected Base head. |
waitForGasPolicyInclusion | waitForGasPolicyInclusion(client: GolApiClient, projectId: string, draftId: string, transactionHash: `0x${string}`, options?: WaitOptions): Promise<{ status: "confirmed"; policy: GasPolicyRecord; } | GasObservation> | Resolve as soon as a canonical RPC check finds the policy transaction included. |
waitForGasPolicyRevocation | waitForGasPolicyRevocation(client: GolApiClient, projectId: string, gasPolicyId: `0x${string}`, transactionHash: `0x${string}`, options?: WaitOptions): Promise<GasPolicyRecord> | Poll a gas-policy revocation until the selected settlement head confirms it. |
waitForGasPolicyRevocationInclusion | waitForGasPolicyRevocationInclusion(client: GolApiClient, projectId: string, gasPolicyId: `0x${string}`, transactionHash: `0x${string}`, options?: WaitOptions): Promise<{ status: "confirmed"; policy: GasPolicyRecord; } | GasObservation> | Resolve as soon as a canonical RPC check reports the gas-policy revocation transaction. included is provisional; waitForGasPolicyRevocation waits for the selected head. |
waitForGasPolicySafetyAction | waitForGasPolicySafetyAction(client: GolApiClient, projectId: string, gasPolicyId: `0x${string}`, input: ConfirmGasPolicySafetyActionInput, options?: WaitOptions): Promise<GasPolicyRecord> | Poll an owner pause, resume, or revoke until the selected settlement head confirms it. |
waitForGasPolicySafetyActionInclusion | waitForGasPolicySafetyActionInclusion(client: GolApiClient, projectId: string, gasPolicyId: `0x${string}`, input: ConfirmGasPolicySafetyActionInput, options?: WaitOptions): Promise<{ status: "confirmed"; policy: GasPolicyRecord; } | SafetyActionObservation> | Resolve as soon as a canonical RPC check reports the owner’s pause, resume, or revoke transaction: included, reverted, orphaned, mismatch, or confirmed once the selected head passes. included is provisional; keep polling with waitForGasPolicySafetyAction for confirmation. |
API request and response types
These aliases are generated from the platform OpenAPI contract, so their shape is exactly the one in the API reference.Operation is the OpenAPI operationId that defines the type.
| Type | Operation | Declaration |
|---|---|---|
ApiKey | platform schema | type ApiKey = components["schemas"]["def-2"] |
ApiKeyIdentityResponse | getApiKeyIdentity | type ApiKeyIdentityResponse = operations["getApiKeyIdentity"]["responses"][200]["content"]["application/json"] |
AuditEvent | platform schema | type AuditEvent = components["schemas"]["def-3"] |
ChildMandateInclusionEvent | platform schema | type ChildMandateInclusionEvent = components["schemas"]["def-15"] |
Eip7702SetupInclusionEvent | platform schema | type Eip7702SetupInclusionEvent = components["schemas"]["def-16"] |
GasExecutionInclusionEvent | platform schema | type GasExecutionInclusionEvent = components["schemas"]["def-13"] |
GasPolicyInclusionEvent | platform schema | type GasPolicyInclusionEvent = components["schemas"]["def-14"] |
Project | platform schema | type Project = components["schemas"]["def-1"] |
Types
GolAgentDelegationsClient
type GolAgentDelegationsClient = ReturnType<typeof createGolAgentDelegationsClient>;
GolAgentDelegationsOptions
interface GolAgentDelegationsOptions {
baseUrl: string;
agentSessionToken: string;
fetch?: typeof fetch;
}
GolApiClientOptions
interface GolApiClientOptions extends GolClientOptions {
apiKey: string;
}
GolClientOptions
interface GolClientOptions {
baseUrl: string;
fetch?: typeof fetch;
}
GolDelegatedTransfer
type GolDelegatedTransfer = Schemas["DelegatedTransfer"];
GolDeviceLoginClient
interface GolDeviceLoginClient {
start(input: {
clientName: string;
clientVersion?: string | null;
}, options?: GolDeviceLoginRequestOptions): Promise<GolResponse<GolDeviceLoginStart>>;
poll(requestId: string, pollSecret: string, options?: GolDeviceLoginRequestOptions): Promise<GolResponse<GolDeviceLoginPoll>>;
}
GolDeviceLoginClientOptions
interface GolDeviceLoginClientOptions {
baseUrl: string;
fetch?: typeof fetch;
}
GolDeviceLoginPoll
type GolDeviceLoginPoll = {
status: "authorized";
sessionToken: `sess_${string}`;
accountId: string | null;
signerAddress: `0x${string}`;
} | {
status: Exclude<GolDeviceLoginStatus, "authorized">;
};
GolDeviceLoginStart
interface GolDeviceLoginStart {
requestId: string;
/** One-time poll credential. Keep it in the local tool; never log or display it. */
pollSecret: string;
userCode: string;
verificationUrl: string;
expiresIn: number;
pollIntervalMs: number;
}
GolExpectedOperationAccount
type GolExpectedOperationAccount = Pick<GolExpectedGrantAccount, "address" | "chainId">;
GolManagementClientOptions
interface GolManagementClientOptions extends GolClientOptions {
sessionToken?: string | null;
}
GolWebhookEvent
interface GolWebhookEvent<Data = unknown> {
/** Stable across retries of this event; use it as the idempotency key. */
id: string;
type: WebhookEventType | (string & {});
createdAt: string;
projectId: string;
environment: "test" | "live";
data: Data;
}
InclusionWebhookEventData
interface InclusionWebhookEventData {
"gas_execution.inclusion_updated": GasExecutionInclusionEvent;
"gas_policy.inclusion_updated": GasPolicyInclusionEvent;
"gas_policy.child_inclusion_updated": ChildMandateInclusionEvent;
"account.eip7702_setup_inclusion_updated": Eip7702SetupInclusionEvent;
}
InclusionWebhookEventType
type InclusionWebhookEventType = "gas_execution.inclusion_updated" | "gas_policy.inclusion_updated" | "gas_policy.child_inclusion_updated" | "account.eip7702_setup_inclusion_updated";
PageOptions
interface PageOptions {
limit?: number;
cursor?: string;
environment?: "test" | "live";
}
WaitOptions
interface WaitOptions {
intervalMs?: number;
timeoutMs?: number;
signal?: AbortSignal;
}
WebhookEventType
type WebhookEventType = WebhookEventEnvelope["type"];
X402DomainReader
type X402DomainReader = (chainId: GolChainId, token: `0x${string}`) => Promise<{
chainId: number;
domainSeparator: string;
}>;
X402PaymentReview
interface X402PaymentReview {
price: string;
asset: string;
payee: string;
network: string;
expiresAt: string;
}