@avalabs/vm-module-types 0.0.0-testGetBalance-20240722173538 → 0.0.0-testRetry-20240726170629

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 (69) hide show
  1. package/.turbo/turbo-build.log +113 -101
  2. package/.turbo/turbo-lint.log +1 -1
  3. package/CHANGELOG.md +27 -1
  4. package/dist/balance.d.cts +43 -22
  5. package/dist/balance.d.ts +43 -22
  6. package/dist/chunk-2KGTZTXY.cjs +7 -0
  7. package/dist/chunk-2KGTZTXY.cjs.map +1 -0
  8. package/dist/chunk-47KTBBRA.cjs +4 -0
  9. package/dist/chunk-47KTBBRA.cjs.map +1 -0
  10. package/dist/chunk-4BNYMHOY.js +5 -0
  11. package/dist/chunk-4BNYMHOY.js.map +1 -0
  12. package/dist/chunk-7Y6UGMPZ.js +5 -0
  13. package/dist/chunk-7Y6UGMPZ.js.map +1 -0
  14. package/dist/chunk-P6AM7I3B.js +3 -0
  15. package/dist/chunk-P6AM7I3B.js.map +1 -0
  16. package/dist/chunk-RKFOXZ35.js +5 -0
  17. package/dist/chunk-RKFOXZ35.js.map +1 -0
  18. package/dist/chunk-VRQJHO4F.cjs +8 -0
  19. package/dist/chunk-VRQJHO4F.cjs.map +1 -0
  20. package/dist/chunk-YVYCETG2.cjs +8 -0
  21. package/dist/chunk-YVYCETG2.cjs.map +1 -0
  22. package/dist/common.cjs +6 -2
  23. package/dist/common.d.cts +9 -1
  24. package/dist/common.d.ts +9 -1
  25. package/dist/common.js +1 -1
  26. package/dist/index.cjs +14 -9
  27. package/dist/index.d.cts +5 -4
  28. package/dist/index.d.ts +5 -4
  29. package/dist/index.js +4 -3
  30. package/dist/manifest.d.cts +2 -2
  31. package/dist/manifest.d.ts +2 -2
  32. package/dist/module.d.cts +1 -0
  33. package/dist/module.d.ts +1 -0
  34. package/dist/network-fee.d.cts +1 -1
  35. package/dist/network-fee.d.ts +1 -1
  36. package/dist/rpc.cjs +5 -5
  37. package/dist/rpc.d.cts +62 -21
  38. package/dist/rpc.d.ts +62 -21
  39. package/dist/rpc.js +1 -1
  40. package/dist/token.cjs +2 -2
  41. package/dist/token.d.cts +31 -8
  42. package/dist/token.d.ts +31 -8
  43. package/dist/token.js +1 -1
  44. package/dist/transaction-simulation.cjs +6 -0
  45. package/dist/transaction-simulation.cjs.map +1 -0
  46. package/dist/transaction-simulation.d.cts +27 -0
  47. package/dist/transaction-simulation.d.ts +27 -0
  48. package/dist/transaction-simulation.js +3 -0
  49. package/dist/transaction-simulation.js.map +1 -0
  50. package/package.json +1 -1
  51. package/src/balance.ts +50 -22
  52. package/src/common.ts +9 -0
  53. package/src/index.ts +1 -0
  54. package/src/network-fee.ts +1 -1
  55. package/src/rpc.ts +64 -24
  56. package/src/token.ts +34 -7
  57. package/src/transaction-simulation.ts +29 -0
  58. package/dist/chunk-FKFLXQOJ.js +0 -5
  59. package/dist/chunk-FKFLXQOJ.js.map +0 -1
  60. package/dist/chunk-ISTALLTN.cjs +0 -8
  61. package/dist/chunk-ISTALLTN.cjs.map +0 -1
  62. package/dist/chunk-KVTVJNN4.cjs +0 -7
  63. package/dist/chunk-KVTVJNN4.cjs.map +0 -1
  64. package/dist/chunk-TSO5BGJ4.js +0 -5
  65. package/dist/chunk-TSO5BGJ4.js.map +0 -1
  66. package/dist/chunk-XQGU7MZ4.cjs +0 -7
  67. package/dist/chunk-XQGU7MZ4.cjs.map +0 -1
  68. package/dist/chunk-YJHKZHST.js +0 -5
  69. package/dist/chunk-YJHKZHST.js.map +0 -1
@@ -1,8 +1,8 @@
1
1
 
2
- > @avalabs/vm-module-types@0.0.15 build /home/runner/work/vm-modules/vm-modules/packages/types
2
+ > @avalabs/vm-module-types@0.0.20 build /home/runner/work/vm-modules/vm-modules/packages/types
3
3
  > tsup
4
4
 
5
- CLI Building entry: src/balance.ts, src/coingecko.ts, src/common.ts, src/index.ts, src/manifest.ts, src/module.ts, src/network-fee.ts, src/rpc.ts, src/token.ts, src/transaction-history.ts
5
+ CLI Building entry: src/balance.ts, src/coingecko.ts, src/common.ts, src/index.ts, src/manifest.ts, src/module.ts, src/network-fee.ts, src/rpc.ts, src/token.ts, src/transaction-history.ts, src/transaction-simulation.ts
6
6
  CLI Using tsconfig: tsconfig.json
7
7
  CLI tsup v7.2.0
8
8
  CLI Using tsup config: /home/runner/work/vm-modules/vm-modules/packages/types/tsup.config.ts
@@ -10,109 +10,121 @@
10
10
  CLI Cleaning output folder
11
11
  CJS Build start
12
12
  ESM Build start
13
+ Generated an empty chunk: "chunk-47KTBBRA".
13
14
  Generated an empty chunk: "chunk-JUV577XH".
14
15
  Generated an empty chunk: "chunk-OGQBQHLH".
15
16
  Generated an empty chunk: "chunk-AILYKQEY".
17
+ Generated an empty chunk: "chunk-P6AM7I3B".
16
18
  Generated an empty chunk: "chunk-BHB5UV3J".
17
19
  Generated an empty chunk: "chunk-CUVJNZP5".
18
20
  Generated an empty chunk: "chunk-7U2R34EQ".
