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

NameTypeDescription

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

NameTypeDescription

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

NameTypeDescription

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

NameTypeDescription

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

NameTypeDescription

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

NameTypeDescription

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
}

Last updated