@talismn/balances 0.0.0-pr956-20230721073229 → 0.0.0-pr967-20230725031503
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/CHANGELOG.md +12 -6
- package/README.md +126 -0
- package/dist/talismn-balances.cjs.dev.js +1 -1
- package/dist/talismn-balances.cjs.prod.js +1 -1
- package/dist/talismn-balances.esm.js +1 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
@@ -1,6 +1,12 @@
|
|
1
1
|
# @talismn/balances
|
2
2
|
|
3
|
-
## 0.0.0-
|
3
|
+
## 0.0.0-pr967-20230725031503
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- f6ebf976: docs: added @talismn/balances readme
|
8
|
+
|
9
|
+
## 0.6.0
|
4
10
|
|
5
11
|
### Minor Changes
|
6
12
|
|
@@ -13,11 +19,11 @@
|
|
13
19
|
- Updated dependencies [3c1a8b10]
|
14
20
|
- Updated dependencies [b920ab98]
|
15
21
|
- Updated dependencies [7573864f]
|
16
|
-
- @talismn/util@0.
|
17
|
-
- @talismn/chaindata-provider@0.
|
18
|
-
- @talismn/token-rates@0.
|
19
|
-
- @talismn/chain-connector-evm@0.
|
20
|
-
- @talismn/chain-connector@0.
|
22
|
+
- @talismn/util@0.2.0
|
23
|
+
- @talismn/chaindata-provider@0.7.0
|
24
|
+
- @talismn/token-rates@0.2.0
|
25
|
+
- @talismn/chain-connector-evm@0.7.0
|
26
|
+
- @talismn/chain-connector@0.7.0
|
21
27
|
|
22
28
|
## 0.5.0
|
23
29
|
|
package/README.md
CHANGED
@@ -1 +1,127 @@
|
|
1
1
|
# @talismn/balances
|
2
|
+
|
3
|
+
<img src="talisman.svg" alt="Talisman" width="15%" align="right" />
|
4
|
+
|
5
|
+
[](https://github.com/TalismanSociety/talisman/blob/dev/LICENSE)
|
6
|
+
[](https://www.npmjs.com/package/@talismn/balances)
|
7
|
+
[](https://www.npmjs.com/package/@talismn/balances)
|
8
|
+
[](https://discord.gg/talisman)
|
9
|
+
|
10
|
+
**@talismn/balances** is the core of a set of packages used to subscribe to on-chain account token balances.
|
11
|
+
|
12
|
+
A quick rundown on each package is given below.
|
13
|
+
|
14
|
+
### This (the core) package:
|
15
|
+
|
16
|
+
**@talismn/balances** (this package) includes:
|
17
|
+
|
18
|
+
- An API which wallets / dapps can use to access balances
|
19
|
+
- An interface for balance modules to implement
|
20
|
+
- A shared database (powered by dexie) for balance modules to store balances in
|
21
|
+
- Helpers (utility functions) for balance modules to use
|
22
|
+
- Provides a plugin architecture, which is used by the balance module packages to specify their balance types
|
23
|
+
|
24
|
+
### The react API for wallets & dapps:
|
25
|
+
|
26
|
+
**@talismn/balances-react** includes:
|
27
|
+
|
28
|
+
- React hooks for subscribing to on-chain account token balances
|
29
|
+
- (soon™): recoil atoms for on-chain account token balances
|
30
|
+
|
31
|
+
### The balance modules:
|
32
|
+
|
33
|
+
**@talismn/balances-default-modules**
|
34
|
+
|
35
|
+
- Collates the default balance modules (which can be found below) into a single package
|
36
|
+
|
37
|
+
**@talismn/substrate-native**
|
38
|
+
|
39
|
+
- A balance module for substrate native tokens
|
40
|
+
- Subscribes to the `system.account` state query balance for each token
|
41
|
+
- Also subscribes to the crowdloans pallet balances
|
42
|
+
- Also subscribes to the nompools pallet balances
|
43
|
+
|
44
|
+
**@talismn/substrate-orml**
|
45
|
+
|
46
|
+
- A proof-of-concept balance module for ORML token pallet tokens
|
47
|
+
- Attempts to auto-detect tokens
|
48
|
+
- **You should use @talismn/substrate-tokens instead**
|
49
|
+
|
50
|
+
**@talismn/substrate-tokens**
|
51
|
+
|
52
|
+
- A balance module for substrate ORML token pallet tokens
|
53
|
+
- Supports any token which can be queried via the `tokens.accounts` state query
|
54
|
+
- Requires configuration for each token (no auto-detection)
|
55
|
+
- We recommend that you use this module for ORML tokens
|
56
|
+
|
57
|
+
**@talismn/substrate-assets**
|
58
|
+
|
59
|
+
- A balance module for substrate assets pallet tokens
|
60
|
+
- Supports any token which can be queried via the `assets.account` state query
|
61
|
+
- Requires configuration for each token (no auto-detection)
|
62
|
+
|
63
|
+
**@talismn/substrate-equilibrium**
|
64
|
+
|
65
|
+
- A balance module for substrate eqBalances pallet tokens
|
66
|
+
- Used by [Equilibrium](https://equilibrium.io/) and [Genshiro](https://genshiro.io/)
|
67
|
+
- Supports auto-detection
|
68
|
+
|
69
|
+
**@talismn/evm-native**
|
70
|
+
|
71
|
+
- A balance module for evm native tokens
|
72
|
+
|
73
|
+
**@talismn/evm-erc20**
|
74
|
+
|
75
|
+
- A balance module for evm erc20 tokens
|
76
|
+
|
77
|
+
### The chain connectors:
|
78
|
+
|
79
|
+
**@talismn/chain-connector**
|
80
|
+
|
81
|
+
- A package which manages the open RPC connections to substrate chains
|
82
|
+
- Allows developers to say "Send this query to the chain with this id", without them needing to specify which RPCs to use
|
83
|
+
- Ensures that connections are only opened to the chains which are in use by the wallet/dapp
|
84
|
+
- Ensures that only one connection is open per chain
|
85
|
+
- Handles exponential backoff in the case of network failures
|
86
|
+
- Provides an interface which can be shared between a serviceworker and frontend, which enables the two to share the pool of open connections
|
87
|
+
- Provides an interface which mimics a polkadot-js `WsProvider`, which can be plugged into polkadot-js to make it use the shared pool of open connections
|
88
|
+
|
89
|
+
**@talismn/chain-connector-evm**
|
90
|
+
|
91
|
+
- A package which manages the connections to evm chains
|
92
|
+
- Allows developers to say "Send this query to the chain with this id", without them needing to specify which RPC to use
|
93
|
+
|
94
|
+
### The chaindata provider:
|
95
|
+
|
96
|
+
Currently split into two packages because we initially intended to write several implementations of the chaindata interface.
|
97
|
+
Will be merged into one package soon™.
|
98
|
+
|
99
|
+
**@talismn/chaindata-provider** and **@talismn/chaindata-provider-extension**
|
100
|
+
|
101
|
+
- A database (powered by dexie) to store chains, evm chains and tokens in
|
102
|
+
- An interface to interact with the database
|
103
|
+
- Syncs with the list in the [chaindata repository](https://github.com/talismansociety/chaindata) via graphql
|
104
|
+
- Supports custom (end-user-defined) chains and rpc overrides
|
105
|
+
- Provides a plugin architecture, which is used by the balance module packages to specify their token types
|
106
|
+
|
107
|
+
### The remaining packages:
|
108
|
+
|
109
|
+
**@talismn/connection-meta**
|
110
|
+
|
111
|
+
- Contains a small db which is used to optimise network performance in the wallet.
|
112
|
+
- Two metrics are kept:
|
113
|
+
- chainPriorityRpc (the last known well-behaved RPC for a chain)
|
114
|
+
- chainBackoffInterval (the amount of time the wallet should wait before attempting to connect to a unreachable chain again)
|
115
|
+
|
116
|
+
**@talismn/mutate-metadata**
|
117
|
+
|
118
|
+
- A package which can splice a chain's metadata into smaller pieces
|
119
|
+
- Enables us to make state queries across many chains at once without using all of the browser's memory
|
120
|
+
|
121
|
+
**@talismn/token-rates**
|
122
|
+
|
123
|
+
- Fetches and stores coingecko rates for each token in the @talismn/chaindata-provider database
|
124
|
+
|
125
|
+
**@talismn/util**
|
126
|
+
|
127
|
+
- Utility functions shared by the other packages, as well as the wallet and the portal
|
@@ -69,7 +69,7 @@ const db = new TalismanBalancesDatabase();
|
|
69
69
|
|
70
70
|
var packageJson = {
|
71
71
|
name: "@talismn/balances",
|
72
|
-
version: "0.0.0-
|
72
|
+
version: "0.0.0-pr967-20230725031503",
|
73
73
|
author: "Talisman",
|
74
74
|
homepage: "https://talisman.xyz",
|
75
75
|
license: "GPL-3.0-or-later",
|
@@ -69,7 +69,7 @@ const db = new TalismanBalancesDatabase();
|
|
69
69
|
|
70
70
|
var packageJson = {
|
71
71
|
name: "@talismn/balances",
|
72
|
-
version: "0.0.0-
|
72
|
+
version: "0.0.0-pr967-20230725031503",
|
73
73
|
author: "Talisman",
|
74
74
|
homepage: "https://talisman.xyz",
|
75
75
|
license: "GPL-3.0-or-later",
|
@@ -60,7 +60,7 @@ const db = new TalismanBalancesDatabase();
|
|
60
60
|
|
61
61
|
var packageJson = {
|
62
62
|
name: "@talismn/balances",
|
63
|
-
version: "0.0.0-
|
63
|
+
version: "0.0.0-pr967-20230725031503",
|
64
64
|
author: "Talisman",
|
65
65
|
homepage: "https://talisman.xyz",
|
66
66
|
license: "GPL-3.0-or-later",
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@talismn/balances",
|
3
|
-
"version": "0.0.0-
|
3
|
+
"version": "0.0.0-pr967-20230725031503",
|
4
4
|
"author": "Talisman",
|
5
5
|
"homepage": "https://talisman.xyz",
|
6
6
|
"license": "GPL-3.0-or-later",
|
@@ -27,11 +27,11 @@
|
|
27
27
|
"clean": "rm -rf dist && rm -rf .turbo rm -rf node_modules"
|
28
28
|
},
|
29
29
|
"dependencies": {
|
30
|
-
"@talismn/chain-connector": "0.
|
31
|
-
"@talismn/chain-connector-evm": "0.
|
32
|
-
"@talismn/chaindata-provider": "0.
|
33
|
-
"@talismn/token-rates": "0.
|
34
|
-
"@talismn/util": "0.
|
30
|
+
"@talismn/chain-connector": "0.7.0",
|
31
|
+
"@talismn/chain-connector-evm": "0.7.0",
|
32
|
+
"@talismn/chaindata-provider": "0.7.0",
|
33
|
+
"@talismn/token-rates": "0.2.0",
|
34
|
+
"@talismn/util": "0.2.0",
|
35
35
|
"anylogger": "^1.0.11",
|
36
36
|
"dexie": "^3.2.4",
|
37
37
|
"lodash": "4.17.21"
|