Skip to content

Commit

Permalink
Merge branch '2.0' into feat/2.0-silently-stop-background-syncing
Browse files Browse the repository at this point in the history
  • Loading branch information
marc2332 authored Jan 8, 2024
2 parents 62e2f2f + 35fd64d commit 1ed27b3
Show file tree
Hide file tree
Showing 148 changed files with 19,895 additions and 19,873 deletions.
516 changes: 297 additions & 219 deletions Cargo.lock

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ resolver = "2"
members = [
"bindings/core",
"bindings/nodejs",
# TODO: issue #1423
#"bindings/python",
"bindings/python",
"bindings/wasm",
"cli",
"sdk",
Expand Down
10 changes: 5 additions & 5 deletions bindings/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ iota-sdk = { path = "../../sdk", default-features = false, features = [
backtrace = { version = "0.3.69", default-features = false, features = ["std"] }
derivative = { version = "2.2.0", default-features = false }
fern-logger = { version = "0.5.0", default-features = false }
futures = { version = "0.3.29", default-features = false }
futures = { version = "0.3.30", default-features = false }
iota-crypto = { version = "0.23.0", default-features = false, features = [
"slip10",
"bip44",
Expand All @@ -26,10 +26,10 @@ log = { version = "0.4.20", default-features = false }
packable = { version = "0.10.0", default-features = false }
prefix-hex = { version = "0.7.1", default-features = false }
primitive-types = { version = "0.12.2", default-features = false }
serde = { version = "1.0.193", default-features = false }
serde_json = { version = "1.0.108", default-features = false }
thiserror = { version = "1.0.50", default-features = false }
tokio = { version = "1.34.0", default-features = false }
serde = { version = "1.0.195", default-features = false }
serde_json = { version = "1.0.111", default-features = false }
thiserror = { version = "1.0.56", default-features = false }
tokio = { version = "1.35.1", default-features = false }
url = { version = "2.4.1", default-features = false, features = ["serde"] }
zeroize = { version = "1.7.0", default-features = false }

Expand Down
11 changes: 11 additions & 0 deletions bindings/core/src/method/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,12 @@ pub enum ClientMethod {
/// Commitment ID of the commitment to look up.
commitment_id: SlotCommitmentId,
},
/// Get all full UTXO changes of a given slot by Commitment ID.
#[serde(rename_all = "camelCase")]
GetUtxoChangesFull {
/// Commitment ID of the commitment to look up.
commitment_id: SlotCommitmentId,
},
/// Look up a commitment by a given commitment index.
GetCommitmentByIndex {
/// Index of the commitment to look up.
Expand All @@ -283,6 +289,11 @@ pub enum ClientMethod {
/// Index of the commitment to look up.
index: SlotIndex,
},
/// Get all full UTXO changes of a given slot by commitment index.
GetUtxoChangesFullByIndex {
/// Index of the commitment to look up.
index: SlotIndex,
},

//////////////////////////////////////////////////////////////////////
// Node indexer API
Expand Down
2 changes: 1 addition & 1 deletion bindings/core/src/method/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ pub enum UtilsMethod {
ComputeNftId { output_id: OutputId },
/// Computes the output ID from transaction id and output index
ComputeOutputId { id: TransactionId, index: u16 },
/// Computes a tokenId from the aliasId, serial number and token scheme type.
/// Computes a tokenId from the accountId, serial number and token scheme type.
#[serde(rename_all = "camelCase")]
ComputeTokenId {
account_id: AccountId,
Expand Down
8 changes: 8 additions & 0 deletions bindings/core/src/method_handler/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -236,12 +236,20 @@ pub(crate) async fn call_client_method_internal(client: &Client, method: ClientM
ClientMethod::GetUtxoChanges { commitment_id } => {
Response::UtxoChanges(client.get_utxo_changes_by_slot_commitment_id(&commitment_id).await?)
}
ClientMethod::GetUtxoChangesFull { commitment_id } => Response::UtxoChangesFull(
client
.get_utxo_changes_full_by_slot_commitment_id(&commitment_id)
.await?,
),
ClientMethod::GetCommitmentByIndex { index } => {
Response::SlotCommitment(client.get_slot_commitment_by_slot(index).await?)
}
ClientMethod::GetUtxoChangesByIndex { index } => {
Response::UtxoChanges(client.get_utxo_changes_by_slot(index).await?)
}
ClientMethod::GetUtxoChangesFullByIndex { index } => {
Response::UtxoChangesFull(client.get_utxo_changes_full_by_slot(index).await?)
}
ClientMethod::OutputIds { query_parameters } => {
Response::OutputIdsResponse(client.output_ids(query_parameters).await?)
}
Expand Down
7 changes: 6 additions & 1 deletion bindings/core/src/response.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ use iota_sdk::{
core::{
BlockMetadataResponse, BlockWithMetadataResponse, CommitteeResponse, CongestionResponse,
InfoResponse as NodeInfo, IssuanceBlockHeaderResponse, ManaRewardsResponse, OutputWithMetadataResponse,
TransactionMetadataResponse, UtxoChangesResponse, ValidatorResponse, ValidatorsResponse,
TransactionMetadataResponse, UtxoChangesFullResponse, UtxoChangesResponse, ValidatorResponse,
ValidatorsResponse,
},
plugins::indexer::OutputIdsResponse,
},
Expand Down Expand Up @@ -142,6 +143,10 @@ pub enum Response {
/// - [`GetUtxoChangesByIndex`](crate::method::ClientMethod::GetUtxoChangesByIndex)
UtxoChanges(UtxoChangesResponse),
/// Response for:
/// - [`GetUtxoChangesFull`](crate::method::ClientMethod::GetUtxoChangesFull)
/// - [`GetUtxoChangesFullByIndex`](crate::method::ClientMethod::GetUtxoChangesFullByIndex)
UtxoChangesFull(UtxoChangesFullResponse),
/// Response for:
/// - [`GetBlockWithMetadata`](crate::method::ClientMethod::GetBlockWithMetadata)
BlockWithMetadata(BlockWithMetadataResponse),
/// Response for:
Expand Down
2 changes: 1 addition & 1 deletion bindings/nodejs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Security -->

## 1.1.4 - 2023-MM-DD
## 1.1.4 - 2023-12-07

### Added

Expand Down
6 changes: 3 additions & 3 deletions bindings/nodejs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ iota-sdk-bindings-core = { path = "../core", default-features = false, features
log = { version = "0.4.20", default-features = false }
napi = { version = "2.13.3", default-features = false, features = ["async"] }
napi-derive = { version = "2.13.0", default-features = false }
once_cell = { version = "1.18.0", default-features = false }
serde_json = { version = "1.0.108", default-features = false }
once_cell = { version = "1.19.0", default-features = false }
serde_json = { version = "1.0.111", default-features = false }
thiserror = { version = "1.0.49", default-features = false }
tokio = { version = "1.34.0", default-features = false }
tokio = { version = "1.35.1", default-features = false }

[build-dependencies]
napi-build = { version = "2.0.1", default-features = false }
Expand Down
Loading

0 comments on commit 1ed27b3

Please sign in to comment.