wallaby-cash 1.2.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.
Files changed (69) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +66 -0
  3. package/dist/base.d.ts +10 -0
  4. package/dist/helpers/logger.d.ts +2 -0
  5. package/dist/index.d.ts +45 -0
  6. package/dist/index.esm.js +2 -0
  7. package/dist/index.esm.js.map +1 -0
  8. package/dist/index.js +2 -0
  9. package/dist/index.js.map +1 -0
  10. package/dist/index.umd.js +2 -0
  11. package/dist/index.umd.js.map +1 -0
  12. package/dist/lib/auth/index.d.ts +54 -0
  13. package/dist/lib/index.d.ts +3 -0
  14. package/dist/lib/system/index.d.ts +32 -0
  15. package/dist/lib/transactions/index.d.ts +80 -0
  16. package/dist/lib/utils/index.d.ts +21 -0
  17. package/dist/lib/utils/utils.d.ts +68 -0
  18. package/dist/lib/wallet/index.d.ts +99 -0
  19. package/dist/localStorageMock.d.ts +7 -0
  20. package/dist/routes/auth.d.ts +33 -0
  21. package/dist/routes/index.d.ts +3 -0
  22. package/dist/routes/system.d.ts +23 -0
  23. package/dist/routes/transactions.d.ts +28 -0
  24. package/dist/routes/wallet.d.ts +53 -0
  25. package/dist/tests/data/auth.d.ts +11 -0
  26. package/dist/tests/data/config.d.ts +6 -0
  27. package/dist/tests/data/index.d.ts +4 -0
  28. package/dist/tests/data/system.d.ts +47 -0
  29. package/dist/tests/data/user.d.ts +20 -0
  30. package/dist/types/auth.d.ts +48 -0
  31. package/dist/types/common.d.ts +206 -0
  32. package/dist/types/index.d.ts +5 -0
  33. package/dist/types/merchants.d.ts +43 -0
  34. package/dist/types/transactions.d.ts +127 -0
  35. package/dist/types/wallet.d.ts +123 -0
  36. package/package.json +90 -0
  37. package/src/base.ts +95 -0
  38. package/src/helpers/logger.ts +11 -0
  39. package/src/index.ts +58 -0
  40. package/src/lib/auth/index.ts +225 -0
  41. package/src/lib/index.ts +3 -0
  42. package/src/lib/system/index.ts +104 -0
  43. package/src/lib/transactions/index.ts +259 -0
  44. package/src/lib/utils/index.ts +80 -0
  45. package/src/lib/utils/utils.ts +224 -0
  46. package/src/lib/wallet/index.ts +515 -0
  47. package/src/localStorageMock.js +23 -0
  48. package/src/routes/auth.ts +34 -0
  49. package/src/routes/index.ts +3 -0
  50. package/src/routes/system.ts +24 -0
  51. package/src/routes/transactions.ts +29 -0
  52. package/src/routes/wallet.ts +65 -0
  53. package/src/tests/__mocks__/axios.js +4 -0
  54. package/src/tests/__mocks__/localStorageMock.js +23 -0
  55. package/src/tests/auth.spec.ts +117 -0
  56. package/src/tests/data/auth.ts +49 -0
  57. package/src/tests/data/config.ts +8 -0
  58. package/src/tests/data/index.ts +4 -0
  59. package/src/tests/data/system.ts +54 -0
  60. package/src/tests/data/user.ts +25 -0
  61. package/src/tests/system.spec.ts +47 -0
  62. package/src/tests/utils.spec.ts +70 -0
  63. package/src/tests/wallet.spec.ts +44 -0
  64. package/src/types/auth.ts +57 -0
  65. package/src/types/common.ts +230 -0
  66. package/src/types/index.ts +5 -0
  67. package/src/types/merchants.ts +47 -0
  68. package/src/types/transactions.ts +139 -0
  69. package/src/types/wallet.ts +141 -0
