Blockchain API (v1alpha2)

Blockchain API Reference

Blockchain API Examples

Create the bearer_token and store in a file in a secure local directory with 0600 permissions.

Fetch Transactions for an event (v1alpha2)

Blockchain transactions can be fetched from the blockchain endpoint using the asset’s Event ID as a parameter:

assets/add30235-1424-4fda-840a-d5ef82c4c96f/events/11bf5b37-e0b8-42e0-8dcf-dc8c4aefc000

To fetch all transactions for an asset event GET the blockchain resource:

curl -v -X GET \
     -H "@$BEARER_TOKEN_FILE" \
     https://app.rkvst.io/archivist/v1alpha2/blockchain/assets/add30235-1424-4fda-840a-d5ef82c4c96f/events/11bf5b3

Each of these calls returns a list of matching blockchain transactions in the form:

{
   "transactions":[
      {
         "transaction":{
            "hash":"0xbcb60deea8c70a1f4dea54d7666ca58b73f00e0febe59c099616ecb53d5909e4",
            "nonce":"0",
            "blockhash":"0xa25e4360cd08abade72e34e9a65c670fe6f965454b95021d37baf472e429dc69",
            "block_number":"786720",
            "transaction_index":1,
            "r":"0x4b020ec02b0e88e5519fe43e2d2b33ca39f8807ebe2953c866b553df98ded5aa",
            "s":"0x75620ffa89a21404803201cc279a53f9afa770c16af312db7fb42899b9608d64",
            "from":"0x413aDcF9365C5eBe0F9714b575B5eA792aECC0bB",
            "to":"0x0C0c2c268261F767880f64cE84e088558B38b349",
            "value":"0",
            "gas":"500000000",
            "gas_price":"0",
            "input":"0xdc6b7758811673be442b8a70ad1e37117c76b5abbabc716917a6e5f98f8247a68f6bf368fdce8bd7f685b9aa41148f5c059c8599e3d707f4481e13a8782a0b1a",
            "v":"0x26"
         },
         "kind":"KHIPU"
      },
      {
         "transaction":{
            "hash":"0x4113596f7c9f825104f53ed50b262a116801d89b8e5ac15e9d8dc215e6f49ef0",
            "nonce":"1",
            "blockhash":"0xaf1b9b686bf7a1beea003f84d85da1d8ca4c8eaaeded29ac72fd549e6591f84b",
            "block_number":"786722",
            "transaction_index":0,
            "r":"0x4833ad44bc2fc0bca2f08a958ce1e0f6d3667493c8773bc74e45837bee5de5be",
            "s":"0x3ca22bc844d963e908a19ccbc139543193411650dd97e4978d3e4f243d1295db",
            "from":"0x413aDcF9365C5eBe0F9714b575B5eA792aECC0bB",
            "to":"0x0C0c2c268261F767880f64cE84e088558B38b349",
            "value":"0",
            "gas":"500000000",
            "gas_price":"0",
            "input":"0x06bbc3af74cd2fdd82a6036dfa3c69d0cec5d35782ba56dd4be0c928c9ca1ee3a0e19c97f1c5e5784c7cd305d53a2f5249b18937e1d613eec452c74ae9c619f4",
            "v":"0x26"
         },
         "kind":"KHIPU"
      }
    ]
}

Blockchain OpenAPI Docs

API to manage Blockchain.

get  /archivist/v1alpha2/blockchain/assets/{asset_uuid}/events/{uuid}

List of Blockchain Transactions associated with an event.

Description: List of Blockchain Transactions associated with an event. If the event’s asset has a proof mechanism of khipu, this will be a list of transactions that compose the event. If the event’s asset has a proof mecahnism of simple hash, this will be a list containing one transaction, that describes the simple hash anchor transaction. If the list is empty, the event has not been anchored yet.

{
  "next_page_token": "eyJhbGciOiJSUzI1NiIsImtpZCI6InN0dW50aWR",
  "transactions": [
    {
      "khipu_details": {},
      "kind": "SIMPLE_HASH",
      "simple_hash_details": {
        "anchor_hash": "da84e5104ec02982515127adda821ffc533acf7f07bd9b5839f31239e888feea",
        "api_query": "https://app.rkvst.com/archivist/v2/assets/-/events?proof_mechanism=SIMPLE_HASH\u0026timestamp_accepted_since=2022-09-01T09:01:02Z\u0026timestamp_accepted_before=2022-10-05T10:02:03Z",
        "end_time": "2022-10-05T10:02:03Z",
        "event_count": 12000,
        "hash_schema_version": 1,
        "start_time": "2022-09-01T09:01:02Z"
      },
      "transaction": {
        "blockHash": "0xef1234567d3ca60b048b4bf67cde2195961e0bba6f70bcbea9a2c4e133e34b46",
        "blockNumber": 3,
        "from": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b",
        "gas": 314159,
        "gasPrice": "2000000000000",
        "hash": "0x9fc76417374aa880d4449a1f7f31ec597f00b1f6f3dd2d66f4c9c6c445836d8b",
        "input": "0x57cb2fc4",
        "nonce": 2,
        "r": "0x8912348621879462817634897216348712638941",
        "s": "0x1234689712638957682375682364892376487238",
        "to": "0x6295ee1b4f6dd65047762f924ecd367c17eabf8f",
        "transactionIndex": 0,
        "v": "0x26",
        "value": "123450000000000000"
      }
    }
  ]
}
Response ParameterTypeDescription
next_page_tokenstringToken to retrieve the next page of results or empty if there are none.
transactionsarray
ResponsesDescription
200A successful response.
401Returned when the user is not authenticated to the system.
403Returned when the user is not authorized to view event’s blockchain transactions.
404Returned when the asset with the id does not exist. or the event with the id does not exist
429Returned when a user exceeds their subscription’s rate limit for requests.
defaultAn unexpected error response.

get  /archivist/v1alpha2/blockchain:openapi

Get OpenAPI spec for Blockchain

Description: Get OpenAPI v2.0 spec for Blockchain

ResponsesDescription
200A successful response.
401Returned when the user is not authenticated to the system.
429Returned when a user exceeds their subscription’s rate limit for requests.
defaultAn unexpected error response.

get  /archivist/v1alpha2/blockchain:openapi-ui

Get OpenAPI UI for Blockchain

Description: Get OpenAPI v2.0 UI for Blockchain

ResponsesDescription
200A successful response.
401Returned when the user is not authenticated to the system.
429Returned when a user exceeds their subscription’s rate limit for requests.
defaultAn unexpected error response.

Edit this page on GitHub