Container

Class Name Container
Extends Logger
Source container.ts
Examples container.spec.ts

TL;DR: usage examples and a data flow can be found here.

The Container is an API layer over DataContract and combines its functionalities into a more use case oriented straight forward interface.

To reduce complexity the most common usage patterns from DataContract have been set as fixed in the Container implementation. Therefore the Container follows these principles:

  • data is always encrypted
  • each entry gets an own key for encryption
  • each entry get an own role for granting write permissions
  • an identity always is created for the container
  • adding verifications adds the verification topic to the contract description to allow listing of all verifications of this container
  • a property called type is added to the Container at creation type and marks its template type

constructor

new Container(options, config);

Create new Container instance. This will not create a smart contract contract but is used to load existing containers. To create a new contract, use the static create function.

Parameters

  1. options - ContainerOptions: runtime for new container
  2. config - DigitalTwinconfIg: config for new container
    • accountId - string: identity or account of user, that interacts with container
    • address - string: address of a DataContract instance, can be ENS or contract address

Returns

Container instance

Example

const container = new Container(
  runtime,
  {
    accountId: '0x0000000000000000000000000000000000000000',
    address: 'samplecontainer.somewhere.evan',
  },
);

= Creating Containers =

create

Container.create(runtime, config);

Creates a new digital container contract on the blockchain.

Note, that this function is static. It is used on the Container class object and returns a Container class instance.

The options argument has the same structure as the options object that is passed to the constructor as it is used for the new Container instance. The config argument requires a proper value for the property description.

Parameters

  1. options - ContainerOptions: runtime for new container
  2. config - DigitalTwinconfIg: config for new container
    • accountId - string: identity or account of user, that interacts with container
    • address - string: ENS address used for container
    • description - string: description has to be passed to .create to apply it to to contract
    • factoryAddress - string (optional): factory address can be passed to .create for customer container factory
    • plugin - string|ContainerPlugin (optional): plugin to be used in .create, can be string with name or a ContainerPlugin

Returns

Promise returns Container: new instance bound to new DataContract

Example

const container = await Container.create(options, config);
console.log(await container.getContractAddress());
// Output:
// 0x0000000000000000000000000000000000001234

clone

Container.clone(options, config, source[, copyValues]);

Clone Container instance into plugin and creates new Container with it.

Cloning containers:

  • is done with identity or account from config.accountId, which will be owner of the new contract

  • copies all fields from source container to new container (including roles, that have permissions on them)

  • copies values for entry-fields (no lists) to new container, if copyValues is set

  • does not copy role membership

    • config.accountId is the owner of the new contract and also a member of the contract (role 0 and 1)
    • other roles receive permissions on fields, but do not get members added to them
  • does not copy sharings

    • a new sharing with new keys is generated for this container
    • only the owner of the container receives keys shared to it for this container
  • does not copy verifications

  • does not copy the description

    • config.description is used for the cloned contract
    • fields are dynamically added to the description when generating the clone

Parameters

  1. options - ContainerOptions: runtime for new container
  2. config - DigitalTwinconfIg: config for new container
    • accountId - string: identity or account of user, that interacts with container
    • address - string: ENS address used for container
    • description - string: description has to be passed to .create to apply it to to contract
    • factoryAddress - string (optional): factory address can be passed to .create for customer container factory
    • plugin - string|ContainerPlugin (optional): plugin to be used in .create, can be string with name or a ContainerPlugin
  3. source - Container: container to clone
  4. copyValues - boolean: copy entry values from source contract to new contract

Returns

Promise returns Container: new instance bound to new DataContract and a copy of source

Example

const container = await Container.create(options, config);
console.log(await container.getContractAddress());
// Output:
// 0x0000000000000000000000000000000000001234

const clone = await Container.clone(options, config, container);
console.log(await container.getContractAddress());
// Output:
// 0x0000000000000000000000000000000000005678

deleteContainerPlugin

container.deleteContainerPlugin(profile);

Remove a container plugin from a users profile.

Parameters

  1. Profile - Profile: profile instance
  2. name - string: plugin name

Returns

Promise returns void

Example

await Container.deleteContainerPlugin(profile, 'awesomeplugin');

getContainerPlugin

container.getContainerPlugin(profile, name);

Get one container plugin for a users profile by name.

Parameters

  1. Profile - Profile: profile instance
  2. name - string: plugin name

Returns

Promise returns ContainerPlugin

Example

