petcrypt-js-lite
Version:
Universal sdk for PET functionalities
17 lines (16 loc) • 899 B
TypeScript
import { TokenConfig, PlaintextType } from "../types";
import { Transaction, AddressLike } from "ethers";
export declare class EncryptedToken {
private token;
private chain;
private tokenAddress;
private encryptedTokenAddress;
private wrapperAddress;
private client;
constructor(config: TokenConfig);
getWrappingTxn(fromAddress: AddressLike, amount: BigInt): Array<Transaction>;
getEncryptedTokenApproval(amount: BigInt, amountType: PlaintextType, toAddress: AddressLike): Promise<Transaction>;
getUnWrappingTxn(amount: BigInt, amountType: PlaintextType, toAddress: AddressLike): Promise<Array<Transaction>>;
getTransferFromTxn(fromAddress: AddressLike, toAddress: AddressLike, amount: BigInt, amountType: PlaintextType): Promise<Transaction>;
getTransferTxn(toAddress: AddressLike, amount: BigInt, amountType: PlaintextType): Promise<Transaction>;
}