@getpara/rest-sdk 3.5.0 → 3.6.0

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/dist/cjs/index.js CHANGED
@@ -35,15 +35,15 @@ var __async = (__this, __arguments, generator) => {
35
35
  step((generator = generator.apply(__this, __arguments)).next());
36
36
  });
37
37
  };
38
- var src_exports = {};
39
- __export(src_exports, {
38
+ var index_exports = {};
39
+ __export(index_exports, {
40
40
  ParaRestClient: () => ParaRestClient,
41
41
  ParaRestError: () => ParaRestError,
42
42
  ParaRestSerializationError: () => ParaRestSerializationError,
43
43
  ParaRestValidationError: () => ParaRestValidationError,
44
44
  toRestJson: () => toRestJson
45
45
  });
46
- module.exports = __toCommonJS(src_exports);
46
+ module.exports = __toCommonJS(index_exports);
47
47
  class ParaRestError extends Error {
48
48
  constructor({
49
49
  status,
@@ -63,7 +63,7 @@ function createParaRestViemAccount(options) {
63
63
  publicKey,
64
64
  source: "custom",
65
65
  type: "local",
66
- sign: (_0) => __async(this, [_0], function* ({ hash }) {
66
+ sign: (_0) => __async(null, [_0], function* ({ hash }) {
67
67
  const res = yield client.signRaw(walletId, {
68
68
  data: hash,
69
69
  encoding: "hex",
@@ -71,7 +71,7 @@ function createParaRestViemAccount(options) {
71
71
  });
72
72
  return normalizeSignature(res.signature);
73
73
  }),
74
- signMessage: (_0) => __async(this, [_0], function* ({ message }) {
74
+ signMessage: (_0) => __async(null, [_0], function* ({ message }) {
75
75
  if (typeof message !== "string") {
76
76
  const res2 = yield client.signRaw(walletId, {
77
77
  data: (0, import_viem.hashMessage)(message),
@@ -83,13 +83,13 @@ function createParaRestViemAccount(options) {
83
83
  const res = yield client.signMessage(walletId, { message });
84
84
  return normalizeSignature(res.signature);
85
85
  }),
86
- signTypedData: (typedDataDefinition) => __async(this, null, function* () {
86
+ signTypedData: (typedDataDefinition) => __async(null, null, function* () {
87
87
  const res = yield client.signTypedData(walletId, {
88
88
  typedData: toRestTypedData(typedDataDefinition)
89
89
  });
90
90
  return normalizeSignature(res.signature);
91
91
  }),
92
- signTransaction: (transaction, args) => __async(this, null, function* () {
92
+ signTransaction: (transaction, args) => __async(null, null, function* () {
93
93
  if (args == null ? void 0 : args.serializer) {
94
94
  throw new import__.ParaRestValidationError("custom transaction serializers are not supported by the REST signer");
95
95
  }
@@ -98,7 +98,7 @@ function createParaRestViemAccount(options) {
98
98
  });
99
99
  return res.signedTransaction;
100
100
  }),
101
- signAuthorization: (authorization) => __async(this, null, function* () {
101
+ signAuthorization: (authorization) => __async(null, null, function* () {
102
102
  const res = yield client.signAuthorization(walletId, {
103
103
  authorization
104
104
  });
@@ -43,7 +43,7 @@ function createParaRestViemAccount(options) {
43
43
  publicKey,
44
44
  source: "custom",
45
45
  type: "local",
46
- sign: (_0) => __async(this, [_0], function* ({ hash }) {
46
+ sign: (_0) => __async(null, [_0], function* ({ hash }) {
47
47
  const res = yield client.signRaw(walletId, {
48
48
  data: hash,
49
49
  encoding: "hex",
@@ -51,7 +51,7 @@ function createParaRestViemAccount(options) {
51
51
  });
52
52
  return normalizeSignature(res.signature);
53
53
  }),
54
- signMessage: (_0) => __async(this, [_0], function* ({ message }) {
54
+ signMessage: (_0) => __async(null, [_0], function* ({ message }) {
55
55
  if (typeof message !== "string") {
56
56
  const res2 = yield client.signRaw(walletId, {
57
57
  data: hashMessage(message),
@@ -63,13 +63,13 @@ function createParaRestViemAccount(options) {
63
63
  const res = yield client.signMessage(walletId, { message });
64
64
  return normalizeSignature(res.signature);
65
65
  }),
66
- signTypedData: (typedDataDefinition) => __async(this, null, function* () {
66
+ signTypedData: (typedDataDefinition) => __async(null, null, function* () {
67
67
  const res = yield client.signTypedData(walletId, {
68
68
  typedData: toRestTypedData(typedDataDefinition)
69
69
  });
70
70
  return normalizeSignature(res.signature);
71
71
  }),
72
- signTransaction: (transaction, args) => __async(this, null, function* () {
72
+ signTransaction: (transaction, args) => __async(null, null, function* () {
73
73
  if (args == null ? void 0 : args.serializer) {
74
74
  throw new ParaRestValidationError("custom transaction serializers are not supported by the REST signer");
75
75
  }
@@ -78,7 +78,7 @@ function createParaRestViemAccount(options) {
78
78
  });
79
79
  return res.signedTransaction;
80
80
  }),
81
- signAuthorization: (authorization) => __async(this, null, function* () {
81
+ signAuthorization: (authorization) => __async(null, null, function* () {
82
82
  const res = yield client.signAuthorization(walletId, {
83
83
  authorization
84
84
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getpara/rest-sdk",
3
- "version": "3.5.0",
3
+ "version": "3.6.0",
4
4
  "description": "Typed server-side SDK for Para REST wallet management and signing",
5
5
  "author": "Para Team <hello@getpara.com> (https://getpara.com)",
6
6
  "homepage": "https://docs.getpara.com/v2/rest/sdk",
@@ -110,5 +110,5 @@
110
110
  }
111
111
  },
112
112
  "typings": "dist/types/index.d.ts",
113
- "gitHead": "2e70485f8f206ff50f58b339ebf0922fd259858f"
113
+ "gitHead": "565535ab0cf38d65f6996fc9f1ede52d133ddac0"
114
114
  }