const accountId1 = '0x0000000000000000000000000000000000000001';
const plugin = await Container.getContainerPlugin(profile, 'awesomeplugin');

// create container with accountId1
const container = await Container.create(options, {
  ...config,
  accountId: accountId1,
  description: plugin.description,
  plugin: plugin,
});

getContainerPlugins

container.getContainerPlugins(profile);

Get all container plugins for a users profile

Parameters

  1. Profile - Profile: profile instance
  2. loadContracts - boolean (default = true): run loadBcContract directly for all saved entries (if false, unresolved ipld tree will be returned as value)

Returns

Promise returns Array<ContainerPlugin>

Example

const accountId1 = '0x0000000000000000000000000000000000000001';
const plugins = await Container.getContainerPlugins(profile);

// create container with accountId1
const container = await Container.create(options, {
  ...config,
  accountId: accountId1,
  description: plugins['awesomeplugin'].description,
  plugin: plugins['awesomeplugin'],
});

saveContainerPlugin

container.saveContainerPlugin(profile, name, plugin);

Persists a plugin including an dbcp description to the users profile.

Parameters

  1. Profile - Profile: profile instance
  2. name - string: plugin name
  3. plugin - ContainerPlugin: container plugin object
  4. beforeName - strinf: remove previous plugin instance when it was renamed

Returns

Promise returns void

Example

const plugins = await Container.saveContainerPlugin(
  profile,
  'awesomeplugin',
  { ... }
);

toPlugin

container.toPlugin([getValues]);

Export current container state as plugin. If getValues is true, exports entry values as well.

This plugin can be passed to create and used to create new containers.

Parameters

  1. getValues - boolean: export entry values or not (list entries are always excluded)

Returns

Promise returns ContainerPlugin: plugin build from current container

Example

const sampleValue = 123;
await container.setEntry('numberField', sampleValue);

console.dir(await container.toPlugin(true));

= Entries =

setEntry

container.setEntry(entryName, value);

Set a value for an entry.

Parameters

  1. entryName - string: name of an entry in the container
  2. value - any: value to set

Returns

Promise returns void: resolved when done

Example

const sampleValue = 123;
await container.setEntry('numberField', sampleValue);
console.log(await container.getEntry('numberField'));
// Output:
// 123

getEntry

container.getEntry(entryName);

Return entry from contract.

Parameters

  1. entryName - string: entry name

Returns

Promise returns any: entry value

Example

Entries can be retrieved with:

const sampleValue = 123;
await container.setEntry('numberField', sampleValue);
console.log(await container.getEntry('numberField'));
// Output:
// 123

removeEntries

container.removeEntries(entries);

Remove multiple entries from the container, including data keys and sharings. Can also pass a single property instead of an array. Retrieves dynamically all sharings for the passed entries and runs unshareProperties for them.

Parameters

  1. entries - string / string[]: name / list of entries, that should be removed

Returns

Promise returns void: resolved when done

Example

const accountId1 = '0x0000000000000000000000000000000000000001';
const accountId2 = '0x0000000000000000000000000000000000000002';

// open container with accountId1
const container = new Container(options, { ...config, accountId: accountId1 });

// assuming, that entry 'myField' has been shared with accountId2
// remove the whole property from the container
await container.removeEntries(['myField']);

// fetch value with accountId2 and with accountId1
const accountId2Container = new Container(options, { ...config, accountId: accountId2 });
let value;
try {
  value = await accountId2Container.getEntry('myField');
  console.log(value);
} catch (ex) {
  console.error('could not get entry');
}

// also the owner cannot get this entry anymore
try {
  value = await container.getEntry('myField');
  console.log(value);
} catch (ex) {
  console.error('could not get entry');
}
// Output:
// could not get entry

= List Entries =

addListEntries

container.addListEntries(listName, values);

Add list entries to a list list property.

List entries can be added in bulk, so the value argument is an array with values. This array can be arbitrarily large up to a certain degree. Values are inserted on the blockchain side and adding very large arrays this way may take more gas during the contract transaction, than may fit into a single transaction. If this is the case, values can be added in chunks (multiple transactions).

Parameters

  1. listName - string: name of the list in the container
  2. values - any[]: values to add

Returns

Promise returns void: resolved when done

Example

const listName = 'exampleList';
console.log(await container.getListEntryCount(listName));
// Output:
// 0

const sampleValue = {
  foo: 'sample',
  bar: 123,
};
await container.addListEntries(listName, [sampleValue]);
console.log(await container.getListEntryCount(listName));
// Output:
// 1

