EnviDa Protocol
  • 🌍About Envida Blockchain
    • Introduction
    • Overview
    • Why EnviDa?
    • How it works?
    • Understanding the EnviDa Blockchain
    • DeFi Essentials
    • The Joint Potential of Blockchain, IOT and AI
  • πŸš™What is DriveMiner?
    • Environmental Tracking Devices
    • The Cost of Mining
    • The Solution of Mining
    • POW Consensus
    • Technical Specs
    • Device Sales and ROI
  • πŸ’°$EDAT Tokenomics
    • Detailed EDAT Tokenomics
    • ICO and Token Listings
    • Token Unlock and Allocation
    • Game Theory
  • πŸ“ˆStaking and Rewards
    • Reward Distribution
    • DriveMining Rewards
    • Validator Rewards
      • Unstaking Penalty
    • Staking Pool Rewards
      • Discounts
    • Data Collection Rewards
      • Stream Payment - Sensors
        • Competition and Arrival
      • Stream Payment - Lidiar
        • Teamwork
      • Pool Bonus
      • Formulas
  • ROI
  • πŸ¦Έβ€β™‚οΈFor Users
    • EnviDa Wallet
    • Driver Experience
    • Data Marketplace
    • DeFi Essentials
    • External Wallets
  • ⛓️Blockchain Architecture
    • Trustless EVM
    • Bridges
    • Runtime Development
    • Cross-Chain Compatibility
    • EnviDa Dex Engine
    • Technical Architecture
    • Scalability
    • Indexer & Explorer
    • Application Security
    • Storage
    • IPLD
    • Governance
    • Liquidity
    • Concensus
    • Runtime Environment
  • πŸ“”API Recipes
    • Account
    • Asset
    • Bag
    • Bundle
    • Market
  • 🌐EnviDa Network Infrastructure
  • ☸️Nodes and Validators
  • 🧠AI & Simulations
  • 🀝Network Referral System
  • πŸ›£οΈRoadmap
  • πŸ“šResources
    • Website
    • Business Whitepaper
    • Github
    • Technical Whitepaper
Powered by GitBook
On this page
  • Create
  • Exists
  • Seeded
  • Fund
  • Balance
  1. API Recipes

Account

Create

Description:

This function creates a new sugarfunge account to interact with the node.

Steps:

  1. Call the account/create endpoint.

Expected Output:

{
    "seed": "//074a488cc87418a474b5ac30dbcf979caf2099110af805fa208b1a0c53097fc2",
    "account": "5EcFZ4EkYFMYcpJWyjgDde4zG8tVvmdanXeSyNTyD42r552b"
}
  • seed: represents the private key of the new account.

  • account: represents the public key of the new account.

Exists

Description:

This function checks if the account exists and is active.

Previous Steps:

Steps:

  1. Call the account/exists endpoint with the following request body:

  • account: the account address that will be checked.

Example Input:

{
    "account": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY"
} 

Expected Output:

{
    "account": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY",
    "exists": true
}
  • account: the checked account address.

  • exists: the account current status.

Seeded

Description:

This function computes the account from seed.

Previous Steps:

Steps:

  1. Call the account/seeded endpoint with the following request body:

  • seed: the seed of the account to be computed.

Example Input:

{
    "seed": "//Alice"
} 

Expected Output:

{
    "seed": "//Alice",
    "account": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY"
}
  • seed: the seed of the account.

  • account: the account address thas was computed.

Fund

Description:

This function funds an account to be able to carry out different operations on the node.

Previous Steps:

Steps:

  1. Call the account/fund endpoint with the following request body:

  • seed: the seed of the account that would be doing the funding.

  • to: the account address that will be funded.

  • amount: the specific amount to be added to the account.

Example Input:

{
    "seed": "//Alice",
    "amount": 750000000000,
    "to": "5EcFZ4EkYFMYcpJWyjgDde4zG8tVvmdanXeSyNTyD42r552b"
} 

Expected Output:

{
    "from": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY",
    "to": "5EcFZ4EkYFMYcpJWyjgDde4zG8tVvmdanXeSyNTyD42r552b",
    "amount": 750000000000
}
  • from: the account address that did the funding.

  • to: the account address thas was funded.

  • amount: the specific amount that was added to the account.

Balance

Description:

This function checks the balance of sugar in an account.

Previous Steps:

Steps:

  1. Call the account/balance endpoint with the following request body:

  • account: the account address that will be checked.

Example Input:

{
    "account": "5EcFZ4EkYFMYcpJWyjgDde4zG8tVvmdanXeSyNTyD42r552b"
}

Expected Output:

{
    "amount": 750000000000
}
  • amount: the amount of sugar in an account.

PreviousAPI RecipesNextAsset

Last updated 2 years ago

πŸ“”
Create an account
Create an account
Create an account
Create an account