@taquito/tzip12 23.0.1 → 23.0.3

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/README.md CHANGED
@@ -32,6 +32,7 @@ The constructor of the `Tzip12Module` takes an optional `MetadataProvider` as a
32
32
  import { TezosToolkit } from '@taquito/taquito';
33
33
  import { Tzip12Module } from '@taquito/tzip12';
34
34
  import { tzip12 } from '@taquito/tzip12';
35
+ import BigNumber from 'bignumber.js';
35
36
 
36
37
  const Tezos = new TezosToolkit('https://YOUR_PREFERRED_RPC_URL');
37
38
  Tezos.addExtension(new Tzip12Module());
@@ -39,13 +40,13 @@ Tezos.addExtension(new Tzip12Module());
39
40
  const contract = await Tezos.contract.at("contractAddress", tzip12)
40
41
 
41
42
  // get the token metadata
42
- await contract.tzip12().getTokenMetadata(1);
43
+ await contract.tzip12().getTokenMetadata(BigNumber(1));
43
44
  ```
44
45
 
45
- The `getTokenMetadata` method takes a number as a parameter that represents the token_id and returns an object matching this interface:
46
+ The `getTokenMetadata` method takes a BigNumber as a parameter that represents the token_id and returns an object matching this interface:
46
47
  ```
47
48
  interface TokenMetadata {
48
- token_id: number,
49
+ token_id: BigNumber,
49
50
  decimals: number
50
51
  name?: string,
51
52
  symbol?: string,
@@ -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": "c26a3d67ae3694c157f4f56fb5bf85ca3c495a9b",
7
- "version": "23.0.1"
6
+ "commitHash": "42048d039f6d4345fc59d04b03650bcb8e27bb62",
7
+ "version": "23.0.3"
8
8
  };
@@ -272,8 +272,8 @@ class Tzip12Module {
272
272
 
273
273
  // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN!
274
274
  const VERSION = {
275
- "commitHash": "c26a3d67ae3694c157f4f56fb5bf85ca3c495a9b",
276
- "version": "23.0.1"
275
+ "commitHash": "42048d039f6d4345fc59d04b03650bcb8e27bb62",
276
+ "version": "23.0.3"
277
277
  };
278
278
 
279
279
  export { InvalidTokenMetadata, TokenIdNotFound, TokenMetadataNotFound, Tzip12ContractAbstraction, Tzip12Module, VERSION, tzip12 };
@@ -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": "c26a3d67ae3694c157f4f56fb5bf85ca3c495a9b",
278
- "version": "23.0.1"
277
+ "commitHash": "42048d039f6d4345fc59d04b03650bcb8e27bb62",
278
+ "version": "23.0.3"
279
279
  };
280
280
 
281
281
  exports.InvalidTokenMetadata = InvalidTokenMetadata;
@@ -1,4 +1,5 @@
1
1
  import { TaquitoError } from '@taquito/core';
2
+ import BigNumber from 'bignumber.js';
2
3
  /**
3
4
  * @category Error
4
5
  * @description Error that indicates the metadata not being found on the contract
@@ -12,8 +13,8 @@ export declare class TokenMetadataNotFound extends TaquitoError {
12
13
  * @description Error that indicates the token ID not being found
13
14
  */
14
15
  export declare class TokenIdNotFound extends TaquitoError {
15
- readonly tokenId: number;
16
- constructor(tokenId: number);
16
+ readonly tokenId: BigNumber;
17
+ constructor(tokenId: BigNumber);
17
18
  }
18
19
  /**
19
20
  * @category Error
@@ -1,7 +1,8 @@
1
1
  import { ContractAbstraction, ContractProvider, Wallet } from '@taquito/taquito';
2
2
  import { MetadataContext } from '@taquito/tzip16';
3
+ import BigNumber from 'bignumber.js';
3
4
  export interface TokenMetadata {
4
- token_id: number;
5
+ token_id: BigNumber;
5
6
  decimals: number;
6
7
  name?: string;
7
8
  symbol?: string;
@@ -30,7 +31,7 @@ export declare class Tzip12ContractAbstraction {
30
31
  * @returns An object of type `TokenMetadata`
31
32
  * @throws {@link TokenIdNotFound, TokenMetadataNotFound, InvalidTokenMetadata}
32
33
  */
33
- getTokenMetadata(tokenId: number): Promise<TokenMetadata>;
34
+ getTokenMetadata(tokenId: BigNumber): Promise<TokenMetadata>;
34
35
  private retrieveTokenMetadataFromView;
35
36
  private hasTokenMetadataView;
36
37
  private executeTokenMetadataView;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taquito/tzip12",
3
- "version": "23.0.1",
3
+ "version": "23.0.3",
4
4
  "description": "Tzip12",
5
5
  "keywords": [
6
6
  "tezos",
@@ -62,10 +62,10 @@
62
62
  ]
63
63
  },
64
64
  "dependencies": {
65
- "@taquito/core": "^23.0.1",
66
- "@taquito/michelson-encoder": "^23.0.1",
67
- "@taquito/taquito": "^23.0.1",
68
- "@taquito/tzip16": "^23.0.1"
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"
69
69
  },
70
70
  "devDependencies": {
71
71
  "@types/bluebird": "^3.5.42",
@@ -95,5 +95,5 @@
95
95
  "ts-toolbelt": "^9.6.0",
96
96
  "typescript": "~5.5.4"
97
97
  },
98
- "gitHead": "d67244a8188ee3a62390f32b75ba1acf599a782f"
98
+ "gitHead": "2abf349e97af45f11210b3121078b9d96699d5da"
99
99
  }