Code Monkey home page Code Monkey logo

keri-bindings's Introduction

License

EUPL 1.2

We have distilled the most crucial license specifics to make your adoption seamless: see here for details.

Overview

A utility clients (see available below) that expose higher level interface for managing KERI based Identifiers.

With such a client one is able to:

  • establising Identifiers;
  • manage Identifiers (ie. rotation of current Identifier key to next key);
  • use multi signature feature -- multi signature for Identifiers is a group based commitment of multiple actors, that according to established rules are required to provide their signature for any change within given Identifier;
  • designate or remove a Witness for given Identifier [WIP].

Available clients

Development overview

Provides KERIOX based bindings for various other languages either through FFI layer or other available approaches (ie. WASM).

keri-bindings's People

Contributors

edytapawlak avatar gredajustyna avatar blelump avatar mitfik avatar

Stargazers

JP Jednorski avatar  avatar  avatar Volodymyr Pavlyshyn avatar

Watchers

 avatar  avatar James Cloos avatar  avatar

keri-bindings's Issues

Unable to create a new controller in order to do a rotation

I get this error when using the bindings in TypeScript, I use Veramo in order to build a SSI agent:

IO error: could not acquire lock on "databases/DbSlf-eCdBdRPuynIRtif8bragPKFndammAIr0566rWs/db": Os { code: 11, kind: WouldBlock, message: "Resource temporarily unavailable" }

  13 |     constructor(public readonly prefix: string) {
  14 |         if (prefix) {
> 15 |             this.controller = new keri.Controller(prefix);
     |                               ^
  16 |         } else {
  17 |             this.controller = new keri.Controller();
  18 |         }

at new KeriController (src/keri-controller.ts:15:31)

Each time I run my tests I create a new did (therefore a new inception event) and DbSlf-eCdBdRPuynIRtif8bragPKFndammAIr0566rWs is the prefix of this event and the file databases/DbSlf-eCdBdRPuynIRtif8bragPKFndammAIr0566rWs/db is accessible in my file explorer afterwards.

The code that I used to get this error, agent being the Veramo agent that has the keyManagerCreate method to create and store new Ed25519 keypairs that can be used afterwards to sign payloads):

let nextnextKey = await agent.keyManagerCreate({
    kms: 'local',
    type: 'Ed25519',
});
// nextKey is outside of this scope
let nextKeySai = prefixedDerivative(
    b64EncodeUrlSafe(
        Uint8Array.from(Buffer.from(nextKey.publicKeyHex, 'hex'))
    )
);
let nextnextKeySai = prefixedDerivative(
    b64EncodeUrlSafe(
        Uint8Array.from(Buffer.from(nextnextKey.publicKeyHex, 'hex'))
    )
);
// prefix is outside of this scope
let controller = new keri.Controller(
    prefix
);

let rotationEvent = controller.rotate([[nextKeySai, nextnextKeySai]]);

const signature = await agent.keyManagerSign({
    keyRef: nextKey.publicKeyHex,
    data: rotationEvent,
});

let result = controller.finalizeRotation(rotationEvent, [
    prefixedSignature(
        b64EncodeUrlSafe(
            Uint8Array.from(Buffer.from(signature, 'base64'))
        )
    ),
]);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.