console.dir(await container.getListEntries(listName));
// Output:
// [{
//   foo: 'sample',
//   bar: 123,
// }]

getListEntryCount

container.getListEntryCount(listName);

Return number of entries in the list. Does not try to actually fetch and decrypt values, but just returns the count.

Parameters

  1. listName - string: name of a list in the container

Returns

Promise returns number: list entry count

Example

const listName = 'exampleList';
console.log(await container.getListEntryCount(listName));
// Output:
// 0

const sampleValue = {
  foo: 'sample',
  bar: 123,
};
await container.addListEntries(listName, [sampleValue]);
console.log(await container.getListEntryCount(listName));
// Output:
// 1

console.dir(await container.getListEntries(listName));
// Output:
// [{
//   foo: 'sample',
//   bar: 123,
// }]

getListEntries

container.getListEntries(listName, count, offset, reverse);

Return list entries from contract. Note, that in the current implementation, this function retrieves the entries one at a time and may take a longer time when querying large lists, so be aware of that, when you retrieve lists with many entries. Keep in mind if only the listName is passed it will not retrieve the entire list instead only the first 10 elements in the list.

Parameters

  1. listName - string: name of the list in the container
  2. count - number (optional): number of elements to retrieve, defaults to 10
  3. offset - number (optional): skip this many items when retrieving, defaults to 0
  4. reverse - boolean (optional): retrieve items in reverse order, defaults to false

Returns

Promise returns any[]: list entries

Example

const listName = 'exampleList';
console.log(await container.getListEntryCount(listName));
// Output:
// 0

const sampleValue = [ 'Hello', 'welcome', 'to', 'evan', 'network' ];
await container.addListEntries(listName, [sampleValue]);
console.log(await container.getListEntryCount(listName));
// Output:
// 5

console.dir(await container.getListEntries(listName));
// Output:
// [ 'Hello', 'welcome', 'to', 'evan', 'network' ]

console.log(await container.getListEntries(listName, 2));
//Output:
// [ 'Hello', 'welcome' ]

console.log(await container.getListEntries(listName, 10, 2));
//Output
// [ 'to', 'evan', 'network' ]

console.log(await container.getListEntries('testList', 10, 0, true));
//Output:
// [ 'network', 'evan', 'to', 'welcome', 'Hello' ]

getListEntry

container.getListEntry(listName, index);

Return a single list entry from contract.

Parameters

  1. listName - string: name of the list in the container
  2. index - number: list entry id to retrieve

Returns

Promise returns any: list entry

Example

const listName = 'exampleList';
console.log(await container.getListEntryCount(listName));
// Output:
// 0

const sampleValue = {
  foo: 'sample',
  bar: 123,
};
await container.addListEntries(listName, [sampleValue]);
const count = await container.getListEntryCount(listName);
console.log(count);
// Output:
// 1

console.dir(await container.getListEntry(listName, count - 1));
// Output:
// {
//   foo: 'sample',
//   bar: 123,
// }

= Store multiple properties =

storeData

container.storeData(data);
Store data to a container. This allows to
    • store data into already existing entries and/or list entries
    • implicitely create new entries and/or list entries (the same logic for deciding on their type is applied as in setEntry/addListEntries is applied here)
    • in case of entries, their value is overwritten
    • in case of list entries, given values are added to the list

Parameters

  1. data - object: object with keys, that are names of lists or entries and values, that are the values to store to them

Returns

Promise returns void: resolved when done

Example

const sampleValue = 123;
await container.storeData({
  'numberField': sampleValue,
});
console.log(await container.getEntry('numberField'));
// Output:
// 123

= Share Container Data =

shareProperties

container.shareProperties(shareConfigs);

Share entry/list to another user; this handles role permissions, role memberships.

