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’s Events 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
Depending on the type of proof mechanism used, the response will be:
Simple Hash:
{
"transactions":[
{
"transaction":{
"hash":"0x4bb529697a096b23947e13f78492d90a66e2e9d76c5feb015cd321590b00e72a",
"nonce":"402",
"blockhash":"0x9ea557196d44e6433be7676ca5bdef5f8753fa6d92bbb5e7456fe3979f84ea40",
"block_number":"861180",
"transaction_index":0,
"r":"0xcb4282065fb5c0b6c674bf7d3b7fb9ee4c49f135b02b9b1cf1c607bb3ff406a",
"s":"0x5fa50214efdbc1cf13f98bb962ddf3224f1d5ba77cb19aafac5171b6ae1e8074",
"from":"0xED3939b59D1fC93dD3158522E728Df483BC9998d",
"to":"0x4c07935361B497EBD5801E3b4D2cF29C2179069e",
"value":"0",
"gas":"500000000",
"gas_price":"0",
"input":"0xa7ea3ea7607b464c8c5d4172880146c1c303329600000000000000000000000000000000ab6e28d836193ad54e941e9ff09b27946bdc7838c46fcf91bc11026e6737afb6000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000635bc6bb00000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000000000000000002200000000000000000000000000000000000000000000000000000000000000014313937302d30312d30315430303a30303a30305a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000014323032322d31302d32385431323a31303a33355a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000003677465000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000026c74000000000000000000000000000000000000000000000000000000000000",
"v":"0xea"
},
"simple_hash_details":{
"api_query":"https://app.rkvst.io/archivist/v2/assets/-/events?order_by=SIMPLEHASHV1&proof_mechanism=SIMPLE_HASH×tamp_accepted_since=1970-01-01T00:00:00Z×tamp_accepted_before=2022-10-28T12:10:35Z",
"start_time":"1970-01-01T00:00:00Z",
"end_time":"2022-10-28T12:10:35Z",
"hash_schema_version":1,
"anchor_hash":"ab6e28d836193ad54e941e9ff09b27946bdc7838c46fcf91bc11026e6737afb6",
"event_count":6
},
"kind":"SIMPLE_HASH"
}
],
"next_page_token":""
}
Khipu:
{
"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"
}
]
}
Check out our guide for Verifying Assets and Events with Simple Hash.
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?order_by=SIMPLEHASHV1\u0026proof_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 Parameter | Type | Description |
---|---|---|
next_page_token | string | Token to retrieve the next page of results or empty if there are none. |
transactions | array |
Responses | Description |
---|---|
200 | A successful response. |
401 | Returned when the user is not authenticated to the system. |
403 | Returned when the user is not authorized to view event’s blockchain transactions. |
404 | Returned when the asset with the id does not exist. or the event with the id does not exist |
429 | Returned when a user exceeds their subscription’s rate limit for requests. |
get /archivist/v1alpha2/blockchain/assets:openapi
Get OpenAPI spec for Blockchain
Description: Get OpenAPI v2.0 spec for Blockchain
Responses | Description |
---|---|
200 | A successful response. |
401 | Returned when the user is not authenticated to the system. |
429 | Returned when a user exceeds their subscription’s rate limit for requests. |