@compilot/js-sdk 2.30.2-staging → 2.30.3-dev

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.
@@ -1012,6 +1012,7 @@ function _objectSpread2(e) {
1012
1012
  * const compilotSdk = createSdk({ apiKey });
1013
1013
  *
1014
1014
  * const txAuthDataSignature = await compilotSdk.getTxAuthDataSignature({
1015
+ * workflowId: "123", // this has to be a workflow of type "SignatureGating"
1015
1016
  * namespace: "eip155",
1016
1017
  * contractAbi: ExampleGatedNFTMinterABI,
1017
1018
  * contractAddress: "0x123",
@@ -1053,22 +1054,22 @@ var getTxAuthDataSignatureFactory = function getTxAuthDataSignatureFactory(deps)
1053
1054
  return _regeneratorRuntime().wrap(function _callee$(_context) {
1054
1055
  while (1) switch (_context.prev = _context.next) {
1055
1056
  case 0:
1056
- if (!(params.txAuthInput.namespace !== "eip155")) {
1057
+ if (!(params.namespace !== "eip155")) {
1057
1058
  _context.next = 2;
1058
1059
  break;
1059
1060
  }
1060
- throw new Error("Unsupported namespace: ".concat(params.txAuthInput.namespace));
1061
+ throw new Error("Unsupported namespace: ".concat(params.namespace));
1061
1062
  case 2:
1062
1063
  _context.next = 4;
1063
1064
  return deps.compilotApiClient.sigGating.publicRouterSignatureGatingGetTxAuthDataSignature({
1064
- requestBody: params.txAuthInput,
1065
+ requestBody: params,
1065
1066
  workflowId: params.workflowId
1066
1067
  });
1067
1068
  case 4:
1068
1069
  res = _context.sent;
1069
1070
  return _context.abrupt("return", identitySchemas.ExtendedTxAuthDataSignatureResponse.parse(_objectSpread2({
1070
- namespace: params.txAuthInput.namespace,
1071
- userAddress: params.txAuthInput.userAddress
1071
+ namespace: params.namespace,
1072
+ userAddress: params.userAddress
1072
1073
  }, res)));
1073
1074
  case 6:
1074
1075
  case "end":
@@ -1087,22 +1088,22 @@ var getTxAuthDataSignatureFactory = function getTxAuthDataSignatureFactory(deps)
1087
1088
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
1088
1089
  while (1) switch (_context2.prev = _context2.next) {
1089
1090
  case 0:
1090
- if (!(params.txAuthInput.namespace !== "tezos")) {
1091
+ if (!(params.namespace !== "tezos")) {
1091
1092
  _context2.next = 2;
1092
1093
  break;
1093
1094
  }
1094
- throw new Error("Unsupported namespace: ".concat(params.txAuthInput.namespace));
1095
+ throw new Error("Unsupported namespace: ".concat(params.namespace));
1095
1096
  case 2:
1096
1097
  _context2.next = 4;
1097
1098
  return deps.compilotApiClient.sigGating.publicRouterSignatureGatingGetTezosTxAuthDataSignature({
1098
- requestBody: params.txAuthInput,
1099
+ requestBody: params,
1099
1100
  workflowId: params.workflowId
1100
1101
  });
1101
1102
  case 4:
1102
1103
  res = _context2.sent;
1103
1104
  return _context2.abrupt("return", identitySchemas.ExtendedTezosTxAuthDataSignatureResponse.parse(_objectSpread2({
1104
- namespace: params.txAuthInput.namespace,
1105
- userAddress: params.txAuthInput.userAddress
1105
+ namespace: params.namespace,
1106
+ userAddress: params.userAddress
1106
1107
  }, res)));
1107
1108
  case 6:
1108
1109
  case "end":
@@ -1012,6 +1012,7 @@ function _objectSpread2(e) {
1012
1012
  * const compilotSdk = createSdk({ apiKey });
1013
1013
  *
1014
1014
  * const txAuthDataSignature = await compilotSdk.getTxAuthDataSignature({
1015
+ * workflowId: "123", // this has to be a workflow of type "SignatureGating"
1015
1016
  * namespace: "eip155",
1016
1017
  * contractAbi: ExampleGatedNFTMinterABI,
1017
1018
  * contractAddress: "0x123",
@@ -1053,22 +1054,22 @@ var getTxAuthDataSignatureFactory = function getTxAuthDataSignatureFactory(deps)
1053
1054
  return _regeneratorRuntime().wrap(function _callee$(_context) {
1054
1055
  while (1) switch (_context.prev = _context.next) {
1055
1056
  case 0:
1056
- if (!(params.txAuthInput.namespace !== "eip155")) {
1057
+ if (!(params.namespace !== "eip155")) {
1057
1058
  _context.next = 2;
1058
1059
  break;
1059
1060
  }
1060
- throw new Error("Unsupported namespace: ".concat(params.txAuthInput.namespace));
1061
+ throw new Error("Unsupported namespace: ".concat(params.namespace));
1061
1062
  case 2:
1062
1063
  _context.next = 4;
1063
1064
  return deps.compilotApiClient.sigGating.publicRouterSignatureGatingGetTxAuthDataSignature({
1064
- requestBody: params.txAuthInput,
1065
+ requestBody: params,
1065
1066
  workflowId: params.workflowId
1066
1067
  });
1067
1068
  case 4:
1068
1069
  res = _context.sent;
1069
1070
  return _context.abrupt("return", identitySchemas.ExtendedTxAuthDataSignatureResponse.parse(_objectSpread2({
1070
- namespace: params.txAuthInput.namespace,
1071
- userAddress: params.txAuthInput.userAddress
1071
+ namespace: params.namespace,
1072
+ userAddress: params.userAddress
1072
1073
  }, res)));
1073
1074
  case 6:
1074
1075
  case "end":
@@ -1087,22 +1088,22 @@ var getTxAuthDataSignatureFactory = function getTxAuthDataSignatureFactory(deps)
1087
1088
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
1088
1089
  while (1) switch (_context2.prev = _context2.next) {
1089
1090
  case 0:
1090
- if (!(params.txAuthInput.namespace !== "tezos")) {
1091
+ if (!(params.namespace !== "tezos")) {
1091
1092
  _context2.next = 2;
1092
1093
  break;
1093
1094
  }
1094
- throw new Error("Unsupported namespace: ".concat(params.txAuthInput.namespace));
1095
+ throw new Error("Unsupported namespace: ".concat(params.namespace));
1095
1096
  case 2:
1096
1097
  _context2.next = 4;
1097
1098
  return deps.compilotApiClient.sigGating.publicRouterSignatureGatingGetTezosTxAuthDataSignature({
1098
- requestBody: params.txAuthInput,
1099
+ requestBody: params,
1099
1100
  workflowId: params.workflowId
1100
1101
  });
1101
1102
  case 4:
1102
1103
  res = _context2.sent;
1103
1104
  return _context2.abrupt("return", identitySchemas.ExtendedTezosTxAuthDataSignatureResponse.parse(_objectSpread2({
1104
- namespace: params.txAuthInput.namespace,
1105
- userAddress: params.txAuthInput.userAddress
1105
+ namespace: params.namespace,
1106
+ userAddress: params.userAddress
1106
1107
  }, res)));
1107
1108
  case 6:
1108
1109
  case "end":
@@ -1010,6 +1010,7 @@ function _objectSpread2(e) {
1010
1010
  * const compilotSdk = createSdk({ apiKey });
1011
1011
  *
1012
1012
  * const txAuthDataSignature = await compilotSdk.getTxAuthDataSignature({
1013
+ * workflowId: "123", // this has to be a workflow of type "SignatureGating"
1013
1014
  * namespace: "eip155",
1014
1015
  * contractAbi: ExampleGatedNFTMinterABI,
1015
1016
  * contractAddress: "0x123",
@@ -1051,22 +1052,22 @@ var getTxAuthDataSignatureFactory = function getTxAuthDataSignatureFactory(deps)
1051
1052
  return _regeneratorRuntime().wrap(function _callee$(_context) {
1052
1053
  while (1) switch (_context.prev = _context.next) {
1053
1054
  case 0:
1054
- if (!(params.txAuthInput.namespace !== "eip155")) {
1055
+ if (!(params.namespace !== "eip155")) {
1055
1056
  _context.next = 2;
1056
1057
  break;
1057
1058
  }
1058
- throw new Error("Unsupported namespace: ".concat(params.txAuthInput.namespace));
1059
+ throw new Error("Unsupported namespace: ".concat(params.namespace));
1059
1060
  case 2:
1060
1061
  _context.next = 4;
1061
1062
  return deps.compilotApiClient.sigGating.publicRouterSignatureGatingGetTxAuthDataSignature({
1062
- requestBody: params.txAuthInput,
1063
+ requestBody: params,
1063
1064
  workflowId: params.workflowId
1064
1065
  });
1065
1066
  case 4:
1066
1067
  res = _context.sent;
1067
1068
  return _context.abrupt("return", ExtendedTxAuthDataSignatureResponse.parse(_objectSpread2({
1068
- namespace: params.txAuthInput.namespace,
1069
- userAddress: params.txAuthInput.userAddress
1069
+ namespace: params.namespace,
1070
+ userAddress: params.userAddress
1070
1071
  }, res)));
1071
1072
  case 6:
1072
1073
  case "end":
@@ -1085,22 +1086,22 @@ var getTxAuthDataSignatureFactory = function getTxAuthDataSignatureFactory(deps)
1085
1086
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
1086
1087
  while (1) switch (_context2.prev = _context2.next) {
1087
1088
  case 0:
1088
- if (!(params.txAuthInput.namespace !== "tezos")) {
1089
+ if (!(params.namespace !== "tezos")) {
1089
1090
  _context2.next = 2;
1090
1091
  break;
1091
1092
  }
1092
- throw new Error("Unsupported namespace: ".concat(params.txAuthInput.namespace));
1093
+ throw new Error("Unsupported namespace: ".concat(params.namespace));
1093
1094
  case 2:
1094
1095
  _context2.next = 4;
1095
1096
  return deps.compilotApiClient.sigGating.publicRouterSignatureGatingGetTezosTxAuthDataSignature({
1096
- requestBody: params.txAuthInput,
1097
+ requestBody: params,
1097
1098
  workflowId: params.workflowId
1098
1099
  });
1099
1100
  case 4:
1100
1101
  res = _context2.sent;
1101
1102
  return _context2.abrupt("return", ExtendedTezosTxAuthDataSignatureResponse.parse(_objectSpread2({
1102
- namespace: params.txAuthInput.namespace,
1103
- userAddress: params.txAuthInput.userAddress
1103
+ namespace: params.namespace,
1104
+ userAddress: params.userAddress
1104
1105
  }, res)));
1105
1106
  case 6:
1106
1107
  case "end":
@@ -1,5 +1,5 @@
1
1
  import type { NexeraAPIClient } from "@nexeraid/api-client";
2
- import type { ExtendedTezosTxAuthInput, ExtendedTxAuthInput, TxAuthDataSignatureResponse } from "@nexeraid/identity-schemas";
2
+ import type { Eip155TxAuthInputJsSdk, TezosTxAuthInputJsSdk, TxAuthDataSignatureResponse } from "@nexeraid/identity-schemas";
3
3
  import { ExtendedTezosTxAuthDataSignatureResponse } from "@nexeraid/identity-schemas";
4
4
  /**
5
5
  * Get the signature of the transaction authorization data
@@ -19,6 +19,7 @@ import { ExtendedTezosTxAuthDataSignatureResponse } from "@nexeraid/identity-sch
19
19
  * const compilotSdk = createSdk({ apiKey });
20
20
  *
21
21
  * const txAuthDataSignature = await compilotSdk.getTxAuthDataSignature({
22
+ * workflowId: "123", // this has to be a workflow of type "SignatureGating"
22
23
  * namespace: "eip155",
23
24
  * contractAbi: ExampleGatedNFTMinterABI,
24
25
  * contractAddress: "0x123",
@@ -50,8 +51,8 @@ import { ExtendedTezosTxAuthDataSignatureResponse } from "@nexeraid/identity-sch
50
51
  * ```
51
52
  */
52
53
  export type GetTxAuthDataSignatureFn = {
53
- (params: ExtendedTxAuthInput): Promise<TxAuthDataSignatureResponse>;
54
- (params: ExtendedTezosTxAuthInput): Promise<ExtendedTezosTxAuthDataSignatureResponse>;
54
+ (params: Eip155TxAuthInputJsSdk): Promise<TxAuthDataSignatureResponse>;
55
+ (params: TezosTxAuthInputJsSdk): Promise<ExtendedTezosTxAuthDataSignatureResponse>;
55
56
  };
56
57
  /** @hidden */
57
58
  export declare const getTxAuthDataSignatureFactory: (deps: {
@@ -1 +1 @@
1
- {"version":3,"file":"getTxAuthDataSignature.d.ts","sourceRoot":"../../../../src/actions","sources":["getTxAuthDataSignature.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,KAAK,EAIV,wBAAwB,EACxB,mBAAmB,EACnB,2BAA2B,EAC5B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,wCAAwC,EAEzC,MAAM,4BAA4B,CAAC;AAEpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AACH,MAAM,MAAM,wBAAwB,GAAG;IACrC,CAAC,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAAC,2BAA2B,CAAC,CAAC;IACpE,CACE,MAAM,EAAE,wBAAwB,GAC/B,OAAO,CAAC,wCAAwC,CAAC,CAAC;CACtD,CAAC;AAEF,cAAc;AACd,eAAO,MAAM,6BAA6B,SAAU;IAClD,iBAAiB,EAAE,eAAe,CAAC;CACpC,KAAG,wBA2DH,CAAC"}
1
+ {"version":3,"file":"getTxAuthDataSignature.d.ts","sourceRoot":"../../../../src/actions","sources":["getTxAuthDataSignature.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,KAAK,EAGV,sBAAsB,EACtB,qBAAqB,EACrB,2BAA2B,EAC5B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,wCAAwC,EAEzC,MAAM,4BAA4B,CAAC;AAEpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,MAAM,MAAM,wBAAwB,GAAG;IACrC,CAAC,MAAM,EAAE,sBAAsB,GAAG,OAAO,CAAC,2BAA2B,CAAC,CAAC;IACvE,CACE,MAAM,EAAE,qBAAqB,GAC5B,OAAO,CAAC,wCAAwC,CAAC,CAAC;CACtD,CAAC;AAEF,cAAc;AACd,eAAO,MAAM,6BAA6B,SAAU;IAClD,iBAAiB,EAAE,eAAe,CAAC;CACpC,KAAG,wBAuDH,CAAC"}
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@compilot/js-sdk",
3
- "version": "2.30.2-staging",
3
+ "version": "2.30.3-dev",
4
4
  "description": "ComPilot JS SDK",
5
5
  "keywords": [],
6
6
  "license": "ISC",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@compilot/js-sdk",
3
- "version": "2.30.2-staging",
3
+ "version": "2.30.3-dev",
4
4
  "description": "ComPilot JS SDK",
5
5
  "keywords": [],
6
6
  "license": "ISC",
@@ -34,10 +34,10 @@
34
34
  "pino": "^9.5.0",
35
35
  "svix": "1.21.0",
36
36
  "zod": "^3.23.8",
37
- "@nexeraid/api-client": "2.30.1-staging",
38
- "@nexeraid/identity-api-client": "2.30.1-staging",
39
- "@nexeraid/identity-schemas": "2.31.0-staging",
40
- "@nexeraid/logger": "2.30.1-staging"
37
+ "@nexeraid/api-client": "2.30.1-dev",
38
+ "@nexeraid/identity-api-client": "2.30.1-dev",
39
+ "@nexeraid/identity-schemas": "2.32.0-dev",
40
+ "@nexeraid/logger": "2.30.1-dev"
41
41
  },
42
42
  "devDependencies": {
43
43
  "prettier": "^3.3.3",