Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ConsentParameters

interface

ConsentParameters

description

This interface defines the requirements for objects passed as inputs to Consent instances.

Use this interface whenever you are using the Consent contract.

Following inputs apply to the Consent contract class:

Input Type Required? Description
dappIdentifier string Required The dApp identifier, e.g. "folio".
level string Required The access level that must be granted upon accepting this consent request, i.e. must contain on of: view, edit or delete
scope string Required Contains the transaction hash of the confirmed transaction which links to metadata about the shared document.
purpose string Required Contains an encrypted message from the consent requester which should describe the purpose of getting access to the shared document.



example

Using the ConsentParameters class

// creating consent contract inputs
const inputs = {
dappIdentifier: "my-cool-dapp",
level: "read",
scope: "...",
purpose: "..."
} as ConsentParameters;



Other links

Consent | Contract | Factory

since

v1.0.0

Hierarchy

Index

Properties

dappIdentifier: string

A human-readable dApp identifier, e.g. "ELEVATE".

Note that this field will be slugified using the Contract.dApp method before it is attached to the transfer transaction message.

access

public

example

"My Cool dApp"

var

{string}

level: string

Contains the access level that will be granted upon accepting the attached consent request.

access

public

example

"view"

var

{string}

purpose: string

Contains an encrypted message from the consent requester which should describe the purpose of getting access to the shared document.

access

public

example

...

var

{string}

scope: string

Contains the transaction hash of the confirmed transaction which links to metadata about the shared document.

Note that the linked transaction shall not reveal publicly, the location of said shared document. Please use @dhealth/dimi-sdk for further definition around handshakes and consent requests.

access

public

example

"59A422A39FC4E03940420F0000000000007468697320697320746865206D6573"

var

{string}

Generated using TypeDoc