@zoidpay-tech/zoidcore-blockchain-helpers v0.9.7
@zoidpay-tech/zoidcore-blockchain-helpers
Introduction
The ZoidCore Blockchain Helpers package is a powerful tool for creating transaction payloads for blockchain transactions. The package provides a simple and intuitive interface to generate payloads that can be used to transfer digital assets, issue and mint NFTs and tokens, and add roles. In addition, it provides the necessary tools to verify the generated smart contracts and see a given trascation status.
At this moment, the supported chains are MultiversX, Polygon, Binance and Ethereum
Installation
Run the following command:
npm i @zoidpay-tech/zoidcore-blockchain-helpers
Usage
Import the package into your project:
import { ZoidCore } from '@zoidpay-tech/zoidcore-blockchain-helpers';
Once the package has been insalled, instantiate ZoidCore with your api key:
const zoid = new ZoidCore(process.env.MY_API_KEY as string);
Then, with only one line of code, access one of the classes (ethereum, multivesX, binance or polygon) and the desired function:
const response = await zoid.ethereum.ethCreateToken(ethCreatePayload);
Types
Your payload can be typed. The package exports types as ZoidModels, import as follows:
import { ZoidModels } from '@zoidpay-tech/zoidcore-blockchain-helpers';
Full transaction code snippet should look like this:
import { ZoidCore } from '@zoidpay-tech/zoidcore-blockchain-helpers';
import { ZoidModels } from '@zoidpay-tech/zoidcore-blockchain-helpers';
const ethCreatePayload: ZoidModels.EthTokenCreate = {
address: '0x365f14a97a16b380dd64b677ea0a92bafa6f606e',
chainId: 11155111,
currentAddress: '0x365f14a97a16b380dd64b677ea0a92bafa6f606e',
supply: 100,
tokenName: 'MyAmazingToken',
tokenSymbol: 'AMZG',
networkProvider: 'https://rpc.sepolia.org',
numberOfDecimals: 10,
canMint: true,
canBurn: true,
environment: "testnet"
}
const zoid = new ZoidCore(process.env.MY_API_KEY as string);
const response = await zoid.ethereum.ethCreateToken(ethCreatePayload);
Conclusion
The Blockchain Transaction Payload package provides a convenient way to create transaction payloads for blockchain transactions. By following the steps outlined in this documentation, you can easily integrate this package into your applications. If you have any questions or issues, please refer to the package's documentation or contact the package maintainers.