0.1.11-next.64 • Published 2 years ago

@rangodev/wallets-core v0.1.11-next.64

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

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 (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.
  • add provider to checkWalletProviders
0.1.11-next.30

2 years ago

0.1.11-next.31

2 years ago

0.1.11-next.34

2 years ago

0.1.11-next.35

2 years ago

0.1.11-next.32

2 years ago

0.1.11-next.33

2 years ago

0.1.11-next.38

2 years ago

0.1.11-next.39

2 years ago

0.1.11-next.36

2 years ago

0.1.11-next.37

2 years ago

0.1.11-next.29

2 years ago

0.1.11-next.60

2 years ago

0.1.11-next.63

2 years ago

0.1.11-next.64

2 years ago

0.1.11-next.61

2 years ago

0.1.11-next.62

2 years ago

0.1.11-next.27

2 years ago

0.1.11-next.28

2 years ago

0.1.11-next.25

2 years ago

0.1.11-next.26

2 years ago

0.1.11-next.52

2 years ago

0.1.11-next.53

2 years ago

0.1.11-next.50

2 years ago

0.1.11-next.51

2 years ago

0.1.11-next.56

2 years ago

0.1.11-next.57

2 years ago

0.1.11-next.54

2 years ago

0.1.11-next.55

2 years ago

0.1.11-next.58

2 years ago

0.1.11-next.59

2 years ago

0.1.11-next.42

2 years ago

0.1.11-next.40

2 years ago

0.1.11-next.43

2 years ago

0.1.11-next.49

2 years ago

0.1.11-next.47

2 years ago

0.1.11-next.48

2 years ago

0.1.11-next.18

2 years ago

0.1.10

2 years ago

0.1.11-next.19

2 years ago

0.1.8-alpha.2

2 years ago

0.1.11-next.12

2 years ago

0.1.11-next.13

2 years ago

0.1.11-next.10

2 years ago

0.1.11-next.11

2 years ago

0.1.11-next.16

2 years ago

0.1.11-next.17

2 years ago

0.1.11-next.14

2 years ago

0.1.11-next.15

2 years ago

0.1.11-next.0

2 years ago

0.1.11-next.3

2 years ago

0.1.11-next.4

2 years ago

0.1.11-next.1

2 years ago

0.1.11-next.2

2 years ago

0.1.11-next.7

2 years ago

0.1.11-next.8

2 years ago

0.1.11-next.5

2 years ago

0.1.11-next.6

2 years ago

0.1.11-next.9

2 years ago

0.1.11-next.20

2 years ago

0.1.8

2 years ago

0.1.11-next.24

2 years ago

0.1.11-next.21

2 years ago

0.1.11-next.22

2 years ago

0.1.7

3 years ago