@dappworks/kit 0.5.38 → 0.5.40

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.
Files changed (52) hide show
  1. package/dist/aiem.mjs +2 -2
  2. package/dist/{chunk-M5Y3VYMJ.mjs → chunk-2HNXZE3X.mjs} +396 -373
  3. package/dist/chunk-2HNXZE3X.mjs.map +1 -0
  4. package/dist/{chunk-KB3B3XTN.mjs → chunk-2WRRZVUW.mjs} +5 -5
  5. package/dist/{chunk-SL5OV6OR.mjs → chunk-B7RV4C5E.mjs} +2 -2
  6. package/dist/{chunk-ISV4OEKJ.mjs → chunk-MPNSYZJU.mjs} +4 -4
  7. package/dist/{chunk-QDALAJJK.mjs → chunk-O3FWAAEG.mjs} +32 -5
  8. package/dist/chunk-O3FWAAEG.mjs.map +1 -0
  9. package/dist/{chunk-C5BPNLKH.mjs → chunk-PZ3VSAOC.mjs} +3 -3
  10. package/dist/{chunk-FJHGIW3I.mjs → chunk-QA3E2PJT.mjs} +2 -2
  11. package/dist/{chunk-6F7H4PAA.mjs → chunk-R4SQKVDQ.mjs} +1 -1
  12. package/dist/{chunk-IDKGZ5T4.mjs → chunk-XSGTWROT.mjs} +7 -7
  13. package/dist/{chunk-IDKGZ5T4.mjs.map → chunk-XSGTWROT.mjs.map} +1 -1
  14. package/dist/dev.mjs +2 -2
  15. package/dist/experimental.mjs +3 -3
  16. package/dist/form.mjs +3 -3
  17. package/dist/index.mjs +6 -6
  18. package/dist/inspector.mjs +1 -1
  19. package/dist/jsoncomponent.mjs +1 -1
  20. package/dist/jsontable.mjs +4 -4
  21. package/dist/metrics.mjs +4 -4
  22. package/dist/plugins.mjs +5 -5
  23. package/dist/ui.mjs +3 -3
  24. package/dist/utils.mjs +1 -1
  25. package/dist/wallet.mjs +7 -7
  26. package/package.json +3 -3
  27. package/dist/PaginationState-c19e621a.d.ts +0 -17
  28. package/dist/PromiseState-e64b3707.d.ts +0 -57
  29. package/dist/StorageState-cfd942cb.d.ts +0 -48
  30. package/dist/aiem.d.mts +0 -124
  31. package/dist/chunk-M5Y3VYMJ.mjs.map +0 -1
  32. package/dist/chunk-QDALAJJK.mjs.map +0 -1
  33. package/dist/dev.d.mts +0 -26
  34. package/dist/experimental.d.mts +0 -190
  35. package/dist/form.d.mts +0 -384
  36. package/dist/index-38be834f.d.ts +0 -3
  37. package/dist/index.d.mts +0 -90
  38. package/dist/inspector.d.mts +0 -15
  39. package/dist/jsoncomponent.d.mts +0 -22
  40. package/dist/jsontable.d.mts +0 -126
  41. package/dist/metrics.d.mts +0 -121
  42. package/dist/plugins.d.mts +0 -118
  43. package/dist/root-218afa4f.d.ts +0 -111
  44. package/dist/ui.d.mts +0 -29
  45. package/dist/utils.d.mts +0 -229
  46. package/dist/wallet.d.mts +0 -196
  47. /package/dist/{chunk-KB3B3XTN.mjs.map → chunk-2WRRZVUW.mjs.map} +0 -0
  48. /package/dist/{chunk-SL5OV6OR.mjs.map → chunk-B7RV4C5E.mjs.map} +0 -0
  49. /package/dist/{chunk-ISV4OEKJ.mjs.map → chunk-MPNSYZJU.mjs.map} +0 -0
  50. /package/dist/{chunk-C5BPNLKH.mjs.map → chunk-PZ3VSAOC.mjs.map} +0 -0
  51. /package/dist/{chunk-FJHGIW3I.mjs.map → chunk-QA3E2PJT.mjs.map} +0 -0
  52. /package/dist/{chunk-6F7H4PAA.mjs.map → chunk-R4SQKVDQ.mjs.map} +0 -0
