Skip to content

Integrate product core into identity.rs #1658

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 41 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
d4e366c
Remove all resources that will be provided by product-core
chrisgitiota Apr 24, 2025
c051c49
Revert "Remove all resources that will be provided by product-core"
chrisgitiota Apr 24, 2025
a1f6c38
Removed all resources that shall be provided by product-core
chrisgitiota Apr 24, 2025
4f6ebed
Fixed cargo.toml issues and added product-core dependencies
chrisgitiota Apr 24, 2025
7c75698
First Rust buildable and e2e tested version using product_core
chrisgitiota Apr 25, 2025
00cc42c
First WASM32 (not NodeJS build) buildable untested version using prod…
chrisgitiota Apr 25, 2025
9e60199
iota_move_calls_ts buildable with build:nodejs
chrisgitiota Apr 25, 2025
2821f20
First attempt to accomplish build:nodejs for identity_wasm
chrisgitiota Apr 25, 2025
165887b
Switch product_core cargo dependencies from local neighboured folder …
chrisgitiota Apr 28, 2025
5d630ab
Switch product_core cargo dependencies from ssh to https
chrisgitiota Apr 29, 2025
124fb78
Merge branch 'main' into chore/product-core-integration
itsyaasir May 6, 2025
7d0e148
refactor: migrate transaction builder to product-core crate
itsyaasir May 6, 2025
7ca92da
refactor: reorganize imports and split multi-line imports into single…
itsyaasir May 6, 2025
b02f330
refactor: remove unused imports from identity_move_calls and client m…
itsyaasir May 6, 2025
c2e524b
chore: clean up commented code and update NetworkName imports
itsyaasir May 6, 2025
8828b4d
use published interactions
eike-hass May 6, 2025
ab93fcd
move move_calls sources to identity_wasm folder
eike-hass May 7, 2025
c5b4964
feat: add new move calls modules for asset, identity, and migration h…
itsyaasir May 7, 2025
ba3160a
refactor: migrate imports from identity_iota to product_core and remo…
itsyaasir May 7, 2025
a8c2928
refactor: remove unused move calls and related files from identity_wa…
itsyaasir May 7, 2025
aaf7961
fix: restore product-core dependency in Cargo.toml
itsyaasir May 7, 2025
fb7e8fc
Merge branch 'main' into chore/product-core-integration
itsyaasir May 7, 2025
110cc0b
refactor: update imports to use iota_interaction instead of identity_…
itsyaasir May 7, 2025
61cb298
refactor: clean up unused move_calls module and update imports in was…
itsyaasir May 7, 2025
fec73df
refactor: update product-core dependency in Cargo.toml to disable def…
itsyaasir May 8, 2025
7f308fe
remove unused imports
UMR1352 May 8, 2025
f94ccfa
add getrandom compilation flag to enable wasm targets
UMR1352 May 8, 2025
fd0583b
commit identity_wasm cargo config
UMR1352 May 8, 2025
58fefa2
fixes
UMR1352 May 8, 2025
a6cf1d2
refactor: remove move_calls export and update TypeScript configuratio…
itsyaasir May 8, 2025
265a233
refactor: reorganize imports across multiple files to improve code or…
itsyaasir May 8, 2025
0ac5945
refactor: simplify dependency feature arrays and remove commented cod…
itsyaasir May 8, 2025
288a81e
fix artifact path
eike-hass May 8, 2025
b20457e
Merge branch 'chore/product-core-integration' of github.com:iotaledge…
eike-hass May 8, 2025
9071295
bump peer dep, interactions and version
eike-hass May 8, 2025
2ccd4cb
regenerate package-locks
eike-hass May 8, 2025
b2b146a
regenerate package-locks
eike-hass May 9, 2025
45d737c
delete iota_move_calls crate
UMR1352 May 9, 2025
f20299b
Merge branch 'main' into chore/product-core-integration
itsyaasir May 13, 2025
a5c7b96
Refactor imports for consistency and readability in controller_token,…
itsyaasir May 13, 2025
b2c5140
Refactor import order and remove unnecessary type parameters in ident…
itsyaasir May 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[target.wasm32-unknown-unknown]
rustflags = ['--cfg', 'getrandom_backend="wasm_js"']
20 changes: 2 additions & 18 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ jobs:
uses: actions/download-artifact@v4
with:
name: identity-wasm-bindings-build
path: bindings/wasm/
path: bindings/wasm/identity_wasm

- name: Start iota sandbox
uses: './.github/actions/iota-rebase-sandbox/setup'
Expand All @@ -260,14 +260,6 @@ jobs:
run: npm ci
working-directory: bindings/wasm/identity_wasm

- name: Install JS dependencies # This is problematic: @iota/iota-sdk seems to not get used from the identity_wasm package, that is why reinstall deps here
run: npm ci
working-directory: bindings/wasm/iota_interaction_ts

- name: Setup link
run: npm link ../iota_interaction_ts
working-directory: bindings/wasm/identity_wasm

- name: Run Wasm examples
run: npm run test:readme && npm run test:node
working-directory: bindings/wasm/identity_wasm
Expand Down Expand Up @@ -297,15 +289,7 @@ jobs:
uses: actions/download-artifact@v4
with:
name: identity-wasm-bindings-build
path: bindings/wasm/

- name: Install JS dependencies # This is problematic: @iota/iota-sdk seems to not get used from the identity_wasm package, that is why reinstall deps here
run: npm ci
working-directory: bindings/wasm/iota_interaction_ts

