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

0.1.1 • Public • Published

Aries JavaScript Indy VDR Proxy client

This package provides some convenient classes to allow an Agent built on Credo 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 Credo 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 Credo 0.5.0, the most convenient way to use the classes provided by this package is by injecting them in Agent constructor:

import { IndyVdrProxyAnonCredsRegistry, IndyVdrProxyDidResolver } from 'credo-ts-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 @credo-ts/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 credo-ts-indy-vdr-proxy-client

Weekly Downloads

32

Version

0.1.1

License

ISC

Unpacked Size

41.8 kB

Total Files

20

Last publish

Collaborators

  • genaris