![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@tonomy/antelope-did
Advanced tools
Create, resolve, update and deactivate Decentralized Identifier (DID) documents based on Antelope blockchains
The Antelope Identity Working Group is an open working group where we, the Antelope community, discuss identity on Antelope chains and progress work such as this DID specification and it's implementation. We have a weekly meeting and a Slack channel.
Join the Antelope Identity Working Group
Comments regarding this document are welcome. Please file issues and PRs directly on Github. Contributors are recognized through adding commits to the code base.
See README.tsdx.md for instructions on how to run, build, test and test this library.
Contributors:
This library is intended to use Antelope accounts as fully self managed Decentralized Identifiers and wrap them in a DID Document
It supports the proposed Decentralized Identifiers spec from the W3C Credentials Community Group.
The DID specification can be found at antelope-did-spec.
const antelopeDid = new AntelopeDID({
chain: 'eos:testnet:jungle',
signatureProvider: new JsSignatureProvider(['PVT_K1_27yS4sdX86VDahQRABMLCcDABH5Vzy8vgLLS7wBeKESyrXetMf'])
});
const myPermission = {
threshold: 1,
keys: [{
key: 'PUB_K1_5irHomACLB3oRbkqdgYTdh1GHGt8yvzQ7no5dxvEw5eYAiUiut',
weight: 1,
}],
accounts: [],
waits: [],
};
// "didtester333" account creates a new account called "newaccount11" with the owner and active permission set to "mypermission"
// on the Jungle testnet
const didCreateResult = await antelopeDid.create('didtester333', 'newaccount11', myPermission, myPermission);
const antelopeDid = new AntelopeDID();
// resolves the "didtester333" account on the Jungle testnet account to a DID Document
const didResolveResult = await antelopeDid.resolve('did:antelope:eos:testnet:jungle:didtester333');
const antelopeDID = new AntelopeDID({
account: 'didtester333',
signatureProvider: new JsSignatureProvider(['PVT_K1_27yS4sdX86VDahQRABMLCcDABH5Vzy8vgLLS7wBeKESyrXetMf']),
chain: 'eos:testnet:jungle'
});
const myNewPermission = {
threshold: 1,
keys: [{
key: 'PUB_K1_5irHomACLB3oRbkqdgYTdh1GHGt8yvzQ7no5dxvEw5eYAiUiut',
weight: 1,
}],
accounts: [],
waits: [],
};
// "didtester333" changes it's "active" permission to the "myNewPermission" on the Jungle testnet
const didUpdateResult = await antelopeDID.update('didtester333', 'active', 'owner', myNewPermission);
Note: DID Deactive always throws an error as it is not supported by default on an Antelope chain. See the Antelope DID Spec for more information.
const antelopeDID = new AntelopeDID({
account: 'didtester333',
signatureProvider: new JsSignatureProvider(['PVT_K1_27yS4sdX86VDahQRABMLCcDABH5Vzy8vgLLS7wBeKESyrXetMf']),
chain: 'eos:testnet:jungle'
});
// Will throw an error
await antelopeDID.deactivate('did:antelope:eos:testnet:jungle:didtester333');
All function calls (create, resolve, update, deactivate) can be called with an optional options
argument with the following optional properties:
{
chain?: string;
fetch?: any;
account?: string;
signatureProvider?: SignatureProvider;
accountPermission?: string;
registry?: ChainRegistry;
transactionOptions?: {
blocksBehind?: number;
expireSeconds?: number;
};
}
chain - the chain id or the registered chain name (see the DID method schema part of the Antelope DID spec). This must be provided to know which chain to contact and a corresponding item in the antelope-did-chain-registry.json or registry
property must exist e.g.
eos:testnet:jungle
telos
4667b205c6838ef70ff7988f6e8257e8be0e1284a2f59699054a018f743b1d11
fetch - fetch object used to communicate with the antelope API. If using nodejs then you need to import the node-fetch
npm package and use this. See the eosjs documentation for more details.
signatureProvider - the SignatureProvider object that will be used to sign txs
accountPermission - the permission name that will be used to send txs
registry - additional ChainRegisries that are used to find the API endpoints of the antelope API. This should be used when communicating with Antelope blockchain nodes that have not been registed in the antelope-did-chain-registry.json
transactionOptions - overrides the tx options when the tx is sent. See the eosjs documentation for more details.
The create function can be called with the following additional optional properties:
{
buyrambytes?: number;
stakeNetQuantity?: string;
stakeCpuQuantity?: string;
transfer?: boolean;
}
buyrambytes - amount of RAM to allocate to the new account in bytes (default = 8192)
stakeNetQuantity - amout of NET to stake to the new account (default = "1.0000 EOS")
stakeCpuQuantity - amount of CPU to stake to the new account (default = "1.0000 EOS")
transfer - transfer the ownership of the staked tokens to the new account (default = false)
All function calls (create, resolve, update, deactivate) return an object containing an errors encountered. They do not throw errors.
For example
const didResolveResult = await antelopeDid.resolve('did:antelope:invalid_did_string');
// This will NOT throw an error
console.log(didResolveResult);
/*
{
didResolutionMetadata: { 'invalidDid' },
didDocument: null,
didDocumentMetadata: {},
}
*/
FAQs
Create, resolve, update and deactivate Decentralized Identifier (DID) documents based on Antelope blockchains
The npm package @tonomy/antelope-did receives a total of 19 weekly downloads. As such, @tonomy/antelope-did popularity was classified as not popular.
We found that @tonomy/antelope-did demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.