@zapjs/zaptoken

Zap Token

Usage no npm install needed!

<script type="module">
  import zapjsZaptoken from 'https://cdn.skypack.dev/@zapjs/zaptoken';
</script>

README

@zapjs/zaptoken

This repository provides an interface tothe Zap ERC20 token contract. This package enables a Zap holder to check their balance, transfer Zap to other accounts, and delegate transfers (approvals) to other accounts and smart contracts.

Prerequisites

- Node 12.20 <=14.15
- Typescript

Usage

Using ZapToken package for ERC20 methods with Zap Token
npm install --save `@zapjs/zaptoken`
import {ZaopToken} from '@zapjs/zaptoken';

let myZapToken = new ZapToken();

Custom configuration

let myZapToken = new ZapToken({networkId,networkProvider,coordinator})

get Zap balance of an addrss

const balance = await myZapToken.balanceOf(address);

Approve Zap Token to an address

await myZapToken.approve({from,to,amount,gas})
//note : from address has to be in web3.eth.accounts

Send Zap Token to an address

await myZapToken.send({from,to,amount,gas})
//note : from address has to be in web3.eth.accounts

See more Usages of each packages :

Built With