ucan-key

1.0.2 • Public • Published

⁂ ucan-key

Generate a keypair to sign your UCANs. Built on ucanto.

Usage

Install it globally npm i -g ucan-key or run it directly with npx

$ npx ucan-key ed
# did:key:z6Mkrxitw7vFt19yWdsUZVBR3Br5Ctb2cYjKWTa1HnogrxbM
MgCZ9PrPux+I1Ijt3iicH49WOnBWY3CqcYsKUjXdtWlGnHO0BudhyYagJvRO1tRbs1/Z9ZG5fckaZcCwjqVhJs39pp5w=

$ npx ucan-key ed --json
{ 
  "did": "did:key:z6Mkrxitw7vFt19yWdsUZVBR3Br5Ctb2cYjKWTa1HnogrxbM"
  "key": "MgCZ9PrPux+I1Ijt3iicH49WOnBWY3CqcYsKUjXdtWlGnHO0BudhyYagJvRO1tRbs1/Z9ZG5fckaZcCwjqVhJs39pp5w="
}

You might store the key string in a secrets manager or ENV var and parse it programmatically like:

import * as Signer from '@ucanto/principal/ed25519'
const key = process.env.KEY // "MgCZ9PrPux+I1Ijt..."
const signer = signer.parse(key)
// now go sign some UCANs!

Dependencies (2)

Dev Dependencies (1)

Package Sidebar

Install

npm i ucan-key

Weekly Downloads

3

Version

1.0.2

License

MIT

Unpacked Size

2.4 kB

Total Files

5

Last publish

Collaborators

  • olizilla