19
- CJS dist/chunk-KVTVJNN4.cjs 201.00 B
20
- CJS dist/chunk-BFBDZPL3.cjs 1.21 KB
21
- CJS dist/chunk-JUV577XH.cjs 90.00 B
22
- CJS dist/chunk-XQGU7MZ4.cjs 167.00 B
23
- CJS dist/chunk-OGQBQHLH.cjs 90.00 B
24
- CJS dist/chunk-AILYKQEY.cjs 90.00 B
25
- CJS dist/chunk-ISTALLTN.cjs 1.12 KB
26
- CJS dist/token.cjs 260.00 B
27
- CJS dist/transaction-history.cjs 542.00 B
28
- CJS dist/balance.cjs 117.00 B
29
- CJS dist/coingecko.cjs 418.00 B
30
- CJS dist/common.cjs 263.00 B
31
- CJS dist/index.cjs 1.75 KB
32
- CJS dist/chunk-4PGCXP4C.cjs 433.00 B
33
- CJS dist/manifest.cjs 267.00 B
34
- CJS dist/chunk-74SNNWSF.cjs 667.00 B
35
- CJS dist/module.cjs 116.00 B
36
- CJS dist/network-fee.cjs 121.00 B
37
- CJS dist/rpc.cjs 383.00 B
38
- CJS dist/chunk-KVTVJNN4.cjs.map 653.00 B
39
- CJS dist/chunk-BFBDZPL3.cjs.map 3.69 KB
40
- CJS dist/chunk-JUV577XH.cjs.map 51.00 B
41
- CJS dist/chunk-XQGU7MZ4.cjs.map 838.00 B
42
- CJS dist/chunk-OGQBQHLH.cjs.map 51.00 B
43
- CJS dist/chunk-AILYKQEY.cjs.map 51.00 B
44
- CJS dist/chunk-ISTALLTN.cjs.map 3.72 KB
45
- CJS dist/token.cjs.map 51.00 B
46
- CJS dist/transaction-history.cjs.map 51.00 B
47
- CJS dist/balance.cjs.map 51.00 B
48
- CJS dist/coingecko.cjs.map 51.00 B
49
- CJS dist/common.cjs.map 51.00 B
50
- CJS dist/index.cjs.map 51.00 B
51
- CJS dist/chunk-4PGCXP4C.cjs.map 1.24 KB
52
- CJS dist/manifest.cjs.map 51.00 B
53
- CJS dist/chunk-74SNNWSF.cjs.map 1.65 KB
54
- CJS dist/module.cjs.map 51.00 B
55
- CJS dist/network-fee.cjs.map 51.00 B
56
- CJS dist/rpc.cjs.map 51.00 B
57
- CJS ⚡️ Build success in 1601ms
58
- ESM dist/chunk-TSO5BGJ4.js 189.00 B
59
- ESM dist/chunk-H6ZZE5M7.js 1.18 KB
60
- ESM dist/chunk-BHB5UV3J.js 75.00 B
61
- ESM dist/chunk-YJHKZHST.js 155.00 B
62
- ESM dist/chunk-CUVJNZP5.js 75.00 B
63
- ESM dist/chunk-7U2R34EQ.js 75.00 B
64
- ESM dist/chunk-FKFLXQOJ.js 1.11 KB
65
- ESM dist/token.js 119.00 B
66
- ESM dist/transaction-history.js 195.00 B
67
- ESM dist/balance.js 97.00 B
68
- ESM dist/coingecko.js 174.00 B
69
- ESM dist/common.js 122.00 B
70
- ESM dist/index.js 620.00 B
71
- ESM dist/chunk-WOO6UGSQ.js 394.00 B
72
- ESM dist/manifest.js 126.00 B
73
- ESM dist/chunk-A4YEBDMG.js 592.00 B
74
- ESM dist/module.js 96.00 B
75
- ESM dist/network-fee.js 101.00 B
76
- ESM dist/rpc.js 139.00 B
77
- ESM dist/chunk-TSO5BGJ4.js.map 653.00 B
78
- ESM dist/chunk-H6ZZE5M7.js.map 3.69 KB
79
- ESM dist/chunk-BHB5UV3J.js.map 51.00 B
80
- ESM dist/chunk-YJHKZHST.js.map 838.00 B
81
- ESM dist/chunk-CUVJNZP5.js.map 51.00 B
82
- ESM dist/chunk-7U2R34EQ.js.map 51.00 B
83
- ESM dist/chunk-FKFLXQOJ.js.map 3.72 KB
84
- ESM dist/token.js.map 51.00 B
85
- ESM dist/transaction-history.js.map 51.00 B
86
- ESM dist/balance.js.map 51.00 B
87
- ESM dist/coingecko.js.map 51.00 B
88
- ESM dist/common.js.map 51.00 B
89
- ESM dist/index.js.map 51.00 B
90
- ESM dist/chunk-WOO6UGSQ.js.map 1.24 KB
91
- ESM dist/manifest.js.map 51.00 B
92
- ESM dist/chunk-A4YEBDMG.js.map 1.65 KB
93
- ESM dist/module.js.map 51.00 B
94
- ESM dist/network-fee.js.map 51.00 B
95
- ESM dist/rpc.js.map 51.00 B
96
- ESM ⚡️ Build success in 1623ms
21
+ CJS dist/chunk-2KGTZTXY.cjs 219.00 B
22
+ CJS dist/chunk-BFBDZPL3.cjs 1.21 KB
23
+ CJS dist/chunk-47KTBBRA.cjs 90.00 B
24
+ CJS dist/chunk-JUV577XH.cjs 90.00 B
25
+ CJS dist/chunk-VRQJHO4F.cjs 276.00 B
26
+ CJS dist/chunk-OGQBQHLH.cjs 90.00 B
27
+ CJS dist/chunk-AILYKQEY.cjs 90.00 B
28
+ CJS dist/chunk-YVYCETG2.cjs 483.00 B
29
+ CJS dist/token.cjs 260.00 B
30
+ CJS dist/transaction-history.cjs 542.00 B
31
+ CJS dist/transaction-simulation.cjs 132.00 B
32
+ CJS dist/balance.cjs 117.00 B
33
+ CJS dist/coingecko.cjs 418.00 B
34
+ CJS dist/common.cjs 386.00 B
35
+ CJS dist/index.cjs 1.90 KB
36
+ CJS dist/chunk-4PGCXP4C.cjs 433.00 B
37
+ CJS dist/manifest.cjs 267.00 B
38
+ CJS dist/chunk-74SNNWSF.cjs 667.00 B
39
+ CJS dist/module.cjs 116.00 B
40
+ CJS dist/network-fee.cjs 121.00 B
41
+ CJS dist/rpc.cjs 377.00 B
42
+ CJS dist/chunk-2KGTZTXY.cjs.map 1.18 KB
43
+ CJS dist/chunk-BFBDZPL3.cjs.map 3.69 KB
44
+ CJS dist/chunk-47KTBBRA.cjs.map 51.00 B
45
+ CJS dist/chunk-JUV577XH.cjs.map 51.00 B
46
+ CJS dist/chunk-VRQJHO4F.cjs.map 1.08 KB
47
+ CJS dist/chunk-OGQBQHLH.cjs.map 51.00 B
48
+ CJS dist/chunk-AILYKQEY.cjs.map 51.00 B
49
+ CJS dist/chunk-YVYCETG2.cjs.map 4.03 KB
50
+ CJS dist/token.cjs.map 51.00 B
51
+ CJS dist/transaction-history.cjs.map 51.00 B
52
+ CJS dist/transaction-simulation.cjs.map 51.00 B
53
+ CJS dist/balance.cjs.map 51.00 B
54
+ CJS dist/coingecko.cjs.map 51.00 B
55
+ CJS dist/common.cjs.map 51.00 B
56
+ CJS dist/index.cjs.map 51.00 B
57
+ CJS dist/chunk-4PGCXP4C.cjs.map 1.24 KB
58
+ CJS dist/manifest.cjs.map 51.00 B
59
+ CJS dist/chunk-74SNNWSF.cjs.map 1.65 KB
60
+ CJS dist/module.cjs.map 51.00 B
61
+ CJS dist/network-fee.cjs.map 51.00 B
62
+ CJS dist/rpc.cjs.map 51.00 B
63
+ CJS ⚡️ Build success in 1247ms
64
+ ESM dist/chunk-7Y6UGMPZ.js 207.00 B
65
+ ESM dist/chunk-H6ZZE5M7.js 1.18 KB
66
+ ESM dist/chunk-P6AM7I3B.js 75.00 B
67
+ ESM dist/chunk-BHB5UV3J.js 75.00 B
68
+ ESM dist/chunk-4BNYMHOY.js 257.00 B
69
+ ESM dist/chunk-CUVJNZP5.js 75.00 B
70
+ ESM dist/chunk-7U2R34EQ.js 75.00 B
71
+ ESM dist/chunk-RKFOXZ35.js 464.00 B
72
+ ESM dist/token.js 119.00 B
73
+ ESM dist/transaction-history.js 195.00 B
74
+ ESM dist/transaction-simulation.js 112.00 B
75
+ ESM dist/balance.js 97.00 B
76
+ ESM dist/coingecko.js 174.00 B
77
+ ESM dist/common.js 142.00 B
78
+ ESM dist/index.js 664.00 B
79
+ ESM dist/chunk-WOO6UGSQ.js 394.00 B
80
+ ESM dist/manifest.js 126.00 B
81
+ ESM dist/chunk-A4YEBDMG.js 592.00 B
82
+ ESM dist/module.js 96.00 B
83
+ ESM dist/network-fee.js 101.00 B
84
+ ESM dist/rpc.js 133.00 B
85
+ ESM dist/chunk-7Y6UGMPZ.js.map 1.18 KB
86
+ ESM dist/chunk-H6ZZE5M7.js.map 3.69 KB
87
+ ESM dist/chunk-P6AM7I3B.js.map 51.00 B
88
+ ESM dist/chunk-BHB5UV3J.js.map 51.00 B
89
+ ESM dist/chunk-4BNYMHOY.js.map 1.08 KB
90
+ ESM dist/chunk-CUVJNZP5.js.map 51.00 B
91
+ ESM dist/chunk-7U2R34EQ.js.map 51.00 B
92
+ ESM dist/chunk-RKFOXZ35.js.map 4.03 KB
93
+ ESM dist/token.js.map 51.00 B
94
+ ESM dist/transaction-history.js.map 51.00 B
95
+ ESM dist/transaction-simulation.js.map 51.00 B
96
+ ESM dist/balance.js.map 51.00 B
97
+ ESM dist/coingecko.js.map 51.00 B
98
+ ESM dist/common.js.map 51.00 B
99
+ ESM dist/index.js.map 51.00 B
100
+ ESM dist/chunk-WOO6UGSQ.js.map 1.24 KB
101
+ ESM dist/manifest.js.map 51.00 B
102
+ ESM dist/chunk-A4YEBDMG.js.map 1.65 KB
103
+ ESM dist/module.js.map 51.00 B
104
+ ESM dist/network-fee.js.map 51.00 B
105
+ ESM dist/rpc.js.map 51.00 B
106
+ ESM ⚡️ Build success in 1265ms
97
107
  DTS Build start
