This page documents the services as defined in our protobuf specifications.

If the service is exposed through grpc-gateway, the URL and method will also be shown. This makes the RPC method available over HTTP in JSON format.

Services#

core.Full API#

Service interface every public full blockchain peer implements

core.Full.BlockBySequence#

HTTP: GET /api/v1/blockchain/block/seq/{Sequence}

Request Model: core.BlockBySequenceRequest

Response Model: core.BlockBySequenceResponse

core.Full.GetAccountBlockHashes#

HTTP: GET /api/v1/accounts/{AccountAddress}/block-hashes

Get account block hashes

Request Model: core.GetAccountBlockHashesRequest

Response Model: core.GetAccountBlockHashesResponse

core.Full.GetAccountTokenRates#

HTTP: GET /api/v1/accounts/{AccountAddress}/token-rates

Get account token rates

Request Model: core.GetAccountTokenRatesRequest

Response Model: core.GetAccountTokenRatesResponse

core.Full.GetAccountTransactionCount#

HTTP: GET /api/v1/accounts/{AccountAddress}/txcount

Get account transaction count

Request Model: core.AccountTransactionCountRequest

Response Model: core.AccountTransactionCount

core.Full.GetActiveView#

Request Model: core.Void

Response Model: core.View

core.Full.GetAddressStates#

HTTP: GET /api/v1/blockchain/address/{Hash}

Get state by account or agreement address

Request Model: core.AddressStatesRequest

Response Model: core.AddressStatesResponse

core.Full.GetAgreements#

HTTP: POST /api/v1/blockchain/agreements

Get agreements by party

Request Model: core.GetAgreementsRequest (POST body)

Response Model: core.GetAgreementsResponse

core.Full.GetBlock#

Request Model: core.HashMessage

Response Model: core.Block

core.Full.GetBlockByQueryParam#

HTTP: GET /api/v1/blockchain/block/{Hash}

Get block by hash from a node, looking in the cache first, then in the state

Request Model: core.HashQueryParam

Response Model: core.Block

core.Full.GetBlockHashByTransactionHash#

HTTP: GET /api/v1/blockchain/transactions/{Hash}/block

See in what block a transaction was included

Request Model: core.HashQueryParam

Response Model: core.HashMessage

core.Full.GetBlockHeaderAtSequenceOrLatest#

Request Model: core.BlockBySequenceRequest

Response Model: core.BlockHeader

core.Full.GetBlockHeaders#

HTTP: GET /api/v1/blockchain/headers/stream

Get latest block headers with limit

Request Model: core.Limit

Response Model: core.BlockHeader (streaming)

core.Full.GetBlocks#

Request Model: core.BlocksRequest

Response Model: core.Block (streaming)

core.Full.GetCachedBlocks#

Get blocks from end of confirmed chain and from cache.
This method might not return old blocks. Only use for recent blocks. Recency is recency in terms of consensus.
Response is BEST EFFORT sorted, so no guarantees.

Request Model: core.BlocksRequest

Response Model: core.CachedBlock (streaming)

core.Full.GetContracts#

HTTP: GET /api/v1/contracts

List the available network contracts

Request Model: core.GetContractsRequest

Response Model: contractprotocol.ContractInfo (streaming)

core.Full.GetDiscoveryManifest#

HTTP: GET /api/v1/manifests/network

Get the last known manifest according to the blockchain and discovery state of this node.

Request Model: core.Void

Response Model: core.DiscoveryManifest

core.Full.GetLatestBlocks#

HTTP: GET /api/v1/blockchain/latest/stream

Request Model: core.LatestBlocksRequest

Response Model: core.LatestBlocksResponse (streaming)

core.Full.GetLatestTransactions#

HTTP: GET /api/v1/blockchain/transactions

Request Model: core.LatestTransactionsRequest

Response Model: core.LatestTransactionsResponse

core.Full.GetMempoolStatus#

