@rarcifa/cronos-evm-client
Version:
A Node.js client library for interacting with the Cronos EVM, facilitating operations on both CRC20 and CRC721 tokens.
44 lines (43 loc) • 1.91 kB
TypeScript
import { AxiosInstance } from 'axios';
/**
* CRC721 integration for managing Ethereum RPC requests.
*
* @fileoverview This file provides helper functions for Ethereum JSON-RPC interactions.
* @namespace crc721
*/
export declare const crc721: {
/**
* Fetches the token balance of the crc721 token.
*
* @param {string} accountAddress - The account address to fetch the balance from.
* @param {string} contractAddress - The contract address of the crc721 instance.
* @param {AxiosInstance} cronosInstance - The cronos client to initialize the crc721 instance
* @returns {Promise<string>} The crc721 token balance of the account.
*
* @example
* const data = crc721.getBalanceOf('0xACCOUNT_ADDRESS', '0xCONTRACT_ADDRESS');
*/
getBalanceOf: (accountAddress: string, contractAddress: string, cronosInstance: AxiosInstance) => Promise<string>;
/**
* Fetches the owner address of the crc721 token.
*
* @param {string} contractAddress - The contract address of the crc721 instance.
* @param {AxiosInstance} cronosInstance - The cronos client to initialize the crc721 instance
* @returns {Promise<string>} The owner address of the crc721 token.
*
* @example
* const data = crc721.getOwnerOf('0xCONTRACT_ADDRESS');
*/
getOwnerOf: (contractAddress: string, cronosInstance: AxiosInstance) => Promise<string>;
/**
* Fetches the uri of the crc721 token.
*
* @param {string} contractAddress - The contract address of the crc721 instance.
* @param {AxiosInstance} cronosInstance - The cronos client to initialize the crc721 instance
* @returns {Promise<string>} The uri of the crc721 token.
*
* @example
* const data = crc721.getTokenUri('0xCONTRACT_ADDRESS');
*/
getTokenUri: (contractAddress: string, cronosInstance: AxiosInstance) => Promise<string>;
};