@dynamic-labs/wallet-book 0.18.25 → 0.18.26
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 +7 -0
- package/README.md +28 -0
- package/package.json +2 -2
- package/wallet-book-fallbacks.cjs +4 -0
- package/wallet-book-fallbacks.js +4 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
|
|
2
|
+
### [0.18.26](https://github.com/dynamic-labs/DynamicAuth/compare/v0.18.25...v0.18.26) (2023-10-14)
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* ArgentX' support for in-browser wallet
|
|
7
|
+
|
|
8
|
+
|
|
2
9
|
### [0.18.25](https://github.com/dynamic-labs/DynamicAuth/compare/v0.18.24...v0.18.25) (2023-10-12)
|
|
3
10
|
|
|
4
11
|
|
package/README.md
CHANGED
|
@@ -40,6 +40,34 @@ Required fields:
|
|
|
40
40
|
|
|
41
41
|
Refer to `WalletRecordsSchema` for more schema options
|
|
42
42
|
|
|
43
|
+
### Adding injected (browser extension) wallets
|
|
44
|
+
|
|
45
|
+
Similar to [adding first party wallets](#adding-first-party-wallet), we add another key, `injectedConfig` to the wallet object.
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
...
|
|
49
|
+
injectedConfig: [
|
|
50
|
+
{
|
|
51
|
+
chain: 'EVM',
|
|
52
|
+
extensionLocators: [
|
|
53
|
+
{ flag: 'isOkxWallet', value: true },
|
|
54
|
+
{ flag: 'isOkexWallet', value: true }
|
|
55
|
+
],
|
|
56
|
+
windowLocations: ['okxwallet']
|
|
57
|
+
}
|
|
58
|
+
],
|
|
59
|
+
name: 'OKX'
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
#### Things to remember when adding a new wallet
|
|
63
|
+
|
|
64
|
+
- `IF the new wallet is also in wallletconnect.json`: make sure that the key used in `firstParty/index.ts` is the `same` as the value from `walletconnect.json` as to inherit the properties from that wallet definition.
|
|
65
|
+
- The value(s) in `windowLocations` map to `window.<value from windowLocations>`. i.e. `okxwallet` means `window.okxwallet`. The values can be a nested path that is dot delimited. If the wallet lives under `window.ethereum` or `window.ethereum.providers`, those window locations are imported by default.
|
|
66
|
+
- For every extension locator you add for the new wallet, add the negation `[{ flag: 'isOkxWallet', value: false }, ...]` to the extensionLocators under the `metamask` key in firstParty.
|
|
67
|
+
- If the new wallet is wallet connect enabled (exists in `walletconnect.json`), make sure to add: `filterFromWalletConnect: true` as a sibling to `injectedConfig` which will filter the wallet from the wallet connect connectors list and use wallet connect as fallback.
|
|
68
|
+
|
|
69
|
+
Refer to `injectedConfigSchema` for the schema options
|
|
70
|
+
|
|
43
71
|
### Updating Wallet Connect Data
|
|
44
72
|
|
|
45
73
|
- Download the data from : https://registry.walletconnect.org/data/wallets.json replace
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/wallet-book",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.26",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/dynamic-labs/DynamicAuth.git",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"zod": "3.21.4",
|
|
29
|
-
"@dynamic-labs/logger": "0.18.
|
|
29
|
+
"@dynamic-labs/logger": "0.18.26"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
32
|
"react": "^17.0.2 || ^18.0.0",
|
package/wallet-book-fallbacks.js
CHANGED