package/dist/utils.d.mts DELETED
@@ -1,229 +0,0 @@
1
- import DataLoader from 'dataloader';
2
- import { Table } from 'dexie';
3
- import BigNumber from 'bignumber.js';
4
- import * as lodash from 'lodash';
5
-
6
- declare class DexieCache {
7
- kv: Table<{
8
- key: string;
9
- value: {
10
- value: any;
11
- expiration: number;
12
- };
13
- }, any, {
14
- key: string;
15
- value: {
16
- value: any;
17
- expiration: number;
18
- };
19
- }>;
20
- kv_get: DataLoader<string, {
21
- value: any;
22
- expiration: number;
23
- }, string>;
24
- kv_set: DataLoader<{
25
- key: string;
26
- value: any;
27
- ttl: number;
28
- }, {
29
- key: string;
30
- value: any;
31
- ttl: number;
32
- }, {
33
- key: string;
34
- value: any;
35
- ttl: number;
36
- }>;
37
- options: {
38
- ttl: number;
39
- prefix: string;
40
- };
41
- get(_key: any): Promise<any>;
42
- getRaw(_key: any): Promise<any>;
43
- set(_key: any, value: any, options?: {
44
- ttl?: number;
45
- }): Promise<this>;
46
- delete(key: any): Promise<void>;
47
- clear(): Promise<void>;
48
- wrap<T extends (...args: any[]) => Promise<any>, U = ReturnType<T>>(key: any, fn: T, args?: {
49
- ttl?: number;
50
- alowStale?: boolean;
51
- }): Promise<Awaited<U>>;
52
- }
53
- declare const cache: DexieCache;
54
-
55
- declare const helper: {
56
- env: {
57
- isIopayMobile: () => boolean;
58
- isBrowser: () => boolean;
59
- onBrowser(func: any): void;
60
- };
61
- promise: {
62
- sleep(ms: any): Promise<unknown>;
63
- runAsync<T, U = Error>(promise: Promise<T>): Promise<[U | null, T | null]>;
64
- };
65
- object: {
66
- crawlObject(object: any, options: any): any;
67
- crawl(object: any, options: any): any;
68
- };
69
- json: {
70
- isJsonString(str: string): boolean;
71
- safeParse(val: any): any;
72
- };
73
- deepAssign(target: any, ...sources: any[]): any;
74
- isObject(value: any): boolean;
75
- deepMerge(obj: any, newObj: any): any;
76
- img: {
77
- parse(src: string | undefined): string;
78
- };
79
- string: {
80
- copy(str: string): void;
81
- fristUpper(str: string): string;
82
- firstUpperCase(str: string): string;
83
- toFixString(str: any, length: any): any;
84
- truncate(fullStr: string, strLen: any, separator: any): string;
85
- validAbi(abi: string): {
86
- abi: any[];
87
- address: string;
88
- };
89
- random(count: number): string;
90
- };
91
- download: {
92
- downloadByBlob(name: string, blob: Blob): void;
93
- downloadJSON(name: string, jsonObj: object): void;
94
- };
95
- number: {
96
- countNonZeroNumbers: (str: string) => number;
97
- numberWithCommas(num: number): string;
98
- getBN: (value: number | string | BigNumber) => BigNumber;
99
- toPrecisionFloor: (str: number | string, options?: {
100
- decimals?: number;
101
- format?: string;
102
- toLocalString?: boolean;
103
- }) => any;
104
- warpBigNumber(value: string, decimals?: number, options?: {
105
- format?: string;
106
- fallback?: string;
107
- min?: number;
108
- }): {
109
- value: string;
110
- format: string;
111
- originFormat: string;
112
- decimals: string;
113
- };
114
- numberFormat(str: string | number, format?: string, options?: {
115
- min?: number;
116
- fallback?: string;
117
- }): string;
118
- };
119
- address: {
120
- convertAddress: (addressMode: "io" | "0x", address?: string) => string;
121
- validateEthAddress: (address: string) => boolean;
122
- validateIoAddress: (address: string) => boolean;
123
- validateAddress: (address: string) => boolean;
124
- };
125
- };
126
-
127
- declare const _: {
128
- throttle: {
129
- <T extends (...args: any) => any>(func: T, wait?: number, options?: lodash.ThrottleSettingsLeading): lodash.DebouncedFuncLeading<T>;
130
- <T extends (...args: any) => any>(func: T, wait?: number, options?: lodash.ThrottleSettings): lodash.DebouncedFunc<T>;
131
- };
132
- debounce: {
133
- <T extends (...args: any) => any>(func: T, wait: number | undefined, options: lodash.DebounceSettingsLeading): lodash.DebouncedFuncLeading<T>;
134
- <T extends (...args: any) => any>(func: T, wait?: number, options?: lodash.DebounceSettings): lodash.DebouncedFunc<T>;
135
- };
136
- each: {
137
- <T>(collection: T[], iteratee?: lodash.ArrayIterator<T, any>): T[];
138
- (collection: string, iteratee?: lodash.StringIterator<any>): string;
139
- <T>(collection: lodash.List<T>, iteratee?: lodash.ListIterator<T, any>): lodash.List<T>;
140
- <T extends object>(collection: T, iteratee?: lodash.ObjectIterator<T, any>): T;
141
- <T, TArray extends T[] | null | undefined>(collection: TArray & (T[] | null | undefined), iteratee?: lodash.ArrayIterator<T, any>): TArray;
142
- <TString extends string | null | undefined>(collection: TString, iteratee?: lodash.StringIterator<any>): TString;
143
- <T, TList extends lodash.List<T> | null | undefined>(collection: TList & (lodash.List<T> | null | undefined), iteratee?: lodash.ListIterator<T, any>): TList;
144
- <T extends object>(collection: T | null | undefined, iteratee?: lodash.ObjectIterator<T, any>): T | null | undefined;
145
- };
146
- flattenDeep: <T>(array: lodash.ListOfRecursiveArraysOrValues<T> | null | undefined) => Array<lodash.Flat<T>>;
147
- omitBy: {
148
- <T>(object: lodash.Dictionary<T> | null | undefined, predicate?: lodash.ValueKeyIteratee<T>): lodash.Dictionary<T>;
149
- <T>(object: lodash.NumericDictionary<T> | null | undefined, predicate?: lodash.ValueKeyIteratee<T>): lodash.NumericDictionary<T>;
150
- <T extends object>(object: T | null | undefined, predicate: lodash.ValueKeyIteratee<T[keyof T]>): lodash.PartialObject<T>;
151
- };
152
- isNil: (value: any) => value is null | undefined;
153
- keyBy: {
154
- <T>(collection: lodash.List<T> | null | undefined, iteratee?: lodash.ValueIterateeCustom<T, lodash.PropertyName>): lodash.Dictionary<T>;
155
- <T extends object>(collection: T | null | undefined, iteratee?: lodash.ValueIterateeCustom<T[keyof T], lodash.PropertyName>): lodash.Dictionary<T[keyof T]>;
156
- };
157
- mergeWith: {
158
- <TObject, TSource>(object: TObject, source: TSource, customizer: lodash.MergeWithCustomizer): TObject & TSource;
159
- <TObject, TSource1, TSource2>(object: TObject, source1: TSource1, source2: TSource2, customizer: lodash.MergeWithCustomizer): TObject & TSource1 & TSource2;
160
- <TObject, TSource1, TSource2, TSource3>(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3, customizer: lodash.MergeWithCustomizer): TObject & TSource1 & TSource2 & TSource3;
161
- <TObject, TSource1, TSource2, TSource3, TSource4>(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4, customizer: lodash.MergeWithCustomizer): TObject & TSource1 & TSource2 & TSource3 & TSource4;
162
- (object: any, ...otherArgs: any[]): any;
163
- };
164
- cloneDeep: <T>(value: T) => T;
165
- groupBy: {
166
- <T>(collection: lodash.List<T> | null | undefined, iteratee?: lodash.ValueIteratee<T>): lodash.Dictionary<T[]>;
167
- <T extends object>(collection: T | null | undefined, iteratee?: lodash.ValueIteratee<T[keyof T]>): lodash.Dictionary<Array<T[keyof T]>>;
168
- };
169
- get: {
170
- <TObject extends object, TKey extends keyof TObject>(object: TObject, path: TKey | [TKey]): TObject[TKey];
171
- <TObject extends object, TKey extends keyof TObject>(object: TObject | null | undefined, path: TKey | [TKey]): TObject[TKey] | undefined;
172
- <TObject extends object, TKey extends keyof TObject, TDefault>(object: TObject | null | undefined, path: TKey | [TKey], defaultValue: TDefault): Exclude<TObject[TKey], undefined> | TDefault;
173
- <TObject extends object, TKey1 extends keyof TObject, TKey2 extends keyof TObject[TKey1]>(object: TObject, path: [TKey1, TKey2]): TObject[TKey1][TKey2];
174
- <TObject extends object, TKey1 extends keyof TObject, TKey2 extends keyof NonNullable<TObject[TKey1]>>(object: TObject | null | undefined, path: [TKey1, TKey2]): NonNullable<TObject[TKey1]>[TKey2] | undefined;
175
- <TObject extends object, TKey1 extends keyof TObject, TKey2 extends keyof NonNullable<TObject[TKey1]>, TDefault>(object: TObject | null | undefined, path: [TKey1, TKey2], defaultValue: TDefault): Exclude<NonNullable<TObject[TKey1]>[TKey2], undefined> | TDefault;
176
- <TObject extends object, TKey1 extends keyof TObject, TKey2 extends keyof TObject[TKey1], TKey3 extends keyof TObject[TKey1][TKey2]>(object: TObject, path: [TKey1, TKey2, TKey3]): TObject[TKey1][TKey2][TKey3];
177
- <TObject extends object, TKey1 extends keyof TObject, TKey2 extends keyof NonNullable<TObject[TKey1]>, TKey3 extends keyof NonNullable<NonNullable<TObject[TKey1]>[TKey2]>>(object: TObject | null | undefined, path: [TKey1, TKey2, TKey3]): NonNullable<NonNullable<TObject[TKey1]>[TKey2]>[TKey3] | undefined;
178
- <TObject extends object, TKey1 extends keyof TObject, TKey2 extends keyof NonNullable<TObject[TKey1]>, TKey3 extends keyof NonNullable<NonNullable<TObject[TKey1]>[TKey2]>, TDefault>(object: TObject | null | undefined, path: [TKey1, TKey2, TKey3], defaultValue: TDefault): Exclude<NonNullable<NonNullable<TObject[TKey1]>[TKey2]>[TKey3], undefined> | TDefault;
179
- <TObject extends object, TKey1 extends keyof TObject, TKey2 extends keyof TObject[TKey1], TKey3 extends keyof TObject[TKey1][TKey2], TKey4 extends keyof TObject[TKey1][TKey2][TKey3]>(object: TObject, path: [TKey1, TKey2, TKey3, TKey4]): TObject[TKey1][TKey2][TKey3][TKey4];
180
- <TObject extends object, TKey1 extends keyof TObject, TKey2 extends keyof NonNullable<TObject[TKey1]>, TKey3 extends keyof NonNullable<NonNullable<TObject[TKey1]>[TKey2]>, TKey4 extends keyof NonNullable<NonNullable<NonNullable<TObject[TKey1]>[TKey2]>[TKey3]>>(object: TObject | null | undefined, path: [TKey1, TKey2, TKey3, TKey4]): NonNullable<NonNullable<NonNullable<TObject[TKey1]>[TKey2]>[TKey3]>[TKey4] | undefined;
181
- <TObject extends object, TKey1 extends keyof TObject, TKey2 extends keyof NonNullable<TObject[TKey1]>, TKey3 extends keyof NonNullable<NonNullable<TObject[TKey1]>[TKey2]>, TKey4 extends keyof NonNullable<NonNullable<NonNullable<TObject[TKey1]>[TKey2]>[TKey3]>, TDefault>(object: TObject | null | undefined, path: [TKey1, TKey2, TKey3, TKey4], defaultValue: TDefault): Exclude<NonNullable<NonNullable<NonNullable<TObject[TKey1]>[TKey2]>[TKey3]>[TKey4], undefined> | TDefault;
182
- <T>(object: lodash.NumericDictionary<T>, path: number): T;
183
- <T>(object: lodash.NumericDictionary<T> | null | undefined, path: number): T | undefined;
184
- <T, TDefault>(object: lodash.NumericDictionary<T> | null | undefined, path: number, defaultValue: TDefault): T | TDefault;
185
- <TDefault>(object: null | undefined, path: lodash.PropertyPath, defaultValue: TDefault): TDefault;
186
- (object: null | undefined, path: lodash.PropertyPath): undefined;
187
- <TObject, TPath extends string>(data: TObject, path: TPath): string extends TPath ? any : lodash.GetFieldType<TObject, TPath>;
188
- <TObject, TPath extends string, TDefault = lodash.GetFieldType<TObject, TPath, "Path">>(data: TObject, path: TPath, defaultValue: TDefault): Exclude<lodash.GetFieldType<TObject, TPath>, null | undefined> | TDefault;
189
- (object: any, path: lodash.PropertyPath, defaultValue?: any): any;
190
- };
191
- set: {
192
- <T extends object>(object: T, path: lodash.PropertyPath, value: any): T;
193
- <TResult>(object: object, path: lodash.PropertyPath, value: any): TResult;
194
- };
195
- remove: <T>(array: lodash.List<T>, predicate?: lodash.ListIteratee<T>) => T[];
196
- merge: {
197
- <TObject, TSource>(object: TObject, source: TSource): TObject & TSource;
198
- <TObject, TSource1, TSource2>(object: TObject, source1: TSource1, source2: TSource2): TObject & TSource1 & TSource2;
199
- <TObject, TSource1, TSource2, TSource3>(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3): TObject & TSource1 & TSource2 & TSource3;
200
- <TObject, TSource1, TSource2, TSource3, TSource4>(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4): TObject & TSource1 & TSource2 & TSource3 & TSource4;
201
- (object: any, ...otherArgs: any[]): any;
202
- };
203
- isEqual: (value: any, other: any) => boolean;
204
- uniqWith: <T>(array: lodash.List<T> | null | undefined, comparator?: lodash.Comparator<T>) => T[];
205
- orderBy: {
206
- <T>(collection: lodash.List<T> | null | undefined, iteratees?: lodash.Many<lodash.ListIterator<T, lodash.NotVoid>>, orders?: lodash.Many<boolean | "asc" | "desc">): T[];
207
- <T>(collection: lodash.List<T> | null | undefined, iteratees?: lodash.Many<lodash.ListIteratee<T>>, orders?: lodash.Many<boolean | "asc" | "desc">): T[];
208
- <T extends object>(collection: T | null | undefined, iteratees?: lodash.Many<lodash.ObjectIterator<T, lodash.NotVoid>>, orders?: lodash.Many<boolean | "asc" | "desc">): Array<T[keyof T]>;
209
- <T extends object>(collection: T | null | undefined, iteratees?: lodash.Many<lodash.ObjectIteratee<T>>, orders?: lodash.Many<boolean | "asc" | "desc">): Array<T[keyof T]>;
210
- };
211
- map: {
212
- <T, TResult>(collection: T[] | null | undefined, iteratee: lodash.ArrayIterator<T, TResult>): TResult[];
213
- <T, TResult>(collection: lodash.List<T> | null | undefined, iteratee: lodash.ListIterator<T, TResult>): TResult[];
214
- <T>(collection: lodash.Dictionary<T> | lodash.NumericDictionary<T> | null | undefined): T[];
215
- <T extends object, TResult>(collection: T | null | undefined, iteratee: lodash.ObjectIterator<T, TResult>): TResult[];
216
- <T, K extends keyof T>(collection: lodash.Dictionary<T> | lodash.NumericDictionary<T> | null | undefined, iteratee: K): Array<T[K]>;
217
- <T>(collection: lodash.Dictionary<T> | lodash.NumericDictionary<T> | null | undefined, iteratee?: string): any[];
218
- <T>(collection: lodash.Dictionary<T> | lodash.NumericDictionary<T> | null | undefined, iteratee?: object): boolean[];
219
- };
220
- zip: {
221
- <T1, T2>(arrays1: lodash.List<T1>, arrays2: lodash.List<T2>): Array<[T1 | undefined, T2 | undefined]>;
222
- <T1, T2, T3>(arrays1: lodash.List<T1>, arrays2: lodash.List<T2>, arrays3: lodash.List<T3>): Array<[T1 | undefined, T2 | undefined, T3 | undefined]>;
223
- <T1, T2, T3, T4>(arrays1: lodash.List<T1>, arrays2: lodash.List<T2>, arrays3: lodash.List<T3>, arrays4: lodash.List<T4>): Array<[T1 | undefined, T2 | undefined, T3 | undefined, T4 | undefined]>;
224
- <T1, T2, T3, T4, T5>(arrays1: lodash.List<T1>, arrays2: lodash.List<T2>, arrays3: lodash.List<T3>, arrays4: lodash.List<T4>, arrays5: lodash.List<T5>): Array<[T1 | undefined, T2 | undefined, T3 | undefined, T4 | undefined, T5 | undefined]>;
225
- <T>(...arrays: Array<lodash.List<T> | null | undefined>): Array<Array<T | undefined>>;
226
- };
227
- };
228
-
229
- export { _, cache, helper };
package/dist/wallet.d.mts DELETED
@@ -1,196 +0,0 @@
1
- import React from 'react';
2
- import { Chain } from 'viem/chains';
3
- import { a as PromiseHookData, S as StorageState } from './StorageState-cfd942cb.js';
4
- import { S as Store } from './root-218afa4f.js';
5
- import { WalletClient, PublicClient, HttpTransport, TransactionReceipt } from 'viem';
6
- import EventEmitter from 'events';
7
- import { SwitchChainMutateAsync } from 'wagmi/query';
8
- import * as wagmi from 'wagmi';
9
- import { Config } from 'wagmi';
10
- import { Chain as Chain$1 } from '@rainbow-me/rainbowkit';
11
- import * as _rainbow_me_rainbowkit_dist_config_getDefaultConfig from '@rainbow-me/rainbowkit/dist/config/getDefaultConfig';
12
- import 'mobx';
13
- import 'typed-emitter';
14
-
15
- declare const WalletProvider: (({ children, theme, appName, supportedChains, compatibleMode, rainbowKitProps, projectId }: {
16
- children: React.ReactNode;
17
- theme?: "dark" | "light";
18
- appName?: string;
19
- supportedChains?: Chain[];
20
- compatibleMode?: boolean;
21
- debug?: boolean;
22
- rainbowKitProps?: any;
23
- projectId?: string;
24
- }) => React.JSX.Element) & {
25
- displayName: string;
26
- };
27
-
28
- type NetworkObject = {
29
- name: string;
30
- chainId: number;
31
- rpcUrl: string;
32
- logoUrl: string;
33
- explorerUrl: string;
34
- explorerName: string;
35
- nativeCoin: string;
36
- type: 'mainnet' | 'testnet';
37
- };
38
- type WalletTransactionHistoryType = {
39
- chainId: number;
40
- tx?: string;
41
- msg: string;
42
- timestamp: number;
43
- type: string;
44
- status: 'loading' | 'success' | 'fail';
45
- };
46
- type AddressMode = 'io' | '0x';
47
- declare const iotex: Chain;
48
- declare const iotexTestnet: Chain;
49
-
50
- declare class WalletStore implements Store {
51
- sid: string;
52
- autoObservable: boolean;
53
- account: `0x${string}`;
54
- isSuccessDialogOpen: boolean;
55
- get isInSafeApp(): boolean;
56
- isLedger: boolean;
57
- isConnect: boolean;
58
- walletClient: WalletClient;
59
- event: EventEmitter<[never]>;
60
- switchChain: SwitchChainMutateAsync<Config, unknown> | undefined;
61
- updateTicker: number;
62
- addressMode: AddressMode;
63
- isIoTeXChain: boolean;
64
- setAddressMode(mode: AddressMode): void;
65
- get accountFormat(): string;
66
- get connectAccountEllipsisFormat(): string;
67
- get accountEllipsisFormat(): string;
68
- get supportedChains(): Chain$1[];
69
- chain: Chain$1 | undefined;
70
- openConnectModal: any;
71
- disconnect: any;
72
- balance: PromiseHookData<() => Promise<{
73
- value: string;
74
- format: string;
75
- originFormat: string;
76
- decimals: string;
77
- }>, Promise<{
78
- value: string;
79
- format: string;
80
- originFormat: string;
81
- decimals: string;
82
- }>>;
83
- constructor(args?: Partial<WalletStore>);
84
- use(): void;
85
- private useWalletClientWithCompatibleMode;
86
- useWalletClientWithoutCompatibleMode(): void;
87
- get publicClient(): PublicClient<HttpTransport, Chain$1, any, any>;
88
- set(args: Partial<WalletStore>): void;
89
- toJSON(): {
90
- account: `0x${string}`;
91
- };
92
- prepare(chainId?: number): Promise<WalletStore>;
93
- waitForTransactionReceipt({ hash }: {
94
- hash: any;
95
- }): Promise<TransactionReceipt>;
96
- static SendTx(...args: Parameters<WalletStore['sendTx']>): Promise<TransactionReceipt>;
97
- static SendRawTx(...args: Parameters<WalletStore['sendRawTx']>): Promise<TransactionReceipt>;
98
- sendTx({ chainId, tx, autoAlert, loadingText, successText, historyItem, showSuccessDialog, onSuccess, onError, }: {
99
- chainId: number | string;
100
- tx: any;
101
- autoAlert?: boolean;
102
- loadingText?: string;
103
- successText?: string;
104
- showSuccessDialog?: boolean;
105
- historyItem?: Pick<WalletTransactionHistoryType, 'msg' | 'type'>;
106
- onSuccess?: ({ receipt }: {
107
- receipt: TransactionReceipt;
108
- }) => Promise<void>;
109
- onError?: (error: any) => void;
110
- }): Promise<TransactionReceipt>;
111
- sendRawTx({ chainId, address, data, value, autoAlert, onSended, onSuccess, onError, historyItem, loadingText, showSuccessDialog, }: {
112
- loadingText?: string;
113
- chainId: number | string;
114
- address: string;
115
- data: string | null;
116
- value?: string;
117
- autoRefresh?: boolean;
118
- autoAlert?: boolean;
119
- historyItem?: Pick<WalletTransactionHistoryType, 'msg' | 'type'>;
120
- showTransactionSubmitDialog?: boolean;
121
- showSuccessDialog?: boolean;
122
- onSended?: ({ res }: {
123
- res: TransactionReceipt;
124
- }) => void;
125
- onSuccess?: ({ res }: {
126
- res: TransactionReceipt;
127
- }) => void;
128
- onError?: (error: any) => void;
129
- }): Promise<TransactionReceipt | undefined>;
130
- signMessage(message: string): Promise<string>;
131
- }
132
-
133
- declare class WalletRpcStore implements Store {
134
- sid: string;
135
- autoObservable: boolean;
136
- curRpc: StorageState<unknown>;
137
- isAutoSelectRpc: StorageState<unknown>;
138
- customRpc: string;
139
- rpcList: StorageState<unknown>;
140
- showCustomRpc: boolean;
141
- get currentRpc(): any;
142
- addCustomRpc(): string;
143
- addToMetamask(url: any): Promise<void>;
144
- switchOrAddChain(chainId: number): Promise<unknown>;
145
- addToMetamaskById(id: number): Promise<unknown>;
146
- refresh(): void;
147
- latencyColor(latency: number): "text-red-500" | "text-green-500" | "text-yellow-500";
148
- testRpcFunction(url: string): Promise<{
149
- url: string;
150
- lentency: number;
151
- height: number;
152
- }>;
153
- testRpc(): void;
154
- removeRpc(name: string): void;
155
- scoreIcon(score: number): React.JSX.Element;
156
- get wallet(): WalletStore;
157
- autoSelectRpc(): Promise<void>;
158
- }
159
- declare class WalletHistoryStore implements Store {
160
- sid: string;
161
- isRender: boolean;
162
- autoObservable: boolean;
163
- set(params: Partial<WalletHistoryStore>): void;
164
- private history;
165
- get historyList(): WalletTransactionHistoryType[];
166
- recordHistory(item: WalletTransactionHistoryType): void;
167
- updateHistoryStatusByTx(tx: string | null, status: 'loading' | 'success' | 'fail'): void;
168
- clearHistory(): void;
169
- }
170
-
171
- declare class WalletConfigStore implements Store {
172
- sid: string;
173
- autoObservable: boolean;
174
- appName: string;
175
- projectId: string;
176
- supportedChains: Chain$1[];
177
- defaultChainId: number;
178
- updateTicker: number;
179
- walletUpdateTick: number;
180
- isConnect: boolean;
181
- isInSafeApp: boolean;
182
- compatibleMode: boolean;
183
- constructor(args: Partial<WalletConfigStore>);
184
- set(params: Partial<WalletConfigStore>): void;
185
- get reconnectOnMount(): boolean;
186
- get rainbowKitConfig(): wagmi.Config<_rainbow_me_rainbowkit_dist_config_getDefaultConfig._chains, _rainbow_me_rainbowkit_dist_config_getDefaultConfig._transports, wagmi.CreateConnectorFn<unknown, Record<string, unknown>, Record<string, unknown>>[]>;
187
- }
188
-
189
- declare const RpcList: (() => React.JSX.Element) & {
190
- displayName: string;
191
- };
192
-
193
- declare const ConnectLedger: () => Promise<void>;
194
- declare const DisconnectLedger: () => void;
195
-
196
- export { AddressMode, ConnectLedger, DisconnectLedger, NetworkObject, RpcList, WalletConfigStore, WalletHistoryStore, WalletProvider, WalletRpcStore, WalletStore, WalletTransactionHistoryType, iotex, iotexTestnet };