Skip to content
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

Add X25519 key and verification method support #735

Merged
merged 20 commits into from
Mar 22, 2022
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
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: 1 addition & 1 deletion bindings/stronghold-nodejs/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "identity-stronghold-nodejs"
version = "0.0.0"
version = "0.5.0-dev.5"
edition = "2021"
publish = false
[lib]
Expand Down
4 changes: 2 additions & 2 deletions bindings/stronghold-nodejs/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions bindings/stronghold-nodejs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@iota/identity-stronghold-nodejs",
"version": "0.0.0",
"version": "0.5.0-dev.5",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"files": [
Expand Down Expand Up @@ -46,6 +46,6 @@
"test": "ts-mocha ./examples/src/tests/*.ts --parallel --jobs 4 --retries 3 --timeout 180000 --exit"
},
"peerDependencies": {
"@iota/identity-wasm": "^0.5.0-dev.4"
"@iota/identity-wasm": "0.5.0-dev.5"
}
}
39 changes: 39 additions & 0 deletions bindings/wasm/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,44 @@
# Changelog

## [wasm-v0.5.0-dev.5](https://github.com/iotaledger/identity.rs/tree/wasm-v0.5.0-dev.5) (2022-03-21)

[Full Changelog](https://github.com/iotaledger/identity.rs/compare/wasm-v0.5.0-dev.4...wasm-v0.5.0-dev.5)

This release introduces a breaking change to the proof field of DID Documents created by versions `v0.5.0-dev.1` through `v0.5.0-dev.4`, making all prior documents incompatible. The main feature of this release is the introduction of WebAssembly (Wasm) bindings for the high-level `Account` API for Javascript/Typescript in both Node.js and the browser. This includes Stronghold storage support but only for Node.js, as it was determined that compiling Stronghold to Wasm for private key storage in the browser would not be sufficiently secure.

### Changed

- Move DID Document proof outside metadata [\#728](https://github.com/iotaledger/identity.rs/pull/728)
- Replace Wasm getters and setters with methods [\#706](https://github.com/iotaledger/identity.rs/pull/706)
- Replace Wasm `Config` with `ClientConfig` interface [\#696](https://github.com/iotaledger/identity.rs/pull/696)
- Change `IotaDocument::verify_document` from a static function to a method [\#675](https://github.com/iotaledger/identity.rs/pull/675)
- Make Wasm support dependent on `target_arch` rather than feature [\#666](https://github.com/iotaledger/identity.rs/pull/666)
- Refactor `CoreDocument`, `VerificationMethod`, `Service` to use generic DID [\#655](https://github.com/iotaledger/identity.rs/pull/655)
- Overhaul `CredentialValidator`, add `PresentationValidator` [\#599](https://github.com/iotaledger/identity.rs/pull/599)
- Replace `ClientMap` with new `Resolver` [\#594](https://github.com/iotaledger/identity.rs/pull/594)

### Added

- Add deep clone function in Wasm [\#705](https://github.com/iotaledger/identity.rs/pull/705)
- Add `Duration` for `Timestamp` arithmetic [\#684](https://github.com/iotaledger/identity.rs/pull/684)
- Add `Client` fallback to local PoW option [\#682](https://github.com/iotaledger/identity.rs/pull/682)
- Add Wasm `Service` constructor and field getters [\#680](https://github.com/iotaledger/identity.rs/pull/680)
- Complete `Document` Wasm bindings [\#679](https://github.com/iotaledger/identity.rs/pull/679)
- Add `Document.signDocument` for Wasm [\#674](https://github.com/iotaledger/identity.rs/pull/674)
- Add Wasm bindings for `set_controller` and `set_also_known_as` in the `Account` [\#668](https://github.com/iotaledger/identity.rs/pull/668)
- Add NodeJs bindings for Stronghold `Storage` [\#660](https://github.com/iotaledger/identity.rs/pull/660)
- Add Wasm `Account` `Storage` interface [\#597](https://github.com/iotaledger/identity.rs/pull/597)
- Add Wasm bindings for the `Account` [\#574](https://github.com/iotaledger/identity.rs/pull/574)

### Patch

- Enable Wasm weak references for automatic garbage collection [\#694](https://github.com/iotaledger/identity.rs/pull/694)
- Fix `WasmTimestamp` JSON serialization [\#688](https://github.com/iotaledger/identity.rs/pull/688)

### Removed

- Remove `publicKeyJwk` [\#732](https://github.com/iotaledger/identity.rs/pull/732)

## [wasm-v0.5.0-dev.4](https://github.com/iotaledger/identity.rs/tree/wasm-v0.5.0-dev.4) (2022-02-14)

[Full Changelog](https://github.com/iotaledger/identity.rs/compare/wasm-v0.5.0-dev.3...wasm-v0.5.0-dev.4)
Expand Down
2 changes: 1 addition & 1 deletion bindings/wasm/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "identity-wasm"
version = "0.5.0-dev.4"
version = "0.5.0-dev.5"
authors = ["IOTA Stiftung"]
edition = "2021"
homepage = "https://www.iota.org"
Expand Down
25 changes: 25 additions & 0 deletions bindings/wasm/cypress/integration/keyExchange.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import {
keyExchange,
defaultClientConfig,
initIdentity,
} from '../../examples/dist/web'

describe(
"keyExchange",
{
defaultCommandTimeout: 1000*60*3, // 3 minutes to account for spurious network delays
},
() => {
before(async () => {
// The working directory is under __cypress at test runtime, so we need to go up one more level than usual
await initIdentity('../../../examples/dist/identity_wasm_bg.wasm');

// NOTE: `cy.wrap(defaultClientConfig()).as('config')` does not always work to make the config available
// from the shared context as `this.config` because it has a race condition with initializing the wasm.
// So call `defaultClientConfig()` manually for now.
});
it("Key Exchange", async () => {
await keyExchange(defaultClientConfig());
});
}
);
Loading