Skip to content
Rishabh Chandaliya edited this page Apr 7, 2022 · 1 revision

i3-MARKET Wallet

i3-M Wallet is a set of technologies that facilitate the management of their identity to all the actors of the i3-MARKET environment (provider, consumer, data owner, etc).

Technical Requirements

  • Name : DID Management

    Description : A decentralized system which enables several key actions by three distinct entities: the Controller, the Relying Party, and the Subject. Controllers create and control DIDs, while Relying Parties rely on DIDs as an identifier for interactions related to the DID Subject. The Subject is the entity referred to by the DID, which can be anything: a person, an organization, a device, a location, even a concept. Typically, the Subject is also the Controller.

  • Name : Verifiable Credentials Management

    Description : Verifiable Credential is a tamper-evident credential that has authorship that can be cryptographically verified though a proof. It can be used to share and prove something about the identity of a User.

  • Name : Create DID

    Description : As Subject I want to create a DID so I can manage my identity. Subject: Data Consumer, Data Provider, Data Owner. As a User I want to present my DID to a Relying Party so that I can identify myself.

  • Name : Present DID

    Description : User: Data Consumer, Data Provider, data Owner. Relying Party: Data Marketplace, Data Provider.

  • Name : Rotate DID

    Description : As a User I want to change the ownership of my DID so that I can maintain my Identity if I change Identity Provider.

  • Name : Delegate DID

    Description : As a User I want to delegate my DID so that I can make other DID able to act on behalf of me.

  • Name : Recover DID

    Description : As a User I want to recover my DID so that I can maintain my Identity even if I lose my proof of control. User: Data Consumer, Data Provider, Data Owner.

  • Name : Sign Assets

    Description : As a User I want to sign my assets so that I can demonstrate the authenticity of the asset. User: Data Consumer, Data Provider, Data Owner.

  • Name : Verify Asset Signature

    Description : As a User I want to verify asset signature so that I can authenticate the asset. User: Data Consumer.

  • Name : Deactivate DID

    Description : As a User I want to deactivate my DID so that I can delete my Identity. User: Data Consumer, Data Provider, Data Owner.

  • Name : Resolve DID

    Description : As a Data Marketplace I want to resolve DID so I can retrieve from DID Document the information to authenticate DID Subject and verify data asset signature.

  • Name : Authenticate DID

    Description : As a Relying Party I want to authenticate DID so I can verify DID ownership. Relying Party: Data Marketplace/Data Provider.

  • Name : Receive Verifiable Credential

    Description : As User I want to receive a Verifiable Credential so I can access Data Marketplace.

  • Name : Verify Verifiable Credential

    Description : As User I want to receive a Verifiable Credential so I can access Data Marketplace.

  • Name : Share Verifiable Credential

    Description : As User I want to share a Verifiable Credential so I can attest something towards Relying Party.

  • Name : Store Verifiable Credential

    Description : As User I want to store a Verifiable Credential so I use keep it and use it towards any Relying Party.

  • Name : Keep track of issued Verifiable Credentials

    Description : As a Issuer I want to keep track of issued verifiable Credentials so that I can monitor and revoke them.

  • Name : Revoke Verifiable Credential

    Description : As an Issuer I want to revoke a Verifiable Credentials so that it cannot be used.

Architecture

The i3M-Wallet consists of a set of packages that enable a user to manage his/her accounts and use them to authenticate.

Wallet Desktop

Wallet Desktop is a cross-platform facility tool that eases the communication between a wallet (software or hardware) and the i3-MARKET SDK via an HTTP API. Furthermore, it provides some features like wallet synchronization using a secure cloud vault. It also has a user interface (UI) to display the information of the selected wallet and ask for user consent if any wallet operation needs it. An initial design of the main window can be seen in Figure 2 – Wallet desktop initial UI design.

Wallet desktop initial UI design

The HTTP API launched by the wallet desktop is not accessible from the cloud so to use it the i3-MARKET SDK must in the same machine. This API is specified using OpenAPI Specification (OAS) within the package Wallet desktop OpenAPI (see Section Wallet Desktop OpenAPI).

To ease the development of a cross-platform UI, wallet desktop uses Electron, a framework that relies on Chromium web browser to create native applications using HTML, CSS and JavaScript.

Wallet Desktop OpenAPI

The Wallet Desktop OpenAPI (source code on GitLab) defines the HTTP API of Wallet Desktop (see Section Wallet Desktop). For more information on the OpenApi Interface go to de section Interface Description.

Base Wallet

This package defines how to interact with wallets by means of a typescript interface. Furthermore, it provides a default implementation called BaseWallet (source code on GitLab). It uses an interface walled KeyWallet to delegate the complexity of key management to other packages like SW Wallet (see Section SW Wallet). Both interfaces are listed below.

export interface Wallet {
/**
* @throws Error
*/
wipe: () => Promise<void>
// Api methods
accountList: (queryParameters: WalletPaths.AccountList.QueryParameters) => Promise<WalletPaths.AccountList.Responses.$200>
accountCreate: (requestBody: WalletPaths.AccountCreate.RequestBody) => Promise<WalletPaths.AccountCreate.Responses.$201>
accountSign: (requestBody: WalletPaths.AccountSign.RequestBody) => Promise<WalletPaths.AccountSign.Responses.$200>
accountVerify: (requestBody: WalletPaths.AccountVerify.RequestBody) => Promise<WalletPaths.AccountVerify.Responses.$200>
accountEncrypt: (requestBody: WalletPaths.AccountEncrypt.RequestBody) => Promise<WalletPaths.AccountEncrypt.Responses.$200>
accountDecrypt: (requestBody: WalletPaths.AccountDecrypt.RequestBody) => Promise<WalletPaths.AccountDecrypt.Responses.$200>
resourceList: (queryParameters: WalletPaths.ResourceList.QueryParameters) => Promise<WalletPaths.ResourceList.Responses.$200>
resourceCreate: (requestBody: WalletPaths.ResourceCreate.RequestBody) => Promise<WalletPaths.ResourceCreate.Responses.$201>
resourceRead: (queryParameters: WalletPaths.ResourceRead.QueryParameters) => Promise<WalletPaths.ResourceRead.Responses.$200>
resourceUpdate: (queryParameters: WalletPaths.ResourceUpdate.QueryParameters, requestBody: WalletPaths.ResourceUpdate.RequestBody) =>                 
Promise<WalletPaths.ResourceUpdate.Responses.$200>
resourceDelete: (queryParameters: WalletPaths.ResourceDelete.QueryParameters) => Promise<WalletPaths.ResourceDelete.Responses.$200>
}
export interface CryptoWallet<T extends TypedArray = Uint8Array> {
Initialize: () => Promise<void>
/**
* Creates a key pair
*
* @returns a promise that resolves to the key id.
*/
createAccountKeyPair: () => Promise<string>
/**
* Gets a public key
*
* @returns a promise that resolves to a public key
*/
getPublicKey: (id: string) => Promise<KeyLike>
/**
* Signs input message and returns DER encoded typed array
*/
sign: (id: string, message: T) => Promise<T>
/**
* @throws Error – Any error
*/
wipe: () => Promise<void>
}

SW Wallet

SW Wallet provides an implementation of a software hierarchical deterministic wallet using the BaseWallet class defined in Base Wallet (see Section Base Wallet) package. The code can be found in GitLab.

Clone this wiki locally