Thanks to visit codestin.com
Credit goes to github.com

Skip to content

sensible-contract/sensible-web3

Repository files navigation

Sensible-Web3

npm version

This is the Sensible Contract Javascript SDK.

You need to connect a wallet to use this library.

Please read the documentation for more and try the demo.

Installation

Node

npm install @sensible-contract/sensible-web3

Yarn

yarn add @sensible-contract/sensible-web3

In the Browser

Use the prebuilt umd/sensible-web3.min.js , or build using the repository:

npm run build

Then include umd/sensible-web3.min.js in your html file. This will expose Web3 on the window object.

Or via jsDelivr CDN:

<script src="https://cdn.jsdelivr.net/npm/@sensible-contract/sensible-web3@latest/umd/sensible-web3.min.js"></script>

UNPKG:

<script src="https://unpkg.com/@sensible-contract/sensible-web3@latest/umd/sensible-web3.min.js"></script>

Usage

// In Node.js
const Web3 = require('@sensible-contract/sensible-web3');

let web3 = new Web3(window.sensilet);
console.log(web3); > {
  sensible: ...,
  utils: ...,
  ...
}

Usage with TypeScript

We support types within the repo itself. Please open an issue here if you find any wrong types.

You can use web3.js as follows:

import Web3 from "@sensible-contract/sensible-web3";
const web3 = new Web3(window.sensilet);

Documentation

Documentation can be found at ReadTheDocs.

Demo

Some usages can be found at Demo.

Building

npm run build

Testing (mocha)

npm run test

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published