Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WASM implementation of adapters' traits on WASM types (#1506)
* Move identity_wasm package into new folder bindings/wasm/identity_wasm * Reorganize tsconfig and typedoc files * Extend build scripts to handle multiple artifacts and add new bindings/wasm README.md * Update identity_wasm/package.json to use shared build scripts * Initial version of the identity_iota_interaction crate * MoveType has been moved from identity_iota_core to identity_iota_interaction * The identity_iota_interaction README has been updated to use the latest draft for folder and crate names * Provide identity_iota_interaction crate types as `use identity_iota::iota_interaction::...` * Initial version of iota_interactions_ts * Prepare identity_iota_core/rebased for iota_interaction usage * Minor README fixes * Updated identity_interaction_rust MoveCalls to the latest identity_iota_core/rebase version * First compilable but not successfully testable version of identity_iota_core for the redesigned crate structure * Compiling identity_iota_core for wasm32 will result in one compiler error due to missing wasm-bindings for ProgrammableTransaction (TODO in identity_iota_core/src/rebased/transaction.rs) * identity_iota_core and examples are compilable for non wasm32 platforms * Remaining compiler warnings should be investigated * identity_iota_core e2e tests are compilable but will fail due to serialization/deserialization issues. For example: IotaTransactionBlockResponse bcs deserialization failed: NotSupported("deserialize_any") thread 'identity::adding_controller_works' panicked at /home/christof/Develop/iotaledger/identity.rs/identity_iota_core/src/rebased/transaction.rs:84:14: IotaTransactionBlockResponse bcs deserialization failed: NotSupported("deserialize_any") stack backtrace: 0: rust_begin_unwind 1: core::panicking::panic_fmt 2: core::result::unwrap_failed 3: <identity_iota_core::rebased::transaction::TransactionOutput<T> as core::convert::From<identity_iota_core::rebased::transaction::TransactionOutputInternal<T>>>::from 4: <T as identity_iota_core::rebased::transaction::Transaction>::execute_with_opt_gas::{{closure}} 5: identity_iota_core::rebased::transaction::Transaction::execute::{{closure}} 6: e2e::identity::adding_controller_works::{{closure}} 7: tokio::runtime::scheduler::current_thread::CurrentThread::block_on 8: tokio::runtime::runtime::Runtime::block_on 9: e2e::identity::adding_controller_works 10: core::ops::function::FnOnce::call_once note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace. * add stubs for `ProgrammableTransaction` type chain * re-add changes from `feat/add-iota_client_ts_sdk-impls` as closely as possible * ts move calls * Use cloned native IotaTransactionBlockResponse instead of a BCS deserialization BCS deserialization is not available for IotaTransactionBlockResponse because the BCS format is not self describing and several struct fields of IotaTransactionBlockResponse are optionally skipped during serialization. JSON deserialization will probably be available but using a cloned instance to convert a TransactionOutputInternal into a TransactionOutput will have a much better efficiency. * Fix build warnings and fix MoveType implementation for IotaVerifiableCredential All tests running successfully for the first time now * Fix & allow clippy errors * Fix clippy error writing `&Vec` instead of `&[_]` involves a new object where a slice will do * allow error clippy::too_many_arguments * Fix even more clippy errors * Elide superfluous explicit lifetimes * Use rustfmt ignore to exclude identity_iota_interaction/src/sdk_types from format checks * Fix rustfmt issues for identity_iota_core/src/iota_interaction_rust and identity_iota_interaction * Fix rustfmt issues for bindings/wasm/iota_interaction_ts and identity_iota_core * Update all paths for bindings/wasm/identity_wasm in al GH workflows files and add clippy + format steps for bindings/wasm/iota_interaction_ts * Rollback removing bindings/wasm/iota_interaction_ts from the workspace members list * Fix format issue for step "wasm fmt check identity_wasm" * Fix issue "identity_iota_core not compilable using --no-default-features" * Remove iota_interaction_ts related steps from github workflows as this crate is processed as workspace member * Fix several dprint issues * scratch * Add iota_interaction_ts build products as 'excludes' to the dprint config * Fixing paths to the bindings/wasm/identity_wasm crate in several READMEs and gitignore files * fix dprint issue missing empty line at end of file * Update licence_template file to allow optional "Modifications", "(c)" words and specific contributor copyrights * Add missing copyright license comments * Narrowed the dockerignore filter down from "bindings/wasm" to "bindings/wasm/identity_wasm" because bindings/wasm/iota_interaction_ts is needed to build the docker image * implement TsMoveCalls * bindings/wasm projects identity_wasm and iota_interaction_ts can be build now and example bindings/wasm/identity_wasm/examples/src/0_basic/-1_test_api_call.ts can be started * dprint refomated * assets move calls * avoid unsafe * clippy * Removed IntentFn adapters and fixed several issues reulting from last merged PR - identity_wasm rust toolchain set to "1.84.0" * implement missing bindings * make iota_interaction_ts a workspace member again * TransactionBuilder adaptor * TransactionBlockResponseAdapter * fix merge issues * fmt * Update package.json Removed superfluous @iota/iota-sdk dependency from iota_interaction_ts package * fix formatting and re-add TS ProgrammableTransaction * identity_wasm fmt --------- Co-authored-by: chrisgitiota <christof.gerritsma@iota.org> Co-authored-by: Sebastian Wolfram <wulfraem@users.noreply.github.com>
- Loading branch information