@taquito/tzip12 23.0.3 → 24.0.0-beta.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.
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.Tzip12ContractAbstraction = void 0;
13
13
  const michelson_encoder_1 = require("@taquito/michelson-encoder");
14
14
  const tzip16_1 = require("@taquito/tzip16");
15
+ const utils_1 = require("@taquito/utils");
15
16
  const errors_1 = require("./errors");
16
17
  const tokenMetadataBigMapType = {
17
18
  prim: 'big_map',
@@ -115,12 +116,12 @@ class Tzip12ContractAbstraction {
115
116
  const uri = tokenMetadata.get('');
116
117
  if (uri) {
117
118
  try {
118
- const metadataFromUri = yield this.context.metadataProvider.provideMetadata(this.contractAbstraction, (0, tzip16_1.bytesToString)(uri), this.context);
119
+ const metadataFromUri = yield this.context.metadataProvider.provideMetadata(this.contractAbstraction, (0, utils_1.bytesToString)(uri), this.context);
119
120
  return metadataFromUri.metadata;
120
121
  }
121
122
  catch (e) {
122
123
  if (e.name === 'InvalidUriError') {
123
- console.warn(`The URI ${(0, tzip16_1.bytesToString)(uri)} is present in the token metadata, but is invalid.`);
124
+ console.warn(`The URI ${(0, utils_1.bytesToString)(uri)} is present in the token metadata, but is invalid.`);
124
125
  }
125
126
  else {
126
127
  throw e;
@@ -137,13 +138,13 @@ class Tzip12ContractAbstraction {
137
138
  if (keyTokenMetadata === 'decimals') {
138
139
  Object.assign(tokenMetadataDecoded, {
139
140
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
140
- [keyTokenMetadata]: Number((0, tzip16_1.bytesToString)(metadataTokenMap.get(keyTokenMetadata))),
141
+ [keyTokenMetadata]: Number((0, utils_1.bytesToString)(metadataTokenMap.get(keyTokenMetadata))),
141
142
  });
142
143
  }
143
144
  else if (!(keyTokenMetadata === '')) {
144
145
  Object.assign(tokenMetadataDecoded, {
145
146
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
146
- [keyTokenMetadata]: (0, tzip16_1.bytesToString)(metadataTokenMap.get(keyTokenMetadata)),
147
+ [keyTokenMetadata]: (0, utils_1.bytesToString)(metadataTokenMap.get(keyTokenMetadata)),
147
148
  });
148
149
  }
149
150
  }
@@ -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": "42048d039f6d4345fc59d04b03650bcb8e27bb62",
7
- "version": "23.0.3"
6
+ "commitHash": "7912b77f57f943dff619383900bd46a7a593a244",
7
+ "version": "24.0.0-beta.0"
8
8
  };
@@ -1,5 +1,6 @@
1
1
  import { MichelsonMap, Schema } from '@taquito/michelson-encoder';
2
- import { Tzip16ContractAbstraction, bytesToString, MetadataProvider, DEFAULT_HANDLERS } from '@taquito/tzip16';
2
+ import { Tzip16ContractAbstraction, MetadataProvider, DEFAULT_HANDLERS } from '@taquito/tzip16';
3
+ import { bytesToString } from '@taquito/utils';
3
4
  import { TaquitoError } from '@taquito/core';
4
5
 
5
6
  /******************************************************************************
@@ -16,7 +17,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
16
17
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17
18
  PERFORMANCE OF THIS SOFTWARE.
18
19
  ***************************************************************************** */
19
- /* global Reflect, Promise, SuppressedError, Symbol */
20
+ /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
20
21
 
21
22
 
22
23
  function __awaiter(thisArg, _arguments, P, generator) {
@@ -272,8 +273,8 @@ class Tzip12Module {
272
273
 
273
274
  // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN!
274
275
  const VERSION = {
275
- "commitHash": "42048d039f6d4345fc59d04b03650bcb8e27bb62",
276
- "version": "23.0.3"
276
+ "commitHash": "7912b77f57f943dff619383900bd46a7a593a244",
277
+ "version": "24.0.0-beta.0"
277
278
  };
278
279
 
279
280
  export { InvalidTokenMetadata, TokenIdNotFound, TokenMetadataNotFound, Tzip12ContractAbstraction, Tzip12Module, VERSION, tzip12 };
@@ -1 +1 @@
1
- {"version":3,"file":"taquito-tzip12.es6.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"taquito-tzip12.es6.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@taquito/michelson-encoder'), require('@taquito/tzip16'), require('@taquito/core')) :
3
- typeof define === 'function' && define.amd ? define(['exports', '@taquito/michelson-encoder', '@taquito/tzip16', '@taquito/core'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.taquitoTzip12 = {}, global.michelsonEncoder, global.tzip16, global.core));
5
- })(this, (function (exports, michelsonEncoder, tzip16, core) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@taquito/michelson-encoder'), require('@taquito/tzip16'), require('@taquito/utils'), require('@taquito/core')) :
3
+ typeof define === 'function' && define.amd ? define(['exports', '@taquito/michelson-encoder', '@taquito/tzip16', '@taquito/utils', '@taquito/core'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.taquitoTzip12 = {}, global.michelsonEncoder, global.tzip16, global.utils, global.taquitoCore));
5
+ })(this, (function (exports, michelsonEncoder, tzip16, utils, core) { 'use strict';
6
6
 
7
7
  /******************************************************************************
8
8
  Copyright (c) Microsoft Corporation.
@@ -18,7 +18,7 @@
18
18
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19
19
  PERFORMANCE OF THIS SOFTWARE.
20
20
  ***************************************************************************** */
21
- /* global Reflect, Promise, SuppressedError, Symbol */
21
+ /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
22
22
 
23
23
 
24
24
  function __awaiter(thisArg, _arguments, P, generator) {
@@ -175,12 +175,12 @@
175
175
  const uri = tokenMetadata.get('');
176
176
  if (uri) {
177
177
  try {
178
- const metadataFromUri = yield this.context.metadataProvider.provideMetadata(this.contractAbstraction, tzip16.bytesToString(uri), this.context);
178
+ const metadataFromUri = yield this.context.metadataProvider.provideMetadata(this.contractAbstraction, utils.bytesToString(uri), this.context);
179
179
  return metadataFromUri.metadata;
180
180
  }
181
181
  catch (e) {
182
182
  if (e.name === 'InvalidUriError') {
183
- console.warn(`The URI ${tzip16.bytesToString(uri)} is present in the token metadata, but is invalid.`);
183
+ console.warn(`The URI ${utils.bytesToString(uri)} is present in the token metadata, but is invalid.`);
184
184
  }
185
185
  else {
186
186
  throw e;
@@ -197,13 +197,13 @@
197
197
  if (keyTokenMetadata === 'decimals') {
198
198
  Object.assign(tokenMetadataDecoded, {
199
199
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
200
- [keyTokenMetadata]: Number(tzip16.bytesToString(metadataTokenMap.get(keyTokenMetadata))),
200
+ [keyTokenMetadata]: Number(utils.bytesToString(metadataTokenMap.get(keyTokenMetadata))),
201
201
  });
202
202
  }
203
203
  else if (!(keyTokenMetadata === '')) {
204
204
  Object.assign(tokenMetadataDecoded, {
205
205
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
206
- [keyTokenMetadata]: tzip16.bytesToString(metadataTokenMap.get(keyTokenMetadata)),
206
+ [keyTokenMetadata]: utils.bytesToString(metadataTokenMap.get(keyTokenMetadata)),
207
207
  });
208
208
  }
209
209
  }
@@ -274,8 +274,8 @@
274
274
 
275
275
  // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN!
276
276
  const VERSION = {
277
- "commitHash": "42048d039f6d4345fc59d04b03650bcb8e27bb62",
278
- "version": "23.0.3"
277
+ "commitHash": "7912b77f57f943dff619383900bd46a7a593a244",
278
+ "version": "24.0.0-beta.0"
279
279
  };
280
280
 
281
281
  exports.InvalidTokenMetadata = InvalidTokenMetadata;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taquito/tzip12",
3
- "version": "23.0.3",
3
+ "version": "24.0.0-beta.0",
4
4
  "description": "Tzip12",
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 .",
@@ -62,15 +62,15 @@
62
62
  ]
63
63
  },
64
64
  "dependencies": {
65
- "@taquito/core": "^23.0.3",
66
- "@taquito/michelson-encoder": "^23.0.3",
67
- "@taquito/taquito": "^23.0.3",
68
- "@taquito/tzip16": "^23.0.3"
65
+ "@taquito/core": "^24.0.0-beta.0",
66
+ "@taquito/michelson-encoder": "^24.0.0-beta.0",
67
+ "@taquito/taquito": "^24.0.0-beta.0",
68
+ "@taquito/tzip16": "^24.0.0-beta.0"
69
69
  },
70
70
  "devDependencies": {
71
71
  "@types/bluebird": "^3.5.42",
72
72
  "@types/jest": "^29.5.12",
73
- "@types/node": "^18",
73
+ "@types/node": "^20",
74
74
  "@types/ws": "^8.5.12",
75
75
  "@typescript-eslint/eslint-plugin": "^6.21.0",
76
76
  "@typescript-eslint/parser": "^6.21.0",
@@ -95,5 +95,5 @@
95
95
  "ts-toolbelt": "^9.6.0",
96
96
  "typescript": "~5.5.4"
97
97
  },
98
- "gitHead": "2abf349e97af45f11210b3121078b9d96699d5da"
98
+ "gitHead": "f212ea3edaf1fac34d738b5d00a9892ab7a3b721"
99
99
  }