@dashevo/wasm-dpp 2.1.0-dev.1 → 2.1.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": "2.1.0-dev.1",
3
+ "version": "2.1.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.26.10",
45
45
  "@babel/preset-env": "^7.26.9",
46
46
  "@dashevo/dashcore-lib": "~0.22.0",
47
- "@dashevo/dpns-contract": "2.1.0-dev.1",
47
+ "@dashevo/dpns-contract": "2.1.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",
@@ -49,7 +49,15 @@ fi
49
49
 
50
50
  if command -v wasm-opt &> /dev/null; then
51
51
  echo "Optimizing wasm using Binaryen"
52
- wasm-opt -tnh --flatten --rereloop -Oz --gufa -Oz --gufa -Oz "$OUTPUT_FILE" -o "$OUTPUT_FILE"
52
+
53
+ # Check if we're in a release build (via CARGO_BUILD_PROFILE or GitHub event)
54
+ if [ "${CARGO_BUILD_PROFILE}" = "release" ] || [ "${GITHUB_EVENT_NAME:-}" = "release" ] || [ "${GITHUB_EVENT_NAME:-}" = "workflow_dispatch" ]; then
55
+ echo "Running full optimizations for release build (CARGO_BUILD_PROFILE=${CARGO_BUILD_PROFILE}, GITHUB_EVENT_NAME=${GITHUB_EVENT_NAME:-not_set})"
56
+ wasm-opt --flatten --rereloop -Oz --gufa "$OUTPUT_FILE" -o "$OUTPUT_FILE"
57
+ else
58
+ echo "Running minimal optimizations for development/PR build (CARGO_BUILD_PROFILE=${CARGO_BUILD_PROFILE}, GITHUB_EVENT_NAME=${GITHUB_EVENT_NAME:-not_set})"
59
+ wasm-opt -O2 "$OUTPUT_FILE" -o "$OUTPUT_FILE"
60
+ fi
53
61
  else
54
62
  echo "wasm-opt command not found. Skipping wasm optimization."
55
63
  fi
@@ -88,8 +88,8 @@ impl IdentityWasm {
88
88
  pub fn get_public_keys(&self) -> Vec<JsValue> {
89
89
  self.inner
90
90
  .public_keys()
91
- .iter()
92
- .map(|(_, k)| k.to_owned())
91
+ .values()
92
+ .cloned()
93
93
  .map(IdentityPublicKeyWasm::from)
94
94
  .map(JsValue::from)
95
95
  .collect()
@@ -1,9 +1,9 @@
1
1
  pub use asset_lock_proof::*;
2
- pub use identity_create_transition::*;
3
- pub use identity_credit_transfer_transition::*;
4
- pub use identity_credit_withdrawal_transition::*;
5
- pub use identity_topup_transition::*;
6
- pub use identity_update_transition::*;
2
+ pub use identity_create_transition::IdentityCreateTransitionWasm;
3
+ pub use identity_credit_transfer_transition::IdentityCreditTransferTransitionWasm;
4
+ pub use identity_credit_withdrawal_transition::IdentityCreditWithdrawalTransitionWasm;
5
+ pub use identity_topup_transition::IdentityTopUpTransitionWasm;
6
+ pub use identity_update_transition::IdentityUpdateTransitionWasm;
7
7
  // pub use validate_public_key_signatures::*;
8
8
 
9
9
  mod asset_lock_proof;
package/src/lib.rs CHANGED
@@ -10,13 +10,13 @@ pub use metadata::*;
10
10
  // pub use state_transition::*;
11
11
 
12
12
  mod dash_platform_protocol;
13
- mod data_contract;
13
+ pub mod data_contract;
14
14
  mod data_contract_factory;
15
15
  // mod data_trigger;
16
- mod document;
16
+ pub mod document;
17
17
  pub mod errors;
18
- mod identifier;
19
- mod identity;
18
+ pub mod identifier;
19
+ pub mod identity;
20
20
  mod metadata;
21
21
  // mod state_repository;
22
22
  /// State transitions