aries-framework-indy-vdr-proxy-client
TypeScript icon, indicating that this package has built-in type declarations

0.1.4 • Public • Published

Aries JavaScript Indy VDR Proxy client

This package provides some convenient classes to allow an Agent built on Aries Framework JavaScript resolve DIDs and AnonCreds objects from a number of Indy networks without the need of embedding any indy-vdr client binary.

Especially conceived for mobile agents use case, this makes the app lighter and avoids the need of managing ZMQ sockets, as only a simple HTTP REST API is used to retrieve Indy objects.

It works with its companion Aries JavaScript Indy VDR Proxy Server, expected to be run as a server trusted by the mobile app (as all Indy transactions will go through it).

Usage

As of AFJ 0.4.0, the most convenient way to use the classes provided by this package is by injecting them in Agent constructor:

import { IndyVdrProxyAnonCredsRegistry, IndyVdrProxyDidResolver } from 'aries-javascript-indy-vdr-proxy-client'

const proxyBaseUrl = 'https://proxy-host.com'

const agent = new Agent({
  config: {
    /* agent config */
  },
  dependencies,
  modules: {
    /* ... */
    anoncreds: new AnonCredsModule({ registries: [ /* ... */ new IndyVdrProxyAnonCredsRegistry(proxyBaseUrl)] }),
    dids: new DidsModule({
      resolvers: [
        /* ... */
        new IndyVdrProxyDidResolver(proxyBaseUrl),
      ],
     },
})

And that's it!

Keep in mind that these implementation collide with other resolvers and registries for Indy networks, such as the ones from @aries-framework/indy-vdr package, so you'll need to choose to use one or the another when setting up an Agent.

Readme

Keywords

none

Package Sidebar

Install

npm i aries-framework-indy-vdr-proxy-client

Weekly Downloads

0

Version

0.1.4

License

ISC

Unpacked Size

35.1 kB

Total Files

20

Last publish

Collaborators

  • genaris