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

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 66d659733b35a2641cff5288ee4c48dc14adce64
30
+ // sequence-api v0.4.0 0c98657bfb21e8e57f1bb78d93f2aaba08865d82
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 = "66d659733b35a2641cff5288ee4c48dc14adce64"; //
39
+ const WebRPCSchemaHash = "0c98657bfb21e8e57f1bb78d93f2aaba08865d82"; //
40
40
  // Types
41
41
  //
42
42
 
@@ -313,6 +313,14 @@ class API {
313
313
  });
314
314
  };
315
315
 
316
+ this.invalidateOriginToken = (args, headers) => {
317
+ return this.fetch(this.url('InvalidateOriginToken'), createHTTPRequest(args, headers)).then(res => {
318
+ return buildResponse(res).then(_data => {
319
+ return {};
320
+ });
321
+ });
322
+ };
323
+
316
324
  this.listPayCardsOnFile = headers => {
317
325
  return this.fetch(this.url('ListPayCardsOnFile'), createHTTPRequest({}, headers)).then(res => {
318
326
  return buildResponse(res).then(_data => {
@@ -334,6 +342,16 @@ class API {
334
342
  });
335
343
  };
336
344
 
345
+ this.updatePayCardCVC = (args, headers) => {
346
+ return this.fetch(this.url('UpdatePayCardCVC'), createHTTPRequest(args, headers)).then(res => {
347
+ return buildResponse(res).then(_data => {
348
+ return {
349
+ ok: _data.ok
350
+ };
351
+ });
352
+ });
353
+ };
354
+
337
355
  this.deletePayCard = (args, headers) => {
338
356
  return this.fetch(this.url('DeletePayCard'), createHTTPRequest(args, headers)).then(res => {
339
357
  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 66d659733b35a2641cff5288ee4c48dc14adce64
30
+ // sequence-api v0.4.0 0c98657bfb21e8e57f1bb78d93f2aaba08865d82
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 = "66d659733b35a2641cff5288ee4c48dc14adce64"; //
39
+ const WebRPCSchemaHash = "0c98657bfb21e8e57f1bb78d93f2aaba08865d82"; //
40
40
  // Types
41
41
  //
42
42
 
@@ -313,6 +313,14 @@ class API {
313
313
  });
314
314
  };
315
315
 
316
+ this.invalidateOriginToken = (args, headers) => {
317
+ return this.fetch(this.url('InvalidateOriginToken'), createHTTPRequest(args, headers)).then(res => {
318
+ return buildResponse(res).then(_data => {
319
+ return {};
320
+ });
321
+ });
322
+ };
323
+
316
324
  this.listPayCardsOnFile = headers => {
317
325
  return this.fetch(this.url('ListPayCardsOnFile'), createHTTPRequest({}, headers)).then(res => {
318
326
  return buildResponse(res).then(_data => {
@@ -334,6 +342,16 @@ class API {
334
342
  });
335
343
  };
336
344
 
345
+ this.updatePayCardCVC = (args, headers) => {
346
+ return this.fetch(this.url('UpdatePayCardCVC'), createHTTPRequest(args, headers)).then(res => {
347
+ return buildResponse(res).then(_data => {
348
+ return {
349
+ ok: _data.ok
350
+ };
351
+ });
352
+ });
353
+ };
354
+
337
355
  this.deletePayCard = (args, headers) => {
338
356
  return this.fetch(this.url('DeletePayCard'), createHTTPRequest(args, headers)).then(res => {
339
357
  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 66d659733b35a2641cff5288ee4c48dc14adce64
22
+ // sequence-api v0.4.0 0c98657bfb21e8e57f1bb78d93f2aaba08865d82
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 = "66d659733b35a2641cff5288ee4c48dc14adce64"; //
31
+ const WebRPCSchemaHash = "0c98657bfb21e8e57f1bb78d93f2aaba08865d82"; //
32
32
  // Types
33
33
  //
34
34
 
@@ -305,6 +305,14 @@ class API {
305
305
  });
306
306
  };
307
307
 
308
+ this.invalidateOriginToken = (args, headers) => {
309
+ return this.fetch(this.url('InvalidateOriginToken'), createHTTPRequest(args, headers)).then(res => {
310
+ return buildResponse(res).then(_data => {
311
+ return {};
312
+ });
313
+ });
314
+ };
315
+
308
316
  this.listPayCardsOnFile = headers => {
309
317
  return this.fetch(this.url('ListPayCardsOnFile'), createHTTPRequest({}, headers)).then(res => {
310
318
  return buildResponse(res).then(_data => {
@@ -326,6 +334,16 @@ class API {
326
334
  });
327
335
  };
328
336
 
337
+ this.updatePayCardCVC = (args, headers) => {
338
+ return this.fetch(this.url('UpdatePayCardCVC'), createHTTPRequest(args, headers)).then(res => {
339
+ return buildResponse(res).then(_data => {
340
+ return {
341
+ ok: _data.ok
342
+ };
343
+ });
344
+ });
345
+ };
346
+
329
347
  this.deletePayCard = (args, headers) => {
330
348
  return this.fetch(this.url('DeletePayCard'), createHTTPRequest(args, headers)).then(res => {
331
349
  return buildResponse(res).then(_data => {
@@ -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 = "66d659733b35a2641cff5288ee4c48dc14adce64";
3
+ export declare const WebRPCSchemaHash = "0c98657bfb21e8e57f1bb78d93f2aaba08865d82";
4
4
  export declare enum SmartRampOrderStatus {
5
5
  UNKNOWN = "UNKNOWN",
6
6
  RUNNING_CHECKS = "RUNNING_CHECKS",
@@ -155,9 +155,11 @@ export interface PayCard {
155
155
  export interface SmartRampQuoteRequest {
156
156
  countryCode: string;
157
157
  niftyswapContractAddress: string;
158
- tokenIds: Array<number>;
159
- tokensBoughtAmounts: Array<number>;
158
+ tokenIds: Array<string>;
159
+ tokensBoughtAmounts: Array<string>;
160
160
  maxCurrency: number;
161
+ extraFeeRecipients?: Array<string>;
162
+ extraFeeAmounts?: Array<string>;
161
163
  }
162
164
  export interface SmartRampQuoteDetails {
163
165
  quoteId: string;
@@ -169,6 +171,8 @@ export interface SmartRampQuoteDetails {
169
171
  purchaseTotal: number;
170
172
  sourceCurrency: string;
171
173
  destCurrency: string;
174
+ createdAt: string;
175
+ expiresAt: string;
172
176
  }
173
177
  export interface SmartRampPurchaseReceipt {
174
178
  orderId: string;
@@ -177,10 +181,34 @@ export interface SmartRampPurchaseReceipt {
177
181
  createdAt: string;
178
182
  status: SmartRampOrderStatus;
179
183
  authCodesRequested: boolean;
184
+ authCodesSubmitted: boolean;
185
+ sourceCurrency: string;
186
+ purchaseAmount: number;
187
+ purchaseFees: number;
188
+ purchaseTotal: number;
189
+ }
190
+ export interface SmartRampOrder {
191
+ id: number;
192
+ userAddress: string;
193
+ contractAddress: string;
194
+ payCardId: number;
195
+ orderId: string;
196
+ quoteId: string;
197
+ status: SmartRampOrderStatus;
198
+ authCodesRequested: boolean;
199
+ authCodesSubmitted: boolean;
200
+ countryCode: string;
201
+ email: string;
180
202
  sourceCurrency: string;
203
+ destCurrency: string;
181
204
  purchaseAmount: number;
182
205
  purchaseFees: number;
183
206
  purchaseTotal: number;
207
+ smartScriptParams: {
208
+ [key: string]: any;
209
+ };
210
+ updatedAt?: string;
211
+ createdAt?: string;
184
212
  }
185
213
  export interface PayCardAuth {
186
214
  orderId: string;
@@ -226,8 +254,10 @@ export interface API {
226
254
  getCoinPrices(args: GetCoinPricesArgs, headers?: object): Promise<GetCoinPricesReturn>;
227
255
  getCollectiblePrices(args: GetCollectiblePricesArgs, headers?: object): Promise<GetCollectiblePricesReturn>;
228
256
  getExchangeRate(args: GetExchangeRateArgs, headers?: object): Promise<GetExchangeRateReturn>;
257
+ invalidateOriginToken(args: InvalidateOriginTokenArgs, headers?: object): Promise<InvalidateOriginTokenReturn>;
229
258
  listPayCardsOnFile(headers?: object): Promise<ListPayCardsOnFileReturn>;
230
259
  savePayCard(args: SavePayCardArgs, headers?: object): Promise<SavePayCardReturn>;
260
+ updatePayCardCVC(args: UpdatePayCardCVCArgs, headers?: object): Promise<UpdatePayCardCVCReturn>;
231
261
  deletePayCard(args: DeletePayCardArgs, headers?: object): Promise<DeletePayCardReturn>;
232
262
  smartRampQuote(args: SmartRampQuoteArgs, headers?: object): Promise<SmartRampQuoteReturn>;
233
263
  smartRampPurchase(args: SmartRampPurchaseArgs, headers?: object): Promise<SmartRampPurchaseReturn>;
@@ -398,6 +428,11 @@ export interface GetExchangeRateArgs {
398
428
  export interface GetExchangeRateReturn {
399
429
  exchangeRate: ExchangeRate;
400
430
  }
431
+ export interface InvalidateOriginTokenArgs {
432
+ token: Token;
433
+ }
434
+ export interface InvalidateOriginTokenReturn {
435
+ }
401
436
  export interface ListPayCardsOnFileArgs {
402
437
  }
403
438
  export interface ListPayCardsOnFileReturn {
@@ -410,6 +445,13 @@ export interface SavePayCardReturn {
410
445
  ok: boolean;
411
446
  payCard: PayCard;
412
447
  }
448
+ export interface UpdatePayCardCVCArgs {
449
+ payCardId: number;
450
+ payCardCVC: string;
451
+ }
452
+ export interface UpdatePayCardCVCReturn {
453
+ ok: boolean;
454
+ }
413
455
  export interface DeletePayCardArgs {
414
456
  payCardId: number;
415
457
  }
@@ -426,6 +468,7 @@ export interface SmartRampQuoteReturn {
426
468
  export interface SmartRampPurchaseArgs {
427
469
  quoteDetails: SmartRampQuoteDetails;
428
470
  payCardId: number;
471
+ payCardCVC?: string;
429
472
  }
430
473
  export interface SmartRampPurchaseReturn {
431
474
  processing: boolean;
@@ -507,8 +550,10 @@ export declare class API implements API {
507
550
  getCoinPrices: (args: GetCoinPricesArgs, headers?: object | undefined) => Promise<GetCoinPricesReturn>;
508
551
  getCollectiblePrices: (args: GetCollectiblePricesArgs, headers?: object | undefined) => Promise<GetCollectiblePricesReturn>;
509
552
  getExchangeRate: (args: GetExchangeRateArgs, headers?: object | undefined) => Promise<GetExchangeRateReturn>;
553
+ invalidateOriginToken: (args: InvalidateOriginTokenArgs, headers?: object | undefined) => Promise<InvalidateOriginTokenReturn>;
510
554
  listPayCardsOnFile: (headers?: object | undefined) => Promise<ListPayCardsOnFileReturn>;
511
555
  savePayCard: (args: SavePayCardArgs, headers?: object | undefined) => Promise<SavePayCardReturn>;
556
+ updatePayCardCVC: (args: UpdatePayCardCVCArgs, headers?: object | undefined) => Promise<UpdatePayCardCVCReturn>;
512
557
  deletePayCard: (args: DeletePayCardArgs, headers?: object | undefined) => Promise<DeletePayCardReturn>;
513
558
  smartRampQuote: (args: SmartRampQuoteArgs, headers?: object | undefined) => Promise<SmartRampQuoteReturn>;
514
559
  smartRampPurchase: (args: SmartRampPurchaseArgs, headers?: object | undefined) => Promise<SmartRampPurchaseReturn>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0xsequence/api",
3
- "version": "0.0.0-20220614152529",
3
+ "version": "0.0.0-20220630211555",
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 66d659733b35a2641cff5288ee4c48dc14adce64
2
+ // sequence-api v0.4.0 0c98657bfb21e8e57f1bb78d93f2aaba08865d82
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 = "66d659733b35a2641cff5288ee4c48dc14adce64"
14
+ export const WebRPCSchemaHash = "0c98657bfb21e8e57f1bb78d93f2aaba08865d82"
15
15
 
16
16
 
17
17
  //
@@ -197,9 +197,11 @@ export interface PayCard {
197
197
  export interface SmartRampQuoteRequest {
198
198
  countryCode: string
199
199
  niftyswapContractAddress: string
200
- tokenIds: Array<number>
201
- tokensBoughtAmounts: Array<number>
200
+ tokenIds: Array<string>
201
+ tokensBoughtAmounts: Array<string>
202
202
  maxCurrency: number
203
+ extraFeeRecipients?: Array<string>
204
+ extraFeeAmounts?: Array<string>
203
205
  }
204
206
 
205
207
  export interface SmartRampQuoteDetails {
@@ -212,6 +214,8 @@ export interface SmartRampQuoteDetails {
212
214
  purchaseTotal: number
213
215
  sourceCurrency: string
214
216
  destCurrency: string
217
+ createdAt: string
218
+ expiresAt: string
215
219
  }
216
220
 
217
221
  export interface SmartRampPurchaseReceipt {
@@ -221,10 +225,33 @@ export interface SmartRampPurchaseReceipt {
221
225
  createdAt: string
222
226
  status: SmartRampOrderStatus
223
227
  authCodesRequested: boolean
228
+ authCodesSubmitted: boolean
229
+ sourceCurrency: string
230
+ purchaseAmount: number
231
+ purchaseFees: number
232
+ purchaseTotal: number
233
+ }
234
+
235
+ export interface SmartRampOrder {
236
+ id: number
237
+ userAddress: string
238
+ contractAddress: string
239
+ payCardId: number
240
+ orderId: string
241
+ quoteId: string
242
+ status: SmartRampOrderStatus
243
+ authCodesRequested: boolean
244
+ authCodesSubmitted: boolean
245
+ countryCode: string
246
+ email: string
224
247
  sourceCurrency: string
248
+ destCurrency: string
225
249
  purchaseAmount: number
226
250
  purchaseFees: number
227
251
  purchaseTotal: number
252
+ smartScriptParams: {[key: string]: any}
253
+ updatedAt?: string
254
+ createdAt?: string
228
255
  }
229
256
 
230
257
  export interface PayCardAuth {
@@ -274,8 +301,10 @@ export interface API {
274
301
  getCoinPrices(args: GetCoinPricesArgs, headers?: object): Promise<GetCoinPricesReturn>
275
302
  getCollectiblePrices(args: GetCollectiblePricesArgs, headers?: object): Promise<GetCollectiblePricesReturn>
276
303
  getExchangeRate(args: GetExchangeRateArgs, headers?: object): Promise<GetExchangeRateReturn>
304
+ invalidateOriginToken(args: InvalidateOriginTokenArgs, headers?: object): Promise<InvalidateOriginTokenReturn>
277
305
  listPayCardsOnFile(headers?: object): Promise<ListPayCardsOnFileReturn>
278
306
  savePayCard(args: SavePayCardArgs, headers?: object): Promise<SavePayCardReturn>
307
+ updatePayCardCVC(args: UpdatePayCardCVCArgs, headers?: object): Promise<UpdatePayCardCVCReturn>
279
308
  deletePayCard(args: DeletePayCardArgs, headers?: object): Promise<DeletePayCardReturn>
280
309
  smartRampQuote(args: SmartRampQuoteArgs, headers?: object): Promise<SmartRampQuoteReturn>
281
310
  smartRampPurchase(args: SmartRampPurchaseArgs, headers?: object): Promise<SmartRampPurchaseReturn>
@@ -469,6 +498,12 @@ export interface GetExchangeRateArgs {
469
498
  export interface GetExchangeRateReturn {
470
499
  exchangeRate: ExchangeRate
471
500
  }
501
+ export interface InvalidateOriginTokenArgs {
502
+ token: Token
503
+ }
504
+
505
+ export interface InvalidateOriginTokenReturn {
506
+ }
472
507
  export interface ListPayCardsOnFileArgs {
473
508
  }
474
509
 
@@ -483,6 +518,14 @@ export interface SavePayCardReturn {
483
518
  ok: boolean
484
519
  payCard: PayCard
485
520
  }
521
+ export interface UpdatePayCardCVCArgs {
522
+ payCardId: number
523
+ payCardCVC: string
524
+ }
525
+
526
+ export interface UpdatePayCardCVCReturn {
527
+ ok: boolean
528
+ }
486
529
  export interface DeletePayCardArgs {
487
530
  payCardId: number
488
531
  }
@@ -501,6 +544,7 @@ export interface SmartRampQuoteReturn {
501
544
  export interface SmartRampPurchaseArgs {
502
545
  quoteDetails: SmartRampQuoteDetails
503
546
  payCardId: number
547
+ payCardCVC?: string
504
548
  }
505
549
 
506
550
  export interface SmartRampPurchaseReturn {
@@ -879,6 +923,17 @@ export class API implements API {
879
923
  })
880
924
  }
881
925
 
926
+ invalidateOriginToken = (args: InvalidateOriginTokenArgs, headers?: object): Promise<InvalidateOriginTokenReturn> => {
927
+ return this.fetch(
928
+ this.url('InvalidateOriginToken'),
929
+ createHTTPRequest(args, headers)).then((res) => {
930
+ return buildResponse(res).then(_data => {
931
+ return {
932
+ }
933
+ })
934
+ })
935
+ }
936
+
882
937
  listPayCardsOnFile = (headers?: object): Promise<ListPayCardsOnFileReturn> => {
883
938
  return this.fetch(
884
939
  this.url('ListPayCardsOnFile'),
@@ -905,6 +960,18 @@ export class API implements API {
905
960
  })
906
961
  }
907
962
 
963
+ updatePayCardCVC = (args: UpdatePayCardCVCArgs, headers?: object): Promise<UpdatePayCardCVCReturn> => {
964
+ return this.fetch(
965
+ this.url('UpdatePayCardCVC'),
966
+ createHTTPRequest(args, headers)).then((res) => {
967
+ return buildResponse(res).then(_data => {
968
+ return {
969
+ ok: <boolean>(_data.ok)
970
+ }
971
+ })
972
+ })
973
+ }
974
+
908
975
  deletePayCard = (args: DeletePayCardArgs, headers?: object): Promise<DeletePayCardReturn> => {
909
976
  return this.fetch(
910
977
  this.url('DeletePayCard'),