@getclave/lifi-sdk
Version:
LI.FI Any-to-Any Cross-Chain-Swap SDK
41 lines • 1.45 kB
TypeScript
import { type Address, type TypedData, type TypedDataDomain } from 'viem';
export declare const MaxAllowanceTransferAmount: bigint;
export declare const MaxAllowanceExpiration: bigint;
export declare const MaxOrderedNonce: bigint;
export interface PermitDetails {
token: Address;
amount: bigint;
expiration: number;
nonce: number;
}
export interface PermitSingle {
details: PermitDetails;
spender: Address;
sigDeadline: bigint;
}
export interface PermitBatch {
details: PermitDetails[];
spender: Address;
sigDeadline: bigint;
}
export type PermitSingleData = {
domain: TypedDataDomain;
types: TypedData;
message: PermitSingle;
};
export type PermitBatchData = {
domain: TypedDataDomain;
types: TypedData;
message: PermitBatch;
};
export declare function getPermitSingleData(permit: PermitSingle, permit2Address: Address, chainId: number): {
domain: TypedDataDomain;
message: PermitSingle;
};
export declare function getPermitBatchData(permit: PermitBatch, permit2Address: Address, chainId: number): {
domain: TypedDataDomain;
message: PermitBatch;
};
export declare function getPermitData(permit: PermitSingle | PermitBatch, permit2Address: Address, chainId: number): PermitSingleData | PermitBatchData;
export declare function hash(permit: PermitSingle | PermitBatch, permit2Address: Address, chainId: number): string;
//# sourceMappingURL=allowanceTransfer.d.ts.map