Optional
gatewayOptional. The URI of a server involved in executing DID method operations. In the context of DID creation, the endpoint is expected to be a Sidetree node. If not specified, a default gateway node is used.
Optional
publishOptional. Determines whether the created DID should be published to a Sidetree node.
If set to true
or omitted, the DID is publicly discoverable. If false
, the DID is not
published and cannot be resolved by others. By default, newly created DIDs are published.
Sidetree Protocol Specification, § Create
const did = await DidIon.create({
options: {
publish: false
};
Optional
servicesOptional. An array of service endpoints associated with the DID.
Services are used in DID documents to express ways of communicating with the DID subject or associated entities. A service can be any type of service the DID subject wants to advertise, including decentralized identity management services for further discovery, authentication, authorization, or interaction.
DID Core Specification, § Services
const did = await DidIon.create({
options: {
services: [
{
id: 'dwn',
type: 'DecentralizedWebNode',
serviceEndpoint: ['https://example.com/dwn1', 'https://example/dwn2']
}
]
};
Optional
verificationOptional. An array of verification methods to be included in the DID document.
By default, a newly created DID ION document will contain a single Ed25519 verification method.
Additional verification methods can be added to the DID document using the
verificationMethods
property.
DID Core Specification, § Verification Methods
const did = await DidIon.create({
options: {
verificationMethods: [
{
algorithm: 'Ed25519',
purposes: ['authentication', 'assertionMethod']
},
{
algorithm: 'Ed25519',
id: 'dwn-sig',
purposes: ['authentication', 'assertionMethod']
}
]
};
Options for creating a Decentralized Identifier (DID) using the DID ION method.