HTTP: GET /api/v1/node/mempool

Return transactions in mempool by offset, limit, and how many pending transactions in the mempool

Request Model: core.Paging

Response Model: core.MempoolInfoResponse

core.Full.GetNetworkStatus#

HTTP: GET /api/v1/network/status

Return list of candidates, witnesses, last consensus window

Request Model: core.Void

Response Model: core.NetworkStatusResponse

core.Full.GetNodeStatus#

HTTP: GET /api/v1/node/status

Return network role, current local tip of the chain, last consensus point for a single node, address, some basic useful stats, syncing status / lag(by current time vs block time), peer address

Request Model: core.Void

Response Model: core.NodeStatusResponse

core.Full.GetRawAgreementCreationBlock#

Request Model: core.HashMessage

Response Model: core.RawData

core.Full.GetRawBlocksByHashes#

HTTP: GET /api/v1/blocks-raw

Request Model: core.MultiHashQueryParam

Response Model: core.RawData (streaming)

core.Full.GetSupportedCurrencies#

HTTP: GET /api/v1/node/currencies

Get currently supported currencies on this node

Request Model: core.Void

Response Model: core.GetSupportedCurrenciesResponse

core.Full.GetSyncBlocks#

A sync block is a raw block sent in binary format, avoiding serialization overhead on the serving node.

Request Model: core.SyncBlocksRequest

Response Model: core.RawData (streaming)

core.Full.GetTokenRates#

HTTP: GET /api/v1/token-rates

Get current token token rates used by witness

Request Model: core.Void

Response Model: core.GetAccountTokenRatesResponse

core.Full.GetTransaction#

HTTP: GET /api/v1/blockchain/transactions/{Hash}

Get transaction detail by Hash

Request Model: core.HashQueryParam

Response Model: core.TransactionResponse

core.Full.GetTrustedPartyAddress#

Request Model: core.Void

Response Model: core.HashMessage

core.Full.GetViews#

Request Model: core.GetViewsRequest

Response Model: core.RawDataList

core.Full.GetWitnessList#

HTTP: GET /api/v1/witnesses

Get current witnesses list.

Request Model: core.Void

Response Model: core.WitnessList

core.Full.HandleConsensusEvent#

Request Model: core.ConsensusEvent

Response Model: core.Void

core.Full.HandleConsensusEvents#

Request Model: core.HandleConsensusEventsRequest

Response Model: core.Void

core.Full.HandleNewView#

Request Model: core.View

Response Model: core.Void

core.Full.PostFullNodeData#

Route for gossipping fullnode data. Will be replaced by streams later on.
Usage of this route should be limited to witnesses only.

Request Model: core.FullNodeData

Response Model: core.Void

core.Full.PostPeerInfo#

Request Model: core.PeerInfo

Response Model: core.Void

core.Full.PostTransaction#

HTTP: POST /api/v1/transactions

Post transaction

Request Model: core.Transaction (POST body)

Response Model: core.Void

core.Full.StreamReceipts#

HTTP: GET /api/v1/blockchain/txreceiptstream

Given an offset, this will stream block annotations for all blocks coming through.
Only goes back to the last 1000 blocks.

Request Model: core.StreamReceiptsRequest

Response Model: core.AnnotatedTransaction (streaming)

core.Full.StreamUpdatesFull#

Request Model: core.Void

Response Model: core.FullNodeData (streaming)

core.Full.ValidateBlock#

Request Model: core.ValidateBlockRequest

Response Model: core.ValidateBlockResponse

core.Peer API#

Service interface each network peer implements

core.Peer.GetNetworkHealthStatus#

HTTP: GET /api/v1/healthcheck/network

Return network healthcheck status (blocks, witnesses are continously synced).

Request Model: core.Void

Response Model: core.Void

core.Peer.GetPeerHealth#

HTTP: GET /api/v1/peer/health

Health check endpoint.

