@0xsequence/relayer 0.0.0-20240123145607 → 0.0.0-20240123145919

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.
@@ -338,6 +338,8 @@ class Relayer {
338
338
  });
339
339
  };
340
340
  this.sendMetaTxn = (args, headers) => {
341
+ console.log("/SendMetaTxn");
342
+ console.log(JSON.stringify(args, undefined, 2));
341
343
  return this.fetch(this.url('SendMetaTxn'), createHTTPRequest(args, headers)).then(res => {
342
344
  return buildResponse(res).then(_data => {
343
345
  return {
@@ -587,7 +589,6 @@ const buildResponse = res => {
587
589
  if (!res.ok) {
588
590
  throw data; // webrpc error response
589
591
  }
590
-
591
592
  return data;
592
593
  });
593
594
  };
@@ -853,6 +854,7 @@ class MetaTransactionResponseException {
853
854
  //
854
855
  // This interface exists for type-safety purposes to protect against passing non-FeeQuotes to
855
856
  // Relayer.relay(), or any other functions that call it indirectly (e.g. Account.sendTransaction).
857
+
856
858
  function isRelayer(cand) {
857
859
  return typeof cand === 'object' && typeof cand.simulate === 'function' && typeof cand.getFeeOptions === 'function' && typeof cand.gasRefundOptions === 'function' && typeof cand.getNonce === 'function' && typeof cand.relay === 'function' && typeof cand.wait === 'function';
858
860
  }
@@ -338,6 +338,8 @@ class Relayer {
338
338
  });
339
339
  };
340
340
  this.sendMetaTxn = (args, headers) => {
341
+ console.log("/SendMetaTxn");
342
+ console.log(JSON.stringify(args, undefined, 2));
341
343
  return this.fetch(this.url('SendMetaTxn'), createHTTPRequest(args, headers)).then(res => {
342
344
  return buildResponse(res).then(_data => {
343
345
  return {
@@ -587,7 +589,6 @@ const buildResponse = res => {
587
589
  if (!res.ok) {
588
590
  throw data; // webrpc error response
589
591
  }
590
-
591
592
  return data;
592
593
  });
593
594
  };
@@ -853,6 +854,7 @@ class MetaTransactionResponseException {
853
854
  //
854
855
  // This interface exists for type-safety purposes to protect against passing non-FeeQuotes to
855
856
  // Relayer.relay(), or any other functions that call it indirectly (e.g. Account.sendTransaction).
857
+
856
858
  function isRelayer(cand) {
857
859
  return typeof cand === 'object' && typeof cand.simulate === 'function' && typeof cand.getFeeOptions === 'function' && typeof cand.gasRefundOptions === 'function' && typeof cand.getNonce === 'function' && typeof cand.relay === 'function' && typeof cand.wait === 'function';
858
860
  }
@@ -334,6 +334,8 @@ class Relayer {
334
334
  });
335
335
  };
336
336
  this.sendMetaTxn = (args, headers) => {
337
+ console.log("/SendMetaTxn");
338
+ console.log(JSON.stringify(args, undefined, 2));
337
339
  return this.fetch(this.url('SendMetaTxn'), createHTTPRequest(args, headers)).then(res => {
338
340
  return buildResponse(res).then(_data => {
339
341
  return {
@@ -583,7 +585,6 @@ const buildResponse = res => {
583
585
  if (!res.ok) {
584
586
  throw data; // webrpc error response
585
587
  }
586
-
587
588
  return data;
588
589
  });
589
590
  };
@@ -849,6 +850,7 @@ class MetaTransactionResponseException {
849
850
  //
850
851
  // This interface exists for type-safety purposes to protect against passing non-FeeQuotes to
851
852
  // Relayer.relay(), or any other functions that call it indirectly (e.g. Account.sendTransaction).
853
+
852
854
  function isRelayer(cand) {
853
855
  return typeof cand === 'object' && typeof cand.simulate === 'function' && typeof cand.getFeeOptions === 'function' && typeof cand.gasRefundOptions === 'function' && typeof cand.getNonce === 'function' && typeof cand.relay === 'function' && typeof cand.wait === 'function';
854
856
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0xsequence/relayer",
3
- "version": "0.0.0-20240123145607",
3
+ "version": "0.0.0-20240123145919",
4
4
  "description": "relayer sub-package for Sequence",
5
5
  "repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/relayer",
6
6
  "source": "src/index.ts",
@@ -9,9 +9,9 @@
9
9
  "author": "Horizon Blockchain Games",
10
10
  "license": "Apache-2.0",
11
11
  "dependencies": {
12
- "@0xsequence/abi": "0.0.0-20240123145607",
13
- "@0xsequence/utils": "0.0.0-20240123145607",
14
- "@0xsequence/core": "0.0.0-20240123145607"
12
+ "@0xsequence/abi": "0.0.0-20240123145919",
13
+ "@0xsequence/core": "0.0.0-20240123145919",
14
+ "@0xsequence/utils": "0.0.0-20240123145919"
15
15
  },
16
16
  "peerDependencies": {
17
17
  "ethers": ">=5.5 < 6"
@@ -19,8 +19,8 @@
19
19
  "devDependencies": {
20
20
  "@0xsequence/wallet-contracts": "^1.10.0",
21
21
  "ethers": "^5.7.2",
22
- "@0xsequence/signhub": "0.0.0-20240123145607",
23
- "@0xsequence/tests": "0.0.0-20240123145607"
22
+ "@0xsequence/signhub": "0.0.0-20240123145919",
23
+ "@0xsequence/tests": "0.0.0-20240123145919"
24
24
  },
25
25
  "files": [
26
26
  "src",
@@ -591,6 +591,8 @@ export class Relayer implements Relayer {
591
591
  }
592
592
 
593
593
  sendMetaTxn = (args: SendMetaTxnArgs, headers?: object): Promise<SendMetaTxnReturn> => {
594
+ console.log("/SendMetaTxn")
595
+ console.log(JSON.stringify(args, undefined, 2))
594
596
  return this.fetch(this.url('SendMetaTxn'), createHTTPRequest(args, headers)).then(res => {
595
597
  return buildResponse(res).then(_data => {
596
598
  return {