diff --git a/backend/Dockerfile b/backend/Dockerfile index c4db0913..63ad672c 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -4,6 +4,12 @@ RUN apt-get update && apt-get install -y protobuf-compiler COPY shared /shared +ARG REACT_APP_ISSUERS_GOVERNMENT_DID +ENV REACT_APP_ISSUERS_GOVERNMENT_DID=$REACT_APP_ISSUERS_GOVERNMENT_DID + +ARG REACT_APP_ISSUERS_COMPANY_HOUSE_DID +ENV REACT_APP_ISSUERS_COMPANY_HOUSE_DID=$REACT_APP_ISSUERS_COMPANY_HOUSE_DID + WORKDIR /web COPY web/package*.json ./ diff --git a/backend/package.json b/backend/package.json index 309e22c4..34ce8b2e 100644 --- a/backend/package.json +++ b/backend/package.json @@ -18,7 +18,7 @@ "test:cov": "jest --coverage", "test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand", "test:e2e": "jest --config ./test/jest-e2e.json", - "proto:generate": "protoc --experimental_allow_proto3_optional --ts_proto_out=./src --proto_path=../shared/proto identity/domain_linkage.proto identity/presentation.proto identity/credentials.proto user/user.proto oid4vc/siopv2.proto oid4vc/oid4vci.proto oid4vc/oid4vp.proto --ts_proto_opt=esModuleInterop=true --ts_proto_opt=nestJs=true" + "proto:generate": "protoc --experimental_allow_proto3_optional --ts_proto_out=./src --proto_path=../shared/proto identity/domain_linkage.proto identity/presentation.proto identity/credentials.proto identity/utils.proto user/user.proto oid4vc/siopv2.proto oid4vc/oid4vci.proto oid4vc/oid4vp.proto --ts_proto_opt=esModuleInterop=true --ts_proto_opt=nestJs=true" }, "dependencies": { "@grpc/grpc-js": "^1.9.13", diff --git a/backend/src/identity/identity.module.ts b/backend/src/identity/identity.module.ts index f687df9f..df8f7fda 100644 --- a/backend/src/identity/identity.module.ts +++ b/backend/src/identity/identity.module.ts @@ -19,7 +19,7 @@ import configuration from './configuration'; ClientProxyFactory.create({ transport: Transport.GRPC, options: { - package: ['credentials', 'presentation', 'domain_linkage'], + package: ['credentials', 'presentation', 'domain_linkage', 'utils'], url: configService.getOrThrow('grpc_service_url'), protoPath: [ join( @@ -34,6 +34,10 @@ import configuration from './configuration'; configService.getOrThrow('grpc_service_protopath'), 'domain_linkage.proto', ), + join( + configService.getOrThrow('grpc_service_protopath'), + 'utils.proto', + ), ], }, }), diff --git a/backend/src/identity/identity.service.ts b/backend/src/identity/identity.service.ts index e08e4061..d3fd41b2 100644 --- a/backend/src/identity/identity.service.ts +++ b/backend/src/identity/identity.service.ts @@ -20,12 +20,18 @@ import { DomainLinkageClient, ValidateDidResponse, } from './domain_linkage'; +import { + IOTA_UTILS_SERVICE_NAME, + IotaDidToAliasAddressResponse, + IotaUtilsClient, +} from './utils'; @Injectable() export class IdentityService implements OnModuleInit { private identityService: JwtClient; private presentationService: CredentialPresentationClient; private domainLinkageService: DomainLinkageClient; + private utilsService: IotaUtilsClient; private readonly logger = new Logger(IdentityService.name); @@ -43,6 +49,9 @@ export class IdentityService implements OnModuleInit { this.domainLinkageService = this.client.getService( DOMAIN_LINKAGE_SERVICE_NAME, ); + this.utilsService = this.client.getService( + IOTA_UTILS_SERVICE_NAME, + ); } async create( @@ -126,4 +135,25 @@ export class IdentityService implements OnModuleInit { throw error; } } + + async parseDID(did: string): Promise { + this.logger.debug('Received DID parsing request', did); + + try { + const response = await lastValueFrom( + this.utilsService + .didIotaToAliasAddress({ + did, + }) + .pipe( + timeout(this.configService.get('grpc_service_timeout')), + ), + ); + this.logger.debug('parsing response', response); + return response; + } catch (error) { + this.logger.error(error); + throw error; + } + } } diff --git a/backend/src/identity/utils.ts b/backend/src/identity/utils.ts new file mode 100644 index 00000000..a5620714 --- /dev/null +++ b/backend/src/identity/utils.ts @@ -0,0 +1,129 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v1.176.1 +// protoc v3.12.4 +// source: identity/utils.proto + +/* eslint-disable */ +import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices"; +import { Observable } from "rxjs"; + +export const protobufPackage = "utils"; + +export interface DataSigningRequest { + /** Raw data that will be signed. */ + data: Uint8Array; + /** Signing key's ID. */ + keyId: string; +} + +export interface DataSigningResponse { + /** Raw data signature. */ + signature: Uint8Array; +} + +export interface DidJwkResolutionRequest { + /** did:jwk string */ + did: string; +} + +export interface DidJwkResolutionResponse { + /** JSON DID Document */ + doc: string; +} + +export interface IotaDidToAliasAddressRequest { + did: string; +} + +export interface IotaDidToAliasAddressResponse { + aliasAddress: string; + network: string; +} + +export const UTILS_PACKAGE_NAME = "utils"; + +/** Service that handles signing operations on raw data. */ + +export interface SigningClient { + sign(request: DataSigningRequest): Observable; +} + +/** Service that handles signing operations on raw data. */ + +export interface SigningController { + sign( + request: DataSigningRequest, + ): Promise | Observable | DataSigningResponse; +} + +export function SigningControllerMethods() { + return function (constructor: Function) { + const grpcMethods: string[] = ["sign"]; + for (const method of grpcMethods) { + const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method); + GrpcMethod("Signing", method)(constructor.prototype[method], method, descriptor); + } + const grpcStreamMethods: string[] = []; + for (const method of grpcStreamMethods) { + const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method); + GrpcStreamMethod("Signing", method)(constructor.prototype[method], method, descriptor); + } + }; +} + +export const SIGNING_SERVICE_NAME = "Signing"; + +export interface DidJwkClient { + resolve(request: DidJwkResolutionRequest): Observable; +} + +export interface DidJwkController { + resolve( + request: DidJwkResolutionRequest, + ): Promise | Observable | DidJwkResolutionResponse; +} + +export function DidJwkControllerMethods() { + return function (constructor: Function) { + const grpcMethods: string[] = ["resolve"]; + for (const method of grpcMethods) { + const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method); + GrpcMethod("DidJwk", method)(constructor.prototype[method], method, descriptor); + } + const grpcStreamMethods: string[] = []; + for (const method of grpcStreamMethods) { + const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method); + GrpcStreamMethod("DidJwk", method)(constructor.prototype[method], method, descriptor); + } + }; +} + +export const DID_JWK_SERVICE_NAME = "DidJwk"; + +export interface IotaUtilsClient { + didIotaToAliasAddress(request: IotaDidToAliasAddressRequest): Observable; +} + +export interface IotaUtilsController { + didIotaToAliasAddress( + request: IotaDidToAliasAddressRequest, + ): Promise | Observable | IotaDidToAliasAddressResponse; +} + +export function IotaUtilsControllerMethods() { + return function (constructor: Function) { + const grpcMethods: string[] = ["didIotaToAliasAddress"]; + for (const method of grpcMethods) { + const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method); + GrpcMethod("IotaUtils", method)(constructor.prototype[method], method, descriptor); + } + const grpcStreamMethods: string[] = []; + for (const method of grpcStreamMethods) { + const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method); + GrpcStreamMethod("IotaUtils", method)(constructor.prototype[method], method, descriptor); + } + }; +} + +export const IOTA_UTILS_SERVICE_NAME = "IotaUtils"; diff --git a/backend/src/webapp/webapp.gateway.ts b/backend/src/webapp/webapp.gateway.ts index 5dd1c34c..c557ea09 100644 --- a/backend/src/webapp/webapp.gateway.ts +++ b/backend/src/webapp/webapp.gateway.ts @@ -186,6 +186,29 @@ export class WebAppGateway { this.logger.debug(`send validation response for did:${payload.did}`); } + @SubscribeMessage('requestDIDParsing') + async requestDIDParsing( + @MessageBody() + payload: { + did: string; + }, + @ConnectedSocket() client: Socket, + ) { + this.logger.debug( + `receiving DIDParsing request for did :${payload.did}`, + payload, + ); + + const result = await this.webAppService.requestDIDParsing(payload.did); + + await client.emitWithAck('parsedDID', { + did: payload.did, + result, + }); + + this.logger.debug(`send parsing response for did:${payload.did}`); + } + async connectDid(session_id: string, did: string, scope: Scopes) { const connectedClient = this.findClient(session_id); diff --git a/backend/src/webapp/webapp.service.ts b/backend/src/webapp/webapp.service.ts index 5a8d1327..67bd82b2 100644 --- a/backend/src/webapp/webapp.service.ts +++ b/backend/src/webapp/webapp.service.ts @@ -20,6 +20,7 @@ import * as CompanyCredentialConfig from '../../../shared/credentials/CompanyCre import { Providers } from '../../../shared/types/Providers'; import { ValidateDidResponse } from 'src/identity/domain_linkage'; import { JwtCreationResponse } from 'src/identity/credentials'; +import { IotaDidToAliasAddressResponse } from 'src/identity/utils'; type Token = { sessionId: string; @@ -139,6 +140,16 @@ export class WebAppService { return validation; } + async requestDIDParsing(did: string): Promise { + this.logger.debug(`receiving DIDParsing request for did:${did}`); + + const result = await this.identityService.parseDID(did); + + this.logger.debug(`parsing for did:${did}`, did); + + return result; + } + async connectUser(user: User): Promise { this.logger.debug( `connect user with did:${user.did} and code:${user.code}`, diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index a3b25c9f..54173ba9 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -11,10 +11,12 @@ services: - "--providers.docker=true" - "--providers.docker.exposedbydefault=false" - "--entrypoints.web.address=:80" + - "--entrypoints.web-dev.address=:9000" - "--entrypoints.grpc.address=:5000" # - "--log.level=DEBUG" ports: - "${HTTP_PORT}:80/tcp" + - "9000:9000/tcp" - "${GRPC_PORT}:5000/tcp" volumes: - "/var/run/docker.sock:/var/run/docker.sock:ro" @@ -33,21 +35,27 @@ services: extends: file: docker-compose.yml service: backend + expose: + - '9000' volumes: - ./backend/src:/backend/src - - ./web/build:/web/build + - ./web/src:/web/src - ./proto:/proto - ./types:/types entrypoint: - - npm - - run - - start:dev + - "/bin/sh" + - "-c" + - "npm run start:dev & cd ../web/ && npm run start" labels: traefik.enable: true traefik.http.routers.backend.rule: Host(`selv.local`) traefik.http.routers.backend.entrypoints: web traefik.http.routers.backend.service: backend traefik.http.services.backend.loadbalancer.server.port: "3000" + traefik.http.routers.web-dev-server.rule: Host(`selv.local`) + traefik.http.routers.web-dev-server.entrypoints: web-dev + traefik.http.routers.web-dev-server.service: web-dev-server + traefik.http.services.web-dev-server.loadbalancer.server.port: "9000" traefik.http.routers.backend-grpc.rule: PathPrefix(`/backend`) traefik.http.routers.backend-grpc.middlewares: backend-grpc-stripprefix traefik.http.middlewares.backend-grpc-stripprefix.stripprefix.prefixes: /backend diff --git a/docker-compose.yml b/docker-compose.yml index 03438056..731bc080 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,6 +10,9 @@ services: build: context: ./ dockerfile: ./backend/Dockerfile + args: + REACT_APP_ISSUERS_GOVERNMENT_DID: ${ISSUERS_GOVERNMENT_DID} + REACT_APP_ISSUERS_COMPANY_HOUSE_DID: ${ISSUERS_COMPANY_HOUSE_DID} expose: - '3000' - '50051' @@ -20,12 +23,10 @@ services: # - identity restart: unless-stopped environment: - ISSUERS_BANK_DID: ${ISSUERS_BANK_DID} - ISSUERS_BANK_FRAGMENT: ${ISSUERS_BANK_FRAGMENT} ISSUERS_GOVERNMENT_DID: ${ISSUERS_GOVERNMENT_DID} ISSUERS_GOVERNMENT_FRAGMENT: ${ISSUERS_GOVERNMENT_FRAGMENT} - ISSUERS_INSURANCE_DID: ${ISSUERS_INSURANCE_DID} - ISSUERS_INSURANCE_FRAGMENT: ${ISSUERS_INSURANCE_FRAGMENT} + ISSUERS_COMPANY_HOUSE_DID: ${ISSUERS_COMPANY_HOUSE_DID} + ISSUERS_COMPANY_HOUSE_FRAGMENT: ${ISSUERS_COMPANY_HOUSE_FRAGMENT} identity: image: iotaledger/identity-grpc:alpha @@ -49,10 +50,10 @@ services: dockerfile: ./oid4vc/TangleLabs/Dockerfile restart: unless-stopped environment: - RP_DID: ${ISSUERS_BANK_DID} - SIGNER_KEYID: ${ISSUERS_BANK_KEYID} - KEY_FRAGMENT: ${ISSUERS_BANK_FRAGMENT} - PUBLIC_URL: ${BANK_PUBLIC_URL} + RP_DID: ${ISSUERS_GOVERNMENT_DID} + SIGNER_KEYID: ${ISSUERS_GOVERNMENT_KEYID} + KEY_FRAGMENT: ${ISSUERS_GOVERNMENT_FRAGMENT} + PUBLIC_URL: ${GOVERNMENT_PUBLIC_URL} expose: - '3333' - '50051' @@ -75,7 +76,7 @@ services: # - ./shared:/usr/shared oid4vc-impierce: - image: impiercetechnologies/ssi-agent:c25f9da + image: impiercetechnologies/ssi-agent:fd8ed66 depends_on: - cqrs-postgres-db restart: unless-stopped @@ -86,22 +87,18 @@ services: volumes: - ./shared:/usr/shared - ./data/stronghold.hodl:/stronghold.hodl:ro - - ./oid4vc/impierce/event_publisher_config.yml:/app/agent_event_publisher_http/config.yml:ro - - ./oid4vc/impierce/config.yml:/app/agent_application/config.yml:ro - - ./oid4vc/impierce/issuance_config.yml:/app/agent_issuance/issuance_config.yml:ro + - ./oid4vc/impierce/config.yml:/app/agent_application/config.yaml:ro - ./data/tmp:/app/agent_api_rest - entrypoint: [ '/bin/sh', '-c', 'export AGENT_CONFIG_STRONGHOLD_PASSWORD=$$(cat /run/secrets/stronghold_pwd) ; /usr/local/bin/agent_application' ] + entrypoint: [ '/bin/sh', '-c', 'export UNICORE__SECRET_MANAGER__STRONGHOLD_PASSWORD=$$(cat /run/secrets/stronghold_pwd) ; /usr/local/bin/agent_application' ] environment: - AGENT_CONFIG_URL: ${INSURANCE_PUBLIC_URL} - AGENT_SECRET_MANAGER_STRONGHOLD_PATH: /stronghold.hodl - AGENT_CONFIG_ISSUER_KEY_ID: ${ISSUERS_INSURANCE_KEYID} - AGENT_CONFIG_ISSUER_DID: ${ISSUERS_INSURANCE_DID} - AGENT_CONFIG_ISSUER_FRAGMENT: ${ISSUERS_INSURANCE_FRAGMENT} - AGENT_CONFIG_DEFAULT_DID_METHOD: "did:iota:rms" - AGENT_APPLICATION_ENABLE_CORS: true - #AGENT_CONFIG_LOG_FORMAT: json - AGENT_CONFIG_EVENT_STORE: postgres - AGENT_STORE_DB_CONNECTION_STRING: postgresql://demo_user:demo_pass@cqrs-postgres-db:5432/demo + UNICORE__URL: ${COMPANY_HOUSE_PUBLIC_URL} + UNICORE__SECRET_MANAGER__STRONGHOLD_PATH: /stronghold.hodl + UNICORE__SECRET_MANAGER__ISSUER_ES256_KEY_ID: ${ISSUERS_COMPANY_HOUSE_KEYID} + UNICORE__SECRET_MANAGER__ISSUER_DID: ${ISSUERS_COMPANY_HOUSE_DID} + UNICORE__SECRET_MANAGER__ISSUER_FRAGMENT: ${ISSUERS_COMPANY_HOUSE_FRAGMENT} + UNICORE__CORS_ENABLED: true + #UNICORE__LOG_FORMAT: json + UNICORE__EVENT_STORE__CONNECTION_STRING: postgresql://demo_user:demo_pass@cqrs-postgres-db:5432/demo #RUST_LOG: debug secrets: - stronghold_pwd diff --git a/oid4vc/impierce/config.yml b/oid4vc/impierce/config.yml index f6abf0e0..37aaa121 100644 --- a/oid4vc/impierce/config.yml +++ b/oid4vc/impierce/config.yml @@ -1,28 +1,99 @@ -# List of Subject Syntax Types (DID Methods) supported by UniCore. The first item in the list is the default Syntax Type, -# meaning UniCore will use its identifier belonging to this type by default. -subject_syntax_types_supported: - - did:iota:rms - - did:key - - did:jwk - -# List of supported signing algorithms for ID Tokens, Request Objects, and Verifiable Credentials. As of now, UniCore -# only supports EdDSA. -signing_algorithms_supported: &signing_algorithms_supported - - EdDSA -id_token_signing_alg_values_supported: *signing_algorithms_supported -request_object_signing_alg_values_supported: *signing_algorithms_supported +# Application +log_format: "json" +event_store: + type: "postgres" + # connection_string: "" <== Should be injected through the env variable `UNICORE__EVENT_STORE__CONNECTION_STRING` +# url: "https://ssi-agent.example.org" +# base_path: "unicore" <== Runs all endpoints with a base path such as `https://ssi-agent.example.org/unicore` +# cors_enabled: false <== Only applicable for browser-based wallets that require CORS +external_server_response_timeout_ms: 1000 #relevant for remote signing + +did_methods: + did_jwk: + enabled: true + did_key: + enabled: true + did_iota_rms: + enabled: true + preferred: true + did_web: + enabled: false + +did_document_cache: + enabled: true + ttl: 5000 + +domain_linkage_enabled: false + +signing_algorithms_supported: + es256: + preferred: true + enabled: true + eddsa: + enabled: false + + +# TODO: required to be stated explicitly? vp_formats: jwt_vc_json: - alg: *signing_algorithms_supported + enabled: true jwt_vp_json: - alg: *signing_algorithms_supported + enabled: true + +# agent_event_publisher_http +# Configure here to which events will be dispatched to a specific `target_url`. In the example below, the +# `EventPublisherHttp` will listen for the `SIOPv2AuthorizationResponseVerified` event which is part of the `connection` +# aggregate. The events will be dispatched to the `https://my-domain.example.org/event-subscriber` endpoint. +event_publishers: + http: + enabled: true + target_url: "http://backend:3000/event-listener" + events: + server_config: [] + credential: [ UnsignedCredentialCreated, CredentialSigned ] + authorization_request: [ AuthorizationRequestObjectSigned ] + connection: [ + SIOPv2AuthorizationResponseVerified, + OID4VPAuthorizationResponseVerified, + ] + offer: [ + CredentialRequestVerified, + CredentialResponseCreated, + ] -# These display parameters can be used by identity Wallets to display interactions with UniCore. + + +# These display parameters are interpreted by identity wallets. display: # This value will also be used in the SIOPv2/OID4VP `client_metadata`'s `client_name` property. - - name: Selv Company House + - name: Selv Company Registrar locale: en logo: # This value will also be used in the SIOPv2/OID4VP `client_metadata`'s `logo_uri` property. - uri: https://impierce.com/images/logo-blue.png - alt_text: UniCore Logo \ No newline at end of file + uri: "https://www.impierce.com/external/impierce-icon.png" #TODO: square, transparent background + alt_text: Selv Company Registrar Logo + +credential_configurations: + - credential_configuration_id: w3c_vc_credential + format: jwt_vc_json + credential_definition: + type: + - VerifiableCredential + display: + - name: Company Registry Credential + locale: en + logo: + uri: https://www.impierce.com/external/impierce-logo.png #TODO: square, transparent background + alt_text: Company Registry Credential Logo + +# Key configuration (temporary) +secret_manager: + # Set this to `true` in order to generate a new stronghold file if it does not exist yet. + generate_stronghold: false + stronghold_path: "/tmp/local.stronghold" + # stronghold_password: "" <== Should be injected through the env variable `UNICORE__SECRET_MANAGER__STRONGHOLD_PASSWORD` + # stronghold_password_file: "" + # issuer_eddsa_key_id: "ed25519-0" + # issuer_es256_key_id: "es256-0" + # issuer_did: "did:iota:rms:0x0000000000000000000000000000000000000000000000000000000000000000" + # issuer_fragment: "key-0" \ No newline at end of file diff --git a/oid4vc/impierce/event_publisher_config.yml b/oid4vc/impierce/event_publisher_config.yml deleted file mode 100644 index 7d5ef2a7..00000000 --- a/oid4vc/impierce/event_publisher_config.yml +++ /dev/null @@ -1,24 +0,0 @@ -target_url: &target_url "http://backend:3000/event-listener" - -authorization_request: { - target_url: *target_url, - target_events: [ - AuthorizationRequestObjectSigned - ] -} - -connection: { - target_url: *target_url, - target_events: [ - SIOPv2AuthorizationResponseVerified, - OID4VPAuthorizationResponseVerified - ] -} - -offer: { - target_url: *target_url, - target_events: [ - CredentialRequestVerified, - CredentialResponseCreated, - ] -} diff --git a/oid4vc/impierce/issuance_config.yml b/oid4vc/impierce/issuance_config.yml deleted file mode 100644 index 9e4cf998..00000000 --- a/oid4vc/impierce/issuance_config.yml +++ /dev/null @@ -1,14 +0,0 @@ -server_config: - credential_configurations: - - credential_configuration_id: w3c_vc_credential - format: jwt_vc_json - credential_definition: - type: - - VerifiableCredential - # - OpenBadgeCredential <-- uncomment this to specify that the to be issued Credentials are OpenBadgev3 Credentials - display: - - name: Verifiable Credential - locale: en - logo: - uri: https://impierce.com/images/logo-blue.png - alt_text: UniCore Logo \ No newline at end of file diff --git a/shared/proto/identity/utils.proto b/shared/proto/identity/utils.proto index 2caa6124..80f06925 100644 --- a/shared/proto/identity/utils.proto +++ b/shared/proto/identity/utils.proto @@ -33,4 +33,17 @@ message DidJwkResolutionResponse { service DidJwk { rpc resolve(DidJwkResolutionRequest) returns (DidJwkResolutionResponse); +} + +message IotaDidToAliasAddressRequest { + string did = 1; +} + +message IotaDidToAliasAddressResponse { + string alias_address = 1; + string network = 2; +} + +service IotaUtils { + rpc did_iota_to_alias_address(IotaDidToAliasAddressRequest) returns (IotaDidToAliasAddressResponse); } \ No newline at end of file diff --git a/tooling/API/Identity/GRPC.http b/tooling/API/Identity/GRPC.http index edccdd81..b6dad2f0 100644 --- a/tooling/API/Identity/GRPC.http +++ b/tooling/API/Identity/GRPC.http @@ -135,4 +135,14 @@ GRPC /CredentialPresentation/validate GRPC /DidJwk/resolve { "did": "did:jwk:eyJhbGciOiJFZERTQSIsImNydiI6IkVkMjU1MTkiLCJraWQiOiJycHpFMUhrUmZiZXRWZFd5YmpDTEFJLVRqcjVrTlVjMFNFeWlieEFSTjlrIiwia3R5IjoiT0tQIiwieCI6InpHdFNuVXppdWhXVVN2MThjQVVzdk5iUXdxZ0l5d2hOY2pUQnhnSHNzSUkifQ" +} +### +{{ + //pre request script + exports.data = new TextEncoder().encode("test"); +}} + +GRPC /IotaUtils/did_iota_to_alias_address +{ + "did": "did:iota:rms:0x13a9b9a4d6a35e28cac6fa90e0d558912648e80a142d90d642b08e1b3627cbd5" } \ No newline at end of file diff --git a/tooling/Cargo.lock b/tooling/Cargo.lock index b36bd67f..a4b90ab5 100644 --- a/tooling/Cargo.lock +++ b/tooling/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "addr2line" -version = "0.21.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" dependencies = [ "gimli", ] @@ -17,6 +17,12 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +[[package]] +name = "adler32" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aae1277d39aeec15cb388266ecc24b11c80469deae6067e17a1a7aa9e5c1f234" + [[package]] name = "aead" version = "0.5.2" @@ -29,9 +35,9 @@ dependencies = [ [[package]] name = "aes" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac1f845298e95f983ff1944b728ae08b8cebab80d684f0a832ed0fc74dfa27e2" +checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" dependencies = [ "cfg-if", "cipher", @@ -54,9 +60,9 @@ dependencies = [ [[package]] name = "ahash" -version = "0.8.7" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77c3a9648d43b9cd48db467b3f87fdd6e146bcc88ab0180006cef2179fe11d01" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if", "once_cell", @@ -66,18 +72,18 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" dependencies = [ "memchr", ] [[package]] name = "allocator-api2" -version = "0.2.16" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" +checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" [[package]] name = "ansi_term" @@ -100,11 +106,20 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33954243bd79057c2de7338850b85983a44588021f8a5fee574a8888c6de4344" +[[package]] +name = "arbitrary" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110" +dependencies = [ + "derive_arbitrary", +] + [[package]] name = "arrayref" -version = "0.3.7" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" +checksum = "9d151e35f61089500b617991b791fc8bfd237ae50cd5950803758a179b41e67a" [[package]] name = "arrayvec" @@ -114,13 +129,13 @@ checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" [[package]] name = "async-trait" -version = "0.1.77" +version = "0.1.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" +checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.74", ] [[package]] @@ -164,15 +179,15 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.1.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "backtrace" -version = "0.3.69" +version = "0.3.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" dependencies = [ "addr2line", "cc", @@ -207,6 +222,12 @@ version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + [[package]] name = "base64ct" version = "1.6.0" @@ -236,9 +257,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.2" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "bitvec" @@ -311,9 +332,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.14.0" +version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "byte-slice-cast" @@ -323,9 +344,9 @@ checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" [[package]] name = "bytemuck" -version = "1.16.0" +version = "1.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78834c15cb5d5efe3452d58b1e8ba890dd62d21907f867f383358198e56ebca5" +checksum = "102087e286b4677862ea56cf8fc58bb2cdfa8725c40ffb80fe3a008eb7f2fc83" [[package]] name = "byteorder" @@ -335,9 +356,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.5.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" +checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" [[package]] name = "camino" @@ -393,12 +414,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.83" +version = "1.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" -dependencies = [ - "libc", -] +checksum = "e9e8aabfac534be767c909e0690571677d49f41bd8465ae876fe043d52ba5292" [[package]] name = "cfg-if" @@ -510,15 +528,24 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" + +[[package]] +name = "core2" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b49ba7ef1ad6107f8824dbe97de947cbaac53c44e7f9756a1fba0d37c1eec505" +dependencies = [ + "memchr", +] [[package]] name = "cpufeatures" -version = "0.2.12" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +checksum = "51e852e6dc9a5bed1fae92dd2375037bf2b768725bf3be87811edee3249d09ad" dependencies = [ "libc", ] @@ -534,9 +561,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.19" +version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" [[package]] name = "crunchy" @@ -611,16 +638,15 @@ dependencies = [ [[package]] name = "curve25519-dalek" -version = "4.1.1" +version = "4.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89b8c6a2e4b1f45971ad09761aafb85514a84744b67a95e32c3cc1352d1f65c" +checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be" dependencies = [ "cfg-if", "cpufeatures", "curve25519-dalek-derive", "digest 0.10.7", "fiat-crypto", - "platforms", "rustc_version", "subtle", "zeroize", @@ -634,20 +660,26 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.74", ] +[[package]] +name = "dary_heap" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7762d17f1241643615821a8455a0b2c3e803784b058693d990b11f2dce25a0ca" + [[package]] name = "data-encoding" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" +checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" [[package]] name = "data-encoding-macro" -version = "0.1.14" +version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20c01c06f5f429efdf2bae21eb67c28b3df3cf85b7dd2d8ef09c0838dac5d33e" +checksum = "f1559b6cba622276d6d63706db152618eeb15b89b3e4041446b05876e352e639" dependencies = [ "data-encoding", "data-encoding-macro-internal", @@ -655,9 +687,9 @@ dependencies = [ [[package]] name = "data-encoding-macro-internal" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0047d07f2c89b17dd631c80450d69841a6b5d7fb17278cbc43d7e4cfcf2576f3" +checksum = "332d754c0af53bc87c108fed664d121ecf59207ec4196041f04d6ab9002ad33f" dependencies = [ "data-encoding", "syn 1.0.109", @@ -665,9 +697,9 @@ dependencies = [ [[package]] name = "der" -version = "0.7.8" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" +checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" dependencies = [ "const-oid", "pem-rfc7468", @@ -684,15 +716,26 @@ dependencies = [ "serde", ] +[[package]] +name = "derive_arbitrary" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.74", +] + [[package]] name = "derive_more" -version = "0.99.17" +version = "0.99.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" +checksum = "5f33878137e4dafd7fa914ad4e259e18a4e8e532b9617a2d0150262bf53abfce" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.74", ] [[package]] @@ -767,6 +810,17 @@ dependencies = [ "winapi", ] +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.74", +] + [[package]] name = "dotenv" version = "0.15.0" @@ -804,9 +858,9 @@ version = "4.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7d9ce6874da5d4415896cd45ffbc4d1cfc0c4f9c079427bd870742c30f2f65a9" dependencies = [ - "curve25519-dalek 4.1.1", + "curve25519-dalek 4.1.3", "ed25519", - "hashbrown 0.14.3", + "hashbrown 0.14.5", "hex", "rand_core 0.6.4", "serde", @@ -816,9 +870,9 @@ dependencies = [ [[package]] name = "either" -version = "1.9.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" [[package]] name = "elliptic-curve" @@ -843,9 +897,9 @@ dependencies = [ [[package]] name = "encoding_rs" -version = "0.8.33" +version = "0.8.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" +checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" dependencies = [ "cfg-if", ] @@ -869,6 +923,16 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" +[[package]] +name = "errno" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + [[package]] name = "ff" version = "0.10.1" @@ -892,9 +956,21 @@ dependencies = [ [[package]] name = "fiat-crypto" -version = "0.2.5" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27573eac26f4dd11e2b1916c3fe1baa56407c83c71a773a8ba17ec0bca03b6b7" +checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" + +[[package]] +name = "filetime" +version = "0.2.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf401df4a4e3872c4fe8151134cf483738e74b67fc934d6532c882b3d24a4550" +dependencies = [ + "cfg-if", + "libc", + "libredox", + "windows-sys 0.59.0", +] [[package]] name = "fixed-hash" @@ -910,9 +986,9 @@ dependencies = [ [[package]] name = "flate2" -version = "1.0.30" +version = "1.0.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae" +checksum = "7f211bbe8e69bbd0cfdea405084f128ae8b4aaa6b0b522fc8f2b009084797920" dependencies = [ "crc32fast", "miniz_oxide", @@ -1007,7 +1083,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.74", ] [[package]] @@ -1062,9 +1138,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.12" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", "js-sys", @@ -1087,9 +1163,9 @@ dependencies = [ [[package]] name = "ghash" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d930750de5717d2dd0b8c0d42c076c0e884c81a73e6cab859bbd2339c71e3e40" +checksum = "f0d8a4362ccb29cb0b265253fb0a2728f592895ee6854fd9bc13f2ffda266ff1" dependencies = [ "opaque-debug", "polyval", @@ -1097,9 +1173,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.28.1" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" +checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" [[package]] name = "gloo-timers" @@ -1138,9 +1214,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.24" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9" +checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" dependencies = [ "bytes", "fnv", @@ -1148,7 +1224,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap 2.2.2", + "indexmap 2.4.0", "slab", "tokio", "tokio-util", @@ -1163,9 +1239,9 @@ checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" [[package]] name = "hashbrown" -version = "0.14.3" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" dependencies = [ "ahash", "allocator-api2", @@ -1189,9 +1265,9 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.3.4" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d3d0e0f38255e7fa3cf31335b3a56f05febd18025f4db5ef7a0cfb4f8da651f" +checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" [[package]] name = "hex" @@ -1219,9 +1295,9 @@ dependencies = [ [[package]] name = "http" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" dependencies = [ "bytes", "fnv", @@ -1241,9 +1317,9 @@ dependencies = [ [[package]] name = "httparse" -version = "1.8.0" +version = "1.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" +checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" [[package]] name = "httpdate" @@ -1259,9 +1335,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.28" +version = "0.14.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" +checksum = "a152ddd61dfaec7273fe8419ab357f33aee0d914c5f4efbf0d96fa749eea5ec9" dependencies = [ "bytes", "futures-channel", @@ -1297,8 +1373,8 @@ dependencies = [ [[package]] name = "identity_core" -version = "1.2.0" -source = "git+https://github.com/iotaledger/identity.rs?branch=main#f25c5932398367dd0c3eab9dcaeacaabf9c5db97" +version = "1.3.1" +source = "git+https://github.com/iotaledger/identity.rs?branch=feat/did-key#c43fd33e56ada2c65229f95c681fcf350e60710a" dependencies = [ "iota-crypto", "js-sys", @@ -1314,8 +1390,8 @@ dependencies = [ [[package]] name = "identity_credential" -version = "1.2.0" -source = "git+https://github.com/iotaledger/identity.rs?branch=main#f25c5932398367dd0c3eab9dcaeacaabf9c5db97" +version = "1.3.1" +source = "git+https://github.com/iotaledger/identity.rs?branch=feat/did-key#c43fd33e56ada2c65229f95c681fcf350e60710a" dependencies = [ "async-trait", "flate2", @@ -1323,7 +1399,7 @@ dependencies = [ "identity_did", "identity_document", "identity_verification", - "indexmap 2.2.2", + "indexmap 2.4.0", "itertools 0.11.0", "once_cell", "roaring", @@ -1338,12 +1414,13 @@ dependencies = [ [[package]] name = "identity_did" -version = "1.2.0" -source = "git+https://github.com/iotaledger/identity.rs?branch=main#f25c5932398367dd0c3eab9dcaeacaabf9c5db97" +version = "1.3.1" +source = "git+https://github.com/iotaledger/identity.rs?branch=feat/did-key#c43fd33e56ada2c65229f95c681fcf350e60710a" dependencies = [ "did_url_parser", "form_urlencoded", "identity_core", + "identity_jose", "serde", "strum", "thiserror", @@ -1351,32 +1428,34 @@ dependencies = [ [[package]] name = "identity_document" -version = "1.2.0" -source = "git+https://github.com/iotaledger/identity.rs?branch=main#f25c5932398367dd0c3eab9dcaeacaabf9c5db97" +version = "1.3.1" +source = "git+https://github.com/iotaledger/identity.rs?branch=feat/did-key#c43fd33e56ada2c65229f95c681fcf350e60710a" dependencies = [ "did_url_parser", "identity_core", "identity_did", "identity_verification", - "indexmap 2.2.2", + "indexmap 2.4.0", "serde", "strum", "thiserror", ] [[package]] -name = "identity_eddsa_verifier" -version = "1.2.0" -source = "git+https://github.com/iotaledger/identity.rs?branch=main#f25c5932398367dd0c3eab9dcaeacaabf9c5db97" +name = "identity_ecdsa_verifier" +version = "1.3.1" +source = "git+https://github.com/iotaledger/identity.rs?branch=feat/did-key#c43fd33e56ada2c65229f95c681fcf350e60710a" dependencies = [ - "identity_jose", - "iota-crypto", + "identity_verification", + "k256", + "p256", + "signature", ] [[package]] name = "identity_iota" -version = "1.2.0" -source = "git+https://github.com/iotaledger/identity.rs?branch=main#f25c5932398367dd0c3eab9dcaeacaabf9c5db97" +version = "1.3.1" +source = "git+https://github.com/iotaledger/identity.rs?branch=feat/did-key#c43fd33e56ada2c65229f95c681fcf350e60710a" dependencies = [ "identity_core", "identity_credential", @@ -1390,8 +1469,8 @@ dependencies = [ [[package]] name = "identity_iota_core" -version = "1.2.0" -source = "git+https://github.com/iotaledger/identity.rs?branch=main#f25c5932398367dd0c3eab9dcaeacaabf9c5db97" +version = "1.3.1" +source = "git+https://github.com/iotaledger/identity.rs?branch=feat/did-key#c43fd33e56ada2c65229f95c681fcf350e60710a" dependencies = [ "async-trait", "futures", @@ -1413,9 +1492,10 @@ dependencies = [ [[package]] name = "identity_jose" -version = "1.2.0" -source = "git+https://github.com/iotaledger/identity.rs?branch=main#f25c5932398367dd0c3eab9dcaeacaabf9c5db97" +version = "1.3.1" +source = "git+https://github.com/iotaledger/identity.rs?branch=feat/did-key#c43fd33e56ada2c65229f95c681fcf350e60710a" dependencies = [ + "bls12_381_plus", "identity_core", "iota-crypto", "json-proof-token", @@ -1428,8 +1508,8 @@ dependencies = [ [[package]] name = "identity_resolver" -version = "1.2.0" -source = "git+https://github.com/iotaledger/identity.rs?branch=main#f25c5932398367dd0c3eab9dcaeacaabf9c5db97" +version = "1.3.1" +source = "git+https://github.com/iotaledger/identity.rs?branch=feat/did-key#c43fd33e56ada2c65229f95c681fcf350e60710a" dependencies = [ "async-trait", "futures", @@ -1445,8 +1525,8 @@ dependencies = [ [[package]] name = "identity_storage" -version = "1.2.0" -source = "git+https://github.com/iotaledger/identity.rs?branch=main#f25c5932398367dd0c3eab9dcaeacaabf9c5db97" +version = "1.3.1" +source = "git+https://github.com/iotaledger/identity.rs?branch=feat/did-key#c43fd33e56ada2c65229f95c681fcf350e60710a" dependencies = [ "anyhow", "async-trait", @@ -1465,9 +1545,10 @@ dependencies = [ [[package]] name = "identity_stronghold" -version = "1.2.0" -source = "git+https://github.com/iotaledger/identity.rs?branch=main#f25c5932398367dd0c3eab9dcaeacaabf9c5db97" +version = "1.3.1" +source = "git+https://github.com/iotaledger/identity.rs?branch=feat/did-key#c43fd33e56ada2c65229f95c681fcf350e60710a" dependencies = [ + "anyhow", "async-trait", "identity_storage", "identity_verification", @@ -1475,14 +1556,15 @@ dependencies = [ "iota-sdk", "iota_stronghold", "rand", + "stronghold_ext", "tokio", "zeroize", ] [[package]] name = "identity_verification" -version = "1.2.0" -source = "git+https://github.com/iotaledger/identity.rs?branch=main#f25c5932398367dd0c3eab9dcaeacaabf9c5db97" +version = "1.3.1" +source = "git+https://github.com/iotaledger/identity.rs?branch=feat/did-key#c43fd33e56ada2c65229f95c681fcf350e60710a" dependencies = [ "identity_core", "identity_did", @@ -1544,12 +1626,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.2" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "824b2ae422412366ba479e8111fd301f7b5faece8149317bb81925979a53f520" +checksum = "93ead53efc7ea8ed3cfb0c79fc8023fbb782a5432b52830b6518941cebe6505c" dependencies = [ "equivalent", - "hashbrown 0.14.3", + "hashbrown 0.14.5", "serde", ] @@ -1565,9 +1647,9 @@ dependencies = [ [[package]] name = "instant" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" dependencies = [ "cfg-if", "js-sys", @@ -1619,13 +1701,13 @@ dependencies = [ "anymap", "async-trait", "bech32", - "bitflags 2.4.2", + "bitflags 2.6.0", "bytemuck", "derive_more", "futures", "getset", "gloo-timers", - "hashbrown 0.14.3", + "hashbrown 0.14.5", "heck", "hex", "instant", @@ -1684,7 +1766,7 @@ version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" dependencies = [ - "hermit-abi 0.3.4", + "hermit-abi 0.3.9", "libc", "windows-sys 0.52.0", ] @@ -1721,15 +1803,15 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "js-sys" -version = "0.3.67" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a1d36f1235bc969acba30b7f5990b864423a6068a10f7c90ae8f0112e3a59d1" +checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" dependencies = [ "wasm-bindgen", ] @@ -1742,7 +1824,7 @@ checksum = "179551c27c512c948af1edaf4bd7e1d1486d223f8ec4fd41cd760f7645fd4197" dependencies = [ "cargo-license", "data-encoding", - "indexmap 2.2.2", + "indexmap 2.4.0", "json-unflattening", "serde", "serde_json", @@ -1774,6 +1856,7 @@ dependencies = [ "once_cell", "serdect", "sha2", + "signature", ] [[package]] @@ -1787,60 +1870,101 @@ dependencies = [ [[package]] name = "lazy_static" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.153" +version = "0.2.155" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" +checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" + +[[package]] +name = "libflate" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45d9dfdc14ea4ef0900c1cddbc8dcd553fbaacd8a4a282cf4018ae9dd04fb21e" +dependencies = [ + "adler32", + "core2", + "crc32fast", + "dary_heap", + "libflate_lz77", +] + +[[package]] +name = "libflate_lz77" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6e0d73b369f386f1c44abd9c570d5318f55ccde816ff4b562fa452e5182863d" +dependencies = [ + "core2", + "hashbrown 0.14.5", + "rle-decode-fast", +] [[package]] name = "libredox" -version = "0.0.1" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" +checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.6.0", "libc", "redox_syscall", ] [[package]] -name = "libsodium-sys" -version = "0.2.7" +name = "libsodium-sys-stable" +version = "1.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b779387cd56adfbc02ea4a668e704f729be8d6a6abd2c27ca5ee537849a92fd" +checksum = "5fd1882b85f01cdd4021c0664fd897710a04c5d01b593a5a70e1b0baa999c1f8" dependencies = [ "cc", "libc", + "libflate", + "minisign-verify", "pkg-config", - "walkdir", + "tar", + "ureq", + "vcpkg", + "zip", ] +[[package]] +name = "linux-raw-sys" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" + [[package]] name = "lock_api" -version = "0.4.11" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" +checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" dependencies = [ "autocfg", "scopeguard", ] +[[package]] +name = "lockfree-object-pool" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9374ef4228402d4b7e403e5838cb880d9ee663314b0a900d5a6aabf0c213552e" + [[package]] name = "log" -version = "0.4.20" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "memchr" -version = "2.7.1" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "memoffset" @@ -1857,24 +1981,31 @@ version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" +[[package]] +name = "minisign-verify" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "933dca44d65cdd53b355d0b73d380a2ff5da71f87f036053188bf1eab6a19881" + [[package]] name = "miniz_oxide" -version = "0.7.1" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" dependencies = [ "adler", ] [[package]] name = "mio" -version = "0.8.10" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" +checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" dependencies = [ + "hermit-abi 0.3.9", "libc", "wasi", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -1908,20 +2039,20 @@ checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" [[package]] name = "num-derive" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfb77679af88f8b125209d354a202862602672222e7f2313fdd6dc349bad4712" +checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.74", ] [[package]] name = "num-traits" -version = "0.2.17" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", ] @@ -1932,15 +2063,15 @@ version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.3.4", + "hermit-abi 0.3.9", "libc", ] [[package]] name = "object" -version = "0.32.2" +version = "0.36.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +checksum = "27b64972346851a39438c60b341ebc01bba47464ae329e55cf343eb93964efd9" dependencies = [ "memchr", ] @@ -1953,9 +2084,9 @@ checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "opaque-debug" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" [[package]] name = "openssl-probe" @@ -1969,6 +2100,18 @@ version = "6.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2355d85b9a3786f481747ced0e0ff2ba35213a1f9bd406ed906554d7af805a1" +[[package]] +name = "p256" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9863ad85fa8f4460f9c48cb909d38a0d689dba1f6f6988a5e3e0d31071bcd4b" +dependencies = [ + "ecdsa", + "elliptic-curve", + "primeorder", + "sha2", +] + [[package]] name = "packable" version = "0.8.3" @@ -2005,9 +2148,9 @@ dependencies = [ [[package]] name = "parity-scale-codec" -version = "3.6.9" +version = "3.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "881331e34fa842a2fb61cc2db9643a8fedc615e47cfcc52597d1af0db9a7e8fe" +checksum = "306800abfa29c7f16596b5970a588435e3d5b3149683d00c12b699cc19f895ee" dependencies = [ "arrayvec", "bitvec", @@ -2019,11 +2162,11 @@ dependencies = [ [[package]] name = "parity-scale-codec-derive" -version = "3.6.9" +version = "3.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be30eaf4b0a9fba5336683b38de57bb86d179a35862ba6bfcf57625d006bde5b" +checksum = "d830939c76d294956402033aee57a6da7b438f2294eb94864c37b0569053a42c" dependencies = [ - "proc-macro-crate 2.0.2", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", "syn 1.0.109", @@ -2031,9 +2174,9 @@ dependencies = [ [[package]] name = "paste" -version = "1.0.14" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" [[package]] name = "pbkdf2" @@ -2072,9 +2215,9 @@ dependencies = [ [[package]] name = "pin-project-lite" -version = "0.2.13" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" [[package]] name = "pin-utils" @@ -2094,15 +2237,9 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2900ede94e305130c13ddd391e0ab7cbaeb783945ae07a279c268cb05109c6cb" - -[[package]] -name = "platforms" -version = "3.3.0" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "626dec3cac7cc0e1577a2ec3fc496277ec2baa084bebad95bb6fdbfae235f84c" +checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" [[package]] name = "poly1305" @@ -2117,9 +2254,9 @@ dependencies = [ [[package]] name = "polyval" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d52cff9d1d4dee5fe6d03729099f4a310a41179e0a10dbf542039873f2e826fb" +checksum = "9d1fe60d06143b2430aa532c94cfe9e29783047f06c0d7fd359a9a51b729fa25" dependencies = [ "cfg-if", "cpufeatures", @@ -2135,9 +2272,12 @@ checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "ppv-lite86" -version = "0.2.17" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy", +] [[package]] name = "prefix-hex" @@ -2150,6 +2290,15 @@ dependencies = [ "uint", ] +[[package]] +name = "primeorder" +version = "0.13.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "353e1ca18966c16d9deb1c69278edbc5f194139612772bd9537af60ac231e1e6" +dependencies = [ + "elliptic-curve", +] + [[package]] name = "primitive-types" version = "0.12.2" @@ -2174,12 +2323,11 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "2.0.2" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b00f26d3400549137f92511a46ac1cd8ce37cb5598a96d382381458b992a5d24" +checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" dependencies = [ - "toml_datetime", - "toml_edit 0.20.2", + "toml_edit 0.21.1", ] [[package]] @@ -2208,18 +2356,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.78" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.35" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ "proc-macro2", ] @@ -2268,18 +2416,18 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.4.1" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.6.0", ] [[package]] name = "redox_users" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" +checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" dependencies = [ "getrandom", "libredox", @@ -2288,29 +2436,29 @@ dependencies = [ [[package]] name = "ref-cast" -version = "1.0.22" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4846d4c50d1721b1a3bef8af76924eef20d5e723647333798c1b519b3a9473f" +checksum = "ccf0a6f84d5f1d581da8b41b47ec8600871962f2a528115b542b362d4b744931" dependencies = [ "ref-cast-impl", ] [[package]] name = "ref-cast-impl" -version = "1.0.22" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fddb4f8d99b0a2ebafc65a87a69a7b9875e4b1ae1f00db265d300ef7f28bccc" +checksum = "bcc303e793d3734489387d205e9b186fac9c6cfacedd98cbb2e8a5943595f3e6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.74", ] [[package]] name = "regex" -version = "1.10.3" +version = "1.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" +checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" dependencies = [ "aho-corasick", "memchr", @@ -2320,9 +2468,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.5" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bb987efffd3c6d0d8f5f89510bb458559eab11e4f869acb20bf845e016259cd" +checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" dependencies = [ "aho-corasick", "memchr", @@ -2331,15 +2479,15 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.2" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" +checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" [[package]] name = "reqwest" -version = "0.11.24" +version = "0.11.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6920094eb85afde5e4a138be3f2de8bbdf28000f0029e72c45025a56b042251" +checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" dependencies = [ "base64 0.21.7", "bytes", @@ -2388,23 +2536,30 @@ dependencies = [ [[package]] name = "ring" -version = "0.17.7" +version = "0.17.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "688c63d65483050968b2a8937f7995f443e27041a0f7700aa59b0822aedebb74" +checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" dependencies = [ "cc", + "cfg-if", "getrandom", "libc", "spin", "untrusted", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] +[[package]] +name = "rle-decode-fast" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3582f63211428f83597b51b2ddb88e2a91a9d52d12831f9d08f5e624e8977422" + [[package]] name = "roaring" -version = "0.10.4" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b26f4c25a604fcb3a1bcd96dd6ba37c93840de95de8198d94c0d571a74a804d1" +checksum = "8f4b84ba6e838ceb47b41de5194a60244fac43d9fe03b71dbe8c5a201081d6d1" dependencies = [ "bytemuck", "byteorder", @@ -2446,9 +2601,9 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustc-hex" @@ -2465,11 +2620,24 @@ dependencies = [ "semver", ] +[[package]] +name = "rustix" +version = "0.38.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +dependencies = [ + "bitflags 2.6.0", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.52.0", +] + [[package]] name = "rustls" -version = "0.21.10" +version = "0.21.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" +checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" dependencies = [ "log", "ring", @@ -2510,15 +2678,15 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.14" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" +checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" [[package]] name = "ryu" -version = "1.0.16" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] name = "salsa20" @@ -2529,15 +2697,6 @@ dependencies = [ "cipher", ] -[[package]] -name = "same-file" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" -dependencies = [ - "winapi-util", -] - [[package]] name = "schannel" version = "0.1.23" @@ -2597,11 +2756,11 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.9.2" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.6.0", "core-foundation", "core-foundation-sys", "libc", @@ -2610,9 +2769,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.9.1" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" +checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" dependencies = [ "core-foundation-sys", "libc", @@ -2620,18 +2779,18 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.21" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97ed7a9823b74f99c7742f5336af7be5ecd3eeafcb1507d1fa93347b1d589b0" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" dependencies = [ "serde", ] [[package]] name = "serde" -version = "1.0.196" +version = "1.0.207" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "870026e60fa08c69f064aa766c10f10b1d62db9ccd4d0abb206472bee0ce3b32" +checksum = "5665e14a49a4ea1b91029ba7d3bca9f299e1f7cfa194388ccc20f14743e784f2" dependencies = [ "serde_derive", ] @@ -2648,36 +2807,37 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.196" +version = "1.0.207" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67" +checksum = "6aea2634c86b0e8ef2cfdc0c340baede54ec27b1e46febd7f80dffb2aa44a00e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.74", ] [[package]] name = "serde_json" -version = "1.0.113" +version = "1.0.124" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69801b70b1c3dac963ecb03a364ba0ceda9cf60c71cfe475e99864759c8b8a79" +checksum = "66ad62847a56b3dba58cc891acd13884b9c61138d330c0d7b6181713d4fce38d" dependencies = [ - "indexmap 2.2.2", + "indexmap 2.4.0", "itoa", + "memchr", "ryu", "serde", ] [[package]] name = "serde_repr" -version = "0.1.18" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b2e6b945e9d3df726b65d6ee24060aff8e3533d431f677a9695db04eff9dfdb" +checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.74", ] [[package]] @@ -2744,6 +2904,12 @@ dependencies = [ "rand_core 0.6.4", ] +[[package]] +name = "simd-adler32" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" + [[package]] name = "slab" version = "0.4.9" @@ -2755,12 +2921,12 @@ dependencies = [ [[package]] name = "socket2" -version = "0.5.5" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" +checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" dependencies = [ "libc", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -2801,14 +2967,14 @@ dependencies = [ [[package]] name = "stronghold-runtime" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d20d73c3c41bdfcfa4e223cd6636111723081ef097a8d90354a9846b3bd60ede" +checksum = "18db7cc51450cefdab5f4990e128dd02c98da6d2992b93ffef8992ac0d2f3ddf" dependencies = [ "dirs", "iota-crypto", "libc", - "libsodium-sys", + "libsodium-sys-stable", "log", "nix", "rand", @@ -2830,9 +2996,9 @@ dependencies = [ [[package]] name = "stronghold_engine" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ad9c397e3215857f4f8bd2bd2a5b90c6332d0077d8fb4b6ba61b27b544647ca" +checksum = "2fd7371c42e557dd71a7f860bb2ec6b6fdb32f97a97987ccc2435fdd1f3a8615" dependencies = [ "anyhow", "dirs-next", @@ -2846,6 +3012,24 @@ dependencies = [ "zeroize", ] +[[package]] +name = "stronghold_ext" +version = "0.1.0" +source = "git+https://github.com/impierce/stronghold_ext#cad0e5ac4d9011a38c88303b668e790e2f2f3a5e" +dependencies = [ + "ecdsa", + "iota_stronghold", + "k256", + "p256", + "rand", + "serde", + "sha2", + "stronghold-utils", + "stronghold_engine", + "thiserror", + "zeroize", +] + [[package]] name = "strsim" version = "0.10.0" @@ -2871,14 +3055,14 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.48", + "syn 2.0.74", ] [[package]] name = "subtle" -version = "2.5.0" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "syn" @@ -2893,9 +3077,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.48" +version = "2.0.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" +checksum = "1fceb41e3d546d0bd83421d3409b1460cc7444cd389341a4c880fe7a042cb3d7" dependencies = [ "proc-macro2", "quote", @@ -2935,6 +3119,17 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" +[[package]] +name = "tar" +version = "0.4.41" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb797dad5fb5b76fcf519e702f4a589483b5ef06567f160c392832c1f5e44909" +dependencies = [ + "filetime", + "libc", + "xattr", +] + [[package]] name = "termcolor" version = "1.4.1" @@ -2952,22 +3147,22 @@ checksum = "23d434d3f8967a09480fb04132ebe0a3e088c173e6d0ee7897abbdf4eab0f8b9" [[package]] name = "thiserror" -version = "1.0.61" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" +checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.61" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" +checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.74", ] [[package]] @@ -3012,9 +3207,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.6.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" dependencies = [ "tinyvec_macros", ] @@ -3027,30 +3222,29 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.37.0" +version = "1.39.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" +checksum = "daa4fb1bc778bd6f04cbfc4bb2d06a7396a8f299dc33ea1900cedaa316f467b1" dependencies = [ "backtrace", "bytes", "libc", "mio", - "num_cpus", "pin-project-lite", "socket2", "tokio-macros", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "tokio-macros" -version = "2.2.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.74", ] [[package]] @@ -3065,16 +3259,15 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.10" +version = "0.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" +checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" dependencies = [ "bytes", "futures-core", "futures-sink", "pin-project-lite", "tokio", - "tracing", ] [[package]] @@ -3088,9 +3281,9 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.3" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" [[package]] name = "toml_edit" @@ -3098,18 +3291,18 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.2.2", + "indexmap 2.4.0", "toml_datetime", "winnow", ] [[package]] name = "toml_edit" -version = "0.20.2" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" +checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" dependencies = [ - "indexmap 2.2.2", + "indexmap 2.4.0", "toml_datetime", "winnow", ] @@ -3119,7 +3312,7 @@ name = "tooling" version = "0.1.0" dependencies = [ "anyhow", - "identity_eddsa_verifier", + "identity_ecdsa_verifier", "identity_iota", "identity_stronghold", "iota-sdk", @@ -3130,9 +3323,9 @@ dependencies = [ [[package]] name = "tower-service" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" @@ -3153,7 +3346,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.74", ] [[package]] @@ -3223,18 +3416,18 @@ checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" -version = "0.1.22" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" dependencies = [ "tinyvec", ] [[package]] name = "unicode-width" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68f5e5f3158ecfd4b8ff6fe086db7c8467a2dfdac97fe420f2b7c4aa97af66d6" +checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" [[package]] name = "universal-hash" @@ -3252,11 +3445,23 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" +[[package]] +name = "ureq" +version = "2.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b74fc6b57825be3373f7054754755f03ac3a8f5d70015ccad699ba2029956f4a" +dependencies = [ + "base64 0.22.1", + "log", + "once_cell", + "url", +] + [[package]] name = "url" -version = "2.5.0" +version = "2.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" dependencies = [ "form_urlencoded", "idna", @@ -3271,20 +3476,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" [[package]] -name = "version_check" -version = "0.9.4" +name = "vcpkg" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" [[package]] -name = "walkdir" -version = "2.4.0" +name = "version_check" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" -dependencies = [ - "same-file", - "winapi-util", -] +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "want" @@ -3303,34 +3504,35 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.90" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1223296a201415c7fad14792dbefaace9bd52b62d33453ade1c5b5f07555406" +checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" dependencies = [ "cfg-if", + "once_cell", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.90" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcdc935b63408d58a32f8cc9738a0bffd8f05cc7c002086c6ef20b7312ad9dcd" +checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.74", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.40" +version = "0.4.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bde2032aeb86bdfaecc8b261eef3cba735cc426c1f3a3416d1e0791be95fc461" +checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed" dependencies = [ "cfg-if", "js-sys", @@ -3340,9 +3542,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.90" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e4c238561b2d428924c49815533a8b9121c664599558a5d9ec51f8a1740a999" +checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3350,28 +3552,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.90" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bae1abb6806dc1ad9e560ed242107c0f6c84335f1749dd4e8ddb012ebd5e25a7" +checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.74", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.90" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d91413b1c31d7539ba5ef2451af3f0b833a005eb27a631cec32bc0635a8602b" +checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" [[package]] name = "web-sys" -version = "0.3.67" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58cd2333b6e0be7a39605f0e255892fd7418a682d8da8fe042fe25128794d2ed" +checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" dependencies = [ "js-sys", "wasm-bindgen", @@ -3379,9 +3581,9 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.25.3" +version = "0.25.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1778a42e8b3b90bff8d0f5032bf22250792889a5cdc752aa0020c84abe3aaf10" +checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" [[package]] name = "winapi" @@ -3401,11 +3603,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.6" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "winapi", + "windows-sys 0.59.0", ] [[package]] @@ -3442,7 +3644,16 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.0", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", ] [[package]] @@ -3462,17 +3673,18 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.0", - "windows_aarch64_msvc 0.52.0", - "windows_i686_gnu 0.52.0", - "windows_i686_msvc 0.52.0", - "windows_x86_64_gnu 0.52.0", - "windows_x86_64_gnullvm 0.52.0", - "windows_x86_64_msvc 0.52.0", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", ] [[package]] @@ -3483,9 +3695,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" @@ -3501,9 +3713,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" @@ -3519,9 +3731,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.0" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" @@ -3537,9 +3755,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" @@ -3555,9 +3773,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" @@ -3567,9 +3785,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" @@ -3585,15 +3803,15 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.5.36" +version = "0.5.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "818ce546a11a9986bc24f93d0cdf38a8a1a400f1473ea8c82e59f6e0ffab9249" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" dependencies = [ "memchr", ] @@ -3616,7 +3834,7 @@ checksum = "e283cc794a890f5bdc01e358ad7c34535025f79ba83c1b5c7e01e5d6c60b336d" dependencies = [ "async-tungstenite", "async_io_stream", - "bitflags 2.4.2", + "bitflags 2.6.0", "futures-core", "futures-io", "futures-sink", @@ -3648,31 +3866,43 @@ dependencies = [ "zeroize", ] +[[package]] +name = "xattr" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8da84f1a25939b27f6820d92aed108f83ff920fdf11a7b19366c27c4cda81d4f" +dependencies = [ + "libc", + "linux-raw-sys", + "rustix", +] + [[package]] name = "zerocopy" -version = "0.7.32" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ + "byteorder", "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.32" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.74", ] [[package]] name = "zeroize" -version = "1.7.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" dependencies = [ "serde", "zeroize_derive", @@ -3686,7 +3916,24 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.74", +] + +[[package]] +name = "zip" +version = "2.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40dd8c92efc296286ce1fbd16657c5dbefff44f1b4ca01cc5f517d8b7b3d3e2e" +dependencies = [ + "arbitrary", + "crc32fast", + "crossbeam-utils", + "displaydoc", + "flate2", + "indexmap 2.4.0", + "memchr", + "thiserror", + "zopfli", ] [[package]] @@ -3714,3 +3961,17 @@ dependencies = [ "thiserror", "zeroize", ] + +[[package]] +name = "zopfli" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5019f391bac5cf252e93bbcc53d039ffd62c7bfb7c150414d61369afe57e946" +dependencies = [ + "bumpalo", + "crc32fast", + "lockfree-object-pool", + "log", + "once_cell", + "simd-adler32", +] diff --git a/tooling/Cargo.toml b/tooling/Cargo.toml index 71bc5884..5ee1b985 100644 --- a/tooling/Cargo.toml +++ b/tooling/Cargo.toml @@ -8,9 +8,9 @@ publish = false [dependencies] anyhow = "1.0.62" -identity_eddsa_verifier = { git = "https://github.com/iotaledger/identity.rs", branch="main", features = ["ed25519"] } -identity_iota = { git = "https://github.com/iotaledger/identity.rs", branch="main", default-features = false, features = [ "domain-linkage", "resolver", "iota-client"] } -identity_stronghold = { git = "https://github.com/iotaledger/identity.rs", branch="main", default-features = false } +identity_ecdsa_verifier = { git = "https://github.com/iotaledger/identity.rs", branch = "feat/did-key", features = ["es256"] } +identity_iota = { git = "https://github.com/iotaledger/identity.rs", branch = "feat/did-key", default-features = false, features = [ "domain-linkage", "resolver", "iota-client"] } +identity_stronghold = { git = "https://github.com/iotaledger/identity.rs", branch = "feat/did-key", default-features = false } iota-sdk = { version = "1.1.5", default-features = false, features = ["tls", "client", "stronghold"] } tokio = { version = "1.29", default-features = false, features = ["rt"] } serde_json = { version = "1.0", default-features = false } diff --git a/tooling/src/main.rs b/tooling/src/main.rs index 2a0dce3c..0fbfc7ee 100644 --- a/tooling/src/main.rs +++ b/tooling/src/main.rs @@ -1,5 +1,5 @@ use anyhow::Context as _; -use identity_eddsa_verifier::EdDSAJwsVerifier; +use identity_ecdsa_verifier::EcDSAJwsVerifier; use identity_iota::core::Duration; use identity_iota::core::Object; use identity_iota::core::OrderedSet; @@ -20,8 +20,8 @@ use identity_iota::iota::NetworkName; use identity_iota::resolver::Resolver; use identity_iota::storage::JwkDocumentExt; use identity_iota::storage::KeyId; +use identity_iota::storage::KeyType; use identity_iota::storage::MethodDigest; -use identity_stronghold::ED25519_KEY_TYPE; use iota_sdk::types::block::output::AliasOutputBuilder; use rand::distributions::{Alphanumeric, DistString}; @@ -41,6 +41,7 @@ use iota_sdk::types::block::address::Address; use iota_sdk::types::block::output::AliasOutput; use std::io::Write; +use std::iter::Inspect; // The API endpoint of an IOTA node, e.g. Hornet. // const API_ENDPOINT: &str = "http://localhost"; @@ -140,8 +141,8 @@ async fn create_issuer( let fragment = document .generate_method( &storage, - ED25519_KEY_TYPE.clone(), // TODO change this in stronghold example aswell - JwsAlgorithm::EdDSA, + KeyType::from_static_str("ES256"), // TODO change this in stronghold example aswell + JwsAlgorithm::ES256, None, MethodScope::VerificationMethod, ) @@ -197,11 +198,12 @@ async fn create_issuer( .create_jws(&storage, &fragment, data, &JwsSignatureOptions::default()) .await?; + // Verify Signature. let decoded_jws: DecodedJws = resolved_document.verify_jws( &jws, None, - &EdDSAJwsVerifier::default(), + &EcDSAJwsVerifier::default(), &JwsVerificationOptions::default(), )?; diff --git a/web/craco.config.js b/web/craco.config.js index e17f2789..f8a40d20 100644 --- a/web/craco.config.js +++ b/web/craco.config.js @@ -1,12 +1,17 @@ const path = require('path'); const CracoAlias = require("craco-alias"); +const BundleAnalyzerPlugin = + require("webpack-bundle-analyzer").BundleAnalyzerPlugin; + +// console.log(process.env); + module.exports = { devServer: { port: 9000, devMiddleware: { - writeToDisk: true, + writeToDisk: true, }, }, @@ -19,14 +24,25 @@ module.exports = { '@shared': path.resolve(__dirname, "../shared"), }, } - } + }, ], webpack: { // alias: { // '@shared': path.resolve(__dirname, "../shared"), // }, + + plugins: [ + // new Dotenv({ + // path: '.../.env', + // }) + // Use BundleAnalyzer to inspect bundle + // new BundleAnalyzerPlugin({ analyzerMode: "server" }) + ], + configure: webpackConfig => { + + // const scopePluginIndex = webpackConfig.resolve.plugins.findIndex( // ({ constructor }) => constructor && constructor.name === 'ModuleScopePlugin' // ); @@ -34,7 +50,7 @@ module.exports = { // webpackConfig.resolve.plugins.splice(scopePluginIndex, 1); webpackConfig['resolve'] = { fallback: { - crypto: require.resolve("crypto-browserify"), + //crypto: require.resolve("crypto-browserify"), buffer: require.resolve("buffer/"), stream: require.resolve("stream-browserify") }, diff --git a/web/package-lock.json b/web/package-lock.json index 7acc1273..bf3e7a8e 100644 --- a/web/package-lock.json +++ b/web/package-lock.json @@ -7,9 +7,9 @@ "": { "name": "selv", "version": "1.1.0", + "hasInstallScript": true, "dependencies": { "@ant-design/icons": "^5.3.7", - "@iota/identity-wasm": "^0.3.5", "@types/classnames": "^2.2.11", "antd": "^5.12.8", "aos": "^3.0.0-beta.6", @@ -49,7 +49,8 @@ "@types/webfontloader": "^1.6.32", "craco-alias": "^3.0.1", "node-sass": "^9.0.0", - "typescript": "^4.9.5" + "typescript": "^4.9.5", + "webpack-bundle-analyzer": "^4.10.2" }, "engines": { "node": ">=16.0" @@ -2414,6 +2415,15 @@ "node": ">=10" } }, + "node_modules/@discoveryjs/json-ext": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", + "integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==", + "dev": true, + "engines": { + "node": ">=10.0.0" + } + }, "node_modules/@emotion/hash": { "version": "0.8.0", "license": "MIT" @@ -2539,13 +2549,6 @@ "version": "2.0.1", "license": "BSD-3-Clause" }, - "node_modules/@iota/identity-wasm": { - "version": "0.3.11", - "license": "Apache-2.0", - "dependencies": { - "node-fetch": "^2.6.0" - } - }, "node_modules/@isaacs/cliui": { "version": "8.0.2", "license": "ISC", @@ -3133,6 +3136,12 @@ } } }, + "node_modules/@polka/url": { + "version": "1.0.0-next.25", + "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.25.tgz", + "integrity": "sha512-j7P6Rgr3mmtdkeDGTe0E/aYyWEWVtc5yFXtHCRHs28/jptDEWfaVOc5T7cblqy1XKPPfCxJc/8DwQ5YgLOZOVQ==", + "dev": true + }, "node_modules/@rc-component/color-picker": { "version": "1.5.1", "license": "MIT", @@ -6705,6 +6714,12 @@ "version": "1.11.10", "license": "MIT" }, + "node_modules/debounce": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/debounce/-/debounce-1.2.1.tgz", + "integrity": "sha512-XRRe6Glud4rd/ZGQfiV1ruXSfbvfJedlV9Y6zOlP+2K04vBYiJEte6stfFkCP03aMnY5tsipamumUjL14fofug==", + "dev": true + }, "node_modules/debug": { "version": "4.3.4", "license": "MIT", @@ -8547,6 +8562,19 @@ "version": "1.0.0", "license": "ISC" }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, "node_modules/function-bind": { "version": "1.1.2", "license": "MIT", @@ -11675,6 +11703,15 @@ "node": ">=10" } }, + "node_modules/mrmime": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-2.0.0.tgz", + "integrity": "sha512-eu38+hdgojoyq63s+yTpN4XMBdt5l8HhMhc4VKLO9KM5caLIBvUm4thi7fFaxyTmCKeNnXZ5pAlBwCUnhA09uw==", + "dev": true, + "engines": { + "node": ">=10" + } + }, "node_modules/ms": { "version": "2.1.2", "license": "MIT" @@ -12288,6 +12325,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/opener": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/opener/-/opener-1.5.2.tgz", + "integrity": "sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==", + "dev": true, + "bin": { + "opener": "bin/opener-bin.js" + } + }, "node_modules/optionator": { "version": "0.9.3", "license": "MIT", @@ -15936,6 +15982,20 @@ "version": "3.0.7", "license": "ISC" }, + "node_modules/sirv": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/sirv/-/sirv-2.0.4.tgz", + "integrity": "sha512-94Bdh3cC2PKrbgSOUqTiGPWVZeSiXfKOVZNJniWoqrWrRkB1CJzBU3NEbiTsPcYy1lDsANA/THzS+9WBiy5nfQ==", + "dev": true, + "dependencies": { + "@polka/url": "^1.0.0-next.24", + "mrmime": "^2.0.0", + "totalist": "^3.0.0" + }, + "engines": { + "node": ">= 10" + } + }, "node_modules/sisteransi": { "version": "1.0.5", "license": "MIT" @@ -17063,6 +17123,15 @@ "node": ">=0.6" } }, + "node_modules/totalist": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/totalist/-/totalist-3.0.1.tgz", + "integrity": "sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/tough-cookie": { "version": "4.1.3", "license": "BSD-3-Clause", @@ -17694,6 +17763,53 @@ } } }, + "node_modules/webpack-bundle-analyzer": { + "version": "4.10.2", + "resolved": "https://registry.npmjs.org/webpack-bundle-analyzer/-/webpack-bundle-analyzer-4.10.2.tgz", + "integrity": "sha512-vJptkMm9pk5si4Bv922ZbKLV8UTT4zib4FPgXMhgzUny0bfDDkLXAVQs3ly3fS4/TN9ROFtb0NFrm04UXFE/Vw==", + "dev": true, + "dependencies": { + "@discoveryjs/json-ext": "0.5.7", + "acorn": "^8.0.4", + "acorn-walk": "^8.0.0", + "commander": "^7.2.0", + "debounce": "^1.2.1", + "escape-string-regexp": "^4.0.0", + "gzip-size": "^6.0.0", + "html-escaper": "^2.0.2", + "opener": "^1.5.2", + "picocolors": "^1.0.0", + "sirv": "^2.0.3", + "ws": "^7.3.1" + }, + "bin": { + "webpack-bundle-analyzer": "lib/bin/analyzer.js" + }, + "engines": { + "node": ">= 10.13.0" + } + }, + "node_modules/webpack-bundle-analyzer/node_modules/acorn-walk": { + "version": "8.3.3", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.3.tgz", + "integrity": "sha512-MxXdReSRhGO7VlFe1bRG/oI7/mdLV9B9JJT0N8vZOhF7gFRR5l3M8W9G8JxmKV+JC5mGqJ0QvqfSOLsCPa4nUw==", + "dev": true, + "dependencies": { + "acorn": "^8.11.0" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/webpack-bundle-analyzer/node_modules/commander": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", + "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", + "dev": true, + "engines": { + "node": ">= 10" + } + }, "node_modules/webpack-dev-middleware": { "version": "5.3.3", "license": "MIT", @@ -19822,6 +19938,12 @@ "@ctrl/tinycolor": { "version": "3.6.1" }, + "@discoveryjs/json-ext": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", + "integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==", + "dev": true + }, "@emotion/hash": { "version": "0.8.0" }, @@ -19892,12 +20014,6 @@ "@humanwhocodes/object-schema": { "version": "2.0.1" }, - "@iota/identity-wasm": { - "version": "0.3.11", - "requires": { - "node-fetch": "^2.6.0" - } - }, "@isaacs/cliui": { "version": "8.0.2", "requires": { @@ -20267,6 +20383,12 @@ "source-map": "^0.7.3" } }, + "@polka/url": { + "version": "1.0.0-next.25", + "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.25.tgz", + "integrity": "sha512-j7P6Rgr3mmtdkeDGTe0E/aYyWEWVtc5yFXtHCRHs28/jptDEWfaVOc5T7cblqy1XKPPfCxJc/8DwQ5YgLOZOVQ==", + "dev": true + }, "@rc-component/color-picker": { "version": "1.5.1", "requires": { @@ -22544,6 +22666,12 @@ "dayjs": { "version": "1.11.10" }, + "debounce": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/debounce/-/debounce-1.2.1.tgz", + "integrity": "sha512-XRRe6Glud4rd/ZGQfiV1ruXSfbvfJedlV9Y6zOlP+2K04vBYiJEte6stfFkCP03aMnY5tsipamumUjL14fofug==", + "dev": true + }, "debug": { "version": "4.3.4", "requires": { @@ -23721,6 +23849,12 @@ "fs.realpath": { "version": "1.0.0" }, + "fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "optional": true + }, "function-bind": { "version": "1.1.2" }, @@ -25642,6 +25776,12 @@ "version": "1.0.4", "devOptional": true }, + "mrmime": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-2.0.0.tgz", + "integrity": "sha512-eu38+hdgojoyq63s+yTpN4XMBdt5l8HhMhc4VKLO9KM5caLIBvUm4thi7fFaxyTmCKeNnXZ5pAlBwCUnhA09uw==", + "dev": true + }, "ms": { "version": "2.1.2" }, @@ -26028,6 +26168,12 @@ "is-wsl": "^2.2.0" } }, + "opener": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/opener/-/opener-1.5.2.tgz", + "integrity": "sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==", + "dev": true + }, "optionator": { "version": "0.9.3", "requires": { @@ -28124,6 +28270,17 @@ "signal-exit": { "version": "3.0.7" }, + "sirv": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/sirv/-/sirv-2.0.4.tgz", + "integrity": "sha512-94Bdh3cC2PKrbgSOUqTiGPWVZeSiXfKOVZNJniWoqrWrRkB1CJzBU3NEbiTsPcYy1lDsANA/THzS+9WBiy5nfQ==", + "dev": true, + "requires": { + "@polka/url": "^1.0.0-next.24", + "mrmime": "^2.0.0", + "totalist": "^3.0.0" + } + }, "sisteransi": { "version": "1.0.5" }, @@ -28851,6 +29008,12 @@ "toidentifier": { "version": "1.0.1" }, + "totalist": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/totalist/-/totalist-3.0.1.tgz", + "integrity": "sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==", + "dev": true + }, "tough-cookie": { "version": "4.1.3", "requires": { @@ -29252,6 +29415,43 @@ } } }, + "webpack-bundle-analyzer": { + "version": "4.10.2", + "resolved": "https://registry.npmjs.org/webpack-bundle-analyzer/-/webpack-bundle-analyzer-4.10.2.tgz", + "integrity": "sha512-vJptkMm9pk5si4Bv922ZbKLV8UTT4zib4FPgXMhgzUny0bfDDkLXAVQs3ly3fS4/TN9ROFtb0NFrm04UXFE/Vw==", + "dev": true, + "requires": { + "@discoveryjs/json-ext": "0.5.7", + "acorn": "^8.0.4", + "acorn-walk": "^8.0.0", + "commander": "^7.2.0", + "debounce": "^1.2.1", + "escape-string-regexp": "^4.0.0", + "gzip-size": "^6.0.0", + "html-escaper": "^2.0.2", + "opener": "^1.5.2", + "picocolors": "^1.0.0", + "sirv": "^2.0.3", + "ws": "^7.3.1" + }, + "dependencies": { + "acorn-walk": { + "version": "8.3.3", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.3.tgz", + "integrity": "sha512-MxXdReSRhGO7VlFe1bRG/oI7/mdLV9B9JJT0N8vZOhF7gFRR5l3M8W9G8JxmKV+JC5mGqJ0QvqfSOLsCPa4nUw==", + "dev": true, + "requires": { + "acorn": "^8.11.0" + } + }, + "commander": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", + "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", + "dev": true + } + } + }, "webpack-dev-middleware": { "version": "5.3.3", "requires": { diff --git a/web/package.json b/web/package.json index a4f98a55..60ed222a 100644 --- a/web/package.json +++ b/web/package.json @@ -10,7 +10,6 @@ }, "dependencies": { "@ant-design/icons": "^5.3.7", - "@iota/identity-wasm": "^0.3.5", "@types/classnames": "^2.2.11", "antd": "^5.12.8", "aos": "^3.0.0-beta.6", @@ -34,10 +33,9 @@ }, "scripts": { "start": "npm run build && craco start", - "build": "npm run copy_wasm && craco build", - "test": "npm run copy_wasm && craco test", - "eject": "craco eject", - "copy_wasm": "cp ./node_modules/@iota/identity-wasm/web/identity_wasm_bg.wasm ./public" + "build": "craco build", + "test": "craco test", + "eject": "craco eject" }, "eslintConfig": { "extends": "react-app" @@ -75,6 +73,7 @@ "@types/webfontloader": "^1.6.32", "craco-alias": "^3.0.1", "node-sass": "^9.0.0", - "typescript": "^4.9.5" + "typescript": "^4.9.5", + "webpack-bundle-analyzer": "^4.10.2" } } diff --git a/web/src/components/DomainCheck.tsx b/web/src/components/DomainCheck.tsx index 7a77213c..666ceb19 100644 --- a/web/src/components/DomainCheck.tsx +++ b/web/src/components/DomainCheck.tsx @@ -1,40 +1,32 @@ -import { CheckCircleTwoTone, ExclamationCircleTwoTone, ExportOutlined } from '@ant-design/icons'; -import { List, Popover } from 'antd'; -import Link from 'antd/es/typography/Link'; +import { CheckCircleTwoTone, ExclamationCircleTwoTone } from '@ant-design/icons'; +import { List } from 'antd'; import React from 'react'; import { ValidationResult } from 'src/context/globalState'; -const DomainCheck = ({ result }: { - result: ValidationResult; +const DomainCheck = ({ validatedDomains }: { + validatedDomains: ValidationResult; }) => { return ( <> - {result.valid?.length && + {validatedDomains.valid?.length && ( - {/* TODO */} - did:iota:rms:0x4868d61773a9f8e54741261a0e82fc883e299c2614c94b2400e2423d4c5bbe6a {/* TODO */} - - }>} title={item.url} - /> + /> )} /> } - {result.invalid?.length && + {validatedDomains.invalid?.length && ( { socket.emit('requestDomainLinkageValidation', { did }); } +// DomainLinkage +type RequestParsedDID = (did: string) => void +const RequestDIDParsing: RequestParsedDID = (did) => { + socket.emit('requestDIDParsing', { did }); +} + + export function GlobalStateProvider({ children }: any) { const [isConnected, setIsConnected] = useState(socket.connected); const [state, dispatch] = useReducer( stateReducer, - { validatedDomains: {} } + { validatedDomains: {}, parsedDID: {} } ); useEffect(() => { @@ -253,6 +280,15 @@ export function GlobalStateProvider({ children }: any) { cb(); }) + socket.on('parsedDID', (data, cb) => { + dispatch({ + type: Actions.SET_PARSED_DID, + did: data.did, + result: data.result, + }); + cb(); + }) + return () => { socket.off('connect', onConnect); @@ -294,6 +330,11 @@ export function GlobalStateProvider({ children }: any) { return state; } + case Actions.REQUEST_PARSED_DID: { + RequestDIDParsing(action.did); + return state; + } + case Actions.REQUEST_DOMAIN_LINKAGE_VALIDATION: { if(state.validatedDomains[action.did]){ @@ -359,9 +400,21 @@ export function GlobalStateProvider({ children }: any) { }; } + case Actions.SET_PARSED_DID: { + return { + ...state, + parsedDID: { + ...state.parsedDID, + [action.did]: action.result + + } + }; + } + case Actions.RESET_STATE: { return ({ - validatedDomains: state.validatedDomains + validatedDomains: state.validatedDomains, + parsedDID: state.parsedDID }); } @@ -387,7 +440,7 @@ export function GlobalStateProvider({ children }: any) { ); }; -const GlobalStateContext = createContext<{ mainSteps: any, routes: any, state: State }>({ mainSteps: null, routes: null, state: { validatedDomains: {} } }); +const GlobalStateContext = createContext<{ mainSteps: any, routes: any, state: State }>({ mainSteps: null, routes: null, state: { validatedDomains: {}, parsedDID: {} } }); const DispatchContext = createContext | null>(null); export function useGlobalState() { diff --git a/web/src/pages/Company/CompanyData.tsx b/web/src/pages/Company/CompanyData.tsx index 254ebe85..a6a8bb27 100644 --- a/web/src/pages/Company/CompanyData.tsx +++ b/web/src/pages/Company/CompanyData.tsx @@ -1,9 +1,8 @@ import React, { useState, useEffect } from 'react'; -import { App, Button, notification, Popover, Tooltip, Typography } from 'antd'; -import { flattenObject } from '../../utils/helper'; +import { App, Popover, Typography } from 'antd'; import { Layout, Loading, Form, PrefilledForm } from '../../components'; import { useTranslation } from 'react-i18next'; -import { Actions, State, useCredentialsDispatch, useGlobalState } from '../../context/globalState'; +import { Actions, ParsedDIDResult, State, useCredentialsDispatch, useGlobalState } from '../../context/globalState'; import { useNavigate } from 'react-router-dom'; import useStep from '../../utils/useStep'; import { Scopes } from '@shared/types/Scopes'; @@ -12,6 +11,8 @@ import DomainCheck from '../../components/DomainCheck'; import { ExportOutlined } from '@ant-design/icons'; import { routes } from '../../steps'; import i18n from '../../i18n'; +import { getExplorerLinkFromDID } from '../../utils/explorer'; + const { Link } = Typography; const emptyFields = [{ @@ -39,26 +40,20 @@ const messages = { verifying: 'general.messages.verifying' }; -// const notify = (type: string, message: string, description: string) => { -// return type === 'error' -// ? notification.error({ message, description }) -// : notification.warning({ message, description }); -// }; - -/** - * Component which will display a CompanyData. - */ -const CompanyData: React.FC = ({ history, match }: any) => { +const CompanyData: React.FC = () => { const [fields, setFields] = useState(); const [status, setStatus] = useState(''); const [relevantCredential, setRelevantCredential] = useState(null); const [prefilledData, setPrefilledData] = useState({}); - const [validatedDomains, setValidatedDomains] = useState(null); + const [issuerDomains, setIssuerDomains] = useState(null); + const [credentialsDomains, setCredentialDomains] = useState(null); const { state } = useGlobalState(); const { nextStep } = useStep(); const dispatch = useCredentialsDispatch(); const navigate = useNavigate(); + const issuerDID = process.env[`REACT_APP_ISSUERS_${Scopes.CompanyHouse}_DID`]; + const { t } = useTranslation(); const { message } = App.useApp(); @@ -83,16 +78,30 @@ const CompanyData: React.FC = ({ history, match }: any) => { if(!state[Scopes.CompanyHouse]?.credentials.length) { message.open({ type: 'error', - content: 'Please present your national ID crendential', //TODO: translate + content: 'Please present your national ID credential', //TODO: translate }); return navigate(fallbackRoute!.path.replace(":lng?", i18n.language.toString())); } - - - if (!state[Scopes.CompanyHouse]?.credentials.length) return; + setRelevantCredential(state[Scopes.CompanyHouse].credentials.filter((c: any) => c.credential?.type.includes(CitizenCredentialConfig.template.type.pop()))?.[0]?.credential); }, []) + useEffect(() => { + + if(relevantCredential && !state.parsedDID[relevantCredential.issuer]) { + dispatch?.({ type: Actions.REQUEST_PARSED_DID, did: relevantCredential.issuer }); + } + + }, [state, relevantCredential, dispatch]) + + useEffect(() => { + + if(issuerDID && !state.parsedDID[issuerDID]) { + dispatch?.({ type: Actions.REQUEST_PARSED_DID, did: issuerDID }); + } + + }, [state, issuerDID, dispatch]) + useEffect(() => { if (!relevantCredential) return; setPrefilledData({ @@ -108,9 +117,16 @@ const CompanyData: React.FC = ({ history, match }: any) => { useEffect(() => { if (!relevantCredential) return; - setValidatedDomains(state.validatedDomains[relevantCredential.issuer]) + setCredentialDomains(state.validatedDomains[relevantCredential.issuer]) }, [state, relevantCredential]) + useEffect(() => { + if (!dispatch || !state || !issuerDID || state.validatedDomains[issuerDID]) return; + + dispatch?.({ type: Actions.REQUEST_DOMAIN_LINKAGE_VALIDATION, did: issuerDID }); + setIssuerDomains(state.validatedDomains[issuerDID]) + }, [state, issuerDID, dispatch]) + return (
@@ -118,8 +134,28 @@ const CompanyData: React.FC = ({ history, match }: any) => {

{t("pages.company.companyData.subTitle")}

{t("pages.insurance.insuranceData.businessOwner")}

- {validatedDomains && (validatedDomains !== 'in-flight') && ( - + + {relevantCredential && relevantCredential.issuer && + <> +

Issued by {(state.parsedDID[relevantCredential.issuer] && state.parsedDID[relevantCredential.issuer] !== "in-flight") ? + + IOTA Explorer + + }>{relevantCredential.issuer} + + : + relevantCredential.issuer + } +

+

to {relevantCredential.credentialSubject.id}

+ + } + {credentialsDomains && (credentialsDomains !== 'in-flight') && ( + )} { // Object.keys(prefilledFormData.dataFields).length && @@ -128,15 +164,24 @@ const CompanyData: React.FC = ({ history, match }: any) => {

{t("pages.insurance.insuranceData.companyDetails")}

-

Will be issued by - did:iota:rms:0x4868d61773a9f8e54741261a0e82fc883e299c2614c94b2400e2423d4c5bbe6a - - }>company.selv.iota.org

{/* TODO */} -

to {state.COMPANY_HOUSE?.connectedDID}

{/* TODO */} + + {issuerDID && + <> +

Will be issued by {(state.parsedDID[issuerDID] && state.parsedDID[issuerDID] !== "in-flight") ? + IOTA Explorer + + }>{issuerDID} : issuerDID }

+ + {issuerDomains && (issuerDomains !== 'in-flight') && ( + + )} +

to {state.COMPANY_HOUSE?.connectedDID}

+ + }
{ diff --git a/web/src/utils/did.ts b/web/src/utils/did.ts deleted file mode 100644 index 3320a654..00000000 --- a/web/src/utils/did.ts +++ /dev/null @@ -1,104 +0,0 @@ -import Address from '../schemas/Address.json'; -import BankAccount from '../schemas/BankAccount.json'; -import Company from '../schemas/Company.json'; -import ContactDetails from '../schemas/ContactDetails.json'; -import Insurance from '../schemas/Insurance.json'; -import PersonalData from '../schemas/PersonalData.json'; - -import * as identity from '@iota/identity-wasm/web'; - -const schemas: any = { - Address, - BankAccount, - Company, - ContactDetails, - Insurance, - PersonalData -}; - -const VERIFICATION_LEVEL = { - UNVERIFIED: 0, - DID_OWNER: 1, - DID_TRUSTED: 2 -}; - -const verificationStatus = { - notVerified: 'Credentials could not be verified', - missing: 'Missing credential of type', - trusted: 'Credentials successfully verified' -}; - -const verificationType = { - notVerified: 'error', - missing: 'warning', - trusted: 'success' -}; - -export default async (presentationData: {proof: any, verifiableCredential: {credentialSubject: any}[]}, requestedCredentials: string[], challengeNonce: string) => { - return new Promise(async resolve => { - try { - // Check if the credential fits to the request - if (presentationData?.proof && presentationData?.verifiableCredential.length > 1) { - - await identity.init('/identity_wasm_bg.wasm'); - - const mainNet = identity.Network.mainnet(); - - // Create a default client configuration from the parent config network. - const config = identity.Config.fromNetwork(mainNet); - config.setPermanode('https://chrysalis-chronicle.iota.org/api/mainnet/'); - - // Create a client instance to publish messages to the Tangle. - const client = identity.Client.fromConfig(config); - client.checkPresentation(JSON.stringify(presentationData)) - .then(() => { - // Determine level of trust - let type = verificationType.notVerified; - let message = verificationStatus.notVerified; - let verificationLevel = VERIFICATION_LEVEL.UNVERIFIED; - - type = verificationType.trusted; - message = verificationStatus.trusted; - verificationLevel = VERIFICATION_LEVEL.DID_TRUSTED; - - requestedCredentials.forEach(schemaName => { - if (!Object.keys(schemas).includes(schemaName)) { - type = verificationType.missing; - message = `${verificationStatus.missing} ${schemaName}`; - verificationLevel = VERIFICATION_LEVEL.DID_OWNER; - } - }); - - const subjects = presentationData.verifiableCredential.map(credential => credential?.credentialSubject); - resolve({ - status: verificationLevel, - message, - type, - data: subjects.reduce((a, b) => ({ ...a, ...b })) - }); - }) - .catch((error: Error) => { - resolve({ - status: VERIFICATION_LEVEL.UNVERIFIED, - message: verificationStatus.notVerified, - type: verificationType.notVerified - }); - }) - } else { - resolve({ - status: VERIFICATION_LEVEL.UNVERIFIED, - message: verificationStatus.notVerified, - type: verificationType.notVerified - }); - } - } catch (error) { - console.error('Error 2', error); - return { - status: VERIFICATION_LEVEL.UNVERIFIED, - message: verificationStatus.notVerified, - type: verificationType.notVerified, - error - }; - } - }); -}; \ No newline at end of file diff --git a/web/src/utils/explorer.ts b/web/src/utils/explorer.ts new file mode 100644 index 00000000..98a69882 --- /dev/null +++ b/web/src/utils/explorer.ts @@ -0,0 +1,22 @@ +import { ParsedDIDResult } from "src/context/globalState"; + +export const getExplorerLinkFromDID = (did: string, parsedDID: ParsedDIDResult): string => { + + switch (parsedDID.network) { + case "smr": + return `https://explorer.iota.org/shimmer/addr/${parsedDID.aliasAddress}?tab=DID` + + case "rms": + return `https://explorer.iota.org/shimmer-testnet/addr/${parsedDID.aliasAddress}?tab=DID` + + case "atoi": + return `https://explorer.iota.org/iota-testnet/addr/${parsedDID.aliasAddress}?tab=DID` + + case "iota": + return `https://explorer.iota.org/mainnet/addr/${parsedDID.aliasAddress}?tab=DID` + + default: + return ""; + } + +} \ No newline at end of file diff --git a/web/src/utils/helper.ts b/web/src/utils/helper.ts index 6b305d2a..8b5e0e3a 100644 --- a/web/src/utils/helper.ts +++ b/web/src/utils/helper.ts @@ -1,27 +1,3 @@ -const crypto = require('crypto'); - -export const decrypt = (key: string, payload: string) => { - const textParts: string[] = payload.split(':'); - const firstElement: string = textParts.shift() || ''; - const iv: Buffer = Buffer.from(firstElement, 'hex'); - const encryptedText: Buffer = Buffer.from(textParts.join(':'), 'hex'); - const decipher: any = crypto.createDecipheriv('aes-256-cbc', Buffer.from(key), iv); - let decrypted = decipher.update(encryptedText); - - decrypted = Buffer.concat([decrypted, decipher.final()]); - return decrypted.toString(); -}; - -export const encrypt = async (key: string, payload: string) => { - const IV_LENGTH = 16; // For AES, this is always 16 - const iv = crypto.randomBytes(IV_LENGTH); - const cipher = crypto.createCipheriv('aes-256-cbc', Buffer.from(key), iv); - let encrypted = cipher.update(payload); - - encrypted = Buffer.concat([encrypted, cipher.final()]); - return `${iv.toString('hex')}:${encrypted.toString('hex')}`; -}; - export const flattenObject = (obj: {[key: string]: any;}, prefix = '') => Object.keys(obj).reduce((acc: any, k: any) => { const pre = prefix.length ? prefix + '.' : '';