@openocean.finance/wallet 0.0.1 → 0.0.6

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.
@@ -2,7 +2,7 @@
2
2
  * @name BaseWallet
3
3
  * @author openocean
4
4
  * @date 2021/4/21
5
- * @desc
5
+ * @desc openocean base wallet
6
6
  */
7
7
  import { EnumChains, EnumWalletType } from "../types";
8
8
  declare abstract class BaseWallet {
@@ -0,0 +1,16 @@
1
+ import { EnumChains, EnumWalletName, EnumWalletType } from "../types";
2
+ import BaseWallet from "./BaseWallet";
3
+ import Web3 from 'web3';
4
+ declare class Coinbase extends BaseWallet {
5
+ name: EnumWalletName;
6
+ icon: any;
7
+ supportChains: EnumChains[];
8
+ type: EnumWalletType;
9
+ sdk: Web3 | null;
10
+ /**
11
+ * connect Coinbase and get wallet address
12
+ * @param chainId specific chainId,throw error when not match
13
+ */
14
+ requestConnect(chainId?: number): Promise<string>;
15
+ }
16
+ export default Coinbase;
@@ -0,0 +1,15 @@
1
+ import { EnumChains, EnumWalletName, EnumWalletType } from "../types";
2
+ import BaseWallet from "./BaseWallet";
3
+ declare class TerraStation extends BaseWallet {
4
+ name: EnumWalletName;
5
+ icon: any;
6
+ supportChains: EnumChains[];
7
+ type: EnumWalletType;
8
+ sdk: any;
9
+ /**
10
+ * connect metamask and get wallet address
11
+ * @param chainId specific chainId,throw error when not match
12
+ */
13
+ requestConnect(chainId?: string): Promise<string>;
14
+ }
15
+ export default TerraStation;
package/lib/index.d.ts CHANGED
@@ -22,6 +22,8 @@ import TrustWallet from "./Wallets/TrustWallet";
22
22
  import Coin98 from "./Wallets/Coin98";
23
23
  import OKExWallet from "./Wallets/OKExWallet";
24
24
  import Phantom from "./Wallets/Phantom";
25
+ import TerraStation from './Wallets/TerraStation';
26
+ import Coinbase from "./Wallets/Coinbase";
25
27
  import { EnumChains } from "./types";
26
28
  export default WalletManager;
27
- export { WalletManager, MetaMask, BscWallet, Cyano, TronLink, EnumChains, Sollet, SolletIo, OntoMobile, WalletConnect, MathWallet, OntoWallet, SafePalWallet, ImTokenWallet, TokenPocket, TrustWallet, Coin98, Phantom, OKExWallet };
29
+ export { WalletManager, MetaMask, BscWallet, Cyano, TronLink, EnumChains, Sollet, SolletIo, OntoMobile, WalletConnect, MathWallet, OntoWallet, SafePalWallet, ImTokenWallet, TokenPocket, TrustWallet, Coin98, Phantom, OKExWallet, TerraStation, Coinbase };