Introduction
Web3.js for Aptos
@martiandao/aptos-web3.js is an npm module which allows developers to communicate with the Aptos ecosystem.
Import
npm i @martiandao/aptos-web3.js
Supported functions
- createWallet: create a new wallet
- importWallet: import an existing wallet
- airdrop: airdrop test coins into an account
- getBalance: get the balance of an account
- transfer: transfer coins from one account to another
- getSentEvents: get Sent events of an account
- getReceivedEvents: get Received events of an account
- createNFTCollection: create an NFT collection
- createNFT: create an NFT
- offerNFT: offer an NFT to a receiver
- claimNFT: claim an NFT offered by a sender
- cancelNFTOffer: cancel an outgoing NFT offer
Tests
Mocha tests allow to test whether each function is working as it supposed to.
npm test