- name: Setup link
run: npm link ../iota_interaction_ts
working-directory: bindings/wasm/identity_wasm
path: bindings/wasm/identity_wasm

- name: Start iota sandbox
uses: './.github/actions/iota-rebase-sandbox/setup'
Expand Down
10 changes: 0 additions & 10 deletions .github/workflows/shared-build-wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,6 @@ jobs:
with:
node-version: 20.x

- name: Install JS dependencies
run: npm ci
working-directory: bindings/wasm/iota_interaction_ts

- name: Build IOTA interaction bindings
run: npm run build
working-directory: bindings/wasm/iota_interaction_ts

- name: Install JS dependencies
run: npm ci
working-directory: bindings/wasm/identity_wasm
Expand Down Expand Up @@ -104,7 +96,5 @@ jobs:
bindings/wasm/identity_wasm/web
bindings/wasm/identity_wasm/examples/dist
bindings/wasm/identity_wasm/docs
bindings/wasm/iota_interaction_ts/node
bindings/wasm/iota_interaction_ts/web
if-no-files-found: error
retention-days: 1
5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,15 @@ members = [
"identity_ecdsa_verifier",
"identity_eddsa_verifier",
"examples",
"identity_iota_interaction",
"bindings/wasm/iota_interaction_ts",
]

exclude = ["bindings/wasm/identity_wasm", "bindings/grpc"]

[workspace.dependencies]
bls12_381_plus = { version = "0.8.17" }
iota_interaction = { git = "https://github.com/iotaledger/product-core.git", branch = "feat/transaction-client-core-for-identity", package = "iota_interaction" }
iota_interaction_ts = { git = "https://github.com/iotaledger/product-core.git", branch = "feat/transaction-client-core-for-identity", package = "iota_interaction_ts" }
product_common = { git = "https://github.com/iotaledger/product-core.git", branch = "feat/transaction-client-core-for-identity", package = "product_common" }
serde = { version = "1.0", default-features = false, features = ["alloc", "derive"] }
serde_json = { version = "1.0", default-features = false }
strum = { version = "0.25", default-features = false, features = ["std", "derive"] }
Expand Down
4 changes: 2 additions & 2 deletions bindings/wasm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ Here is an overview of the existing artifacts:
* `identity_wasm`<br>
Exports the IdentityClient to TypeScript using wasm-bindgen generated wasm bindings

* `iota_interaction_ts`<br>
* `iota_move_calls_ts`<br>
Imports TypeScript IOTA Client SDK types using wasm-bindgen generated wasm bindings
and implements identity_iota_interaction traits (among others, IotaClient and MoveCall traits) for wasm32 platforms.
and implements identity_iota_move_calls traits for wasm32 platforms.

## Building an Artifact

Expand Down
15 changes: 7 additions & 8 deletions bindings/wasm/identity_wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,12 @@ identity_ecdsa_verifier = { path = "../../../identity_ecdsa_verifier", default-f
identity_eddsa_verifier = { path = "../../../identity_eddsa_verifier", default-features = false, features = ["ed25519"] }
# Remove iota-sdk dependency while working on issue #1445
iota-sdk = { version = "1.1.5", default-features = false, features = ["serde", "std"] }
iota_interaction = { git = "https://github.com/iotaledger/product-core.git", branch = "feat/transaction-client-core-for-identity", package = "iota_interaction", default-features = false }
iota_interaction_ts = { git = "https://github.com/iotaledger/product-core.git", branch = "feat/transaction-client-core-for-identity", package = "iota_interaction_ts" }
js-sys = { version = "0.3.61" }
json-proof-token = "0.3.4"
proc_typescript = { version = "0.1.0", path = "./proc_typescript" }
product-core = { git = "https://github.com/iotaledger/product-core.git", branch = "feat/transaction-client-core-for-identity", package = "product_common", features = ["core-client", "transaction"] }
secret-storage = { git = "https://github.com/iotaledger/secret-storage.git", default-features = false, tag = "v0.3.0" }
serde = { version = "1.0", features = ["derive"] }
serde-wasm-bindgen = "0.6.5"
Expand All @@ -39,6 +42,8 @@ tsify = "0.4.5"
wasm-bindgen = { version = "0.2.100", features = ["serde-serialize"] }
wasm-bindgen-futures = { version = "0.4", default-features = false }

# iota_interaction_ts = { path = "../../../../product-core/bindings/wasm/iota_interaction_ts", optional = true }

[dependencies.identity_iota]
path = "../../../identity_iota"
default-features = false
Expand All @@ -53,11 +58,6 @@ features = [
"jpt-bbs-plus",
]

# dummy-client dependencies
[dependencies.iota_interaction_ts]
path = "../iota_interaction_ts"
optional = true

[target.'cfg(all(target_arch = "wasm32", not(target_os = "wasi")))'.dependencies]
getrandom_0_2 = { package = "getrandom", version = "0.2", default-features = false, features = ["js"] }
getrandom = { version = "0.3", default-features = false, features = ["wasm_js"] }
Expand All @@ -81,6 +81,5 @@ empty_docs = "allow"
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(wasm_bindgen_unstable_test_coverage)'] }

[features]
default = ["dummy-client"]
dummy-client = ["dep:iota_interaction_ts"]
keytool = ["dep:iota_interaction_ts", "iota_interaction_ts/keytool", "identity_iota/keytool"]
default = []
keytool = ["iota_interaction_ts/keytool", "identity_iota/keytool"]
Loading
Loading