@silvana-one/nft 0.2.2 → 0.2.4

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.
Files changed (2) hide show
  1. package/README.md +61 -0
  2. package/package.json +11 -14
package/README.md CHANGED
@@ -2,8 +2,32 @@
2
2
 
3
3
  The MinaNFT project is an innovative Non-Fungible Token (NFT) platform that integrates the unique privacy features of the Mina blockchain. It is designed to redefine the NFT space by offering a range of functionalities that go beyond traditional NFT capabilities.
4
4
 
5
+ ## Documentation
6
+
7
+ https://docs.minanft.io/
8
+
9
+ ## Frontend
10
+
11
+ https://devnet.minanft.io/
12
+
13
+ ## API
14
+
15
+ Docs:
16
+
17
+ https://docs.minanft.io/OpenAPI/launch-nft-collection
18
+
19
+ https://docs.minanft.io/api/nft
20
+
21
+ Example: https://github.com/SilvanaOne/token-api-example/blob/main/tests/nft.test.ts
22
+
23
+ API monitoring and keys: https://minatokens.com/api
24
+
5
25
  ## Contracts Code
6
26
 
27
+ https://github.com/SilvanaOne/silvana-lib/tree/main/packages/nft
28
+
29
+ Coverage: https://docs.minanft.io/coverage/
30
+
7
31
  ### NFT Standard Contracts
8
32
 
9
33
  Main contracts: packages/nft/src/contracts/
@@ -40,6 +64,43 @@ Tests are available at packages/nft/test
40
64
 
41
65
  See [TESTS.md](TESTS.md) for more information how to run tests
42
66
 
67
+ ### Number of Constraints
68
+
69
+ The Mina blockchain imposes a maximum constraint limit of 65,536 rows for zk-SNARK proofs generated by smart contracts. It is essential to be aware of the number of constraints used by each contract to ensure they are within acceptable limits and to optimize performance.
70
+
71
+ Below is a summary of the constraints used by each key contract in the MinaNFT standard:
72
+
73
+ | **Contract** | **Constraints (rows)** | **Percentage of Max Constraints** |
74
+ | ----------------- | ---------------------- | --------------------------------- |
75
+ | Collection | 40,789 | 62.24% |
76
+ | NFT | 4,807 | 7.33% |
77
+ | Offer | 1,996 | 3.05% |
78
+ | Bid | 8,978 | 13.70% |
79
+ | Standard Admin | 8,607 | 13.13% |
80
+ | Advanced Admin | 16,032 | 24.46% |
81
+ | Upgrade Authority | 3,117 | 4.76% |
82
+ | NFTProgram | 1,833 | 2.80% |
83
+
84
+ ### Test Coverage
85
+
86
+ ```sh
87
+ npm run nft:coverage
88
+ ```
89
+
90
+ The test statements coverage is summarized below:
91
+
92
+ | **Contract** | **Test Statements Coverage** |
93
+ | -------------- | ---------------------------- |
94
+ | NFT | 100% |
95
+ | Collection | 99.65% |
96
+ | Standard Admin | 100% |
97
+ | Advanced Admin | 98.33% |
98
+ | Auction | 100% |
99
+ | Offer | 100% |
100
+ | Bid | 98.97% |
101
+
102
+ Details are available at https://docs.minanft.io/coverage/
103
+
43
104
  ## Project Background
44
105
 
45
106
  Non-Fungible Tokens (NFTs) have become a pivotal aspect of digital ownership, allowing creators, individuals, and corporations to represent unique digital assets on the blockchain. However, current NFT standards, like ERC721, lack essential privacy, verifiability, and versatile content integration features. The NFT standard on Mina seeks to overcome these limitations by introducing enhanced functionality such as privacy features, verifiable proofs for both public and private data, unlocking new use cases for NFTs in the realms of digital identity, secure document sharing, and multimedia content.
package/package.json CHANGED
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "@silvana-one/nft",
3
3
  "description": "Mina NFT library",
4
- "version": "0.2.2",
4
+ "version": "0.2.4",
5
5
  "author": "DFST",
6
6
  "bugs": "https://github.com/SilvanaOne/silvana-lib/issues",
7
7
  "dependencies": {
8
8
  "tslib": "^2.8.1"
9
9
  },
10
10
  "devDependencies": {
11
- "@silvana-one/mina-utils": "0.2.2",
12
- "@silvana-one/storage": "0.2.2",
13
- "@silvana-one/token": "0.2.2",
14
- "@silvana-one/upgradable": "0.2.2",
11
+ "@silvana-one/mina-utils": "0.2.4",
12
+ "@silvana-one/storage": "0.2.4",
13
+ "@silvana-one/token": "0.2.4",
14
+ "@silvana-one/upgradable": "0.2.4",
15
15
  "@types/node": "^22.13.8",
16
16
  "c8": "^10.1.3",
17
17
  "dotenv": "^16.4.7",
@@ -50,9 +50,9 @@
50
50
  "license": "Apache-2.0",
51
51
  "main": "dist/web/index.js",
52
52
  "peerDependencies": {
53
- "@silvana-one/storage": "0.2.2",
54
- "@silvana-one/token": "0.2.2",
55
- "@silvana-one/upgradable": "0.2.2",
53
+ "@silvana-one/storage": "0.2.4",
54
+ "@silvana-one/token": "0.2.4",
55
+ "@silvana-one/upgradable": "0.2.4",
56
56
  "o1js": "^2.2.0"
57
57
  },
58
58
  "publishConfig": {
@@ -63,10 +63,9 @@
63
63
  "build": "rm -rf dist && tsc --build tsconfig.node.json && tsc --build tsconfig.web.json && node build-cjs.js",
64
64
  "login": "npm login",
65
65
  "release": "npm publish --access public",
66
- "coverage": "rm -rf coverage && c8 npm run local:all && rm -rf coverage/tmp",
66
+ "coverage": "rm -rf coverage && node --max-old-space-size=8192 ../../node_modules/.bin/c8 --merge-async npm run local:all",
67
+ "coverage:report": "node --max-old-space-size=8192 ../../node_modules/.bin/c8 report",
67
68
  "test": "NODE_NO_WARNINGS=1 node --loader=ts-node/esm --enable-source-maps -r dotenv/config --require dotenv/config --env-file=.env --test",
68
- "local:agent": "CHAIN=local CLOUD=local DEPLOY=true MINT=true TRANSFER=true SELL=true BUY=true npm run test test/agent.test.ts",
69
- "devnet:agent": "CHAIN=devnet DEPLOY=true MINT=true TRANSFER=true SELL=true BUY=true npm run test test/agent.test.ts",
70
69
  "local:contract": "CHAIN=local CLOUD=local ADVANCED=false npm run test test/contract.test.ts",
71
70
  "devnet:contract": "CHAIN=devnet CLOUD=local ADVANCED=false npm run test test/contract.test.ts",
72
71
  "lightnet:contract": "CHAIN=lightnet CLOUD=local ADVANCED=false npm run test test/contract.test.ts",
@@ -114,9 +113,7 @@
114
113
  ".ts"
115
114
  ],
116
115
  "include": [
117
- "src/**",
118
- "../packages/upgradable/src/**",
119
- "../packages/storage/src/**"
116
+ "src/**"
120
117
  ],
121
118
  "exclude": [
122
119
  "test/**",