@arbiwallet/contracts 1.0.107 → 1.0.109
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/gen/card.ts +105 -0
- package/gen/deposit.ts +9 -1
- package/package.json +1 -1
- package/proto/card.proto +81 -0
- package/proto/deposit.proto +4 -0
package/gen/card.ts
CHANGED
|
@@ -125,6 +125,84 @@ export interface GetTopupFeeResponse {
|
|
|
125
125
|
amountToCard: string;
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
+
export interface QuoteTopupByTargetRequest {
|
|
129
|
+
accountId: number;
|
|
130
|
+
cardId: number;
|
|
131
|
+
targetAmount: string;
|
|
132
|
+
targetCurrency: string;
|
|
133
|
+
cardCryptoCurrency: string;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export interface QuoteTopupByTargetResponse {
|
|
137
|
+
targetAmount: string;
|
|
138
|
+
targetCurrency: string;
|
|
139
|
+
inputUsdt: string;
|
|
140
|
+
feeUsdt: string;
|
|
141
|
+
requiredDebitUsdt: string;
|
|
142
|
+
amountToCard: string;
|
|
143
|
+
cardCurrency: string;
|
|
144
|
+
cardCryptoCurrency: string;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export interface ExecuteTopupWithLedgerRequest {
|
|
148
|
+
accountId: number;
|
|
149
|
+
cardId: number;
|
|
150
|
+
inputUsdt: string;
|
|
151
|
+
cardCryptoCurrency: string;
|
|
152
|
+
otpCode: string;
|
|
153
|
+
idempotencySeed: string;
|
|
154
|
+
skipBalanceCheck: boolean;
|
|
155
|
+
previewOnly: boolean;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
export interface ExecuteTopupWithLedgerResponse {
|
|
159
|
+
status: string;
|
|
160
|
+
flow: string;
|
|
161
|
+
cardId: number;
|
|
162
|
+
targetCardAmount: string;
|
|
163
|
+
targetCardCurrency: string;
|
|
164
|
+
actualCardAmount: string;
|
|
165
|
+
actualCardCurrency: string;
|
|
166
|
+
inputAmount: string;
|
|
167
|
+
feeAmount: string;
|
|
168
|
+
requiredDebitAmount: string;
|
|
169
|
+
cardCryptoCurrency: string;
|
|
170
|
+
message: string;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
export interface ExecuteCreateWithLedgerRequest {
|
|
174
|
+
accountId: number;
|
|
175
|
+
currency: string;
|
|
176
|
+
cardType: string;
|
|
177
|
+
bin: string;
|
|
178
|
+
requiredAmount: string;
|
|
179
|
+
cardHolderName: string;
|
|
180
|
+
phone: string;
|
|
181
|
+
email: string;
|
|
182
|
+
firstName: string;
|
|
183
|
+
lastName: string;
|
|
184
|
+
kycRequired: boolean;
|
|
185
|
+
idempotencySeed: string;
|
|
186
|
+
skipBalanceCheck: boolean;
|
|
187
|
+
previewOnly: boolean;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
export interface ExecuteCreateWithLedgerResponse {
|
|
191
|
+
status: string;
|
|
192
|
+
flow: string;
|
|
193
|
+
requiredDebitAmount: string;
|
|
194
|
+
currency: string;
|
|
195
|
+
cardType: string;
|
|
196
|
+
bin: string;
|
|
197
|
+
cardId: number;
|
|
198
|
+
card: CardResponse | undefined;
|
|
199
|
+
message: string;
|
|
200
|
+
availableAmount: string;
|
|
201
|
+
shortfallAmount: string;
|
|
202
|
+
ledgerConfigured: boolean;
|
|
203
|
+
sufficientBalance: boolean;
|
|
204
|
+
}
|
|
205
|
+
|
|
128
206
|
export interface ListCardsRequest {
|
|
129
207
|
accountId: number;
|
|
130
208
|
}
|
|
@@ -344,6 +422,12 @@ export interface CardServiceClient {
|
|
|
344
422
|
|
|
345
423
|
getTopupFee(request: GetTopupFeeRequest): Observable<GetTopupFeeResponse>;
|
|
346
424
|
|
|
425
|
+
quoteTopupByTarget(request: QuoteTopupByTargetRequest): Observable<QuoteTopupByTargetResponse>;
|
|
426
|
+
|
|
427
|
+
executeTopupWithLedger(request: ExecuteTopupWithLedgerRequest): Observable<ExecuteTopupWithLedgerResponse>;
|
|
428
|
+
|
|
429
|
+
executeCreateWithLedger(request: ExecuteCreateWithLedgerRequest): Observable<ExecuteCreateWithLedgerResponse>;
|
|
430
|
+
|
|
347
431
|
listCards(request: ListCardsRequest): Observable<ListCardsResponse>;
|
|
348
432
|
|
|
349
433
|
listCardsPaginated(request: ListCardsPaginatedRequest): Observable<ListCardsPaginatedResponse>;
|
|
@@ -394,6 +478,24 @@ export interface CardServiceController {
|
|
|
394
478
|
request: GetTopupFeeRequest,
|
|
395
479
|
): Promise<GetTopupFeeResponse> | Observable<GetTopupFeeResponse> | GetTopupFeeResponse;
|
|
396
480
|
|
|
481
|
+
quoteTopupByTarget(
|
|
482
|
+
request: QuoteTopupByTargetRequest,
|
|
483
|
+
): Promise<QuoteTopupByTargetResponse> | Observable<QuoteTopupByTargetResponse> | QuoteTopupByTargetResponse;
|
|
484
|
+
|
|
485
|
+
executeTopupWithLedger(
|
|
486
|
+
request: ExecuteTopupWithLedgerRequest,
|
|
487
|
+
):
|
|
488
|
+
| Promise<ExecuteTopupWithLedgerResponse>
|
|
489
|
+
| Observable<ExecuteTopupWithLedgerResponse>
|
|
490
|
+
| ExecuteTopupWithLedgerResponse;
|
|
491
|
+
|
|
492
|
+
executeCreateWithLedger(
|
|
493
|
+
request: ExecuteCreateWithLedgerRequest,
|
|
494
|
+
):
|
|
495
|
+
| Promise<ExecuteCreateWithLedgerResponse>
|
|
496
|
+
| Observable<ExecuteCreateWithLedgerResponse>
|
|
497
|
+
| ExecuteCreateWithLedgerResponse;
|
|
498
|
+
|
|
397
499
|
listCards(request: ListCardsRequest): Promise<ListCardsResponse> | Observable<ListCardsResponse> | ListCardsResponse;
|
|
398
500
|
|
|
399
501
|
listCardsPaginated(
|
|
@@ -456,6 +558,9 @@ export function CardServiceControllerMethods() {
|
|
|
456
558
|
"createCardsBatch",
|
|
457
559
|
"topupCard",
|
|
458
560
|
"getTopupFee",
|
|
561
|
+
"quoteTopupByTarget",
|
|
562
|
+
"executeTopupWithLedger",
|
|
563
|
+
"executeCreateWithLedger",
|
|
459
564
|
"listCards",
|
|
460
565
|
"listCardsPaginated",
|
|
461
566
|
"getCard",
|
package/gen/deposit.ts
CHANGED
|
@@ -37,7 +37,15 @@ export interface CreatePaymentDillDepositRequest {
|
|
|
37
37
|
| string
|
|
38
38
|
| undefined;
|
|
39
39
|
/** Сеть баланса в Ledger (по умолчанию TRON) */
|
|
40
|
-
creditNetwork?:
|
|
40
|
+
creditNetwork?:
|
|
41
|
+
| string
|
|
42
|
+
| undefined;
|
|
43
|
+
/** WALLET_TOPUP | CARD_TOPUP */
|
|
44
|
+
purpose?:
|
|
45
|
+
| string
|
|
46
|
+
| undefined;
|
|
47
|
+
/** JSON payload for downstream orchestration (e.g. card top-up). */
|
|
48
|
+
purposePayloadJson?: string | undefined;
|
|
41
49
|
}
|
|
42
50
|
|
|
43
51
|
export interface CreatePaymentDillDepositResponse {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arbiwallet/contracts",
|
|
3
3
|
"descriptions": "Generate and manage smart contracts for ArbiWallet",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.109",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"generate": "protoc -I ./proto ./proto/*.proto --ts_proto_out=./gen --ts_proto_opt=nestJs=true,package=omit"
|
|
7
7
|
},
|
package/proto/card.proto
CHANGED
|
@@ -12,6 +12,9 @@ service CardService {
|
|
|
12
12
|
rpc CreateCardsBatch(CreateCardsBatchRequest) returns (CreateCardsBatchResponse);
|
|
13
13
|
rpc TopupCard(TopupCardRequest) returns (TopupCardResponse);
|
|
14
14
|
rpc GetTopupFee(GetTopupFeeRequest) returns (GetTopupFeeResponse);
|
|
15
|
+
rpc QuoteTopupByTarget(QuoteTopupByTargetRequest) returns (QuoteTopupByTargetResponse);
|
|
16
|
+
rpc ExecuteTopupWithLedger(ExecuteTopupWithLedgerRequest) returns (ExecuteTopupWithLedgerResponse);
|
|
17
|
+
rpc ExecuteCreateWithLedger(ExecuteCreateWithLedgerRequest) returns (ExecuteCreateWithLedgerResponse);
|
|
15
18
|
|
|
16
19
|
rpc ListCards(ListCardsRequest) returns (ListCardsResponse);
|
|
17
20
|
rpc ListCardsPaginated(ListCardsPaginatedRequest) returns (ListCardsPaginatedResponse);
|
|
@@ -148,6 +151,84 @@ message GetTopupFeeResponse {
|
|
|
148
151
|
string amount_to_card = 7;
|
|
149
152
|
}
|
|
150
153
|
|
|
154
|
+
message QuoteTopupByTargetRequest {
|
|
155
|
+
int64 account_id = 1;
|
|
156
|
+
int64 card_id = 2;
|
|
157
|
+
string target_amount = 3;
|
|
158
|
+
string target_currency = 4;
|
|
159
|
+
string card_crypto_currency = 5;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
message QuoteTopupByTargetResponse {
|
|
163
|
+
string target_amount = 1;
|
|
164
|
+
string target_currency = 2;
|
|
165
|
+
string input_usdt = 3;
|
|
166
|
+
string fee_usdt = 4;
|
|
167
|
+
string required_debit_usdt = 5;
|
|
168
|
+
string amount_to_card = 6;
|
|
169
|
+
string card_currency = 7;
|
|
170
|
+
string card_crypto_currency = 8;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
message ExecuteTopupWithLedgerRequest {
|
|
174
|
+
int64 account_id = 1;
|
|
175
|
+
int64 card_id = 2;
|
|
176
|
+
string input_usdt = 3;
|
|
177
|
+
string card_crypto_currency = 4;
|
|
178
|
+
string otp_code = 5;
|
|
179
|
+
string idempotency_seed = 6;
|
|
180
|
+
bool skip_balance_check = 7;
|
|
181
|
+
bool preview_only = 8;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
message ExecuteTopupWithLedgerResponse {
|
|
185
|
+
string status = 1;
|
|
186
|
+
string flow = 2;
|
|
187
|
+
int64 card_id = 3;
|
|
188
|
+
string target_card_amount = 4;
|
|
189
|
+
string target_card_currency = 5;
|
|
190
|
+
string actual_card_amount = 6;
|
|
191
|
+
string actual_card_currency = 7;
|
|
192
|
+
string input_amount = 8;
|
|
193
|
+
string fee_amount = 9;
|
|
194
|
+
string required_debit_amount = 10;
|
|
195
|
+
string card_crypto_currency = 11;
|
|
196
|
+
string message = 12;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
message ExecuteCreateWithLedgerRequest {
|
|
200
|
+
int64 account_id = 1;
|
|
201
|
+
string currency = 2;
|
|
202
|
+
string card_type = 3;
|
|
203
|
+
string bin = 4;
|
|
204
|
+
string required_amount = 5;
|
|
205
|
+
string card_holder_name = 6;
|
|
206
|
+
string phone = 7;
|
|
207
|
+
string email = 8;
|
|
208
|
+
string first_name = 9;
|
|
209
|
+
string last_name = 10;
|
|
210
|
+
bool kyc_required = 11;
|
|
211
|
+
string idempotency_seed = 12;
|
|
212
|
+
bool skip_balance_check = 13;
|
|
213
|
+
bool preview_only = 14;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
message ExecuteCreateWithLedgerResponse {
|
|
217
|
+
string status = 1;
|
|
218
|
+
string flow = 2;
|
|
219
|
+
string required_debit_amount = 3;
|
|
220
|
+
string currency = 4;
|
|
221
|
+
string card_type = 5;
|
|
222
|
+
string bin = 6;
|
|
223
|
+
int64 card_id = 7;
|
|
224
|
+
CardResponse card = 8;
|
|
225
|
+
string message = 9;
|
|
226
|
+
string available_amount = 10;
|
|
227
|
+
string shortfall_amount = 11;
|
|
228
|
+
bool ledger_configured = 12;
|
|
229
|
+
bool sufficient_balance = 13;
|
|
230
|
+
}
|
|
231
|
+
|
|
151
232
|
|
|
152
233
|
message ListCardsRequest {
|
|
153
234
|
int64 account_id = 1;
|
package/proto/deposit.proto
CHANGED
|
@@ -42,6 +42,10 @@ message CreatePaymentDillDepositRequest {
|
|
|
42
42
|
optional string credit_asset = 4;
|
|
43
43
|
/** Сеть баланса в Ledger (по умолчанию TRON) */
|
|
44
44
|
optional string credit_network = 5;
|
|
45
|
+
/** WALLET_TOPUP | CARD_TOPUP */
|
|
46
|
+
optional string purpose = 6;
|
|
47
|
+
/** JSON payload for downstream orchestration (e.g. card top-up). */
|
|
48
|
+
optional string purpose_payload_json = 7;
|
|
45
49
|
}
|
|
46
50
|
|
|
47
51
|
message CreatePaymentDillDepositResponse {
|