Share configurations are given per user, that receives gets data shared with. The properties have the following meaning

  • accountId:

    • identity or account, that gets properties shared
    • this user will be invited to the contract as a consumer (role 1)
  • read:

    • list of properties, that are shared read-only
    • for each property here, a key sharing for the user will be added if not already done so
    • this field will always be expanded by the field type, which is read only accessible for every member by default, even if read is omitted
    • if not already done so, a hash key sharing will be added for given user
  • readWrite:

    • properties listed here will be threaded the same way as those in the field read
    • additionally the following applies:
      • if not already done so, a role, that has Set permissions will be added for this field
      • given accountId will be added to the group responsible for this field
      • aforementioned roles roles start at role 64, the first 64 roles are system reserved for smart contract custom logic or in-detail role configurations
      • possible roles can go up to 255, so it is possible to add up to 192 properties to a container
  • removeListEntries:

    • properties listed here will be threaded the same way as those in the field read
    • additionally the following applies:
      • if not already done so, a role, that has Remove permissions will be added for this field
      • given accountId will be added to the group responsible for this field
      • aforementioned roles roles start at role 64, the first 64 roles are system reserved for smart contract custom logic or in-detail role configurations
      • possible roles can go up to 255, so it is possible to add up to 192 properties to a container

Parameters

  1. shareConfigs - ContainerShareConfig[]: list of share configs

Returns

Promise returns void: resolved when done

Example

const accountId1 = '0x0000000000000000000000000000000000000001';
const accountId2 = '0x0000000000000000000000000000000000000002';

// create container with accountId1
const container = await Container.create(options, { ...config, accountId: accountId1 });
await container.setEntry('myField', 123);
console.log(await container.getEntry('myField'));
// Output:
// 123

// share field from accountId1 to accountId2
await container.shareProperties([{
  accountId: accountId2,
  read: ['myField'],
}]);

// fetch value with accountId2
const accountId2Container = new Container(options, { ...config, accountId: accountId2 });
console.log(await accountId2Container.getEntry('myField'));
// Output:
// 123

unshareProperties

container.unshareProperties(unshareConfigs);

Remove keys and/or permissions for a user; this also handles role permissions, role memberships.

Please note: To prevent `dead` and inaccessible container entries, the API will throw an error by trying to unshare properties for an owner of a container. If you are sure and really want remove the owner from a property, you need to set the `force` attribute of the ContainerUnshareConfig for the owner to true. If you want to remove a property for all invited users, please use the removeEntries function.

Parameters

  1. unshareConfigs - ContainerUnshareConfig: list of identity/account-field setups to remove permissions/keys for

Returns

Promise returns void: resolved when done

Example

const accountId1 = '0x0000000000000000000000000000000000000001';
const accountId2 = '0x0000000000000000000000000000000000000002';

// open container with accountId1
const container = new Container(options, { ...config, accountId: accountId1 });

// assuming, that entry 'myField' has been shared with accountId2
// unshare field from accountId1 to accountId2
await container.unshareProperties([{
  accountId: accountId2,
  read: ['myField'],
}]);

// fetch value with accountId2
const accountId2Container = new Container(options, { ...config, accountId: accountId2 });
let value;
try {
  value = await accountId2Container.getEntry('myField');
  console.log(value);
} catch (ex) {
  console.error('could not get entry');
}
// Output:
// could not get entry

getContainerShareConfigForAccount

container.getContainerShareConfigForAccount(accountId);

Check permissions for given identity or account and return them as ContainerShareConfig object.

Parameters

  1. accountId - string: account to check permissions for

Returns

Promise returns ContainerShareConfig: resolved when done

Example

const accountId1 = '0x0000000000000000000000000000000000000001';
const accountId2 = '0x0000000000000000000000000000000000000002';

// create container with accountId1
const container = await Container.create(options, { ...config, accountId: accountId1 });
await container.setEntry('myField', 123);
console.log(await container.getEntry('myField'));
// Output:
// 123

// share field from accountId1 to accountId2
await container.shareProperties([{
  accountId: accountId2,
  read: ['myField'],
}]);

// fetch value with accountId2
const accountId2Container = new Container(options, { ...config, accountId: accountId2 });
console.log(await accountId2Container.getEntry('myField'));
// Output:
// 123

const shareConfig = await container.getContainerShareConfigForAccount(accountId2);
console.dir(shareConfig);
// Output:
// {
//   accountId: '0x0000000000000000000000000000000000000002',
//   read: ['myField']
// }

getContainerShareConfigs

container.getContainerShareConfigs();

Check permissions for given identity or account and return them as ContainerShareConfig object.

Returns

Promise returns ContainerShareConfig[]: resolved when done

Example

const accountId1 = '0x0000000000000000000000000000000000000001';  // account in runtime
const accountId2 = '0x0000000000000000000000000000000000000002';  // account to invite

const container = await Container.create(runtime, defaultConfig);
const randomString1 = Math.floor(Math.random() * 1e12).toString(36);
await container.setEntry('testField1', randomString1);
const randomString2 = Math.floor(Math.random() * 1e12).toString(36);
await container.setEntry('testField2', randomString2);

