@paxoslabs/earn-sdk
Version:
Paxos Labs Earn SDK
33 lines (29 loc) • 1.19 kB
text/typescript
import { Address } from 'viem';
import { C as ChainId } from './vault-config-BjSE7oL8.mjs';
/**
* @fileoverview Functions for interacting with the Teller contract
*/
/**
* Arguments required by the bridge contract for cross-chain transfers
* @interface BridgeData
* @property {number} chainSelector - Unique identifier for the destination chain
* @property {Address} destinationChainReceiver - Address that will receive the bridged tokens
* @property {Address} bridgeFeeToken - Token used to pay the bridge fee
* @property {bigint} messageGas - Amount of gas allocated for the cross-chain message
* @property {`0x${string}`} data - Additional data required for the bridge operation (hex encoded)
*/
type BridgeData = {
chainSelector: number;
destinationChainReceiver: Address;
bridgeFeeToken: Address;
messageGas: bigint;
data: `0x${string}`;
};
type GetPreviewFeeProps = {
shareAmount: bigint;
bridgeData: BridgeData;
contractAddress: Address;
chainId: ChainId;
};
declare const getPreviewFee: ({ shareAmount, bridgeData, contractAddress, chainId, }: GetPreviewFeeProps) => Promise<bigint>;
export { type BridgeData as B, getPreviewFee as g };