@0xsequence/api 0.0.0-20230524191416 → 0.0.0-20230612165320

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.
@@ -18,11 +18,11 @@ function _extends() {
18
18
  }
19
19
 
20
20
  /* eslint-disable */
21
- // sequence-api v0.4.0 d1f6b3f5d785b3363324bd82228e3efd291664fb
21
+ // sequence-api v0.4.0 e4aaaf3a3c07a1f339226fcac3b8addcb3120c7b
22
22
  // --
23
- // Code generated by webrpc-gen@v0.10.x-dev with typescript generator. DO NOT EDIT.
23
+ // Code generated by webrpc-gen@v0.10.x-dev with typescript@v0.10.0 generator. DO NOT EDIT.
24
24
  //
25
- // webrpc-gen -schema=api.ridl -target=typescript -client -out=./clients/api.gen.ts
25
+ // webrpc-gen -schema=api.ridl -target=typescript@v0.10.0 -client -out=./clients/api.gen.ts
26
26
 
27
27
  // WebRPC description and code-gen version
28
28
  const WebRPCVersion = "v1";
@@ -31,36 +31,38 @@ const WebRPCVersion = "v1";
31
31
  const WebRPCSchemaVersion = "v0.4.0";
32
32
 
33
33
  // Schema hash generated from your RIDL schema
34
- const WebRPCSchemaHash = "d1f6b3f5d785b3363324bd82228e3efd291664fb";
34
+ const WebRPCSchemaHash = "e4aaaf3a3c07a1f339226fcac3b8addcb3120c7b";
35
35
 
36
36
  //
37
37
  // Types
38
38
  //
39
39
 
40
- let SmartRampOrderStatus = /*#__PURE__*/function (SmartRampOrderStatus) {
40
+ exports.SmartRampOrderStatus = void 0;
41
+ (function (SmartRampOrderStatus) {
41
42
  SmartRampOrderStatus["UNKNOWN"] = "UNKNOWN";
42
43
  SmartRampOrderStatus["RUNNING_CHECKS"] = "RUNNING_CHECKS";
43
44
  SmartRampOrderStatus["PROCESSING"] = "PROCESSING";
44
45
  SmartRampOrderStatus["FAILED"] = "FAILED";
45
46
  SmartRampOrderStatus["COMPLETE"] = "COMPLETE";
46
- return SmartRampOrderStatus;
47
- }({});
48
- let SmartRampTxnStatus = /*#__PURE__*/function (SmartRampTxnStatus) {
47
+ })(exports.SmartRampOrderStatus || (exports.SmartRampOrderStatus = {}));
48
+ exports.SmartRampTxnStatus = void 0;
49
+ (function (SmartRampTxnStatus) {
49
50
  SmartRampTxnStatus["UNKNOWN"] = "UNKNOWN";
50
51
  SmartRampTxnStatus["SUCCESSFUL"] = "SUCCESSFUL";
51
52
  SmartRampTxnStatus["FAILED"] = "FAILED";
52
- return SmartRampTxnStatus;
53
- }({});
54
- let SortOrder = /*#__PURE__*/function (SortOrder) {
53
+ })(exports.SmartRampTxnStatus || (exports.SmartRampTxnStatus = {}));
54
+ exports.SortOrder = void 0;
55
+ (function (SortOrder) {
55
56
  SortOrder["DESC"] = "DESC";
56
57
  SortOrder["ASC"] = "ASC";
57
- return SortOrder;
58
- }({});
58
+ })(exports.SortOrder || (exports.SortOrder = {}));
59
59
  //
60
60
  // Client
61
61
  //
62
62
  class API {
63
63
  constructor(hostname, fetch) {
64
+ this.hostname = void 0;
65
+ this.fetch = void 0;
64
66
  this.path = '/rpc/API/';
65
67
  this.ping = headers => {
66
68
  return this.fetch(this.url('Ping'), createHTTPRequest({}, headers)).then(res => {
@@ -553,6 +555,15 @@ class API {
553
555
  });
554
556
  });
555
557
  };
558
+ this.paperSessionSecret2 = (args, headers) => {
559
+ return this.fetch(this.url('PaperSessionSecret2'), createHTTPRequest(args, headers)).then(res => {
560
+ return buildResponse(res).then(_data => {
561
+ return {
562
+ secret: _data.secret
563
+ };
564
+ });
565
+ });
566
+ };
556
567
  this.hostname = hostname;
557
568
  this.fetch = (input, init) => fetch(input, init);
558
569
  }