98
- DTS ⚡️ Build success in 10757ms
99
- DTS dist/index.d.cts 1.12 KB
100
- DTS dist/coingecko.d.cts 1.09 KB
101
- DTS dist/module.d.cts 1.01 KB
102
- DTS dist/balance.d.cts 3.20 KB
103
- DTS dist/manifest.d.cts 6.95 KB
104
- DTS dist/network-fee.d.cts 360.00 B
105
- DTS dist/rpc.d.cts 3.02 KB
106
- DTS dist/transaction-history.d.cts 2.88 KB
107
- DTS dist/common.d.cts 729.00 B
108
- DTS dist/token.d.cts 518.00 B
109
- DTS dist/index.d.ts 1.11 KB
110
- DTS dist/coingecko.d.ts 1.09 KB
111
- DTS dist/module.d.ts 1023.00 B
112
- DTS dist/balance.d.ts 3.20 KB
113
- DTS dist/manifest.d.ts 6.95 KB
114
- DTS dist/network-fee.d.ts 360.00 B
115
- DTS dist/rpc.d.ts 3.02 KB
116
- DTS dist/transaction-history.d.ts 2.88 KB
117
- DTS dist/common.d.ts 728.00 B
118
- DTS dist/token.d.ts 518.00 B
108
+ DTS ⚡️ Build success in 10171ms
109
+ DTS dist/index.d.cts 1.43 KB
110
+ DTS dist/coingecko.d.cts 1.09 KB
111
+ DTS dist/module.d.cts 1.04 KB
112
+ DTS dist/balance.d.cts 3.81 KB
113
+ DTS dist/manifest.d.cts 6.95 KB
114
+ DTS dist/network-fee.d.cts 361.00 B
115
+ DTS dist/rpc.d.cts 3.65 KB
116
+ DTS dist/transaction-history.d.cts 2.88 KB
117
+ DTS dist/common.d.cts 902.00 B
118
+ DTS dist/transaction-simulation.d.cts 642.00 B
119
+ DTS dist/token.d.cts 1.05 KB
120
+ DTS dist/index.d.ts 1.42 KB
121
+ DTS dist/coingecko.d.ts 1.09 KB
122
+ DTS dist/module.d.ts 1.04 KB
123
+ DTS dist/balance.d.ts 3.80 KB
124
+ DTS dist/manifest.d.ts 6.95 KB
125
+ DTS dist/network-fee.d.ts 361.00 B
126
+ DTS dist/rpc.d.ts 3.65 KB
127
+ DTS dist/transaction-history.d.ts 2.88 KB
128
+ DTS dist/common.d.ts 901.00 B
129
+ DTS dist/transaction-simulation.d.ts 641.00 B
130
+ DTS dist/token.d.ts 1.05 KB
@@ -1,4 +1,4 @@
1
1
 
