@talismn/balances 0.6.1 → 0.7.1
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 +1 -5
- package/dist/declarations/src/BalanceModule.d.ts +25 -15
- package/dist/declarations/src/EvmTokenFetcher.d.ts +11 -0
- package/dist/declarations/src/MiniMetadataUpdater.d.ts +5 -6
- package/dist/declarations/src/TalismanBalancesDatabase.d.ts +5 -2
- package/dist/declarations/src/index.d.ts +2 -0
- package/dist/declarations/src/modules/EvmErc20Module.d.ts +13 -23
- package/dist/declarations/src/modules/EvmNativeModule.d.ts +10 -21
- package/dist/declarations/src/modules/EvmUniswapV2Module.d.ts +39 -0
- package/dist/declarations/src/modules/SubstrateAssetsModule.d.ts +11 -24
- package/dist/declarations/src/modules/SubstrateEquilibriumModule.d.ts +11 -22
- package/dist/declarations/src/modules/SubstrateForeignAssetsModule.d.ts +38 -0
- package/dist/declarations/src/modules/SubstrateNativeModule/index.d.ts +7 -0
- package/dist/declarations/src/modules/SubstrateNativeModule/subscribeBase.d.ts +5 -0
- package/dist/declarations/src/modules/SubstrateNativeModule/subscribeCrowdloans.d.ts +5 -0
- package/dist/declarations/src/modules/SubstrateNativeModule/subscribeNompoolStaking.d.ts +5 -0
- package/dist/declarations/src/modules/SubstrateNativeModule/subscribeSubtensorStaking.d.ts +5 -0
- package/dist/declarations/src/modules/SubstrateNativeModule/types.d.ts +49 -0
- package/dist/declarations/src/modules/SubstrateNativeModule/util/QueryCache.d.ts +13 -0
- package/dist/declarations/src/modules/SubstrateNativeModule/util/SubNativeBalanceError.d.ts +5 -0
- package/dist/declarations/src/modules/SubstrateNativeModule/util/asObservable.d.ts +10 -0
- package/dist/declarations/src/modules/SubstrateNativeModule/util/balanceLockTypes.d.ts +15 -0
- package/dist/declarations/src/modules/SubstrateNativeModule/util/buildQueries.d.ts +13 -0
- package/dist/declarations/src/modules/SubstrateNativeModule/util/crowdloanFundContributionsChildKey.d.ts +4 -0
- package/dist/declarations/src/modules/SubstrateNativeModule/util/detectMiniMetadataChanges.d.ts +2 -0
- package/dist/declarations/src/modules/SubstrateNativeModule/util/mergeBalances.d.ts +13 -0
- package/dist/declarations/src/modules/SubstrateNativeModule/util/nompoolAccountId.d.ts +5 -0
- package/dist/declarations/src/modules/SubstrateNativeModule/util/sortChains.d.ts +1 -0
- package/dist/declarations/src/modules/SubstrateNativeModule/util/subtensor.d.ts +55 -0
- package/dist/declarations/src/modules/SubstratePsp22Module.d.ts +9 -20
- package/dist/declarations/src/modules/SubstrateTokensModule.d.ts +13 -24
- package/dist/declarations/src/modules/abis/erc20BalancesAggregator.d.ts +19 -0
- package/dist/declarations/src/modules/abis/uniswapV2Pair.d.ts +560 -0
- package/dist/declarations/src/modules/index.d.ts +52 -2
- package/dist/declarations/src/modules/util/InferBalanceModuleTypes.d.ts +28 -0
- package/dist/declarations/src/modules/util/RpcStateQueryHelper.d.ts +19 -0
- package/dist/declarations/src/modules/util/balances.d.ts +8 -0
- package/dist/declarations/src/modules/util/buildStorageCoders.d.ts +26 -0
- package/dist/declarations/src/modules/util/decodeOutput.d.ts +13 -0
- package/dist/declarations/src/modules/util/detectTransferMethod.d.ts +11 -0
- package/dist/declarations/src/modules/util/findChainMeta.d.ts +8 -0
- package/dist/declarations/src/modules/util/getUniqueChainIds.d.ts +5 -0
- package/dist/declarations/src/modules/util/index.d.ts +10 -113
- package/dist/declarations/src/modules/util/makeContractCaller.d.ts +9 -0
- package/dist/declarations/src/modules/util/storageCompression.d.ts +9 -0
- package/dist/declarations/src/types/balances.d.ts +172 -22
- package/dist/declarations/src/types/balancetypes.d.ts +44 -33
- package/dist/declarations/src/upgrades/2024-01-25-upgradeRemoveSymbolFromNativeTokenId.d.ts +2 -0
- package/dist/declarations/src/upgrades/2024-03-19-upgradeBalancesDataBlob.d.ts +2 -0
- package/dist/declarations/src/upgrades/index.d.ts +2 -0
- package/dist/declarations/src/util/hydrateChaindata.d.ts +8 -0
- package/dist/declarations/src/util/index.d.ts +1 -0
- package/dist/talismn-balances.cjs.dev.js +4259 -1982
- package/dist/talismn-balances.cjs.prod.js +4259 -1982
- package/dist/talismn-balances.esm.js +4235 -1949
- package/package.json +38 -34
- package/CHANGELOG.md +0 -335
- package/dist/declarations/src/modules/SubstrateNativeModule.d.ts +0 -65
- package/dist/declarations/src/modules/util/substrate-native.d.ts +0 -33
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@talismn/balances",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.7.1",
|
4
4
|
"author": "Talisman",
|
5
5
|
"homepage": "https://talisman.xyz",
|
6
6
|
"license": "GPL-3.0-or-later",
|
@@ -21,48 +21,47 @@
|
|
21
21
|
"engines": {
|
22
22
|
"node": ">=18"
|
23
23
|
},
|
24
|
-
"scripts": {
|
25
|
-
"test": "jest",
|
26
|
-
"lint": "eslint src --max-warnings 0",
|
27
|
-
"clean": "rm -rf dist && rm -rf .turbo rm -rf node_modules"
|
28
|
-
},
|
29
24
|
"dependencies": {
|
30
|
-
"@
|
31
|
-
"@
|
32
|
-
"@talismn/chain-connector-evm": "0.8.0",
|
33
|
-
"@talismn/chaindata-provider": "0.8.0",
|
34
|
-
"@talismn/chaindata-provider-extension": "0.8.0",
|
35
|
-
"@talismn/scale": "0.0.2",
|
36
|
-
"@talismn/subshape-fork": "^0.0.2",
|
37
|
-
"@talismn/token-rates": "0.3.0",
|
38
|
-
"@talismn/util": "0.2.1",
|
25
|
+
"@polkadot-api/utils": "^0.1.2",
|
26
|
+
"@supercharge/promise-pool": "^3.2.0",
|
39
27
|
"anylogger": "^1.0.11",
|
40
|
-
"
|
28
|
+
"bignumber.js": "^9.1.2",
|
29
|
+
"dexie": "^4.0.9",
|
41
30
|
"lodash": "4.17.21",
|
31
|
+
"pako": "^2.1.0",
|
32
|
+
"polkadot-api": "1.7.6",
|
42
33
|
"rxjs": "^7.8.1",
|
43
|
-
"
|
34
|
+
"scale-ts": "^1.6.1",
|
35
|
+
"viem": "^2.21.34",
|
36
|
+
"@talismn/chain-connector": "0.8.1",
|
37
|
+
"@talismn/chain-connector-evm": "0.8.1",
|
38
|
+
"@talismn/chaindata-provider": "0.8.1",
|
39
|
+
"@talismn/scale": "0.1.0",
|
40
|
+
"@talismn/util": "0.3.1",
|
41
|
+
"@talismn/token-rates": "1.0.1"
|
44
42
|
},
|
45
43
|
"devDependencies": {
|
46
|
-
"@polkadot/api-contract": "
|
47
|
-
"@polkadot/types": "
|
48
|
-
"@polkadot/util": "
|
49
|
-
"@polkadot/util-crypto": "
|
50
|
-
"@substrate/txwrapper-core": "
|
51
|
-
"@
|
52
|
-
"@
|
53
|
-
"@types/
|
54
|
-
"
|
55
|
-
"eslint": "^8.52.0",
|
44
|
+
"@polkadot/api-contract": "15.8.1",
|
45
|
+
"@polkadot/types": "15.8.1",
|
46
|
+
"@polkadot/util": "13.4.3",
|
47
|
+
"@polkadot/util-crypto": "13.4.3",
|
48
|
+
"@substrate/txwrapper-core": "7.5.3",
|
49
|
+
"@types/jest": "^29.5.14",
|
50
|
+
"@types/lodash": "^4.17.12",
|
51
|
+
"@types/pako": "^2.0.3",
|
52
|
+
"eslint": "^8.57.1",
|
56
53
|
"jest": "^29.7.0",
|
57
|
-
"ts-jest": "^29.
|
58
|
-
"typescript": "^5.
|
54
|
+
"ts-jest": "^29.2.5",
|
55
|
+
"typescript": "^5.6.3",
|
56
|
+
"@talismn/eslint-config": "0.0.3",
|
57
|
+
"@talismn/tsconfig": "0.0.2"
|
59
58
|
},
|
60
59
|
"peerDependencies": {
|
61
|
-
"@polkadot/api-contract": "
|
62
|
-
"@polkadot/types": "
|
63
|
-
"@polkadot/util": "
|
64
|
-
"@polkadot/util-crypto": "
|
65
|
-
"@substrate/txwrapper-core": "
|
60
|
+
"@polkadot/api-contract": "*",
|
61
|
+
"@polkadot/types": "*",
|
62
|
+
"@polkadot/util": "*",
|
63
|
+
"@polkadot/util-crypto": "*",
|
64
|
+
"@substrate/txwrapper-core": "*"
|
66
65
|
},
|
67
66
|
"preconstruct": {
|
68
67
|
"entrypoints": [
|
@@ -75,5 +74,10 @@
|
|
75
74
|
"extends": [
|
76
75
|
"@talismn/eslint-config/base"
|
77
76
|
]
|
77
|
+
},
|
78
|
+
"scripts": {
|
79
|
+
"test": "jest",
|
80
|
+
"lint": "eslint src --max-warnings 0",
|
81
|
+
"clean": "rm -rf dist plugins/dist .turbo node_modules"
|
78
82
|
}
|
79
83
|
}
|
package/CHANGELOG.md
DELETED
@@ -1,335 +0,0 @@
|
|
1
|
-
# @talismn/balances
|
2
|
-
|
3
|
-
## 0.6.1
|
4
|
-
|
5
|
-
### Patch Changes
|
6
|
-
|
7
|
-
- 771a5be: fix: incorrect cached/stale balances for evm accounts
|
8
|
-
- d2ccdaf: fix: balance subscriptions never update registry cache with new metadata
|
9
|
-
- 372f995: replace ethers by viem
|
10
|
-
- c4d5967: bump typescript version
|
11
|
-
- a916db0: docs: added @talismn/balances readme
|
12
|
-
- a3a1bd7: feat: psp22 balances module
|
13
|
-
- c36375f: Use Balances::transfer_allow_death as default method for substrate balance transfers
|
14
|
-
- 620b7eb: Dependency updates
|
15
|
-
- 5aadf99: fix: renamed renamed Unknown -> Unit for tokens with no symbol
|
16
|
-
- 5aadf99: feat: native token balances on custom networks
|
17
|
-
- Updated dependencies [123647e]
|
18
|
-
- Updated dependencies [03939d5]
|
19
|
-
- Updated dependencies [d2ccdaf]
|
20
|
-
- Updated dependencies [123647e]
|
21
|
-
- Updated dependencies [be0d19e]
|
22
|
-
- Updated dependencies [e0eb84a]
|
23
|
-
- Updated dependencies [ade2908]
|
24
|
-
- Updated dependencies [372f995]
|
25
|
-
- Updated dependencies [c4d5967]
|
26
|
-
- Updated dependencies [776432e]
|
27
|
-
- Updated dependencies [23f0d3a]
|
28
|
-
- Updated dependencies [e0eb84a]
|
29
|
-
- Updated dependencies [620b7eb]
|
30
|
-
- Updated dependencies [850381a]
|
31
|
-
- Updated dependencies [5aadf99]
|
32
|
-
- Updated dependencies [4cace80]
|
33
|
-
- Updated dependencies [a6c1b2a]
|
34
|
-
- Updated dependencies [372f995]
|
35
|
-
- Updated dependencies [9ebcd93]
|
36
|
-
- @talismn/token-rates@0.3.0
|
37
|
-
- @talismn/chaindata-provider@0.8.0
|
38
|
-
- @talismn/chaindata-provider-extension@0.8.0
|
39
|
-
- @talismn/chain-connector-evm@0.8.0
|
40
|
-
- @talismn/chain-connector@0.8.0
|
41
|
-
- @talismn/util@0.2.1
|
42
|
-
- @talismn/scale@0.0.2
|
43
|
-
|
44
|
-
## 0.6.0
|
45
|
-
|
46
|
-
### Minor Changes
|
47
|
-
|
48
|
-
- b920ab98: Added GPL licence
|
49
|
-
|
50
|
-
### Patch Changes
|
51
|
-
|
52
|
-
- 3c1a8b10: Dependency updates
|
53
|
-
- Updated dependencies [2d0ae30b]
|
54
|
-
- Updated dependencies [3c1a8b10]
|
55
|
-
- Updated dependencies [b920ab98]
|
56
|
-
- Updated dependencies [7573864f]
|
57
|
-
- @talismn/util@0.2.0
|
58
|
-
- @talismn/chaindata-provider@0.7.0
|
59
|
-
- @talismn/token-rates@0.2.0
|
60
|
-
- @talismn/chain-connector-evm@0.7.0
|
61
|
-
- @talismn/chain-connector@0.7.0
|
62
|
-
|
63
|
-
## 0.5.0
|
64
|
-
|
65
|
-
### Patch Changes
|
66
|
-
|
67
|
-
- @talismn/chain-connector@0.6.0
|
68
|
-
- @talismn/chain-connector-evm@0.6.0
|
69
|
-
- @talismn/chaindata-provider@0.6.0
|
70
|
-
- @talismn/token-rates@0.1.18
|
71
|
-
|
72
|
-
## 0.4.2
|
73
|
-
|
74
|
-
### Patch Changes
|
75
|
-
|
76
|
-
- Updated dependencies [1a2fdc73]
|
77
|
-
- @talismn/chaindata-provider@0.5.0
|
78
|
-
- @talismn/chain-connector@0.5.0
|
79
|
-
- @talismn/chain-connector-evm@0.5.0
|
80
|
-
- @talismn/token-rates@0.1.17
|
81
|
-
|
82
|
-
## 0.4.1
|
83
|
-
|
84
|
-
### Patch Changes
|
85
|
-
|
86
|
-
- fb8ee962: feat: proxy dapp websocket requests to talisman wallet backend when available
|
87
|
-
- f7aca48b: eslint rules
|
88
|
-
- 01bf239b: feat: crowdloan and nom pool balances
|
89
|
-
- 48f0222e: fix: removed some explicit `any`s
|
90
|
-
- 01bf239b: fix: packages publishing with incorrect interdependency versions
|
91
|
-
- Updated dependencies [fb8ee962]
|
92
|
-
- Updated dependencies [c898da98]
|
93
|
-
- Updated dependencies [f7aca48b]
|
94
|
-
- Updated dependencies [01bf239b]
|
95
|
-
- Updated dependencies [48f0222e]
|
96
|
-
- Updated dependencies [01bf239b]
|
97
|
-
- @talismn/chain-connector@0.4.4
|
98
|
-
- @talismn/chain-connector-evm@0.4.4
|
99
|
-
- @talismn/chaindata-provider@0.4.4
|
100
|
-
- @talismn/token-rates@0.1.16
|
101
|
-
- @talismn/util@0.1.9
|
102
|
-
|
103
|
-
## 0.4.0
|
104
|
-
|
105
|
-
### Patch Changes
|
106
|
-
|
107
|
-
- 3068bd60: feat: stale balances and exponential rpc backoff
|
108
|
-
- 6643a4e4: fix: tokenRates in @talismn/balances-react
|
109
|
-
- 6643a4e4: fix: ported useDbCache related perf fixes to @talismn/balances-react
|
110
|
-
- Updated dependencies [3068bd60]
|
111
|
-
- Updated dependencies [6643a4e4]
|
112
|
-
- Updated dependencies [79f6ccf6]
|
113
|
-
- Updated dependencies [c24dc1fb]
|
114
|
-
- @talismn/chain-connector@0.4.3
|
115
|
-
- @talismn/util@0.1.8
|
116
|
-
- @talismn/token-rates@0.1.15
|
117
|
-
- @talismn/chaindata-provider@0.4.3
|
118
|
-
- @talismn/chain-connector-evm@0.4.3
|
119
|
-
|
120
|
-
## 0.3.3
|
121
|
-
|
122
|
-
### Patch Changes
|
123
|
-
|
124
|
-
- c651551c: build: move `@polkadot` dependencies to `peerDependencies`
|
125
|
-
- Updated dependencies [c651551c]
|
126
|
-
- @talismn/chain-connector@0.4.2
|
127
|
-
- @talismn/util@0.1.7
|
128
|
-
- @talismn/chain-connector-evm@0.4.2
|
129
|
-
- @talismn/chaindata-provider@0.4.2
|
130
|
-
- @talismn/token-rates@0.1.14
|
131
|
-
|
132
|
-
## 0.3.2
|
133
|
-
|
134
|
-
## 0.3.1
|
135
|
-
|
136
|
-
### Patch Changes
|
137
|
-
|
138
|
-
- 8adc7f06: feat: switched build tool to preconstruct
|
139
|
-
- Updated dependencies [8adc7f06]
|
140
|
-
- Updated dependencies [cfe8d276]
|
141
|
-
- @talismn/chain-connector-evm@0.4.1
|
142
|
-
- @talismn/chaindata-provider@0.4.1
|
143
|
-
- @talismn/chain-connector@0.4.1
|
144
|
-
- @talismn/token-rates@0.1.13
|
145
|
-
- @talismn/util@0.1.6
|
146
|
-
|
147
|
-
## 0.3.0
|
148
|
-
|
149
|
-
### Minor Changes
|
150
|
-
|
151
|
-
- a63dbb3: exclude mirror tokens in sums
|
152
|
-
|
153
|
-
### Patch Changes
|
154
|
-
|
155
|
-
- 4aa691d: feat: new balance modules
|
156
|
-
- Updated dependencies [4aa691d]
|
157
|
-
- Updated dependencies [cd6a684]
|
158
|
-
- Updated dependencies [a63dbb3]
|
159
|
-
- @talismn/chain-connector-evm@0.4.0
|
160
|
-
- @talismn/chaindata-provider@0.2.1
|
161
|
-
- @talismn/chain-connector@0.2.1
|
162
|
-
- @talismn/token-rates@0.1.12
|
163
|
-
- @talismn/util@0.1.5
|
164
|
-
|
165
|
-
## 0.2.3
|
166
|
-
|
167
|
-
## 0.2.2
|
168
|
-
|
169
|
-
### Patch Changes
|
170
|
-
|
171
|
-
- Updated dependencies [931b6ca]
|
172
|
-
- @talismn/chain-connector-evm@0.3.0
|
173
|
-
- @talismn/chain-connector@0.2.0
|
174
|
-
- @talismn/chaindata-provider@0.2.0
|
175
|
-
- @talismn/token-rates@0.1.11
|
176
|
-
|
177
|
-
## 0.2.1
|
178
|
-
|
179
|
-
## 0.2.0
|
180
|
-
|
181
|
-
### Patch Changes
|
182
|
-
|
183
|
-
- Updated dependencies [bff217a1]
|
184
|
-
- Updated dependencies [bff217a1]
|
185
|
-
- @talismn/chain-connector-evm@0.2.0
|
186
|
-
|
187
|
-
## 0.1.19
|
188
|
-
|
189
|
-
## 0.1.18
|
190
|
-
|
191
|
-
### Patch Changes
|
192
|
-
|
193
|
-
- fix: a variety of improvements from the wallet integration
|
194
|
-
- Updated dependencies
|
195
|
-
- @talismn/chain-connector@0.1.10
|
196
|
-
- @talismn/chain-connector-evm@0.1.10
|
197
|
-
- @talismn/chaindata-provider@0.1.10
|
198
|
-
- @talismn/token-rates@0.1.10
|
199
|
-
- @talismn/util@0.1.4
|
200
|
-
|
201
|
-
## 0.1.17
|
202
|
-
|
203
|
-
### Patch Changes
|
204
|
-
|
205
|
-
- Updated dependencies [8ecb8214]
|
206
|
-
- @talismn/chaindata-provider@0.1.9
|
207
|
-
- @talismn/chain-connector@0.1.9
|
208
|
-
- @talismn/chain-connector-evm@0.1.9
|
209
|
-
- @talismn/token-rates@0.1.9
|
210
|
-
|
211
|
-
## 0.1.16
|
212
|
-
|
213
|
-
### Patch Changes
|
214
|
-
|
215
|
-
- Updated dependencies [d13f514]
|
216
|
-
- @talismn/chain-connector@0.1.8
|
217
|
-
- @talismn/chaindata-provider@0.1.8
|
218
|
-
- @talismn/chain-connector-evm@0.1.8
|
219
|
-
- @talismn/token-rates@0.1.8
|
220
|
-
|
221
|
-
## 0.1.15
|
222
|
-
|
223
|
-
## 0.1.14
|
224
|
-
|
225
|
-
## 0.1.13
|
226
|
-
|
227
|
-
### Patch Changes
|
228
|
-
|
229
|
-
- Updated dependencies [db04d0d]
|
230
|
-
- @talismn/token-rates@0.1.7
|
231
|
-
- @talismn/chain-connector@0.1.7
|
232
|
-
- @talismn/chaindata-provider@0.1.7
|
233
|
-
- @talismn/chain-connector-evm@0.1.7
|
234
|
-
|
235
|
-
## 0.1.12
|
236
|
-
|
237
|
-
### Patch Changes
|
238
|
-
|
239
|
-
- ca50757: feat: implemented token fiat rates in @talismn/balances
|
240
|
-
- Updated dependencies [ca50757]
|
241
|
-
- @talismn/chaindata-provider@0.1.6
|
242
|
-
- @talismn/token-rates@0.1.6
|
243
|
-
- @talismn/chain-connector@0.1.6
|
244
|
-
- @talismn/chain-connector-evm@0.1.6
|
245
|
-
|
246
|
-
## 0.1.11
|
247
|
-
|
248
|
-
## 0.1.10
|
249
|
-
|
250
|
-
### Patch Changes
|
251
|
-
|
252
|
-
- 850a4d0: fix: access property of undefined error
|
253
|
-
|
254
|
-
## 0.1.9
|
255
|
-
|
256
|
-
### Patch Changes
|
257
|
-
|
258
|
-
- d66c5bc: fix: evm native tokens
|
259
|
-
- Updated dependencies [d66c5bc]
|
260
|
-
- @talismn/chain-connector-evm@0.1.5
|
261
|
-
- @talismn/chaindata-provider@0.1.5
|
262
|
-
- @talismn/chain-connector@0.1.5
|
263
|
-
- @talismn/token-rates@0.1.5
|
264
|
-
|
265
|
-
## 0.1.8
|
266
|
-
|
267
|
-
### Patch Changes
|
268
|
-
|
269
|
-
- 3db774a: fix: useBalances creating too many subscriptions when called from multiple components
|
270
|
-
|
271
|
-
## 0.1.7
|
272
|
-
|
273
|
-
## 0.1.6
|
274
|
-
|
275
|
-
## 0.1.5
|
276
|
-
|
277
|
-
### Patch Changes
|
278
|
-
|
279
|
-
- @talismn/chain-connector@0.1.4
|
280
|
-
- @talismn/chaindata-provider@0.1.4
|
281
|
-
- @talismn/token-rates@0.1.4
|
282
|
-
|
283
|
-
## 0.1.4
|
284
|
-
|
285
|
-
### Patch Changes
|
286
|
-
|
287
|
-
- d5f69f7: fix: migrated orml token code into substrate orml module
|
288
|
-
- Updated dependencies [d5f69f7]
|
289
|
-
- @talismn/chaindata-provider@0.1.3
|
290
|
-
- @talismn/chain-connector@0.1.3
|
291
|
-
- @talismn/token-rates@0.1.3
|
292
|
-
|
293
|
-
## 0.1.3
|
294
|
-
|
295
|
-
### Patch Changes
|
296
|
-
|
297
|
-
- 5af305c: switched build output from esm to commonjs for ecosystem compatibility
|
298
|
-
- Updated dependencies [5af305c]
|
299
|
-
- @talismn/chain-connector@0.1.2
|
300
|
-
- @talismn/chaindata-provider@0.1.2
|
301
|
-
- @talismn/token-rates@0.1.2
|
302
|
-
- @talismn/util@0.1.3
|
303
|
-
|
304
|
-
## 0.1.2
|
305
|
-
|
306
|
-
### Patch Changes
|
307
|
-
|
308
|
-
- 2ccd51b: feat: implemented @talismn/balances-substrate-native
|
309
|
-
- Updated dependencies [2ccd51b]
|
310
|
-
- @talismn/util@0.1.2
|
311
|
-
|
312
|
-
## 0.1.1
|
313
|
-
|
314
|
-
### Patch Changes
|
315
|
-
|
316
|
-
- Fixed publish config
|
317
|
-
- Updated dependencies
|
318
|
-
- @talismn/chain-connector@0.1.1
|
319
|
-
- @talismn/chaindata-provider@0.1.1
|
320
|
-
- @talismn/token-rates@0.1.1
|
321
|
-
- @talismn/util@0.1.1
|
322
|
-
|
323
|
-
## 0.1.0
|
324
|
-
|
325
|
-
### Minor Changes
|
326
|
-
|
327
|
-
- 43c1a3a: Initial release
|
328
|
-
|
329
|
-
### Patch Changes
|
330
|
-
|
331
|
-
- Updated dependencies [43c1a3a]
|
332
|
-
- @talismn/chain-connector@0.1.0
|
333
|
-
- @talismn/chaindata-provider@0.1.0
|
334
|
-
- @talismn/token-rates@0.1.0
|
335
|
-
- @talismn/util@0.1.0
|
@@ -1,65 +0,0 @@
|
|
1
|
-
import { TypeRegistry } from "@polkadot/types";
|
2
|
-
import { ChainConnector } from "@talismn/chain-connector";
|
3
|
-
import { BalancesConfigTokenParams, ChainId, ChaindataProvider, NewTokenType, SubChainId } from "@talismn/chaindata-provider";
|
4
|
-
import { NewBalanceModule, NewTransferParamsType } from "../BalanceModule";
|
5
|
-
import { AddressesByToken, Amount, AmountWithLabel, Balances, LockedAmount, NewBalanceType, SubscriptionCallback } from "../types";
|
6
|
-
import { GetOrCreateTypeRegistry } from "./util";
|
7
|
-
type ModuleType = "substrate-native";
|
8
|
-
export declare const subNativeTokenId: (chainId: ChainId, tokenSymbol: string) => string;
|
9
|
-
export type SubNativeToken = NewTokenType<ModuleType, {
|
10
|
-
existentialDeposit: string;
|
11
|
-
chain: {
|
12
|
-
id: ChainId;
|
13
|
-
};
|
14
|
-
}>;
|
15
|
-
export type CustomSubNativeToken = SubNativeToken & {
|
16
|
-
isCustom: true;
|
17
|
-
};
|
18
|
-
declare module "@talismn/chaindata-provider/plugins" {
|
19
|
-
interface PluginTokenTypes {
|
20
|
-
SubNativeToken: SubNativeToken;
|
21
|
-
CustomSubNativeToken: CustomSubNativeToken;
|
22
|
-
}
|
23
|
-
}
|
24
|
-
export type SubNativeChainMeta = {
|
25
|
-
isTestnet: boolean;
|
26
|
-
symbol: string;
|
27
|
-
decimals: number;
|
28
|
-
existentialDeposit: string | null;
|
29
|
-
nominationPoolsPalletId: string | null;
|
30
|
-
crowdloanPalletId: string | null;
|
31
|
-
miniMetadata: `0x${string}` | null;
|
32
|
-
metadataVersion: number;
|
33
|
-
};
|
34
|
-
export type SubNativeModuleConfig = {
|
35
|
-
disable?: boolean;
|
36
|
-
} & BalancesConfigTokenParams;
|
37
|
-
export type SubNativeBalance = NewBalanceType<ModuleType, {
|
38
|
-
multiChainId: SubChainId;
|
39
|
-
free: Amount;
|
40
|
-
reserves: [AmountWithLabel<"reserved">, ...Array<AmountWithLabel<string>>];
|
41
|
-
locks: [LockedAmount<"fees">, LockedAmount<"misc">, ...Array<LockedAmount<string>>];
|
42
|
-
}>;
|
43
|
-
declare module "@talismn/balances/plugins" {
|
44
|
-
interface PluginBalanceTypes {
|
45
|
-
SubNativeBalance: SubNativeBalance;
|
46
|
-
}
|
47
|
-
}
|
48
|
-
export type BalancesCommonTransferMethods = "transferKeepAlive" | "transferAll";
|
49
|
-
export type BalancesTransferMethods = "transferAllowDeath" | BalancesCommonTransferMethods;
|
50
|
-
export type BalancesLegacyTransferMethods = "transfer" | BalancesCommonTransferMethods;
|
51
|
-
export type BalancesAllTransferMethods = BalancesLegacyTransferMethods | BalancesTransferMethods;
|
52
|
-
export type SubNativeTransferParams = NewTransferParamsType<{
|
53
|
-
registry: TypeRegistry;
|
54
|
-
metadataRpc: `0x${string}`;
|
55
|
-
blockHash: string;
|
56
|
-
blockNumber: number;
|
57
|
-
nonce: number;
|
58
|
-
specVersion: number;
|
59
|
-
transactionVersion: number;
|
60
|
-
tip?: string;
|
61
|
-
transferMethod: BalancesAllTransferMethods;
|
62
|
-
}>;
|
63
|
-
export declare const SubNativeModule: NewBalanceModule<ModuleType, SubNativeToken | CustomSubNativeToken, SubNativeChainMeta, SubNativeModuleConfig, SubNativeTransferParams>;
|
64
|
-
export declare function subscribeNompoolStaking(chaindataProvider: ChaindataProvider, chainConnector: ChainConnector, getOrCreateTypeRegistry: GetOrCreateTypeRegistry, addressesByToken: AddressesByToken<SubNativeToken | CustomSubNativeToken>, callback: SubscriptionCallback<Balances>, callerUnsubscribed: Promise<unknown>): Promise<void>;
|
65
|
-
export {};
|
@@ -1,33 +0,0 @@
|
|
1
|
-
import type { Registry } from "@polkadot/types-codec/types";
|
2
|
-
import { Observable } from "rxjs";
|
3
|
-
import { Balance, BalanceFormatter, LockedAmount, SubscriptionCallback, UnsubscribeFn } from "../../types";
|
4
|
-
/**
|
5
|
-
* Converts a subscription function into an Observable
|
6
|
-
*
|
7
|
-
* The type of a subscription function which can be converted into an observable:
|
8
|
-
*
|
9
|
-
* <TArgs, TResult>(...arguments: TArgs, callback: SubscriptionCallback<TResult>) => UnsubscribeFn
|
10
|
-
*/
|
11
|
-
export declare const asObservable: <T extends unknown[], R>(handler: (...args: [...T, SubscriptionCallback<R>]) => UnsubscribeFn) => (...args: T) => Observable<R>;
|
12
|
-
/** The stash account for the nomination pool */
|
13
|
-
export declare const nompoolStashAccountId: (registry: Registry, palletId: string, poolId: string) => string;
|
14
|
-
/** The rewards account for the nomination pool */
|
15
|
-
export declare const nompoolRewardAccountId: (registry: Registry, palletId: string, poolId: string) => string;
|
16
|
-
/**
|
17
|
-
* Crowdloan contributions are stored in the `childstate` key returned by this function.
|
18
|
-
*/
|
19
|
-
export declare const crowdloanFundContributionsChildKey: (registry: Registry, fundIndex: number) => `0x${string}`;
|
20
|
-
export type BalanceLockType = "reserved" | "democracy" | "crowdloan" | "staking" | "nompools-staking" | "nompools-unbonding" | "vesting" | "dapp-staking" | "other";
|
21
|
-
/**
|
22
|
-
* For converting the value of `lock?.id?.toUtf8?.()` which is retrieved from
|
23
|
-
* the Balances.Locks storage key into a useful classification for our UI
|
24
|
-
*/
|
25
|
-
export declare const getLockedType: (input?: string) => BalanceLockType;
|
26
|
-
export declare const filterBaseLocks: (locks: Array<Omit<LockedAmount<string>, "amount"> & {
|
27
|
-
amount: BalanceFormatter;
|
28
|
-
}>) => (Omit<LockedAmount<string>, "amount"> & {
|
29
|
-
amount: BalanceFormatter;
|
30
|
-
})[];
|
31
|
-
export declare const getLockTitle: (lock: Pick<LockedAmount<string>, "label" | "meta">, { balance }?: {
|
32
|
-
balance?: Balance | undefined;
|
33
|
-
}) => string;
|