@0xsequence/api 1.1.1 → 1.1.3

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/src/api.gen.ts CHANGED
@@ -6,13 +6,13 @@
6
6
  // webrpc-gen -schema=api.ridl -target=typescript@v0.10.0 -client -out=./clients/api.gen.ts
7
7
 
8
8
  // WebRPC description and code-gen version
9
- export const WebRPCVersion = "v1"
9
+ export const WebRPCVersion = 'v1'
10
10
 
11
11
  // Schema version of your RIDL schema
12
- export const WebRPCSchemaVersion = "v0.4.0"
12
+ export const WebRPCSchemaVersion = 'v0.4.0'
13
13
 
14
14
  // Schema hash generated from your RIDL schema
15
- export const WebRPCSchemaHash = "e4aaaf3a3c07a1f339226fcac3b8addcb3120c7b"
15
+ export const WebRPCSchemaHash = 'e4aaaf3a3c07a1f339226fcac3b8addcb3120c7b'
16
16
 
17
17
  //
18
18
  // Types
@@ -52,8 +52,7 @@ export interface RuntimeStatus {
52
52
  checks: RuntimeChecks
53
53
  }
54
54
 
55
- export interface RuntimeChecks {
56
- }
55
+ export interface RuntimeChecks {}
57
56
 
58
57
  export interface SequenceContext {
59
58
  factory: string
@@ -66,7 +65,7 @@ export interface SequenceContext {
66
65
  export interface User {
67
66
  address: string
68
67
  username: string
69
-
68
+
70
69
  avatar: string
71
70
  bio: string
72
71
  location: string
@@ -76,7 +75,6 @@ export interface User {
76
75
  maxInvites?: number
77
76
  updatedAt?: string
78
77
  createdAt?: string
79
-
80
78
  }
81
79
 
82
80
  export interface WalletBackup {
@@ -98,8 +96,6 @@ export interface Friend {
98
96
  }
99
97
 
100
98
  export interface InviteCode {
101
-
102
-
103
99
  usesLeft: number
104
100
  ownerAccount: string
105
101
  email?: string
@@ -109,7 +105,6 @@ export interface InviteCode {
109
105
  }
110
106
 
111
107
  export interface InviteCodeAccount {
112
-
113
108
  claimedByUserAddress: string
114
109
  claimedAt?: string
115
110
  }
@@ -259,7 +254,7 @@ export interface SmartRampOrder {
259
254
  purchaseAmount: number
260
255
  purchaseFees: number
261
256
  purchaseTotal: number
262
- smartScriptParams: {[key: string]: any}
257
+ smartScriptParams: { [key: string]: any }
263
258
  txnHash: string
264
259
  txnSuccessful: SmartRampTxnStatus
265
260
  updatedAt?: string
@@ -327,15 +322,30 @@ export interface API {
327
322
  deletePayCard(args: DeletePayCardArgs, headers?: object): Promise<DeletePayCardReturn>
328
323
  smartRampQuote(args: SmartRampQuoteArgs, headers?: object): Promise<SmartRampQuoteReturn>
329
324
  smartRampPurchase(args: SmartRampPurchaseArgs, headers?: object): Promise<SmartRampPurchaseReturn>
330
- smartRampWaitOrderConfirmation(args: SmartRampWaitOrderConfirmationArgs, headers?: object): Promise<SmartRampWaitOrderConfirmationReturn>
325
+ smartRampWaitOrderConfirmation(
326
+ args: SmartRampWaitOrderConfirmationArgs,
327
+ headers?: object
328
+ ): Promise<SmartRampWaitOrderConfirmationReturn>
331
329
  smartRampGetOrder(args: SmartRampGetOrderArgs, headers?: object): Promise<SmartRampGetOrderReturn>
332
- smartRampCheckCardAuthorization(args: SmartRampCheckCardAuthorizationArgs, headers?: object): Promise<SmartRampCheckCardAuthorizationReturn>
330
+ smartRampCheckCardAuthorization(
331
+ args: SmartRampCheckCardAuthorizationArgs,
332
+ headers?: object
333
+ ): Promise<SmartRampCheckCardAuthorizationReturn>
333
334
  smartRampOrdersList(args: SmartRampOrdersListArgs, headers?: object): Promise<SmartRampOrdersListReturn>
334
335
  smartRampGetOrderTxnHash(args: SmartRampGetOrderTxnHashArgs, headers?: object): Promise<SmartRampGetOrderTxnHashReturn>
335
- smartRampSubmitCardAuthorization(args: SmartRampSubmitCardAuthorizationArgs, headers?: object): Promise<SmartRampSubmitCardAuthorizationReturn>
336
+ smartRampSubmitCardAuthorization(
337
+ args: SmartRampSubmitCardAuthorizationArgs,
338
+ headers?: object
339
+ ): Promise<SmartRampSubmitCardAuthorizationReturn>
336
340
  adminSmartRampGetOrder(args: AdminSmartRampGetOrderArgs, headers?: object): Promise<AdminSmartRampGetOrderReturn>
337
- adminSmartRampListCompletedOrders(args: AdminSmartRampListCompletedOrdersArgs, headers?: object): Promise<AdminSmartRampListCompletedOrdersReturn>
338
- adminSmartRampListPendingOrders(args: AdminSmartRampListPendingOrdersArgs, headers?: object): Promise<AdminSmartRampListPendingOrdersReturn>
341
+ adminSmartRampListCompletedOrders(
342
+ args: AdminSmartRampListCompletedOrdersArgs,
343
+ headers?: object
344
+ ): Promise<AdminSmartRampListCompletedOrdersReturn>
345
+ adminSmartRampListPendingOrders(
346
+ args: AdminSmartRampListPendingOrdersArgs,
347
+ headers?: object
348
+ ): Promise<AdminSmartRampListPendingOrdersReturn>
339
349
  getInviteInfo(headers?: object): Promise<GetInviteInfoReturn>
340
350
  isValidAccessCode(args: IsValidAccessCodeArgs, headers?: object): Promise<IsValidAccessCodeReturn>
341
351
  internalClaimAccessCode(args: InternalClaimAccessCodeArgs, headers?: object): Promise<InternalClaimAccessCodeReturn>
@@ -345,29 +355,25 @@ export interface API {
345
355
  paperSessionSecret2(args: PaperSessionSecret2Args, headers?: object): Promise<PaperSessionSecret2Return>
346
356
  }
347
357
 
348
- export interface PingArgs {
349
- }
358
+ export interface PingArgs {}
350
359
 
351
360
  export interface PingReturn {
352
- status: boolean
353
- }
354
- export interface VersionArgs {
361
+ status: boolean
355
362
  }
363
+ export interface VersionArgs {}
356
364
 
357
365
  export interface VersionReturn {
358
- version: Version
359
- }
360
- export interface RuntimeStatusArgs {
366
+ version: Version
361
367
  }
368
+ export interface RuntimeStatusArgs {}
362
369
 
363
370
  export interface RuntimeStatusReturn {
364
- status: RuntimeStatus
365
- }
366
- export interface GetSequenceContextArgs {
371
+ status: RuntimeStatus
367
372
  }
373
+ export interface GetSequenceContextArgs {}
368
374
 
369
375
  export interface GetSequenceContextReturn {
370
- data: SequenceContext
376
+ data: SequenceContext
371
377
  }
372
378
  export interface GetAuthTokenArgs {
373
379
  ewtString: string
@@ -378,7 +384,7 @@ export interface GetAuthTokenReturn {
378
384
  status: boolean
379
385
  jwtToken: string
380
386
  address: string
381
- user?: User
387
+ user?: User
382
388
  }
383
389
  export interface SendPasswordlessLinkArgs {
384
390
  email: string
@@ -387,7 +393,7 @@ export interface SendPasswordlessLinkArgs {
387
393
  }
388
394
 
389
395
  export interface SendPasswordlessLinkReturn {
390
- status: boolean
396
+ status: boolean
391
397
  }
392
398
  export interface FriendListArgs {
393
399
  page?: Page
@@ -395,7 +401,7 @@ export interface FriendListArgs {
395
401
 
396
402
  export interface FriendListReturn {
397
403
  page: Page
398
- friends: Array<Friend>
404
+ friends: Array<Friend>
399
405
  }
400
406
  export interface GetFriendByAddressArgs {
401
407
  friendAddress: string
@@ -403,14 +409,14 @@ export interface GetFriendByAddressArgs {
403
409
 
404
410
  export interface GetFriendByAddressReturn {
405
411
  status: boolean
406
- friend: Friend
412
+ friend: Friend
407
413
  }
408
414
  export interface SearchFriendsArgs {
409
415
  filterUsername: string
410
416
  }
411
417
 
412
418
  export interface SearchFriendsReturn {
413
- friends: Array<Friend>
419
+ friends: Array<Friend>
414
420
  }
415
421
  export interface AddFriendArgs {
416
422
  friendAddress: string
@@ -419,7 +425,7 @@ export interface AddFriendArgs {
419
425
 
420
426
  export interface AddFriendReturn {
421
427
  status: boolean
422
- friend?: Friend
428
+ friend?: Friend
423
429
  }
424
430
  export interface UpdateFriendNicknameArgs {
425
431
  friendAddress: string
@@ -428,14 +434,14 @@ export interface UpdateFriendNicknameArgs {
428
434
 
429
435
  export interface UpdateFriendNicknameReturn {
430
436
  status: boolean
431
- friend?: Friend
437
+ friend?: Friend
432
438
  }
433
439
  export interface RemoveFriendArgs {
434
440
  friendAddress: string
435
441
  }
436
442
 
437
443
  export interface RemoveFriendReturn {
438
- status: boolean
444
+ status: boolean
439
445
  }
440
446
  export interface ContractCallArgs {
441
447
  chainID: string
@@ -446,28 +452,28 @@ export interface ContractCallArgs {
446
452
  }
447
453
 
448
454
  export interface ContractCallReturn {
449
- returns: Array<string>
455
+ returns: Array<string>
450
456
  }
451
457
  export interface DecodeContractCallArgs {
452
458
  callData: string
453
459
  }
454
460
 
455
461
  export interface DecodeContractCallReturn {
456
- call: ContractCall
462
+ call: ContractCall
457
463
  }
458
464
  export interface LookupContractCallSelectorsArgs {
459
465
  selectors: Array<string>
460
466
  }
461
467
 
462
468
  export interface LookupContractCallSelectorsReturn {
463
- signatures: Array<Array<string>>
469
+ signatures: Array<Array<string>>
464
470
  }
465
471
  export interface UserStorageFetchArgs {
466
472
  key: string
467
473
  }
468
474
 
469
475
  export interface UserStorageFetchReturn {
470
- object: any
476
+ object: any
471
477
  }
472
478
  export interface UserStorageSaveArgs {
473
479
  key: string
@@ -475,41 +481,40 @@ export interface UserStorageSaveArgs {
475
481
  }
476
482
 
477
483
  export interface UserStorageSaveReturn {
478
- ok: boolean
484
+ ok: boolean
479
485
  }
480
486
  export interface UserStorageDeleteArgs {
481
487
  key: string
482
488
  }
483
489
 
484
490
  export interface UserStorageDeleteReturn {
485
- ok: boolean
491
+ ok: boolean
486
492
  }
487
493
  export interface UserStorageFetchAllArgs {
488
494
  keys?: Array<string>
489
495
  }
490
496
 
491
497
  export interface UserStorageFetchAllReturn {
492
- objects: {[key: string]: any}
498
+ objects: { [key: string]: any }
493
499
  }
494
500
  export interface GetMoonpayLinkArgs {
495
501
  url: string
496
502
  }
497
503
 
498
504
  export interface GetMoonpayLinkReturn {
499
- signedUrl: string
500
- }
501
- export interface GetSardineClientTokenArgs {
505
+ signedUrl: string
502
506
  }
507
+ export interface GetSardineClientTokenArgs {}
503
508
 
504
509
  export interface GetSardineClientTokenReturn {
505
- token: string
510
+ token: string
506
511
  }
507
512
  export interface IsUsingGoogleMailArgs {
508
513
  domain: string
509
514
  }
510
515
 
511
516
  export interface IsUsingGoogleMailReturn {
512
- yes: boolean
517
+ yes: boolean
513
518
  }
514
519
  export interface ResolveENSAddressArgs {
515
520
  ens: string
@@ -517,7 +522,7 @@ export interface ResolveENSAddressArgs {
517
522
 
518
523
  export interface ResolveENSAddressReturn {
519
524
  address: string
520
- ok: boolean
525
+ ok: boolean
521
526
  }
522
527
  export interface IsValidSignatureArgs {
523
528
  chainId: string
@@ -527,7 +532,7 @@ export interface IsValidSignatureArgs {
527
532
  }
528
533
 
529
534
  export interface IsValidSignatureReturn {
530
- isValid: boolean
535
+ isValid: boolean
531
536
  }
532
537
  export interface IsValidMessageSignatureArgs {
533
538
  chainId: string
@@ -537,7 +542,7 @@ export interface IsValidMessageSignatureArgs {
537
542
  }
538
543
 
539
544
  export interface IsValidMessageSignatureReturn {
540
- isValid: boolean
545
+ isValid: boolean
541
546
  }
542
547
  export interface IsValidTypedDataSignatureArgs {
543
548
  chainId: string
@@ -547,7 +552,7 @@ export interface IsValidTypedDataSignatureArgs {
547
552
  }
548
553
 
549
554
  export interface IsValidTypedDataSignatureReturn {
550
- isValid: boolean
555
+ isValid: boolean
551
556
  }
552
557
  export interface IsValidETHAuthProofArgs {
553
558
  chainId: string
@@ -556,28 +561,28 @@ export interface IsValidETHAuthProofArgs {
556
561
  }
557
562
 
558
563
  export interface IsValidETHAuthProofReturn {
559
- isValid: boolean
564
+ isValid: boolean
560
565
  }
561
566
  export interface GetCoinPricesArgs {
562
567
  tokens: Array<Token>
563
568
  }
564
569
 
565
570
  export interface GetCoinPricesReturn {
566
- tokenPrices: Array<TokenPrice>
571
+ tokenPrices: Array<TokenPrice>
567
572
  }
568
573
  export interface GetCollectiblePricesArgs {
569
574
  tokens: Array<Token>
570
575
  }
571
576
 
572
577
  export interface GetCollectiblePricesReturn {
573
- tokenPrices: Array<TokenPrice>
578
+ tokenPrices: Array<TokenPrice>
574
579
  }
575
580
  export interface GetExchangeRateArgs {
576
581
  toCurrency: string
577
582
  }
578
583
 
579
584
  export interface GetExchangeRateReturn {
580
- exchangeRate: ExchangeRate
585
+ exchangeRate: ExchangeRate
581
586
  }
582
587
  export interface MemoryStoreArgs {
583
588
  key: string
@@ -585,20 +590,19 @@ export interface MemoryStoreArgs {
585
590
  }
586
591
 
587
592
  export interface MemoryStoreReturn {
588
- ok: boolean
593
+ ok: boolean
589
594
  }
590
595
  export interface MemoryLoadArgs {
591
596
  key: string
592
597
  }
593
598
 
594
599
  export interface MemoryLoadReturn {
595
- value: string
596
- }
597
- export interface ListPayCardsOnFileArgs {
600
+ value: string
598
601
  }
602
+ export interface ListPayCardsOnFileArgs {}
599
603
 
600
604
  export interface ListPayCardsOnFileReturn {
601
- payCards: Array<PayCard>
605
+ payCards: Array<PayCard>
602
606
  }
603
607
  export interface SavePayCardArgs {
604
608
  payCard: PayCard
@@ -606,7 +610,7 @@ export interface SavePayCardArgs {
606
610
 
607
611
  export interface SavePayCardReturn {
608
612
  ok: boolean
609
- payCard: PayCard
613
+ payCard: PayCard
610
614
  }
611
615
  export interface UpdatePayCardCVCArgs {
612
616
  payCardId: number
@@ -614,14 +618,14 @@ export interface UpdatePayCardCVCArgs {
614
618
  }
615
619
 
616
620
  export interface UpdatePayCardCVCReturn {
617
- ok: boolean
621
+ ok: boolean
618
622
  }
619
623
  export interface DeletePayCardArgs {
620
624
  payCardId: number
621
625
  }
622
626
 
623
627
  export interface DeletePayCardReturn {
624
- ok: boolean
628
+ ok: boolean
625
629
  }
626
630
  export interface SmartRampQuoteArgs {
627
631
  quoteRequest: SmartRampQuoteRequest
@@ -629,7 +633,7 @@ export interface SmartRampQuoteArgs {
629
633
 
630
634
  export interface SmartRampQuoteReturn {
631
635
  status: boolean
632
- quoteDetails: SmartRampQuoteDetails
636
+ quoteDetails: SmartRampQuoteDetails
633
637
  }
634
638
  export interface SmartRampPurchaseArgs {
635
639
  quoteDetails: SmartRampQuoteDetails
@@ -639,7 +643,7 @@ export interface SmartRampPurchaseArgs {
639
643
 
640
644
  export interface SmartRampPurchaseReturn {
641
645
  processing: boolean
642
- receipt: SmartRampPurchaseReceipt
646
+ receipt: SmartRampPurchaseReceipt
643
647
  }
644
648
  export interface SmartRampWaitOrderConfirmationArgs {
645
649
  orderId: string
@@ -647,7 +651,7 @@ export interface SmartRampWaitOrderConfirmationArgs {
647
651
 
648
652
  export interface SmartRampWaitOrderConfirmationReturn {
649
653
  done: boolean
650
- receipt: SmartRampPurchaseReceipt
654
+ receipt: SmartRampPurchaseReceipt
651
655
  }
652
656
  export interface SmartRampGetOrderArgs {
653
657
  orderId?: string
@@ -655,14 +659,14 @@ export interface SmartRampGetOrderArgs {
655
659
  }
656
660
 
657
661
  export interface SmartRampGetOrderReturn {
658
- order: SmartRampOrder
662
+ order: SmartRampOrder
659
663
  }
660
664
  export interface SmartRampCheckCardAuthorizationArgs {
661
665
  orderId: string
662
666
  }
663
667
 
664
668
  export interface SmartRampCheckCardAuthorizationReturn {
665
- cardAuth: PayCardAuth
669
+ cardAuth: PayCardAuth
666
670
  }
667
671
  export interface SmartRampOrdersListArgs {
668
672
  page?: Page
@@ -671,7 +675,7 @@ export interface SmartRampOrdersListArgs {
671
675
 
672
676
  export interface SmartRampOrdersListReturn {
673
677
  page: Page
674
- orders: Array<SmartRampOrder>
678
+ orders: Array<SmartRampOrder>
675
679
  }
676
680
  export interface SmartRampGetOrderTxnHashArgs {
677
681
  orderId: string
@@ -679,7 +683,7 @@ export interface SmartRampGetOrderTxnHashArgs {
679
683
 
680
684
  export interface SmartRampGetOrderTxnHashReturn {
681
685
  txnHash: string
682
- txnSuccessful: SmartRampTxnStatus
686
+ txnSuccessful: SmartRampTxnStatus
683
687
  }
684
688
  export interface SmartRampSubmitCardAuthorizationArgs {
685
689
  orderId: string
@@ -688,7 +692,7 @@ export interface SmartRampSubmitCardAuthorizationArgs {
688
692
  }
689
693
 
690
694
  export interface SmartRampSubmitCardAuthorizationReturn {
691
- status: boolean
695
+ status: boolean
692
696
  }
693
697
  export interface AdminSmartRampGetOrderArgs {
694
698
  orderId?: string
@@ -696,34 +700,33 @@ export interface AdminSmartRampGetOrderArgs {
696
700
  }
697
701
 
698
702
  export interface AdminSmartRampGetOrderReturn {
699
- order: SmartRampOrder
703
+ order: SmartRampOrder
700
704
  }
701
705
  export interface AdminSmartRampListCompletedOrdersArgs {
702
706
  accountAddress?: string
703
707
  }
704
708
 
705
709
  export interface AdminSmartRampListCompletedOrdersReturn {
706
- orders: Array<SmartRampOrder>
710
+ orders: Array<SmartRampOrder>
707
711
  }
708
712
  export interface AdminSmartRampListPendingOrdersArgs {
709
713
  accountAddress?: string
710
714
  }
711
715
 
712
716
  export interface AdminSmartRampListPendingOrdersReturn {
713
- pendingOrders: Array<SmartRampOrder>
714
- }
715
- export interface GetInviteInfoArgs {
717
+ pendingOrders: Array<SmartRampOrder>
716
718
  }
719
+ export interface GetInviteInfoArgs {}
717
720
 
718
721
  export interface GetInviteInfoReturn {
719
- inviteInfo: InviteInfo
722
+ inviteInfo: InviteInfo
720
723
  }
721
724
  export interface IsValidAccessCodeArgs {
722
725
  accessCode: string
723
726
  }
724
727
 
725
728
  export interface IsValidAccessCodeReturn {
726
- status: boolean
729
+ status: boolean
727
730
  }
728
731
  export interface InternalClaimAccessCodeArgs {
729
732
  address: string
@@ -731,7 +734,7 @@ export interface InternalClaimAccessCodeArgs {
731
734
  }
732
735
 
733
736
  export interface InternalClaimAccessCodeReturn {
734
- status: boolean
737
+ status: boolean
735
738
  }
736
739
  export interface WalletRecoverArgs {
737
740
  username: string
@@ -739,7 +742,7 @@ export interface WalletRecoverArgs {
739
742
  }
740
743
 
741
744
  export interface WalletRecoverReturn {
742
- encryptedWallet: string
745
+ encryptedWallet: string
743
746
  }
744
747
  export interface BlockNumberAtTimeArgs {
745
748
  chainId: number
@@ -747,7 +750,7 @@ export interface BlockNumberAtTimeArgs {
747
750
  }
748
751
 
749
752
  export interface BlockNumberAtTimeReturn {
750
- blocks: Array<number>
753
+ blocks: Array<number>
751
754
  }
752
755
  export interface PaperSessionSecretArgs {
753
756
  chainName: string
@@ -757,7 +760,7 @@ export interface PaperSessionSecretArgs {
757
760
  }
758
761
 
759
762
  export interface PaperSessionSecretReturn {
760
- secret: string
763
+ secret: string
761
764
  }
762
765
  export interface PaperSessionSecret2Args {
763
766
  chainName: string
@@ -767,11 +770,9 @@ export interface PaperSessionSecret2Args {
767
770
  }
768
771
 
769
772
  export interface PaperSessionSecret2Return {
770
- secret: string
773
+ secret: string
771
774
  }
772
775
 
773
-
774
-
775
776
  //
776
777
  // Client
777
778
  //
@@ -788,683 +789,587 @@ export class API implements API {
788
789
  private url(name: string): string {
789
790
  return this.hostname + this.path + name
790
791
  }
791
-
792
+
792
793
  ping = (headers?: object): Promise<PingReturn> => {
793
- return this.fetch(
794
- this.url('Ping'),
795
- createHTTPRequest({}, headers)
796
- ).then((res) => {
794
+ return this.fetch(this.url('Ping'), createHTTPRequest({}, headers)).then(res => {
797
795
  return buildResponse(res).then(_data => {
798
796
  return {
799
- status: <boolean>(_data.status)
797
+ status: <boolean>_data.status
800
798
  }
801
799
  })
802
800
  })
803
801
  }
804
-
802
+
805
803
  version = (headers?: object): Promise<VersionReturn> => {
806
- return this.fetch(
807
- this.url('Version'),
808
- createHTTPRequest({}, headers)
809
- ).then((res) => {
804
+ return this.fetch(this.url('Version'), createHTTPRequest({}, headers)).then(res => {
810
805
  return buildResponse(res).then(_data => {
811
806
  return {
812
- version: <Version>(_data.version)
807
+ version: <Version>_data.version
813
808
  }
814
809
  })
815
810
  })
816
811
  }
817
-
812
+
818
813
  runtimeStatus = (headers?: object): Promise<RuntimeStatusReturn> => {
819
- return this.fetch(
820
- this.url('RuntimeStatus'),
821
- createHTTPRequest({}, headers)
822
- ).then((res) => {
814
+ return this.fetch(this.url('RuntimeStatus'), createHTTPRequest({}, headers)).then(res => {
823
815
  return buildResponse(res).then(_data => {
824
816
  return {
825
- status: <RuntimeStatus>(_data.status)
817
+ status: <RuntimeStatus>_data.status
826
818
  }
827
819
  })
828
820
  })
829
821
  }
830
-
822
+
831
823
  getSequenceContext = (headers?: object): Promise<GetSequenceContextReturn> => {
832
- return this.fetch(
833
- this.url('GetSequenceContext'),
834
- createHTTPRequest({}, headers)
835
- ).then((res) => {
824
+ return this.fetch(this.url('GetSequenceContext'), createHTTPRequest({}, headers)).then(res => {
836
825
  return buildResponse(res).then(_data => {
837
826
  return {
838
- data: <SequenceContext>(_data.data)
827
+ data: <SequenceContext>_data.data
839
828
  }
840
829
  })
841
830
  })
842
831
  }
843
-
832
+
844
833
  getAuthToken = (args: GetAuthTokenArgs, headers?: object): Promise<GetAuthTokenReturn> => {
845
- return this.fetch(
846
- this.url('GetAuthToken'),
847
- createHTTPRequest(args, headers)).then((res) => {
834
+ return this.fetch(this.url('GetAuthToken'), createHTTPRequest(args, headers)).then(res => {
848
835
  return buildResponse(res).then(_data => {
849
836
  return {
850
- status: <boolean>(_data.status),
851
- jwtToken: <string>(_data.jwtToken),
852
- address: <string>(_data.address),
853
- user: <User>(_data.user)
837
+ status: <boolean>_data.status,
838
+ jwtToken: <string>_data.jwtToken,
839
+ address: <string>_data.address,
840
+ user: <User>_data.user
854
841
  }
855
842
  })
856
843
  })
857
844
  }
858
-
845
+
859
846
  sendPasswordlessLink = (args: SendPasswordlessLinkArgs, headers?: object): Promise<SendPasswordlessLinkReturn> => {
860
- return this.fetch(
861
- this.url('SendPasswordlessLink'),
862
- createHTTPRequest(args, headers)).then((res) => {
847
+ return this.fetch(this.url('SendPasswordlessLink'), createHTTPRequest(args, headers)).then(res => {
863
848
  return buildResponse(res).then(_data => {
864
849
  return {
865
- status: <boolean>(_data.status)
850
+ status: <boolean>_data.status
866
851
  }
867
852
  })
868
853
  })
869
854
  }
870
-
855
+
871
856
  friendList = (args: FriendListArgs, headers?: object): Promise<FriendListReturn> => {
872
- return this.fetch(
873
- this.url('FriendList'),
874
- createHTTPRequest(args, headers)).then((res) => {
857
+ return this.fetch(this.url('FriendList'), createHTTPRequest(args, headers)).then(res => {
875
858
  return buildResponse(res).then(_data => {
876
859
  return {
877
- page: <Page>(_data.page),
878
- friends: <Array<Friend>>(_data.friends)
860
+ page: <Page>_data.page,
861
+ friends: <Array<Friend>>_data.friends
879
862
  }
880
863
  })
881
864
  })
882
865
  }
883
-
866
+
884
867
  getFriendByAddress = (args: GetFriendByAddressArgs, headers?: object): Promise<GetFriendByAddressReturn> => {
885
- return this.fetch(
886
- this.url('GetFriendByAddress'),
887
- createHTTPRequest(args, headers)).then((res) => {
868
+ return this.fetch(this.url('GetFriendByAddress'), createHTTPRequest(args, headers)).then(res => {
888
869
  return buildResponse(res).then(_data => {
889
870
  return {
890
- status: <boolean>(_data.status),
891
- friend: <Friend>(_data.friend)
871
+ status: <boolean>_data.status,
872
+ friend: <Friend>_data.friend
892
873
  }
893
874
  })
894
875
  })
895
876
  }
896
-
877
+
897
878
  searchFriends = (args: SearchFriendsArgs, headers?: object): Promise<SearchFriendsReturn> => {
898
- return this.fetch(
899
- this.url('SearchFriends'),
900
- createHTTPRequest(args, headers)).then((res) => {
879
+ return this.fetch(this.url('SearchFriends'), createHTTPRequest(args, headers)).then(res => {
901
880
  return buildResponse(res).then(_data => {
902
881
  return {
903
- friends: <Array<Friend>>(_data.friends)
882
+ friends: <Array<Friend>>_data.friends
904
883
  }
905
884
  })
906
885
  })
907
886
  }
908
-
887
+
909
888
  addFriend = (args: AddFriendArgs, headers?: object): Promise<AddFriendReturn> => {
910
- return this.fetch(
911
- this.url('AddFriend'),
912
- createHTTPRequest(args, headers)).then((res) => {
889
+ return this.fetch(this.url('AddFriend'), createHTTPRequest(args, headers)).then(res => {
913
890
  return buildResponse(res).then(_data => {
914
891
  return {
915
- status: <boolean>(_data.status),
916
- friend: <Friend>(_data.friend)
892
+ status: <boolean>_data.status,
893
+ friend: <Friend>_data.friend
917
894
  }
918
895
  })
919
896
  })
920
897
  }
921
-
898
+
922
899
  updateFriendNickname = (args: UpdateFriendNicknameArgs, headers?: object): Promise<UpdateFriendNicknameReturn> => {
923
- return this.fetch(
924
- this.url('UpdateFriendNickname'),
925
- createHTTPRequest(args, headers)).then((res) => {
900
+ return this.fetch(this.url('UpdateFriendNickname'), createHTTPRequest(args, headers)).then(res => {
926
901
  return buildResponse(res).then(_data => {
927
902
  return {
928
- status: <boolean>(_data.status),
929
- friend: <Friend>(_data.friend)
903
+ status: <boolean>_data.status,
904
+ friend: <Friend>_data.friend
930
905
  }
931
906
  })
932
907
  })
933
908
  }
934
-
909
+
935
910
  removeFriend = (args: RemoveFriendArgs, headers?: object): Promise<RemoveFriendReturn> => {
936
- return this.fetch(
937
- this.url('RemoveFriend'),
938
- createHTTPRequest(args, headers)).then((res) => {
911
+ return this.fetch(this.url('RemoveFriend'), createHTTPRequest(args, headers)).then(res => {
939
912
  return buildResponse(res).then(_data => {
940
913
  return {
941
- status: <boolean>(_data.status)
914
+ status: <boolean>_data.status
942
915
  }
943
916
  })
944
917
  })
945
918
  }
946
-
919
+
947
920
  contractCall = (args: ContractCallArgs, headers?: object): Promise<ContractCallReturn> => {
948
- return this.fetch(
949
- this.url('ContractCall'),
950
- createHTTPRequest(args, headers)).then((res) => {
921
+ return this.fetch(this.url('ContractCall'), createHTTPRequest(args, headers)).then(res => {
951
922
  return buildResponse(res).then(_data => {
952
923
  return {
953
- returns: <Array<string>>(_data.returns)
924
+ returns: <Array<string>>_data.returns
954
925
  }
955
926
  })
956
927
  })
957
928
  }
958
-
929
+
959
930
  decodeContractCall = (args: DecodeContractCallArgs, headers?: object): Promise<DecodeContractCallReturn> => {
960
- return this.fetch(
961
- this.url('DecodeContractCall'),
962
- createHTTPRequest(args, headers)).then((res) => {
931
+ return this.fetch(this.url('DecodeContractCall'), createHTTPRequest(args, headers)).then(res => {
963
932
  return buildResponse(res).then(_data => {
964
933
  return {
965
- call: <ContractCall>(_data.call)
934
+ call: <ContractCall>_data.call
966
935
  }
967
936
  })
968
937
  })
969
938
  }
970
-
971
- lookupContractCallSelectors = (args: LookupContractCallSelectorsArgs, headers?: object): Promise<LookupContractCallSelectorsReturn> => {
972
- return this.fetch(
973
- this.url('LookupContractCallSelectors'),
974
- createHTTPRequest(args, headers)).then((res) => {
939
+
940
+ lookupContractCallSelectors = (
941
+ args: LookupContractCallSelectorsArgs,
942
+ headers?: object
943
+ ): Promise<LookupContractCallSelectorsReturn> => {
944
+ return this.fetch(this.url('LookupContractCallSelectors'), createHTTPRequest(args, headers)).then(res => {
975
945
  return buildResponse(res).then(_data => {
976
946
  return {
977
- signatures: <Array<Array<string>>>(_data.signatures)
947
+ signatures: <Array<Array<string>>>_data.signatures
978
948
  }
979
949
  })
980
950
  })
981
951
  }
982
-
952
+
983
953
  userStorageFetch = (args: UserStorageFetchArgs, headers?: object): Promise<UserStorageFetchReturn> => {
984
- return this.fetch(
985
- this.url('UserStorageFetch'),
986
- createHTTPRequest(args, headers)).then((res) => {
954
+ return this.fetch(this.url('UserStorageFetch'), createHTTPRequest(args, headers)).then(res => {
987
955
  return buildResponse(res).then(_data => {
988
956
  return {
989
- object: <any>(_data.object)
957
+ object: <any>_data.object
990
958
  }
991
959
  })
992
960
  })
993
961
  }
994
-
962
+
995
963
  userStorageSave = (args: UserStorageSaveArgs, headers?: object): Promise<UserStorageSaveReturn> => {
996
- return this.fetch(
997
- this.url('UserStorageSave'),
998
- createHTTPRequest(args, headers)).then((res) => {
964
+ return this.fetch(this.url('UserStorageSave'), createHTTPRequest(args, headers)).then(res => {
999
965
  return buildResponse(res).then(_data => {
1000
966
  return {
1001
- ok: <boolean>(_data.ok)
967
+ ok: <boolean>_data.ok
1002
968
  }
1003
969
  })
1004
970
  })
1005
971
  }
1006
-
972
+
1007
973
  userStorageDelete = (args: UserStorageDeleteArgs, headers?: object): Promise<UserStorageDeleteReturn> => {
1008
- return this.fetch(
1009
- this.url('UserStorageDelete'),
1010
- createHTTPRequest(args, headers)).then((res) => {
974
+ return this.fetch(this.url('UserStorageDelete'), createHTTPRequest(args, headers)).then(res => {
1011
975
  return buildResponse(res).then(_data => {
1012
976
  return {
1013
- ok: <boolean>(_data.ok)
977
+ ok: <boolean>_data.ok
1014
978
  }
1015
979
  })
1016
980
  })
1017
981
  }
1018
-
982
+
1019
983
  userStorageFetchAll = (args: UserStorageFetchAllArgs, headers?: object): Promise<UserStorageFetchAllReturn> => {
1020
- return this.fetch(
1021
- this.url('UserStorageFetchAll'),
1022
- createHTTPRequest(args, headers)).then((res) => {
984
+ return this.fetch(this.url('UserStorageFetchAll'), createHTTPRequest(args, headers)).then(res => {
1023
985
  return buildResponse(res).then(_data => {
1024
986
  return {
1025
- objects: <{[key: string]: any}>(_data.objects)
987
+ objects: <{ [key: string]: any }>_data.objects
1026
988
  }
1027
989
  })
1028
990
  })
1029
991
  }
1030
-
992
+
1031
993
  getMoonpayLink = (args: GetMoonpayLinkArgs, headers?: object): Promise<GetMoonpayLinkReturn> => {
1032
- return this.fetch(
1033
- this.url('GetMoonpayLink'),
1034
- createHTTPRequest(args, headers)).then((res) => {
994
+ return this.fetch(this.url('GetMoonpayLink'), createHTTPRequest(args, headers)).then(res => {
1035
995
  return buildResponse(res).then(_data => {
1036
996
  return {
1037
- signedUrl: <string>(_data.signedUrl)
997
+ signedUrl: <string>_data.signedUrl
1038
998
  }
1039
999
  })
1040
1000
  })
1041
1001
  }
1042
-
1002
+
1043
1003
  getSardineClientToken = (headers?: object): Promise<GetSardineClientTokenReturn> => {
1044
- return this.fetch(
1045
- this.url('GetSardineClientToken'),
1046
- createHTTPRequest({}, headers)
1047
- ).then((res) => {
1004
+ return this.fetch(this.url('GetSardineClientToken'), createHTTPRequest({}, headers)).then(res => {
1048
1005
  return buildResponse(res).then(_data => {
1049
1006
  return {
1050
- token: <string>(_data.token)
1007
+ token: <string>_data.token
1051
1008
  }
1052
1009
  })
1053
1010
  })
1054
1011
  }
1055
-
1012
+
1056
1013
  isUsingGoogleMail = (args: IsUsingGoogleMailArgs, headers?: object): Promise<IsUsingGoogleMailReturn> => {
1057
- return this.fetch(
1058
- this.url('IsUsingGoogleMail'),
1059
- createHTTPRequest(args, headers)).then((res) => {
1014
+ return this.fetch(this.url('IsUsingGoogleMail'), createHTTPRequest(args, headers)).then(res => {
1060
1015
  return buildResponse(res).then(_data => {
1061
1016
  return {
1062
- yes: <boolean>(_data.yes)
1017
+ yes: <boolean>_data.yes
1063
1018
  }
1064
1019
  })
1065
1020
  })
1066
1021
  }
1067
-
1022
+
1068
1023
  resolveENSAddress = (args: ResolveENSAddressArgs, headers?: object): Promise<ResolveENSAddressReturn> => {
1069
- return this.fetch(
1070
- this.url('ResolveENSAddress'),
1071
- createHTTPRequest(args, headers)).then((res) => {
1024
+ return this.fetch(this.url('ResolveENSAddress'), createHTTPRequest(args, headers)).then(res => {
1072
1025
  return buildResponse(res).then(_data => {
1073
1026
  return {
1074
- address: <string>(_data.address),
1075
- ok: <boolean>(_data.ok)
1027
+ address: <string>_data.address,
1028
+ ok: <boolean>_data.ok
1076
1029
  }
1077
1030
  })
1078
1031
  })
1079
1032
  }
1080
-
1033
+
1081
1034
  isValidSignature = (args: IsValidSignatureArgs, headers?: object): Promise<IsValidSignatureReturn> => {
1082
- return this.fetch(
1083
- this.url('IsValidSignature'),
1084
- createHTTPRequest(args, headers)).then((res) => {
1035
+ return this.fetch(this.url('IsValidSignature'), createHTTPRequest(args, headers)).then(res => {
1085
1036
  return buildResponse(res).then(_data => {
1086
1037
  return {
1087
- isValid: <boolean>(_data.isValid)
1038
+ isValid: <boolean>_data.isValid
1088
1039
  }
1089
1040
  })
1090
1041
  })
1091
1042
  }
1092
-
1043
+
1093
1044
  isValidMessageSignature = (args: IsValidMessageSignatureArgs, headers?: object): Promise<IsValidMessageSignatureReturn> => {
1094
- return this.fetch(
1095
- this.url('IsValidMessageSignature'),
1096
- createHTTPRequest(args, headers)).then((res) => {
1045
+ return this.fetch(this.url('IsValidMessageSignature'), createHTTPRequest(args, headers)).then(res => {
1097
1046
  return buildResponse(res).then(_data => {
1098
1047
  return {
1099
- isValid: <boolean>(_data.isValid)
1048
+ isValid: <boolean>_data.isValid
1100
1049
  }
1101
1050
  })
1102
1051
  })
1103
1052
  }
1104
-
1105
- isValidTypedDataSignature = (args: IsValidTypedDataSignatureArgs, headers?: object): Promise<IsValidTypedDataSignatureReturn> => {
1106
- return this.fetch(
1107
- this.url('IsValidTypedDataSignature'),
1108
- createHTTPRequest(args, headers)).then((res) => {
1053
+
1054
+ isValidTypedDataSignature = (
1055
+ args: IsValidTypedDataSignatureArgs,
1056
+ headers?: object
1057
+ ): Promise<IsValidTypedDataSignatureReturn> => {
1058
+ return this.fetch(this.url('IsValidTypedDataSignature'), createHTTPRequest(args, headers)).then(res => {
1109
1059
  return buildResponse(res).then(_data => {
1110
1060
  return {
1111
- isValid: <boolean>(_data.isValid)
1061
+ isValid: <boolean>_data.isValid
1112
1062
  }
1113
1063
  })
1114
1064
  })
1115
1065
  }
1116
-
1066
+
1117
1067
  isValidETHAuthProof = (args: IsValidETHAuthProofArgs, headers?: object): Promise<IsValidETHAuthProofReturn> => {
1118
- return this.fetch(
1119
- this.url('IsValidETHAuthProof'),
1120
- createHTTPRequest(args, headers)).then((res) => {
1068
+ return this.fetch(this.url('IsValidETHAuthProof'), createHTTPRequest(args, headers)).then(res => {
1121
1069
  return buildResponse(res).then(_data => {
1122
1070
  return {
1123
- isValid: <boolean>(_data.isValid)
1071
+ isValid: <boolean>_data.isValid
1124
1072
  }
1125
1073
  })
1126
1074
  })
1127
1075
  }
1128
-
1076
+
1129
1077
  getCoinPrices = (args: GetCoinPricesArgs, headers?: object): Promise<GetCoinPricesReturn> => {
1130
- return this.fetch(
1131
- this.url('GetCoinPrices'),
1132
- createHTTPRequest(args, headers)).then((res) => {
1078
+ return this.fetch(this.url('GetCoinPrices'), createHTTPRequest(args, headers)).then(res => {
1133
1079
  return buildResponse(res).then(_data => {
1134
1080
  return {
1135
- tokenPrices: <Array<TokenPrice>>(_data.tokenPrices)
1081
+ tokenPrices: <Array<TokenPrice>>_data.tokenPrices
1136
1082
  }
1137
1083
  })
1138
1084
  })
1139
1085
  }
1140
-
1086
+
1141
1087
  getCollectiblePrices = (args: GetCollectiblePricesArgs, headers?: object): Promise<GetCollectiblePricesReturn> => {
1142
- return this.fetch(
1143
- this.url('GetCollectiblePrices'),
1144
- createHTTPRequest(args, headers)).then((res) => {
1088
+ return this.fetch(this.url('GetCollectiblePrices'), createHTTPRequest(args, headers)).then(res => {
1145
1089
  return buildResponse(res).then(_data => {
1146
1090
  return {
1147
- tokenPrices: <Array<TokenPrice>>(_data.tokenPrices)
1091
+ tokenPrices: <Array<TokenPrice>>_data.tokenPrices
1148
1092
  }
1149
1093
  })
1150
1094
  })
1151
1095
  }
1152
-
1096
+
1153
1097
  getExchangeRate = (args: GetExchangeRateArgs, headers?: object): Promise<GetExchangeRateReturn> => {
1154
- return this.fetch(
1155
- this.url('GetExchangeRate'),
1156
- createHTTPRequest(args, headers)).then((res) => {
1098
+ return this.fetch(this.url('GetExchangeRate'), createHTTPRequest(args, headers)).then(res => {
1157
1099
  return buildResponse(res).then(_data => {
1158
1100
  return {
1159
- exchangeRate: <ExchangeRate>(_data.exchangeRate)
1101
+ exchangeRate: <ExchangeRate>_data.exchangeRate
1160
1102
  }
1161
1103
  })
1162
1104
  })
1163
1105
  }
1164
-
1106
+
1165
1107
  memoryStore = (args: MemoryStoreArgs, headers?: object): Promise<MemoryStoreReturn> => {
1166
- return this.fetch(
1167
- this.url('MemoryStore'),
1168
- createHTTPRequest(args, headers)).then((res) => {
1108
+ return this.fetch(this.url('MemoryStore'), createHTTPRequest(args, headers)).then(res => {
1169
1109
  return buildResponse(res).then(_data => {
1170
1110
  return {
1171
- ok: <boolean>(_data.ok)
1111
+ ok: <boolean>_data.ok
1172
1112
  }
1173
1113
  })
1174
1114
  })
1175
1115
  }
1176
-
1116
+
1177
1117
  memoryLoad = (args: MemoryLoadArgs, headers?: object): Promise<MemoryLoadReturn> => {
1178
- return this.fetch(
1179
- this.url('MemoryLoad'),
1180
- createHTTPRequest(args, headers)).then((res) => {
1118
+ return this.fetch(this.url('MemoryLoad'), createHTTPRequest(args, headers)).then(res => {
1181
1119
  return buildResponse(res).then(_data => {
1182
1120
  return {
1183
- value: <string>(_data.value)
1121
+ value: <string>_data.value
1184
1122
  }
1185
1123
  })
1186
1124
  })
1187
1125
  }
1188
-
1126
+
1189
1127
  listPayCardsOnFile = (headers?: object): Promise<ListPayCardsOnFileReturn> => {
1190
- return this.fetch(
1191
- this.url('ListPayCardsOnFile'),
1192
- createHTTPRequest({}, headers)
1193
- ).then((res) => {
1128
+ return this.fetch(this.url('ListPayCardsOnFile'), createHTTPRequest({}, headers)).then(res => {
1194
1129
  return buildResponse(res).then(_data => {
1195
1130
  return {
1196
- payCards: <Array<PayCard>>(_data.payCards)
1131
+ payCards: <Array<PayCard>>_data.payCards
1197
1132
  }
1198
1133
  })
1199
1134
  })
1200
1135
  }
1201
-
1136
+
1202
1137
  savePayCard = (args: SavePayCardArgs, headers?: object): Promise<SavePayCardReturn> => {
1203
- return this.fetch(
1204
- this.url('SavePayCard'),
1205
- createHTTPRequest(args, headers)).then((res) => {
1138
+ return this.fetch(this.url('SavePayCard'), createHTTPRequest(args, headers)).then(res => {
1206
1139
  return buildResponse(res).then(_data => {
1207
1140
  return {
1208
- ok: <boolean>(_data.ok),
1209
- payCard: <PayCard>(_data.payCard)
1141
+ ok: <boolean>_data.ok,
1142
+ payCard: <PayCard>_data.payCard
1210
1143
  }
1211
1144
  })
1212
1145
  })
1213
1146
  }
1214
-
1147
+
1215
1148
  updatePayCardCVC = (args: UpdatePayCardCVCArgs, headers?: object): Promise<UpdatePayCardCVCReturn> => {
1216
- return this.fetch(
1217
- this.url('UpdatePayCardCVC'),
1218
- createHTTPRequest(args, headers)).then((res) => {
1149
+ return this.fetch(this.url('UpdatePayCardCVC'), createHTTPRequest(args, headers)).then(res => {
1219
1150
  return buildResponse(res).then(_data => {
1220
1151
  return {
1221
- ok: <boolean>(_data.ok)
1152
+ ok: <boolean>_data.ok
1222
1153
  }
1223
1154
  })
1224
1155
  })
1225
1156
  }
1226
-
1157
+
1227
1158
  deletePayCard = (args: DeletePayCardArgs, headers?: object): Promise<DeletePayCardReturn> => {
1228
- return this.fetch(
1229
- this.url('DeletePayCard'),
1230
- createHTTPRequest(args, headers)).then((res) => {
1159
+ return this.fetch(this.url('DeletePayCard'), createHTTPRequest(args, headers)).then(res => {
1231
1160
  return buildResponse(res).then(_data => {
1232
1161
  return {
1233
- ok: <boolean>(_data.ok)
1162
+ ok: <boolean>_data.ok
1234
1163
  }
1235
1164
  })
1236
1165
  })
1237
1166
  }
1238
-
1167
+
1239
1168
  smartRampQuote = (args: SmartRampQuoteArgs, headers?: object): Promise<SmartRampQuoteReturn> => {
1240
- return this.fetch(
1241
- this.url('SmartRampQuote'),
1242
- createHTTPRequest(args, headers)).then((res) => {
1169
+ return this.fetch(this.url('SmartRampQuote'), createHTTPRequest(args, headers)).then(res => {
1243
1170
  return buildResponse(res).then(_data => {
1244
1171
  return {
1245
- status: <boolean>(_data.status),
1246
- quoteDetails: <SmartRampQuoteDetails>(_data.quoteDetails)
1172
+ status: <boolean>_data.status,
1173
+ quoteDetails: <SmartRampQuoteDetails>_data.quoteDetails
1247
1174
  }
1248
1175
  })
1249
1176
  })
1250
1177
  }
1251
-
1178
+
1252
1179
  smartRampPurchase = (args: SmartRampPurchaseArgs, headers?: object): Promise<SmartRampPurchaseReturn> => {
1253
- return this.fetch(
1254
- this.url('SmartRampPurchase'),
1255
- createHTTPRequest(args, headers)).then((res) => {
1180
+ return this.fetch(this.url('SmartRampPurchase'), createHTTPRequest(args, headers)).then(res => {
1256
1181
  return buildResponse(res).then(_data => {
1257
1182
  return {
1258
- processing: <boolean>(_data.processing),
1259
- receipt: <SmartRampPurchaseReceipt>(_data.receipt)
1183
+ processing: <boolean>_data.processing,
1184
+ receipt: <SmartRampPurchaseReceipt>_data.receipt
1260
1185
  }
1261
1186
  })
1262
1187
  })
1263
1188
  }
1264
-
1265
- smartRampWaitOrderConfirmation = (args: SmartRampWaitOrderConfirmationArgs, headers?: object): Promise<SmartRampWaitOrderConfirmationReturn> => {
1266
- return this.fetch(
1267
- this.url('SmartRampWaitOrderConfirmation'),
1268
- createHTTPRequest(args, headers)).then((res) => {
1189
+
1190
+ smartRampWaitOrderConfirmation = (
1191
+ args: SmartRampWaitOrderConfirmationArgs,
1192
+ headers?: object
1193
+ ): Promise<SmartRampWaitOrderConfirmationReturn> => {
1194
+ return this.fetch(this.url('SmartRampWaitOrderConfirmation'), createHTTPRequest(args, headers)).then(res => {
1269
1195
  return buildResponse(res).then(_data => {
1270
1196
  return {
1271
- done: <boolean>(_data.done),
1272
- receipt: <SmartRampPurchaseReceipt>(_data.receipt)
1197
+ done: <boolean>_data.done,
1198
+ receipt: <SmartRampPurchaseReceipt>_data.receipt
1273
1199
  }
1274
1200
  })
1275
1201
  })
1276
1202
  }
1277
-
1203
+
1278
1204
  smartRampGetOrder = (args: SmartRampGetOrderArgs, headers?: object): Promise<SmartRampGetOrderReturn> => {
1279
- return this.fetch(
1280
- this.url('SmartRampGetOrder'),
1281
- createHTTPRequest(args, headers)).then((res) => {
1205
+ return this.fetch(this.url('SmartRampGetOrder'), createHTTPRequest(args, headers)).then(res => {
1282
1206
  return buildResponse(res).then(_data => {
1283
1207
  return {
1284
- order: <SmartRampOrder>(_data.order)
1208
+ order: <SmartRampOrder>_data.order
1285
1209
  }
1286
1210
  })
1287
1211
  })
1288
1212
  }
1289
-
1290
- smartRampCheckCardAuthorization = (args: SmartRampCheckCardAuthorizationArgs, headers?: object): Promise<SmartRampCheckCardAuthorizationReturn> => {
1291
- return this.fetch(
1292
- this.url('SmartRampCheckCardAuthorization'),
1293
- createHTTPRequest(args, headers)).then((res) => {
1213
+
1214
+ smartRampCheckCardAuthorization = (
1215
+ args: SmartRampCheckCardAuthorizationArgs,
1216
+ headers?: object
1217
+ ): Promise<SmartRampCheckCardAuthorizationReturn> => {
1218
+ return this.fetch(this.url('SmartRampCheckCardAuthorization'), createHTTPRequest(args, headers)).then(res => {
1294
1219
  return buildResponse(res).then(_data => {
1295
1220
  return {
1296
- cardAuth: <PayCardAuth>(_data.cardAuth)
1221
+ cardAuth: <PayCardAuth>_data.cardAuth
1297
1222
  }
1298
1223
  })
1299
1224
  })
1300
1225
  }
1301
-
1226
+
1302
1227
  smartRampOrdersList = (args: SmartRampOrdersListArgs, headers?: object): Promise<SmartRampOrdersListReturn> => {
1303
- return this.fetch(
1304
- this.url('SmartRampOrdersList'),
1305
- createHTTPRequest(args, headers)).then((res) => {
1228
+ return this.fetch(this.url('SmartRampOrdersList'), createHTTPRequest(args, headers)).then(res => {
1306
1229
  return buildResponse(res).then(_data => {
1307
1230
  return {
1308
- page: <Page>(_data.page),
1309
- orders: <Array<SmartRampOrder>>(_data.orders)
1231
+ page: <Page>_data.page,
1232
+ orders: <Array<SmartRampOrder>>_data.orders
1310
1233
  }
1311
1234
  })
1312
1235
  })
1313
1236
  }
1314
-
1237
+
1315
1238
  smartRampGetOrderTxnHash = (args: SmartRampGetOrderTxnHashArgs, headers?: object): Promise<SmartRampGetOrderTxnHashReturn> => {
1316
- return this.fetch(
1317
- this.url('SmartRampGetOrderTxnHash'),
1318
- createHTTPRequest(args, headers)).then((res) => {
1239
+ return this.fetch(this.url('SmartRampGetOrderTxnHash'), createHTTPRequest(args, headers)).then(res => {
1319
1240
  return buildResponse(res).then(_data => {
1320
1241
  return {
1321
- txnHash: <string>(_data.txnHash),
1322
- txnSuccessful: <SmartRampTxnStatus>(_data.txnSuccessful)
1242
+ txnHash: <string>_data.txnHash,
1243
+ txnSuccessful: <SmartRampTxnStatus>_data.txnSuccessful
1323
1244
  }
1324
1245
  })
1325
1246
  })
1326
1247
  }
1327
-
1328
- smartRampSubmitCardAuthorization = (args: SmartRampSubmitCardAuthorizationArgs, headers?: object): Promise<SmartRampSubmitCardAuthorizationReturn> => {
1329
- return this.fetch(
1330
- this.url('SmartRampSubmitCardAuthorization'),
1331
- createHTTPRequest(args, headers)).then((res) => {
1248
+
1249
+ smartRampSubmitCardAuthorization = (
1250
+ args: SmartRampSubmitCardAuthorizationArgs,
1251
+ headers?: object
1252
+ ): Promise<SmartRampSubmitCardAuthorizationReturn> => {
1253
+ return this.fetch(this.url('SmartRampSubmitCardAuthorization'), createHTTPRequest(args, headers)).then(res => {
1332
1254
  return buildResponse(res).then(_data => {
1333
1255
  return {
1334
- status: <boolean>(_data.status)
1256
+ status: <boolean>_data.status
1335
1257
  }
1336
1258
  })
1337
1259
  })
1338
1260
  }
1339
-
1261
+
1340
1262
  adminSmartRampGetOrder = (args: AdminSmartRampGetOrderArgs, headers?: object): Promise<AdminSmartRampGetOrderReturn> => {
1341
- return this.fetch(
1342
- this.url('AdminSmartRampGetOrder'),
1343
- createHTTPRequest(args, headers)).then((res) => {
1263
+ return this.fetch(this.url('AdminSmartRampGetOrder'), createHTTPRequest(args, headers)).then(res => {
1344
1264
  return buildResponse(res).then(_data => {
1345
1265
  return {
1346
- order: <SmartRampOrder>(_data.order)
1266
+ order: <SmartRampOrder>_data.order
1347
1267
  }
1348
1268
  })
1349
1269
  })
1350
1270
  }
1351
-
1352
- adminSmartRampListCompletedOrders = (args: AdminSmartRampListCompletedOrdersArgs, headers?: object): Promise<AdminSmartRampListCompletedOrdersReturn> => {
1353
- return this.fetch(
1354
- this.url('AdminSmartRampListCompletedOrders'),
1355
- createHTTPRequest(args, headers)).then((res) => {
1271
+
1272
+ adminSmartRampListCompletedOrders = (
1273
+ args: AdminSmartRampListCompletedOrdersArgs,
1274
+ headers?: object
1275
+ ): Promise<AdminSmartRampListCompletedOrdersReturn> => {
1276
+ return this.fetch(this.url('AdminSmartRampListCompletedOrders'), createHTTPRequest(args, headers)).then(res => {
1356
1277
  return buildResponse(res).then(_data => {
1357
1278
  return {
1358
- orders: <Array<SmartRampOrder>>(_data.orders)
1279
+ orders: <Array<SmartRampOrder>>_data.orders
1359
1280
  }
1360
1281
  })
1361
1282
  })
1362
1283
  }
1363
-
1364
- adminSmartRampListPendingOrders = (args: AdminSmartRampListPendingOrdersArgs, headers?: object): Promise<AdminSmartRampListPendingOrdersReturn> => {
1365
- return this.fetch(
1366
- this.url('AdminSmartRampListPendingOrders'),
1367
- createHTTPRequest(args, headers)).then((res) => {
1284
+
1285
+ adminSmartRampListPendingOrders = (
1286
+ args: AdminSmartRampListPendingOrdersArgs,
1287
+ headers?: object
1288
+ ): Promise<AdminSmartRampListPendingOrdersReturn> => {
1289
+ return this.fetch(this.url('AdminSmartRampListPendingOrders'), createHTTPRequest(args, headers)).then(res => {
1368
1290
  return buildResponse(res).then(_data => {
1369
1291
  return {
1370
- pendingOrders: <Array<SmartRampOrder>>(_data.pendingOrders)
1292
+ pendingOrders: <Array<SmartRampOrder>>_data.pendingOrders
1371
1293
  }
1372
1294
  })
1373
1295
  })
1374
1296
  }
1375
-
1297
+
1376
1298
  getInviteInfo = (headers?: object): Promise<GetInviteInfoReturn> => {
1377
- return this.fetch(
1378
- this.url('GetInviteInfo'),
1379
- createHTTPRequest({}, headers)
1380
- ).then((res) => {
1299
+ return this.fetch(this.url('GetInviteInfo'), createHTTPRequest({}, headers)).then(res => {
1381
1300
  return buildResponse(res).then(_data => {
1382
1301
  return {
1383
- inviteInfo: <InviteInfo>(_data.inviteInfo)
1302
+ inviteInfo: <InviteInfo>_data.inviteInfo
1384
1303
  }
1385
1304
  })
1386
1305
  })
1387
1306
  }
1388
-
1307
+
1389
1308
  isValidAccessCode = (args: IsValidAccessCodeArgs, headers?: object): Promise<IsValidAccessCodeReturn> => {
1390
- return this.fetch(
1391
- this.url('IsValidAccessCode'),
1392
- createHTTPRequest(args, headers)).then((res) => {
1309
+ return this.fetch(this.url('IsValidAccessCode'), createHTTPRequest(args, headers)).then(res => {
1393
1310
  return buildResponse(res).then(_data => {
1394
1311
  return {
1395
- status: <boolean>(_data.status)
1312
+ status: <boolean>_data.status
1396
1313
  }
1397
1314
  })
1398
1315
  })
1399
1316
  }
1400
-
1317
+
1401
1318
  internalClaimAccessCode = (args: InternalClaimAccessCodeArgs, headers?: object): Promise<InternalClaimAccessCodeReturn> => {
1402
- return this.fetch(
1403
- this.url('InternalClaimAccessCode'),
1404
- createHTTPRequest(args, headers)).then((res) => {
1319
+ return this.fetch(this.url('InternalClaimAccessCode'), createHTTPRequest(args, headers)).then(res => {
1405
1320
  return buildResponse(res).then(_data => {
1406
1321
  return {
1407
- status: <boolean>(_data.status)
1322
+ status: <boolean>_data.status
1408
1323
  }
1409
1324
  })
1410
1325
  })
1411
1326
  }
1412
-
1327
+
1413
1328
  walletRecover = (args: WalletRecoverArgs, headers?: object): Promise<WalletRecoverReturn> => {
1414
- return this.fetch(
1415
- this.url('WalletRecover'),
1416
- createHTTPRequest(args, headers)).then((res) => {
1329
+ return this.fetch(this.url('WalletRecover'), createHTTPRequest(args, headers)).then(res => {
1417
1330
  return buildResponse(res).then(_data => {
1418
1331
  return {
1419
- encryptedWallet: <string>(_data.encryptedWallet)
1332
+ encryptedWallet: <string>_data.encryptedWallet
1420
1333
  }
1421
1334
  })
1422
1335
  })
1423
1336
  }
1424
-
1337
+
1425
1338
  blockNumberAtTime = (args: BlockNumberAtTimeArgs, headers?: object): Promise<BlockNumberAtTimeReturn> => {
1426
- return this.fetch(
1427
- this.url('BlockNumberAtTime'),
1428
- createHTTPRequest(args, headers)).then((res) => {
1339
+ return this.fetch(this.url('BlockNumberAtTime'), createHTTPRequest(args, headers)).then(res => {
1429
1340
  return buildResponse(res).then(_data => {
1430
1341
  return {
1431
- blocks: <Array<number>>(_data.blocks)
1342
+ blocks: <Array<number>>_data.blocks
1432
1343
  }
1433
1344
  })
1434
1345
  })
1435
1346
  }
1436
-
1347
+
1437
1348
  paperSessionSecret = (args: PaperSessionSecretArgs, headers?: object): Promise<PaperSessionSecretReturn> => {
1438
- return this.fetch(
1439
- this.url('PaperSessionSecret'),
1440
- createHTTPRequest(args, headers)).then((res) => {
1349
+ return this.fetch(this.url('PaperSessionSecret'), createHTTPRequest(args, headers)).then(res => {
1441
1350
  return buildResponse(res).then(_data => {
1442
1351
  return {
1443
- secret: <string>(_data.secret)
1352
+ secret: <string>_data.secret
1444
1353
  }
1445
1354
  })
1446
1355
  })
1447
1356
  }
1448
-
1357
+
1449
1358
  paperSessionSecret2 = (args: PaperSessionSecret2Args, headers?: object): Promise<PaperSessionSecret2Return> => {
1450
- return this.fetch(
1451
- this.url('PaperSessionSecret2'),
1452
- createHTTPRequest(args, headers)).then((res) => {
1359
+ return this.fetch(this.url('PaperSessionSecret2'), createHTTPRequest(args, headers)).then(res => {
1453
1360
  return buildResponse(res).then(_data => {
1454
1361
  return {
1455
- secret: <string>(_data.secret)
1362
+ secret: <string>_data.secret
1456
1363
  }
1457
1364
  })
1458
1365
  })
1459
1366
  }
1460
-
1461
1367
  }
1462
1368
 
1463
-
1464
1369
  export interface WebRPCError extends Error {
1465
1370
  code: string
1466
1371
  msg: string
1467
- status: number
1372
+ status: number
1468
1373
  }
1469
1374
 
1470
1375
  const createHTTPRequest = (body: object = {}, headers: object = {}): object => {
@@ -1480,7 +1385,7 @@ const buildResponse = (res: Response): Promise<any> => {
1480
1385
  let data
1481
1386
  try {
1482
1387
  data = JSON.parse(text)
1483
- } catch(err) {
1388
+ } catch (err) {
1484
1389
  throw { code: 'unknown', msg: `expecting JSON, got: ${text}`, status: res.status } as WebRPCError
1485
1390
  }
1486
1391
  if (!res.ok) {