Type Alias MultichainSmartAccount

MultichainSmartAccount: BaseMultichainSmartAccount & {
    build: (
        params: BuildInstructionTypes,
        currentInstructions?: Instruction[],
    ) => Promise<Instruction[]>;
    buildBridgeInstructions: (
        params: Omit<MultichainBridgingParams, "account">,
    ) => Promise<BridgingInstructions>;
    buildComposable: (
        params: BuildComposableInstructionTypes,
        currentInstructions?: Instruction[],
    ) => Promise<Instruction[]>;
    getUnifiedERC20Balance: (
        mcToken: MultichainToken,
    ) => Promise<UnifiedERC20Balance>;
    isDelegated: (
        parameter?: IsDelegatedParameters,
    ) => Promise<IsDelegatedPayload>;
    queryBridge: (
        params: QueryBridgeParams,
    ) => Promise<BridgeQueryResult | null>;
    toDelegation: () => Promise<MeeAuthorization>;
    unDelegate: (
        parameters?: UnDelegateParameters,
    ) => Promise<UnDelegatePayload>;
    waitForTransactionReceipts: (
        parameters: WaitForTransactionReceiptParameters,
    ) => Promise<WaitForTransactionReceiptPayload>;
}

Type declaration

  • build: (
        params: BuildInstructionTypes,
        currentInstructions?: Instruction[],
    ) => Promise<Instruction[]>

    Function to build instructions for bridging a token across all deployments

    const instructions = await mcAccount.build({
    amount: BigInt(1000),
    mcToken: mcUSDC,
    toChain: base
    })
  • buildBridgeInstructions: (
        params: Omit<MultichainBridgingParams, "account">,
    ) => Promise<BridgingInstructions>

    Function to build instructions for bridging a token across all deployments

    const instructions = await mcAccount.buildBridgeInstructions({
    amount: BigInt(1000),
    mcToken: mcUSDC,
    toChain: base
    })
  • buildComposable: (
        params: BuildComposableInstructionTypes,
        currentInstructions?: Instruction[],
    ) => Promise<Instruction[]>

    Function to build composable instructions

    const instructions = await mcAccount.build({
    amount: BigInt(1000),
    mcToken: mcUSDC,
    toChain: base
    })
  • getUnifiedERC20Balance: (mcToken: MultichainToken) => Promise<UnifiedERC20Balance>

    Function to retrieve the unified ERC20 balance across all deployments

    const balance = await mcAccount.getUnifiedERC20Balance(mcUSDC)
    
  • isDelegated: (parameter?: IsDelegatedParameters) => Promise<IsDelegatedPayload>

    Function to check if the account is delegated

    const isDelegated = await mcAccount.isDelegated()
    
  • queryBridge: (params: QueryBridgeParams) => Promise<BridgeQueryResult | null>

    Function to query the bridge

    const result = await mcAccount.queryBridge({
    amount: BigInt(1000),
    mcToken: mcUSDC,
    toChain: base
    })
  • toDelegation: () => Promise<MeeAuthorization>

    Function to get the delegation data for the account. The chainId will be 0 for multi-chain authorization.

    const delegation = await mcAccount.toDelegation()
    
  • unDelegate: (parameters?: UnDelegateParameters) => Promise<UnDelegatePayload>

    Function to undelegate the account

    const receipts = await mcAccount.unDelegate()
    
  • waitForTransactionReceipts: (
        parameters: WaitForTransactionReceiptParameters,
    ) => Promise<WaitForTransactionReceiptPayload>

    Function to wait for transaction receipts

    const receipts = await mcAccount.waitForTransactionReceipts([hash1, hash2])