Skip to main content

Bridge action envelopes

Version: V2
View Markdown

API for @0xintuition/sdk@4.1.0. Compatibility · Source.

Import from @0xintuition/sdk/actions.

Signatures show the exact accepted inputs and return types. Named input/output structures and dependency-injection types are listed below; viem and protocol types come from their respective packages. Preparation and quote functions can perform RPC reads. Envelope builders on the action-envelope pages use caller-supplied read context and perform no RPC reads or signing. feeProxyExecutePlan sends transactions; the other SDK actions on these pages prepare transactions or read data.

baseTrustBridgeToIntuitionEnvelope​

Encode approval and Base-to-Intuition TRUST bridge steps using supplied allowance and fee context, without RPC or signing.

Source

function baseTrustBridgeToIntuitionEnvelope(
inputs: BuildBaseTrustBridgeToIntuitionPlanInputs,
): Promise<import('@0xintuition/sdk/actions').AgentActionEnvelope>;

intuitionTrustBridgeToBaseEnvelope​

Encode Intuition-to-Base TRUST bridge steps using supplied fee context, without RPC or signing.

Source

function intuitionTrustBridgeToBaseEnvelope(
inputs: BuildIntuitionTrustBridgeToBasePlanInputs,
): Promise<import('@0xintuition/sdk/actions').AgentActionEnvelope>;

baseERC20BridgeToIntuitionEnvelope​

Encode ERC-20 approval and bridge steps from Base using supplied allowance and fee context.

Source

function baseERC20BridgeToIntuitionEnvelope(
inputs: BuildBaseERC20BridgeToIntuitionPlanInputs,
): Promise<import('@0xintuition/sdk/actions').AgentActionEnvelope>;

intuitionERC20BridgeToBaseEnvelope​

Encode ERC-20 approval and bridge steps from Intuition using supplied allowance and fee context.

Source

function intuitionERC20BridgeToBaseEnvelope(
inputs: BuildIntuitionERC20BridgeToBasePlanInputs,
): Promise<import('@0xintuition/sdk/actions').AgentActionEnvelope>;

Imported type provenance​

Public import locations and the definitions used by these signatures and helper types. Value imports appear where a dependency hook uses typeof.

Name in this modulePublic importDefinition
MetaBridgeAssetimport type { MetaBridgeAsset } from '@0xintuition/periphery'Source definition
Addressimport type { Address } from 'viem'Owned by the external package.

Input and result types​

Exported declarations are public imports from the SDK subpath above. Module-local helper aliases describe accepted shapes but are not public exports.

BridgeFeeReadContext​

Public export.

export type BridgeFeeReadContext = {
bridgeFee?: bigint;
};

ApprovalBridgePlanReadContext​

Public export.

export type ApprovalBridgePlanReadContext = BridgeFeeReadContext & {
currentAllowance?: bigint;
};

BaseTrustBridgePlanReadContext​

Public export.

export type BaseTrustBridgePlanReadContext = ApprovalBridgePlanReadContext;

BuildBaseTrustBridgeToIntuitionPlanInputs​

Public export.

export type BuildBaseTrustBridgeToIntuitionPlanInputs = {
owner: Address;
recipient: Address;
trustAmount: bigint;
trustAddress?: Address;
readContext?: BaseTrustBridgePlanReadContext;
};

BuildIntuitionTrustBridgeToBasePlanInputs​

Public export.

export type BuildIntuitionTrustBridgeToBasePlanInputs = {
owner: Address;
recipient: Address;
trustAmount: bigint;
metaNativeSpokeAddress?: Address;
readContext?: BridgeFeeReadContext;
};

BuildBaseERC20BridgeToIntuitionPlanInputs​

Public export.

export type BuildBaseERC20BridgeToIntuitionPlanInputs = {
owner: Address;
recipient: Address;
asset: MetaBridgeAsset;
amount: bigint;
assetAddress?: Address;
metaERC20HubAddress?: Address;
readContext?: ApprovalBridgePlanReadContext;
};

BuildIntuitionERC20BridgeToBasePlanInputs​

Public export.

export type BuildIntuitionERC20BridgeToBasePlanInputs = {
owner: Address;
recipient: Address;
asset: MetaBridgeAsset;
amount: bigint;
metaERC20SpokeAddress?: Address;
readContext?: BridgeFeeReadContext;
};

Applies to V2 · @0xintuition/sdk 4.1.0