@taquito/tzip16 20.0.2-beta.1 → 20.1.0-RC.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.
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.tzip16 = void 0;
3
+ exports.tzip16 = tzip16;
4
4
  const tzip16_contract_abstraction_1 = require("./tzip16-contract-abstraction");
5
5
  const ABSTRACTION_KEY = Symbol('Tzip16ContractAbstractionObjectKey');
6
6
  function tzip16(abs, context) {
@@ -15,4 +15,3 @@ function tzip16(abs, context) {
15
15
  },
16
16
  });
17
17
  }
18
- exports.tzip16 = tzip16;
@@ -15,8 +15,8 @@ class HttpHandler {
15
15
  constructor() {
16
16
  this.httpBackend = new http_utils_1.HttpBackend();
17
17
  }
18
- getMetadata(_contractAbstraction, { protocol, location }, _context) {
19
- return __awaiter(this, void 0, void 0, function* () {
18
+ getMetadata(_contractAbstraction_1, _a, _context_1) {
19
+ return __awaiter(this, arguments, void 0, function* (_contractAbstraction, { protocol, location }, _context) {
20
20
  return this.httpBackend.createRequest({
21
21
  url: `${protocol}:${decodeURIComponent(location)}`,
22
22
  method: 'GET',
@@ -16,8 +16,8 @@ class IpfsHttpHandler {
16
16
  this.httpBackend = new http_utils_1.HttpBackend();
17
17
  this._ipfsGateway = ipfsGatheway ? ipfsGatheway : 'ipfs.io';
18
18
  }
19
- getMetadata(_contractAbstraction, { location }, _context) {
20
- return __awaiter(this, void 0, void 0, function* () {
19
+ getMetadata(_contractAbstraction_1, _a, _context_1) {
20
+ return __awaiter(this, arguments, void 0, function* (_contractAbstraction, { location }, _context) {
21
21
  return this.httpBackend.createRequest({
22
22
  url: `https://${this._ipfsGateway}/ipfs/${location.substring(2)}/`,
23
23
  method: 'GET',
@@ -22,8 +22,8 @@ class TezosStorageHandler {
22
22
  constructor() {
23
23
  this.TEZOS_STORAGE_REGEX = /^(?:\/\/(KT1\w{33})(?:\.(.+))?\/)?([\w|%]+)$/;
24
24
  }
25
- getMetadata(contractAbstraction, { location }, context) {
26
- return __awaiter(this, void 0, void 0, function* () {
25
+ getMetadata(contractAbstraction_1, _a, context_1) {
26
+ return __awaiter(this, arguments, void 0, function* (contractAbstraction, { location }, context) {
27
27
  const parsedTezosStorageUri = this.parseTezosStorageUri(location);
28
28
  if (!parsedTezosStorageUri) {
29
29
  throw new errors_1.InvalidUriError(`tezos-storage:${location}`);
@@ -136,8 +136,8 @@ class Tzip16ContractAbstraction {
136
136
  });
137
137
  }
138
138
  initializeMetadataViewsList() {
139
- var _a;
140
139
  return __awaiter(this, void 0, void 0, function* () {
140
+ var _a;
141
141
  const { metadata } = yield this.getMetadata();
142
142
  const metadataViews = {};
143
143
  (_a = metadata.views) === null || _a === void 0 ? void 0 : _a.forEach((view) => this.createViewImplementations(view, metadataViews));
@@ -1,8 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.calculateSHA256Hash = void 0;
3
+ exports.calculateSHA256Hash = calculateSHA256Hash;
4
4
  const crypto_js_1 = require("crypto-js");
5
5
  function calculateSHA256Hash(preimage) {
6
6
  return crypto_js_1.default.SHA256(preimage).toString(crypto_js_1.default.enc.Hex);
7
7
  }
8
- exports.calculateSHA256Hash = calculateSHA256Hash;
@@ -3,6 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
4
  // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN!
5
5
  exports.VERSION = {
6
- "commitHash": "a9cdc31ccbc6e2ed58dedaf3c8c4f0c62bc3ae02",
7
- "version": "20.0.2-beta.1"
6
+ "commitHash": "f903ced4144b4fd7b2afd585612dcf342912299b",
7
+ "version": "20.1.0-RC.0"
8
8
  };
@@ -44,8 +44,8 @@ class HttpHandler {
44
44
  constructor() {
45
45
  this.httpBackend = new HttpBackend();
46
46
  }
47
- getMetadata(_contractAbstraction, { protocol, location }, _context) {
48
- return __awaiter(this, void 0, void 0, function* () {
47
+ getMetadata(_contractAbstraction_1, _a, _context_1) {
48
+ return __awaiter(this, arguments, void 0, function* (_contractAbstraction, { protocol, location }, _context) {
49
49
  return this.httpBackend.createRequest({
50
50
  url: `${protocol}:${decodeURIComponent(location)}`,
51
51
  method: 'GET',
@@ -190,8 +190,8 @@ class TezosStorageHandler {
190
190
  constructor() {
191
191
  this.TEZOS_STORAGE_REGEX = /^(?:\/\/(KT1\w{33})(?:\.(.+))?\/)?([\w|%]+)$/;
192
192
  }
193
- getMetadata(contractAbstraction, { location }, context) {
194
- return __awaiter(this, void 0, void 0, function* () {
193
+ getMetadata(contractAbstraction_1, _a, context_1) {
194
+ return __awaiter(this, arguments, void 0, function* (contractAbstraction, { location }, context) {
195
195
  const parsedTezosStorageUri = this.parseTezosStorageUri(location);
196
196
  if (!parsedTezosStorageUri) {
197
197
  throw new InvalidUriError(`tezos-storage:${location}`);
@@ -233,8 +233,8 @@ class IpfsHttpHandler {
233
233
  this.httpBackend = new HttpBackend();
234
234
  this._ipfsGateway = ipfsGatheway ? ipfsGatheway : 'ipfs.io';
235
235
  }
236
- getMetadata(_contractAbstraction, { location }, _context) {
237
- return __awaiter(this, void 0, void 0, function* () {
236
+ getMetadata(_contractAbstraction_1, _a, _context_1) {
237
+ return __awaiter(this, arguments, void 0, function* (_contractAbstraction, { location }, _context) {
238
238
  return this.httpBackend.createRequest({
239
239
  url: `https://${this._ipfsGateway}/ipfs/${location.substring(2)}/`,
240
240
  method: 'GET',
@@ -555,8 +555,8 @@ class Tzip16ContractAbstraction {
555
555
  });
556
556
  }
557
557
  initializeMetadataViewsList() {
558
- var _a;
559
558
  return __awaiter(this, void 0, void 0, function* () {
559
+ var _a;
560
560
  const { metadata } = yield this.getMetadata();
561
561
  const metadataViews = {};
562
562
  (_a = metadata.views) === null || _a === void 0 ? void 0 : _a.forEach((view) => this.createViewImplementations(view, metadataViews));
@@ -680,8 +680,8 @@ class Tzip16Module {
680
680
 
681
681
  // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN!
682
682
  const VERSION = {
683
- "commitHash": "a9cdc31ccbc6e2ed58dedaf3c8c4f0c62bc3ae02",
684
- "version": "20.0.2-beta.1"
683
+ "commitHash": "f903ced4144b4fd7b2afd585612dcf342912299b",
684
+ "version": "20.1.0-RC.0"
685
685
  };
686
686
 
687
687
  export { BigMapContractMetadataNotFoundError, ContractMetadataNotFoundError, DEFAULT_HANDLERS, ForbiddenInstructionInViewCodeError, HttpHandler, InvalidContractMetadataError, InvalidContractMetadataTypeError, InvalidUriError, IpfsHttpHandler, MetadataProvider, MichelsonStorageView, NoParameterExpectedError, ProtocolNotSupportedError, TezosStorageHandler, Tzip16ContractAbstraction, Tzip16Module, UnconfiguredContractMetadataProviderError, UriNotFoundError, VERSION, ViewFactory, ViewImplementationType, calculateSHA256Hash, tzip16 };
@@ -40,8 +40,8 @@
40
40
  constructor() {
41
41
  this.httpBackend = new httpUtils.HttpBackend();
42
42
  }
43
- getMetadata(_contractAbstraction, { protocol, location }, _context) {
44
- return __awaiter(this, void 0, void 0, function* () {
43
+ getMetadata(_contractAbstraction_1, _a, _context_1) {
44
+ return __awaiter(this, arguments, void 0, function* (_contractAbstraction, { protocol, location }, _context) {
45
45
  return this.httpBackend.createRequest({
46
46
  url: `${protocol}:${decodeURIComponent(location)}`,
47
47
  method: 'GET',
@@ -186,8 +186,8 @@
186
186
  constructor() {
187
187
  this.TEZOS_STORAGE_REGEX = /^(?:\/\/(KT1\w{33})(?:\.(.+))?\/)?([\w|%]+)$/;
188
188
  }
189
- getMetadata(contractAbstraction, { location }, context) {
190
- return __awaiter(this, void 0, void 0, function* () {
189
+ getMetadata(contractAbstraction_1, _a, context_1) {
190
+ return __awaiter(this, arguments, void 0, function* (contractAbstraction, { location }, context) {
191
191
  const parsedTezosStorageUri = this.parseTezosStorageUri(location);
192
192
  if (!parsedTezosStorageUri) {
193
193
  throw new InvalidUriError(`tezos-storage:${location}`);
@@ -229,8 +229,8 @@
229
229
  this.httpBackend = new httpUtils.HttpBackend();
230
230
  this._ipfsGateway = ipfsGatheway ? ipfsGatheway : 'ipfs.io';
231
231
  }
232
- getMetadata(_contractAbstraction, { location }, _context) {
233
- return __awaiter(this, void 0, void 0, function* () {
232
+ getMetadata(_contractAbstraction_1, _a, _context_1) {
233
+ return __awaiter(this, arguments, void 0, function* (_contractAbstraction, { location }, _context) {
234
234
  return this.httpBackend.createRequest({
235
235
  url: `https://${this._ipfsGateway}/ipfs/${location.substring(2)}/`,
236
236
  method: 'GET',
@@ -551,8 +551,8 @@
551
551
  });
552
552
  }
553
553
  initializeMetadataViewsList() {
554
- var _a;
555
554
  return __awaiter(this, void 0, void 0, function* () {
555
+ var _a;
556
556
  const { metadata } = yield this.getMetadata();
557
557
  const metadataViews = {};
558
558
  (_a = metadata.views) === null || _a === void 0 ? void 0 : _a.forEach((view) => this.createViewImplementations(view, metadataViews));
@@ -676,8 +676,8 @@
676
676
 
677
677
  // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN!
678
678
  const VERSION = {
679
- "commitHash": "a9cdc31ccbc6e2ed58dedaf3c8c4f0c62bc3ae02",
680
- "version": "20.0.2-beta.1"
679
+ "commitHash": "f903ced4144b4fd7b2afd585612dcf342912299b",
680
+ "version": "20.1.0-RC.0"
681
681
  };
682
682
 
683
683
  Object.defineProperty(exports, "bytesToString", {
@@ -23,13 +23,13 @@ export declare class Tzip16ContractAbstraction {
23
23
  metadataVersion(): Promise<string | undefined>;
24
24
  metadataLicense(): Promise<{
25
25
  name: string;
26
- details?: string | undefined;
26
+ details?: string;
27
27
  } | undefined>;
28
28
  metadataAuthors(): Promise<string[] | undefined>;
29
29
  metadataHomepage(): Promise<string | undefined>;
30
30
  metadataSource(): Promise<{
31
- tools?: string[] | undefined;
32
- location?: string | undefined;
31
+ tools?: string[];
32
+ location?: string;
33
33
  } | undefined>;
34
34
  metadataInterfaces(): Promise<string[] | undefined>;
35
35
  metadataErrors(): Promise<import("./metadata-interface").ErrorsTzip16 | undefined>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taquito/tzip16",
3
- "version": "20.0.2-beta.1",
3
+ "version": "20.1.0-RC.0",
4
4
  "description": "Tzip16",
5
5
  "keywords": [
6
6
  "tezos",
@@ -24,7 +24,7 @@
24
24
  },
25
25
  "license": "Apache-2.0",
26
26
  "engines": {
27
- "node": ">=18"
27
+ "node": ">=20"
28
28
  },
29
29
  "scripts": {
30
30
  "lint": "eslint --ext .js,.ts .",
@@ -61,43 +61,43 @@
61
61
  ]
62
62
  },
63
63
  "dependencies": {
64
- "@taquito/core": "^20.0.2-beta.1",
65
- "@taquito/http-utils": "^20.0.2-beta.1",
66
- "@taquito/michelson-encoder": "^20.0.2-beta.1",
67
- "@taquito/rpc": "^20.0.2-beta.1",
68
- "@taquito/taquito": "^20.0.2-beta.1",
69
- "@taquito/utils": "^20.0.2-beta.1",
64
+ "@taquito/core": "^20.1.0-RC.0",
65
+ "@taquito/http-utils": "^20.1.0-RC.0",
66
+ "@taquito/michelson-encoder": "^20.1.0-RC.0",
67
+ "@taquito/rpc": "^20.1.0-RC.0",
68
+ "@taquito/taquito": "^20.1.0-RC.0",
69
+ "@taquito/utils": "^20.1.0-RC.0",
70
70
  "bignumber.js": "^9.1.2",
71
71
  "crypto-js": "^4.2.0"
72
72
  },
73
73
  "devDependencies": {
74
- "@types/bluebird": "^3.5.40",
75
- "@types/crypto-js": "^4.2.0",
76
- "@types/jest": "^29.5.5",
77
- "@types/node": "^20",
78
- "@types/ws": "^8.5.7",
79
- "@typescript-eslint/eslint-plugin": "^6.8.0",
80
- "@typescript-eslint/parser": "^6.8.0",
74
+ "@types/bluebird": "^3.5.42",
75
+ "@types/crypto-js": "^4.2.2",
76
+ "@types/jest": "^29.5.12",
77
+ "@types/node": "^22",
78
+ "@types/ws": "^8.5.12",
79
+ "@typescript-eslint/eslint-plugin": "^6.21.0",
80
+ "@typescript-eslint/parser": "^6.21.0",
81
81
  "colors": "^1.4.0",
82
82
  "coveralls": "^3.1.1",
83
83
  "cross-env": "^7.0.3",
84
- "eslint": "^8.51.0",
84
+ "eslint": "^8.57.0",
85
85
  "jest": "^29.7.0",
86
86
  "jest-config": "^29.7.0",
87
- "lint-staged": "^14.0.1",
87
+ "lint-staged": "^15.2.7",
88
88
  "lodash.camelcase": "^4.3.0",
89
- "prettier": "^3.0.3",
89
+ "prettier": "^3.3.3",
90
90
  "prompt": "^1.3.0",
91
- "replace-in-file": "^7.0.1",
92
- "rimraf": "^5.0.5",
93
- "rollup": "^4.1.4",
91
+ "replace-in-file": "^8.1.0",
92
+ "rimraf": "^6.0.1",
93
+ "rollup": "^4.22.4",
94
94
  "rollup-plugin-json": "^4.0.0",
95
95
  "rollup-plugin-typescript2": "^0.36.0",
96
96
  "shelljs": "^0.8.5",
97
- "ts-jest": "^29.1.1",
98
- "ts-node": "^10.9.1",
97
+ "ts-jest": "^29.2.3",
98
+ "ts-node": "^10.9.2",
99
99
  "ts-toolbelt": "^9.6.0",
100
- "typescript": "~5.2.2"
100
+ "typescript": "~5.5.4"
101
101
  },
102
- "gitHead": "6d1e4d129ac57c1bdeb5464601e40c50f413e43f"
102
+ "gitHead": "5300ba83c6cbd62d82138fd831ac60feaff60d6e"
103
103
  }