await container.shareProperties([
  { accountId: accountId2, readWrite: ['testField1'], read: ['testField2'] },
]);

console.dir(await container.getContainerShareConfigs());
// Output:
// [ { accountId: '0x0000000000000000000000000000000000000001',
//   readWrite: [ 'testField1', 'testField2' ] },
// { accountId: '0x0000000000000000000000000000000000000002',
//   read: [ 'testField2' ],
//   readWrite: [ 'testField1' ] } ]

setContainerShareConfigs

container.setContainerShareConfigs(newConfigs, originalConfigs);

Takes a full share configuration for an identity or account (or a list of them), share newly added properties and unshare removed properties from the container. Also accepts a list or instance of the original sharing configurations so that duplicated loading can be avoided.

Parameters

  1. newConfigs - ContainerShareConfig / ContainerShareConfig []: sharing configurations that should be persisted
  2. originalConfigs - ContainerShareConfig / ContainerShareConfig [] (optional): pass original share configurations to check differences; better performance if provided, automatically fetched if omitted

Returns

Promise returns void: resolved when done

Example

const accountId1 = '0x0000000000000000000000000000000000000001';
const accountId2 = '0x0000000000000000000000000000000000000002';

// open container with accountId1
const container = new Container(options, { ...config, accountId: accountId1 });

await container.shareProperties([{
  accountId: '0x0000000000000000000000000000000000000002',
  read: [ 'testField', ],
  readWrite: [ 'testField2', ]
}]);

console.dir(await container.getContainerShareConfigForAccount(accountId2))
// {
//   accountId: '0x0030C5e7394585400B1FB193DdbCb45a37Ab916E',
//   read: [ 'testField' ],
//   readWrite: [ 'testField2' ]
// }

shareConfig.readWrite = [ 'testField3' ];
await container.setContainerShareConfigs(shareConfig);

console.dir(await container.getContainerShareConfigForAccount(accountId2))
// {
//   accountId: '0x0030C5e7394585400B1FB193DdbCb45a37Ab916E',
//   read: [ 'testField' ],
//   readWrite: [ 'testField3' ]
// }

= Verifying Containers =

addVerifications

container.addVerifications(verifications);

Add verifications to this container; this will also add verifications to contract description.

If the calling account is the owner of the identity of the container

  • the description will is automatically updated with tags for verifications
  • verifications issued with this function will be accepted automatically

See interface ContainerVerificationEntry for input data format.

Parameters

  1. verifications - ContainerVerificationEntry[]: list of verifications to add

Returns

Promise returns void: resolved when done

Example

await container.addVerifications([{ topic: 'exampleVerification' }]);

getOwner

container.getOwner();

Gets the owner identity or account for the container.

Returns

Promise returns string: owner identity or account

Example

const isOwner = (await container.getOwner()) === runtime.activeAccount;

getVerifications

container.getVerifications();

Gets verifications from description and fetches list of verifications for each of them.

See Verifications documentation for details on output data format.

Returns

Promise returns any: list of verification lists from Verifications, getVerifications

Example

await container.addVerifications([{ topic: 'exampleVerification' }]);
const verifications = await container.getVerifications());

= Working with Container Descriptions =

getDescription

container.getDescription();

Get description from container contract.

Returns

Promise returns any: public part of the description

Example

const description = await container.getDescription();
console.dir(description);
// Output:
// { name: 'test container',
//   description: 'container from test run',
//   author: 'evan GmbH',
//   version: '0.1.0',
//   dbcpVersion: 2,
//   identity:
//    '0x70c969a64e880fc904110ce9ab72ba5f95f706a252ac085ae0525bd7a284337c',
//   dataSchema: { type: { type: 'string', '$id': 'type_schema' } } }

setDescription

container.setDescription(description);

Write given description to containers DBCP.

Parameters

  1. description - any: description (public part)

Returns

Promise returns void: resolved when done

Example

// get current description
const description = await container.getDescription();
console.dir(description);
// Output:
// { name: 'test container',
//   description: 'container from test run',
//   author: 'evan GmbH',
//   version: '0.1.0',
//   dbcpVersion: 2,
//   identity:
//    '0x70c969a64e880fc904110ce9ab72ba5f95f706a252ac085ae0525bd7a284337c',
//   dataSchema: { type: { type: 'string', '$id': 'type_schema' } } }

// update description
description.version = '0.1.1';
await container.setDescription(description);