2
- > @avalabs/vm-module-types@0.0.15 lint /home/runner/work/vm-modules/vm-modules/packages/types
2
+ > @avalabs/vm-module-types@0.0.20 lint /home/runner/work/vm-modules/vm-modules/packages/types
3
3
  > eslint "src/**/*.ts"
4
4
 
package/CHANGELOG.md CHANGED
@@ -1,6 +1,32 @@
1
1
  # @avalabs/vm-module-types
2
2
 
3
- ## 0.0.0-testGetBalance-20240722173538
3
+ ## 0.0.0-testRetry-20240726170629
4
+
5
+ ## 0.0.20
6
+
7
+ ### Patch Changes
8
+
9
+ - 9bfa82d: Implement balance fetching for BitcoinModule
10
+
11
+ ## 0.0.19
12
+
13
+ ### Patch Changes
14
+
15
+ - 5af458b: Add getBalances to avalanche-module
16
+
17
+ ## 0.0.18
18
+
19
+ ## 0.0.17
20
+
21
+ ### Patch Changes
22
+
23
+ - 3590edf: Transaction parsing, validation and simulation for EVM
24
+
25
+ ## 0.0.16
26
+
27
+ ### Patch Changes
28
+
29
+ - bc48457: add support for all eth_sign methods
4
30
 
5
31
  ## 0.0.15
6
32
 
@@ -15,19 +15,19 @@ type TokenBalanceData = {
15
15
  name: string;
16
16
  symbol: string;
17
17
  balance: BN;
18
- balanceInCurrency: number;
19
18
  balanceDisplayValue: string;
20
- balanceCurrencyDisplayValue: string;
21
- priceInCurrency: number;
19
+ balanceInCurrency?: number;
20
+ balanceCurrencyDisplayValue?: string;
21
+ };
22
+ type TokenMarketData = {
23
+ priceInCurrency?: number;
22
24
  priceChanges?: {
23
25
  percentage?: number;
24
26
  value?: number;
25
27
  };
26
- };
27
- type TokenMarketData = {
28
- marketCap: number;
29
- change24: number;
30
- vol24: number;
28
+ marketCap?: number;
29
+ change24?: number;
30
+ vol24?: number;
31
31
  };
