@0xtemple/client
Version:
Tookit for interacting with vara eps framework
94 lines (93 loc) • 2.4 kB
TypeScript
import type { SubmittableExtrinsic } from '@polkadot/api/submittable/types';
export type NodeUrlType = {
ws: string;
http: string;
};
export type TemplesParams = {
mnemonics?: string;
secretKey?: string;
fullnodeUrls?: NodeUrlType[];
networkType?: Network;
packageId?: string;
metadata?: string;
connectWs?: boolean;
};
export type SchemaFieldType = {
schemas: {
type: string;
fields: {
id: {
id: string;
};
size: string;
};
};
};
export type SchemaValueType = {
id: {
id: string;
};
name: string;
value: {
type: string;
fields: SchemaFieldType;
};
};
export type SchemaContentType = {
type: string;
fields: SchemaValueType;
hasPublicTransfer: boolean;
dataType: 'moveObject';
};
export type VaraFuncType = {
funcName: string;
paramType: string;
};
export interface MessageMeta {
readonly meta: VaraFuncType;
}
export interface ContractTx extends MessageMeta {
(params?: unknown[] | null, isRaw?: boolean): SubmittableExtrinsic;
}
export interface ContractQuery extends MessageMeta {
(params?: unknown[] | null): any;
}
export type MapMessageTx = Record<string, ContractTx>;
export type MapMessageQuery = Record<string, ContractQuery>;
export type MapMoudleFuncTx = Record<string, MapMessageTx>;
export type MapMoudleFuncQuery = Record<string, MapMessageQuery>;
export type AccountMangerParams = {
mnemonics?: string;
secretKey?: string;
};
export type DerivePathParams = {
accountIndex?: number;
isExternal?: boolean;
addressIndex?: number;
};
export declare enum Network {
MAINNET = "mainnet",
TESTNET = "testnet",
LOCAL = "local"
}
export type FaucetNetworkType = 'testnet' | 'devnet' | 'localnet';
export type PureCallArg = {
Pure: number[];
};
/**
* These are the basics types that can be used in the SUI
*/
export type VaraBasicTypes = 'address' | 'bool' | 'u8' | 'u16' | 'u32' | 'u64' | 'u128' | 'u256' | 'signer';
export type VaraInputTypes = 'object' | VaraBasicTypes;
export type DynamicFieldContentType = {
type: string;
fields: Record<string, any>;
hasPublicTransfer: boolean;
dataType: string;
};
export type ObjectContent = {
type: string;
fields: Record<string, any>;
hasPublicTransfer: boolean;
dataType: string;
};