@dappworks/kit 0.4.176 → 0.4.177

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 (45) hide show
  1. package/dist/StorageState-qzikHBY8.d.ts +66 -0
  2. package/dist/aiem.mjs +3 -1231
  3. package/dist/aiem.mjs.map +1 -1
  4. package/dist/chunk-2EXDWOHY.mjs +58 -0
  5. package/dist/chunk-3DOB34HY.mjs +292 -0
  6. package/dist/chunk-3DOB34HY.mjs.map +1 -0
  7. package/dist/{chunk-3O7QI47S.mjs → chunk-3HD22664.mjs} +2 -2
  8. package/dist/chunk-5JMONDHE.mjs +436 -0
  9. package/dist/chunk-5JMONDHE.mjs.map +1 -0
  10. package/dist/chunk-L6XS2K2K.mjs +76 -0
  11. package/dist/chunk-L6XS2K2K.mjs.map +1 -0
  12. package/dist/{chunk-AIZ7XDNV.mjs → chunk-TQNAAA4I.mjs} +22 -21
  13. package/dist/chunk-TQNAAA4I.mjs.map +1 -0
  14. package/dist/{chunk-GKK6EXKY.mjs → chunk-XSLAZWOE.mjs} +4 -4
  15. package/dist/dev.d.mts +3 -3
  16. package/dist/dev.mjs +2 -2
  17. package/dist/experimental.d.mts +3 -3
  18. package/dist/experimental.mjs +1 -1
  19. package/dist/form.d.mts +15 -15
  20. package/dist/form.mjs +2 -2
  21. package/dist/form.mjs.map +1 -1
  22. package/dist/index.d.mts +6 -67
  23. package/dist/index.mjs +3 -291
  24. package/dist/index.mjs.map +1 -1
  25. package/dist/inspector.d.mts +2 -2
  26. package/dist/inspector.mjs +1 -1
  27. package/dist/jsontable.d.mts +8 -8
  28. package/dist/jsontable.mjs +4 -4
  29. package/dist/metrics.d.mts +15 -15
  30. package/dist/metrics.mjs +4 -4
  31. package/dist/plugins.d.mts +11 -11
  32. package/dist/plugins.mjs +21 -83
  33. package/dist/plugins.mjs.map +1 -1
  34. package/dist/ui.d.mts +7 -7
  35. package/dist/ui.mjs +3 -3
  36. package/dist/utils.mjs +1 -1
  37. package/dist/wallet.d.mts +152 -0
  38. package/dist/wallet.mjs +3631 -0
  39. package/dist/wallet.mjs.map +1 -0
  40. package/package.json +13 -3
  41. package/dist/chunk-AIZ7XDNV.mjs.map +0 -1
  42. package/dist/chunk-R4SQKVDQ.mjs +0 -35
  43. /package/dist/{chunk-R4SQKVDQ.mjs.map → chunk-2EXDWOHY.mjs.map} +0 -0
  44. /package/dist/{chunk-3O7QI47S.mjs.map → chunk-3HD22664.mjs.map} +0 -0
  45. /package/dist/{chunk-GKK6EXKY.mjs.map → chunk-XSLAZWOE.mjs.map} +0 -0
@@ -0,0 +1,66 @@
1
+ import * as mobx from 'mobx';
2
+ import BigNumber from 'bignumber.js';
3
+
4
+ declare abstract class ContractBase {
5
+ }
6
+ type ContractClass<T extends ContractBase> = new (args: Partial<T>) => T;
7
+ type PromiseHookData<T, U> = {
8
+ value: Awaited<U>;
9
+ get: T;
10
+ call: T;
11
+ func: T;
12
+ loading: boolean;
13
+ errorRetry: number;
14
+ };
15
+ declare class PromiseHook {
16
+ static entities: mobx.IObservableArray<any>;
17
+ static Get<T extends ContractBase>(cls: ContractClass<T>): (args: {
18
+ args: Partial<T>;
19
+ id?: string;
20
+ select?: {
21
+ [key in keyof Partial<T>]: boolean;
22
+ };
23
+ unselect?: {
24
+ [key in keyof Partial<T>]: boolean;
25
+ };
26
+ }) => Promise<T & {
27
+ refresh: () => Promise<void>;
28
+ }>;
29
+ static isPromiseHook(target: any): boolean;
30
+ static wrap<T extends (...args: any[]) => Promise<any>, U = ReturnType<T>>({ func, defaultValue, lazy }: {
31
+ func: T;
32
+ defaultValue?: Awaited<U>;
33
+ lazy?: boolean;
34
+ }): PromiseHookData<T, U>;
35
+ }
36
+
37
+ declare class BigNumberState {
38
+ value: BigNumber;
39
+ loading: boolean;
40
+ decimals: number;
41
+ fixed: number;
42
+ formatter?: Function;
43
+ constructor(args: Partial<BigNumberState>);
44
+ get format(): any;
45
+ getFormat({ decimals, fixed }?: {
46
+ decimals?: number;
47
+ fixed?: number;
48
+ }): any;
49
+ setDecimals(decimals: number): void;
50
+ setValue(value: BigNumber): void;
51
+ setLoading(val: any): void;
52
+ }
53
+
54
+ declare class StorageState<T> {
55
+ key: string;
56
+ value: T | any;
57
+ default: T | any;
58
+ constructor(args: Partial<StorageState<T>>);
59
+ static safeParse(val: any): any;
60
+ load(): any;
61
+ save(value?: T): any;
62
+ setValue(value?: T): void;
63
+ clear(): any;
64
+ }
65
+
66
+ export { BigNumberState as B, PromiseHook as P, StorageState as S, type PromiseHookData as a };