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.
- package/LICENSE +21 -0
- package/README.md +66 -0
- package/dist/base.d.ts +10 -0
- package/dist/helpers/logger.d.ts +2 -0
- package/dist/index.d.ts +45 -0
- package/dist/index.esm.js +2 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/index.umd.js +2 -0
- package/dist/index.umd.js.map +1 -0
- package/dist/lib/auth/index.d.ts +54 -0
- package/dist/lib/index.d.ts +3 -0
- package/dist/lib/system/index.d.ts +32 -0
- package/dist/lib/transactions/index.d.ts +80 -0
- package/dist/lib/utils/index.d.ts +21 -0
- package/dist/lib/utils/utils.d.ts +68 -0
- package/dist/lib/wallet/index.d.ts +99 -0
- package/dist/localStorageMock.d.ts +7 -0
- package/dist/routes/auth.d.ts +33 -0
- package/dist/routes/index.d.ts +3 -0
- package/dist/routes/system.d.ts +23 -0
- package/dist/routes/transactions.d.ts +28 -0
- package/dist/routes/wallet.d.ts +53 -0
- package/dist/tests/data/auth.d.ts +11 -0
- package/dist/tests/data/config.d.ts +6 -0
- package/dist/tests/data/index.d.ts +4 -0
- package/dist/tests/data/system.d.ts +47 -0
- package/dist/tests/data/user.d.ts +20 -0
- package/dist/types/auth.d.ts +48 -0
- package/dist/types/common.d.ts +206 -0
- package/dist/types/index.d.ts +5 -0
- package/dist/types/merchants.d.ts +43 -0
- package/dist/types/transactions.d.ts +127 -0
- package/dist/types/wallet.d.ts +123 -0
- package/package.json +90 -0
- package/src/base.ts +95 -0
- package/src/helpers/logger.ts +11 -0
- package/src/index.ts +58 -0
- package/src/lib/auth/index.ts +225 -0
- package/src/lib/index.ts +3 -0
- package/src/lib/system/index.ts +104 -0
- package/src/lib/transactions/index.ts +259 -0
- package/src/lib/utils/index.ts +80 -0
- package/src/lib/utils/utils.ts +224 -0
- package/src/lib/wallet/index.ts +515 -0
- package/src/localStorageMock.js +23 -0
- package/src/routes/auth.ts +34 -0
- package/src/routes/index.ts +3 -0
- package/src/routes/system.ts +24 -0
- package/src/routes/transactions.ts +29 -0
- package/src/routes/wallet.ts +65 -0
- package/src/tests/__mocks__/axios.js +4 -0
- package/src/tests/__mocks__/localStorageMock.js +23 -0
- package/src/tests/auth.spec.ts +117 -0
- package/src/tests/data/auth.ts +49 -0
- package/src/tests/data/config.ts +8 -0
- package/src/tests/data/index.ts +4 -0
- package/src/tests/data/system.ts +54 -0
- package/src/tests/data/user.ts +25 -0
- package/src/tests/system.spec.ts +47 -0
- package/src/tests/utils.spec.ts +70 -0
- package/src/tests/wallet.spec.ts +44 -0
- package/src/types/auth.ts +57 -0
- package/src/types/common.ts +230 -0
- package/src/types/index.ts +5 -0
- package/src/types/merchants.ts +47 -0
- package/src/types/transactions.ts +139 -0
- package/src/types/wallet.ts +141 -0
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
import { Merchant, MerchantAsset } from './merchants';
|
|
2
|
+
|
|
3
|
+
export declare type UtilsResponse = string | undefined;
|
|
4
|
+
|
|
5
|
+
export declare type WallabyError = {
|
|
6
|
+
statusCode: number;
|
|
7
|
+
message: string;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export declare type PasswordValidatorResponse = {
|
|
11
|
+
valid: boolean;
|
|
12
|
+
message?: string;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export declare type WallabyConfig = {
|
|
16
|
+
apiKey: string;
|
|
17
|
+
baseUrl: string;
|
|
18
|
+
jwt: string;
|
|
19
|
+
userId: string;
|
|
20
|
+
accessToken?: string;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export declare type User = {
|
|
24
|
+
id: string;
|
|
25
|
+
firstName?: string;
|
|
26
|
+
lastName?: string;
|
|
27
|
+
externalUserId: string;
|
|
28
|
+
clientAuthPubKey: string;
|
|
29
|
+
wallabyAuthPubKey: string;
|
|
30
|
+
wallabyAuthPubKeyVersion: string;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export declare type UserAsset = {
|
|
34
|
+
id: string;
|
|
35
|
+
userId: string | null;
|
|
36
|
+
merchantId: string | null;
|
|
37
|
+
userAssetAddress: string | null;
|
|
38
|
+
walletId: string | null;
|
|
39
|
+
configId: string;
|
|
40
|
+
assetName: string;
|
|
41
|
+
assetSymbol: string;
|
|
42
|
+
balance: string;
|
|
43
|
+
balanceUpdatedAt: Date | string | null;
|
|
44
|
+
defaultAddress: string;
|
|
45
|
+
source: UserAssetSource;
|
|
46
|
+
addresses: Array<{
|
|
47
|
+
address: string;
|
|
48
|
+
publicKey?: string;
|
|
49
|
+
type?: string;
|
|
50
|
+
}>;
|
|
51
|
+
ownershipType: OwnershipType;
|
|
52
|
+
createdAt: Date | string;
|
|
53
|
+
updatedAt: Date | string;
|
|
54
|
+
config: AssetConfig;
|
|
55
|
+
merchant: Merchant;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
export declare type Address = {
|
|
59
|
+
address: string;
|
|
60
|
+
publicKey?: string;
|
|
61
|
+
type?: AddressType;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
export declare type AssetConfig = {
|
|
65
|
+
id: string;
|
|
66
|
+
merchantId: string;
|
|
67
|
+
verified: boolean;
|
|
68
|
+
isOffChain: boolean;
|
|
69
|
+
contractAddress: string;
|
|
70
|
+
ownerAddresses: Array<string>;
|
|
71
|
+
status?: AssetConfigStatus;
|
|
72
|
+
createdByUserId?: string;
|
|
73
|
+
createdByUser?: User;
|
|
74
|
+
derivationPath: string;
|
|
75
|
+
name: string;
|
|
76
|
+
symbol: string;
|
|
77
|
+
ticker: string;
|
|
78
|
+
assetId?: string;
|
|
79
|
+
assetName?: string;
|
|
80
|
+
assetType: AssetType;
|
|
81
|
+
decimals: number;
|
|
82
|
+
iconUrl: string;
|
|
83
|
+
rpcUrl: string;
|
|
84
|
+
chainId: string;
|
|
85
|
+
chainName: BlockchainName;
|
|
86
|
+
type?: AssetType;
|
|
87
|
+
tokenStandard?: TokenStandard;
|
|
88
|
+
assetIndex?: number;
|
|
89
|
+
description?: string;
|
|
90
|
+
ownershipType?: OwnershipType;
|
|
91
|
+
multisigVersion: number;
|
|
92
|
+
multisigSignerThreshold: number;
|
|
93
|
+
chain?: Blockchain;
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
export declare enum UserAssetSource {
|
|
97
|
+
Merchant = 'merchant',
|
|
98
|
+
User = 'user',
|
|
99
|
+
republic = 'republic',
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export declare enum AssetConfigStatus {
|
|
103
|
+
Active = 'active',
|
|
104
|
+
Inactive = 'inactive',
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export enum AssetType {
|
|
108
|
+
Coin = 'COIN',
|
|
109
|
+
Token = 'TOKEN',
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export enum OwnershipType {
|
|
113
|
+
SingleOwner = 'SINGLE_OWNER',
|
|
114
|
+
MultiSig = 'MULTI_SIG',
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export enum TokenStandard {
|
|
118
|
+
Erc20 = 'ERC_20',
|
|
119
|
+
Erc1404 = 'ERC_1404',
|
|
120
|
+
Arc20 = 'ARC_20',
|
|
121
|
+
Arc1404 = 'ARC_1404',
|
|
122
|
+
Mrc20 = 'MRC_20',
|
|
123
|
+
Bep20 = 'BEP_20',
|
|
124
|
+
AlgoStandard = 'ALGO_STANDARD',
|
|
125
|
+
AlgoApp = 'ALGO_APP',
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export enum AddressType {
|
|
129
|
+
Segwit = 'SEGWIT',
|
|
130
|
+
Legacy = 'LEGACY',
|
|
131
|
+
Default = 'DEFAULT',
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export declare type Blockchain = {
|
|
135
|
+
id: string;
|
|
136
|
+
name: string;
|
|
137
|
+
isEvm: boolean;
|
|
138
|
+
iconUrl?: string;
|
|
139
|
+
mainnetId?: string;
|
|
140
|
+
mainnetRpcUrl?: string;
|
|
141
|
+
mainnetIndexUrl?: string;
|
|
142
|
+
testnetId?: string;
|
|
143
|
+
testnetRpcUrl?: string;
|
|
144
|
+
testnetIndexUrl?: string;
|
|
145
|
+
derivationPath?: string;
|
|
146
|
+
addressRegex?: string;
|
|
147
|
+
slip44: BlockchainSlip44;
|
|
148
|
+
status?: BlockchainStatus;
|
|
149
|
+
createdAt: Date | string;
|
|
150
|
+
updatedAt: Date | string;
|
|
151
|
+
assets: AssetConfig[];
|
|
152
|
+
merchantAssets: MerchantAsset[];
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
export declare enum BlockchainStatus {
|
|
156
|
+
Up = 'UP',
|
|
157
|
+
Down = 'DOWN',
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export enum BlockchainSlip44 {
|
|
161
|
+
BTC = 0,
|
|
162
|
+
ETH = 60,
|
|
163
|
+
ALGO = 283,
|
|
164
|
+
AVAX = 9000,
|
|
165
|
+
MATIC = 966,
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
export enum BlockchainName {
|
|
169
|
+
Bitcoin = 'BITCOIN',
|
|
170
|
+
Ethereum = 'ETHEREUM',
|
|
171
|
+
Algorand = 'ALGORAND',
|
|
172
|
+
Avalanche = 'AVALANCHE',
|
|
173
|
+
Polygon = 'POLYGON',
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
export enum RequestMothod {
|
|
177
|
+
Post = 'POST',
|
|
178
|
+
Get = 'GET',
|
|
179
|
+
Put = 'PUT',
|
|
180
|
+
Delete = 'DELETE',
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
export declare interface RequestOptions extends RequestInit {
|
|
184
|
+
method: RequestMothod;
|
|
185
|
+
payload?: any;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
export declare type RequestRoute = {
|
|
189
|
+
fullPath: string | ((params: any) => string);
|
|
190
|
+
method: RequestMothod;
|
|
191
|
+
accessTokenRequired: boolean;
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
export declare enum ApiKeyStatus {
|
|
195
|
+
Active = 'active',
|
|
196
|
+
Inactive = 'inactive',
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
export declare type ApiKey = {
|
|
200
|
+
id: string;
|
|
201
|
+
merchantId?: string;
|
|
202
|
+
appName: string;
|
|
203
|
+
apiKey: string;
|
|
204
|
+
ipAddresses: string[];
|
|
205
|
+
domainNames: string[];
|
|
206
|
+
status: ApiKeyStatus;
|
|
207
|
+
clientJWTPubKey: string;
|
|
208
|
+
usersCount: number;
|
|
209
|
+
requestsCount: number;
|
|
210
|
+
totalRequestSizeInKb: number;
|
|
211
|
+
totalResponseSizeInKb: number;
|
|
212
|
+
totalResponseTimeInKb: number;
|
|
213
|
+
lastRequestAt: Date | string | null;
|
|
214
|
+
onlyDashboardAccess: boolean;
|
|
215
|
+
createdAt: Date | string;
|
|
216
|
+
updatedAt: Date | string;
|
|
217
|
+
merchant: Merchant;
|
|
218
|
+
origins: ApiKeyOrigin[];
|
|
219
|
+
};
|
|
220
|
+
|
|
221
|
+
export type ApiKeyOrigin = {
|
|
222
|
+
id: string;
|
|
223
|
+
merchantId?: string;
|
|
224
|
+
apiKeyId: string;
|
|
225
|
+
origin: string;
|
|
226
|
+
createdAt: Date | string;
|
|
227
|
+
updatedAt: Date | string;
|
|
228
|
+
merchant: Merchant;
|
|
229
|
+
apiKey: ApiKey;
|
|
230
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { ApiKey, UserAsset, AssetConfig, Blockchain } from './common';
|
|
2
|
+
|
|
3
|
+
export declare enum MerchantStatus {
|
|
4
|
+
Active = 'active',
|
|
5
|
+
Inactive = 'inactive',
|
|
6
|
+
Invalidated = 'invalidated',
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export declare enum MerchantAssetStatus {
|
|
10
|
+
Active = 'active',
|
|
11
|
+
Inactive = 'disabled',
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export type Merchant = {
|
|
15
|
+
id: string;
|
|
16
|
+
name: string;
|
|
17
|
+
nameSlugify: string;
|
|
18
|
+
verified: boolean;
|
|
19
|
+
contactEmail: string | null;
|
|
20
|
+
contactPhoneNumber: string | null;
|
|
21
|
+
usersCount: number;
|
|
22
|
+
assetsCount: number;
|
|
23
|
+
tokensCount: number;
|
|
24
|
+
coinsCount: number;
|
|
25
|
+
walletsCount: number;
|
|
26
|
+
status: MerchantStatus;
|
|
27
|
+
createdAt: Date | string;
|
|
28
|
+
updatedAt: Date | string;
|
|
29
|
+
apiKeys?: ApiKey[];
|
|
30
|
+
merchantAssets: MerchantAsset[];
|
|
31
|
+
usersAssets: UserAsset[];
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export declare type MerchantAsset = {
|
|
35
|
+
id: string;
|
|
36
|
+
merchantId: string;
|
|
37
|
+
configId: string;
|
|
38
|
+
chainId: string;
|
|
39
|
+
chainName: string;
|
|
40
|
+
assetName: string;
|
|
41
|
+
assetSymbol: string;
|
|
42
|
+
createdAt: Date | string;
|
|
43
|
+
updatedAt: Date | string;
|
|
44
|
+
merchant: Merchant;
|
|
45
|
+
config: AssetConfig;
|
|
46
|
+
chain: Blockchain;
|
|
47
|
+
};
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { AssetConfig, BlockchainName, BlockchainSlip44, OwnershipType, TokenStandard, User } from './common';
|
|
2
|
+
import { Merchant } from './merchants';
|
|
3
|
+
|
|
4
|
+
export declare type Transaction = {
|
|
5
|
+
id: string;
|
|
6
|
+
reference: string;
|
|
7
|
+
hash: string;
|
|
8
|
+
userId: string;
|
|
9
|
+
merchantId: string;
|
|
10
|
+
userEmail: string;
|
|
11
|
+
chainId: string;
|
|
12
|
+
chainName: string;
|
|
13
|
+
chainSlip44: BlockchainSlip44;
|
|
14
|
+
fromWalletId: string;
|
|
15
|
+
fromAddress: string;
|
|
16
|
+
toWalletId: string;
|
|
17
|
+
toAddress: string;
|
|
18
|
+
assetId: string;
|
|
19
|
+
assetSymbol: string;
|
|
20
|
+
tokenType: TokenStandard;
|
|
21
|
+
amount: string;
|
|
22
|
+
fee: string;
|
|
23
|
+
note: string;
|
|
24
|
+
nonce: number;
|
|
25
|
+
gasPrice: number;
|
|
26
|
+
submitter: string;
|
|
27
|
+
status: TransactionStatus;
|
|
28
|
+
ownershipType: OwnershipType;
|
|
29
|
+
multisigVersion: number;
|
|
30
|
+
multisigSignerThreshold: number;
|
|
31
|
+
multisigSignerApprovedCount: number;
|
|
32
|
+
txBlob: string;
|
|
33
|
+
createdAt: Date | string;
|
|
34
|
+
updatedAt: Date | string;
|
|
35
|
+
asset: AssetConfig;
|
|
36
|
+
multisigParticipants: MultisigParticipant;
|
|
37
|
+
merchant: Merchant;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export declare enum TransactionStatus {
|
|
41
|
+
PendingApproval = 'PENDING-APPROVAL',
|
|
42
|
+
Pending = 'PENDING',
|
|
43
|
+
Failed = 'FAILED',
|
|
44
|
+
Successful = 'SUCCESSFUL',
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export declare type MultisigParticipant = {
|
|
48
|
+
id: string;
|
|
49
|
+
transactionId: string;
|
|
50
|
+
userAddress: string;
|
|
51
|
+
userId: string;
|
|
52
|
+
chainId: string;
|
|
53
|
+
chainName: string;
|
|
54
|
+
assetId: string;
|
|
55
|
+
assetName: string;
|
|
56
|
+
assetSymbol: string;
|
|
57
|
+
status: MultisigParticipantStatus;
|
|
58
|
+
transaction: Transaction;
|
|
59
|
+
user: User;
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
export declare enum MultisigParticipantStatus {
|
|
63
|
+
PendingApproval = 'pending-approval',
|
|
64
|
+
Approved = 'approved',
|
|
65
|
+
Rejected = 'rejected',
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export declare type FeeEstimateRequest = {
|
|
69
|
+
originAddress: string;
|
|
70
|
+
recipientAddress: string;
|
|
71
|
+
amount: number;
|
|
72
|
+
assetSymbol: string;
|
|
73
|
+
transactionType: TransactionType;
|
|
74
|
+
tokenStandard?: TokenStandard;
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
export declare type FeeEstimatesResponse = {
|
|
78
|
+
feePaymentSymbol: string; // Native token symbol in which the fee is paid
|
|
79
|
+
fee: string;
|
|
80
|
+
lowestFee: string;
|
|
81
|
+
highestFee: string;
|
|
82
|
+
error?: any;
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
export declare type TransferRequest = {
|
|
86
|
+
originAddress: string;
|
|
87
|
+
recipientAddress: string;
|
|
88
|
+
amount: string;
|
|
89
|
+
assetId: string;
|
|
90
|
+
reference: string;
|
|
91
|
+
memo?: string;
|
|
92
|
+
hashKey: string;
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
export declare type TransferResponse = {
|
|
96
|
+
transaction: Transaction;
|
|
97
|
+
message?: string;
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
export declare type TransactionStatusResponse = {
|
|
101
|
+
status: TransactionStatus;
|
|
102
|
+
transactionHash: string;
|
|
103
|
+
reference: string;
|
|
104
|
+
assetSymbol: string;
|
|
105
|
+
transactionValue: string;
|
|
106
|
+
fromAddress: string;
|
|
107
|
+
toAddress: string;
|
|
108
|
+
chain: BlockchainName;
|
|
109
|
+
fee: string;
|
|
110
|
+
nonce?: number;
|
|
111
|
+
timestamp?: number;
|
|
112
|
+
blockNumber?: number;
|
|
113
|
+
memo?: string;
|
|
114
|
+
origins?: UTXOFundsMove[];
|
|
115
|
+
recipients?: UTXOFundsMove[];
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
export declare type UTXOFundsMove = {
|
|
119
|
+
address: string[];
|
|
120
|
+
amount: string;
|
|
121
|
+
txId: string;
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
export declare enum TransactionType {
|
|
125
|
+
Allowance = 'ALLOWANCE_TX',
|
|
126
|
+
Optin = 'OPTIN_TX',
|
|
127
|
+
Transfer = 'TRANSFER_TX',
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export declare type CreateAllowanceRequest = {
|
|
131
|
+
ownerAddress: string;
|
|
132
|
+
spenderAddress: string;
|
|
133
|
+
amount: string;
|
|
134
|
+
assetId: string;
|
|
135
|
+
contractAddress: string;
|
|
136
|
+
reference: string;
|
|
137
|
+
memo?: string;
|
|
138
|
+
hashKey: string;
|
|
139
|
+
};
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { Encrypted } from 'eth-crypto';
|
|
2
|
+
import { UserAsset, TokenStandard, User } from './common';
|
|
3
|
+
import { Merchant } from './merchants';
|
|
4
|
+
|
|
5
|
+
export declare type TokenBalanceRequest = {
|
|
6
|
+
address: string;
|
|
7
|
+
symbol: string;
|
|
8
|
+
tokenStandard?: string | null;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export declare type TokenBalancResponse = {
|
|
12
|
+
address: string;
|
|
13
|
+
assetConfigId: string;
|
|
14
|
+
assetSymbol: string;
|
|
15
|
+
tokenType: string;
|
|
16
|
+
balance: string;
|
|
17
|
+
lockedTokenBalance?: string;
|
|
18
|
+
balanceUpdatedAt: string;
|
|
19
|
+
error?: any;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export enum SeedPhraseType {
|
|
23
|
+
Standard = 'standard',
|
|
24
|
+
Algorand = 'algorand',
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export declare type QueryUserRequest = {
|
|
28
|
+
userId?: string;
|
|
29
|
+
externalUserId?: string;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export declare type UserAssetsResponse = {};
|
|
33
|
+
|
|
34
|
+
export declare type UserWalletsResponse = {
|
|
35
|
+
wallets: Array<Wallet>;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export declare type QueryWalletRequest = {
|
|
39
|
+
walletId: string;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export declare type WalletAssetsResponse = {
|
|
43
|
+
assets: Array<UserAsset>;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export declare type CreateWalletRequest = {
|
|
47
|
+
userId?: string;
|
|
48
|
+
hashKey: string;
|
|
49
|
+
firstName: string;
|
|
50
|
+
lastName: string;
|
|
51
|
+
email: string;
|
|
52
|
+
message: string;
|
|
53
|
+
clientAuthPubKey: string;
|
|
54
|
+
signature: string;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
export declare type ClearWalletInput = {
|
|
58
|
+
userId: string;
|
|
59
|
+
walletId?: string;
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
export declare type Wallet = {
|
|
63
|
+
id: string;
|
|
64
|
+
userId: string;
|
|
65
|
+
merchantId: string;
|
|
66
|
+
revisionId: string;
|
|
67
|
+
revisionName: string;
|
|
68
|
+
evmAddress: string;
|
|
69
|
+
btcAddress: string;
|
|
70
|
+
algoAddress: string;
|
|
71
|
+
hashedSeedPhrase: string;
|
|
72
|
+
hashedSeedPhraseSalt: string;
|
|
73
|
+
recoveryCount: number;
|
|
74
|
+
assetsCount: number;
|
|
75
|
+
createdAt: Date | string;
|
|
76
|
+
updatedAt: Date | string;
|
|
77
|
+
user: User;
|
|
78
|
+
merchant?: Merchant;
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
export declare type CreateWalletResponse = {
|
|
82
|
+
wallabyAuthPubKey: string;
|
|
83
|
+
assets: Array<UserAsset>;
|
|
84
|
+
encryptedSeed: Encrypted;
|
|
85
|
+
decryptedSeedPhrase: string | undefined;
|
|
86
|
+
decryptedMnemonicSeedphrase: string | undefined;
|
|
87
|
+
wallet: Wallet;
|
|
88
|
+
error?: any;
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
export declare type ConvertMnemonicSeedPhraseRequest = {
|
|
92
|
+
reference: string;
|
|
93
|
+
signature: string;
|
|
94
|
+
hashKey: string;
|
|
95
|
+
message: string;
|
|
96
|
+
clientAuthPubKey: string;
|
|
97
|
+
encryptedSeedPhrase: Encrypted;
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
export declare type ConvertMnemonicSeedPhraseResponse = {
|
|
101
|
+
message: string;
|
|
102
|
+
clientAuthPubKey: string;
|
|
103
|
+
signature: string;
|
|
104
|
+
reference: string;
|
|
105
|
+
convertedEncryptedSeed: Encrypted;
|
|
106
|
+
error?: any;
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
export declare type RecoverWalletRequest = {
|
|
110
|
+
clientAuthPubKey: string;
|
|
111
|
+
newHashKey: string;
|
|
112
|
+
seedPhrase: string;
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
export declare type RecoverWalletResponse = {
|
|
116
|
+
signatureMessage: string;
|
|
117
|
+
wallabyAuthPubKey: string;
|
|
118
|
+
error?: any;
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
export declare type CreateMultisigAssetRequest = {
|
|
122
|
+
assetSymbol: string;
|
|
123
|
+
tokenType?: TokenStandard;
|
|
124
|
+
version: number;
|
|
125
|
+
threshold: number;
|
|
126
|
+
creatorAddress: string;
|
|
127
|
+
participants: Array<string>;
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
export declare type CreateMultisigAssetResponse = {
|
|
131
|
+
userId: string;
|
|
132
|
+
userAssetAddress: string;
|
|
133
|
+
walletId: string;
|
|
134
|
+
configId: string;
|
|
135
|
+
assetName: string;
|
|
136
|
+
assetSymbol: string;
|
|
137
|
+
defaultAddress: string;
|
|
138
|
+
addresses: Array<string>;
|
|
139
|
+
ownershipType: string;
|
|
140
|
+
error?: any;
|
|
141
|
+
};
|