@@ -593,6 +604,7 @@ const fetch = typeof global === 'object' ? global.fetch : window.fetch;
593
604
  class SequenceAPIClient extends API {
594
605
  constructor(hostname, jwtAuth) {
595
606
  super(hostname.endsWith('/') ? hostname.slice(0, -1) : hostname, fetch);
607
+ this.jwtAuth = jwtAuth;
596
608
  this._fetch = (input, init) => {
597
609
  // automatically include jwt auth header to requests
598
610
  // if its been set on the api client
@@ -605,16 +617,12 @@ class SequenceAPIClient extends API {
605
617
  init.headers = _extends({}, init.headers, headers);
606
618
  return fetch(input, init);
607
619
  };
608
- this.jwtAuth = jwtAuth;
609
620
  this.fetch = this._fetch;
610
621
  }
611
622
  }
612
623
 
613
624
  exports.API = API;
614
625
  exports.SequenceAPIClient = SequenceAPIClient;
615
- exports.SmartRampOrderStatus = SmartRampOrderStatus;
616
- exports.SmartRampTxnStatus = SmartRampTxnStatus;
617
- exports.SortOrder = SortOrder;
618
626
  exports.WebRPCSchemaHash = WebRPCSchemaHash;
619
627
  exports.WebRPCSchemaVersion = WebRPCSchemaVersion;
620
628
  exports.WebRPCVersion = WebRPCVersion;
@@ -18,11 +18,11 @@ function _extends() {
18
18
  }
19
19
 
20
20
  /* eslint-disable */
21
- // sequence-api v0.4.0 d1f6b3f5d785b3363324bd82228e3efd291664fb
21
+ // sequence-api v0.4.0 e4aaaf3a3c07a1f339226fcac3b8addcb3120c7b
22
22
  // --
23
- // Code generated by webrpc-gen@v0.10.x-dev with typescript generator. DO NOT EDIT.
23
+ // Code generated by webrpc-gen@v0.10.x-dev with typescript@v0.10.0 generator. DO NOT EDIT.
24
24
  //
25
- // webrpc-gen -schema=api.ridl -target=typescript -client -out=./clients/api.gen.ts
25
+ // webrpc-gen -schema=api.ridl -target=typescript@v0.10.0 -client -out=./clients/api.gen.ts
26
26
 
27
27
  // WebRPC description and code-gen version
28
28
  const WebRPCVersion = "v1";
@@ -31,36 +31,38 @@ const WebRPCVersion = "v1";
31
31
  const WebRPCSchemaVersion = "v0.4.0";
32
32
 
33
33
  // Schema hash generated from your RIDL schema
34
- const WebRPCSchemaHash = "d1f6b3f5d785b3363324bd82228e3efd291664fb";
34
+ const WebRPCSchemaHash = "e4aaaf3a3c07a1f339226fcac3b8addcb3120c7b";
35
35
 
36
36
  //
37
37
  // Types
38
38
  //
39
39
 
40
- let SmartRampOrderStatus = /*#__PURE__*/function (SmartRampOrderStatus) {
40
+ exports.SmartRampOrderStatus = void 0;
41
+ (function (SmartRampOrderStatus) {
41
42
  SmartRampOrderStatus["UNKNOWN"] = "UNKNOWN";
42
43
  SmartRampOrderStatus["RUNNING_CHECKS"] = "RUNNING_CHECKS";
43
44
  SmartRampOrderStatus["PROCESSING"] = "PROCESSING";
44
45
  SmartRampOrderStatus["FAILED"] = "FAILED";
45
46
  SmartRampOrderStatus["COMPLETE"] = "COMPLETE";
46
- return SmartRampOrderStatus;
47
- }({});
48
- let SmartRampTxnStatus = /*#__PURE__*/function (SmartRampTxnStatus) {
47
+ })(exports.SmartRampOrderStatus || (exports.SmartRampOrderStatus = {}));
48
+ exports.SmartRampTxnStatus = void 0;
49
+ (function (SmartRampTxnStatus) {
49
50
  SmartRampTxnStatus["UNKNOWN"] = "UNKNOWN";
50
51
  SmartRampTxnStatus["SUCCESSFUL"] = "SUCCESSFUL";
51
52
  SmartRampTxnStatus["FAILED"] = "FAILED";
52
- return SmartRampTxnStatus;
53
- }({});
54
- let SortOrder = /*#__PURE__*/function (SortOrder) {
53
+ })(exports.SmartRampTxnStatus || (exports.SmartRampTxnStatus = {}));
54
+ exports.SortOrder = void 0;
55
+ (function (SortOrder) {
55
56
  SortOrder["DESC"] = "DESC";
56
57
  SortOrder["ASC"] = "ASC";
57
- return SortOrder;
58
- }({});
58
+ })(exports.SortOrder || (exports.SortOrder = {}));
59
59
  //
60
60
  // Client
61
61
  //
62
62
  class API {
63
63
  constructor(hostname, fetch) {
64
+ this.hostname = void 0;
65
+ this.fetch = void 0;
64
66
  this.path = '/rpc/API/';
65
67
  this.ping = headers => {
66
68
  return this.fetch(this.url('Ping'), createHTTPRequest({}, headers)).then(res => {
@@ -553,6 +555,15 @@ class API {
553
555
  });
554
556
  });
555
557
  };
558
+ this.paperSessionSecret2 = (args, headers) => {
559
+ return this.fetch(this.url('PaperSessionSecret2'), createHTTPRequest(args, headers)).then(res => {
560
+ return buildResponse(res).then(_data => {
561
+ return {
562
+ secret: _data.secret
563
+ };
564
+ });
565
+ });
566
+ };
556
567
  this.hostname = hostname;
557
568
  this.fetch = (input, init) => fetch(input, init);
558
569
  }
@@ -593,6 +604,7 @@ const fetch = typeof global === 'object' ? global.fetch : window.fetch;
593
604
  class SequenceAPIClient extends API {
594
605
  constructor(hostname, jwtAuth) {
595
606
  super(hostname.endsWith('/') ? hostname.slice(0, -1) : hostname, fetch);
607
+ this.jwtAuth = jwtAuth;
596
608
  this._fetch = (input, init) => {
597
609
  // automatically include jwt auth header to requests
598
610
  // if its been set on the api client
@@ -605,16 +617,12 @@ class SequenceAPIClient extends API {
605
617
  init.headers = _extends({}, init.headers, headers);
606
618
  return fetch(input, init);
607
619
  };
608
- this.jwtAuth = jwtAuth;
609
620
  this.fetch = this._fetch;
610
621
  }
611
622
  }
612
623
 
613
624
  exports.API = API;
614
625
  exports.SequenceAPIClient = SequenceAPIClient;
615
- exports.SmartRampOrderStatus = SmartRampOrderStatus;
616
- exports.SmartRampTxnStatus = SmartRampTxnStatus;
617
- exports.SortOrder = SortOrder;
618
626
  exports.WebRPCSchemaHash = WebRPCSchemaHash;
619
627
  exports.WebRPCSchemaVersion = WebRPCSchemaVersion;
620
628
  exports.WebRPCVersion = WebRPCVersion;
@@ -14,11 +14,11 @@ function _extends() {
14
14
  }
15
15
 
16
16
  /* eslint-disable */
17
- // sequence-api v0.4.0 d1f6b3f5d785b3363324bd82228e3efd291664fb
17
+ // sequence-api v0.4.0 e4aaaf3a3c07a1f339226fcac3b8addcb3120c7b
18
18
  // --
19
- // Code generated by webrpc-gen@v0.10.x-dev with typescript generator. DO NOT EDIT.
19
+ // Code generated by webrpc-gen@v0.10.x-dev with typescript@v0.10.0 generator. DO NOT EDIT.
20
20
  //
21
- // webrpc-gen -schema=api.ridl -target=typescript -client -out=./clients/api.gen.ts
21
+ // webrpc-gen -schema=api.ridl -target=typescript@v0.10.0 -client -out=./clients/api.gen.ts
22
22
 
23
23
  // WebRPC description and code-gen version
24
24
  const WebRPCVersion = "v1";
@@ -27,36 +27,38 @@ const WebRPCVersion = "v1";
27
27
  const WebRPCSchemaVersion = "v0.4.0";
28
28
 
29
29
  // Schema hash generated from your RIDL schema
30
- const WebRPCSchemaHash = "d1f6b3f5d785b3363324bd82228e3efd291664fb";
30
+ const WebRPCSchemaHash = "e4aaaf3a3c07a1f339226fcac3b8addcb3120c7b";
31
31
 
32
32
  //
33
33
  // Types
34
34
  //
35
35
 
36
- let SmartRampOrderStatus = /*#__PURE__*/function (SmartRampOrderStatus) {
36
+ let SmartRampOrderStatus;
37
+ (function (SmartRampOrderStatus) {
37
38
  SmartRampOrderStatus["UNKNOWN"] = "UNKNOWN";
38
39
  SmartRampOrderStatus["RUNNING_CHECKS"] = "RUNNING_CHECKS";
39
40
  SmartRampOrderStatus["PROCESSING"] = "PROCESSING";
40
41
  SmartRampOrderStatus["FAILED"] = "FAILED";
41
42
  SmartRampOrderStatus["COMPLETE"] = "COMPLETE";
42
- return SmartRampOrderStatus;
43
- }({});
44
- let SmartRampTxnStatus = /*#__PURE__*/function (SmartRampTxnStatus) {
43
+ })(SmartRampOrderStatus || (SmartRampOrderStatus = {}));
44
+ let SmartRampTxnStatus;
45
+ (function (SmartRampTxnStatus) {
45
46
  SmartRampTxnStatus["UNKNOWN"] = "UNKNOWN";
46
47
  SmartRampTxnStatus["SUCCESSFUL"] = "SUCCESSFUL";
47
48
  SmartRampTxnStatus["FAILED"] = "FAILED";
48
- return SmartRampTxnStatus;
49
- }({});
50
- let SortOrder = /*#__PURE__*/function (SortOrder) {
49
+ })(SmartRampTxnStatus || (SmartRampTxnStatus = {}));
50
+ let SortOrder;
51
+ (function (SortOrder) {
51
52
  SortOrder["DESC"] = "DESC";
52
53
  SortOrder["ASC"] = "ASC";
53
- return SortOrder;
54
- }({});
54
+ })(SortOrder || (SortOrder = {}));
55
55
  //
56
56
  // Client
57
57
  //
58
58
  class API {
59
59
  constructor(hostname, fetch) {
60
+ this.hostname = void 0;
61
+ this.fetch = void 0;
60
62
  this.path = '/rpc/API/';
61
63
  this.ping = headers => {
62
64
  return this.fetch(this.url('Ping'), createHTTPRequest({}, headers)).then(res => {
@@ -549,6 +551,15 @@ class API {
549
551
  });
550
552
  });
551
553
  };
554
+ this.paperSessionSecret2 = (args, headers) => {
555
+ return this.fetch(this.url('PaperSessionSecret2'), createHTTPRequest(args, headers)).then(res => {
556
+ return buildResponse(res).then(_data => {
557
+ return {
558
+ secret: _data.secret
559
+ };
560
+ });
561
+ });
562
+ };
552
563
  this.hostname = hostname;
553
564
  this.fetch = (input, init) => fetch(input, init);
554
565
  }
@@ -589,6 +600,7 @@ const fetch = typeof global === 'object' ? global.fetch : window.fetch;
589
600
  class SequenceAPIClient extends API {
590
601
  constructor(hostname, jwtAuth) {
591
602
  super(hostname.endsWith('/') ? hostname.slice(0, -1) : hostname, fetch);
603
+ this.jwtAuth = jwtAuth;
592
604
  this._fetch = (input, init) => {
593
605
  // automatically include jwt auth header to requests
594
606
  // if its been set on the api client
@@ -601,7 +613,6 @@ class SequenceAPIClient extends API {
601
613
  init.headers = _extends({}, init.headers, headers);
602
614
  return fetch(input, init);
603
615
  };
604
- this.jwtAuth = jwtAuth;
605
616
  this.fetch = this._fetch;
606
617
  }
607
618
  }
@@ -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 = "d1f6b3f5d785b3363324bd82228e3efd291664fb";
3
+ export declare const WebRPCSchemaHash = "e4aaaf3a3c07a1f339226fcac3b8addcb3120c7b";
4
4
  export declare enum SmartRampOrderStatus {
5
5
  UNKNOWN = "UNKNOWN",
6
6
  RUNNING_CHECKS = "RUNNING_CHECKS",
@@ -295,6 +295,7 @@ export interface API {
295
295
  walletRecover(args: WalletRecoverArgs, headers?: object): Promise<WalletRecoverReturn>;
296
296
  blockNumberAtTime(args: BlockNumberAtTimeArgs, headers?: object): Promise<BlockNumberAtTimeReturn>;
297
297
  paperSessionSecret(args: PaperSessionSecretArgs, headers?: object): Promise<PaperSessionSecretReturn>;
298
+ paperSessionSecret2(args: PaperSessionSecret2Args, headers?: object): Promise<PaperSessionSecret2Return>;
298
299
  }
299
300
  export interface PingArgs {
300
301
  }
@@ -659,6 +660,15 @@ export interface PaperSessionSecretArgs {
659
660
  export interface PaperSessionSecretReturn {
660
661
  secret: string;
661
662
  }
663
+ export interface PaperSessionSecret2Args {
664
+ chainName: string;
665
+ contractAddress: string;
666
+ paramsJson: string;
667
+ abi: string;
668
+ }
669
+ export interface PaperSessionSecret2Return {
670
+ secret: string;
671
+ }
662
672
  export declare class API implements API {
663
673
  protected hostname: string;
664
674
  protected fetch: Fetch;
@@ -718,6 +728,7 @@ export declare class API implements API {
718
728
  walletRecover: (args: WalletRecoverArgs, headers?: object | undefined) => Promise<WalletRecoverReturn>;
719
729
  blockNumberAtTime: (args: BlockNumberAtTimeArgs, headers?: object | undefined) => Promise<BlockNumberAtTimeReturn>;
720
730
  paperSessionSecret: (args: PaperSessionSecretArgs, headers?: object | undefined) => Promise<PaperSessionSecretReturn>;
731
+ paperSessionSecret2: (args: PaperSessionSecret2Args, headers?: object | undefined) => Promise<PaperSessionSecret2Return>;
721
732
  }
722
733
  export interface WebRPCError extends Error {
723
734
  code: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0xsequence/api",
3
- "version": "0.0.0-20230524191416",
3
+ "version": "0.0.0-20230612165320",
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,9 +1,9 @@
1
1
  /* eslint-disable */
2
- // sequence-api v0.4.0 d1f6b3f5d785b3363324bd82228e3efd291664fb
2
+ // sequence-api v0.4.0 e4aaaf3a3c07a1f339226fcac3b8addcb3120c7b
3
3
  // --
4
- // Code generated by webrpc-gen@v0.10.x-dev with typescript generator. DO NOT EDIT.
4
+ // Code generated by webrpc-gen@v0.10.x-dev with typescript@v0.10.0 generator. DO NOT EDIT.
5
5
  //
6
- // webrpc-gen -schema=api.ridl -target=typescript -client -out=./clients/api.gen.ts
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
9
  export const WebRPCVersion = "v1"
@@ -12,7 +12,7 @@ export const WebRPCVersion = "v1"
12
12
  export const WebRPCSchemaVersion = "v0.4.0"
13
13
 
14
14
  // Schema hash generated from your RIDL schema
15
- export const WebRPCSchemaHash = "d1f6b3f5d785b3363324bd82228e3efd291664fb"
15
+ export const WebRPCSchemaHash = "e4aaaf3a3c07a1f339226fcac3b8addcb3120c7b"
16
16
 
17
17
  //
18
18
  // Types
@@ -342,6 +342,7 @@ export interface API {
342
342
  walletRecover(args: WalletRecoverArgs, headers?: object): Promise<WalletRecoverReturn>
343
343
  blockNumberAtTime(args: BlockNumberAtTimeArgs, headers?: object): Promise<BlockNumberAtTimeReturn>
344
344
  paperSessionSecret(args: PaperSessionSecretArgs, headers?: object): Promise<PaperSessionSecretReturn>
345
+ paperSessionSecret2(args: PaperSessionSecret2Args, headers?: object): Promise<PaperSessionSecret2Return>
345
346
  }
346
347
 
347
348
  export interface PingArgs {
@@ -758,6 +759,16 @@ export interface PaperSessionSecretArgs {
758
759
  export interface PaperSessionSecretReturn {
759
760
  secret: string
760
761
  }
762
+ export interface PaperSessionSecret2Args {
763
+ chainName: string
764
+ contractAddress: string
765
+ paramsJson: string
766
+ abi: string
767
+ }
768
+
769
+ export interface PaperSessionSecret2Return {
770
+ secret: string
771
+ }
761
772
 
762
773
 
763
774
 
@@ -1435,6 +1446,18 @@ export class API implements API {
1435
1446
  })
1436
1447
  }
1437
1448
 
1449
+ paperSessionSecret2 = (args: PaperSessionSecret2Args, headers?: object): Promise<PaperSessionSecret2Return> => {
1450
+ return this.fetch(
1451
+ this.url('PaperSessionSecret2'),
1452
+ createHTTPRequest(args, headers)).then((res) => {
1453
+ return buildResponse(res).then(_data => {
1454
+ return {
1455
+ secret: <string>(_data.secret)
1456
+ }
1457
+ })
1458
+ })
1459
+ }
1460
+
1438
1461
  }
1439
1462
 
1440
1463