0.1.13 • Published 10 months ago

@ltonetwork/veramo-plugin v0.1.13

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

lto-veramo

This library provides Veramo plugins to manage DIDs and verifiable credentials on LTO Network.

Installation

To install the library, you can use npm or yarn:

npm install @ltonetwork/veramo-plugin

or

yarn add @ltonetwork/veramo-plugin

LTO DID provider

The LTO DID provider allows you to manage DIDs on the LTO Network blockchain.

Usage

import { createAgent } from '@veramo/core'
import { DIDManager } from '@veramo/did-manager'
import { LtoDidProvider } from '@lto-network/veramo-plugin'

const agent = createAgent<DIDManager>({
  plugins: [
    new DIDManager({
      defaultProvider: 'did:lto',
      providers: {
        'did:lto': new LtoDidProvider({
          nodeAddress: 'https://testnet.lto.network',
          networkId: 'T',
        }),
      },
    }),
  ],
})

Options

The LTO DID provider accepts the following options:

NameTypeDescription
defaultKmsstringThe default key management system (KMS).
ltoLTOOptional. The LTO instance.
networkIdstringT for testnet or L for mainnet. Defaults to L
nodeAddressstringOptional. URL of your LTO public node.
nodeApiKeystringOptional. The node API key.
sponsorAccountOptional. The sponsor account or information.

In case an LTO instance is not provided, the provider will create one using the networkId, nodeAddress and nodeApiKey options.

Sponsor

The sponsor option can be used to automatically sponsor the transaction fees for new DIDs. It can be either an Account object or account settings.

new LtoDidProvider({
  nodeAddress: 'https://testnet.lto.network',
  networkId: 'T',
  sponsor: {
    seed: 'my seed',
    keyType: 'ed25519',
    address: '3JfLsayRvWbJh2JjEhCnfr6hKv8L1xUkH9p',
  },
});

Only seed or privateKey is required.

Contributing

Contributions are welcome! If you encounter any issues or have suggestions for improvements, please create an issue or submit a pull request on the GitHub repository.

License

This library is licensed under the MIT License.

0.1.13

10 months ago

0.1.12

10 months ago

0.1.11

10 months ago

0.1.10

10 months ago

0.1.9

10 months ago

0.1.8

10 months ago

0.1.7

10 months ago

0.1.6

10 months ago

0.1.5

10 months ago

0.1.4

10 months ago

0.1.3

10 months ago

0.1.2

10 months ago

0.1.1

10 months ago

0.1.0

10 months ago