@txnlab/use-wallet 0.1.15 → 0.1.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3 @@
1
+ import algosdk from "algosdk";
2
+ declare const algodClient: algosdk.Algodv2;
3
+ export { algosdk, algodClient };
@@ -3,9 +3,7 @@
3
3
  * https://github.com/PureStake/algosigner/blob/develop/docs/dApp-integration.md
4
4
  */
5
5
  import BaseWallet from "./base";
6
- import type { InitAlgodClient } from "./base";
7
6
  import { PROVIDER_ID } from "../constants";
8
- import { providers } from "../providers";
9
7
  import type { WalletProvider } from "../types";
10
8
  import { TransactionsArray } from "../types";
11
9
  declare type AlgoSignerTransaction = {
@@ -33,13 +31,13 @@ declare type AlgoSigner = {
33
31
  declare type InitWallet = {
34
32
  client: AlgoSigner;
35
33
  id: PROVIDER_ID;
36
- providers: typeof providers;
34
+ provider: WalletProvider;
37
35
  };
38
36
  declare class AlgoSignerClient extends BaseWallet {
39
37
  #private;
40
38
  id: PROVIDER_ID;
41
39
  provider: WalletProvider;
42
- constructor(initAlgodClient: InitAlgodClient, initWallet: InitWallet);
40
+ constructor(initWallet: InitWallet);
43
41
  static init(): Promise<AlgoSignerClient>;
44
42
  connect(): Promise<{
45
43
  accounts: {
@@ -58,5 +56,4 @@ declare class AlgoSignerClient extends BaseWallet {
58
56
  signTransactions(activeAdress: string, transactions: Uint8Array[]): Promise<Uint8Array[]>;
59
57
  signEncodedTransactions(transactions: TransactionsArray): Promise<Uint8Array[]>;
60
58
  }
61
- declare const _default: Promise<void | AlgoSignerClient>;
62
- export default _default;
59
+ export default AlgoSignerClient;
@@ -1,21 +1,14 @@
1
- import type _algosdk from "algosdk";
1
+ import { algosdk } from "../algod";
2
2
  import { PROVIDER_ID } from "../constants";
3
3
  import type { WalletProvider, Asset, Wallet, AccountInfo } from "../types";
4
4
  import { ConfirmedTxn } from "../types";
5
5
  import { TransactionsArray, TxnInfo } from "../types";
6
- /** @todo implement audio hack */
7
- export declare type InitAlgodClient = {
8
- algosdk: typeof _algosdk;
9
- token: string;
10
- server: string;
11
- port: string;
12
- };
13
6
  export interface BaseWalletInterface {
14
7
  connect(onDisconnect: () => void): Promise<Wallet>;
15
8
  healthCheck(): Promise<Record<string, never>>;
16
9
  disconnect(): Promise<void>;
17
10
  reconnect(onDisconnect: () => void): Promise<Wallet | null>;
18
- decodeTransaction(txn: string, isSigned: boolean): _algosdk.Transaction;
11
+ decodeTransaction(txn: string, isSigned: boolean): algosdk.Transaction;
19
12
  logEncodedTransaction(txn: string, isSigned: boolean): void;
20
13
  groupTransactionsBySender(transactions: TransactionsArray): Record<string, TxnInfo[]>;
21
14
  signTransactions(activeAddress: string, transactions: Array<Uint8Array>): Promise<Uint8Array[]>;
@@ -28,8 +21,6 @@ export interface BaseWalletInterface {
28
21
  waitForConfirmation(txId: string, timeout?: number): Promise<ConfirmedTxn>;
29
22
  }
30
23
  declare abstract class BaseWallet implements BaseWalletInterface {
31
- algodClient: _algosdk.Algodv2;
32
- algosdk: typeof _algosdk;
33
24
  keepWCAlive: HTMLAudioElement;
34
25
  protected abstract id: PROVIDER_ID;
35
26
  protected abstract provider: WalletProvider;
@@ -38,7 +29,7 @@ declare abstract class BaseWallet implements BaseWalletInterface {
38
29
  abstract reconnect(onDisconnect: () => void): Promise<Wallet | null>;
39
30
  abstract signTransactions(activeAdress: string, transactions: Array<Uint8Array>): Promise<Uint8Array[]>;
40
31
  abstract signEncodedTransactions(transactions: TransactionsArray): Promise<Uint8Array[]>;
41
- protected constructor({ algosdk, token, server, port }: InitAlgodClient);
32
+ protected constructor();
42
33
  healthCheck(): Promise<{}>;
43
34
  getAccountInfo(address: string): Promise<AccountInfo>;
44
35
  getAssets(address: string): Promise<Asset[]>;
@@ -52,7 +43,7 @@ declare abstract class BaseWallet implements BaseWalletInterface {
52
43
  };
53
44
  txId: string;
54
45
  }>;
55
- decodeTransaction: (txn: string, isSigned: boolean) => _algosdk.Transaction;
46
+ decodeTransaction: (txn: string, isSigned: boolean) => algosdk.Transaction;
56
47
  logEncodedTransaction(txn: string, isSigned: boolean): void;
57
48
  groupTransactionsBySender(transactions: TransactionsArray): Record<string, any>;
58
49
  sendRawTransactions(transactions: Uint8Array[]): Promise<{
@@ -1,15 +1,9 @@
1
- /**
2
- * Helpful resources:
3
- * https://github.com/blockshake-io/defly-connect
4
- */
5
- import { providers } from "../providers";
6
1
  import type { WalletProvider, Wallet } from "../types";
7
2
  import { PROVIDER_ID } from "../constants";
8
3
  import type { Transaction } from "algosdk";
9
4
  import BaseWallet from "./base";
10
- import type { InitAlgodClient } from "./base";
11
5
  import { TransactionsArray } from "../types";
12
- import type { DeflyWalletConnect } from "@blockshake/defly-connect";
6
+ import { DeflyWalletConnect } from "@blockshake/defly-connect";
13
7
  export interface DeflyTransaction {
14
8
  txn: Transaction;
15
9
  /**
@@ -22,13 +16,13 @@ export interface DeflyTransaction {
22
16
  declare type InitWallet = {
23
17
  id: PROVIDER_ID;
24
18
  client: DeflyWalletConnect;
25
- providers: typeof providers;
19
+ provider: WalletProvider;
26
20
  };
27
21
  declare class DeflyWalletClient extends BaseWallet {
28
22
  #private;
29
23
  id: PROVIDER_ID;
30
24
  provider: WalletProvider;
31
- constructor(initAlgodClient: InitAlgodClient, initWallet: InitWallet);
25
+ constructor(initWallet: InitWallet);
32
26
  static init(): Promise<DeflyWalletClient>;
33
27
  connect(onDisconnect: () => void): Promise<Wallet>;
34
28
  reconnect(onDisconnect: () => void): Promise<{
@@ -47,5 +41,4 @@ declare class DeflyWalletClient extends BaseWallet {
47
41
  signTransactions(activeAdress: string, transactions: Uint8Array[]): Promise<Uint8Array[]>;
48
42
  signEncodedTransactions(transactions: TransactionsArray): Promise<Uint8Array[]>;
49
43
  }
50
- declare const _default: Promise<void | DeflyWalletClient>;
51
- export default _default;
44
+ export default DeflyWalletClient;
@@ -3,9 +3,7 @@
3
3
  * https://docs.exodus.com/api-reference/algorand-provider-api/
4
4
  */
5
5
  import BaseWallet from "./base";
6
- import type { InitAlgodClient } from "./base";
7
6
  import { PROVIDER_ID } from "../constants";
8
- import { providers } from "../providers";
9
7
  import type { WalletProvider } from "../types";
10
8
  import { TransactionsArray } from "../types";
11
9
  declare type Bytes = Readonly<Uint8Array>;
@@ -24,13 +22,13 @@ declare type Exodus = {
24
22
  declare type InitWallet = {
25
23
  client: Exodus;
26
24
  id: PROVIDER_ID;
27
- providers: typeof providers;
25
+ provider: WalletProvider;
28
26
  };
29
27
  declare class ExodusClient extends BaseWallet {
30
28
  #private;
31
29
  id: PROVIDER_ID;
32
30
  provider: WalletProvider;
33
- constructor(initAlgodClient: InitAlgodClient, initWallet: InitWallet);
31
+ constructor(initWallet: InitWallet);
34
32
  static init(): Promise<ExodusClient>;
35
33
  connect(): Promise<{
36
34
  accounts: {
@@ -48,5 +46,4 @@ declare class ExodusClient extends BaseWallet {
48
46
  signTransactions(activeAdress: string, transactions: Array<Uint8Array>): Promise<Uint8Array[]>;
49
47
  signEncodedTransactions(transactions: TransactionsArray): Promise<Uint8Array[]>;
50
48
  }
51
- declare const _default: Promise<void | ExodusClient>;
52
- export default _default;
49
+ export default ExodusClient;
@@ -1,406 +1,16 @@
1
- import { PROVIDER_ID } from "../constants";
1
+ import peraWalletClient from "./perawallet";
2
+ import myAlgoWalletClient from "./myalgowallet";
3
+ import algoSignerClient from "./algosigner";
4
+ import deflyClient from "./defly";
5
+ import exodusClient from "./exodus";
6
+ import kmdClient from "./kmd";
7
+ import walletconnectClient from "./walletconnect";
2
8
  export declare const clients: {
3
- "KMD Wallet": Promise<void | {
4
- "__#6@#client": import("algosdk").Kmd;
5
- walletId: string;
6
- id: PROVIDER_ID;
7
- provider: import("..").WalletProvider;
8
- connect(): Promise<import("..").Wallet>;
9
- disconnect(): Promise<void>;
10
- reconnect(): Promise<import("..").Wallet | null>;
11
- requestPassword(): Promise<string>;
12
- getWalletToken(walletId: string, password: string): Promise<string>;
13
- releaseToken(token: string): Promise<void>;
14
- listWallets(): Promise<Record<string, string>>;
15
- listAccounts(wallet: string, password: string): Promise<import("..").Account[]>;
16
- signTransactions(activeAddress: string, transactions: Uint8Array[]): Promise<Uint8Array[]>;
17
- signEncodedTransactions(transactions: import("..").TransactionsArray): Promise<Uint8Array[]>;
18
- algodClient: import("algosdk").Algodv2;
19
- algosdk: typeof import("algosdk/dist/types/src/main");
20
- keepWCAlive: HTMLAudioElement;
21
- healthCheck(): Promise<{}>;
22
- getAccountInfo(address: string): Promise<import("..").AccountInfo>;
23
- getAssets(address: string): Promise<import("..").Asset[]>;
24
- waitForConfirmation(txId: string, timeout?: number): Promise<{
25
- "confirmed-round": number;
26
- "global-state-delta": Record<string, unknown>[];
27
- "pool-error": string;
28
- txn: {
29
- sig: Uint8Array;
30
- txn: import("..").Txn;
31
- };
32
- txId: string;
33
- }>;
34
- decodeTransaction: (txn: string, isSigned: boolean) => import("algosdk").Transaction;
35
- logEncodedTransaction(txn: string, isSigned: boolean): void;
36
- groupTransactionsBySender(transactions: import("..").TransactionsArray): Record<string, any>;
37
- sendRawTransactions(transactions: Uint8Array[]): Promise<{
38
- "confirmed-round": number;
39
- "global-state-delta": Record<string, unknown>[];
40
- "pool-error": string;
41
- txn: {
42
- sig: Uint8Array;
43
- txn: import("..").Txn;
44
- };
45
- txId: string;
46
- id: any;
47
- }>;
48
- keepWCAliveStart(): void;
49
- keepWCAliveStop(): void;
50
- }>;
51
- "Pera Wallet": Promise<void | {
52
- "__#1@#client": import("@perawallet/connect/dist/PeraWalletConnect").default;
53
- id: PROVIDER_ID;
54
- provider: import("..").WalletProvider;
55
- connect(onDisconnect: () => void): Promise<import("..").Wallet>;
56
- reconnect(onDisconnect: () => void): Promise<{
57
- accounts: {
58
- name: string;
59
- address: string;
60
- providerId: PROVIDER_ID;
61
- }[];
62
- id: PROVIDER_ID;
63
- name: string;
64
- icon: string;
65
- isWalletConnect: boolean;
66
- } | null>;
67
- disconnect(): Promise<void>;
68
- formatTransactionsArray(transactions: import("..").TransactionsArray): import("./perawallet").PeraTransaction[];
69
- signTransactions(activeAdress: string, transactions: Uint8Array[]): Promise<Uint8Array[]>;
70
- signEncodedTransactions(transactions: import("..").TransactionsArray): Promise<Uint8Array[]>;
71
- algodClient: import("algosdk").Algodv2;
72
- algosdk: typeof import("algosdk/dist/types/src/main");
73
- keepWCAlive: HTMLAudioElement;
74
- healthCheck(): Promise<{}>;
75
- getAccountInfo(address: string): Promise<import("..").AccountInfo>;
76
- getAssets(address: string): Promise<import("..").Asset[]>;
77
- waitForConfirmation(txId: string, timeout?: number): Promise<{
78
- "confirmed-round": number;
79
- "global-state-delta": Record<string, unknown>[];
80
- "pool-error": string;
81
- txn: {
82
- sig: Uint8Array;
83
- txn: import("..").Txn;
84
- };
85
- txId: string;
86
- }>;
87
- decodeTransaction: (txn: string, isSigned: boolean) => import("algosdk").Transaction;
88
- logEncodedTransaction(txn: string, isSigned: boolean): void;
89
- groupTransactionsBySender(transactions: import("..").TransactionsArray): Record<string, any>;
90
- sendRawTransactions(transactions: Uint8Array[]): Promise<{
91
- "confirmed-round": number;
92
- "global-state-delta": Record<string, unknown>[];
93
- "pool-error": string;
94
- txn: {
95
- sig: Uint8Array;
96
- txn: import("..").Txn;
97
- };
98
- txId: string;
99
- id: any;
100
- }>;
101
- keepWCAliveStart(): void;
102
- keepWCAliveStop(): void;
103
- }>;
104
- "MyAlgo Wallet": Promise<void | {
105
- "__#2@#client": import("@randlabs/myalgo-connect").default;
106
- id: PROVIDER_ID;
107
- provider: import("..").WalletProvider;
108
- connect(): Promise<{
109
- accounts: {
110
- providerId: PROVIDER_ID;
111
- address: string;
112
- name: string;
113
- }[];
114
- id: PROVIDER_ID;
115
- name: string;
116
- icon: string;
117
- isWalletConnect: boolean;
118
- }>;
119
- reconnect(): Promise<null>;
120
- disconnect(): Promise<void>;
121
- signTransactions(activeAdress: string, transactions: Uint8Array[]): Promise<Uint8Array[]>;
122
- signEncodedTransactions(transactions: import("..").TransactionsArray): Promise<Uint8Array[]>;
123
- algodClient: import("algosdk").Algodv2;
124
- algosdk: typeof import("algosdk/dist/types/src/main");
125
- keepWCAlive: HTMLAudioElement;
126
- healthCheck(): Promise<{}>;
127
- getAccountInfo(address: string): Promise<import("..").AccountInfo>;
128
- getAssets(address: string): Promise<import("..").Asset[]>;
129
- waitForConfirmation(txId: string, timeout?: number): Promise<{
130
- "confirmed-round": number;
131
- "global-state-delta": Record<string, unknown>[];
132
- "pool-error": string;
133
- txn: {
134
- sig: Uint8Array;
135
- txn: import("..").Txn;
136
- };
137
- txId: string;
138
- }>;
139
- decodeTransaction: (txn: string, isSigned: boolean) => import("algosdk").Transaction;
140
- logEncodedTransaction(txn: string, isSigned: boolean): void;
141
- groupTransactionsBySender(transactions: import("..").TransactionsArray): Record<string, any>;
142
- sendRawTransactions(transactions: Uint8Array[]): Promise<{
143
- "confirmed-round": number;
144
- "global-state-delta": Record<string, unknown>[];
145
- "pool-error": string;
146
- txn: {
147
- sig: Uint8Array;
148
- txn: import("..").Txn;
149
- };
150
- txId: string;
151
- id: any;
152
- }>;
153
- keepWCAliveStart(): void;
154
- keepWCAliveStop(): void;
155
- }>;
156
- "Algo Signer": Promise<void | {
157
- "__#3@#client": {
158
- connect: () => Promise<Record<string, never>>;
159
- accounts: (ledger: {
160
- ledger: string;
161
- }) => Promise<{
162
- address: string;
163
- }[]>;
164
- signTxn: (transactions: {
165
- txn: string;
166
- signers?: [] | undefined;
167
- multisig?: string | undefined;
168
- }[]) => Promise<{
169
- txID: string;
170
- blob: string;
171
- }[]>;
172
- encoding: {
173
- msgpackToBase64(transaction: Uint8Array): string;
174
- byteArrayToString(transaction: Uint8Array): string;
175
- };
176
- };
177
- id: PROVIDER_ID;
178
- provider: import("..").WalletProvider;
179
- connect(): Promise<{
180
- accounts: {
181
- name: string;
182
- address: string;
183
- providerId: PROVIDER_ID;
184
- }[];
185
- id: PROVIDER_ID;
186
- name: string;
187
- icon: string;
188
- isWalletConnect: boolean;
189
- }>;
190
- reconnect(onDisconnect: () => void): Promise<null>;
191
- disconnect(): Promise<void>;
192
- formatTransactionsArray(transactions: import("..").TransactionsArray): {
193
- txn: string;
194
- signers?: [] | undefined;
195
- multisig?: string | undefined;
196
- }[];
197
- signTransactions(activeAdress: string, transactions: Uint8Array[]): Promise<Uint8Array[]>;
198
- signEncodedTransactions(transactions: import("..").TransactionsArray): Promise<Uint8Array[]>;
199
- algodClient: import("algosdk").Algodv2;
200
- algosdk: typeof import("algosdk/dist/types/src/main");
201
- keepWCAlive: HTMLAudioElement;
202
- healthCheck(): Promise<{}>;
203
- getAccountInfo(address: string): Promise<import("..").AccountInfo>;
204
- getAssets(address: string): Promise<import("..").Asset[]>;
205
- waitForConfirmation(txId: string, timeout?: number): Promise<{
206
- "confirmed-round": number;
207
- "global-state-delta": Record<string, unknown>[];
208
- "pool-error": string;
209
- txn: {
210
- sig: Uint8Array;
211
- txn: import("..").Txn;
212
- };
213
- txId: string;
214
- }>;
215
- decodeTransaction: (txn: string, isSigned: boolean) => import("algosdk").Transaction;
216
- logEncodedTransaction(txn: string, isSigned: boolean): void;
217
- groupTransactionsBySender(transactions: import("..").TransactionsArray): Record<string, any>;
218
- sendRawTransactions(transactions: Uint8Array[]): Promise<{
219
- "confirmed-round": number;
220
- "global-state-delta": Record<string, unknown>[];
221
- "pool-error": string;
222
- txn: {
223
- sig: Uint8Array;
224
- txn: import("..").Txn;
225
- };
226
- txId: string;
227
- id: any;
228
- }>;
229
- keepWCAliveStart(): void;
230
- keepWCAliveStop(): void;
231
- }>;
232
- Defly: Promise<void | {
233
- "__#4@#client": import("@blockshake/defly-connect/dist/DeflyWalletConnect").default;
234
- id: PROVIDER_ID;
235
- provider: import("..").WalletProvider;
236
- connect(onDisconnect: () => void): Promise<import("..").Wallet>;
237
- reconnect(onDisconnect: () => void): Promise<{
238
- accounts: {
239
- name: string;
240
- address: string;
241
- providerId: PROVIDER_ID;
242
- }[];
243
- id: PROVIDER_ID;
244
- name: string;
245
- icon: string;
246
- isWalletConnect: boolean;
247
- } | null>;
248
- disconnect(): Promise<void>;
249
- formatTransactionsArray(transactions: import("..").TransactionsArray): import("./defly").DeflyTransaction[];
250
- signTransactions(activeAdress: string, transactions: Uint8Array[]): Promise<Uint8Array[]>;
251
- signEncodedTransactions(transactions: import("..").TransactionsArray): Promise<Uint8Array[]>;
252
- algodClient: import("algosdk").Algodv2;
253
- algosdk: typeof import("algosdk/dist/types/src/main");
254
- keepWCAlive: HTMLAudioElement;
255
- healthCheck(): Promise<{}>;
256
- getAccountInfo(address: string): Promise<import("..").AccountInfo>;
257
- getAssets(address: string): Promise<import("..").Asset[]>;
258
- waitForConfirmation(txId: string, timeout?: number): Promise<{
259
- "confirmed-round": number;
260
- "global-state-delta": Record<string, unknown>[];
261
- "pool-error": string;
262
- txn: {
263
- sig: Uint8Array;
264
- txn: import("..").Txn;
265
- };
266
- txId: string;
267
- }>;
268
- decodeTransaction: (txn: string, isSigned: boolean) => import("algosdk").Transaction;
269
- logEncodedTransaction(txn: string, isSigned: boolean): void;
270
- groupTransactionsBySender(transactions: import("..").TransactionsArray): Record<string, any>;
271
- sendRawTransactions(transactions: Uint8Array[]): Promise<{
272
- "confirmed-round": number;
273
- "global-state-delta": Record<string, unknown>[];
274
- "pool-error": string;
275
- txn: {
276
- sig: Uint8Array;
277
- txn: import("..").Txn;
278
- };
279
- txId: string;
280
- id: any;
281
- }>;
282
- keepWCAliveStart(): void;
283
- keepWCAliveStop(): void;
284
- }>;
285
- Exodus: Promise<void | {
286
- "__#5@#client": {
287
- isConnected: boolean;
288
- address: string | null;
289
- connect: () => Promise<{
290
- address: string;
291
- }>;
292
- disconnect: () => void;
293
- signAndSendTransaction(transactions: Readonly<Uint8Array>[]): Promise<{
294
- txId: string;
295
- }>;
296
- signTransaction(transactions: Readonly<Uint8Array>[]): Promise<Readonly<Uint8Array>[]>;
297
- };
298
- id: PROVIDER_ID;
299
- provider: import("..").WalletProvider;
300
- connect(): Promise<{
301
- accounts: {
302
- name: string;
303
- address: string;
304
- providerId: PROVIDER_ID;
305
- }[];
306
- id: PROVIDER_ID;
307
- name: string;
308
- icon: string;
309
- isWalletConnect: boolean;
310
- }>;
311
- reconnect(onDisconnect: () => void): Promise<null>;
312
- disconnect(): Promise<void>;
313
- signTransactions(activeAdress: string, transactions: Uint8Array[]): Promise<Uint8Array[]>;
314
- signEncodedTransactions(transactions: import("..").TransactionsArray): Promise<Uint8Array[]>;
315
- algodClient: import("algosdk").Algodv2;
316
- algosdk: typeof import("algosdk/dist/types/src/main");
317
- keepWCAlive: HTMLAudioElement;
318
- healthCheck(): Promise<{}>;
319
- getAccountInfo(address: string): Promise<import("..").AccountInfo>;
320
- getAssets(address: string): Promise<import("..").Asset[]>;
321
- waitForConfirmation(txId: string, timeout?: number): Promise<{
322
- "confirmed-round": number;
323
- "global-state-delta": Record<string, unknown>[];
324
- "pool-error": string;
325
- txn: {
326
- sig: Uint8Array;
327
- txn: import("..").Txn;
328
- };
329
- txId: string;
330
- }>;
331
- decodeTransaction: (txn: string, isSigned: boolean) => import("algosdk").Transaction;
332
- logEncodedTransaction(txn: string, isSigned: boolean): void;
333
- groupTransactionsBySender(transactions: import("..").TransactionsArray): Record<string, any>;
334
- sendRawTransactions(transactions: Uint8Array[]): Promise<{
335
- "confirmed-round": number;
336
- "global-state-delta": Record<string, unknown>[];
337
- "pool-error": string;
338
- txn: {
339
- sig: Uint8Array;
340
- txn: import("..").Txn;
341
- };
342
- txId: string;
343
- id: any;
344
- }>;
345
- keepWCAliveStart(): void;
346
- keepWCAliveStop(): void;
347
- }>;
348
- "Wallet Connect": Promise<void | {
349
- "__#7@#client": import("@walletconnect/client").default;
350
- id: PROVIDER_ID;
351
- provider: import("..").WalletProvider;
352
- connect(): Promise<import("..").Wallet>;
353
- reconnect(): Promise<{
354
- accounts: {
355
- name: string;
356
- address: string;
357
- providerId: PROVIDER_ID;
358
- }[];
359
- id: PROVIDER_ID;
360
- name: string;
361
- icon: string;
362
- isWalletConnect: boolean;
363
- } | null>;
364
- check(): boolean;
365
- disconnect(): Promise<void>;
366
- formatTransactionsArray(transactions: import("..").TransactionsArray): {
367
- txn: string;
368
- message?: string | undefined;
369
- signers?: [] | string[] | undefined;
370
- }[];
371
- signTransactions(activeAdress: string, transactions: Uint8Array[]): Promise<Uint8Array[]>;
372
- signEncodedTransactions(transactions: import("..").TransactionsArray): Promise<Uint8Array[]>;
373
- algodClient: import("algosdk").Algodv2;
374
- algosdk: typeof import("algosdk/dist/types/src/main");
375
- keepWCAlive: HTMLAudioElement;
376
- healthCheck(): Promise<{}>;
377
- getAccountInfo(address: string): Promise<import("..").AccountInfo>;
378
- getAssets(address: string): Promise<import("..").Asset[]>;
379
- waitForConfirmation(txId: string, timeout?: number): Promise<{
380
- "confirmed-round": number;
381
- "global-state-delta": Record<string, unknown>[];
382
- "pool-error": string;
383
- txn: {
384
- sig: Uint8Array;
385
- txn: import("..").Txn;
386
- };
387
- txId: string;
388
- }>;
389
- decodeTransaction: (txn: string, isSigned: boolean) => import("algosdk").Transaction;
390
- logEncodedTransaction(txn: string, isSigned: boolean): void;
391
- groupTransactionsBySender(transactions: import("..").TransactionsArray): Record<string, any>;
392
- sendRawTransactions(transactions: Uint8Array[]): Promise<{
393
- "confirmed-round": number;
394
- "global-state-delta": Record<string, unknown>[];
395
- "pool-error": string;
396
- txn: {
397
- sig: Uint8Array;
398
- txn: import("..").Txn;
399
- };
400
- txId: string;
401
- id: any;
402
- }>;
403
- keepWCAliveStart(): void;
404
- keepWCAliveStop(): void;
405
- }>;
9
+ "KMD Wallet": typeof kmdClient;
10
+ "Pera Wallet": typeof peraWalletClient;
11
+ "MyAlgo Wallet": typeof myAlgoWalletClient;
12
+ "Algo Signer": typeof algoSignerClient;
13
+ Defly: typeof deflyClient;
14
+ Exodus: typeof exodusClient;
15
+ "Wallet Connect": typeof walletconnectClient;
406
16
  };
@@ -1,21 +1,19 @@
1
1
  import type { Kmd } from "algosdk";
2
2
  import BaseWallet from "./base";
3
- import type { InitAlgodClient } from "./base";
4
3
  import { PROVIDER_ID } from "../constants";
5
- import { providers } from "../providers";
6
4
  import type { Account, Wallet, WalletProvider } from "../types";
7
5
  import { TransactionsArray } from "../types";
8
6
  declare type InitWallet = {
9
7
  client: Kmd;
10
8
  id: PROVIDER_ID;
11
- providers: typeof providers;
9
+ provider: WalletProvider;
12
10
  };
13
11
  declare class KMDWallet extends BaseWallet {
14
12
  #private;
15
13
  walletId: string;
16
14
  id: PROVIDER_ID;
17
15
  provider: WalletProvider;
18
- constructor(initAlgodClient: InitAlgodClient, initWallet: InitWallet);
16
+ constructor(initWallet: InitWallet);
19
17
  static init(): Promise<KMDWallet>;
20
18
  connect(): Promise<Wallet>;
21
19
  disconnect(): Promise<void>;
@@ -28,5 +26,4 @@ declare class KMDWallet extends BaseWallet {
28
26
  signTransactions(activeAddress: string, transactions: Uint8Array[]): Promise<Uint8Array[]>;
29
27
  signEncodedTransactions(transactions: TransactionsArray): Promise<Uint8Array[]>;
30
28
  }
31
- declare const _default: Promise<void | KMDWallet>;
32
- export default _default;
29
+ export default KMDWallet;
@@ -3,22 +3,20 @@
3
3
  * https://github.com/randlabs/myalgo-connect
4
4
  */
5
5
  import BaseWallet from "./base";
6
- import type MyAlgoConnect from "@randlabs/myalgo-connect";
7
- import type { InitAlgodClient } from "./base";
6
+ import MyAlgoConnect from "@randlabs/myalgo-connect";
8
7
  import { PROVIDER_ID } from "../constants";
9
- import { providers } from "../providers";
10
8
  import type { WalletProvider } from "../types";
11
9
  import { TransactionsArray } from "../types";
12
10
  declare type InitWallet = {
13
11
  id: PROVIDER_ID;
14
12
  client: MyAlgoConnect;
15
- providers: typeof providers;
13
+ provider: WalletProvider;
16
14
  };
17
15
  declare class MyAlgoWalletClient extends BaseWallet {
18
16
  #private;
19
17
  id: PROVIDER_ID;
20
18
  provider: WalletProvider;
21
- constructor(initAlgodClient: InitAlgodClient, initWallet: InitWallet);
19
+ constructor(initWallet: InitWallet);
22
20
  static init(): Promise<MyAlgoWalletClient>;
23
21
  connect(): Promise<{
24
22
  accounts: {
@@ -36,5 +34,4 @@ declare class MyAlgoWalletClient extends BaseWallet {
36
34
  signTransactions(activeAdress: string, transactions: Uint8Array[]): Promise<Uint8Array[]>;
37
35
  signEncodedTransactions(transactions: TransactionsArray): Promise<Uint8Array[]>;
38
36
  }
39
- declare const _default: Promise<void | MyAlgoWalletClient>;
40
- export default _default;
37
+ export default MyAlgoWalletClient;