@@ -0,0 +1,47 @@
1
+ export declare const mockBlockchainsResponse: {
2
+ chains: {
3
+ id: string;
4
+ name: string;
5
+ derivationPath: string;
6
+ addressRegex: string;
7
+ slip44: number;
8
+ indexUrl: string;
9
+ rpcUrl: string;
10
+ chainId: string;
11
+ }[];
12
+ };
13
+ export declare const mockTokensResponse: {
14
+ assets: {
15
+ chainId: string;
16
+ chainName: string;
17
+ name: string;
18
+ symbol: string;
19
+ type: string;
20
+ tokenStandard: string;
21
+ assetIndex: number;
22
+ description: string;
23
+ ownershipType: string;
24
+ multisigVersion: number;
25
+ multisigSignerThreshold: number;
26
+ chain: {
27
+ id: string;
28
+ name: string;
29
+ derivationPath: string;
30
+ addressRegex: string;
31
+ slip44: number;
32
+ indexUrl: string;
33
+ rpcUrl: string;
34
+ chainId: string;
35
+ };
36
+ }[];
37
+ };
38
+ export declare const mockUserData: {
39
+ user: {
40
+ id: string;
41
+ externalUserId: string;
42
+ firstName: string;
43
+ lastName: string;
44
+ latestWallabyAuthPubKey: string;
45
+ latestWallabyAuthPubKeyVersion: string;
46
+ };
47
+ };
@@ -0,0 +1,20 @@
1
+ export declare const testUser: {
2
+ id: string;
3
+ wallabyUserId: string;
4
+ wrongId: string;
5
+ algoAddress: string;
6
+ firstName: string;
7
+ lastName: string;
8
+ email: string;
9
+ hashKey: string;
10
+ wrongHashKey: string;
11
+ message: string;
12
+ hashedMessage: string;
13
+ signature: string;
14
+ wallabyAuthPublicKey: string;
15
+ privateKey: string;
16
+ encryptedPrivateKey: string;
17
+ publicKey: string;
18
+ seedPhrase: string;
19
+ testAccessToken: string;
20
+ };
@@ -0,0 +1,48 @@
1
+ import { User } from './common';
2
+ export declare type SignatureMessageRequest = {
3
+ hashKey: string;
4
+ userId: string;
5
+ };
6
+ export declare type SignatureMessageResponse = {
7
+ message: string;
8
+ hashedMessage: string;
9
+ signature: string;
10
+ clientAuthPubKey: string;
11
+ decryptedClientAuthPrivKey: string;
12
+ error?: any;
13
+ };
14
+ export declare type SignInRequest = {
15
+ hashKey: string;
16
+ };
17
+ export declare type SignInResponse = {
18
+ accessToken: string;
19
+ user: User;
20
+ error?: any;
21
+ };
22
+ export declare type SignUpRequest = {
23
+ hashKey: string;
24
+ firstName: string;
25
+ lastName: string;
26
+ email: string;
27
+ };
28
+ export declare type SignUpResponse = {
29
+ accessToken: string;
30
+ user: User;
31
+ error?: any;
32
+ };
33
+ export declare type ClientAuthPubKeyRequest = {
34
+ hashKey: string;
35
+ userId: string;
36
+ message: string;
37
+ clientAuthPubKey: string;
38
+ signature: string;
39
+ newClientAuthPubKey: string;
40
+ };
41
+ export declare type ClientAuthPubKeyResponse = {
42
+ user: User;
43
+ error?: any;
44
+ };
45
+ export declare type RefreshAccessTokenResponse = {
46
+ accessToken: string;
47
+ error?: any;
48
+ };
@@ -0,0 +1,206 @@
1
+ import { Merchant, MerchantAsset } from './merchants';
2
+ export declare type UtilsResponse = string | undefined;
3
+ export declare type WallabyError = {
4
+ statusCode: number;
5
+ message: string;
6
+ };
7
+ export declare type PasswordValidatorResponse = {
8
+ valid: boolean;
9
+ message?: string;
10
+ };
11
+ export declare type WallabyConfig = {
12
+ apiKey: string;
13
+ baseUrl: string;
14
+ jwt: string;
15
+ userId: string;
16
+ accessToken?: string;
17
+ };
18
+ export declare type User = {
19
+ id: string;
20
+ firstName?: string;
21
+ lastName?: string;
22
+ externalUserId: string;
23
+ clientAuthPubKey: string;
24
+ wallabyAuthPubKey: string;
25
+ wallabyAuthPubKeyVersion: string;
26
+ };
27
+ export declare type UserAsset = {
28
+ id: string;
29
+ userId: string | null;
30
+ merchantId: string | null;
31
+ userAssetAddress: string | null;
32
+ walletId: string | null;
33
+ configId: string;
34
+ assetName: string;
35
+ assetSymbol: string;
36
+ balance: string;
37
+ balanceUpdatedAt: Date | string | null;
38
+ defaultAddress: string;
39
+ source: UserAssetSource;
40
+ addresses: Array<{
41
+ address: string;
42
+ publicKey?: string;
43
+ type?: string;
44
+ }>;
45
+ ownershipType: OwnershipType;
46
+ createdAt: Date | string;
47
+ updatedAt: Date | string;
48
+ config: AssetConfig;
49
+ merchant: Merchant;
50
+ };
51
+ export declare type Address = {
52
+ address: string;
53
+ publicKey?: string;
54
+ type?: AddressType;
55
+ };
56
+ export declare type AssetConfig = {
57
+ id: string;
58
+ merchantId: string;
59
+ verified: boolean;
60
+ isOffChain: boolean;
61
+ contractAddress: string;
62
+ ownerAddresses: Array<string>;
63
+ status?: AssetConfigStatus;
64
+ createdByUserId?: string;
65
+ createdByUser?: User;
66
+ derivationPath: string;
67
+ name: string;
68
+ symbol: string;
69
+ ticker: string;
70
+ assetId?: string;
71
+ assetName?: string;
72
+ assetType: AssetType;
73
+ decimals: number;
74
+ iconUrl: string;
75
+ rpcUrl: string;
76
+ chainId: string;
77
+ chainName: BlockchainName;
78
+ type?: AssetType;
79
+ tokenStandard?: TokenStandard;
80
+ assetIndex?: number;
81
+ description?: string;
82
+ ownershipType?: OwnershipType;
83
+ multisigVersion: number;
84
+ multisigSignerThreshold: number;
85
+ chain?: Blockchain;
86
+ };
87
+ export declare enum UserAssetSource {
88
+ Merchant = "merchant",
89
+ User = "user",
90
+ republic = "republic"
91
+ }
92
+ export declare enum AssetConfigStatus {
93
+ Active = "active",
94
+ Inactive = "inactive"
95
+ }
96
+ export declare enum AssetType {
97
+ Coin = "COIN",
98
+ Token = "TOKEN"
99
+ }
100
+ export declare enum OwnershipType {
101
+ SingleOwner = "SINGLE_OWNER",
102
+ MultiSig = "MULTI_SIG"
103
+ }
104
+ export declare enum TokenStandard {
105
+ Erc20 = "ERC_20",
106
+ Erc1404 = "ERC_1404",
107
+ Arc20 = "ARC_20",
108
+ Arc1404 = "ARC_1404",
109
+ Mrc20 = "MRC_20",
110
+ Bep20 = "BEP_20",
111
+ AlgoStandard = "ALGO_STANDARD",
112
+ AlgoApp = "ALGO_APP"
113
+ }
114
+ export declare enum AddressType {
115
+ Segwit = "SEGWIT",
116
+ Legacy = "LEGACY",
117
+ Default = "DEFAULT"
118
+ }
119
+ export declare type Blockchain = {
120
+ id: string;
121
+ name: string;
122
+ isEvm: boolean;
123
+ iconUrl?: string;
124
+ mainnetId?: string;
125
+ mainnetRpcUrl?: string;
126
+ mainnetIndexUrl?: string;
127
+ testnetId?: string;
128
+ testnetRpcUrl?: string;
129
+ testnetIndexUrl?: string;
130
+ derivationPath?: string;
131
+ addressRegex?: string;
132
+ slip44: BlockchainSlip44;
133
+ status?: BlockchainStatus;
134
+ createdAt: Date | string;
135
+ updatedAt: Date | string;
136
+ assets: AssetConfig[];
137
+ merchantAssets: MerchantAsset[];
138
+ };
139
+ export declare enum BlockchainStatus {
140
+ Up = "UP",
141
+ Down = "DOWN"
142
+ }
143
+ export declare enum BlockchainSlip44 {
144
+ BTC = 0,
145
+ ETH = 60,
146
+ ALGO = 283,
147
+ AVAX = 9000,
148
+ MATIC = 966
149
+ }
150
+ export declare enum BlockchainName {
151
+ Bitcoin = "BITCOIN",
152
+ Ethereum = "ETHEREUM",
153
+ Algorand = "ALGORAND",
154
+ Avalanche = "AVALANCHE",
155
+ Polygon = "POLYGON"
156
+ }
157
+ export declare enum RequestMothod {
158
+ Post = "POST",
159
+ Get = "GET",
160
+ Put = "PUT",
161
+ Delete = "DELETE"
162
+ }
163
+ export declare interface RequestOptions extends RequestInit {
164
+ method: RequestMothod;
165
+ payload?: any;
166
+ }
167
+ export declare type RequestRoute = {
168
+ fullPath: string | ((params: any) => string);
169
+ method: RequestMothod;
170
+ accessTokenRequired: boolean;
171
+ };
172
+ export declare enum ApiKeyStatus {
173
+ Active = "active",
174
+ Inactive = "inactive"
175
+ }
176
+ export declare type ApiKey = {
177
+ id: string;
178
+ merchantId?: string;
179
+ appName: string;
180
+ apiKey: string;
181
+ ipAddresses: string[];
182
+ domainNames: string[];
183
+ status: ApiKeyStatus;
184
+ clientJWTPubKey: string;
185
+ usersCount: number;
186
+ requestsCount: number;
187
+ totalRequestSizeInKb: number;
188
+ totalResponseSizeInKb: number;
189
+ totalResponseTimeInKb: number;
190
+ lastRequestAt: Date | string | null;
191
+ onlyDashboardAccess: boolean;
192
+ createdAt: Date | string;
193
+ updatedAt: Date | string;
194
+ merchant: Merchant;
195
+ origins: ApiKeyOrigin[];
196
+ };
197
+ export type ApiKeyOrigin = {
198
+ id: string;
199
+ merchantId?: string;
200
+ apiKeyId: string;
201
+ origin: string;
202
+ createdAt: Date | string;
203
+ updatedAt: Date | string;
204
+ merchant: Merchant;
205
+ apiKey: ApiKey;
206
+ };
@@ -0,0 +1,5 @@
1
+ export * from './auth';
2
+ export * from './common';
3
+ export * from './merchants';
4
+ export * from './transactions';
5
+ export * from './wallet';
@@ -0,0 +1,43 @@
1
+ import { ApiKey, UserAsset, AssetConfig, Blockchain } from './common';
2
+ export declare enum MerchantStatus {
3
+ Active = "active",
4
+ Inactive = "inactive",
5
+ Invalidated = "invalidated"
6
+ }
7
+ export declare enum MerchantAssetStatus {
8
+ Active = "active",
9
+ Inactive = "disabled"
10
+ }
11
+ export type Merchant = {
12
+ id: string;
13
+ name: string;
14
+ nameSlugify: string;
15
+ verified: boolean;
16
+ contactEmail: string | null;
17
+ contactPhoneNumber: string | null;
18
+ usersCount: number;
19
+ assetsCount: number;
20
+ tokensCount: number;
21
+ coinsCount: number;
22
+ walletsCount: number;
23
+ status: MerchantStatus;
24
+ createdAt: Date | string;
25
+ updatedAt: Date | string;
26
+ apiKeys?: ApiKey[];
27
+ merchantAssets: MerchantAsset[];
28
+ usersAssets: UserAsset[];
29
+ };
30
+ export declare type MerchantAsset = {
31
+ id: string;
32
+ merchantId: string;
33
+ configId: string;
34
+ chainId: string;
35
+ chainName: string;
36
+ assetName: string;
37
+ assetSymbol: string;
38
+ createdAt: Date | string;
39
+ updatedAt: Date | string;
40
+ merchant: Merchant;
41
+ config: AssetConfig;
42
+ chain: Blockchain;
43
+ };
@@ -0,0 +1,127 @@
1
+ import { AssetConfig, BlockchainName, BlockchainSlip44, OwnershipType, TokenStandard, User } from './common';
2
+ import { Merchant } from './merchants';
3
+ export declare type Transaction = {
4
+ id: string;
5
+ reference: string;
6
+ hash: string;
7
+ userId: string;
8
+ merchantId: string;
9
+ userEmail: string;
10
+ chainId: string;
11
+ chainName: string;
12
+ chainSlip44: BlockchainSlip44;
13
+ fromWalletId: string;
14
+ fromAddress: string;
15
+ toWalletId: string;
16
+ toAddress: string;
17
+ assetId: string;
18
+ assetSymbol: string;
19
+ tokenType: TokenStandard;
20
+ amount: string;
21
+ fee: string;
22
+ note: string;
23
+ nonce: number;
24
+ gasPrice: number;
25
+ submitter: string;
26
+ status: TransactionStatus;
27
+ ownershipType: OwnershipType;
28
+ multisigVersion: number;
29
+ multisigSignerThreshold: number;
30
+ multisigSignerApprovedCount: number;
31
+ txBlob: string;
32
+ createdAt: Date | string;
33
+ updatedAt: Date | string;
34
+ asset: AssetConfig;
35
+ multisigParticipants: MultisigParticipant;
36
+ merchant: Merchant;
37
+ };
38
+ export declare enum TransactionStatus {
39
+ PendingApproval = "PENDING-APPROVAL",
40
+ Pending = "PENDING",
41
+ Failed = "FAILED",
42
+ Successful = "SUCCESSFUL"
43
+ }
44
+ export declare type MultisigParticipant = {
45
+ id: string;
46
+ transactionId: string;
47
+ userAddress: string;
48
+ userId: string;
49
+ chainId: string;
50
+ chainName: string;
51
+ assetId: string;
52
+ assetName: string;
53
+ assetSymbol: string;
54
+ status: MultisigParticipantStatus;
55
+ transaction: Transaction;
56
+ user: User;
57
+ };
58
+ export declare enum MultisigParticipantStatus {
59
+ PendingApproval = "pending-approval",
60
+ Approved = "approved",
61
+ Rejected = "rejected"
62
+ }
63
+ export declare type FeeEstimateRequest = {
64
+ originAddress: string;
65
+ recipientAddress: string;
66
+ amount: number;
67
+ assetSymbol: string;
68
+ transactionType: TransactionType;
69
+ tokenStandard?: TokenStandard;
70
+ };
71
+ export declare type FeeEstimatesResponse = {
72
+ feePaymentSymbol: string;
73
+ fee: string;
74
+ lowestFee: string;
75
+ highestFee: string;
76
+ error?: any;
77
+ };
78
+ export declare type TransferRequest = {
79
+ originAddress: string;
80
+ recipientAddress: string;
81
+ amount: string;
82
+ assetId: string;
83
+ reference: string;
84
+ memo?: string;
85
+ hashKey: string;
86
+ };
87
+ export declare type TransferResponse = {
88
+ transaction: Transaction;
89
+ message?: string;
90
+ };
91
+ export declare type TransactionStatusResponse = {
92
+ status: TransactionStatus;
93
+ transactionHash: string;
94
+ reference: string;
95
+ assetSymbol: string;
96
+ transactionValue: string;
97
+ fromAddress: string;
98
+ toAddress: string;
99
+ chain: BlockchainName;
100
+ fee: string;
101
+ nonce?: number;
102
+ timestamp?: number;
103
+ blockNumber?: number;
104
+ memo?: string;
105
+ origins?: UTXOFundsMove[];
106
+ recipients?: UTXOFundsMove[];
107
+ };
108
+ export declare type UTXOFundsMove = {
109
+ address: string[];
110
+ amount: string;
111
+ txId: string;
112
+ };
113
+ export declare enum TransactionType {
114
+ Allowance = "ALLOWANCE_TX",
115
+ Optin = "OPTIN_TX",
116
+ Transfer = "TRANSFER_TX"
117
+ }
118
+ export declare type CreateAllowanceRequest = {
119
+ ownerAddress: string;
120
+ spenderAddress: string;
121
+ amount: string;
122
+ assetId: string;
123
+ contractAddress: string;
124
+ reference: string;
125
+ memo?: string;
126
+ hashKey: string;
127
+ };
@@ -0,0 +1,123 @@
1
+ import { Encrypted } from 'eth-crypto';
2
+ import { UserAsset, TokenStandard, User } from './common';
3
+ import { Merchant } from './merchants';
4
+ export declare type TokenBalanceRequest = {
5
+ address: string;
6
+ symbol: string;
7
+ tokenStandard?: string | null;
8
+ };
9
+ export declare type TokenBalancResponse = {
10
+ address: string;
11
+ assetConfigId: string;
12
+ assetSymbol: string;
13
+ tokenType: string;
14
+ balance: string;
15
+ lockedTokenBalance?: string;
16
+ balanceUpdatedAt: string;
17
+ error?: any;
18
+ };
19
+ export declare enum SeedPhraseType {
20
+ Standard = "standard",
21
+ Algorand = "algorand"
22
+ }
23
+ export declare type QueryUserRequest = {
24
+ userId?: string;
25
+ externalUserId?: string;
26
+ };
27
+ export declare type UserAssetsResponse = {};
28
+ export declare type UserWalletsResponse = {
29
+ wallets: Array<Wallet>;
30
+ };
31
+ export declare type QueryWalletRequest = {
32
+ walletId: string;
33
+ };
34
+ export declare type WalletAssetsResponse = {
35
+ assets: Array<UserAsset>;
36
+ };
37
+ export declare type CreateWalletRequest = {
38
+ userId?: string;
39
+ hashKey: string;
40
+ firstName: string;
41
+ lastName: string;
42
+ email: string;
43
+ message: string;
44
+ clientAuthPubKey: string;
45
+ signature: string;
46
+ };
47
+ export declare type ClearWalletInput = {
48
+ userId: string;
49
+ walletId?: string;
50
+ };
51
+ export declare type Wallet = {
52
+ id: string;
53
+ userId: string;
54
+ merchantId: string;
55
+ revisionId: string;
56
+ revisionName: string;
57
+ evmAddress: string;
58
+ btcAddress: string;
59
+ algoAddress: string;
60
+ hashedSeedPhrase: string;
61
+ hashedSeedPhraseSalt: string;
62
+ recoveryCount: number;
63
+ assetsCount: number;
64
+ createdAt: Date | string;
65
+ updatedAt: Date | string;
66
+ user: User;
67
+ merchant?: Merchant;
68
+ };
69
+ export declare type CreateWalletResponse = {
70
+ wallabyAuthPubKey: string;
71
+ assets: Array<UserAsset>;
72
+ encryptedSeed: Encrypted;
73
+ decryptedSeedPhrase: string | undefined;
74
+ decryptedMnemonicSeedphrase: string | undefined;
75
+ wallet: Wallet;
76
+ error?: any;
77
+ };
78
+ export declare type ConvertMnemonicSeedPhraseRequest = {
79
+ reference: string;
80
+ signature: string;
81
+ hashKey: string;
82
+ message: string;
83
+ clientAuthPubKey: string;
84
+ encryptedSeedPhrase: Encrypted;
85
+ };
86
+ export declare type ConvertMnemonicSeedPhraseResponse = {
87
+ message: string;
88
+ clientAuthPubKey: string;
89
+ signature: string;
90
+ reference: string;
91
+ convertedEncryptedSeed: Encrypted;
92
+ error?: any;
93
+ };
94
+ export declare type RecoverWalletRequest = {
95
+ clientAuthPubKey: string;
96
+ newHashKey: string;
97
+ seedPhrase: string;
98
+ };
99
+ export declare type RecoverWalletResponse = {
100
+ signatureMessage: string;
101
+ wallabyAuthPubKey: string;
102
+ error?: any;
103
+ };
104
+ export declare type CreateMultisigAssetRequest = {
105
+ assetSymbol: string;
106
+ tokenType?: TokenStandard;
107
+ version: number;
108
+ threshold: number;
109
+ creatorAddress: string;
110
+ participants: Array<string>;
111
+ };
112
+ export declare type CreateMultisigAssetResponse = {
113
+ userId: string;
114
+ userAssetAddress: string;
115
+ walletId: string;
116
+ configId: string;
117
+ assetName: string;
118
+ assetSymbol: string;
119
+ defaultAddress: string;
120
+ addresses: Array<string>;
121
+ ownershipType: string;
122
+ error?: any;
123
+ };
package/package.json ADDED
@@ -0,0 +1,90 @@
1
+ {
2
+ "name": "wallaby-cash",
3
+ "version": "1.2.0",
4
+ "license": "MIT",
5
+ "repository": "https://github.com/republic-crypto/ncw-sdk-js.git",
6
+ "main": "./dist/index.js",
7
+ "module": "./dist/index.esm.js",
8
+ "exports": {
9
+ "import": "./dist/index.esm.js",
10
+ "require": "./dist/index.js"
11
+ },
12
+ "typings": "dist/index.d.ts",
13
+ "files": [
14
+ "dist",
15
+ "src"
16
+ ],
17
+ "engines": {
18
+ "node": ">=10"
19
+ },
20
+ "scripts": {
21
+ "build": "microbundle",
22
+ "build:dev": "microbundle watch",
23
+ "test": "NODE_ENV=test jest",
24
+ "test:watch": "NODE_ENV=test jest --watch",
25
+ "lint": "eslint",
26
+ "audit-ci": "audit-ci --config audit-ci.jsonc",
27
+ "publish": "npm run build; npm publish --access-public",
28
+ "docs": "docsify serve -p 3100 ./docs",
29
+ "analyze": "size-limit --why",
30
+ "release": "npm publish --access-public",
31
+ "size": "size-limit --json"
32
+ },
33
+ "devDependencies": {
34
+ "@semantic-release/changelog": "^6.0.3",
35
+ "@semantic-release/commit-analyzer": "^9.0.2",
36
+ "@semantic-release/git": "^10.0.1",
37
+ "@semantic-release/github": "^8.0.7",
38
+ "@semantic-release/npm": "^10.0.3",
39
+ "@semantic-release/release-notes-generator": "^11.0.1",
40
+ "@size-limit/preset-small-lib": "^8.2.4",
41
+ "@types/crypto-js": "^4.1.1",
42
+ "@types/debug": "^4.1.7",
43
+ "@types/jest": "^29.5.0",
44
+ "@types/uuid": "^9.0.1",
45
+ "@typescript-eslint/eslint-plugin": "^5.57.1",
46
+ "@typescript-eslint/parser": "^5.57.1",
47
+ "audit-ci": "^6.6.1",
48
+ "babel-eslint": "^10.1.0",
49
+ "debug": "^4.3.4",
50
+ "eccrypto": "github:bitchan/eccrypto",
51
+ "eslint": "^8.36.0",
52
+ "eslint-config-react-app": "^7.0.1",
53
+ "eslint-plugin-flowtype": "^8.0.3",
54
+ "eslint-plugin-import": "^2.27.5",
55
+ "eslint-plugin-jsx-a11y": "^6.7.1",
56
+ "eslint-plugin-prettier": "^4.2.1",
57
+ "eslint-plugin-react": "^7.32.2",
58
+ "eslint-plugin-react-hooks": "^4.6.0",
59
+ "husky": "^8.0.3",
60
+ "jest": "^29.5.0",
61
+ "jest-environment-jsdom": "^29.5.0",
62
+ "microbundle": "^0.15.1",
63
+ "prettier": "^2.8.5",
64
+ "semantic-release": "^21.0.2",
65
+ "size-limit": "^8.2.4",
66
+ "ts-jest": "^29.1.0",
67
+ "tslib": "^2.5.0",
68
+ "typescript": "^4.3",
69
+ "uuid": "^9.0.0"
70
+ },
71
+ "size-limit": [
72
+ {
73
+ "path": "dist/index.js",
74
+ "limit": "2 kB"
75
+ },
76
+ {
77
+ "path": "dist/base.js",
78
+ "limit": "10 kb"
79
+ },
80
+ {
81
+ "path": "dist/index.d.ts",
82
+ "limit": "2 kb"
83
+ }
84
+ ],
85
+ "dependencies": {
86
+ "axios": "^1.6.5",
87
+ "crypto-js": "^4.2.0",
88
+ "eth-crypto": "2.6.0"
89
+ }
90
+ }