@dashevo/wasm-dpp 0.25.0-dev.21 → 0.25.0-dev.23
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 +1 -0
- package/dist/wasm/wasm_dpp.d.ts +656 -656
- package/dist/wasm/wasm_dpp.js +230 -230
- package/dist/wasm/wasm_dpp_bg.js +1 -1
- package/lib/wasm/wasm_dpp.d.ts +656 -656
- package/package.json +3 -3
- package/src/bls_adapter.rs +1 -1
- package/src/errors/consensus/basic/identity/identity_asset_lock_proof_locked_transaction_mismatch_error.rs +2 -2
- package/src/errors/consensus/basic/identity/identity_asset_lock_transaction_out_point_already_exists_error.rs +1 -1
- package/src/errors/consensus/basic/identity/invalid_identity_asset_lock_proof_chain_lock_validation_error.rs +1 -1
- package/src/identity/errors/asset_lock_transaction_is_not_found_error.rs +1 -2
- package/src/identity/identity_public_key/mod.rs +0 -1
- package/src/identity/state_transition/asset_lock_proof/instant/instant_asset_lock_proof.rs +2 -2
- package/src/identity/state_transition/identity_public_key_transitions.rs +0 -1
- package/src/utils.rs +2 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dashevo/wasm-dpp",
|
|
3
|
-
"version": "0.25.0-dev.
|
|
3
|
+
"version": "0.25.0-dev.23",
|
|
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,8 +44,8 @@
|
|
|
44
44
|
"@babel/core": "^7.15.5",
|
|
45
45
|
"@babel/preset-env": "^7.15.4",
|
|
46
46
|
"@dashevo/dashcore-lib": "~0.20.9",
|
|
47
|
-
"@dashevo/dpns-contract": "0.25.0-dev.
|
|
48
|
-
"@dashevo/dpp": "0.25.0-dev.
|
|
47
|
+
"@dashevo/dpns-contract": "0.25.0-dev.23",
|
|
48
|
+
"@dashevo/dpp": "0.25.0-dev.23",
|
|
49
49
|
"@dashevo/wasm-re2": "~2.0.4",
|
|
50
50
|
"@types/bs58": "^4.0.1",
|
|
51
51
|
"@types/node": "^14.6.0",
|
package/src/bls_adapter.rs
CHANGED
|
@@ -25,13 +25,13 @@ impl IdentityAssetLockProofLockedTransactionMismatchErrorWasm {
|
|
|
25
25
|
#[wasm_bindgen(js_name=getInstantLockTransactionId)]
|
|
26
26
|
pub fn instant_lock_transaction_id(&self) -> Buffer {
|
|
27
27
|
let tx_id = self.inner.instant_lock_transaction_id();
|
|
28
|
-
Buffer::from_bytes(&tx_id)
|
|
28
|
+
Buffer::from_bytes(&tx_id.to_byte_array())
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
#[wasm_bindgen(js_name=getAssetLockTransactionId)]
|
|
32
32
|
pub fn asset_lock_transaction_id(&self) -> Buffer {
|
|
33
33
|
let tx_id = self.inner.asset_lock_transaction_id();
|
|
34
|
-
let mut hash_bytes = tx_id.
|
|
34
|
+
let mut hash_bytes = tx_id.to_byte_array();
|
|
35
35
|
hash_bytes.reverse();
|
|
36
36
|
|
|
37
37
|
Buffer::from_bytes(&hash_bytes)
|
|
@@ -30,7 +30,7 @@ impl IdentityAssetLockTransactionOutPointAlreadyExistsErrorWasm {
|
|
|
30
30
|
#[wasm_bindgen(js_name=getTransactionId)]
|
|
31
31
|
pub fn transaction_id(&self) -> Buffer {
|
|
32
32
|
let tx_id = self.inner.transaction_id();
|
|
33
|
-
let mut tx_id_bytes = tx_id.
|
|
33
|
+
let mut tx_id_bytes = tx_id.to_byte_array();
|
|
34
34
|
tx_id_bytes.reverse();
|
|
35
35
|
Buffer::from_bytes(&tx_id_bytes)
|
|
36
36
|
}
|
|
@@ -23,7 +23,7 @@ impl InvalidIdentityAssetLockProofChainLockValidationErrorWasm {
|
|
|
23
23
|
#[wasm_bindgen(js_name=getTransactionId)]
|
|
24
24
|
pub fn transaction_id(&self) -> Buffer {
|
|
25
25
|
let tx_id = self.inner.transaction_id();
|
|
26
|
-
let mut tx_id_bytes = tx_id.
|
|
26
|
+
let mut tx_id_bytes = tx_id.to_byte_array();
|
|
27
27
|
tx_id_bytes.reverse();
|
|
28
28
|
Buffer::from_bytes(&tx_id_bytes)
|
|
29
29
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
use dpp::dashcore::hashes::hex::ToHex;
|
|
2
1
|
use dpp::identity::errors::AssetLockTransactionIsNotFoundError;
|
|
3
2
|
use wasm_bindgen::prelude::*;
|
|
4
3
|
|
|
@@ -15,6 +14,6 @@ impl From<&AssetLockTransactionIsNotFoundError> for AssetLockTransactionIsNotFou
|
|
|
15
14
|
impl AssetLockTransactionIsNotFoundErrorWasm {
|
|
16
15
|
#[wasm_bindgen(js_name=getTransactionId)]
|
|
17
16
|
pub fn transaction_id(&self) -> JsValue {
|
|
18
|
-
self.0.transaction_id()
|
|
17
|
+
hex::encode(self.0.transaction_id()).into()
|
|
19
18
|
}
|
|
20
19
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
use dpp::dashcore::{
|
|
2
|
-
blockdata::{script::
|
|
2
|
+
blockdata::{script::ScriptBuf, transaction::txout::TxOut},
|
|
3
3
|
consensus::encode::serialize,
|
|
4
4
|
};
|
|
5
5
|
|
|
@@ -26,7 +26,7 @@ struct TxOutJS {
|
|
|
26
26
|
#[serde(rename = "satoshis")]
|
|
27
27
|
value: u64,
|
|
28
28
|
#[serde(rename = "script")]
|
|
29
|
-
script_pubkey:
|
|
29
|
+
script_pubkey: ScriptBuf,
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
#[derive(Serialize)]
|
package/src/utils.rs
CHANGED
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
use std::collections::BTreeMap;
|
|
2
2
|
use std::convert::TryInto;
|
|
3
3
|
|
|
4
|
-
use anyhow::{anyhow, bail};
|
|
5
|
-
use dpp::{
|
|
6
|
-
consensus::ConsensusError,
|
|
7
|
-
dashcore::{anyhow, anyhow::Context},
|
|
8
|
-
ProtocolError,
|
|
9
|
-
};
|
|
4
|
+
use anyhow::{anyhow, bail, Context};
|
|
5
|
+
use dpp::{consensus::ConsensusError, ProtocolError};
|
|
10
6
|
|
|
11
7
|
use dpp::platform_value::Value;
|
|
12
8
|
use dpp::serialization::PlatformDeserializable;
|