@0xsequence/api 0.0.0-20220519202656 → 0.0.0-20220601185217
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 +55 -2
- package/dist/0xsequence-api.cjs.prod.js +55 -2
- package/dist/0xsequence-api.esm.js +56 -3
- package/dist/declarations/src/api.gen.d.ts +121 -17
- package/package.json +1 -1
- package/src/api.gen.ts +179 -20
|
@@ -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 451d96d5692d65926fddc63c8a6912af960a3dd1
|
|
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,10 +36,20 @@ 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 = "451d96d5692d65926fddc63c8a6912af960a3dd1"; //
|
|
40
40
|
// Types
|
|
41
41
|
//
|
|
42
42
|
|
|
43
|
+
exports.SmartRampOrderStatus = void 0;
|
|
44
|
+
|
|
45
|
+
(function (SmartRampOrderStatus) {
|
|
46
|
+
SmartRampOrderStatus["UNKNOWN"] = "UNKNOWN";
|
|
47
|
+
SmartRampOrderStatus["RUNNING_CHECKS"] = "RUNNING_CHECKS";
|
|
48
|
+
SmartRampOrderStatus["PROCESSING"] = "PROCESSING";
|
|
49
|
+
SmartRampOrderStatus["FAILED"] = "FAILED";
|
|
50
|
+
SmartRampOrderStatus["COMPLETE"] = "COMPLETE";
|
|
51
|
+
})(exports.SmartRampOrderStatus || (exports.SmartRampOrderStatus = {}));
|
|
52
|
+
|
|
43
53
|
exports.SortOrder = void 0;
|
|
44
54
|
|
|
45
55
|
(function (SortOrder) {
|
|
@@ -334,8 +344,51 @@ class API {
|
|
|
334
344
|
});
|
|
335
345
|
};
|
|
336
346
|
|
|
347
|
+
this.smartRampQuote = (args, headers) => {
|
|
348
|
+
return this.fetch(this.url('SmartRampQuote'), createHTTPRequest(args, headers)).then(res => {
|
|
349
|
+
return buildResponse(res).then(_data => {
|
|
350
|
+
return {
|
|
351
|
+
status: _data.status,
|
|
352
|
+
quoteDetails: _data.quoteDetails
|
|
353
|
+
};
|
|
354
|
+
});
|
|
355
|
+
});
|
|
356
|
+
};
|
|
357
|
+
|
|
337
358
|
this.smartRampPurchase = (args, headers) => {
|
|
338
359
|
return this.fetch(this.url('SmartRampPurchase'), createHTTPRequest(args, headers)).then(res => {
|
|
360
|
+
return buildResponse(res).then(_data => {
|
|
361
|
+
return {
|
|
362
|
+
processing: _data.processing,
|
|
363
|
+
receipt: _data.receipt
|
|
364
|
+
};
|
|
365
|
+
});
|
|
366
|
+
});
|
|
367
|
+
};
|
|
368
|
+
|
|
369
|
+
this.smartRampWaitOrderConfirmation = (args, headers) => {
|
|
370
|
+
return this.fetch(this.url('SmartRampWaitOrderConfirmation'), createHTTPRequest(args, headers)).then(res => {
|
|
371
|
+
return buildResponse(res).then(_data => {
|
|
372
|
+
return {
|
|
373
|
+
done: _data.done,
|
|
374
|
+
receipt: _data.receipt
|
|
375
|
+
};
|
|
376
|
+
});
|
|
377
|
+
});
|
|
378
|
+
};
|
|
379
|
+
|
|
380
|
+
this.smartRampCheckCardAuthorization = (args, headers) => {
|
|
381
|
+
return this.fetch(this.url('SmartRampCheckCardAuthorization'), createHTTPRequest(args, headers)).then(res => {
|
|
382
|
+
return buildResponse(res).then(_data => {
|
|
383
|
+
return {
|
|
384
|
+
cardAuth: _data.cardAuth
|
|
385
|
+
};
|
|
386
|
+
});
|
|
387
|
+
});
|
|
388
|
+
};
|
|
389
|
+
|
|
390
|
+
this.smartRampSubmitCardAuthorization = (args, headers) => {
|
|
391
|
+
return this.fetch(this.url('SmartRampSubmitCardAuthorization'), createHTTPRequest(args, headers)).then(res => {
|
|
339
392
|
return buildResponse(res).then(_data => {
|
|
340
393
|
return {
|
|
341
394
|
status: _data.status
|
|
@@ -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 451d96d5692d65926fddc63c8a6912af960a3dd1
|
|
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,10 +36,20 @@ 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 = "451d96d5692d65926fddc63c8a6912af960a3dd1"; //
|
|
40
40
|
// Types
|
|
41
41
|
//
|
|
42
42
|
|
|
43
|
+
exports.SmartRampOrderStatus = void 0;
|
|
44
|
+
|
|
45
|
+
(function (SmartRampOrderStatus) {
|
|
46
|
+
SmartRampOrderStatus["UNKNOWN"] = "UNKNOWN";
|
|
47
|
+
SmartRampOrderStatus["RUNNING_CHECKS"] = "RUNNING_CHECKS";
|
|
48
|
+
SmartRampOrderStatus["PROCESSING"] = "PROCESSING";
|
|
49
|
+
SmartRampOrderStatus["FAILED"] = "FAILED";
|
|
50
|
+
SmartRampOrderStatus["COMPLETE"] = "COMPLETE";
|
|
51
|
+
})(exports.SmartRampOrderStatus || (exports.SmartRampOrderStatus = {}));
|
|
52
|
+
|
|
43
53
|
exports.SortOrder = void 0;
|
|
44
54
|
|
|
45
55
|
(function (SortOrder) {
|
|
@@ -334,8 +344,51 @@ class API {
|
|
|
334
344
|
});
|
|
335
345
|
};
|
|
336
346
|
|
|
347
|
+
this.smartRampQuote = (args, headers) => {
|
|
348
|
+
return this.fetch(this.url('SmartRampQuote'), createHTTPRequest(args, headers)).then(res => {
|
|
349
|
+
return buildResponse(res).then(_data => {
|
|
350
|
+
return {
|
|
351
|
+
status: _data.status,
|
|
352
|
+
quoteDetails: _data.quoteDetails
|
|
353
|
+
};
|
|
354
|
+
});
|
|
355
|
+
});
|
|
356
|
+
};
|
|
357
|
+
|
|
337
358
|
this.smartRampPurchase = (args, headers) => {
|
|
338
359
|
return this.fetch(this.url('SmartRampPurchase'), createHTTPRequest(args, headers)).then(res => {
|
|
360
|
+
return buildResponse(res).then(_data => {
|
|
361
|
+
return {
|
|
362
|
+
processing: _data.processing,
|
|
363
|
+
receipt: _data.receipt
|
|
364
|
+
};
|
|
365
|
+
});
|
|
366
|
+
});
|
|
367
|
+
};
|
|
368
|
+
|
|
369
|
+
this.smartRampWaitOrderConfirmation = (args, headers) => {
|
|
370
|
+
return this.fetch(this.url('SmartRampWaitOrderConfirmation'), createHTTPRequest(args, headers)).then(res => {
|
|
371
|
+
return buildResponse(res).then(_data => {
|
|
372
|
+
return {
|
|
373
|
+
done: _data.done,
|
|
374
|
+
receipt: _data.receipt
|
|
375
|
+
};
|
|
376
|
+
});
|
|
377
|
+
});
|
|
378
|
+
};
|
|
379
|
+
|
|
380
|
+
this.smartRampCheckCardAuthorization = (args, headers) => {
|
|
381
|
+
return this.fetch(this.url('SmartRampCheckCardAuthorization'), createHTTPRequest(args, headers)).then(res => {
|
|
382
|
+
return buildResponse(res).then(_data => {
|
|
383
|
+
return {
|
|
384
|
+
cardAuth: _data.cardAuth
|
|
385
|
+
};
|
|
386
|
+
});
|
|
387
|
+
});
|
|
388
|
+
};
|
|
389
|
+
|
|
390
|
+
this.smartRampSubmitCardAuthorization = (args, headers) => {
|
|
391
|
+
return this.fetch(this.url('SmartRampSubmitCardAuthorization'), createHTTPRequest(args, headers)).then(res => {
|
|
339
392
|
return buildResponse(res).then(_data => {
|
|
340
393
|
return {
|
|
341
394
|
status: _data.status
|
|
@@ -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 451d96d5692d65926fddc63c8a6912af960a3dd1
|
|
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,10 +28,20 @@ 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 = "451d96d5692d65926fddc63c8a6912af960a3dd1"; //
|
|
32
32
|
// Types
|
|
33
33
|
//
|
|
34
34
|
|
|
35
|
+
let SmartRampOrderStatus;
|
|
36
|
+
|
|
37
|
+
(function (SmartRampOrderStatus) {
|
|
38
|
+
SmartRampOrderStatus["UNKNOWN"] = "UNKNOWN";
|
|
39
|
+
SmartRampOrderStatus["RUNNING_CHECKS"] = "RUNNING_CHECKS";
|
|
40
|
+
SmartRampOrderStatus["PROCESSING"] = "PROCESSING";
|
|
41
|
+
SmartRampOrderStatus["FAILED"] = "FAILED";
|
|
42
|
+
SmartRampOrderStatus["COMPLETE"] = "COMPLETE";
|
|
43
|
+
})(SmartRampOrderStatus || (SmartRampOrderStatus = {}));
|
|
44
|
+
|
|
35
45
|
let SortOrder;
|
|
36
46
|
|
|
37
47
|
(function (SortOrder) {
|
|
@@ -326,8 +336,51 @@ class API {
|
|
|
326
336
|
});
|
|
327
337
|
};
|
|
328
338
|
|
|
339
|
+
this.smartRampQuote = (args, headers) => {
|
|
340
|
+
return this.fetch(this.url('SmartRampQuote'), createHTTPRequest(args, headers)).then(res => {
|
|
341
|
+
return buildResponse(res).then(_data => {
|
|
342
|
+
return {
|
|
343
|
+
status: _data.status,
|
|
344
|
+
quoteDetails: _data.quoteDetails
|
|
345
|
+
};
|
|
346
|
+
});
|
|
347
|
+
});
|
|
348
|
+
};
|
|
349
|
+
|
|
329
350
|
this.smartRampPurchase = (args, headers) => {
|
|
330
351
|
return this.fetch(this.url('SmartRampPurchase'), createHTTPRequest(args, headers)).then(res => {
|
|
352
|
+
return buildResponse(res).then(_data => {
|
|
353
|
+
return {
|
|
354
|
+
processing: _data.processing,
|
|
355
|
+
receipt: _data.receipt
|
|
356
|
+
};
|
|
357
|
+
});
|
|
358
|
+
});
|
|
359
|
+
};
|
|
360
|
+
|
|
361
|
+
this.smartRampWaitOrderConfirmation = (args, headers) => {
|
|
362
|
+
return this.fetch(this.url('SmartRampWaitOrderConfirmation'), createHTTPRequest(args, headers)).then(res => {
|
|
363
|
+
return buildResponse(res).then(_data => {
|
|
364
|
+
return {
|
|
365
|
+
done: _data.done,
|
|
366
|
+
receipt: _data.receipt
|
|
367
|
+
};
|
|
368
|
+
});
|
|
369
|
+
});
|
|
370
|
+
};
|
|
371
|
+
|
|
372
|
+
this.smartRampCheckCardAuthorization = (args, headers) => {
|
|
373
|
+
return this.fetch(this.url('SmartRampCheckCardAuthorization'), createHTTPRequest(args, headers)).then(res => {
|
|
374
|
+
return buildResponse(res).then(_data => {
|
|
375
|
+
return {
|
|
376
|
+
cardAuth: _data.cardAuth
|
|
377
|
+
};
|
|
378
|
+
});
|
|
379
|
+
});
|
|
380
|
+
};
|
|
381
|
+
|
|
382
|
+
this.smartRampSubmitCardAuthorization = (args, headers) => {
|
|
383
|
+
return this.fetch(this.url('SmartRampSubmitCardAuthorization'), createHTTPRequest(args, headers)).then(res => {
|
|
331
384
|
return buildResponse(res).then(_data => {
|
|
332
385
|
return {
|
|
333
386
|
status: _data.status
|
|
@@ -442,4 +495,4 @@ class SequenceAPIClient extends API {
|
|
|
442
495
|
|
|
443
496
|
}
|
|
444
497
|
|
|
445
|
-
export { API, SequenceAPIClient, SortOrder, WebRPCSchemaHash, WebRPCSchemaVersion, WebRPCVersion };
|
|
498
|
+
export { API, SequenceAPIClient, SmartRampOrderStatus, SortOrder, WebRPCSchemaHash, WebRPCSchemaVersion, WebRPCVersion };
|
|
@@ -1,6 +1,13 @@
|
|
|
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 = "451d96d5692d65926fddc63c8a6912af960a3dd1";
|
|
4
|
+
export declare enum SmartRampOrderStatus {
|
|
5
|
+
UNKNOWN = "UNKNOWN",
|
|
6
|
+
RUNNING_CHECKS = "RUNNING_CHECKS",
|
|
7
|
+
PROCESSING = "PROCESSING",
|
|
8
|
+
FAILED = "FAILED",
|
|
9
|
+
COMPLETE = "COMPLETE"
|
|
10
|
+
}
|
|
4
11
|
export declare enum SortOrder {
|
|
5
12
|
DESC = "DESC",
|
|
6
13
|
ASC = "ASC"
|
|
@@ -99,19 +106,6 @@ export interface UserStorage {
|
|
|
99
106
|
key: string;
|
|
100
107
|
value: any;
|
|
101
108
|
}
|
|
102
|
-
export interface Page {
|
|
103
|
-
pageSize?: number;
|
|
104
|
-
page?: number;
|
|
105
|
-
totalRecords?: number;
|
|
106
|
-
column?: string;
|
|
107
|
-
before?: any;
|
|
108
|
-
after?: any;
|
|
109
|
-
sort?: Array<SortBy>;
|
|
110
|
-
}
|
|
111
|
-
export interface SortBy {
|
|
112
|
-
column: string;
|
|
113
|
-
order: SortOrder;
|
|
114
|
-
}
|
|
115
109
|
export interface Token {
|
|
116
110
|
chainId: number;
|
|
117
111
|
contractAddress: string;
|
|
@@ -152,12 +146,85 @@ export interface PayCard {
|
|
|
152
146
|
contactCityToken: string;
|
|
153
147
|
contactProvinceToken: string;
|
|
154
148
|
contactPostalCodeToken: string;
|
|
155
|
-
|
|
156
|
-
|
|
149
|
+
contactCountryCode: string;
|
|
150
|
+
contactEmail: string;
|
|
157
151
|
contactPhoneToken: string;
|
|
158
152
|
updatedAt?: string;
|
|
159
153
|
createdAt?: string;
|
|
160
154
|
}
|
|
155
|
+
export interface SmartRampQuoteRequest {
|
|
156
|
+
countryCode: string;
|
|
157
|
+
niftyswapContractAddress: string;
|
|
158
|
+
tokenIds: Array<number>;
|
|
159
|
+
tokensBoughtAmounts: Array<number>;
|
|
160
|
+
maxCurrency: number;
|
|
161
|
+
}
|
|
162
|
+
export interface SmartRampQuoteDetails {
|
|
163
|
+
quoteId: string;
|
|
164
|
+
smartScriptId: string;
|
|
165
|
+
quoteRequest: SmartRampQuoteRequest;
|
|
166
|
+
recipientAddress: string;
|
|
167
|
+
purchaseAmount: number;
|
|
168
|
+
purchaseFees: number;
|
|
169
|
+
purchaseTotal: number;
|
|
170
|
+
sourceCurrency: string;
|
|
171
|
+
destCurrency: string;
|
|
172
|
+
}
|
|
173
|
+
export interface SmartRampPurchaseReceipt {
|
|
174
|
+
orderId: string;
|
|
175
|
+
quoteId: string;
|
|
176
|
+
smartScriptId: string;
|
|
177
|
+
createdAt: string;
|
|
178
|
+
status: SmartRampOrderStatus;
|
|
179
|
+
authCodesRequested: boolean;
|
|
180
|
+
authCodesSubmitted: boolean;
|
|
181
|
+
sourceCurrency: string;
|
|
182
|
+
purchaseAmount: number;
|
|
183
|
+
purchaseFees: number;
|
|
184
|
+
purchaseTotal: number;
|
|
185
|
+
}
|
|
186
|
+
export interface SmartRampOrder {
|
|
187
|
+
id: number;
|
|
188
|
+
userAddress: string;
|
|
189
|
+
contractAddress: string;
|
|
190
|
+
payCardId: number;
|
|
191
|
+
orderId: string;
|
|
192
|
+
quoteId: string;
|
|
193
|
+
status: SmartRampOrderStatus;
|
|
194
|
+
authCodesRequested: boolean;
|
|
195
|
+
authCodesSubmitted: boolean;
|
|
196
|
+
countryCode: string;
|
|
197
|
+
email: string;
|
|
198
|
+
sourceCurrency: string;
|
|
199
|
+
destCurrency: string;
|
|
200
|
+
purchaseAmount: number;
|
|
201
|
+
purchaseFees: number;
|
|
202
|
+
purchaseTotal: number;
|
|
203
|
+
smartScriptParams: {
|
|
204
|
+
[key: string]: any;
|
|
205
|
+
};
|
|
206
|
+
updatedAt?: string;
|
|
207
|
+
createdAt?: string;
|
|
208
|
+
}
|
|
209
|
+
export interface PayCardAuth {
|
|
210
|
+
orderId: string;
|
|
211
|
+
smsNeeded: boolean;
|
|
212
|
+
card2faNeeded: boolean;
|
|
213
|
+
authorization3dsUrl: string;
|
|
214
|
+
}
|
|
215
|
+
export interface Page {
|
|
216
|
+
pageSize?: number;
|
|
217
|
+
page?: number;
|
|
218
|
+
totalRecords?: number;
|
|
219
|
+
column?: string;
|
|
220
|
+
before?: any;
|
|
221
|
+
after?: any;
|
|
222
|
+
sort?: Array<SortBy>;
|
|
223
|
+
}
|
|
224
|
+
export interface SortBy {
|
|
225
|
+
column: string;
|
|
226
|
+
order: SortOrder;
|
|
227
|
+
}
|
|
161
228
|
export interface API {
|
|
162
229
|
ping(headers?: object): Promise<PingReturn>;
|
|
163
230
|
version(headers?: object): Promise<VersionReturn>;
|
|
@@ -186,7 +253,11 @@ export interface API {
|
|
|
186
253
|
listPayCardsOnFile(headers?: object): Promise<ListPayCardsOnFileReturn>;
|
|
187
254
|
savePayCard(args: SavePayCardArgs, headers?: object): Promise<SavePayCardReturn>;
|
|
188
255
|
deletePayCard(args: DeletePayCardArgs, headers?: object): Promise<DeletePayCardReturn>;
|
|
256
|
+
smartRampQuote(args: SmartRampQuoteArgs, headers?: object): Promise<SmartRampQuoteReturn>;
|
|
189
257
|
smartRampPurchase(args: SmartRampPurchaseArgs, headers?: object): Promise<SmartRampPurchaseReturn>;
|
|
258
|
+
smartRampWaitOrderConfirmation(args: SmartRampWaitOrderConfirmationArgs, headers?: object): Promise<SmartRampWaitOrderConfirmationReturn>;
|
|
259
|
+
smartRampCheckCardAuthorization(args: SmartRampCheckCardAuthorizationArgs, headers?: object): Promise<SmartRampCheckCardAuthorizationReturn>;
|
|
260
|
+
smartRampSubmitCardAuthorization(args: SmartRampSubmitCardAuthorizationArgs, headers?: object): Promise<SmartRampSubmitCardAuthorizationReturn>;
|
|
190
261
|
getInviteInfo(headers?: object): Promise<GetInviteInfoReturn>;
|
|
191
262
|
isValidAccessCode(args: IsValidAccessCodeArgs, headers?: object): Promise<IsValidAccessCodeReturn>;
|
|
192
263
|
internalClaimAccessCode(args: InternalClaimAccessCodeArgs, headers?: object): Promise<InternalClaimAccessCodeReturn>;
|
|
@@ -369,11 +440,40 @@ export interface DeletePayCardArgs {
|
|
|
369
440
|
export interface DeletePayCardReturn {
|
|
370
441
|
ok: boolean;
|
|
371
442
|
}
|
|
443
|
+
export interface SmartRampQuoteArgs {
|
|
444
|
+
quoteRequest: SmartRampQuoteRequest;
|
|
445
|
+
}
|
|
446
|
+
export interface SmartRampQuoteReturn {
|
|
447
|
+
status: boolean;
|
|
448
|
+
quoteDetails: SmartRampQuoteDetails;
|
|
449
|
+
}
|
|
372
450
|
export interface SmartRampPurchaseArgs {
|
|
451
|
+
quoteDetails: SmartRampQuoteDetails;
|
|
373
452
|
payCardId: number;
|
|
374
|
-
payload: any;
|
|
375
453
|
}
|
|
376
454
|
export interface SmartRampPurchaseReturn {
|
|
455
|
+
processing: boolean;
|
|
456
|
+
receipt: SmartRampPurchaseReceipt;
|
|
457
|
+
}
|
|
458
|
+
export interface SmartRampWaitOrderConfirmationArgs {
|
|
459
|
+
orderId: string;
|
|
460
|
+
}
|
|
461
|
+
export interface SmartRampWaitOrderConfirmationReturn {
|
|
462
|
+
done: boolean;
|
|
463
|
+
receipt: SmartRampPurchaseReceipt;
|
|
464
|
+
}
|
|
465
|
+
export interface SmartRampCheckCardAuthorizationArgs {
|
|
466
|
+
orderId: string;
|
|
467
|
+
}
|
|
468
|
+
export interface SmartRampCheckCardAuthorizationReturn {
|
|
469
|
+
cardAuth: PayCardAuth;
|
|
470
|
+
}
|
|
471
|
+
export interface SmartRampSubmitCardAuthorizationArgs {
|
|
472
|
+
orderId: string;
|
|
473
|
+
sms?: string;
|
|
474
|
+
card2fa?: string;
|
|
475
|
+
}
|
|
476
|
+
export interface SmartRampSubmitCardAuthorizationReturn {
|
|
377
477
|
status: boolean;
|
|
378
478
|
}
|
|
379
479
|
export interface GetInviteInfoArgs {
|
|
@@ -434,7 +534,11 @@ export declare class API implements API {
|
|
|
434
534
|
listPayCardsOnFile: (headers?: object | undefined) => Promise<ListPayCardsOnFileReturn>;
|
|
435
535
|
savePayCard: (args: SavePayCardArgs, headers?: object | undefined) => Promise<SavePayCardReturn>;
|
|
436
536
|
deletePayCard: (args: DeletePayCardArgs, headers?: object | undefined) => Promise<DeletePayCardReturn>;
|
|
537
|
+
smartRampQuote: (args: SmartRampQuoteArgs, headers?: object | undefined) => Promise<SmartRampQuoteReturn>;
|
|
437
538
|
smartRampPurchase: (args: SmartRampPurchaseArgs, headers?: object | undefined) => Promise<SmartRampPurchaseReturn>;
|
|
539
|
+
smartRampWaitOrderConfirmation: (args: SmartRampWaitOrderConfirmationArgs, headers?: object | undefined) => Promise<SmartRampWaitOrderConfirmationReturn>;
|
|
540
|
+
smartRampCheckCardAuthorization: (args: SmartRampCheckCardAuthorizationArgs, headers?: object | undefined) => Promise<SmartRampCheckCardAuthorizationReturn>;
|
|
541
|
+
smartRampSubmitCardAuthorization: (args: SmartRampSubmitCardAuthorizationArgs, headers?: object | undefined) => Promise<SmartRampSubmitCardAuthorizationReturn>;
|
|
438
542
|
getInviteInfo: (headers?: object | undefined) => Promise<GetInviteInfoReturn>;
|
|
439
543
|
isValidAccessCode: (args: IsValidAccessCodeArgs, headers?: object | undefined) => Promise<IsValidAccessCodeReturn>;
|
|
440
544
|
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 451d96d5692d65926fddc63c8a6912af960a3dd1
|
|
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,12 +11,20 @@ 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 = "451d96d5692d65926fddc63c8a6912af960a3dd1"
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
//
|
|
18
18
|
// Types
|
|
19
19
|
//
|
|
20
|
+
export enum SmartRampOrderStatus {
|
|
21
|
+
UNKNOWN = 'UNKNOWN',
|
|
22
|
+
RUNNING_CHECKS = 'RUNNING_CHECKS',
|
|
23
|
+
PROCESSING = 'PROCESSING',
|
|
24
|
+
FAILED = 'FAILED',
|
|
25
|
+
COMPLETE = 'COMPLETE'
|
|
26
|
+
}
|
|
27
|
+
|
|
20
28
|
export enum SortOrder {
|
|
21
29
|
DESC = 'DESC',
|
|
22
30
|
ASC = 'ASC'
|
|
@@ -135,21 +143,6 @@ export interface UserStorage {
|
|
|
135
143
|
value: any
|
|
136
144
|
}
|
|
137
145
|
|
|
138
|
-
export interface Page {
|
|
139
|
-
pageSize?: number
|
|
140
|
-
page?: number
|
|
141
|
-
totalRecords?: number
|
|
142
|
-
column?: string
|
|
143
|
-
before?: any
|
|
144
|
-
after?: any
|
|
145
|
-
sort?: Array<SortBy>
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
export interface SortBy {
|
|
149
|
-
column: string
|
|
150
|
-
order: SortOrder
|
|
151
|
-
}
|
|
152
|
-
|
|
153
146
|
export interface Token {
|
|
154
147
|
chainId: number
|
|
155
148
|
contractAddress: string
|
|
@@ -194,13 +187,91 @@ export interface PayCard {
|
|
|
194
187
|
contactCityToken: string
|
|
195
188
|
contactProvinceToken: string
|
|
196
189
|
contactPostalCodeToken: string
|
|
197
|
-
|
|
198
|
-
|
|
190
|
+
contactCountryCode: string
|
|
191
|
+
contactEmail: string
|
|
199
192
|
contactPhoneToken: string
|
|
200
193
|
updatedAt?: string
|
|
201
194
|
createdAt?: string
|
|
202
195
|
}
|
|
203
196
|
|
|
197
|
+
export interface SmartRampQuoteRequest {
|
|
198
|
+
countryCode: string
|
|
199
|
+
niftyswapContractAddress: string
|
|
200
|
+
tokenIds: Array<number>
|
|
201
|
+
tokensBoughtAmounts: Array<number>
|
|
202
|
+
maxCurrency: number
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
export interface SmartRampQuoteDetails {
|
|
206
|
+
quoteId: string
|
|
207
|
+
smartScriptId: string
|
|
208
|
+
quoteRequest: SmartRampQuoteRequest
|
|
209
|
+
recipientAddress: string
|
|
210
|
+
purchaseAmount: number
|
|
211
|
+
purchaseFees: number
|
|
212
|
+
purchaseTotal: number
|
|
213
|
+
sourceCurrency: string
|
|
214
|
+
destCurrency: string
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
export interface SmartRampPurchaseReceipt {
|
|
218
|
+
orderId: string
|
|
219
|
+
quoteId: string
|
|
220
|
+
smartScriptId: string
|
|
221
|
+
createdAt: string
|
|
222
|
+
status: SmartRampOrderStatus
|
|
223
|
+
authCodesRequested: boolean
|
|
224
|
+
authCodesSubmitted: boolean
|
|
225
|
+
sourceCurrency: string
|
|
226
|
+
purchaseAmount: number
|
|
227
|
+
purchaseFees: number
|
|
228
|
+
purchaseTotal: number
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
export interface SmartRampOrder {
|
|
232
|
+
id: number
|
|
233
|
+
userAddress: string
|
|
234
|
+
contractAddress: string
|
|
235
|
+
payCardId: number
|
|
236
|
+
orderId: string
|
|
237
|
+
quoteId: string
|
|
238
|
+
status: SmartRampOrderStatus
|
|
239
|
+
authCodesRequested: boolean
|
|
240
|
+
authCodesSubmitted: boolean
|
|
241
|
+
countryCode: string
|
|
242
|
+
email: string
|
|
243
|
+
sourceCurrency: string
|
|
244
|
+
destCurrency: string
|
|
245
|
+
purchaseAmount: number
|
|
246
|
+
purchaseFees: number
|
|
247
|
+
purchaseTotal: number
|
|
248
|
+
smartScriptParams: {[key: string]: any}
|
|
249
|
+
updatedAt?: string
|
|
250
|
+
createdAt?: string
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
export interface PayCardAuth {
|
|
254
|
+
orderId: string
|
|
255
|
+
smsNeeded: boolean
|
|
256
|
+
card2faNeeded: boolean
|
|
257
|
+
authorization3dsUrl: string
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
export interface Page {
|
|
261
|
+
pageSize?: number
|
|
262
|
+
page?: number
|
|
263
|
+
totalRecords?: number
|
|
264
|
+
column?: string
|
|
265
|
+
before?: any
|
|
266
|
+
after?: any
|
|
267
|
+
sort?: Array<SortBy>
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
export interface SortBy {
|
|
271
|
+
column: string
|
|
272
|
+
order: SortOrder
|
|
273
|
+
}
|
|
274
|
+
|
|
204
275
|
export interface API {
|
|
205
276
|
ping(headers?: object): Promise<PingReturn>
|
|
206
277
|
version(headers?: object): Promise<VersionReturn>
|
|
@@ -229,7 +300,11 @@ export interface API {
|
|
|
229
300
|
listPayCardsOnFile(headers?: object): Promise<ListPayCardsOnFileReturn>
|
|
230
301
|
savePayCard(args: SavePayCardArgs, headers?: object): Promise<SavePayCardReturn>
|
|
231
302
|
deletePayCard(args: DeletePayCardArgs, headers?: object): Promise<DeletePayCardReturn>
|
|
303
|
+
smartRampQuote(args: SmartRampQuoteArgs, headers?: object): Promise<SmartRampQuoteReturn>
|
|
232
304
|
smartRampPurchase(args: SmartRampPurchaseArgs, headers?: object): Promise<SmartRampPurchaseReturn>
|
|
305
|
+
smartRampWaitOrderConfirmation(args: SmartRampWaitOrderConfirmationArgs, headers?: object): Promise<SmartRampWaitOrderConfirmationReturn>
|
|
306
|
+
smartRampCheckCardAuthorization(args: SmartRampCheckCardAuthorizationArgs, headers?: object): Promise<SmartRampCheckCardAuthorizationReturn>
|
|
307
|
+
smartRampSubmitCardAuthorization(args: SmartRampSubmitCardAuthorizationArgs, headers?: object): Promise<SmartRampSubmitCardAuthorizationReturn>
|
|
233
308
|
getInviteInfo(headers?: object): Promise<GetInviteInfoReturn>
|
|
234
309
|
isValidAccessCode(args: IsValidAccessCodeArgs, headers?: object): Promise<IsValidAccessCodeReturn>
|
|
235
310
|
internalClaimAccessCode(args: InternalClaimAccessCodeArgs, headers?: object): Promise<InternalClaimAccessCodeReturn>
|
|
@@ -438,12 +513,45 @@ export interface DeletePayCardArgs {
|
|
|
438
513
|
export interface DeletePayCardReturn {
|
|
439
514
|
ok: boolean
|
|
440
515
|
}
|
|
516
|
+
export interface SmartRampQuoteArgs {
|
|
517
|
+
quoteRequest: SmartRampQuoteRequest
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
export interface SmartRampQuoteReturn {
|
|
521
|
+
status: boolean
|
|
522
|
+
quoteDetails: SmartRampQuoteDetails
|
|
523
|
+
}
|
|
441
524
|
export interface SmartRampPurchaseArgs {
|
|
525
|
+
quoteDetails: SmartRampQuoteDetails
|
|
442
526
|
payCardId: number
|
|
443
|
-
payload: any
|
|
444
527
|
}
|
|
445
528
|
|
|
446
529
|
export interface SmartRampPurchaseReturn {
|
|
530
|
+
processing: boolean
|
|
531
|
+
receipt: SmartRampPurchaseReceipt
|
|
532
|
+
}
|
|
533
|
+
export interface SmartRampWaitOrderConfirmationArgs {
|
|
534
|
+
orderId: string
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
export interface SmartRampWaitOrderConfirmationReturn {
|
|
538
|
+
done: boolean
|
|
539
|
+
receipt: SmartRampPurchaseReceipt
|
|
540
|
+
}
|
|
541
|
+
export interface SmartRampCheckCardAuthorizationArgs {
|
|
542
|
+
orderId: string
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
export interface SmartRampCheckCardAuthorizationReturn {
|
|
546
|
+
cardAuth: PayCardAuth
|
|
547
|
+
}
|
|
548
|
+
export interface SmartRampSubmitCardAuthorizationArgs {
|
|
549
|
+
orderId: string
|
|
550
|
+
sms?: string
|
|
551
|
+
card2fa?: string
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
export interface SmartRampSubmitCardAuthorizationReturn {
|
|
447
555
|
status: boolean
|
|
448
556
|
}
|
|
449
557
|
export interface GetInviteInfoArgs {
|
|
@@ -832,10 +940,61 @@ export class API implements API {
|
|
|
832
940
|
})
|
|
833
941
|
}
|
|
834
942
|
|
|
943
|
+
smartRampQuote = (args: SmartRampQuoteArgs, headers?: object): Promise<SmartRampQuoteReturn> => {
|
|
944
|
+
return this.fetch(
|
|
945
|
+
this.url('SmartRampQuote'),
|
|
946
|
+
createHTTPRequest(args, headers)).then((res) => {
|
|
947
|
+
return buildResponse(res).then(_data => {
|
|
948
|
+
return {
|
|
949
|
+
status: <boolean>(_data.status),
|
|
950
|
+
quoteDetails: <SmartRampQuoteDetails>(_data.quoteDetails)
|
|
951
|
+
}
|
|
952
|
+
})
|
|
953
|
+
})
|
|
954
|
+
}
|
|
955
|
+
|
|
835
956
|
smartRampPurchase = (args: SmartRampPurchaseArgs, headers?: object): Promise<SmartRampPurchaseReturn> => {
|
|
836
957
|
return this.fetch(
|
|
837
958
|
this.url('SmartRampPurchase'),
|
|
838
959
|
createHTTPRequest(args, headers)).then((res) => {
|
|
960
|
+
return buildResponse(res).then(_data => {
|
|
961
|
+
return {
|
|
962
|
+
processing: <boolean>(_data.processing),
|
|
963
|
+
receipt: <SmartRampPurchaseReceipt>(_data.receipt)
|
|
964
|
+
}
|
|
965
|
+
})
|
|
966
|
+
})
|
|
967
|
+
}
|
|
968
|
+
|
|
969
|
+
smartRampWaitOrderConfirmation = (args: SmartRampWaitOrderConfirmationArgs, headers?: object): Promise<SmartRampWaitOrderConfirmationReturn> => {
|
|
970
|
+
return this.fetch(
|
|
971
|
+
this.url('SmartRampWaitOrderConfirmation'),
|
|
972
|
+
createHTTPRequest(args, headers)).then((res) => {
|
|
973
|
+
return buildResponse(res).then(_data => {
|
|
974
|
+
return {
|
|
975
|
+
done: <boolean>(_data.done),
|
|
976
|
+
receipt: <SmartRampPurchaseReceipt>(_data.receipt)
|
|
977
|
+
}
|
|
978
|
+
})
|
|
979
|
+
})
|
|
980
|
+
}
|
|
981
|
+
|
|
982
|
+
smartRampCheckCardAuthorization = (args: SmartRampCheckCardAuthorizationArgs, headers?: object): Promise<SmartRampCheckCardAuthorizationReturn> => {
|
|
983
|
+
return this.fetch(
|
|
984
|
+
this.url('SmartRampCheckCardAuthorization'),
|
|
985
|
+
createHTTPRequest(args, headers)).then((res) => {
|
|
986
|
+
return buildResponse(res).then(_data => {
|
|
987
|
+
return {
|
|
988
|
+
cardAuth: <PayCardAuth>(_data.cardAuth)
|
|
989
|
+
}
|
|
990
|
+
})
|
|
991
|
+
})
|
|
992
|
+
}
|
|
993
|
+
|
|
994
|
+
smartRampSubmitCardAuthorization = (args: SmartRampSubmitCardAuthorizationArgs, headers?: object): Promise<SmartRampSubmitCardAuthorizationReturn> => {
|
|
995
|
+
return this.fetch(
|
|
996
|
+
this.url('SmartRampSubmitCardAuthorization'),
|
|
997
|
+
createHTTPRequest(args, headers)).then((res) => {
|
|
839
998
|
return buildResponse(res).then(_data => {
|
|
840
999
|
return {
|
|
841
1000
|
status: <boolean>(_data.status)
|