Request Model: core.Void

Response Model: core.Void

core.Peer.GetPeerInfo#

HTTP: GET /api/v1/peer/info

Return PeerInfo of current node

Request Model: core.Void

Response Model: core.PeerInfo

core.Peer.GetPeerStatus#

HTTP: GET /api/v1/peer/status

Return PeerStatus of current node

Request Model: core.Void

Response Model: core.PeerStatus

core.Peer.GetPrimaryAccountTransactionCount#

HTTP: GET /api/v1/account/txcount

See the value of the in-memory txcount of the primary account.

Request Model: core.Void

Response Model: core.AccountTransactionCount

core.Peer.GetSystemHealthStatus#

HTTP: GET /api/v1/healthcheck/system

Return system healthcheck status (db access is functioning: peer-mysql, channel-sqlite).

Request Model: core.Void

Response Model: core.Void

core.Peer.GetToken#

HTTP: GET /api/v1/token

Return a token it pass challenge

Request Model: core.TokenRequest

Response Model: core.TokenResponse

core.Peer.GetTokenChallenge#

HTTP: GET /api/v1/token/challenge

Return a challenge for client node

Request Model: core.ChallengeRequest

Response Model: core.ChallengeResponse

core.Peer.UpdatePrimaryAccountTransactionCount#

HTTP: PATCH /api/v1/account/txcount

Make the node refresh it's latest transaction count through the public network.

Request Model: core.AccountTransactionCountRequest

Response Model: core.AccountTransactionCount

core.IndexNode API#

Service interface every index node implements

core.IndexNode.GetActionsByParentRoot#

HTTP: GET /api/v1/roots/{Address}/actions

Get all action calls done for a single parent root. Eg: get all sale roots for 1 click-root.

Request Model: core.GetActionsByParentRootRequest

Response Model: core.GetActionsByParentRootResponse

core.IndexNode.GetAggregatedRootData#

HTTP: GET /api/v1/root/aggregate

Count amount of each action type by agreement address depends on its status.

Request Model: core.GetAggregatedRootDataRequest

Response Model: core.ResultSet

core.IndexNode.GetCompensationStats#

HTTP: GET /api/v1/compensation-stats

Request Model: core.GetCompensationStatsRequest

Response Model: core.ResultSet

core.IndexNode.GetIdxAccountTokenRates#

HTTP: GET /api/v1/tokenrates

Get specific account token rates

Request Model: core.GetIdxAccountTokenRatesRequest

Response Model: core.ResultSet

core.IndexNode.GetOperationHistory#

HTTP: GET /api/v1/operation-history

Operation history history grouped by time period.

Request Model: core.GetOperationHistoryRequest

Response Model: core.ResultSet

core.IndexNode.GetRootHistory#

HTTP: GET /api/v1/root/history

Get pre-actions of current root

Request Model: core.GetRootHistoryRequest

Response Model: core.ResultSet

core.IndexNode.GetRoots#

HTTP: GET /api/v1/roots

Get roots with pagination

Request Model: core.GetRootsRequest

Response Model: core.ResultSet

core.IndexNode.GetRootsByAddresses#

HTTP: GET /api/v1/compensation-roots

Get root by list specific root address

Request Model: core.GetRootsByAddressesRequest

Response Model: core.ResultSet

core.IndexNode.StreamLatestRoot#

HTTP: GET /api/v1/root/stream

Websocket implementation to get latest root by given account address.

Request Model: core.GetLatestRootRequest

Response Model: core.LatestRootResponse (streaming)

connectors.Connector API#

Service interface every connector implements

connectors.Connector.ConfigureAccount#

HTTP: POST /attrace/v1/account

Configure the connector with an admin account
Only works when the connector is not already configured

Auth: none, request only works once on startup for initial configuration
200: success
409: already configured

Request Model: connectors.ConfigureAccountRequest

Response Model: core.Void

