Zen Protocol Documentation
WebsiteTelegramBlogForum
  • Zen Protocol Docs
  • Apps
    • Headless Full Node
      • Full Node NPM Package
      • Build from Source
      • CLI
      • API
        • Wallet
        • Contracts
        • General
        • Blockchain
        • AddressDB
      • Deploy
        • Systemd
        • Shell script
        • Docker
      • Technical Model
      • AddressDB
    • Wallet
      • Desktop Wallet
        • Installers
      • Web Wallet
        • Run Locally
      • Wallet User Guide
        • Connect a Wallet
          • Create a Wallet
          • Import a Wallet
          • Watch Mode
        • My Wallet
          • Navigation Bar
          • Portfolio
          • Receive
          • Send / Execute
          • Transaction History
        • Contracts
          • Active Contracts
          • Execute a Contract
            • Message Body Field
          • Extend a Contract
          • Activate a Contract
        • Voting
          • Common Goods Pool
            • Generating a Ballot ID
          • Governance
        • Signer
        • Settings
          • Account Settings
          • Node Connectivity
      • Deprecated Desktop Wallet
        • Executable Installers
        • Wallet Structure
          • Video Tutorials
    • Explorer
    • Zen.js
      • Payment Processing
    • Oracle
      • Oracle GUI
      • Oracle Service
      • Oracle's API
      • Deploy
        • Systemd
        • Docker
      • How the Oracle contract works
      • How to create an Attestation token
    • Dex
      • Dex User Guide
        • Traded Pairs
        • Search Pairs
        • Order Book
        • Operations
        • My Wallet
        • Settings
      • How DEX contract works
    • Fixed Payout
      • Fixed Payout Generator User Guide
        • Issue
        • Redeem
        • Cancel
        • Verify
        • Settings
      • How the FP Contract works
      • How are the asset named?
  • Smart Contracts
  • Contract Structure
  • Contract Cost
  • Contract Activation
  • Contract Examples
  • Smart Contracts SDK
  • Contracts Language ZF*
  • Named Token Tutorial
  • Consensus
  • Common Goods Pool
  • Block Validation
  • Transaction Validation
  • Serialization
  • Use Cases
    • Create Unsigned Transaction
    • Secure Sign Transaction
    • Cold Storage using Full Node
  • Troubleshooting
    • Responsible Disclosure
    • Bug Bounty
    • Known Bugs
  • For Miners
    • Pools
    • GPU Mining
    • GPU Bounties
  • Check Crowdsale Contribution
  • Alpha call option
Powered by GitBook
On this page
  • Resync
  • Adressess Balance
  • Addressess Outputs
  • Addressess Transactions
  • Addressess Transaction Count
  • Contract History
  • Contract Info
  1. Apps
  2. Headless Full Node
  3. API

AddressDB

Resync

POST http://127.0.0.1:31567/addressdb/resync

Adressess Balance

POST http://127.0.0.1:31567/addressdb/balance

Given a list of addresses return the balance per asset of those addresses

Path Parameters

Name
Type
Description

addressess

array

addressess

Addressess Outputs

POST http://127.0.0.1:31567/addressdb/outputs

Given a list of addresses and a mode return a list of outpoint and spend per address

Request Body

Name
Type
Description

mode

string

all or unspentOnly

addressess

array

address list

[
   {
        outpoint: Outpoint,
        spend: {
            asset: string,
            amount: number
        },
        lock: {
            PK?: {
                hash: string,
                address: string
            },
            Coinbase?: {
                blockNumber: number,
                pkHash: string,
                address: string
            },/// all the other lock as well
        }
    }

]

Addressess Transactions

POST http://127.0.0.1:31567/addressdb/transactions

Given a list of addresses return the transaction count with the skip and take methods

Request Body

Name
Type
Description

take

string

used in pagination

skip

string

used in pagination

addressess

array

address list

Addressess Transaction Count

POST http://127.0.0.1:31567/addressdb/transactioncount

Given a list of addresses return the transaction count

Request Body

Name
Type
Description

addressess

array

address list

Contract History

POST http://127.0.0.1:31567/contract/history

Given a contractID return the history of the execution of that contract

Request Body

Name
Type
Description

take

string

used in pagination

skip

string

used in pagination

contractId

string

contract ID

Contract Info

POST http://127.0.0.1:31567/contract/info

This is used to compute the hints and queries for the contract activation in ZenJs.

Request Body

Name
Type
Description

rlimit

string

Zebra's rlimit for recording hints

code

string

Send valid fstar code, for example: let main _ _ _ _ _ _ _ _ = Zen.ResultT.failw \"This contract does nothing\"\nlet cf _ _ _ _ _ _ _ = Zen.Cost.ret (1 <: nat)

{
    "contractId": "00000000e126b3c70693a7661109d7c7350128f48bf59a7a79ca39a65cf0fc78a9ca7436",
    "address": "ctzn1qqqqqqq8py6euwp5n5anpzzwhcu6sz285306e57neegu6vh8sl3u2njn5xc4qap9y",
    "hints": "[\"04f68069bd73872a976a71eb765538d9\",[[\"Ze126b3c70693a7661109d7c7350128f48bf59a7a79ca39a65cf0fc78a9ca7436.mainFunction\",1,2,1,[\"@MaxIFuel_assumption\",\"@query\",\"Prims_pretyping_ae567c2fb75be05905677af440075565\",\"Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed\",\"Zen.Types.Main_pretyping_5bd8c5a85db081605d2f2b0ef5761cbb\",\"Zen.Types.Main_pretyping_8d0bd552ce32ff91a3c9f4725122e3be\",\"data_typing_intro_Zen.Types.Main.Anonymous@tok\",\"equation_Prims.nat\",\"equation_Ze126b3c70693a7661109d7c7350128f48bf59a7a79ca39a65cf0fc78a9ca7436.cf\",\"equation_Zen.Types.Main.maxCost\",\"fuel_guarded_inversion_Zen.Types.Main.context\",\"function_token_typing_Prims.nat\",\"int_typing\",\"lemma_Zen.Cost.Realized.force_inc\",\"lemma_Zen.Cost.Realized.force_ret\",\"primitive_Prims.op_Addition\",\"proj_equation_Zen.Types.Main.CostFunc_f\",\"proj_equation_Zen.Types.Main.CostFunc_n\",\"projection_inverse_BoxInt_proj_0\",\"projection_inverse_Zen.Types.Main.CostFunc_f\",\"projection_inverse_Zen.Types.Main.CostFunc_n\",\"refinement_interpretation_Prims_Tm_refine_ba523126f67e00e7cd55f0b92f16681d\",\"refinement_interpretation_Zen.Types.Main_Tm_refine_8ae4abcfc6bc8d4903b7e1f40e070ec2\",\"string_inversion\",\"token_correspondence_Ze126b3c70693a7661109d7c7350128f48bf59a7a79ca39a65cf0fc78a9ca7436.cf\",\"token_correspondence_Zen.Types.Main.__proj__CostFunc__item__f\",\"typing_Zen.Cost.Realized.ret\"],0,\"17bfc1c24d1308a3cb3612020f013590\"]]]\n",
    "queries": 27,
    "rlimit": 2723280
}

PreviousBlockchainNextDeploy

Last updated 1 year ago