@0xsequence/api 0.0.0-20220610134843 → 0.0.0-20220614152529

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.
@@ -27,7 +27,7 @@ function _extends() {
27
27
  }
28
28
 
29
29
  /* eslint-disable */
30
- // sequence-api v0.4.0 4d2479b7b4da1f3902a2593f729835aa16931146
30
+ // sequence-api v0.4.0 66d659733b35a2641cff5288ee4c48dc14adce64
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 = "4d2479b7b4da1f3902a2593f729835aa16931146"; //
39
+ const WebRPCSchemaHash = "66d659733b35a2641cff5288ee4c48dc14adce64"; //
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) {
@@ -303,6 +313,90 @@ class API {
303
313
  });
304
314
  };
305
315
 
316
+ this.listPayCardsOnFile = headers => {
317
+ return this.fetch(this.url('ListPayCardsOnFile'), createHTTPRequest({}, headers)).then(res => {
318
+ return buildResponse(res).then(_data => {
319
+ return {
320
+ payCards: _data.payCards
321
+ };
322
+ });
323
+ });
324
+ };
325
+
326
+ this.savePayCard = (args, headers) => {
327
+ return this.fetch(this.url('SavePayCard'), createHTTPRequest(args, headers)).then(res => {
328
+ return buildResponse(res).then(_data => {
329
+ return {
330
+ ok: _data.ok,
331
+ payCard: _data.payCard
332
+ };
333
+ });
334
+ });
335
+ };
336
+
337
+ this.deletePayCard = (args, headers) => {
338
+ return this.fetch(this.url('DeletePayCard'), createHTTPRequest(args, headers)).then(res => {
339
+ return buildResponse(res).then(_data => {
340
+ return {
341
+ ok: _data.ok
342
+ };
343
+ });
344
+ });
345
+ };
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
+
358
+ this.smartRampPurchase = (args, headers) => {
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 => {
392
+ return buildResponse(res).then(_data => {
393
+ return {
394
+ status: _data.status
395
+ };
396
+ });
397
+ });
398
+ };
399
+
306
400
  this.getInviteInfo = headers => {
307
401
  return this.fetch(this.url('GetInviteInfo'), createHTTPRequest({}, headers)).then(res => {
308
402
  return buildResponse(res).then(_data => {
@@ -27,7 +27,7 @@ function _extends() {
27
27
  }
28
28
 
29
29
  /* eslint-disable */
30
- // sequence-api v0.4.0 4d2479b7b4da1f3902a2593f729835aa16931146
30
+ // sequence-api v0.4.0 66d659733b35a2641cff5288ee4c48dc14adce64
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 = "4d2479b7b4da1f3902a2593f729835aa16931146"; //
39
+ const WebRPCSchemaHash = "66d659733b35a2641cff5288ee4c48dc14adce64"; //
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) {
@@ -303,6 +313,90 @@ class API {
303
313
  });
304
314
  };
305
315
 
316
+ this.listPayCardsOnFile = headers => {
317
+ return this.fetch(this.url('ListPayCardsOnFile'), createHTTPRequest({}, headers)).then(res => {
318
+ return buildResponse(res).then(_data => {
319
+ return {
320
+ payCards: _data.payCards
321
+ };
322
+ });
323
+ });
324
+ };
325
+
326
+ this.savePayCard = (args, headers) => {
327
+ return this.fetch(this.url('SavePayCard'), createHTTPRequest(args, headers)).then(res => {
328
+ return buildResponse(res).then(_data => {
329
+ return {
330
+ ok: _data.ok,
331
+ payCard: _data.payCard
332
+ };
333
+ });
334
+ });
335
+ };
336
+
337
+ this.deletePayCard = (args, headers) => {
338
+ return this.fetch(this.url('DeletePayCard'), createHTTPRequest(args, headers)).then(res => {
339
+ return buildResponse(res).then(_data => {
340
+ return {
341
+ ok: _data.ok
342
+ };
343
+ });
344
+ });
345
+ };
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
+
358
+ this.smartRampPurchase = (args, headers) => {
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 => {
392
+ return buildResponse(res).then(_data => {
393
+ return {
394
+ status: _data.status
395
+ };
396
+ });
397
+ });
398
+ };
399
+
306
400
  this.getInviteInfo = headers => {
307
401
  return this.fetch(this.url('GetInviteInfo'), createHTTPRequest({}, headers)).then(res => {
308
402
  return buildResponse(res).then(_data => {
@@ -19,7 +19,7 @@ function _extends() {
19
19
  }
20
20
 
21
21
  /* eslint-disable */
22
- // sequence-api v0.4.0 4d2479b7b4da1f3902a2593f729835aa16931146
22
+ // sequence-api v0.4.0 66d659733b35a2641cff5288ee4c48dc14adce64
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 = "4d2479b7b4da1f3902a2593f729835aa16931146"; //
31
+ const WebRPCSchemaHash = "66d659733b35a2641cff5288ee4c48dc14adce64"; //
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) {
@@ -295,6 +305,90 @@ class API {
295
305
  });
296
306
  };
297
307
 
308
+ this.listPayCardsOnFile = headers => {
309
+ return this.fetch(this.url('ListPayCardsOnFile'), createHTTPRequest({}, headers)).then(res => {
310
+ return buildResponse(res).then(_data => {
311
+ return {
312
+ payCards: _data.payCards
313
+ };
314
+ });
315
+ });
316
+ };
317
+
318
+ this.savePayCard = (args, headers) => {
319
+ return this.fetch(this.url('SavePayCard'), createHTTPRequest(args, headers)).then(res => {
320
+ return buildResponse(res).then(_data => {
321
+ return {
322
+ ok: _data.ok,
323
+ payCard: _data.payCard
324
+ };
325
+ });
326
+ });
327
+ };
328
+
329
+ this.deletePayCard = (args, headers) => {
330
+ return this.fetch(this.url('DeletePayCard'), createHTTPRequest(args, headers)).then(res => {
331
+ return buildResponse(res).then(_data => {
332
+ return {
333
+ ok: _data.ok
334
+ };
335
+ });
336
+ });
337
+ };
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
+
350
+ this.smartRampPurchase = (args, headers) => {
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 => {
384
+ return buildResponse(res).then(_data => {
385
+ return {
386
+ status: _data.status
387
+ };
388
+ });
389
+ });
390
+ };
391
+
298
392
  this.getInviteInfo = headers => {
299
393
  return this.fetch(this.url('GetInviteInfo'), createHTTPRequest({}, headers)).then(res => {
300
394
  return buildResponse(res).then(_data => {
@@ -401,4 +495,4 @@ class SequenceAPIClient extends API {
401
495
 
402
496
  }
403
497
 
404
- 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 = "4d2479b7b4da1f3902a2593f729835aa16931146";
3
+ export declare const WebRPCSchemaHash = "66d659733b35a2641cff5288ee4c48dc14adce64";
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;
@@ -137,6 +131,76 @@ export interface ExchangeRate {
137
131
  vsCurrency: string;
138
132
  currencyType: string;
139
133
  }
134
+ export interface PayCard {
135
+ id: number;
136
+ userAddress: string;
137
+ cardType: string;
138
+ cardFirstName: string;
139
+ cardLastName: string;
140
+ cardNumberLastFourDigits: string;
141
+ cardNumberToken: string;
142
+ cardCVCToken: string;
143
+ cardExpMonth: number;
144
+ cardExpYear: number;
145
+ contactAddressToken: string;
146
+ contactCityToken: string;
147
+ contactProvinceToken: string;
148
+ contactPostalCodeToken: string;
149
+ contactCountryCode: string;
150
+ contactEmail: string;
151
+ contactPhoneToken: string;
152
+ updatedAt?: string;
153
+ createdAt?: string;
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
+ sourceCurrency: string;
181
+ purchaseAmount: number;
182
+ purchaseFees: number;
183
+ purchaseTotal: number;
184
+ }
185
+ export interface PayCardAuth {
186
+ orderId: string;
187
+ smsNeeded: boolean;
188
+ card2faNeeded: boolean;
189
+ authorization3dsUrl: string;
190
+ }
191
+ export interface Page {
192
+ pageSize?: number;
193
+ page?: number;
194
+ totalRecords?: number;
195
+ column?: string;
196
+ before?: any;
197
+ after?: any;
198
+ sort?: Array<SortBy>;
199
+ }
200
+ export interface SortBy {
201
+ column: string;
202
+ order: SortOrder;
203
+ }
140
204
  export interface API {
141
205
  ping(headers?: object): Promise<PingReturn>;
142
206
  version(headers?: object): Promise<VersionReturn>;
@@ -162,6 +226,14 @@ export interface API {
162
226
  getCoinPrices(args: GetCoinPricesArgs, headers?: object): Promise<GetCoinPricesReturn>;
163
227
  getCollectiblePrices(args: GetCollectiblePricesArgs, headers?: object): Promise<GetCollectiblePricesReturn>;
164
228
  getExchangeRate(args: GetExchangeRateArgs, headers?: object): Promise<GetExchangeRateReturn>;
229
+ listPayCardsOnFile(headers?: object): Promise<ListPayCardsOnFileReturn>;
230
+ savePayCard(args: SavePayCardArgs, headers?: object): Promise<SavePayCardReturn>;
231
+ deletePayCard(args: DeletePayCardArgs, headers?: object): Promise<DeletePayCardReturn>;
232
+ smartRampQuote(args: SmartRampQuoteArgs, headers?: object): Promise<SmartRampQuoteReturn>;
233
+ smartRampPurchase(args: SmartRampPurchaseArgs, headers?: object): Promise<SmartRampPurchaseReturn>;
234
+ smartRampWaitOrderConfirmation(args: SmartRampWaitOrderConfirmationArgs, headers?: object): Promise<SmartRampWaitOrderConfirmationReturn>;
235
+ smartRampCheckCardAuthorization(args: SmartRampCheckCardAuthorizationArgs, headers?: object): Promise<SmartRampCheckCardAuthorizationReturn>;
236
+ smartRampSubmitCardAuthorization(args: SmartRampSubmitCardAuthorizationArgs, headers?: object): Promise<SmartRampSubmitCardAuthorizationReturn>;
165
237
  getInviteInfo(headers?: object): Promise<GetInviteInfoReturn>;
166
238
  isValidAccessCode(args: IsValidAccessCodeArgs, headers?: object): Promise<IsValidAccessCodeReturn>;
167
239
  internalClaimAccessCode(args: InternalClaimAccessCodeArgs, headers?: object): Promise<InternalClaimAccessCodeReturn>;
@@ -326,6 +398,60 @@ export interface GetExchangeRateArgs {
326
398
  export interface GetExchangeRateReturn {
327
399
  exchangeRate: ExchangeRate;
328
400
  }
401
+ export interface ListPayCardsOnFileArgs {
402
+ }
403
+ export interface ListPayCardsOnFileReturn {
404
+ payCards: Array<PayCard>;
405
+ }
406
+ export interface SavePayCardArgs {
407
+ payCard: PayCard;
408
+ }
409
+ export interface SavePayCardReturn {
410
+ ok: boolean;
411
+ payCard: PayCard;
412
+ }
413
+ export interface DeletePayCardArgs {
414
+ payCardId: number;
415
+ }
416
+ export interface DeletePayCardReturn {
417
+ ok: boolean;
418
+ }
419
+ export interface SmartRampQuoteArgs {
420
+ quoteRequest: SmartRampQuoteRequest;
421
+ }
422
+ export interface SmartRampQuoteReturn {
423
+ status: boolean;
424
+ quoteDetails: SmartRampQuoteDetails;
425
+ }
426
+ export interface SmartRampPurchaseArgs {
427
+ quoteDetails: SmartRampQuoteDetails;
428
+ payCardId: number;
429
+ }
430
+ export interface SmartRampPurchaseReturn {
431
+ processing: boolean;
432
+ receipt: SmartRampPurchaseReceipt;
433
+ }
434
+ export interface SmartRampWaitOrderConfirmationArgs {
435
+ orderId: string;
436
+ }
437
+ export interface SmartRampWaitOrderConfirmationReturn {
438
+ done: boolean;
439
+ receipt: SmartRampPurchaseReceipt;
440
+ }
441
+ export interface SmartRampCheckCardAuthorizationArgs {
442
+ orderId: string;
443
+ }
444
+ export interface SmartRampCheckCardAuthorizationReturn {
445
+ cardAuth: PayCardAuth;
446
+ }
447
+ export interface SmartRampSubmitCardAuthorizationArgs {
448
+ orderId: string;
449
+ sms?: string;
450
+ card2fa?: string;
451
+ }
452
+ export interface SmartRampSubmitCardAuthorizationReturn {
453
+ status: boolean;
454
+ }
329
455
  export interface GetInviteInfoArgs {
330
456
  }
331
457
  export interface GetInviteInfoReturn {
@@ -381,6 +507,14 @@ export declare class API implements API {
381
507
  getCoinPrices: (args: GetCoinPricesArgs, headers?: object | undefined) => Promise<GetCoinPricesReturn>;
382
508
  getCollectiblePrices: (args: GetCollectiblePricesArgs, headers?: object | undefined) => Promise<GetCollectiblePricesReturn>;
383
509
  getExchangeRate: (args: GetExchangeRateArgs, headers?: object | undefined) => Promise<GetExchangeRateReturn>;
510
+ listPayCardsOnFile: (headers?: object | undefined) => Promise<ListPayCardsOnFileReturn>;
511
+ savePayCard: (args: SavePayCardArgs, headers?: object | undefined) => Promise<SavePayCardReturn>;
512
+ deletePayCard: (args: DeletePayCardArgs, headers?: object | undefined) => Promise<DeletePayCardReturn>;
513
+ smartRampQuote: (args: SmartRampQuoteArgs, headers?: object | undefined) => Promise<SmartRampQuoteReturn>;
514
+ smartRampPurchase: (args: SmartRampPurchaseArgs, headers?: object | undefined) => Promise<SmartRampPurchaseReturn>;
515
+ smartRampWaitOrderConfirmation: (args: SmartRampWaitOrderConfirmationArgs, headers?: object | undefined) => Promise<SmartRampWaitOrderConfirmationReturn>;
516
+ smartRampCheckCardAuthorization: (args: SmartRampCheckCardAuthorizationArgs, headers?: object | undefined) => Promise<SmartRampCheckCardAuthorizationReturn>;
517
+ smartRampSubmitCardAuthorization: (args: SmartRampSubmitCardAuthorizationArgs, headers?: object | undefined) => Promise<SmartRampSubmitCardAuthorizationReturn>;
384
518
  getInviteInfo: (headers?: object | undefined) => Promise<GetInviteInfoReturn>;
385
519
  isValidAccessCode: (args: IsValidAccessCodeArgs, headers?: object | undefined) => Promise<IsValidAccessCodeReturn>;
386
520
  internalClaimAccessCode: (args: InternalClaimAccessCodeArgs, headers?: object | undefined) => Promise<InternalClaimAccessCodeReturn>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0xsequence/api",
3
- "version": "0.0.0-20220610134843",
3
+ "version": "0.0.0-20220614152529",
4
4
  "description": "api sub-package for Sequence",
5
5
  "repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/api",
6
6
  "source": "src/index.ts",
package/src/api.gen.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable */
2
- // sequence-api v0.4.0 4d2479b7b4da1f3902a2593f729835aa16931146
2
+ // sequence-api v0.4.0 66d659733b35a2641cff5288ee4c48dc14adce64
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 = "4d2479b7b4da1f3902a2593f729835aa16931146"
14
+ export const WebRPCSchemaHash = "66d659733b35a2641cff5288ee4c48dc14adce64"
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
@@ -179,6 +172,83 @@ export interface ExchangeRate {
179
172
  currencyType: string
180
173
  }
181
174
 
175
+ export interface PayCard {
176
+ id: number
177
+ userAddress: string
178
+ cardType: string
179
+ cardFirstName: string
180
+ cardLastName: string
181
+ cardNumberLastFourDigits: string
182
+ cardNumberToken: string
183
+ cardCVCToken: string
184
+ cardExpMonth: number
185
+ cardExpYear: number
186
+ contactAddressToken: string
187
+ contactCityToken: string
188
+ contactProvinceToken: string
189
+ contactPostalCodeToken: string
190
+ contactCountryCode: string
191
+ contactEmail: string
192
+ contactPhoneToken: string
193
+ updatedAt?: string
194
+ createdAt?: string
195
+ }
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
+ sourceCurrency: string
225
+ purchaseAmount: number
226
+ purchaseFees: number
227
+ purchaseTotal: number
228
+ }
229
+
230
+ export interface PayCardAuth {
231
+ orderId: string
232
+ smsNeeded: boolean
233
+ card2faNeeded: boolean
234
+ authorization3dsUrl: string
235
+ }
236
+
237
+ export interface Page {
238
+ pageSize?: number
239
+ page?: number
240
+ totalRecords?: number
241
+ column?: string
242
+ before?: any
243
+ after?: any
244
+ sort?: Array<SortBy>
245
+ }
246
+
247
+ export interface SortBy {
248
+ column: string
249
+ order: SortOrder
250
+ }
251
+
182
252
  export interface API {
183
253
  ping(headers?: object): Promise<PingReturn>
184
254
  version(headers?: object): Promise<VersionReturn>
@@ -204,6 +274,14 @@ export interface API {
204
274
  getCoinPrices(args: GetCoinPricesArgs, headers?: object): Promise<GetCoinPricesReturn>
205
275
  getCollectiblePrices(args: GetCollectiblePricesArgs, headers?: object): Promise<GetCollectiblePricesReturn>
206
276
  getExchangeRate(args: GetExchangeRateArgs, headers?: object): Promise<GetExchangeRateReturn>
277
+ listPayCardsOnFile(headers?: object): Promise<ListPayCardsOnFileReturn>
278
+ savePayCard(args: SavePayCardArgs, headers?: object): Promise<SavePayCardReturn>
279
+ deletePayCard(args: DeletePayCardArgs, headers?: object): Promise<DeletePayCardReturn>
280
+ smartRampQuote(args: SmartRampQuoteArgs, headers?: object): Promise<SmartRampQuoteReturn>
281
+ smartRampPurchase(args: SmartRampPurchaseArgs, headers?: object): Promise<SmartRampPurchaseReturn>
282
+ smartRampWaitOrderConfirmation(args: SmartRampWaitOrderConfirmationArgs, headers?: object): Promise<SmartRampWaitOrderConfirmationReturn>
283
+ smartRampCheckCardAuthorization(args: SmartRampCheckCardAuthorizationArgs, headers?: object): Promise<SmartRampCheckCardAuthorizationReturn>
284
+ smartRampSubmitCardAuthorization(args: SmartRampSubmitCardAuthorizationArgs, headers?: object): Promise<SmartRampSubmitCardAuthorizationReturn>
207
285
  getInviteInfo(headers?: object): Promise<GetInviteInfoReturn>
208
286
  isValidAccessCode(args: IsValidAccessCodeArgs, headers?: object): Promise<IsValidAccessCodeReturn>
209
287
  internalClaimAccessCode(args: InternalClaimAccessCodeArgs, headers?: object): Promise<InternalClaimAccessCodeReturn>
@@ -391,6 +469,68 @@ export interface GetExchangeRateArgs {
391
469
  export interface GetExchangeRateReturn {
392
470
  exchangeRate: ExchangeRate
393
471
  }
472
+ export interface ListPayCardsOnFileArgs {
473
+ }
474
+
475
+ export interface ListPayCardsOnFileReturn {
476
+ payCards: Array<PayCard>
477
+ }
478
+ export interface SavePayCardArgs {
479
+ payCard: PayCard
480
+ }
481
+
482
+ export interface SavePayCardReturn {
483
+ ok: boolean
484
+ payCard: PayCard
485
+ }
486
+ export interface DeletePayCardArgs {
487
+ payCardId: number
488
+ }
489
+
490
+ export interface DeletePayCardReturn {
491
+ ok: boolean
492
+ }
493
+ export interface SmartRampQuoteArgs {
494
+ quoteRequest: SmartRampQuoteRequest
495
+ }
496
+
497
+ export interface SmartRampQuoteReturn {
498
+ status: boolean
499
+ quoteDetails: SmartRampQuoteDetails
500
+ }
501
+ export interface SmartRampPurchaseArgs {
502
+ quoteDetails: SmartRampQuoteDetails
503
+ payCardId: number
504
+ }
505
+
506
+ export interface SmartRampPurchaseReturn {
507
+ processing: boolean
508
+ receipt: SmartRampPurchaseReceipt
509
+ }
510
+ export interface SmartRampWaitOrderConfirmationArgs {
511
+ orderId: string
512
+ }
513
+
514
+ export interface SmartRampWaitOrderConfirmationReturn {
515
+ done: boolean
516
+ receipt: SmartRampPurchaseReceipt
517
+ }
518
+ export interface SmartRampCheckCardAuthorizationArgs {
519
+ orderId: string
520
+ }
521
+
522
+ export interface SmartRampCheckCardAuthorizationReturn {
523
+ cardAuth: PayCardAuth
524
+ }
525
+ export interface SmartRampSubmitCardAuthorizationArgs {
526
+ orderId: string
527
+ sms?: string
528
+ card2fa?: string
529
+ }
530
+
531
+ export interface SmartRampSubmitCardAuthorizationReturn {
532
+ status: boolean
533
+ }
394
534
  export interface GetInviteInfoArgs {
395
535
  }
396
536
 
@@ -739,6 +879,107 @@ export class API implements API {
739
879
  })
740
880
  }
741
881
 
882
+ listPayCardsOnFile = (headers?: object): Promise<ListPayCardsOnFileReturn> => {
883
+ return this.fetch(
884
+ this.url('ListPayCardsOnFile'),
885
+ createHTTPRequest({}, headers)
886
+ ).then((res) => {
887
+ return buildResponse(res).then(_data => {
888
+ return {
889
+ payCards: <Array<PayCard>>(_data.payCards)
890
+ }
891
+ })
892
+ })
893
+ }
894
+
895
+ savePayCard = (args: SavePayCardArgs, headers?: object): Promise<SavePayCardReturn> => {
896
+ return this.fetch(
897
+ this.url('SavePayCard'),
898
+ createHTTPRequest(args, headers)).then((res) => {
899
+ return buildResponse(res).then(_data => {
900
+ return {
901
+ ok: <boolean>(_data.ok),
902
+ payCard: <PayCard>(_data.payCard)
903
+ }
904
+ })
905
+ })
906
+ }
907
+
908
+ deletePayCard = (args: DeletePayCardArgs, headers?: object): Promise<DeletePayCardReturn> => {
909
+ return this.fetch(
910
+ this.url('DeletePayCard'),
911
+ createHTTPRequest(args, headers)).then((res) => {
912
+ return buildResponse(res).then(_data => {
913
+ return {
914
+ ok: <boolean>(_data.ok)
915
+ }
916
+ })
917
+ })
918
+ }
919
+
920
+ smartRampQuote = (args: SmartRampQuoteArgs, headers?: object): Promise<SmartRampQuoteReturn> => {
921
+ return this.fetch(
922
+ this.url('SmartRampQuote'),
923
+ createHTTPRequest(args, headers)).then((res) => {
924
+ return buildResponse(res).then(_data => {
925
+ return {
926
+ status: <boolean>(_data.status),
927
+ quoteDetails: <SmartRampQuoteDetails>(_data.quoteDetails)
928
+ }
929
+ })
930
+ })
931
+ }
932
+
933
+ smartRampPurchase = (args: SmartRampPurchaseArgs, headers?: object): Promise<SmartRampPurchaseReturn> => {
934
+ return this.fetch(
935
+ this.url('SmartRampPurchase'),
936
+ createHTTPRequest(args, headers)).then((res) => {
937
+ return buildResponse(res).then(_data => {
938
+ return {
939
+ processing: <boolean>(_data.processing),
940
+ receipt: <SmartRampPurchaseReceipt>(_data.receipt)
941
+ }
942
+ })
943
+ })
944
+ }
945
+
946
+ smartRampWaitOrderConfirmation = (args: SmartRampWaitOrderConfirmationArgs, headers?: object): Promise<SmartRampWaitOrderConfirmationReturn> => {
947
+ return this.fetch(
948
+ this.url('SmartRampWaitOrderConfirmation'),
949
+ createHTTPRequest(args, headers)).then((res) => {
950
+ return buildResponse(res).then(_data => {
951
+ return {
952
+ done: <boolean>(_data.done),
953
+ receipt: <SmartRampPurchaseReceipt>(_data.receipt)
954
+ }
955
+ })
956
+ })
957
+ }
958
+
959
+ smartRampCheckCardAuthorization = (args: SmartRampCheckCardAuthorizationArgs, headers?: object): Promise<SmartRampCheckCardAuthorizationReturn> => {
960
+ return this.fetch(
961
+ this.url('SmartRampCheckCardAuthorization'),
962
+ createHTTPRequest(args, headers)).then((res) => {
963
+ return buildResponse(res).then(_data => {
964
+ return {
965
+ cardAuth: <PayCardAuth>(_data.cardAuth)
966
+ }
967
+ })
968
+ })
969
+ }
970
+
971
+ smartRampSubmitCardAuthorization = (args: SmartRampSubmitCardAuthorizationArgs, headers?: object): Promise<SmartRampSubmitCardAuthorizationReturn> => {
972
+ return this.fetch(
973
+ this.url('SmartRampSubmitCardAuthorization'),
974
+ createHTTPRequest(args, headers)).then((res) => {
975
+ return buildResponse(res).then(_data => {
976
+ return {
977
+ status: <boolean>(_data.status)
978
+ }
979
+ })
980
+ })
981
+ }
982
+
742
983
  getInviteInfo = (headers?: object): Promise<GetInviteInfoReturn> => {
743
984
  return this.fetch(
744
985
  this.url('GetInviteInfo'),