// fetch again
console.dir(await container.getDescription());
// Output:
// { name: 'test container',
//   description: 'container from test run',
//   author: 'evan GmbH',
//   version: '0.1.1',
//   dbcpVersion: 2,
//   identity:
//    '0x70c969a64e880fc904110ce9ab72ba5f95f706a252ac085ae0525bd7a284337c',
//   dataSchema: { type: { type: 'string', '$id': 'type_schema' } } }

= Utilities =

getContractAddress

container.getContractAddress();

Get contract address of underlying DataContract.

Returns

Promise returns string: address of the DataContract

Example

const container = await Container.create(options, config);
console.log(await container.getContractAddress());
// Output:
// 0x0000000000000000000000000000000000001234

ensureProperty

container.ensureProperty(propertyName, dataSchema[, propertyType]);

Ensure that container supports given property.

Returns

Promise returns void: resolved when done

Example

await container.ensureProperty('testField', Container.defaultSchemas.stringEntry);

Additional Components

Interfaces

ContainerConfig

config properties, specific to Container instances

  1. accountId - string: identity or account of user, that interacts with container
  2. address - string (optional): address of a DataContract instance, can be ENS or contract address
  3. description - string (optional): description has to be passed to .create to apply it to to contract
  4. factoryAddress - string (optional): factory address can be passed to .create for customer container factory
  5. plugin - string|ContainerPlugin (optional): plugin to be used in .create, can be string with name or a ContainerPlugin

ContainerFile

description and content of a single file, usually used in arrays (add/get/set operations)

  1. name - string: filename, e.g. animal-animal-photography-cat-96938.jpg
  2. fileType - string: mime type of the file, e.g. image/jpeg
  3. file - Buffer: file data as Buffer

ContainerShareConfig

config for sharing multiple fields to one account (read and/or readWrite access)

  1. accountId - string: identity or account, that gets properties shared
  2. read - string[] (optional): list of properties, that are shared read-only
  3. readWrite - string[] (optional): list of properties, that are shared readable and writable

ContainerUnshareConfig

config for unsharing multiple fields from one account (write and/or readWrite access)

  1. accountId - string: identity or account, that gets properties unshared
  2. readWrite - string[] (optional): list of properties, that are unshared (read and write permissions)
  3. removeListEntries - string[] (optional): list of properties, that are losing the rights to remove listentries
  4. write - string[] (optional): list of properties, for which write permissions should be removed
  5. force - boolean (optional): Without force flag, removal of the owner will throw an error. By setting to true, force will even remove the owner. Important: By removing the owner from a property, the encryptions keys get lost and cannot be recovered. As the result of this, the data isn’t readable anymore and must be overwritten by creating new encryption keys to encrypt future content.

ContainerPlugin

base definition of a container instance, covers properties setup and permissions

  1. description - any: type of the template (equals name of the template)
  2. template - ContainerTemplate: template for container instances, covers properties setup and permissions

ContainerTemplate

template for container instances, covers properties setup and permissions

  1. type - string: type of the template (equals name of the template)
  2. properties - { [id: string]: ContainerTemplateProperty; } (optional): list of properties included in this template, key is field name, value is property setup

ContainerTemplateProperty

config for sharing multiple fields to one identity or account (read and/or readWrite access)

  1. dataSchema - any: Ajv data schema for field
  2. permissions - { [id: number]: string[] }: permissions for this template, key is role id, value is array with ‘set’ and/or ‘remove’
  3. type - string: type of property (entry/list)
  4. value - any (optional): value of property

ContainerVerificationEntry

data for verifications for containers

  1. topic - string: verification path
  2. descriptionDomain - string (optional): domain, where the description of this verification is stored
  3. disableSubverifications - boolean (optional): if set, verification created in a sub-path are invalid by default, defaults to false
  4. expirationDate - number (optional): expiration date, verifications do not expire if omitted, defaults to 0
  5. verificationValue - string (optional): reference to additional verification details

Public Properties

defaultDescription (static)

Default description used when no specific description is given to .create.

defaultSchemas (static)

Predefined simple schemas, contains basic schemas for files, number, object, string entries and their list variants.

defaultTemplate (static)

Default template used when no specific description is given to .create. Default template is metadata.

profileTemplatesKey (static)

Key that is used in user profile to store templates, default is templates.datacontainer.digitaltwin.evan

templates (static)

Predefined templates for containers, currently only contains the metadata template.