@dashevo/token-history-contract 2.0.0-rc.9 → 2.0.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.
package/Cargo.toml CHANGED
@@ -1,7 +1,7 @@
1
1
  [package]
2
2
  name = "token-history-contract"
3
3
  description = "Token history data contract schema and tools"
4
- version = "2.0.0-rc.9"
4
+ version = "2.0.0"
5
5
  edition = "2021"
6
6
  rust-version.workspace = true
7
7
  license = "MIT"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dashevo/token-history-contract",
3
- "version": "2.0.0-rc.9",
3
+ "version": "2.0.0",
4
4
  "description": "The token history contract",
5
5
  "scripts": {
6
6
  "lint": "eslint .",
@@ -16,7 +16,7 @@
16
16
  ],
17
17
  "license": "MIT",
18
18
  "devDependencies": {
19
- "@dashevo/wasm-dpp": "2.0.0-rc.9",
19
+ "@dashevo/wasm-dpp": "2.0.0",
20
20
  "chai": "^4.3.10",
21
21
  "dirty-chai": "^2.0.1",
22
22
  "eslint": "^8.53.0",
@@ -40,6 +40,20 @@
40
40
  "$createdAt": "asc"
41
41
  }
42
42
  ]
43
+ },
44
+ {
45
+ "name": "byBurnFromId",
46
+ "properties": [
47
+ {
48
+ "tokenId": "asc"
49
+ },
50
+ {
51
+ "burnFromId": "asc"
52
+ },
53
+ {
54
+ "$createdAt": "asc"
55
+ }
56
+ ]
43
57
  }
44
58
  ],
45
59
  "properties": {
@@ -52,21 +66,31 @@
52
66
  "position": 0,
53
67
  "contentMediaType": "application/x.dash.dpp.identifier"
54
68
  },
69
+ "burnFromId": {
70
+ "type": "array",
71
+ "byteArray": true,
72
+ "minItems": 32,
73
+ "maxItems": 32,
74
+ "description": "The identifier of the identity from which tokens will be burned",
75
+ "position": 1,
76
+ "contentMediaType": "application/x.dash.dpp.identifier"
77
+ },
55
78
  "amount": {
56
79
  "type": "integer",
57
80
  "minimum": 0,
58
81
  "description": "The amount that was burned",
59
- "position": 1
82
+ "position": 2
60
83
  },
61
84
  "note": {
62
85
  "type": "string",
63
86
  "maxLength": 2048,
64
87
  "description": "An optional explanation of why this burn took place",
65
- "position": 2
88
+ "position": 3
66
89
  }
67
90
  },
68
91
  "required": [
69
92
  "tokenId",
93
+ "burnFromId",
70
94
  "amount",
71
95
  "$createdAt",
72
96
  "$createdAtBlockHeight"
@@ -145,7 +169,7 @@
145
169
  "byteArray": true,
146
170
  "minItems": 32,
147
171
  "maxItems": 32,
148
- "description": "The token ID",
172
+ "description": "The recipient ID",
149
173
  "position": 1,
150
174
  "contentMediaType": "application/x.dash.dpp.identifier"
151
175
  },
@@ -49,6 +49,7 @@ describe('Token History Contract', () => {
49
49
  beforeEach(() => {
50
50
  rawBurnDocument = {
51
51
  tokenId: crypto.randomBytes(32),
52
+ burnFromId: crypto.randomBytes(32),
52
53
  amount: 100,
53
54
  note: 'Burning tokens',
54
55
  };