petcrypt-js-lite
Version:
Universal sdk for PET functionalities
63 lines (62 loc) • 1.39 kB
TypeScript
/// <reference types="node" />
/// <reference types="node" />
import { AddressLike } from "ethers";
import { SUPPORTED_TOKENS, SUPPORTED_CHAINS } from "../constants";
export interface TokenConfig {
token: SUPPORTED_TOKENS;
chains: SUPPORTED_CHAINS;
}
export type ClientConfig = {
teeGatewayUrl: string;
};
export type Payload = {
cipher: Buffer;
data_type: PlaintextType;
};
export type Plaintext = number | bigint | string;
export declare enum PlaintextType {
uint8 = 0,
uint16 = 1,
uint32 = 2,
uint64 = 3,
uint128 = 4,
address = 5,
uint256 = 6,
string = 7,
bytes2 = 8,
bytes4 = 9,
bytes8 = 10,
bytes16 = 11,
bytes32 = 12
}
export declare namespace PlaintextType {
function isUint(type: PlaintextType): boolean;
function isBytes(type: PlaintextType): boolean;
function isString(type: PlaintextType): boolean;
}
export declare const TYPE_LIMIT: {
0: number;
1: number;
2: number;
3: bigint;
4: bigint;
6: bigint;
};
export declare const TYPE_LIMIT_MESSAGE: {
0: string;
1: string;
2: string;
3: string;
4: string;
6: string;
};
export type BalanceParams = {
address: AddressLike;
token: SUPPORTED_TOKENS;
chain: SUPPORTED_CHAINS;
};
export type UnWrappingParams = {
fromAddress: AddressLike;
toAddress: AddressLike;
amount: BigInt;
};