@uttacoin/web3.js
v0.1.0
Published
UTTA Coin Javascript SDK API
Downloads
1
Keywords
Readme
JavaScript SDK API
This is the UTTA Coin Javascript SDK API built on the UTTA Coin JSON RPC API
Installation
Yarn
$ yarn add @uttacoin/web3.js
npm
$ npm install --save @uttacoin/web3.js
Browser bundle
<!-- Development (un-minified) -->
<script src="https://unpkg.com/@uttacoin/web3.js@latest/lib/index.iife.js"></script>
<!-- Production (minified) -->
<script src="https://unpkg.com/@uttacoin/web3.js@latest/lib/index.iife.min.js"></script>
Development Environment Setup
Install the latest UTTA Coin release from https://docs.uttacoin.com/cli/install-solana-cli-tools
Run test validator
Use solana-test-validator
from the latest UTTA Coin release
BPF program development
Use cargo build-bpf
from the latest UTTA Coin release
Usage
Javascript
const uttacoinWeb3 = require('@uttacoin/web3.js');
console.log(uttacoinWeb3);
ES6
import * as uttacoinWeb3 from '@uttacoin/web3.js';
console.log(uttacoinWeb3);
Browser bundle
// `uttacoinWeb3` is provided in the global namespace by the `uttacoinWeb3.min.js` script bundle.
console.log(uttacoinWeb3);
Examples
Example scripts for the web3.js repo and native programs:
Example scripts for the UTTA Coin Program Library:
Flow
A Flow library definition is provided at
https://unpkg.com/@uttacoin/web3.js@latest/module.flow.js.
Download the file and add the following line under the [libs] section of your project's .flowconfig
to
activate it:
[libs]
node_modules/@uttacoin/web3.js/module.flow.js
Releases
Releases are available on Github and npmjs.com
Each Github release features a tarball containing API documentation and a
minified version of the module suitable for direct use in a browser environment
(<script>
tag)