0.1.18 • Published 4 years ago

@rlay/web3-rlay v0.1.18

Weekly downloads
156
License
MIT OR Apache-2.0
Repository
github
Last release
4 years ago

web3-rlay.js - Rlay submodule and helpers for web3.js

npm (scoped) NpmLicense

Installation

Node.js

npm install --save @rlay/web3-rlay

Yarn

yarn install @rlay/web3-rlay

Usage

Adding Rlay submodule to web3 instance

var Web3 = require('web3');
var rlay = require('@rlay/web3-rlay');

var web3 = new Web3();
// for web3 1.x
rlay.extendWeb3WithRlay(web3);
// for older web3
rlay.extendWeb3OldWithRlay(web3);

List the CIDs of all entities that match a certain key/value-pair

const subjectCid = "0x019680031b2063a26691e5526a86348ac4706f5d2eff358d75bdd3da5040abaf30637c13ef6b";
// List all ClassAssertions about a specific subject
web3.rlay.experimentalListCidsIndex("ClassAssertion", "subject", subjectCid)
  .then(console.log);

Get the entity for a CID

const entityCid = "0x019680031b2063a26691e5526a86348ac4706f5d2eff358d75bdd3da5040abaf30637c13ef6b";
web3.rlay.experimentalGetEntity(entityCid)
  .then(console.log);

License

Licensed under either of

0.1.18

4 years ago

0.1.17

4 years ago

0.1.16

4 years ago

0.1.15

5 years ago

0.1.14

5 years ago

0.1.13

5 years ago

0.1.12

5 years ago

0.1.10

5 years ago

0.1.9

5 years ago

0.1.8

6 years ago

0.1.7

6 years ago

0.1.6

6 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago