UATU Library Documentation and Usage Examples
Overview:
We provide a brief overview of the UATU library for JavaScript, showcasing its features and usage examples. It is important to note that although this documentation focuses on the npm package for JavaScript, UATU is not limited to npm and will be available for various other programming languages in the future.
The UATU library for JavaScript is a convenient wrapper for the UATU API. It is written in TypeScript and can be used with both Node.js and browser applications. Developers can easily interact with the UATU services and fetch essential data related to wallets, assets, transactions, and NFTs.
Installation is straightforward, with different methods for Node.js and browser environments. Usage examples provided in the readme file demonstrate how to initialize the UATU object, verify wallets, watch events, and retrieve wallet, asset, transaction, and NFT information.
The library's objects, such as Wallet, Asset, Transaction, and NFT, contain a wealth of relevant data for developers to use in their applications. For example, Wallet objects include wallet addresses, assets, transactions, and NFT assets, while Asset objects contain information on value, symbol, and chain of the asset. Transaction objects provide details like hash, from/to addresses, value, transaction type, chain ID, coin, block number, transaction status, and timestamp. Finally, NFT objects include crucial data on token address, token ID, owner, block numbers, token hash, amount, contract type, name, symbol, token URI, minter address, chain ID, and timestamp.
Installation
To install the UATU library for JavaScript, follow the instructions based on your environment:
Node.js:
Browser:
Usage Examples
Initialize UATU object:
Watch events:
Retrieve wallet information:
Retrieve asset information:
Retrieve transaction information:
Retrieve NFT asset information:
Objects
The UATU library provides several objects, such as Wallet, Asset, Transaction, and NFT, containing relevant data for developers to use in their applications.
Wallet Object:
Includes wallet addresses, assets, transactions, and NFT assets.
Asset Object:
Contains information on value, symbol, and chain of the asset.
Transaction Object:
Provides details like hash, from/to addresses, value, transaction type, chain ID, coin, block number, transaction status, and timestamp.
NFT Object:
Includes crucial data on token address, token ID, owner, block numbers, token hash, amount, contract type, name, symbol, token URI, minter address, chain ID, and timestamp.
Last updated