@0xsequence/api 0.41.0 → 0.41.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/dist/0xsequence-api.cjs.dev.js +28 -9
- package/dist/0xsequence-api.cjs.prod.js +28 -9
- package/dist/0xsequence-api.esm.js +29 -10
- package/dist/declarations/src/api.gen.d.ts +36 -16
- package/package.json +1 -1
- package/src/api.gen.ts +58 -24
|
@@ -27,7 +27,7 @@ function _extends() {
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
/* eslint-disable */
|
|
30
|
-
// sequence-api v0.4.0
|
|
30
|
+
// sequence-api v0.4.0 0d458711a1a80c4b64e2e12668b42e12cb7eeadc
|
|
31
31
|
// --
|
|
32
32
|
// This file has been generated by https://github.com/webrpc/webrpc using gen/typescript
|
|
33
33
|
// Do not edit by hand. Update your webrpc schema and re-generate.
|
|
@@ -36,7 +36,7 @@ const WebRPCVersion = "v1"; // Schema version of your RIDL schema
|
|
|
36
36
|
|
|
37
37
|
const WebRPCSchemaVersion = "v0.4.0"; // Schema hash generated from your RIDL schema
|
|
38
38
|
|
|
39
|
-
const WebRPCSchemaHash = "
|
|
39
|
+
const WebRPCSchemaHash = "0d458711a1a80c4b64e2e12668b42e12cb7eeadc"; //
|
|
40
40
|
// Types
|
|
41
41
|
//
|
|
42
42
|
|
|
@@ -50,6 +50,14 @@ exports.SmartRampOrderStatus = void 0;
|
|
|
50
50
|
SmartRampOrderStatus["COMPLETE"] = "COMPLETE";
|
|
51
51
|
})(exports.SmartRampOrderStatus || (exports.SmartRampOrderStatus = {}));
|
|
52
52
|
|
|
53
|
+
exports.SmartRampTxnStatus = void 0;
|
|
54
|
+
|
|
55
|
+
(function (SmartRampTxnStatus) {
|
|
56
|
+
SmartRampTxnStatus["UNKNOWN"] = "UNKNOWN";
|
|
57
|
+
SmartRampTxnStatus["SUCCESSFUL"] = "SUCCESSFUL";
|
|
58
|
+
SmartRampTxnStatus["FAILED"] = "FAILED";
|
|
59
|
+
})(exports.SmartRampTxnStatus || (exports.SmartRampTxnStatus = {}));
|
|
60
|
+
|
|
53
61
|
exports.SortOrder = void 0;
|
|
54
62
|
|
|
55
63
|
(function (SortOrder) {
|
|
@@ -447,22 +455,33 @@ class API {
|
|
|
447
455
|
});
|
|
448
456
|
};
|
|
449
457
|
|
|
450
|
-
this.
|
|
451
|
-
return this.fetch(this.url('
|
|
458
|
+
this.smartRampOrdersList = (args, headers) => {
|
|
459
|
+
return this.fetch(this.url('SmartRampOrdersList'), createHTTPRequest(args, headers)).then(res => {
|
|
452
460
|
return buildResponse(res).then(_data => {
|
|
453
461
|
return {
|
|
454
|
-
|
|
462
|
+
page: _data.page,
|
|
463
|
+
orders: _data.orders
|
|
455
464
|
};
|
|
456
465
|
});
|
|
457
466
|
});
|
|
458
467
|
};
|
|
459
468
|
|
|
460
|
-
this.
|
|
461
|
-
return this.fetch(this.url('
|
|
469
|
+
this.smartRampGetOrderTxnHash = (args, headers) => {
|
|
470
|
+
return this.fetch(this.url('SmartRampGetOrderTxnHash'), createHTTPRequest(args, headers)).then(res => {
|
|
462
471
|
return buildResponse(res).then(_data => {
|
|
463
472
|
return {
|
|
464
|
-
|
|
465
|
-
|
|
473
|
+
txnHash: _data.txnHash,
|
|
474
|
+
txnSuccessful: _data.txnSuccessful
|
|
475
|
+
};
|
|
476
|
+
});
|
|
477
|
+
});
|
|
478
|
+
};
|
|
479
|
+
|
|
480
|
+
this.smartRampSubmitCardAuthorization = (args, headers) => {
|
|
481
|
+
return this.fetch(this.url('SmartRampSubmitCardAuthorization'), createHTTPRequest(args, headers)).then(res => {
|
|
482
|
+
return buildResponse(res).then(_data => {
|
|
483
|
+
return {
|
|
484
|
+
status: _data.status
|
|
466
485
|
};
|
|
467
486
|
});
|
|
468
487
|
});
|
|
@@ -27,7 +27,7 @@ function _extends() {
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
/* eslint-disable */
|
|
30
|
-
// sequence-api v0.4.0
|
|
30
|
+
// sequence-api v0.4.0 0d458711a1a80c4b64e2e12668b42e12cb7eeadc
|
|
31
31
|
// --
|
|
32
32
|
// This file has been generated by https://github.com/webrpc/webrpc using gen/typescript
|
|
33
33
|
// Do not edit by hand. Update your webrpc schema and re-generate.
|
|
@@ -36,7 +36,7 @@ const WebRPCVersion = "v1"; // Schema version of your RIDL schema
|
|
|
36
36
|
|
|
37
37
|
const WebRPCSchemaVersion = "v0.4.0"; // Schema hash generated from your RIDL schema
|
|
38
38
|
|
|
39
|
-
const WebRPCSchemaHash = "
|
|
39
|
+
const WebRPCSchemaHash = "0d458711a1a80c4b64e2e12668b42e12cb7eeadc"; //
|
|
40
40
|
// Types
|
|
41
41
|
//
|
|
42
42
|
|
|
@@ -50,6 +50,14 @@ exports.SmartRampOrderStatus = void 0;
|
|
|
50
50
|
SmartRampOrderStatus["COMPLETE"] = "COMPLETE";
|
|
51
51
|
})(exports.SmartRampOrderStatus || (exports.SmartRampOrderStatus = {}));
|
|
52
52
|
|
|
53
|
+
exports.SmartRampTxnStatus = void 0;
|
|
54
|
+
|
|
55
|
+
(function (SmartRampTxnStatus) {
|
|
56
|
+
SmartRampTxnStatus["UNKNOWN"] = "UNKNOWN";
|
|
57
|
+
SmartRampTxnStatus["SUCCESSFUL"] = "SUCCESSFUL";
|
|
58
|
+
SmartRampTxnStatus["FAILED"] = "FAILED";
|
|
59
|
+
})(exports.SmartRampTxnStatus || (exports.SmartRampTxnStatus = {}));
|
|
60
|
+
|
|
53
61
|
exports.SortOrder = void 0;
|
|
54
62
|
|
|
55
63
|
(function (SortOrder) {
|
|
@@ -447,22 +455,33 @@ class API {
|
|
|
447
455
|
});
|
|
448
456
|
};
|
|
449
457
|
|
|
450
|
-
this.
|
|
451
|
-
return this.fetch(this.url('
|
|
458
|
+
this.smartRampOrdersList = (args, headers) => {
|
|
459
|
+
return this.fetch(this.url('SmartRampOrdersList'), createHTTPRequest(args, headers)).then(res => {
|
|
452
460
|
return buildResponse(res).then(_data => {
|
|
453
461
|
return {
|
|
454
|
-
|
|
462
|
+
page: _data.page,
|
|
463
|
+
orders: _data.orders
|
|
455
464
|
};
|
|
456
465
|
});
|
|
457
466
|
});
|
|
458
467
|
};
|
|
459
468
|
|
|
460
|
-
this.
|
|
461
|
-
return this.fetch(this.url('
|
|
469
|
+
this.smartRampGetOrderTxnHash = (args, headers) => {
|
|
470
|
+
return this.fetch(this.url('SmartRampGetOrderTxnHash'), createHTTPRequest(args, headers)).then(res => {
|
|
462
471
|
return buildResponse(res).then(_data => {
|
|
463
472
|
return {
|
|
464
|
-
|
|
465
|
-
|
|
473
|
+
txnHash: _data.txnHash,
|
|
474
|
+
txnSuccessful: _data.txnSuccessful
|
|
475
|
+
};
|
|
476
|
+
});
|
|
477
|
+
});
|
|
478
|
+
};
|
|
479
|
+
|
|
480
|
+
this.smartRampSubmitCardAuthorization = (args, headers) => {
|
|
481
|
+
return this.fetch(this.url('SmartRampSubmitCardAuthorization'), createHTTPRequest(args, headers)).then(res => {
|
|
482
|
+
return buildResponse(res).then(_data => {
|
|
483
|
+
return {
|
|
484
|
+
status: _data.status
|
|
466
485
|
};
|
|
467
486
|
});
|
|
468
487
|
});
|
|
@@ -19,7 +19,7 @@ function _extends() {
|
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
/* eslint-disable */
|
|
22
|
-
// sequence-api v0.4.0
|
|
22
|
+
// sequence-api v0.4.0 0d458711a1a80c4b64e2e12668b42e12cb7eeadc
|
|
23
23
|
// --
|
|
24
24
|
// This file has been generated by https://github.com/webrpc/webrpc using gen/typescript
|
|
25
25
|
// Do not edit by hand. Update your webrpc schema and re-generate.
|
|
@@ -28,7 +28,7 @@ const WebRPCVersion = "v1"; // Schema version of your RIDL schema
|
|
|
28
28
|
|
|
29
29
|
const WebRPCSchemaVersion = "v0.4.0"; // Schema hash generated from your RIDL schema
|
|
30
30
|
|
|
31
|
-
const WebRPCSchemaHash = "
|
|
31
|
+
const WebRPCSchemaHash = "0d458711a1a80c4b64e2e12668b42e12cb7eeadc"; //
|
|
32
32
|
// Types
|
|
33
33
|
//
|
|
34
34
|
|
|
@@ -42,6 +42,14 @@ let SmartRampOrderStatus;
|
|
|
42
42
|
SmartRampOrderStatus["COMPLETE"] = "COMPLETE";
|
|
43
43
|
})(SmartRampOrderStatus || (SmartRampOrderStatus = {}));
|
|
44
44
|
|
|
45
|
+
let SmartRampTxnStatus;
|
|
46
|
+
|
|
47
|
+
(function (SmartRampTxnStatus) {
|
|
48
|
+
SmartRampTxnStatus["UNKNOWN"] = "UNKNOWN";
|
|
49
|
+
SmartRampTxnStatus["SUCCESSFUL"] = "SUCCESSFUL";
|
|
50
|
+
SmartRampTxnStatus["FAILED"] = "FAILED";
|
|
51
|
+
})(SmartRampTxnStatus || (SmartRampTxnStatus = {}));
|
|
52
|
+
|
|
45
53
|
let SortOrder;
|
|
46
54
|
|
|
47
55
|
(function (SortOrder) {
|
|
@@ -439,22 +447,33 @@ class API {
|
|
|
439
447
|
});
|
|
440
448
|
};
|
|
441
449
|
|
|
442
|
-
this.
|
|
443
|
-
return this.fetch(this.url('
|
|
450
|
+
this.smartRampOrdersList = (args, headers) => {
|
|
451
|
+
return this.fetch(this.url('SmartRampOrdersList'), createHTTPRequest(args, headers)).then(res => {
|
|
444
452
|
return buildResponse(res).then(_data => {
|
|
445
453
|
return {
|
|
446
|
-
|
|
454
|
+
page: _data.page,
|
|
455
|
+
orders: _data.orders
|
|
447
456
|
};
|
|
448
457
|
});
|
|
449
458
|
});
|
|
450
459
|
};
|
|
451
460
|
|
|
452
|
-
this.
|
|
453
|
-
return this.fetch(this.url('
|
|
461
|
+
this.smartRampGetOrderTxnHash = (args, headers) => {
|
|
462
|
+
return this.fetch(this.url('SmartRampGetOrderTxnHash'), createHTTPRequest(args, headers)).then(res => {
|
|
454
463
|
return buildResponse(res).then(_data => {
|
|
455
464
|
return {
|
|
456
|
-
|
|
457
|
-
|
|
465
|
+
txnHash: _data.txnHash,
|
|
466
|
+
txnSuccessful: _data.txnSuccessful
|
|
467
|
+
};
|
|
468
|
+
});
|
|
469
|
+
});
|
|
470
|
+
};
|
|
471
|
+
|
|
472
|
+
this.smartRampSubmitCardAuthorization = (args, headers) => {
|
|
473
|
+
return this.fetch(this.url('SmartRampSubmitCardAuthorization'), createHTTPRequest(args, headers)).then(res => {
|
|
474
|
+
return buildResponse(res).then(_data => {
|
|
475
|
+
return {
|
|
476
|
+
status: _data.status
|
|
458
477
|
};
|
|
459
478
|
});
|
|
460
479
|
});
|
|
@@ -566,4 +585,4 @@ class SequenceAPIClient extends API {
|
|
|
566
585
|
|
|
567
586
|
}
|
|
568
587
|
|
|
569
|
-
export { API, SequenceAPIClient, SmartRampOrderStatus, SortOrder, WebRPCSchemaHash, WebRPCSchemaVersion, WebRPCVersion };
|
|
588
|
+
export { API, SequenceAPIClient, SmartRampOrderStatus, SmartRampTxnStatus, SortOrder, WebRPCSchemaHash, WebRPCSchemaVersion, WebRPCVersion };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const WebRPCVersion = "v1";
|
|
2
2
|
export declare const WebRPCSchemaVersion = "v0.4.0";
|
|
3
|
-
export declare const WebRPCSchemaHash = "
|
|
3
|
+
export declare const WebRPCSchemaHash = "0d458711a1a80c4b64e2e12668b42e12cb7eeadc";
|
|
4
4
|
export declare enum SmartRampOrderStatus {
|
|
5
5
|
UNKNOWN = "UNKNOWN",
|
|
6
6
|
RUNNING_CHECKS = "RUNNING_CHECKS",
|
|
@@ -8,6 +8,11 @@ export declare enum SmartRampOrderStatus {
|
|
|
8
8
|
FAILED = "FAILED",
|
|
9
9
|
COMPLETE = "COMPLETE"
|
|
10
10
|
}
|
|
11
|
+
export declare enum SmartRampTxnStatus {
|
|
12
|
+
UNKNOWN = "UNKNOWN",
|
|
13
|
+
SUCCESSFUL = "SUCCESSFUL",
|
|
14
|
+
FAILED = "FAILED"
|
|
15
|
+
}
|
|
11
16
|
export declare enum SortOrder {
|
|
12
17
|
DESC = "DESC",
|
|
13
18
|
ASC = "ASC"
|
|
@@ -157,7 +162,7 @@ export interface SmartRampQuoteRequest {
|
|
|
157
162
|
niftyswapContractAddress: string;
|
|
158
163
|
tokenIds: Array<string>;
|
|
159
164
|
tokensBoughtAmounts: Array<string>;
|
|
160
|
-
maxCurrency:
|
|
165
|
+
maxCurrency: string;
|
|
161
166
|
extraFeeRecipients?: Array<string>;
|
|
162
167
|
extraFeeAmounts?: Array<string>;
|
|
163
168
|
}
|
|
@@ -177,15 +182,18 @@ export interface SmartRampQuoteDetails {
|
|
|
177
182
|
export interface SmartRampPurchaseReceipt {
|
|
178
183
|
orderId: string;
|
|
179
184
|
quoteId: string;
|
|
180
|
-
smartScriptId: string;
|
|
181
185
|
createdAt: string;
|
|
182
186
|
status: SmartRampOrderStatus;
|
|
187
|
+
errorReason?: string;
|
|
188
|
+
errorCode?: string;
|
|
183
189
|
authCodesRequested: boolean;
|
|
184
|
-
|
|
190
|
+
countryCode: string;
|
|
185
191
|
sourceCurrency: string;
|
|
186
192
|
purchaseAmount: number;
|
|
187
193
|
purchaseFees: number;
|
|
188
194
|
purchaseTotal: number;
|
|
195
|
+
txnHash: string;
|
|
196
|
+
txnSuccessful: SmartRampTxnStatus;
|
|
189
197
|
}
|
|
190
198
|
export interface SmartRampOrder {
|
|
191
199
|
id: number;
|
|
@@ -195,8 +203,9 @@ export interface SmartRampOrder {
|
|
|
195
203
|
orderId: string;
|
|
196
204
|
quoteId: string;
|
|
197
205
|
status: SmartRampOrderStatus;
|
|
206
|
+
errorReason: string;
|
|
207
|
+
errorCode: string;
|
|
198
208
|
authCodesRequested: boolean;
|
|
199
|
-
authCodesSubmitted: boolean;
|
|
200
209
|
countryCode: string;
|
|
201
210
|
email: string;
|
|
202
211
|
sourceCurrency: string;
|
|
@@ -207,6 +216,8 @@ export interface SmartRampOrder {
|
|
|
207
216
|
smartScriptParams: {
|
|
208
217
|
[key: string]: any;
|
|
209
218
|
};
|
|
219
|
+
txnHash: string;
|
|
220
|
+
txnSuccessful: SmartRampTxnStatus;
|
|
210
221
|
updatedAt?: string;
|
|
211
222
|
createdAt?: string;
|
|
212
223
|
}
|
|
@@ -267,8 +278,9 @@ export interface API {
|
|
|
267
278
|
smartRampWaitOrderConfirmation(args: SmartRampWaitOrderConfirmationArgs, headers?: object): Promise<SmartRampWaitOrderConfirmationReturn>;
|
|
268
279
|
smartRampGetOrder(args: SmartRampGetOrderArgs, headers?: object): Promise<SmartRampGetOrderReturn>;
|
|
269
280
|
smartRampCheckCardAuthorization(args: SmartRampCheckCardAuthorizationArgs, headers?: object): Promise<SmartRampCheckCardAuthorizationReturn>;
|
|
270
|
-
smartRampSubmitCardAuthorization(args: SmartRampSubmitCardAuthorizationArgs, headers?: object): Promise<SmartRampSubmitCardAuthorizationReturn>;
|
|
271
281
|
smartRampOrdersList(args: SmartRampOrdersListArgs, headers?: object): Promise<SmartRampOrdersListReturn>;
|
|
282
|
+
smartRampGetOrderTxnHash(args: SmartRampGetOrderTxnHashArgs, headers?: object): Promise<SmartRampGetOrderTxnHashReturn>;
|
|
283
|
+
smartRampSubmitCardAuthorization(args: SmartRampSubmitCardAuthorizationArgs, headers?: object): Promise<SmartRampSubmitCardAuthorizationReturn>;
|
|
272
284
|
getInviteInfo(headers?: object): Promise<GetInviteInfoReturn>;
|
|
273
285
|
isValidAccessCode(args: IsValidAccessCodeArgs, headers?: object): Promise<IsValidAccessCodeReturn>;
|
|
274
286
|
internalClaimAccessCode(args: InternalClaimAccessCodeArgs, headers?: object): Promise<InternalClaimAccessCodeReturn>;
|
|
@@ -445,7 +457,7 @@ export interface IsValidTypedDataSignatureReturn {
|
|
|
445
457
|
export interface IsValidETHAuthProofArgs {
|
|
446
458
|
chainId: string;
|
|
447
459
|
walletAddress: string;
|
|
448
|
-
|
|
460
|
+
ethAuthProofString: string;
|
|
449
461
|
}
|
|
450
462
|
export interface IsValidETHAuthProofReturn {
|
|
451
463
|
isValid: boolean;
|
|
@@ -529,14 +541,6 @@ export interface SmartRampCheckCardAuthorizationArgs {
|
|
|
529
541
|
export interface SmartRampCheckCardAuthorizationReturn {
|
|
530
542
|
cardAuth: PayCardAuth;
|
|
531
543
|
}
|
|
532
|
-
export interface SmartRampSubmitCardAuthorizationArgs {
|
|
533
|
-
orderId: string;
|
|
534
|
-
sms?: string;
|
|
535
|
-
card2fa?: string;
|
|
536
|
-
}
|
|
537
|
-
export interface SmartRampSubmitCardAuthorizationReturn {
|
|
538
|
-
status: boolean;
|
|
539
|
-
}
|
|
540
544
|
export interface SmartRampOrdersListArgs {
|
|
541
545
|
page?: Page;
|
|
542
546
|
userAddressFilter?: string;
|
|
@@ -545,6 +549,21 @@ export interface SmartRampOrdersListReturn {
|
|
|
545
549
|
page: Page;
|
|
546
550
|
orders: Array<SmartRampOrder>;
|
|
547
551
|
}
|
|
552
|
+
export interface SmartRampGetOrderTxnHashArgs {
|
|
553
|
+
orderId: string;
|
|
554
|
+
}
|
|
555
|
+
export interface SmartRampGetOrderTxnHashReturn {
|
|
556
|
+
txnHash: string;
|
|
557
|
+
txnSuccessful: SmartRampTxnStatus;
|
|
558
|
+
}
|
|
559
|
+
export interface SmartRampSubmitCardAuthorizationArgs {
|
|
560
|
+
orderId: string;
|
|
561
|
+
sms?: string;
|
|
562
|
+
card2fa?: string;
|
|
563
|
+
}
|
|
564
|
+
export interface SmartRampSubmitCardAuthorizationReturn {
|
|
565
|
+
status: boolean;
|
|
566
|
+
}
|
|
548
567
|
export interface GetInviteInfoArgs {
|
|
549
568
|
}
|
|
550
569
|
export interface GetInviteInfoReturn {
|
|
@@ -613,8 +632,9 @@ export declare class API implements API {
|
|
|
613
632
|
smartRampWaitOrderConfirmation: (args: SmartRampWaitOrderConfirmationArgs, headers?: object | undefined) => Promise<SmartRampWaitOrderConfirmationReturn>;
|
|
614
633
|
smartRampGetOrder: (args: SmartRampGetOrderArgs, headers?: object | undefined) => Promise<SmartRampGetOrderReturn>;
|
|
615
634
|
smartRampCheckCardAuthorization: (args: SmartRampCheckCardAuthorizationArgs, headers?: object | undefined) => Promise<SmartRampCheckCardAuthorizationReturn>;
|
|
616
|
-
smartRampSubmitCardAuthorization: (args: SmartRampSubmitCardAuthorizationArgs, headers?: object | undefined) => Promise<SmartRampSubmitCardAuthorizationReturn>;
|
|
617
635
|
smartRampOrdersList: (args: SmartRampOrdersListArgs, headers?: object | undefined) => Promise<SmartRampOrdersListReturn>;
|
|
636
|
+
smartRampGetOrderTxnHash: (args: SmartRampGetOrderTxnHashArgs, headers?: object | undefined) => Promise<SmartRampGetOrderTxnHashReturn>;
|
|
637
|
+
smartRampSubmitCardAuthorization: (args: SmartRampSubmitCardAuthorizationArgs, headers?: object | undefined) => Promise<SmartRampSubmitCardAuthorizationReturn>;
|
|
618
638
|
getInviteInfo: (headers?: object | undefined) => Promise<GetInviteInfoReturn>;
|
|
619
639
|
isValidAccessCode: (args: IsValidAccessCodeArgs, headers?: object | undefined) => Promise<IsValidAccessCodeReturn>;
|
|
620
640
|
internalClaimAccessCode: (args: InternalClaimAccessCodeArgs, headers?: object | undefined) => Promise<InternalClaimAccessCodeReturn>;
|
package/package.json
CHANGED
package/src/api.gen.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
|
-
// sequence-api v0.4.0
|
|
2
|
+
// sequence-api v0.4.0 0d458711a1a80c4b64e2e12668b42e12cb7eeadc
|
|
3
3
|
// --
|
|
4
4
|
// This file has been generated by https://github.com/webrpc/webrpc using gen/typescript
|
|
5
5
|
// Do not edit by hand. Update your webrpc schema and re-generate.
|
|
@@ -11,7 +11,7 @@ export const WebRPCVersion = "v1"
|
|
|
11
11
|
export const WebRPCSchemaVersion = "v0.4.0"
|
|
12
12
|
|
|
13
13
|
// Schema hash generated from your RIDL schema
|
|
14
|
-
export const WebRPCSchemaHash = "
|
|
14
|
+
export const WebRPCSchemaHash = "0d458711a1a80c4b64e2e12668b42e12cb7eeadc"
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
//
|
|
@@ -25,6 +25,12 @@ export enum SmartRampOrderStatus {
|
|
|
25
25
|
COMPLETE = 'COMPLETE'
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
export enum SmartRampTxnStatus {
|
|
29
|
+
UNKNOWN = 'UNKNOWN',
|
|
30
|
+
SUCCESSFUL = 'SUCCESSFUL',
|
|
31
|
+
FAILED = 'FAILED'
|
|
32
|
+
}
|
|
33
|
+
|
|
28
34
|
export enum SortOrder {
|
|
29
35
|
DESC = 'DESC',
|
|
30
36
|
ASC = 'ASC'
|
|
@@ -199,7 +205,7 @@ export interface SmartRampQuoteRequest {
|
|
|
199
205
|
niftyswapContractAddress: string
|
|
200
206
|
tokenIds: Array<string>
|
|
201
207
|
tokensBoughtAmounts: Array<string>
|
|
202
|
-
maxCurrency:
|
|
208
|
+
maxCurrency: string
|
|
203
209
|
extraFeeRecipients?: Array<string>
|
|
204
210
|
extraFeeAmounts?: Array<string>
|
|
205
211
|
}
|
|
@@ -221,15 +227,18 @@ export interface SmartRampQuoteDetails {
|
|
|
221
227
|
export interface SmartRampPurchaseReceipt {
|
|
222
228
|
orderId: string
|
|
223
229
|
quoteId: string
|
|
224
|
-
smartScriptId: string
|
|
225
230
|
createdAt: string
|
|
226
231
|
status: SmartRampOrderStatus
|
|
232
|
+
errorReason?: string
|
|
233
|
+
errorCode?: string
|
|
227
234
|
authCodesRequested: boolean
|
|
228
|
-
|
|
235
|
+
countryCode: string
|
|
229
236
|
sourceCurrency: string
|
|
230
237
|
purchaseAmount: number
|
|
231
238
|
purchaseFees: number
|
|
232
239
|
purchaseTotal: number
|
|
240
|
+
txnHash: string
|
|
241
|
+
txnSuccessful: SmartRampTxnStatus
|
|
233
242
|
}
|
|
234
243
|
|
|
235
244
|
export interface SmartRampOrder {
|
|
@@ -240,8 +249,9 @@ export interface SmartRampOrder {
|
|
|
240
249
|
orderId: string
|
|
241
250
|
quoteId: string
|
|
242
251
|
status: SmartRampOrderStatus
|
|
252
|
+
errorReason: string
|
|
253
|
+
errorCode: string
|
|
243
254
|
authCodesRequested: boolean
|
|
244
|
-
authCodesSubmitted: boolean
|
|
245
255
|
countryCode: string
|
|
246
256
|
email: string
|
|
247
257
|
sourceCurrency: string
|
|
@@ -250,6 +260,8 @@ export interface SmartRampOrder {
|
|
|
250
260
|
purchaseFees: number
|
|
251
261
|
purchaseTotal: number
|
|
252
262
|
smartScriptParams: {[key: string]: any}
|
|
263
|
+
txnHash: string
|
|
264
|
+
txnSuccessful: SmartRampTxnStatus
|
|
253
265
|
updatedAt?: string
|
|
254
266
|
createdAt?: string
|
|
255
267
|
}
|
|
@@ -314,8 +326,9 @@ export interface API {
|
|
|
314
326
|
smartRampWaitOrderConfirmation(args: SmartRampWaitOrderConfirmationArgs, headers?: object): Promise<SmartRampWaitOrderConfirmationReturn>
|
|
315
327
|
smartRampGetOrder(args: SmartRampGetOrderArgs, headers?: object): Promise<SmartRampGetOrderReturn>
|
|
316
328
|
smartRampCheckCardAuthorization(args: SmartRampCheckCardAuthorizationArgs, headers?: object): Promise<SmartRampCheckCardAuthorizationReturn>
|
|
317
|
-
smartRampSubmitCardAuthorization(args: SmartRampSubmitCardAuthorizationArgs, headers?: object): Promise<SmartRampSubmitCardAuthorizationReturn>
|
|
318
329
|
smartRampOrdersList(args: SmartRampOrdersListArgs, headers?: object): Promise<SmartRampOrdersListReturn>
|
|
330
|
+
smartRampGetOrderTxnHash(args: SmartRampGetOrderTxnHashArgs, headers?: object): Promise<SmartRampGetOrderTxnHashReturn>
|
|
331
|
+
smartRampSubmitCardAuthorization(args: SmartRampSubmitCardAuthorizationArgs, headers?: object): Promise<SmartRampSubmitCardAuthorizationReturn>
|
|
319
332
|
getInviteInfo(headers?: object): Promise<GetInviteInfoReturn>
|
|
320
333
|
isValidAccessCode(args: IsValidAccessCodeArgs, headers?: object): Promise<IsValidAccessCodeReturn>
|
|
321
334
|
internalClaimAccessCode(args: InternalClaimAccessCodeArgs, headers?: object): Promise<InternalClaimAccessCodeReturn>
|
|
@@ -515,7 +528,7 @@ export interface IsValidTypedDataSignatureReturn {
|
|
|
515
528
|
export interface IsValidETHAuthProofArgs {
|
|
516
529
|
chainId: string
|
|
517
530
|
walletAddress: string
|
|
518
|
-
|
|
531
|
+
ethAuthProofString: string
|
|
519
532
|
}
|
|
520
533
|
|
|
521
534
|
export interface IsValidETHAuthProofReturn {
|
|
@@ -612,15 +625,6 @@ export interface SmartRampCheckCardAuthorizationArgs {
|
|
|
612
625
|
export interface SmartRampCheckCardAuthorizationReturn {
|
|
613
626
|
cardAuth: PayCardAuth
|
|
614
627
|
}
|
|
615
|
-
export interface SmartRampSubmitCardAuthorizationArgs {
|
|
616
|
-
orderId: string
|
|
617
|
-
sms?: string
|
|
618
|
-
card2fa?: string
|
|
619
|
-
}
|
|
620
|
-
|
|
621
|
-
export interface SmartRampSubmitCardAuthorizationReturn {
|
|
622
|
-
status: boolean
|
|
623
|
-
}
|
|
624
628
|
export interface SmartRampOrdersListArgs {
|
|
625
629
|
page?: Page
|
|
626
630
|
userAddressFilter?: string
|
|
@@ -630,6 +634,23 @@ export interface SmartRampOrdersListReturn {
|
|
|
630
634
|
page: Page
|
|
631
635
|
orders: Array<SmartRampOrder>
|
|
632
636
|
}
|
|
637
|
+
export interface SmartRampGetOrderTxnHashArgs {
|
|
638
|
+
orderId: string
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
export interface SmartRampGetOrderTxnHashReturn {
|
|
642
|
+
txnHash: string
|
|
643
|
+
txnSuccessful: SmartRampTxnStatus
|
|
644
|
+
}
|
|
645
|
+
export interface SmartRampSubmitCardAuthorizationArgs {
|
|
646
|
+
orderId: string
|
|
647
|
+
sms?: string
|
|
648
|
+
card2fa?: string
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
export interface SmartRampSubmitCardAuthorizationReturn {
|
|
652
|
+
status: boolean
|
|
653
|
+
}
|
|
633
654
|
export interface GetInviteInfoArgs {
|
|
634
655
|
}
|
|
635
656
|
|
|
@@ -1139,26 +1160,39 @@ export class API implements API {
|
|
|
1139
1160
|
})
|
|
1140
1161
|
}
|
|
1141
1162
|
|
|
1142
|
-
|
|
1163
|
+
smartRampOrdersList = (args: SmartRampOrdersListArgs, headers?: object): Promise<SmartRampOrdersListReturn> => {
|
|
1143
1164
|
return this.fetch(
|
|
1144
|
-
this.url('
|
|
1165
|
+
this.url('SmartRampOrdersList'),
|
|
1145
1166
|
createHTTPRequest(args, headers)).then((res) => {
|
|
1146
1167
|
return buildResponse(res).then(_data => {
|
|
1147
1168
|
return {
|
|
1148
|
-
|
|
1169
|
+
page: <Page>(_data.page),
|
|
1170
|
+
orders: <Array<SmartRampOrder>>(_data.orders)
|
|
1149
1171
|
}
|
|
1150
1172
|
})
|
|
1151
1173
|
})
|
|
1152
1174
|
}
|
|
1153
1175
|
|
|
1154
|
-
|
|
1176
|
+
smartRampGetOrderTxnHash = (args: SmartRampGetOrderTxnHashArgs, headers?: object): Promise<SmartRampGetOrderTxnHashReturn> => {
|
|
1155
1177
|
return this.fetch(
|
|
1156
|
-
this.url('
|
|
1178
|
+
this.url('SmartRampGetOrderTxnHash'),
|
|
1157
1179
|
createHTTPRequest(args, headers)).then((res) => {
|
|
1158
1180
|
return buildResponse(res).then(_data => {
|
|
1159
1181
|
return {
|
|
1160
|
-
|
|
1161
|
-
|
|
1182
|
+
txnHash: <string>(_data.txnHash),
|
|
1183
|
+
txnSuccessful: <SmartRampTxnStatus>(_data.txnSuccessful)
|
|
1184
|
+
}
|
|
1185
|
+
})
|
|
1186
|
+
})
|
|
1187
|
+
}
|
|
1188
|
+
|
|
1189
|
+
smartRampSubmitCardAuthorization = (args: SmartRampSubmitCardAuthorizationArgs, headers?: object): Promise<SmartRampSubmitCardAuthorizationReturn> => {
|
|
1190
|
+
return this.fetch(
|
|
1191
|
+
this.url('SmartRampSubmitCardAuthorization'),
|
|
1192
|
+
createHTTPRequest(args, headers)).then((res) => {
|
|
1193
|
+
return buildResponse(res).then(_data => {
|
|
1194
|
+
return {
|
|
1195
|
+
status: <boolean>(_data.status)
|
|
1162
1196
|
}
|
|
1163
1197
|
})
|
|
1164
1198
|
})
|