@coinmasters/types 1.0.0

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.
@@ -0,0 +1,30 @@
1
+ export type GetAddressAndPubKeyResponse = {
2
+ bech32_address: string;
3
+ compressed_pk: any;
4
+ error_message: string;
5
+ return_code: number;
6
+ };
7
+
8
+ export type Signature = {
9
+ pub_key: {
10
+ type: string;
11
+ value: string;
12
+ };
13
+ sequence: string;
14
+ signature: string;
15
+ };
16
+
17
+ export enum ErrorCode {
18
+ NoError = 0x9000,
19
+ }
20
+
21
+ export enum MemoType {
22
+ BOND = 'BOND',
23
+ DEPOSIT = '+',
24
+ LEAVE = 'LEAVE',
25
+ THORNAME_REGISTER = '~',
26
+ UNBOND = 'UNBOND',
27
+ WITHDRAW = '-',
28
+ OPEN_LOAN = '$+',
29
+ CLOSE_LOAN = '$-',
30
+ }
@@ -0,0 +1,22 @@
1
+ export enum FeeOption {
2
+ Average = 'average',
3
+ Fast = 'fast',
4
+ Fastest = 'fastest',
5
+ }
6
+
7
+ export type WalletTxParams = {
8
+ feeOptionKey?: FeeOption;
9
+ from?: string;
10
+ memo?: string; // optional memo to pass
11
+ recipient: string;
12
+ };
13
+
14
+ export type EVMTxBaseParams<T = bigint> = {
15
+ to?: string;
16
+ from?: string;
17
+ nonce?: number;
18
+ gasLimit?: T;
19
+ data?: string;
20
+ value?: T;
21
+ chainId?: T;
22
+ };
package/src/wallet.ts ADDED
@@ -0,0 +1,20 @@
1
+ export enum WalletOption {
2
+ 'KEYSTORE' = 'KEYSTORE',
3
+ 'KEEPKEY' = 'KEEPKEY',
4
+ 'XDEFI' = 'XDEFI',
5
+ 'METAMASK' = 'METAMASK',
6
+ 'COINBASE_WEB' = 'COINBASE_WEB',
7
+ 'TREZOR' = 'TREZOR',
8
+ 'TRUSTWALLET_WEB' = 'TRUSTWALLET_WEB',
9
+ 'LEDGER' = 'LEDGER',
10
+ 'KEPLR' = 'KEPLR',
11
+ 'OKX' = 'OKX',
12
+ 'BRAVE' = 'BRAVE',
13
+ 'WALLETCONNECT' = 'WALLETCONNECT',
14
+ }
15
+
16
+ export type EVMWalletOptions =
17
+ | WalletOption.BRAVE
18
+ | WalletOption.METAMASK
19
+ | WalletOption.TRUSTWALLET_WEB
20
+ | WalletOption.COINBASE_WEB;