UNPKG

ulysses-actions-sdk

Version:

An sdk for interacting with contracts using Ulysses Protocol

52 lines (51 loc) 3.27 kB
import { ITokenDepositParams, ITokenSettlementParams } from 'ulysses-sdk'; /** * A step in a cross-chain transaction path. (e.g. Source Chain -> Root Chain -> Destination Chain amount to 3 steps). * @param to The recipient's address for the transaction. * @param calldata The transaction data (e.g., encoded function call). * @param provider The target chain ether provider object to use (`providers.JsonRpcProvider`). * @param chainId The target chain id. */ export interface StepData { to: string; calldata: string; baseGas: string; chainId: number; } /** * Encodes the calldata for a Layer Zero endpoint. */ export declare class LayerZeroEndpointCalldataEncoder { private useVirtualAccount; private useFallback; private useRootAsOrigin; private rootChainId; private originChainId; private dstChainId?; private branchBridgeAgentAddress?; private rootBridgeAgentAddress?; private destinationBridgeAgentAddress?; private branchBridgeAgentNonce?; private rootBridgeAgentNonce?; private destinationBridgeAgentNonce?; private rootRouterParams?; private destinationRouterParams?; private depositTokens?; private settlementTokens?; private settlementOverrideAmounts?; private account?; private settlementRecipient?; private settlementOwnerAndRefundee?; private rootChainIdLz; private originChainIdLz; private dstChainIdLz?; constructor(useVirtualAccount: boolean, useFallback: boolean, useRootAsOrigin: boolean, rootChainId: number, originChainId: number, dstChainId?: number | undefined, branchBridgeAgentAddress?: string | undefined, rootBridgeAgentAddress?: string | undefined, destinationBridgeAgentAddress?: string | undefined, branchBridgeAgentNonce?: number | undefined, rootBridgeAgentNonce?: number | undefined, destinationBridgeAgentNonce?: number | undefined, rootRouterParams?: string | undefined, destinationRouterParams?: string | undefined, depositTokens?: ITokenDepositParams | undefined, settlementTokens?: ITokenSettlementParams | undefined, settlementOverrideAmounts?: string[], account?: string | undefined, settlementRecipient?: string | undefined, settlementOwnerAndRefundee?: string | undefined); validateParameters(): void; encode(): StepData[]; encodeCalldataForRootChain(useVirtualAccount: boolean, account: string, useFallback: boolean, branchBridgeAgentNonce: number, branchBridgeAgentAddress: string, rootBridgeAgentAddress: string, _originChainId: number, originChainIdLz: number, rootRouterParams?: string | undefined, depositTokens?: ITokenDepositParams | undefined): StepData[]; encodeCalldataForBranchChain(recipient: string, settlementOwnerAndGasRefundee: string, useFallback: boolean, rootBridgeAgentNonce: number, branchBridgeAgentAddress: string, rootBridgeAgentAddress: string, dstChainId?: number | undefined, dstChainIdLz?: number | undefined, destinationRouterParams?: string | undefined, settlementTokens?: ITokenSettlementParams | undefined, settlementOverrideAmounts?: string[]): StepData[]; private isSingleSettlementParams; private isMultipleSettlementParams; private isSingleDepositParams; private isMultipleDepositParams; }