1.0.0 • Published 6 years ago

@windingtree/off-chain-accessor-swarm v1.0.0

Weekly downloads
1
License
Apache-2.0
Repository
github
Last release
6 years ago

Winding Tree Off Chain Data Accessor - Ethereum Swarm.

Swarm-based storage that can be used in Winding Tree wt-js-libs.

Installation

npm install @windingtree/off-chain-accessor-swarm
# or
git clone https://github.com/windingtree/off-chain-accessor-swarm
nvm install
npm install

Usage

import WTLibs from '@windingtree/wt-js-libs';
import SwarmAccessor from '@windingtree/off-chain-accessor-swarm';

const libs = WTLibs.createInstance({
  dataModelOptions: {
    provider: 'http://localhost:8545',
  },
  offChainDataOptions: {
    accessors: {
      'bzz-raw': {
        options: {
          swarmProviderUrl: 'http://localhost:8500',
        }
        create: (options) => {
          return new SwarmAccessor(options);
        },
      },
    },
  },
});