LogoLogo
  • Overview
  • Basics
    • Architecture
  • Key Concepts
    • EVM Ledger
    • UTXO Chain
      • Confidential transfers
        • Overview
        • Concepts
        • Technical Specifications
    • Prism++ Transfer
    • Triple Masking
      • Overview
      • SDK Installation
      • Bar to Abar
      • Abar to Bar
      • Abar Transfer
    • Staking
      • Overview
      • EVM Staking
        • UTXO Staking and EVM Staking
        • EVM Staking Portal User Guide
      • Consensus
      • Rewards
      • Penalties
  • Developers
    • Acquire Testnet FRA
    • EVM Tools & Tutorials
      • Contract Deployment
        • Ganache
        • Hardhat
        • Remix
        • Truffle
        • Waffle
      • The Graph
      • Band Protocol
      • Mint NFTs
        • Deploy NFT Contract (1 of 3)
        • Mint NFT (2 of 3)
        • View NFT (3 of 3)
    • Developer SDKs
      • UTXO Native Chain SDK
        • UTXO Native Chain SDK Installation
        • Developer Tools
          • Findora CLI Tool
        • UTXO API Reference
          • Account
          • Keypair
          • Network
          • Asset
          • Staking
          • Transaction
          • Helpers
      • ZkRouting SDK
      • zkDID SDK
        • zkDID SDK Installation
        • zkDID API Reference
        • zkDID Example Code
      • Prism++ SDK
    • EVM References
      • Metamask
      • Local Development Network Setup
      • EVM API Reference
      • Precompiled Contracts
    • Resources
      • Bug Bounties
      • Events
        • 🏗️ETH San Francisco 2022
          • zkDID and Credentials
        • 🏗️ETH Denver 2023
    • Game-Specific Chains
      • GSC Highlights
      • User Guide
      • Developer Tools
  • Network Settings
    • Contract Addresses
    • Network Settings
  • General User Materials
    • Acquire FRA
    • Acquire FRA (Testnet)
    • Stake FRA
    • Use Wallets
      • MetaMask
        • Download
        • Configure (Auto)
        • Configure (Manual)
      • Findora Wallet
        • Download
        • New Wallet
        • Transfer
        • Prism++
        • Adding Assets to the Findora Wallet
        • Manage Assets
      • Ledger Hardware Wallet
    • Bridging Tokens to Findora
    • Use Block Explorers
    • Explore Testnet
      • Triple Masking
        • Triple Masking Demo
      • EVM Staking
      • Prism++
        • Prism++ Testing Campaign
          • 💰Testnet Wallet Setup/Funding
          • 👨‍🌾👨🌾 Peasant: Prism++ Campaign Signup
          • 🧒Pupil: FRC20 Token Transfers
          • 🧑‍🎨🧑🎨 Pilgrim: FRC 721 Token Transfers
          • 🧑‍🎓🧑🎓 Prodigy: FRC1155 Token Transfers
          • 🧑‍🚀🧑🚀 Pioneer: Mainnet Transfers
          • Prism++ Testnet Campaign FAQs
    • Gaxle Events
      • Game Chain Challenges
        • Getting Started
        • The Campaigns
        • The Reward Raffles
  • Validator Materials
    • Findora's University Program
    • Validator Setup Guides
      • System Requirements
      • Acquire a Server
      • Validator Toolbox Setup
        • New Build
        • Existing Build
        • Additional Info
      • Manual Setup
      • Automated Setup (Deprecated)
    • Upgrade Guides
      • Node Upgrade (Toolbox)
      • Node Upgrade (Manual)
      • fn CLI Upgrade (Wallet)
    • Operational Guides
      • Emergency Recovery
      • Data Backup
      • CLI Staking
Powered by GitBook
On this page

Was this helpful?

Edit on GitHub
  1. Developers
  2. Developer SDKs
  3. UTXO Native Chain SDK
  4. UTXO API Reference

Account

PreviousUTXO API ReferenceNextKeypair

Last updated 2 years ago

Was this helpful?

create

- Creates an instance of WalletKeypar using password. This method is used to create a WalletKeypar using password. The Keypair contains some essential information, such as:

  • address

  • public key

  • key store

and so on, and it is used for pretty much any personalized operation that user can do using FindoraSdk

Parameters:

  • <string> - Password of account

Results:

  • Promise<WalletKeypar> - An instance of WalletKeypar

Example:

const password = "qsjEI%123";

// Create a wallet info object using given password
const walletInfo = await Account.create(password);

getBalance

- Get the balance of the specific asset for the given user

Using this function user can retrieve the balance for the specific asset code, which could be either custom asset or an FRA asset

  • <WalletKeypar> - An instance of WalletKeypar

  • <string> - (optional) Asset Code which could be either custom asset or an FRA asset.

  • Promise<string> - The balance of the specific asset for the given user.

const pkey = "lfyd1234!";
const password = "uuicnf!34";

// Restore Wallet
const walletInfo = await Keypair.restoreFromPrivateKey(pkey, password);

// Get balance
const balance = await Account.getBalance(walletInfo, customAssetCode);

- Get the balance of the specific asset for the given user in Wei format

Using this function user can retrieve the balance for the specific asset code, which could be either custom asset or an FRA asset

  • <WalletKeypar> - An instance of WalletKeypar

  • <string> - (optional) Asset Code which could be either custom asset or an FRA asset.

  • Promise<BigNumberValue> - The balance of the specific asset for the given user in Wei format.

const pkey = "lfyd1234!";
const password = "uuicnf!34";

// Restore Wallet
const walletInfo = await Keypair.restoreFromPrivateKey(pkey, password);

// Get balance in Wei format
const balance = await Account.getBalanceInWei(walletInfo, customAssetCode);

- Get an array of instances of ProcessedIssuedRecord using wallet address.

This method is used to get created Assets. The ProcessedIssuedRecord contains some essential information, such as:

  • code

  • record

  • id

  • ownerMemo

and so on. It's the issued asset.

  • <string> - Wallet address.

  • Promise<ProcessedIssuedRecord[]> - an array of ProcessedIssuedRecord instances.

const pkey = "lfyd1234!";
const password = "uuicnf!34";

// Restore Wallet
const walletInfo = await Keypair.restoreFromPrivateKey(pkey, password);

// Get balance in Wei format
const balance = await Account.getBalanceInWei(walletInfo, customAssetCode);

Parameters:

Results:

Example:

getBalanceInWei

Parameters:

Results:

Example:

getCreatedAssets

Parameters:

Results:

Example:

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​