connectors.Connector.CreateAction#

HTTP: GET /attrace/v1/action

GET /attrace/v1/action

Execute contract actions on the network

Auth: none

Request Model: connectors.CreateActionRequest

Response Model: core.Void

connectors.Connector.CreateIntegrationConfig#

HTTP: POST /attrace/v1/integrationconfigs

POST /attrace/v1/integrationconfigs

403: Already exists

Auth: admin

Body: integrations.IntegrationConfig

Request Model: integrations.IntegrationConfig

Response Model: core.Void

connectors.Connector.CreateMonitor#

HTTP: POST /attrace/v1/monitors

POST /attrace/v1/monitors

Discovers monitor address from the passed monitor URL
Adds the monitor address in the auth table (so monitor-auth requests are allowed by this account)

Request Model: connectors.CreateMonitorRequest

Response Model: core.Void

connectors.Connector.DeleteIntegrationConfig#

HTTP: DELETE /attrace/v1/integrationconfigs/{UniqueId}

DELETE /attrace/v1/integrationconfigs/:unique_id

Auth: admin

Request Model: connectors.DeleteIntegrationConfigRequest

Response Model: connectors.IntegrationConfigsResponse

connectors.Connector.DeleteMonitor#

HTTP: DELETE /attrace/v1/monitors/{Account}

DELETE /attrace/v1/monitors/:Account

Delete this monitor

Auth: admin

Request Model: connectors.DeleteMonitorRequest

Response Model: core.Void

connectors.Connector.GetAccount#

HTTP: GET /attrace/v1/account

Get configured admin account

200: success
500: when node is not yet configured

Request Model: core.Void

Response Model: connectors.AccountResponse

connectors.Connector.GetConfig#

HTTP: GET /attrace/v1/config

GET /attrace/v1/config

Auth: monitor

Request Model: core.Void

Response Model: connectors.ConfigReponse

connectors.Connector.GetIntegrationConfigs#

HTTP: GET /attrace/v1/integrationconfigs

GET /attrace/v1/integrationconfigs

Auth: monitor

Request Model: connectors.GetIntegrationConfigsRequest

Response Model: connectors.IntegrationConfigsResponse

connectors.Connector.GetMonitors#

HTTP: GET /attrace/v1/monitors

GET /attrace/v1/monitors

Send back list of accounts which have monitor access and their respective URLs

Auth: monitor

Request Model: core.Void

Response Model: connectors.MonitorsResponse

connectors.Connector.GetStatus#

HTTP: GET /attrace/v1/status

GET /attrace/v1/status

Auth: monitor

Request Model: core.Void

Response Model: connectors.StatusResponse

connectors.Connector.GetTransactions#

HTTP: GET /attrace/v1/transactions

GET /attrace/v1/transactions
Get transactions ordered by time desc

Auth: monitor

Query arguments:

  • From: utc timestamp millis
  • To: utc timestamp millis
  • Limit: optional, default 100
  • Next: optional next paging value from the previous response

Request Model: connectors.GetTransactionsRequest

Response Model: connectors.TransactionsResponse

connectors.Connector.PatchConfig#

HTTP: PATCH /attrace/v1/config

PATCH /attrace/v1/config

Modify a config setting

Auth: admin

Request Model: connectors.ModifyConfigRequest

Response Model: core.Void

connectors.Connector.Reset#

HTTP: POST /attrace/v1/reset

POST /attrace/v1/reset

Reset a storage completely (drop table and create new)

Auth: admin

Request Model: connectors.ResetRequest

Response Model: core.Void

connectors.ConnectorMonitor API#

Service interface the connector monitor implements, incomplete.

connectors.ConnectorMonitor.Discover#

HTTP: GET /discover

Request Model: core.Void

Response Model: connectors.MonitorDiscoverResponse

Developers#

note

These docs are generated from the core/* protobuf definitions.
Changes should be done in the source files or will be overwritten.