@dashevo/wasm-dpp 1.4.0-dev.3 → 1.4.0-dev.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dashevo/wasm-dpp",
3
- "version": "1.4.0-dev.3",
3
+ "version": "1.4.0-dev.4",
4
4
  "description": "The JavaScript implementation of the Dash Platform Protocol",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -44,7 +44,7 @@
44
44
  "@babel/core": "^7.23.3",
45
45
  "@babel/preset-env": "^7.23.3",
46
46
  "@dashevo/dashcore-lib": "~0.21.3",
47
- "@dashevo/dpns-contract": "1.4.0-dev.3",
47
+ "@dashevo/dpns-contract": "1.4.0-dev.4",
48
48
  "@types/bs58": "^4.0.1",
49
49
  "@types/node": "^14.6.0",
50
50
  "@yarnpkg/pnpify": "^4.0.0-rc.42",
@@ -206,7 +206,7 @@ impl IdentityFacadeWasm {
206
206
  amount: u64,
207
207
  core_fee_per_byte: u32,
208
208
  pooling: u8,
209
- output_script: Vec<u8>,
209
+ output_script: Option<Vec<u8>>,
210
210
  identity_nonce: u64,
211
211
  ) -> Result<IdentityCreditWithdrawalTransitionWasm, JsValue> {
212
212
  let pooling = match pooling {
@@ -222,7 +222,7 @@ impl IdentityFacadeWasm {
222
222
  amount,
223
223
  core_fee_per_byte,
224
224
  pooling,
225
- CoreScript::from_bytes(output_script),
225
+ output_script.map(CoreScript::from_bytes),
226
226
  identity_nonce as IdentityNonce,
227
227
  )
228
228
  .map(Into::into)
@@ -210,7 +210,7 @@ impl IdentityFactoryWasm {
210
210
  amount: u64,
211
211
  core_fee_per_byte: u32,
212
212
  pooling: u8,
213
- output_script: Vec<u8>,
213
+ output_script: Option<Vec<u8>>,
214
214
  identity_nonce: u64,
215
215
  ) -> Result<IdentityCreditWithdrawalTransitionWasm, JsValue> {
216
216
  let pooling = match pooling {
@@ -226,7 +226,7 @@ impl IdentityFactoryWasm {
226
226
  amount,
227
227
  core_fee_per_byte,
228
228
  pooling,
229
- CoreScript::from_bytes(output_script),
229
+ output_script.map(CoreScript::from_bytes),
230
230
  identity_nonce as IdentityNonce,
231
231
  )
232
232
  .map(Into::into)
@@ -24,7 +24,7 @@ describe('IdentityFacade', () => {
24
24
  beforeEach(async () => {
25
25
  dpp = new DashPlatformProtocol(
26
26
  { generate: () => crypto.randomBytes(32) },
27
- 1,
27
+ 3,
28
28
  );
29
29
 
30
30
  const chainAssetLockProofJS = getChainAssetLockProofFixture();
@@ -26,7 +26,7 @@ describe('IdentityFactory', () => {
26
26
 
27
27
  // const identityValidator = new IdentityValidator(blsAdapter);
28
28
 
29
- factory = new IdentityFactory(1);
29
+ factory = new IdentityFactory(3);
30
30
 
31
31
  identity = await getIdentityFixture(instantAssetLockProof.createIdentifier());
32
32
  identity.setBalance(0);
@@ -75,7 +75,7 @@ describe('IdentityCreditWithdrawalTransition', () => {
75
75
  rawStateTransition = stateTransition.toObject();
76
76
 
77
77
  expect(rawStateTransition).to.deep.equal({
78
- $version: '0',
78
+ $version: '1',
79
79
  type: StateTransitionTypes.IdentityCreditWithdrawal,
80
80
  identityId: stateTransition.getIdentityId().toBuffer(),
81
81
  amount: stateTransition.getAmount(),
@@ -92,7 +92,7 @@ describe('IdentityCreditWithdrawalTransition', () => {
92
92
  rawStateTransition = stateTransition.toObject({ skipSignature: true });
93
93
 
94
94
  expect(rawStateTransition).to.deep.equal({
95
- $version: '0',
95
+ $version: '1',
96
96
  type: StateTransitionTypes.IdentityCreditWithdrawal,
97
97
  identityId: stateTransition.getIdentityId().toBuffer(),
98
98
  amount: stateTransition.getAmount(),
@@ -109,7 +109,7 @@ describe('IdentityCreditWithdrawalTransition', () => {
109
109
  const jsonStateTransition = stateTransition.toJSON();
110
110
 
111
111
  expect(jsonStateTransition).to.deep.equal({
112
- $version: '0',
112
+ $version: '1',
113
113
  type: StateTransitionTypes.IdentityCreditWithdrawal,
114
114
  identityId: stateTransition.getIdentityId().toString(),
115
115
  amount: stateTransition.getAmount().toString(),