1.3.34 • Published 1 day ago

@dcentralab/wc-trust v1.3.34

Weekly downloads
-
License
ISC
Repository
-
Last release
1 day ago

Trust Wallet connector

Instalation

npm install @dcentralab/wc-trust

or

yarn add @dcentralab/wc-trust

Getting started

Trust wallet connector for web3-wc-modal, package that implement wallet connection with Trust Wallet chrome extension https://chrome.google.com/webstore/detail/trust-wallet/egjidjbpglichdcondbcbdnbeeppgdph

Interface

export type TConnect = (connectingWalletType: string, options?: IConnectionOptions) => void
export type TDisconnect = (clearDerivationPath?: boolean) => void

export interface IConnectionOptions {
  rpcUrl?: string
  networkId?: number
  derivationPath?: string
  blockchainType?: BLOCKCHAIN_TYPE
  connectionType?: TWalletType
  onConnectStart?: () => void
  savePath?: boolean
  removeLSKey?: boolean,
  showModalOnError?: boolean,
  showToast?: (msg: string, duration?: number) => any
  connectWallet?: TConnect
  disconnectWallet?: TDisconnect
  internal?: boolean
}

export interface IConnectionResult {
  provider: any
  providerName?: string
}

export interface IConnector {
  type: TWalletType,
  blockchainType: BLOCKCHAIN_TYPE
  mobile: boolean
  enabled: () => boolean;
  connector: (opts: IConnectionOptions) => Promise<IConnectionResult>

  disconnector?: () => Promise<void>

  getAccount: (provider: AbstractProvider | IBinanceProvider | ICardanoProvider) => Promise<string | undefined>
  getBalance: (provider: AbstractProvider | IBinanceProvider | ICardanoProvider, address: string) => Promise<string | undefined>
  getHWAccounts?: (opts: IGetHWAccounts) => Promise<string[]>
  showToast?: (msg: string, duration?: number) => void
  localStorageKey?: string
  connectWallet?: TConnect
  disconnectWallet?: TDisconnect
  unsubscribeEvents?: () => void
}
1.3.32

1 day ago

1.3.34

1 day ago

1.3.31

13 days ago

1.3.30

20 days ago

1.3.29

21 days ago

1.3.26

23 days ago

1.3.27

22 days ago

1.3.25

1 month ago

1.3.24

1 month ago

1.3.22

1 month ago

1.3.23

1 month ago

1.3.21

1 month ago

1.3.20

1 month ago

1.3.18

1 month ago

1.3.19

1 month ago

1.3.17

2 months ago

1.3.13

2 months ago

1.3.14

2 months ago

1.3.12

2 months ago

1.3.11

3 months ago

1.3.10

3 months ago

1.3.7

3 months ago

1.3.9

3 months ago

1.3.8

3 months ago

1.3.6

3 months ago

1.3.5

3 months ago

1.3.4

3 months ago

1.3.3

3 months ago

1.3.2

4 months ago

1.3.1

4 months ago

1.3.0

5 months ago

1.2.9

5 months ago

1.2.8

5 months ago

1.2.7

5 months ago

1.2.6

5 months ago

1.2.5

5 months ago

1.2.0

6 months ago

1.2.4

6 months ago

1.2.3

6 months ago

1.2.2

6 months ago

1.2.1

6 months ago

1.1.34

6 months ago

1.1.33

6 months ago

1.1.32

6 months ago

1.1.31

6 months ago

1.1.30

6 months ago

1.1.29

6 months ago

1.1.28

6 months ago

1.1.27

6 months ago

1.1.26

6 months ago

1.1.25

6 months ago

1.1.25-alpha.0

6 months ago

1.1.24-alpha.0

7 months ago

1.1.23-alpha.0

7 months ago

1.1.22-alpha.0

7 months ago

1.1.21-alpha.0

7 months ago