pshenmic-dpp 1.0.10 → 1.0.12
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.
|
@@ -284,13 +284,13 @@ export const assetlockproofwasm_toObject: (a: number, b: number) => void;
|
|
|
284
284
|
export const __wbg_identitywasm_free: (a: number, b: number) => void;
|
|
285
285
|
export const identitywasm_type_name: (a: number, b: number) => void;
|
|
286
286
|
export const identitywasm_new: (a: number, b: number) => void;
|
|
287
|
-
export const
|
|
288
|
-
export const
|
|
289
|
-
export const
|
|
287
|
+
export const identitywasm_set_id: (a: number, b: number, c: number) => void;
|
|
288
|
+
export const identitywasm_set_balance: (a: number, b: bigint) => void;
|
|
289
|
+
export const identitywasm_set_revision: (a: number, b: bigint) => void;
|
|
290
290
|
export const identitywasm_addPublicKey: (a: number, b: number) => void;
|
|
291
|
-
export const
|
|
292
|
-
export const
|
|
293
|
-
export const
|
|
291
|
+
export const identitywasm_get_id: (a: number) => number;
|
|
292
|
+
export const identitywasm_get_balance: (a: number) => bigint;
|
|
293
|
+
export const identitywasm_get_revision: (a: number) => bigint;
|
|
294
294
|
export const identitywasm_getPublicKeyById: (a: number, b: number) => number;
|
|
295
295
|
export const identitywasm_getPublicKeys: (a: number, b: number) => void;
|
|
296
296
|
export const identitywasm_fromHex: (a: number, b: number, c: number) => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pshenmic-dpp",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.12",
|
|
4
4
|
"main": "dist/wasm/index.js",
|
|
5
5
|
"types": "dist/wasm/index.d.ts",
|
|
6
6
|
"repository": {
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"build:js": "./scripts/build-js.sh",
|
|
13
13
|
"build:full": "./scripts/build.sh && ./scripts/build-js.sh",
|
|
14
14
|
"build:raw": "./scripts/build.sh && RAW=true ./scripts/build-js.sh",
|
|
15
|
-
"
|
|
15
|
+
"docs": "ts-node ./generate-docs.ts && typedoc",
|
|
16
16
|
"babel": "babel dist/wasm --out-dir dist/cjs/wasm",
|
|
17
17
|
"tests": "mocha ./tests/*.spec.js",
|
|
18
18
|
"lint": "cargo fmt",
|
package/tests/Identity.spec.js
CHANGED
|
@@ -28,19 +28,19 @@ describe('Identity', function () {
|
|
|
28
28
|
it('should get id buffer', function () {
|
|
29
29
|
const identity = new wasm.IdentityWASM(identifier)
|
|
30
30
|
|
|
31
|
-
assert.deepEqual(identity.
|
|
31
|
+
assert.deepEqual(identity.id.bytes(), Uint8Array.from(identifierBytes))
|
|
32
32
|
})
|
|
33
33
|
|
|
34
34
|
it('should get balance', function () {
|
|
35
35
|
const identity = new wasm.IdentityWASM(identifier)
|
|
36
36
|
|
|
37
|
-
assert.deepEqual(identity.
|
|
37
|
+
assert.deepEqual(identity.balance, BigInt(0))
|
|
38
38
|
})
|
|
39
39
|
|
|
40
40
|
it('should get revision', function () {
|
|
41
41
|
const identity = new wasm.IdentityWASM(identifier)
|
|
42
42
|
|
|
43
|
-
assert.deepEqual(identity.
|
|
43
|
+
assert.deepEqual(identity.revision, BigInt(0))
|
|
44
44
|
})
|
|
45
45
|
|
|
46
46
|
it('should get public keys', function () {
|
|
@@ -91,17 +91,17 @@ describe('Identity', function () {
|
|
|
91
91
|
it('should allows to set balance', function () {
|
|
92
92
|
const identity = new wasm.IdentityWASM(identifier)
|
|
93
93
|
|
|
94
|
-
identity.
|
|
94
|
+
identity.balance = balance
|
|
95
95
|
|
|
96
|
-
assert.equal(identity.
|
|
96
|
+
assert.equal(identity.balance, balance)
|
|
97
97
|
})
|
|
98
98
|
|
|
99
99
|
it('should allows to set revision', function () {
|
|
100
100
|
const identity = new wasm.IdentityWASM(identifier)
|
|
101
101
|
|
|
102
|
-
identity.
|
|
102
|
+
identity.revision = revision
|
|
103
103
|
|
|
104
|
-
assert.equal(identity.
|
|
104
|
+
assert.equal(identity.revision, revision)
|
|
105
105
|
})
|
|
106
106
|
})
|
|
107
107
|
})
|