Identities
Create a DID Document for an account
import LTO from '@ltonetwork/lto';
import { IdentityBuilder } from '@ltonetwork/lto/identities';
const lto = new LTO('T');
const account = lto.account();
new IdentityBuilder(account)
.transactions.map(tx => lto.node.broadcast(tx));Verification methods
import LTO from '@ltonetwork/lto';
import { IdentityBuilder } from '@ltonetwork/lto/identities';
const lto = new LTO('T');
const account = lto.account();
const key1 = lto.account({ publicKey: "8cMyCW5Esx98zBqQCy9N36UaGZuNcuJhVe17DuG42dHS" });
const key2 = lto.account({ publicKey: "9ubzzV9tRYTcQee68v1mUPJW7PHdB74LZEgG1MgZUExf" });
const expires = new Date();
expires.setFullYear(expires.getFullYear() + 1);
new IdentityBuilder(account)
.addVerificationMethod(key1)
.addVerificationMethod(key2, ['authentication', 'assertionMethod'], expires)
.transactions.map(tx => lto.node.broadcast(tx));Revoking verification methods
Services
Removing services
Deactivation
Grant deactivation capability
Revoke deactivation capability
Last updated