@rango-dev/wallets-core 0.1.11-next.74 → 0.1.11-next.76
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/package.json +1 -4
- package/readme.md +0 -43
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rango-dev/wallets-core",
|
|
3
|
-
"version": "0.1.11-next.
|
|
3
|
+
"version": "0.1.11-next.76",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"module": "dist/wallets-core.esm.js",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -9,9 +9,6 @@
|
|
|
9
9
|
"dist",
|
|
10
10
|
"src"
|
|
11
11
|
],
|
|
12
|
-
"engines": {
|
|
13
|
-
"node": ">=10"
|
|
14
|
-
},
|
|
15
12
|
"scripts": {
|
|
16
13
|
"start": "tsdx watch",
|
|
17
14
|
"build": "tsdx build",
|
package/readme.md
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
[ ] Add a type for child classes (Metamask, ..) to ensure they are implementing required methods.
|
|
2
|
-
|
|
3
|
-
## Template
|
|
4
|
-
|
|
5
|
-
Template for creating a new provider
|
|
6
|
-
|
|
7
|
-
```
|
|
8
|
-
const WALLET = WalletType.COINBASE;
|
|
9
|
-
|
|
10
|
-
class TemplateWallet extends Wallet<InstanceType> implements WalletInterface {
|
|
11
|
-
constructor(onChangeState: EventHandler) {
|
|
12
|
-
super(WALLET, onChangeState);
|
|
13
|
-
|
|
14
|
-
// let instance = metamask_instance();
|
|
15
|
-
// if (!!instance) {
|
|
16
|
-
// this.setProvider(instance);
|
|
17
|
-
// this.subscirbe();
|
|
18
|
-
// }
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
async check() {}
|
|
22
|
-
async connect() {}
|
|
23
|
-
async disconnect() {}
|
|
24
|
-
async subscribe() {}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export default {
|
|
28
|
-
initializer: TemplateWallet,
|
|
29
|
-
type: WALLET
|
|
30
|
-
};
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
## TODO
|
|
34
|
-
|
|
35
|
-
- [ ] subscirbe -> subscribe
|
|
36
|
-
- [ ] add eagerConnect to core (maybe instead of check?)
|
|
37
|
-
- [ ] Reading from wallets (like `eth_chainId`, `eth_accounts`) should've a timeout. because sometimes wallet doesn't responding corretly. But requesting (like `eth_requestAccounts`) shouldn't have a timeout, because it opens a popup and it take some time to get a confirmation or rejction from user.
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
- add provider to `checkWalletProviders`
|