llama-pay-sdk 4.0.0 → 4.0.2
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/lib/CashoutClient.d.ts +22 -0
- package/lib/CashoutClient.d.ts.map +1 -0
- package/lib/CashoutClient.js +95 -0
- package/lib/CashoutClient.js.map +1 -0
- package/lib/HttpClient.d.ts +28 -0
- package/lib/HttpClient.d.ts.map +1 -0
- package/lib/HttpClient.js +69 -0
- package/lib/HttpClient.js.map +1 -0
- package/lib/MerapiClient.d.ts +133 -0
- package/lib/MerapiClient.d.ts.map +1 -0
- package/lib/MerapiClient.js +311 -0
- package/lib/MerapiClient.js.map +1 -0
- package/lib/crypto.d.ts +24 -0
- package/lib/crypto.d.ts.map +1 -0
- package/lib/crypto.js +93 -0
- package/lib/crypto.js.map +1 -0
- package/lib/device-info.d.ts +5 -0
- package/lib/device-info.d.ts.map +1 -0
- package/lib/device-info.js +37 -0
- package/lib/device-info.js.map +1 -0
- package/lib/dora/DoraApiClient.d.ts +30 -0
- package/lib/dora/DoraApiClient.d.ts.map +1 -0
- package/lib/dora/DoraApiClient.js +34 -0
- package/lib/dora/DoraApiClient.js.map +1 -0
- package/lib/dora/index.d.ts +2 -0
- package/lib/dora/index.d.ts.map +1 -0
- package/lib/dora/index.js +6 -0
- package/lib/dora/index.js.map +1 -0
- package/lib/dora/types/Transaction.d.ts +30 -0
- package/lib/dora/types/Transaction.d.ts.map +1 -0
- package/lib/dora/types/Transaction.js +3 -0
- package/lib/dora/types/Transaction.js.map +1 -0
- package/lib/erc20Abi.d.ts +39 -0
- package/lib/erc20Abi.d.ts.map +1 -0
- package/lib/erc20Abi.js +226 -0
- package/lib/erc20Abi.js.map +1 -0
- package/lib/index.d.ts +19 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +45 -0
- package/lib/index.js.map +1 -0
- package/lib/models/Balance.d.ts +16 -0
- package/lib/models/Balance.d.ts.map +1 -0
- package/lib/models/Balance.js +3 -0
- package/lib/models/Balance.js.map +1 -0
- package/lib/models/FeatureFlags.d.ts +5 -0
- package/lib/models/FeatureFlags.d.ts.map +1 -0
- package/lib/models/FeatureFlags.js +3 -0
- package/lib/models/FeatureFlags.js.map +1 -0
- package/lib/models/IBinInfo.d.ts +25 -0
- package/lib/models/IBinInfo.d.ts.map +1 -0
- package/lib/models/IBinInfo.js +3 -0
- package/lib/models/IBinInfo.js.map +1 -0
- package/lib/models/IMultisigTransaction.d.ts +41 -0
- package/lib/models/IMultisigTransaction.d.ts.map +1 -0
- package/lib/models/IMultisigTransaction.js +3 -0
- package/lib/models/IMultisigTransaction.js.map +1 -0
- package/lib/models/IMultisigWallet.d.ts +36 -0
- package/lib/models/IMultisigWallet.d.ts.map +1 -0
- package/lib/models/IMultisigWallet.js +3 -0
- package/lib/models/IMultisigWallet.js.map +1 -0
- package/lib/models/ITokenInfo.d.ts +10 -0
- package/lib/models/ITokenInfo.d.ts.map +1 -0
- package/lib/models/ITokenInfo.js +3 -0
- package/lib/models/ITokenInfo.js.map +1 -0
- package/lib/models/IUser.d.ts +10 -0
- package/lib/models/IUser.d.ts.map +1 -0
- package/lib/models/IUser.js +3 -0
- package/lib/models/IUser.js.map +1 -0
- package/lib/models/LinkedCard.d.ts +6 -0
- package/lib/models/LinkedCard.d.ts.map +1 -0
- package/lib/models/LinkedCard.js +3 -0
- package/lib/models/LinkedCard.js.map +1 -0
- package/lib/models/ResponseWrapper.d.ts +9 -0
- package/lib/models/ResponseWrapper.d.ts.map +1 -0
- package/lib/models/ResponseWrapper.js +3 -0
- package/lib/models/ResponseWrapper.js.map +1 -0
- package/lib/models/SimpleMultisigTransactionData.d.ts +29 -0
- package/lib/models/SimpleMultisigTransactionData.d.ts.map +1 -0
- package/lib/models/SimpleMultisigTransactionData.js +3 -0
- package/lib/models/SimpleMultisigTransactionData.js.map +1 -0
- package/lib/models/Transaction.d.ts +13 -0
- package/lib/models/Transaction.d.ts.map +1 -0
- package/lib/models/Transaction.js +3 -0
- package/lib/models/Transaction.js.map +1 -0
- package/lib/models/Wallet.d.ts +15 -0
- package/lib/models/Wallet.d.ts.map +1 -0
- package/lib/models/Wallet.js +3 -0
- package/lib/models/Wallet.js.map +1 -0
- package/lib/models/WalletAccount.d.ts +8 -0
- package/lib/models/WalletAccount.d.ts.map +1 -0
- package/lib/models/WalletAccount.js +3 -0
- package/lib/models/WalletAccount.js.map +1 -0
- package/lib/models/cashout/Atm.d.ts +19 -0
- package/lib/models/cashout/Atm.d.ts.map +1 -0
- package/lib/models/cashout/Atm.js +3 -0
- package/lib/models/cashout/Atm.js.map +1 -0
- package/lib/models/cashout/CashoutLimits.d.ts +11 -0
- package/lib/models/cashout/CashoutLimits.d.ts.map +1 -0
- package/lib/models/cashout/CashoutLimits.js +3 -0
- package/lib/models/cashout/CashoutLimits.js.map +1 -0
- package/lib/models/cashout/CashoutRequest.d.ts +16 -0
- package/lib/models/cashout/CashoutRequest.d.ts.map +1 -0
- package/lib/models/cashout/CashoutRequest.js +3 -0
- package/lib/models/cashout/CashoutRequest.js.map +1 -0
- package/lib/models/cashout/CashoutResponse.d.ts +15 -0
- package/lib/models/cashout/CashoutResponse.d.ts.map +1 -0
- package/lib/models/cashout/CashoutResponse.js +3 -0
- package/lib/models/cashout/CashoutResponse.js.map +1 -0
- package/{src/models/cashout/CashoutStatus.ts → lib/models/cashout/CashoutStatus.d.ts} +3 -2
- package/lib/models/cashout/CashoutStatus.d.ts.map +1 -0
- package/lib/models/cashout/CashoutStatus.js +20 -0
- package/lib/models/cashout/CashoutStatus.js.map +1 -0
- package/lib/models/cashout/CreateCashoutResponse.d.ts +8 -0
- package/lib/models/cashout/CreateCashoutResponse.d.ts.map +1 -0
- package/lib/models/cashout/CreateCashoutResponse.js +3 -0
- package/lib/models/cashout/CreateCashoutResponse.js.map +1 -0
- package/package.json +4 -1
- package/src/CashoutClient.ts +0 -139
- package/src/HttpClient.ts +0 -116
- package/src/MerapiClient.ts +0 -526
- package/src/crypto.ts +0 -144
- package/src/device-info.ts +0 -38
- package/src/dora/DoraApiClient.ts +0 -58
- package/src/dora/index.ts +0 -6
- package/src/dora/types/Transaction.ts +0 -31
- package/src/erc20Abi.ts +0 -222
- package/src/index.ts +0 -32
- package/src/models/Balance.ts +0 -16
- package/src/models/FeatureFlags.ts +0 -4
- package/src/models/IBinInfo.ts +0 -24
- package/src/models/IMultisigTransaction.ts +0 -48
- package/src/models/IMultisigWallet.ts +0 -40
- package/src/models/ITokenInfo.ts +0 -9
- package/src/models/IUser.ts +0 -9
- package/src/models/LinkedCard.ts +0 -4
- package/src/models/ResponseWrapper.ts +0 -8
- package/src/models/SimpleMultisigTransactionData.ts +0 -28
- package/src/models/Transaction.ts +0 -12
- package/src/models/Wallet.ts +0 -17
- package/src/models/WalletAccount.ts +0 -7
- package/src/models/cashout/Atm.ts +0 -23
- package/src/models/cashout/CashoutLimits.ts +0 -10
- package/src/models/cashout/CashoutRequest.ts +0 -16
- package/src/models/cashout/CashoutResponse.ts +0 -14
- package/src/models/cashout/CreateCashoutResponse.ts +0 -7
- package/tsconfig.json +0 -18
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { ERC20Transaction, NativeTransaction } from './types/Transaction'
|
|
2
|
-
import { HttpClient } from '../HttpClient'
|
|
3
|
-
|
|
4
|
-
type Headers = { [key: string]: string }
|
|
5
|
-
|
|
6
|
-
export class DoraApiClient {
|
|
7
|
-
http: HttpClient
|
|
8
|
-
headers: Headers = {
|
|
9
|
-
'Content-Type': 'application/json',
|
|
10
|
-
Accept: 'application/json'
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
constructor() {
|
|
14
|
-
const doraUrl = 'https://dora.testnet.ethpar.net/api'
|
|
15
|
-
this.http = new HttpClient(doraUrl, this.headers)
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
getTransactions = (
|
|
19
|
-
address: string,
|
|
20
|
-
params?: { offset: number; size: number }
|
|
21
|
-
): Promise<{
|
|
22
|
-
data: NativeTransaction[]
|
|
23
|
-
totalCount: number
|
|
24
|
-
pageSize: number
|
|
25
|
-
offset: number
|
|
26
|
-
}> => {
|
|
27
|
-
if (!params) {
|
|
28
|
-
params = {
|
|
29
|
-
offset: 0,
|
|
30
|
-
size: 1000
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
return this.http.get(
|
|
34
|
-
`/account/txlist/${address}?offset=${params.offset}&pageSize=${params.size}`
|
|
35
|
-
)
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
getERC20Transactions = (
|
|
39
|
-
address: string,
|
|
40
|
-
contract: string,
|
|
41
|
-
params?: { offset: number; size: number }
|
|
42
|
-
): Promise<{
|
|
43
|
-
data: ERC20Transaction[]
|
|
44
|
-
totalCount: number
|
|
45
|
-
pageSize: number
|
|
46
|
-
offset: number
|
|
47
|
-
}> => {
|
|
48
|
-
if (!params) {
|
|
49
|
-
params = {
|
|
50
|
-
offset: 0,
|
|
51
|
-
size: 1000
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
return this.http.get(
|
|
55
|
-
`/account/txlist/erc20/${address}?contract=${contract}?offset=${params.offset}&pageSize=${params.size}`
|
|
56
|
-
)
|
|
57
|
-
}
|
|
58
|
-
}
|
package/src/dora/index.ts
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
export type Transaction = {
|
|
2
|
-
hash: string
|
|
3
|
-
created_at: string
|
|
4
|
-
from: string
|
|
5
|
-
to: string
|
|
6
|
-
value: string
|
|
7
|
-
is_from: boolean
|
|
8
|
-
tokenSymbol: string
|
|
9
|
-
tokenAddress?: string
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export type NativeTransaction = {
|
|
13
|
-
hash: string
|
|
14
|
-
created_at: string
|
|
15
|
-
from: string
|
|
16
|
-
to: string
|
|
17
|
-
value: string
|
|
18
|
-
is_from: boolean
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export type ERC20Transaction = {
|
|
22
|
-
hash: string
|
|
23
|
-
method: string
|
|
24
|
-
created_at: string
|
|
25
|
-
from: string
|
|
26
|
-
to: string
|
|
27
|
-
amount: string
|
|
28
|
-
is_from: boolean
|
|
29
|
-
token: string // tokenSymbol
|
|
30
|
-
contract: string
|
|
31
|
-
}
|
package/src/erc20Abi.ts
DELETED
|
@@ -1,222 +0,0 @@
|
|
|
1
|
-
export const ERC20_ABI = [
|
|
2
|
-
{
|
|
3
|
-
"constant": true,
|
|
4
|
-
"inputs": [],
|
|
5
|
-
"name": "name",
|
|
6
|
-
"outputs": [
|
|
7
|
-
{
|
|
8
|
-
"name": "",
|
|
9
|
-
"type": "string"
|
|
10
|
-
}
|
|
11
|
-
],
|
|
12
|
-
"payable": false,
|
|
13
|
-
"stateMutability": "view",
|
|
14
|
-
"type": "function"
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
"constant": false,
|
|
18
|
-
"inputs": [
|
|
19
|
-
{
|
|
20
|
-
"name": "_spender",
|
|
21
|
-
"type": "address"
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
"name": "_value",
|
|
25
|
-
"type": "uint256"
|
|
26
|
-
}
|
|
27
|
-
],
|
|
28
|
-
"name": "approve",
|
|
29
|
-
"outputs": [
|
|
30
|
-
{
|
|
31
|
-
"name": "",
|
|
32
|
-
"type": "bool"
|
|
33
|
-
}
|
|
34
|
-
],
|
|
35
|
-
"payable": false,
|
|
36
|
-
"stateMutability": "nonpayable",
|
|
37
|
-
"type": "function"
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
"constant": true,
|
|
41
|
-
"inputs": [],
|
|
42
|
-
"name": "totalSupply",
|
|
43
|
-
"outputs": [
|
|
44
|
-
{
|
|
45
|
-
"name": "",
|
|
46
|
-
"type": "uint256"
|
|
47
|
-
}
|
|
48
|
-
],
|
|
49
|
-
"payable": false,
|
|
50
|
-
"stateMutability": "view",
|
|
51
|
-
"type": "function"
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
"constant": false,
|
|
55
|
-
"inputs": [
|
|
56
|
-
{
|
|
57
|
-
"name": "_from",
|
|
58
|
-
"type": "address"
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
"name": "_to",
|
|
62
|
-
"type": "address"
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
"name": "_value",
|
|
66
|
-
"type": "uint256"
|
|
67
|
-
}
|
|
68
|
-
],
|
|
69
|
-
"name": "transferFrom",
|
|
70
|
-
"outputs": [
|
|
71
|
-
{
|
|
72
|
-
"name": "",
|
|
73
|
-
"type": "bool"
|
|
74
|
-
}
|
|
75
|
-
],
|
|
76
|
-
"payable": false,
|
|
77
|
-
"stateMutability": "nonpayable",
|
|
78
|
-
"type": "function"
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
"constant": true,
|
|
82
|
-
"inputs": [],
|
|
83
|
-
"name": "decimals",
|
|
84
|
-
"outputs": [
|
|
85
|
-
{
|
|
86
|
-
"name": "",
|
|
87
|
-
"type": "uint8"
|
|
88
|
-
}
|
|
89
|
-
],
|
|
90
|
-
"payable": false,
|
|
91
|
-
"stateMutability": "view",
|
|
92
|
-
"type": "function"
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
"constant": true,
|
|
96
|
-
"inputs": [
|
|
97
|
-
{
|
|
98
|
-
"name": "_owner",
|
|
99
|
-
"type": "address"
|
|
100
|
-
}
|
|
101
|
-
],
|
|
102
|
-
"name": "balanceOf",
|
|
103
|
-
"outputs": [
|
|
104
|
-
{
|
|
105
|
-
"name": "balance",
|
|
106
|
-
"type": "uint256"
|
|
107
|
-
}
|
|
108
|
-
],
|
|
109
|
-
"payable": false,
|
|
110
|
-
"stateMutability": "view",
|
|
111
|
-
"type": "function"
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
"constant": true,
|
|
115
|
-
"inputs": [],
|
|
116
|
-
"name": "symbol",
|
|
117
|
-
"outputs": [
|
|
118
|
-
{
|
|
119
|
-
"name": "",
|
|
120
|
-
"type": "string"
|
|
121
|
-
}
|
|
122
|
-
],
|
|
123
|
-
"payable": false,
|
|
124
|
-
"stateMutability": "view",
|
|
125
|
-
"type": "function"
|
|
126
|
-
},
|
|
127
|
-
{
|
|
128
|
-
"constant": false,
|
|
129
|
-
"inputs": [
|
|
130
|
-
{
|
|
131
|
-
"name": "_to",
|
|
132
|
-
"type": "address"
|
|
133
|
-
},
|
|
134
|
-
{
|
|
135
|
-
"name": "_value",
|
|
136
|
-
"type": "uint256"
|
|
137
|
-
}
|
|
138
|
-
],
|
|
139
|
-
"name": "transfer",
|
|
140
|
-
"outputs": [
|
|
141
|
-
{
|
|
142
|
-
"name": "",
|
|
143
|
-
"type": "bool"
|
|
144
|
-
}
|
|
145
|
-
],
|
|
146
|
-
"payable": false,
|
|
147
|
-
"stateMutability": "nonpayable",
|
|
148
|
-
"type": "function"
|
|
149
|
-
},
|
|
150
|
-
{
|
|
151
|
-
"constant": true,
|
|
152
|
-
"inputs": [
|
|
153
|
-
{
|
|
154
|
-
"name": "_owner",
|
|
155
|
-
"type": "address"
|
|
156
|
-
},
|
|
157
|
-
{
|
|
158
|
-
"name": "_spender",
|
|
159
|
-
"type": "address"
|
|
160
|
-
}
|
|
161
|
-
],
|
|
162
|
-
"name": "allowance",
|
|
163
|
-
"outputs": [
|
|
164
|
-
{
|
|
165
|
-
"name": "",
|
|
166
|
-
"type": "uint256"
|
|
167
|
-
}
|
|
168
|
-
],
|
|
169
|
-
"payable": false,
|
|
170
|
-
"stateMutability": "view",
|
|
171
|
-
"type": "function"
|
|
172
|
-
},
|
|
173
|
-
{
|
|
174
|
-
"payable": true,
|
|
175
|
-
"stateMutability": "payable",
|
|
176
|
-
"type": "fallback"
|
|
177
|
-
},
|
|
178
|
-
{
|
|
179
|
-
"anonymous": false,
|
|
180
|
-
"inputs": [
|
|
181
|
-
{
|
|
182
|
-
"indexed": true,
|
|
183
|
-
"name": "owner",
|
|
184
|
-
"type": "address"
|
|
185
|
-
},
|
|
186
|
-
{
|
|
187
|
-
"indexed": true,
|
|
188
|
-
"name": "spender",
|
|
189
|
-
"type": "address"
|
|
190
|
-
},
|
|
191
|
-
{
|
|
192
|
-
"indexed": false,
|
|
193
|
-
"name": "value",
|
|
194
|
-
"type": "uint256"
|
|
195
|
-
}
|
|
196
|
-
],
|
|
197
|
-
"name": "Approval",
|
|
198
|
-
"type": "event"
|
|
199
|
-
},
|
|
200
|
-
{
|
|
201
|
-
"anonymous": false,
|
|
202
|
-
"inputs": [
|
|
203
|
-
{
|
|
204
|
-
"indexed": true,
|
|
205
|
-
"name": "from",
|
|
206
|
-
"type": "address"
|
|
207
|
-
},
|
|
208
|
-
{
|
|
209
|
-
"indexed": true,
|
|
210
|
-
"name": "to",
|
|
211
|
-
"type": "address"
|
|
212
|
-
},
|
|
213
|
-
{
|
|
214
|
-
"indexed": false,
|
|
215
|
-
"name": "value",
|
|
216
|
-
"type": "uint256"
|
|
217
|
-
}
|
|
218
|
-
],
|
|
219
|
-
"name": "Transfer",
|
|
220
|
-
"type": "event"
|
|
221
|
-
}
|
|
222
|
-
]
|
package/src/index.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
export { Balance, BalanceResponse, TokenPrice } from './models/Balance'
|
|
2
|
-
export { BinInfo } from './models/IBinInfo'
|
|
3
|
-
export {
|
|
4
|
-
IBaseMultisigWallet,
|
|
5
|
-
ICreditCardMultisigWallet,
|
|
6
|
-
IGeneralMultisigWallet,
|
|
7
|
-
IMultisigWallet,
|
|
8
|
-
ISigner
|
|
9
|
-
} from './models/IMultisigWallet'
|
|
10
|
-
export { ITokenInfo } from './models/ITokenInfo'
|
|
11
|
-
export {
|
|
12
|
-
AssetType,
|
|
13
|
-
FeeQuote,
|
|
14
|
-
ISignature,
|
|
15
|
-
TransactionAsset,
|
|
16
|
-
IMultisigTransaction as ITransaction
|
|
17
|
-
} from './models/IMultisigTransaction'
|
|
18
|
-
export { IUser } from './models/IUser'
|
|
19
|
-
export { SimpleMultisigTransactionData } from './models/SimpleMultisigTransactionData'
|
|
20
|
-
export { Account, HDWallet } from './models/Wallet'
|
|
21
|
-
export { Transaction } from './models/Transaction'
|
|
22
|
-
export { WalletAccount } from './models/WalletAccount'
|
|
23
|
-
export { MerapiClient } from './MerapiClient'
|
|
24
|
-
export { FeatureFlags } from './models/FeatureFlags'
|
|
25
|
-
|
|
26
|
-
// cashout
|
|
27
|
-
export { CashoutClient } from './CashoutClient'
|
|
28
|
-
export { Atm } from './models/cashout/Atm'
|
|
29
|
-
export { CashoutStatus } from './models/cashout/CashoutStatus'
|
|
30
|
-
export { CashoutRequest } from './models/cashout/CashoutRequest'
|
|
31
|
-
export { CreateCashoutResponse } from './models/cashout/CreateCashoutResponse'
|
|
32
|
-
export * as crypto from './crypto'
|
package/src/models/Balance.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { ITokenInfo } from './ITokenInfo'
|
|
2
|
-
|
|
3
|
-
export type Balance = ITokenInfo & Partial<TokenPrice> & { amount: string }
|
|
4
|
-
|
|
5
|
-
export type TokenPrice = {
|
|
6
|
-
currentValue: number
|
|
7
|
-
currentPrice: number
|
|
8
|
-
priceChangePercentange24h: number
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export type BalanceResponse = {
|
|
12
|
-
amount: string
|
|
13
|
-
tokenAddress: string | null
|
|
14
|
-
currentPrice: number
|
|
15
|
-
priceChangePercentange24h: number
|
|
16
|
-
}
|
package/src/models/IBinInfo.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
export type BinInfo = {
|
|
2
|
-
number?: {
|
|
3
|
-
length: number
|
|
4
|
-
luhn: boolean
|
|
5
|
-
}
|
|
6
|
-
scheme?: string
|
|
7
|
-
type?: string
|
|
8
|
-
brand?: string
|
|
9
|
-
country?: {
|
|
10
|
-
numeric: string
|
|
11
|
-
alpha2: string
|
|
12
|
-
name: string
|
|
13
|
-
emoji: string
|
|
14
|
-
currency: string
|
|
15
|
-
latitude: number
|
|
16
|
-
longitude: number
|
|
17
|
-
}
|
|
18
|
-
bank?: {
|
|
19
|
-
name: string
|
|
20
|
-
url?: string
|
|
21
|
-
phone?: string
|
|
22
|
-
city?: string
|
|
23
|
-
}
|
|
24
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { SimpleMultisigTransactionData } from './SimpleMultisigTransactionData'
|
|
2
|
-
|
|
3
|
-
export interface IMultisigTransaction {
|
|
4
|
-
id: string
|
|
5
|
-
assetType: AssetType
|
|
6
|
-
asset: TransactionAsset
|
|
7
|
-
amount: string
|
|
8
|
-
to: string
|
|
9
|
-
walletId: string
|
|
10
|
-
initiatorUserId: string | null
|
|
11
|
-
executorAddress: string | null
|
|
12
|
-
signatures: ISignature[]
|
|
13
|
-
status: 'pending' | 'completed' | 'failed'
|
|
14
|
-
data: SimpleMultisigTransactionData
|
|
15
|
-
hash: string | null
|
|
16
|
-
fee: FeeQuote
|
|
17
|
-
createdOn: Date
|
|
18
|
-
updatedOn: Date
|
|
19
|
-
remark: string | null
|
|
20
|
-
type: 'normal' | 'merchant'
|
|
21
|
-
incoming: boolean
|
|
22
|
-
|
|
23
|
-
// applicable only for merchant
|
|
24
|
-
merchant: string | null
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export type AssetType = 'native' | 'erc20'
|
|
28
|
-
|
|
29
|
-
export type TransactionAsset = {
|
|
30
|
-
tokenAddress: string | null
|
|
31
|
-
symbol: string
|
|
32
|
-
decimals: number
|
|
33
|
-
image: string | null
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export type FeeQuote = {
|
|
37
|
-
gasLimit: string
|
|
38
|
-
maxFeePerGas: string | null
|
|
39
|
-
maxPriorityFeePerGas: string | null
|
|
40
|
-
|
|
41
|
-
gasPrice: string | null
|
|
42
|
-
totalWei: string | null
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export interface ISignature {
|
|
46
|
-
address: string
|
|
47
|
-
signature: string
|
|
48
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { BinInfo } from './IBinInfo'
|
|
2
|
-
|
|
3
|
-
export interface IMultisigWallet {
|
|
4
|
-
address: string
|
|
5
|
-
m: number
|
|
6
|
-
n: number
|
|
7
|
-
executorAddress: string | null
|
|
8
|
-
signers: ISigner[]
|
|
9
|
-
creationHash?: string
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export interface ISigner {
|
|
13
|
-
id: string
|
|
14
|
-
address: string
|
|
15
|
-
userId: string | null
|
|
16
|
-
acceptedOn: Date | null
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export type IBaseMultisigWallet = {
|
|
20
|
-
id: string
|
|
21
|
-
name: string
|
|
22
|
-
userId: string
|
|
23
|
-
wallet: IMultisigWallet
|
|
24
|
-
createdOn: Date
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export type ICreditCardMultisigWallet = IBaseMultisigWallet & {
|
|
28
|
-
panLastDigits: string
|
|
29
|
-
panHash: string
|
|
30
|
-
binHash: string
|
|
31
|
-
binInfo: BinInfo | null
|
|
32
|
-
type: 'credit-card'
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export type IGeneralMultisigWallet = IBaseMultisigWallet & {
|
|
36
|
-
creatorId: string
|
|
37
|
-
type: 'general'
|
|
38
|
-
signerIds: (string | null)[]
|
|
39
|
-
signerAddresses: string[]
|
|
40
|
-
}
|
package/src/models/ITokenInfo.ts
DELETED
package/src/models/IUser.ts
DELETED
package/src/models/LinkedCard.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
export type SimpleMultisigTransactionData = {
|
|
2
|
-
types: {
|
|
3
|
-
EIP712Domain: {
|
|
4
|
-
name: string
|
|
5
|
-
type: string
|
|
6
|
-
}[]
|
|
7
|
-
MultiSigTransaction: {
|
|
8
|
-
name: string
|
|
9
|
-
type: string
|
|
10
|
-
}[]
|
|
11
|
-
}
|
|
12
|
-
domain: {
|
|
13
|
-
name: string
|
|
14
|
-
version: string
|
|
15
|
-
chainId: number
|
|
16
|
-
verifyingContract: string
|
|
17
|
-
salt: string
|
|
18
|
-
}
|
|
19
|
-
primaryType: string
|
|
20
|
-
message: {
|
|
21
|
-
executor: string
|
|
22
|
-
nonce: number
|
|
23
|
-
gasLimit: number
|
|
24
|
-
destination: string
|
|
25
|
-
value: string
|
|
26
|
-
data: string
|
|
27
|
-
}
|
|
28
|
-
}
|
package/src/models/Wallet.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export type HDWallet = {
|
|
2
|
-
id: string
|
|
3
|
-
name: string
|
|
4
|
-
mnemonic: string
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export type Account = {
|
|
8
|
-
id: string
|
|
9
|
-
name: string
|
|
10
|
-
address: string
|
|
11
|
-
type: 'hd' | 'single'
|
|
12
|
-
|
|
13
|
-
// only for hd wallet accounts
|
|
14
|
-
walletId?: string
|
|
15
|
-
privateKey?: string
|
|
16
|
-
derivationPath?: string
|
|
17
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
export interface Atm {
|
|
2
|
-
atm_id: number
|
|
3
|
-
|
|
4
|
-
address_desc: string
|
|
5
|
-
address_street: string
|
|
6
|
-
address_detail: string | null
|
|
7
|
-
address_city: string
|
|
8
|
-
address_state: string
|
|
9
|
-
address_zip: string
|
|
10
|
-
|
|
11
|
-
loc_lon: string // longitude as string from API
|
|
12
|
-
loc_lat: string // latitude as string from API
|
|
13
|
-
|
|
14
|
-
atm_desc: string
|
|
15
|
-
|
|
16
|
-
atm_min: string // monetary values returned as string
|
|
17
|
-
atm_max: string
|
|
18
|
-
atm_bills: string
|
|
19
|
-
atm_currency: string
|
|
20
|
-
|
|
21
|
-
atm_pur: boolean // purchase supported
|
|
22
|
-
atm_red: boolean // redeem supported
|
|
23
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { CashoutStatus } from './CashoutStatus'
|
|
2
|
-
|
|
3
|
-
export interface CashoutRequest {
|
|
4
|
-
secureCode: string
|
|
5
|
-
pcode: string | null
|
|
6
|
-
status: CashoutStatus
|
|
7
|
-
address: string
|
|
8
|
-
usdAmount: number
|
|
9
|
-
btcAmount: number
|
|
10
|
-
btcWholeUnitPrice: number
|
|
11
|
-
expiration: string
|
|
12
|
-
atmId: number
|
|
13
|
-
locDescription: string
|
|
14
|
-
locLat: number
|
|
15
|
-
locLon: number
|
|
16
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export default interface CashoutResponse {
|
|
2
|
-
secure_code: string
|
|
3
|
-
pcode: null
|
|
4
|
-
status: 'A' | string
|
|
5
|
-
address: string
|
|
6
|
-
usd_amount: number
|
|
7
|
-
btc_amount: number
|
|
8
|
-
btc_whole_unit_price: number
|
|
9
|
-
expiration: string
|
|
10
|
-
atm_id: number
|
|
11
|
-
loc_description: string
|
|
12
|
-
loc_lat: number
|
|
13
|
-
loc_lon: number
|
|
14
|
-
}
|
package/tsconfig.json
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ES2020",
|
|
4
|
-
"module": "CommonJS",
|
|
5
|
-
"outDir": "./lib",
|
|
6
|
-
"rootDir": "./src",
|
|
7
|
-
"declaration": true,
|
|
8
|
-
"declarationMap": true,
|
|
9
|
-
"emitDeclarationOnly": false,
|
|
10
|
-
"sourceMap": true,
|
|
11
|
-
"strict": true,
|
|
12
|
-
"esModuleInterop": true,
|
|
13
|
-
"skipLibCheck": true
|
|
14
|
-
},
|
|
15
|
-
"include": [
|
|
16
|
-
"src/**/*"
|
|
17
|
-
]
|
|
18
|
-
}
|