@txnlab/use-wallet 1.2.7 → 1.2.9
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.
- package/README.md +2 -0
- package/dist/cjs/clients/algosigner/index.d.ts +1 -1
- package/dist/cjs/clients/base/base.d.ts +11 -11
- package/dist/cjs/clients/base/index.d.ts +1 -1
- package/dist/cjs/clients/defly/client.d.ts +7 -7
- package/dist/cjs/clients/defly/index.d.ts +1 -1
- package/dist/cjs/clients/defly/types.d.ts +4 -4
- package/dist/cjs/clients/exodus/client.d.ts +6 -6
- package/dist/cjs/clients/exodus/index.d.ts +1 -1
- package/dist/cjs/clients/exodus/types.d.ts +3 -3
- package/dist/cjs/clients/index.d.ts +9 -9
- package/dist/cjs/clients/kmd/client.d.ts +7 -7
- package/dist/cjs/clients/kmd/index.d.ts +1 -1
- package/dist/cjs/clients/kmd/types.d.ts +3 -3
- package/dist/cjs/clients/mnemonic/client.d.ts +20 -10
- package/dist/cjs/clients/mnemonic/index.d.ts +1 -1
- package/dist/cjs/clients/mnemonic/types.d.ts +3 -3
- package/dist/cjs/clients/myalgo/client.d.ts +6 -6
- package/dist/cjs/clients/myalgo/index.d.ts +1 -1
- package/dist/cjs/clients/myalgo/types.d.ts +3 -3
- package/dist/cjs/clients/pera/client.d.ts +6 -6
- package/dist/cjs/clients/pera/index.d.ts +1 -1
- package/dist/cjs/clients/pera/types.d.ts +4 -4
- package/dist/cjs/clients/walletconnect/client.d.ts +6 -6
- package/dist/cjs/clients/walletconnect/index.d.ts +1 -1
- package/dist/cjs/clients/walletconnect/types.d.ts +4 -4
- package/dist/cjs/constants/constants.d.ts +1 -1
- package/dist/cjs/constants/index.d.ts +1 -1
- package/dist/cjs/hooks/index.d.ts +1 -1
- package/dist/cjs/hooks/useWallet.d.ts +9 -7
- package/dist/cjs/index.d.ts +6 -6
- package/dist/cjs/index.js +263 -268
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/store/index.d.ts +2 -2
- package/dist/cjs/store/state/clientStore.d.ts +1 -1
- package/dist/cjs/store/state/walletStore.d.ts +2 -2
- package/dist/cjs/types/api.d.ts +5 -2
- package/dist/cjs/types/index.d.ts +3 -3
- package/dist/cjs/types/node.d.ts +6 -6
- package/dist/cjs/types/wallet.d.ts +2 -2
- package/dist/cjs/utils/clearAccounts.d.ts +1 -1
- package/dist/cjs/utils/encodeNFDTransactionsArray.d.ts +1 -1
- package/dist/cjs/utils/index.d.ts +3 -3
- package/dist/cjs/utils/initializeProviders.d.ts +2 -2
- package/dist/cjs/utils/providers.d.ts +1 -1
- package/dist/cjs/utils/reconnectProviders.d.ts +1 -1
- package/dist/esm/clients/algosigner/index.d.ts +1 -1
- package/dist/esm/clients/base/base.d.ts +11 -11
- package/dist/esm/clients/base/index.d.ts +1 -1
- package/dist/esm/clients/defly/client.d.ts +7 -7
- package/dist/esm/clients/defly/index.d.ts +1 -1
- package/dist/esm/clients/defly/types.d.ts +4 -4
- package/dist/esm/clients/exodus/client.d.ts +6 -6
- package/dist/esm/clients/exodus/index.d.ts +1 -1
- package/dist/esm/clients/exodus/types.d.ts +3 -3
- package/dist/esm/clients/index.d.ts +9 -9
- package/dist/esm/clients/kmd/client.d.ts +7 -7
- package/dist/esm/clients/kmd/index.d.ts +1 -1
- package/dist/esm/clients/kmd/types.d.ts +3 -3
- package/dist/esm/clients/mnemonic/client.d.ts +20 -10
- package/dist/esm/clients/mnemonic/index.d.ts +1 -1
- package/dist/esm/clients/mnemonic/types.d.ts +3 -3
- package/dist/esm/clients/myalgo/client.d.ts +6 -6
- package/dist/esm/clients/myalgo/index.d.ts +1 -1
- package/dist/esm/clients/myalgo/types.d.ts +3 -3
- package/dist/esm/clients/pera/client.d.ts +6 -6
- package/dist/esm/clients/pera/index.d.ts +1 -1
- package/dist/esm/clients/pera/types.d.ts +4 -4
- package/dist/esm/clients/walletconnect/client.d.ts +6 -6
- package/dist/esm/clients/walletconnect/index.d.ts +1 -1
- package/dist/esm/clients/walletconnect/types.d.ts +4 -4
- package/dist/esm/constants/constants.d.ts +1 -1
- package/dist/esm/constants/index.d.ts +1 -1
- package/dist/esm/hooks/index.d.ts +1 -1
- package/dist/esm/hooks/useWallet.d.ts +9 -7
- package/dist/esm/index.d.ts +6 -6
- package/dist/esm/index.js +263 -268
- package/dist/esm/store/index.d.ts +2 -2
- package/dist/esm/store/state/clientStore.d.ts +1 -1
- package/dist/esm/store/state/walletStore.d.ts +2 -2
- package/dist/esm/types/api.d.ts +5 -2
- package/dist/esm/types/index.d.ts +3 -3
- package/dist/esm/types/node.d.ts +6 -6
- package/dist/esm/types/wallet.d.ts +2 -2
- package/dist/esm/utils/clearAccounts.d.ts +1 -1
- package/dist/esm/utils/encodeNFDTransactionsArray.d.ts +1 -1
- package/dist/esm/utils/index.d.ts +3 -3
- package/dist/esm/utils/initializeProviders.d.ts +2 -2
- package/dist/esm/utils/providers.d.ts +1 -1
- package/dist/esm/utils/reconnectProviders.d.ts +1 -1
- package/dist/index.d.ts +56 -43
- package/package.json +2 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export { default as WalletProvider } from
|
|
1
|
+
export * from './state/walletStore';
|
|
2
|
+
export { default as WalletProvider } from './state/clientStore';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Account } from
|
|
2
|
-
import { PROVIDER_ID } from
|
|
1
|
+
import type { Account } from '../../types';
|
|
2
|
+
import { PROVIDER_ID } from '../../constants';
|
|
3
3
|
export declare const walletStoreSelector: (state: WalletStore) => {
|
|
4
4
|
accounts: Account[];
|
|
5
5
|
activeAccount: Account | null | undefined;
|
package/dist/esm/types/api.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { TxnType } from
|
|
2
|
-
export declare type TransactionsArray = [
|
|
1
|
+
import { TxnType } from './node';
|
|
2
|
+
export declare type TransactionsArray = ['u' | 's', string][];
|
|
3
3
|
export declare type TxnInfo = {
|
|
4
4
|
groupIndex: number;
|
|
5
5
|
amount: number;
|
|
@@ -9,3 +9,6 @@ export declare type TxnInfo = {
|
|
|
9
9
|
txn: string;
|
|
10
10
|
signedTxn?: Uint8Array;
|
|
11
11
|
};
|
|
12
|
+
export declare type RawTxnResponse = {
|
|
13
|
+
txId: string;
|
|
14
|
+
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
1
|
+
export * from './api';
|
|
2
|
+
export * from './node';
|
|
3
|
+
export * from './wallet';
|
package/dist/esm/types/node.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type algosdk from
|
|
2
|
-
export declare type Network =
|
|
1
|
+
import type algosdk from 'algosdk';
|
|
2
|
+
export declare type Network = 'betanet' | 'testnet' | 'mainnet' | string;
|
|
3
3
|
export declare type Txn = {
|
|
4
4
|
apaa: Uint8Array;
|
|
5
5
|
apas: number[];
|
|
@@ -14,15 +14,15 @@ export declare type Txn = {
|
|
|
14
14
|
type: string;
|
|
15
15
|
};
|
|
16
16
|
export declare type ConfirmedTxn = {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
'confirmed-round': number;
|
|
18
|
+
'global-state-delta': Record<string, unknown>[];
|
|
19
|
+
'pool-error': string;
|
|
20
20
|
txn: {
|
|
21
21
|
sig: Uint8Array;
|
|
22
22
|
txn: Txn;
|
|
23
23
|
};
|
|
24
24
|
};
|
|
25
|
-
export declare type TxnType =
|
|
25
|
+
export declare type TxnType = 'pay' | 'keyreg' | 'acfg' | 'axfer' | 'afrz' | 'appl' | 'stpf';
|
|
26
26
|
export declare type DecodedTransaction = {
|
|
27
27
|
amt: number;
|
|
28
28
|
fee: number;
|
|
@@ -13,8 +13,8 @@ export declare type Provider = {
|
|
|
13
13
|
connect: () => Promise<void>;
|
|
14
14
|
disconnect: () => Promise<void>;
|
|
15
15
|
reconnect: () => Promise<void>;
|
|
16
|
-
setActiveProvider: () =>
|
|
17
|
-
setActiveAccount: (account: string) =>
|
|
16
|
+
setActiveProvider: () => void;
|
|
17
|
+
setActiveAccount: (account: string) => void;
|
|
18
18
|
metadata: Metadata;
|
|
19
19
|
};
|
|
20
20
|
export declare type Asset = {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { PROVIDER_ID } from
|
|
1
|
+
import { PROVIDER_ID } from '../types';
|
|
2
2
|
export declare const clearAccounts: (id: PROVIDER_ID) => void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare type NFDTransactionsArray = [
|
|
1
|
+
export declare type NFDTransactionsArray = ['u' | 's', string][];
|
|
2
2
|
export declare function encodeNFDTransactionsArray(transactionsArray: NFDTransactionsArray): Uint8Array[];
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { initializeProviders } from
|
|
2
|
-
export { reconnectProviders } from
|
|
3
|
-
export { encodeNFDTransactionsArray } from
|
|
1
|
+
export { initializeProviders } from './initializeProviders';
|
|
2
|
+
export { reconnectProviders } from './reconnectProviders';
|
|
3
|
+
export { encodeNFDTransactionsArray } from './encodeNFDTransactionsArray';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type algosdk from
|
|
2
|
-
import { PROVIDER_ID, WalletClient, Network } from
|
|
1
|
+
import type algosdk from 'algosdk';
|
|
2
|
+
import { PROVIDER_ID, WalletClient, Network } from '../types';
|
|
3
3
|
declare type SupportedProviders = {
|
|
4
4
|
[x: string]: Promise<WalletClient | null>;
|
|
5
5
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ import * as zustand from 'zustand';
|
|
|
9
9
|
import WalletConnect from '@walletconnect/client';
|
|
10
10
|
import QRCodeModal from 'algorand-walletconnect-qrcode-modal';
|
|
11
11
|
|
|
12
|
-
declare type Network =
|
|
12
|
+
declare type Network = 'betanet' | 'testnet' | 'mainnet' | string;
|
|
13
13
|
declare type Txn = {
|
|
14
14
|
apaa: Uint8Array;
|
|
15
15
|
apas: number[];
|
|
@@ -24,15 +24,15 @@ declare type Txn = {
|
|
|
24
24
|
type: string;
|
|
25
25
|
};
|
|
26
26
|
declare type ConfirmedTxn = {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
'confirmed-round': number;
|
|
28
|
+
'global-state-delta': Record<string, unknown>[];
|
|
29
|
+
'pool-error': string;
|
|
30
30
|
txn: {
|
|
31
31
|
sig: Uint8Array;
|
|
32
32
|
txn: Txn;
|
|
33
33
|
};
|
|
34
34
|
};
|
|
35
|
-
declare type TxnType =
|
|
35
|
+
declare type TxnType = 'pay' | 'keyreg' | 'acfg' | 'axfer' | 'afrz' | 'appl' | 'stpf';
|
|
36
36
|
declare type DecodedTransaction = {
|
|
37
37
|
amt: number;
|
|
38
38
|
fee: number;
|
|
@@ -52,7 +52,7 @@ declare type DecodedSignedTransaction = {
|
|
|
52
52
|
};
|
|
53
53
|
declare type AlgodClientOptions = ConstructorParameters<typeof _algosdk.Algodv2>;
|
|
54
54
|
|
|
55
|
-
declare type TransactionsArray = [
|
|
55
|
+
declare type TransactionsArray = ['u' | 's', string][];
|
|
56
56
|
declare type TxnInfo = {
|
|
57
57
|
groupIndex: number;
|
|
58
58
|
amount: number;
|
|
@@ -62,6 +62,9 @@ declare type TxnInfo = {
|
|
|
62
62
|
txn: string;
|
|
63
63
|
signedTxn?: Uint8Array;
|
|
64
64
|
};
|
|
65
|
+
declare type RawTxnResponse = {
|
|
66
|
+
txId: string;
|
|
67
|
+
};
|
|
65
68
|
|
|
66
69
|
declare enum PROVIDER_ID {
|
|
67
70
|
KMD = "kmd",
|
|
@@ -93,9 +96,9 @@ declare abstract class BaseClient {
|
|
|
93
96
|
getAccountInfo(address: string): Promise<AccountInfo>;
|
|
94
97
|
getAssets(address: string): Promise<Asset[]>;
|
|
95
98
|
waitForConfirmation(txId: string, timeout?: number): Promise<{
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
+
'confirmed-round': number;
|
|
100
|
+
'global-state-delta': Record<string, unknown>[];
|
|
101
|
+
'pool-error': string;
|
|
99
102
|
txn: {
|
|
100
103
|
sig: Uint8Array;
|
|
101
104
|
txn: Txn;
|
|
@@ -104,19 +107,19 @@ declare abstract class BaseClient {
|
|
|
104
107
|
}>;
|
|
105
108
|
decodeTransaction: (txn: string, isSigned: boolean) => _algosdk.Transaction;
|
|
106
109
|
logEncodedTransaction(txn: string, isSigned: boolean): void;
|
|
107
|
-
groupTransactionsBySender(transactions: TransactionsArray): Record<string,
|
|
110
|
+
groupTransactionsBySender(transactions: TransactionsArray): Record<string, TxnInfo[]>;
|
|
108
111
|
sendRawTransactions(transactions: Uint8Array[], waitRoundsToConfirm?: number): Promise<{
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
+
'confirmed-round': number;
|
|
113
|
+
'global-state-delta': Record<string, unknown>[];
|
|
114
|
+
'pool-error': string;
|
|
112
115
|
txn: {
|
|
113
116
|
sig: Uint8Array;
|
|
114
117
|
txn: Txn;
|
|
115
118
|
};
|
|
116
119
|
txId: string;
|
|
117
|
-
id:
|
|
120
|
+
id: string;
|
|
118
121
|
}>;
|
|
119
|
-
keepWCAliveStart(): void
|
|
122
|
+
keepWCAliveStart(): Promise<void>;
|
|
120
123
|
keepWCAliveStop(): void;
|
|
121
124
|
}
|
|
122
125
|
|
|
@@ -133,8 +136,8 @@ declare type Provider = {
|
|
|
133
136
|
connect: () => Promise<void>;
|
|
134
137
|
disconnect: () => Promise<void>;
|
|
135
138
|
reconnect: () => Promise<void>;
|
|
136
|
-
setActiveProvider: () =>
|
|
137
|
-
setActiveAccount: (account: string) =>
|
|
139
|
+
setActiveProvider: () => void;
|
|
140
|
+
setActiveAccount: (account: string) => void;
|
|
138
141
|
metadata: Metadata;
|
|
139
142
|
};
|
|
140
143
|
declare type Asset = {
|
|
@@ -194,18 +197,18 @@ declare function useWallet(): {
|
|
|
194
197
|
signer: _algosdk.TransactionSigner;
|
|
195
198
|
signTransactions: (transactions: Array<Uint8Array>, indexesToSign?: number[], returnGroup?: boolean) => Promise<Uint8Array[]>;
|
|
196
199
|
sendTransactions: (transactions: Uint8Array[], waitRoundsToConfirm?: number) => Promise<{
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
+
'confirmed-round': number;
|
|
201
|
+
'global-state-delta': Record<string, unknown>[];
|
|
202
|
+
'pool-error': string;
|
|
200
203
|
txn: {
|
|
201
204
|
sig: Uint8Array;
|
|
202
205
|
txn: Txn;
|
|
203
206
|
};
|
|
204
207
|
txId: string;
|
|
205
|
-
id:
|
|
208
|
+
id: string;
|
|
206
209
|
}>;
|
|
207
210
|
getAddress: () => string | undefined;
|
|
208
|
-
groupTransactionsBySender: (transactions: TransactionsArray) => Promise<Record<string,
|
|
211
|
+
groupTransactionsBySender: (transactions: TransactionsArray) => Promise<Record<string, TxnInfo[]>>;
|
|
209
212
|
getAccountInfo: () => Promise<AccountInfo>;
|
|
210
213
|
getAssets: () => Promise<Asset[]>;
|
|
211
214
|
};
|
|
@@ -226,7 +229,7 @@ declare type SupportedProviders = {
|
|
|
226
229
|
};
|
|
227
230
|
declare const reconnectProviders: (providers: SupportedProviders) => Promise<void>;
|
|
228
231
|
|
|
229
|
-
declare type NFDTransactionsArray = [
|
|
232
|
+
declare type NFDTransactionsArray = ['u' | 's', string][];
|
|
230
233
|
declare function encodeNFDTransactionsArray(transactionsArray: NFDTransactionsArray): Uint8Array[];
|
|
231
234
|
|
|
232
235
|
declare type WalletStore = {
|
|
@@ -289,14 +292,14 @@ declare type InitParams$7 = {
|
|
|
289
292
|
declare class PeraWalletClient extends BaseClient {
|
|
290
293
|
#private;
|
|
291
294
|
network: Network;
|
|
292
|
-
constructor({ metadata, client, algosdk, algodClient, network
|
|
295
|
+
constructor({ metadata, client, algosdk, algodClient, network }: PeraWalletClientConstructor);
|
|
293
296
|
static metadata: {
|
|
294
297
|
id: PROVIDER_ID;
|
|
295
298
|
name: string;
|
|
296
299
|
icon: string;
|
|
297
300
|
isWalletConnect: boolean;
|
|
298
301
|
};
|
|
299
|
-
static init({ clientOptions, algodOptions, clientStatic, algosdkStatic, network
|
|
302
|
+
static init({ clientOptions, algodOptions, clientStatic, algosdkStatic, network }: InitParams$7): Promise<PeraWalletClient | null>;
|
|
300
303
|
connect(onDisconnect: () => void): Promise<Wallet>;
|
|
301
304
|
reconnect(onDisconnect: () => void): Promise<{
|
|
302
305
|
accounts: {
|
|
@@ -344,14 +347,14 @@ declare type InitParams$6 = {
|
|
|
344
347
|
declare class MyAlgoWalletClient extends BaseClient {
|
|
345
348
|
#private;
|
|
346
349
|
network: Network;
|
|
347
|
-
constructor({ metadata, client, algosdk, algodClient, network
|
|
350
|
+
constructor({ metadata, client, algosdk, algodClient, network }: MyAlgoWalletClientConstructor);
|
|
348
351
|
static metadata: {
|
|
349
352
|
id: PROVIDER_ID;
|
|
350
353
|
name: string;
|
|
351
354
|
icon: string;
|
|
352
355
|
isWalletConnect: boolean;
|
|
353
356
|
};
|
|
354
|
-
static init({ clientOptions, algodOptions, clientStatic, algosdkStatic, network
|
|
357
|
+
static init({ clientOptions, algodOptions, clientStatic, algosdkStatic, network }: InitParams$6): Promise<MyAlgoWalletClient | null>;
|
|
355
358
|
connect(): Promise<{
|
|
356
359
|
accounts: {
|
|
357
360
|
providerId: PROVIDER_ID;
|
|
@@ -396,14 +399,14 @@ declare type InitParams$5 = {
|
|
|
396
399
|
declare class DeflyWalletClient extends BaseClient {
|
|
397
400
|
#private;
|
|
398
401
|
network: Network;
|
|
399
|
-
constructor({ metadata, client, algosdk, algodClient, network
|
|
402
|
+
constructor({ metadata, client, algosdk, algodClient, network }: DeflyWalletClientConstructor);
|
|
400
403
|
static metadata: {
|
|
401
404
|
id: PROVIDER_ID;
|
|
402
405
|
name: string;
|
|
403
406
|
icon: string;
|
|
404
407
|
isWalletConnect: boolean;
|
|
405
408
|
};
|
|
406
|
-
static init({ clientOptions, algodOptions, clientStatic, algosdkStatic, network
|
|
409
|
+
static init({ clientOptions, algodOptions, clientStatic, algosdkStatic, network }: InitParams$5): Promise<DeflyWalletClient | null>;
|
|
407
410
|
connect(onDisconnect: () => void): Promise<Wallet>;
|
|
408
411
|
reconnect(onDisconnect: () => void): Promise<{
|
|
409
412
|
accounts: {
|
|
@@ -457,14 +460,14 @@ declare type InitParams$4 = {
|
|
|
457
460
|
declare class ExodusClient extends BaseClient {
|
|
458
461
|
#private;
|
|
459
462
|
network: Network;
|
|
460
|
-
constructor({ metadata, client, algosdk, algodClient, onlyIfTrusted, network
|
|
463
|
+
constructor({ metadata, client, algosdk, algodClient, onlyIfTrusted, network }: ExodusClientConstructor);
|
|
461
464
|
static metadata: {
|
|
462
465
|
id: PROVIDER_ID;
|
|
463
466
|
name: string;
|
|
464
467
|
icon: string;
|
|
465
468
|
isWalletConnect: boolean;
|
|
466
469
|
};
|
|
467
|
-
static init({ clientOptions, algodOptions, algosdkStatic, network
|
|
470
|
+
static init({ clientOptions, algodOptions, algosdkStatic, network }: InitParams$4): Promise<ExodusClient | null>;
|
|
468
471
|
connect(): Promise<{
|
|
469
472
|
accounts: {
|
|
470
473
|
name: string;
|
|
@@ -602,14 +605,14 @@ declare type WalletConnectClientConstructor = {
|
|
|
602
605
|
declare class WalletConnectClient extends BaseClient {
|
|
603
606
|
#private;
|
|
604
607
|
network: Network;
|
|
605
|
-
constructor({ metadata, client, algosdk, algodClient, network
|
|
608
|
+
constructor({ metadata, client, algosdk, algodClient, network }: WalletConnectClientConstructor);
|
|
606
609
|
static metadata: {
|
|
607
610
|
id: PROVIDER_ID;
|
|
608
611
|
name: string;
|
|
609
612
|
icon: string;
|
|
610
613
|
isWalletConnect: boolean;
|
|
611
614
|
};
|
|
612
|
-
static init({ clientOptions, algodOptions, clientStatic, modalStatic, algosdkStatic, network
|
|
615
|
+
static init({ clientOptions, algodOptions, clientStatic, modalStatic, algosdkStatic, network }: InitParams$2): Promise<WalletConnectClient | null>;
|
|
613
616
|
connect(): Promise<Wallet>;
|
|
614
617
|
reconnect(): Promise<{
|
|
615
618
|
accounts: {
|
|
@@ -656,18 +659,18 @@ declare class KMDWalletClient extends BaseClient {
|
|
|
656
659
|
walletId: string;
|
|
657
660
|
id: PROVIDER_ID;
|
|
658
661
|
network: Network;
|
|
659
|
-
constructor({ metadata, client, id, wallet, password, algosdk, algodClient, network
|
|
662
|
+
constructor({ metadata, client, id, wallet, password, algosdk, algodClient, network }: KMDWalletClientConstructor);
|
|
660
663
|
static metadata: {
|
|
661
664
|
id: PROVIDER_ID;
|
|
662
665
|
name: string;
|
|
663
666
|
icon: string;
|
|
664
667
|
isWalletConnect: boolean;
|
|
665
668
|
};
|
|
666
|
-
static init({ clientOptions, algodOptions, algosdkStatic, network
|
|
669
|
+
static init({ clientOptions, algodOptions, algosdkStatic, network }: InitParams$1): Promise<KMDWalletClient | null>;
|
|
667
670
|
connect(): Promise<Wallet>;
|
|
668
671
|
disconnect(): Promise<void>;
|
|
669
672
|
reconnect(): Promise<Wallet | null>;
|
|
670
|
-
requestPassword():
|
|
673
|
+
requestPassword(): string;
|
|
671
674
|
getWalletToken(walletId: string, password: string): Promise<string>;
|
|
672
675
|
releaseToken(token: string): Promise<void>;
|
|
673
676
|
listWallets(): Promise<Record<string, string>>;
|
|
@@ -701,20 +704,30 @@ declare class MnemonicWalletClient extends BaseClient {
|
|
|
701
704
|
#private;
|
|
702
705
|
id: PROVIDER_ID;
|
|
703
706
|
network: Network;
|
|
704
|
-
constructor({ metadata, id, algosdk, algodClient, network
|
|
707
|
+
constructor({ metadata, id, algosdk, algodClient, network }: MnemonicWalletClientConstructor);
|
|
705
708
|
static metadata: {
|
|
706
709
|
id: PROVIDER_ID;
|
|
707
710
|
name: string;
|
|
708
711
|
icon: string;
|
|
709
712
|
isWalletConnect: boolean;
|
|
710
713
|
};
|
|
711
|
-
static init({ algodOptions, algosdkStatic, network
|
|
712
|
-
connect(): Promise<
|
|
714
|
+
static init({ algodOptions, algosdkStatic, network }: InitParams): Promise<MnemonicWalletClient | null>;
|
|
715
|
+
connect(): Promise<{
|
|
716
|
+
accounts: {
|
|
717
|
+
name: string;
|
|
718
|
+
address: string;
|
|
719
|
+
providerId: PROVIDER_ID;
|
|
720
|
+
}[];
|
|
721
|
+
id: PROVIDER_ID;
|
|
722
|
+
name: string;
|
|
723
|
+
icon: string;
|
|
724
|
+
isWalletConnect: boolean;
|
|
725
|
+
}>;
|
|
713
726
|
disconnect(): Promise<void>;
|
|
714
|
-
reconnect(): Promise<
|
|
715
|
-
requestPassword():
|
|
727
|
+
reconnect(): Promise<null>;
|
|
728
|
+
requestPassword(): string;
|
|
716
729
|
signTransactions(connectedAccounts: string[], transactions: Uint8Array[], indexesToSign?: number[], returnGroup?: boolean): Promise<Uint8Array[]>;
|
|
717
|
-
signEncodedTransactions(
|
|
730
|
+
signEncodedTransactions(_transactions: TransactionsArray): Promise<Uint8Array[]>;
|
|
718
731
|
}
|
|
719
732
|
|
|
720
|
-
export { Account, AccountInfo, AlgodClientOptions, Asset, ConfirmedTxn, DEFAULT_NETWORK, DEFAULT_NODE_BASEURL, DEFAULT_NODE_PORT, DEFAULT_NODE_TOKEN, DecodedSignedTransaction, DecodedTransaction, Metadata, Network, PROVIDER_ID, Provider, TransactionsArray, Txn, TxnInfo, TxnType, Wallet, WalletClient, _default as WalletProvider, AlgoSignerClient as algosigner, DeflyWalletClient as defly, encodeNFDTransactionsArray, ExodusClient as exodus, initializeProviders, KMDWalletClient as kmd, MnemonicWalletClient as mnemonic, MyAlgoWalletClient as myalgo, PeraWalletClient as pera, reconnectProviders, useWallet, WalletConnectClient as walletconnect };
|
|
733
|
+
export { Account, AccountInfo, AlgodClientOptions, Asset, ConfirmedTxn, DEFAULT_NETWORK, DEFAULT_NODE_BASEURL, DEFAULT_NODE_PORT, DEFAULT_NODE_TOKEN, DecodedSignedTransaction, DecodedTransaction, Metadata, Network, PROVIDER_ID, Provider, RawTxnResponse, TransactionsArray, Txn, TxnInfo, TxnType, Wallet, WalletClient, _default as WalletProvider, AlgoSignerClient as algosigner, DeflyWalletClient as defly, encodeNFDTransactionsArray, ExodusClient as exodus, initializeProviders, KMDWalletClient as kmd, MnemonicWalletClient as mnemonic, MyAlgoWalletClient as myalgo, PeraWalletClient as pera, reconnectProviders, useWallet, WalletConnectClient as walletconnect };
|
package/package.json
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"url": "https://github.com/txnlab/use-wallet/issues"
|
|
13
13
|
},
|
|
14
14
|
"homepage": "https://txnlab.github.io/use-wallet",
|
|
15
|
-
"version": "1.2.
|
|
15
|
+
"version": "1.2.9",
|
|
16
16
|
"description": "React hooks for using Algorand compatible wallets in dApps.",
|
|
17
17
|
"scripts": {
|
|
18
18
|
"dev": "yarn storybook",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"@blockshake/defly-connect": "^1.0.0",
|
|
34
34
|
"@json-rpc-tools/utils": "^1.7.6",
|
|
35
35
|
"@mdx-js/react": "^2.1.2",
|
|
36
|
-
"@perawallet/connect": "^1.
|
|
36
|
+
"@perawallet/connect": "^1.2.1",
|
|
37
37
|
"@randlabs/myalgo-connect": "^1.4.2",
|
|
38
38
|
"@rollup/plugin-commonjs": "^23.0.2",
|
|
39
39
|
"@rollup/plugin-json": "^5.0.1",
|