32
32
  type NetworkTokenWithBalance = TokenBalanceDataWithDecimals & NetworkToken & TokenMarketData & {
33
33
  coingeckoId: string;
@@ -77,14 +77,16 @@ interface TokenWithBalancePVM extends NetworkTokenWithBalance {
77
77
  availableDisplayValue?: string;
78
78
  availableCurrencyDisplayValue?: string;
79
79
  utxos?: PChainBalance;
80
- lockedStaked: number;
81
- lockedStakeable: number;
82
- lockedPlatform: number;
83
- atomicMemoryLocked: number;
84
- atomicMemoryUnlocked: number;
85
- unlockedUnstaked: number;
86
- unlockedStaked: number;
87
- pendingStaked: number;
80
+ balancePerType: {
81
+ lockedStaked: number;
82
+ lockedStakeable: number;
83
+ lockedPlatform: number;
84
+ atomicMemoryLocked: number;
85
+ atomicMemoryUnlocked: number;
86
+ unlockedUnstaked: number;
87
+ unlockedStaked: number;
88
+ pendingStaked: number;
89
+ };
88
90
  }
89
91
  interface TokenWithBalanceAVM extends NetworkTokenWithBalance {
90
92
  available?: BN;
@@ -92,12 +94,31 @@ interface TokenWithBalanceAVM extends NetworkTokenWithBalance {
92
94
  availableDisplayValue?: string;
93
95
  availableCurrencyDisplayValue?: string;
94
96
  utxos?: XChainBalances;
95
- locked: number;
96
- unlocked: number;
97
- atomicMemoryUnlocked: number;
98
- atomicMemoryLocked: number;
97
+ balancePerType: {
98
+ locked: number;
99
+ unlocked: number;
100
+ atomicMemoryUnlocked: number;
101
+ atomicMemoryLocked: number;
102
+ };
103
+ }
104
+ interface NftTokenWithBalance extends Omit<NetworkTokenWithBalance, 'type'> {
105
+ type: TokenType.ERC721 | TokenType.ERC1155;
106
+ address: string;
107
+ description: string;
108
+ logoUri: string;
109
+ logoSmall: string;
110
+ name: string;
111
+ symbol: string;
112
+ tokenId: string;
113
+ attributes: TokenAttribute[];
114
+ collectionName: string;
115
+ updatedAt?: number;
116
+ }
117
+ interface TokenAttribute {
118
+ name: string;
119
+ value: string;
99
120
  }
100
- type TokenWithBalance = TokenWithBalanceEVM | TokenWithBalanceBTC | TokenWithBalancePVM | TokenWithBalanceAVM;
121
+ type TokenWithBalance = TokenWithBalanceEVM | TokenWithBalanceBTC | TokenWithBalancePVM | TokenWithBalanceAVM | NftTokenWithBalance;
101
122
  type GetBalancesResponse = Record<string, Record<string, TokenWithBalance>>;
102
123
 
103
- export { GetBalancesParams, GetBalancesResponse, NetworkTokenWithBalance, TokenBalanceData, TokenWithBalance, TokenWithBalanceAVM, TokenWithBalanceBTC, TokenWithBalanceERC20, TokenWithBalanceEVM, TokenWithBalancePVM };
124
+ export { GetBalancesParams, GetBalancesResponse, NetworkTokenWithBalance, NftTokenWithBalance, TokenAttribute, TokenBalanceData, TokenMarketData, TokenWithBalance, TokenWithBalanceAVM, TokenWithBalanceBTC, TokenWithBalanceERC20, TokenWithBalanceEVM, TokenWithBalancePVM };
package/dist/balance.d.ts CHANGED
@@ -15,19 +15,19 @@ type TokenBalanceData = {
15
15
  name: string;
16
16
  symbol: string;
17
17
  balance: BN;
18
- balanceInCurrency: number;
19
18
  balanceDisplayValue: string;
20
- balanceCurrencyDisplayValue: string;
21
- priceInCurrency: number;
19
+ balanceInCurrency?: number;
20
+ balanceCurrencyDisplayValue?: string;
21
+ };
22
+ type TokenMarketData = {
23
+ priceInCurrency?: number;
22
24
  priceChanges?: {
23
25
  percentage?: number;
24
26
  value?: number;
25
27
  };
26
- };
27
- type TokenMarketData = {
28
- marketCap: number;
29
- change24: number;
30
- vol24: number;
28
+ marketCap?: number;
29
+ change24?: number;
30
+ vol24?: number;
31
31
  };
32
32
  type NetworkTokenWithBalance = TokenBalanceDataWithDecimals & NetworkToken & TokenMarketData & {
33
33
  coingeckoId: string;
@@ -77,14 +77,16 @@ interface TokenWithBalancePVM extends NetworkTokenWithBalance {
77
77
  availableDisplayValue?: string;
78
78
  availableCurrencyDisplayValue?: string;
79
79
  utxos?: PChainBalance;
80
- lockedStaked: number;
81
- lockedStakeable: number;
82
- lockedPlatform: number;
83
- atomicMemoryLocked: number;
84
- atomicMemoryUnlocked: number;
85
- unlockedUnstaked: number;
86
- unlockedStaked: number;
87
- pendingStaked: number;
80
+ balancePerType: {
81
+ lockedStaked: number;
82
+ lockedStakeable: number;
83
+ lockedPlatform: number;
84
+ atomicMemoryLocked: number;
85
+ atomicMemoryUnlocked: number;
86
+ unlockedUnstaked: number;
87
+ unlockedStaked: number;
88
+ pendingStaked: number;
89
+ };
88
90
  }
89
91
  interface TokenWithBalanceAVM extends NetworkTokenWithBalance {
90
92
  available?: BN;
@@ -92,12 +94,31 @@ interface TokenWithBalanceAVM extends NetworkTokenWithBalance {
92
94
  availableDisplayValue?: string;
93
95
  availableCurrencyDisplayValue?: string;
94
96
  utxos?: XChainBalances;
95
- locked: number;
96
- unlocked: number;
97
- atomicMemoryUnlocked: number;
98
- atomicMemoryLocked: number;
97
+ balancePerType: {
98
+ locked: number;
99
+ unlocked: number;
100
+ atomicMemoryUnlocked: number;
101
+ atomicMemoryLocked: number;
102
+ };
103
+ }
104
+ interface NftTokenWithBalance extends Omit<NetworkTokenWithBalance, 'type'> {
105
+ type: TokenType.ERC721 | TokenType.ERC1155;
106
+ address: string;
107
+ description: string;
108
+ logoUri: string;
109
+ logoSmall: string;
110
+ name: string;
111
+ symbol: string;
112
+ tokenId: string;
113
+ attributes: TokenAttribute[];
114
+ collectionName: string;
115
+ updatedAt?: number;
116
+ }
117
+ interface TokenAttribute {
118
+ name: string;
119
+ value: string;
99
120
  }
100
- type TokenWithBalance = TokenWithBalanceEVM | TokenWithBalanceBTC | TokenWithBalancePVM | TokenWithBalanceAVM;
121
+ type TokenWithBalance = TokenWithBalanceEVM | TokenWithBalanceBTC | TokenWithBalancePVM | TokenWithBalanceAVM | NftTokenWithBalance;
101
122
  type GetBalancesResponse = Record<string, Record<string, TokenWithBalance>>;
102
123
 
103
- export { GetBalancesParams, GetBalancesResponse, NetworkTokenWithBalance, TokenBalanceData, TokenWithBalance, TokenWithBalanceAVM, TokenWithBalanceBTC, TokenWithBalanceERC20, TokenWithBalanceEVM, TokenWithBalancePVM };
124
+ export { GetBalancesParams, GetBalancesResponse, NetworkTokenWithBalance, NftTokenWithBalance, TokenAttribute, TokenBalanceData, TokenMarketData, TokenWithBalance, TokenWithBalanceAVM, TokenWithBalanceBTC, TokenWithBalanceERC20, TokenWithBalanceEVM, TokenWithBalancePVM };
@@ -0,0 +1,7 @@
1
+ 'use strict';
2
+
3
+ var e=(r=>(r.NATIVE="NATIVE",r.ERC20="ERC20",r.ERC721="ERC721",r.ERC1155="ERC1155",r.NONERC="NONERC",r))(e||{});
4
+
5
+ exports.a = e;
6
+ //# sourceMappingURL=out.js.map
7
+ //# sourceMappingURL=chunk-2KGTZTXY.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/token.ts"],"names":["TokenType"],"mappings":"AAAO,IAAKA,OACVA,EAAA,OAAS,SACTA,EAAA,MAAQ,QACRA,EAAA,OAAS,SACTA,EAAA,QAAU,UACVA,EAAA,OAAS,SALCA,OAAA","sourcesContent":["export enum TokenType {\n NATIVE = 'NATIVE',\n ERC20 = 'ERC20',\n ERC721 = 'ERC721',\n ERC1155 = 'ERC1155',\n NONERC = 'NONERC',\n}\n\nexport interface NetworkToken {\n name: string;\n symbol: string;\n decimals: number;\n logoUri?: string;\n description?: string;\n}\n\nexport type NetworkContractToken = ERC20Token | ERC1155Token | ERC721Token | NONERCToken;\n\nexport interface ERC20Token {\n address: string;\n chainId?: number;\n color?: string;\n type: TokenType.ERC20;\n decimals: number;\n logoUri?: string;\n name: string;\n symbol: string;\n}\n\nexport interface ERC1155Token {\n address: string;\n type: TokenType.ERC1155;\n logoUri?: string;\n name?: string;\n symbol?: string;\n}\n\nexport interface ERC721Token {\n address: string;\n type: TokenType.ERC721;\n logoUri?: string;\n name?: string;\n symbol?: string;\n}\n\nexport interface NONERCToken {\n address: string;\n type: TokenType.NONERC;\n logoUri?: string;\n name?: string;\n symbol?: string;\n}\n"]}
@@ -0,0 +1,4 @@
1
+ 'use strict';
2
+
3
+ //# sourceMappingURL=out.js.map
4
+ //# sourceMappingURL=chunk-47KTBBRA.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ var r=(t=>(t.EVM="EVM",t.BITCOIN="BITCOIN",t.AVM="AVM",t.PVM="PVM",t.CoreEth="CoreEth",t))(r||{}),i=(e=>(e.PRODUCTION="production",e.DEV="dev",e))(i||{});
2
+
3
+ export { r as a, i as b };
4
+ //# sourceMappingURL=out.js.map
5
+ //# sourceMappingURL=chunk-4BNYMHOY.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/common.ts"],"names":["NetworkVMType","Environment"],"mappings":"AAsBO,IAAKA,OACVA,EAAA,IAAM,MACNA,EAAA,QAAU,UACVA,EAAA,IAAM,MACNA,EAAA,IAAM,MACNA,EAAA,QAAU,UALAA,OAAA,IAiBAC,OACVA,EAAA,WAAa,aACbA,EAAA,IAAM,MAFIA,OAAA","sourcesContent":["import type { NetworkToken } from './token';\n\nexport type Network = {\n isTestnet?: boolean;\n chainId: number;\n chainName: string;\n rpcUrl: string;\n utilityAddresses?: {\n multicall: string;\n };\n networkToken: NetworkToken;\n pricingProviders?: {\n coingecko: {\n assetPlatformId?: string;\n nativeTokenId?: string;\n };\n };\n explorerUrl?: string;\n logoUri?: string;\n vmName: NetworkVMType;\n};\n\nexport enum NetworkVMType {\n EVM = 'EVM',\n BITCOIN = 'BITCOIN',\n AVM = 'AVM',\n PVM = 'PVM',\n CoreEth = 'CoreEth',\n}\n\nexport type Storage = {\n get: <T>(id: string) => T | undefined;\n set: <T>(id: string, data: T) => void;\n};\n\nexport type Caip2ChainId = string;\n\nexport type Hex = `0x${string}`;\n\nexport enum Environment {\n PRODUCTION = 'production',\n DEV = 'dev',\n}\n"]}
@@ -0,0 +1,5 @@
1
+ var e=(r=>(r.NATIVE="NATIVE",r.ERC20="ERC20",r.ERC721="ERC721",r.ERC1155="ERC1155",r.NONERC="NONERC",r))(e||{});
2
+
3
+ export { e as a };
4
+ //# sourceMappingURL=out.js.map
5
+ //# sourceMappingURL=chunk-7Y6UGMPZ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/token.ts"],"names":["TokenType"],"mappings":"AAAO,IAAKA,OACVA,EAAA,OAAS,SACTA,EAAA,MAAQ,QACRA,EAAA,OAAS,SACTA,EAAA,QAAU,UACVA,EAAA,OAAS,SALCA,OAAA","sourcesContent":["export enum TokenType {\n NATIVE = 'NATIVE',\n ERC20 = 'ERC20',\n ERC721 = 'ERC721',\n ERC1155 = 'ERC1155',\n NONERC = 'NONERC',\n}\n\nexport interface NetworkToken {\n name: string;\n symbol: string;\n decimals: number;\n logoUri?: string;\n description?: string;\n}\n\nexport type NetworkContractToken = ERC20Token | ERC1155Token | ERC721Token | NONERCToken;\n\nexport interface ERC20Token {\n address: string;\n chainId?: number;\n color?: string;\n type: TokenType.ERC20;\n decimals: number;\n logoUri?: string;\n name: string;\n symbol: string;\n}\n\nexport interface ERC1155Token {\n address: string;\n type: TokenType.ERC1155;\n logoUri?: string;\n name?: string;\n symbol?: string;\n}\n\nexport interface ERC721Token {\n address: string;\n type: TokenType.ERC721;\n logoUri?: string;\n name?: string;\n symbol?: string;\n}\n\nexport interface NONERCToken {\n address: string;\n type: TokenType.NONERC;\n logoUri?: string;\n name?: string;\n symbol?: string;\n}\n"]}
@@ -0,0 +1,3 @@
1
+
2
+ //# sourceMappingURL=out.js.map
3
+ //# sourceMappingURL=chunk-P6AM7I3B.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ var r=(e=>(e.ETH_SEND_TRANSACTION="eth_sendTransaction",e.SIGN_TYPED_DATA_V3="eth_signTypedData_v3",e.SIGN_TYPED_DATA_V4="eth_signTypedData_v4",e.SIGN_TYPED_DATA_V1="eth_signTypedData_v1",e.SIGN_TYPED_DATA="eth_signTypedData",e.PERSONAL_SIGN="personal_sign",e.ETH_SIGN="eth_sign",e))(r||{}),a=(t=>(t.WARNING="Warning",t.DANGER="Danger",t.INFO="Info",t))(a||{});
2
+
3
+ export { r as a, a as b };
4
+ //# sourceMappingURL=out.js.map
5
+ //# sourceMappingURL=chunk-RKFOXZ35.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/rpc.ts"],"names":["RpcMethod","AlertType"],"mappings":"AAKO,IAAKA,OAEVA,EAAA,qBAAuB,sBACvBA,EAAA,mBAAqB,uBACrBA,EAAA,mBAAqB,uBACrBA,EAAA,mBAAqB,uBACrBA,EAAA,gBAAkB,oBAClBA,EAAA,cAAgB,gBAChBA,EAAA,SAAW,WARDA,OAAA,IAsFAC,OACVA,EAAA,QAAU,UACVA,EAAA,OAAS,SACTA,EAAA,KAAO,OAHGA,OAAA","sourcesContent":["import type { TransactionRequest } from 'ethers';\nimport type { Caip2ChainId, Hex } from './common';\nimport type { JsonRpcError, EthereumProviderError, OptionalDataWithOptionalCause } from '@metamask/rpc-errors';\nimport type { BalanceChange, TokenApprovals } from './transaction-simulation';\n\nexport enum RpcMethod {\n /* EVM */\n ETH_SEND_TRANSACTION = 'eth_sendTransaction',\n SIGN_TYPED_DATA_V3 = 'eth_signTypedData_v3',\n SIGN_TYPED_DATA_V4 = 'eth_signTypedData_v4',\n SIGN_TYPED_DATA_V1 = 'eth_signTypedData_v1',\n SIGN_TYPED_DATA = 'eth_signTypedData',\n PERSONAL_SIGN = 'personal_sign',\n ETH_SIGN = 'eth_sign',\n}\n\nexport type DappInfo = {\n name: string;\n url: string;\n icon: string;\n};\n\nexport type RpcRequest = {\n requestId: string;\n sessionId: string;\n method: RpcMethod;\n chainId: Caip2ChainId;\n params: unknown;\n dappInfo: DappInfo;\n context?: Record<string, unknown>; // for storing additional context information that's only relevant to the consumer\n};\n\nexport type RpcError =\n | JsonRpcError<OptionalDataWithOptionalCause>\n | EthereumProviderError<OptionalDataWithOptionalCause>;\n\nexport type RpcResponse<R = unknown, E extends RpcError = JsonRpcError<OptionalDataWithOptionalCause>> =\n | {\n result: R;\n }\n | {\n error: E;\n };\n\nexport interface MessageTypeProperty {\n name: string;\n type: string;\n}\n\nexport interface MessageTypes {\n EIP712Domain: MessageTypeProperty[];\n [additionalProperties: string]: MessageTypeProperty[];\n}\n\nexport interface TypedData<T extends MessageTypes> {\n types: T;\n primaryType: keyof T;\n domain: Record<string, unknown>;\n message: Record<string, unknown>;\n}\n\nexport type TypedDataV1 = { name: string; type: string; value: unknown }[];\n\nexport type DisplayData = {\n title: string;\n dAppInfo?: {\n name: string;\n action: string;\n logoUri?: string;\n };\n network: {\n chainId: number;\n name: string;\n logoUri?: string;\n };\n account?: string;\n messageDetails?: string;\n transactionDetails?: {\n website: string;\n from: string;\n to: string;\n data?: string;\n type?: string;\n };\n networkFeeSelector?: boolean;\n disclaimer?: string;\n alert?: Alert;\n balanceChange?: BalanceChange;\n tokenApprovals?: TokenApprovals;\n};\n\nexport enum AlertType {\n WARNING = 'Warning',\n DANGER = 'Danger',\n INFO = 'Info',\n}\n\nexport type AlertDetails = {\n title: string;\n description: string;\n detailedDescription?: string;\n actionTitles?: {\n proceed: string;\n reject: string;\n };\n};\n\nexport type Alert = {\n type: AlertType;\n details: AlertDetails;\n};\n\nexport type SigningData =\n | {\n type: RpcMethod.ETH_SEND_TRANSACTION;\n account: string;\n chainId: number;\n data: TransactionRequest;\n }\n | {\n type: RpcMethod.ETH_SIGN | RpcMethod.PERSONAL_SIGN;\n account: string;\n chainId: number;\n data: string;\n }\n | {\n type: RpcMethod.SIGN_TYPED_DATA | RpcMethod.SIGN_TYPED_DATA_V1;\n account: string;\n chainId: number;\n data: TypedData<MessageTypes> | TypedDataV1;\n }\n | {\n type: RpcMethod.SIGN_TYPED_DATA_V3 | RpcMethod.SIGN_TYPED_DATA_V4;\n account: string;\n chainId: number;\n data: TypedData<MessageTypes>;\n };\n\nexport type ApprovalParams = {\n request: RpcRequest;\n displayData: DisplayData;\n signingData: SigningData;\n};\n\nexport type ApprovalResponse =\n | {\n result: Hex;\n }\n | {\n error: RpcError;\n };\n\nexport interface ApprovalController {\n requestApproval: (params: ApprovalParams) => Promise<ApprovalResponse>;\n onTransactionConfirmed: (txHash: Hex) => void;\n onTransactionReverted: (txHash: Hex) => void;\n}\n"]}
@@ -0,0 +1,8 @@
1
+ 'use strict';
2
+
3
+ var r=(t=>(t.EVM="EVM",t.BITCOIN="BITCOIN",t.AVM="AVM",t.PVM="PVM",t.CoreEth="CoreEth",t))(r||{}),i=(e=>(e.PRODUCTION="production",e.DEV="dev",e))(i||{});
4
+
5
+ exports.a = r;
6
+ exports.b = i;
7
+ //# sourceMappingURL=out.js.map
8
+ //# sourceMappingURL=chunk-VRQJHO4F.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/common.ts"],"names":["NetworkVMType","Environment"],"mappings":"AAsBO,IAAKA,OACVA,EAAA,IAAM,MACNA,EAAA,QAAU,UACVA,EAAA,IAAM,MACNA,EAAA,IAAM,MACNA,EAAA,QAAU,UALAA,OAAA,IAiBAC,OACVA,EAAA,WAAa,aACbA,EAAA,IAAM,MAFIA,OAAA","sourcesContent":["import type { NetworkToken } from './token';\n\nexport type Network = {\n isTestnet?: boolean;\n chainId: number;\n chainName: string;\n rpcUrl: string;\n utilityAddresses?: {\n multicall: string;\n };\n networkToken: NetworkToken;\n pricingProviders?: {\n coingecko: {\n assetPlatformId?: string;\n nativeTokenId?: string;\n };\n };\n explorerUrl?: string;\n logoUri?: string;\n vmName: NetworkVMType;\n};\n\nexport enum NetworkVMType {\n EVM = 'EVM',\n BITCOIN = 'BITCOIN',\n AVM = 'AVM',\n PVM = 'PVM',\n CoreEth = 'CoreEth',\n}\n\nexport type Storage = {\n get: <T>(id: string) => T | undefined;\n set: <T>(id: string, data: T) => void;\n};\n\nexport type Caip2ChainId = string;\n\nexport type Hex = `0x${string}`;\n\nexport enum Environment {\n PRODUCTION = 'production',\n DEV = 'dev',\n}\n"]}
@@ -0,0 +1,8 @@
1
+ 'use strict';
2
+
3
+ var r=(e=>(e.ETH_SEND_TRANSACTION="eth_sendTransaction",e.SIGN_TYPED_DATA_V3="eth_signTypedData_v3",e.SIGN_TYPED_DATA_V4="eth_signTypedData_v4",e.SIGN_TYPED_DATA_V1="eth_signTypedData_v1",e.SIGN_TYPED_DATA="eth_signTypedData",e.PERSONAL_SIGN="personal_sign",e.ETH_SIGN="eth_sign",e))(r||{}),a=(t=>(t.WARNING="Warning",t.DANGER="Danger",t.INFO="Info",t))(a||{});
4
+
5
+ exports.a = r;
6
+ exports.b = a;
7
+ //# sourceMappingURL=out.js.map
8
+ //# sourceMappingURL=chunk-YVYCETG2.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/rpc.ts"],"names":["RpcMethod","AlertType"],"mappings":"AAKO,IAAKA,OAEVA,EAAA,qBAAuB,sBACvBA,EAAA,mBAAqB,uBACrBA,EAAA,mBAAqB,uBACrBA,EAAA,mBAAqB,uBACrBA,EAAA,gBAAkB,oBAClBA,EAAA,cAAgB,gBAChBA,EAAA,SAAW,WARDA,OAAA,IAsFAC,OACVA,EAAA,QAAU,UACVA,EAAA,OAAS,SACTA,EAAA,KAAO,OAHGA,OAAA","sourcesContent":["import type { TransactionRequest } from 'ethers';\nimport type { Caip2ChainId, Hex } from './common';\nimport type { JsonRpcError, EthereumProviderError, OptionalDataWithOptionalCause } from '@metamask/rpc-errors';\nimport type { BalanceChange, TokenApprovals } from './transaction-simulation';\n\nexport enum RpcMethod {\n /* EVM */\n ETH_SEND_TRANSACTION = 'eth_sendTransaction',\n SIGN_TYPED_DATA_V3 = 'eth_signTypedData_v3',\n SIGN_TYPED_DATA_V4 = 'eth_signTypedData_v4',\n SIGN_TYPED_DATA_V1 = 'eth_signTypedData_v1',\n SIGN_TYPED_DATA = 'eth_signTypedData',\n PERSONAL_SIGN = 'personal_sign',\n ETH_SIGN = 'eth_sign',\n}\n\nexport type DappInfo = {\n name: string;\n url: string;\n icon: string;\n};\n\nexport type RpcRequest = {\n requestId: string;\n sessionId: string;\n method: RpcMethod;\n chainId: Caip2ChainId;\n params: unknown;\n dappInfo: DappInfo;\n context?: Record<string, unknown>; // for storing additional context information that's only relevant to the consumer\n};\n\nexport type RpcError =\n | JsonRpcError<OptionalDataWithOptionalCause>\n | EthereumProviderError<OptionalDataWithOptionalCause>;\n\nexport type RpcResponse<R = unknown, E extends RpcError = JsonRpcError<OptionalDataWithOptionalCause>> =\n | {\n result: R;\n }\n | {\n error: E;\n };\n\nexport interface MessageTypeProperty {\n name: string;\n type: string;\n}\n\nexport interface MessageTypes {\n EIP712Domain: MessageTypeProperty[];\n [additionalProperties: string]: MessageTypeProperty[];\n}\n\nexport interface TypedData<T extends MessageTypes> {\n types: T;\n primaryType: keyof T;\n domain: Record<string, unknown>;\n message: Record<string, unknown>;\n}\n\nexport type TypedDataV1 = { name: string; type: string; value: unknown }[];\n\nexport type DisplayData = {\n title: string;\n dAppInfo?: {\n name: string;\n action: string;\n logoUri?: string;\n };\n network: {\n chainId: number;\n name: string;\n logoUri?: string;\n };\n account?: string;\n messageDetails?: string;\n transactionDetails?: {\n website: string;\n from: string;\n to: string;\n data?: string;\n type?: string;\n };\n networkFeeSelector?: boolean;\n disclaimer?: string;\n alert?: Alert;\n balanceChange?: BalanceChange;\n tokenApprovals?: TokenApprovals;\n};\n\nexport enum AlertType {\n WARNING = 'Warning',\n DANGER = 'Danger',\n INFO = 'Info',\n}\n\nexport type AlertDetails = {\n title: string;\n description: string;\n detailedDescription?: string;\n actionTitles?: {\n proceed: string;\n reject: string;\n };\n};\n\nexport type Alert = {\n type: AlertType;\n details: AlertDetails;\n};\n\nexport type SigningData =\n | {\n type: RpcMethod.ETH_SEND_TRANSACTION;\n account: string;\n chainId: number;\n data: TransactionRequest;\n }\n | {\n type: RpcMethod.ETH_SIGN | RpcMethod.PERSONAL_SIGN;\n account: string;\n chainId: number;\n data: string;\n }\n | {\n type: RpcMethod.SIGN_TYPED_DATA | RpcMethod.SIGN_TYPED_DATA_V1;\n account: string;\n chainId: number;\n data: TypedData<MessageTypes> | TypedDataV1;\n }\n | {\n type: RpcMethod.SIGN_TYPED_DATA_V3 | RpcMethod.SIGN_TYPED_DATA_V4;\n account: string;\n chainId: number;\n data: TypedData<MessageTypes>;\n };\n\nexport type ApprovalParams = {\n request: RpcRequest;\n displayData: DisplayData;\n signingData: SigningData;\n};\n\nexport type ApprovalResponse =\n | {\n result: Hex;\n }\n | {\n error: RpcError;\n };\n\nexport interface ApprovalController {\n requestApproval: (params: ApprovalParams) => Promise<ApprovalResponse>;\n onTransactionConfirmed: (txHash: Hex) => void;\n onTransactionReverted: (txHash: Hex) => void;\n}\n"]}
package/dist/common.cjs CHANGED
@@ -1,12 +1,16 @@
1
1
  'use strict';
2
2
 
3
- var chunkXQGU7MZ4_cjs = require('./chunk-XQGU7MZ4.cjs');
3
+ var chunkVRQJHO4F_cjs = require('./chunk-VRQJHO4F.cjs');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, 'Environment', {
8
8
  enumerable: true,
9
- get: function () { return chunkXQGU7MZ4_cjs.a; }
9
+ get: function () { return chunkVRQJHO4F_cjs.b; }
10
+ });
11
+ Object.defineProperty(exports, 'NetworkVMType', {
12
+ enumerable: true,
13
+ get: function () { return chunkVRQJHO4F_cjs.a; }
10
14
  });
11
15
  //# sourceMappingURL=out.js.map
12
16
  //# sourceMappingURL=common.cjs.map
package/dist/common.d.cts CHANGED
@@ -17,7 +17,15 @@ type Network = {
17
17
  };
18
18
  explorerUrl?: string;
19
19
  logoUri?: string;
20
+ vmName: NetworkVMType;
20
21
  };
22
+ declare enum NetworkVMType {
23
+ EVM = "EVM",
24
+ BITCOIN = "BITCOIN",
25
+ AVM = "AVM",
26
+ PVM = "PVM",
27
+ CoreEth = "CoreEth"
28
+ }
21
29
  type Storage = {
22
30
  get: <T>(id: string) => T | undefined;
23
31
  set: <T>(id: string, data: T) => void;
@@ -29,4 +37,4 @@ declare enum Environment {
29
37
  DEV = "dev"
30
38
  }
31
39
 
32
- export { Caip2ChainId, Environment, Hex, Network, Storage };
40
+ export { Caip2ChainId, Environment, Hex, Network, NetworkVMType, Storage };