0.8.0 • Published 2 years ago
@rango-test/wallets-core v0.8.0
Add a type for child classes (Metamask, ..) to ensure they are implementing required methods.
Template
Template for creating a new provider
const WALLET = WalletType.COINBASE;
class TemplateWallet extends Wallet<InstanceType> implements WalletInterface {
constructor(onChangeState: EventHandler) {
super(WALLET, onChangeState);
// let instance = metamask_instance();
// if (!!instance) {
// this.setProvider(instance);
// this.subscirbe();
// }
}
async check() {}
async connect() {}
async disconnect() {}
async subscribe() {}
}
export default {
initializer: TemplateWallet,
type: WALLET
};
TODO
- subscirbe -> subscribe
- add eagerConnect to core (maybe instead of check?)
- Reading from wallets (like
eth_chainId
,eth_accounts
) should've a timeout. because sometimes wallet doesn't responding corretly. But requesting (likeeth_requestAccounts
) shouldn't have a timeout, because it opens a popup and it take some time to get a confirmation or rejction from user.
- add provider to
checkWalletProviders
0.6.1-next.0
2 years ago
0.8.1-next.0
2 years ago
0.6.1-next.1
2 years ago
0.6.1-next.2
2 years ago
0.8.1-next.2
2 years ago
0.8.1-next.1
2 years ago
0.8.0
2 years ago
0.7.0
2 years ago
0.6.0
2 years ago
0.5.0
2 years ago
0.3.1-next.1
2 years ago
0.4.0
2 years ago
0.3.1-next.0
2 years ago
0.3.0
2 years ago
0.2.0
2 years ago
0.1.11-next.89
2 years ago
0.1.11-next.88
2 years ago