-
Notifications
You must be signed in to change notification settings - Fork 6
/
index.d.ts
58 lines (54 loc) · 1.7 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
interface TransactionItem {
canisterId: string;
methodName: string;
args: any;
idl: any;
onSuccess: any;
onFail: any;
updateNextStep: any;
skipCondition: string | string[];
}
type BatchTransactType = {
[key: string]: TransactionItem[];
};
type ConnectObjType = {host: string; whitelist: string[]};
const Artemis = class Artemis {
constructor(connectObj?: ConnectObjType);
accountId: string;
principalId: string;
walletActive: string;
provider: any;
balance: number;
wallets: [];
canisterActors: {};
connectedWalletInfo: {id: string; icon: string; name: string};
connect(wallet: string, connectObj?: ConnectObjType): Promise<string>;
autoConnect(connectObj?: ConnectObjType): Promise<string>;
disconnect(): Promise<any>;
isLoaded(): Promise<any>;
getWalletBalance(returnType: string): Promise<number>;
requestICPTransfer(transferRequest: any): Promise<any>;
getCanisterActor(canisterId: string, idl: any, isAnon: boolean, isForced?: boolean): Promise<any>;
batchTransact(transactions: BatchTransactType): Promise<any>;
trxArray: [TransactionItem[]];
};
const BatchTransact = class BatchTransact {
state: "idle" | "running" | "error" | "done";
transactionLlist: BatchTransactType;
stepsList: string[];
pending: string[];
completed: string[];
previousStep: string;
activeStep: string;
nextStep: () => void;
failedSteps: string[];
transactionResults: {};
trxArray: [];
execute(): any;
retryExecute(): any;
constructor(transactionList: any, artemis: Artemis);
};
const principalIdFromHex: (params: string) => {};
declare module "artemis-web3-adapter" {
export {Artemis, BatchTransact, principalIdFromHex, ArtemisAdapter, TransactionItem, BatchTransactType};
}