Skip to main content

Get specific data-map inside a contract

Attempt to fetch data from a contract data map. The contract is identified with Stacks Address contract_address and Contract Name contract_address in the URL path. The map is identified with [Map Name].

The key to lookup in the map is supplied via the POST body. This should be supplied as the hex string serialization of the key (which should be a Clarity value). Note, this is a JSON string atom.

In the response, data is the hex serialization of the map response. Note that map responses are Clarity option types, for non-existent values, this is a serialized none, and for all other responses, it is a serialized (some ...) object.

Path Parameters
contract_address string REQUIRED

Stacks address

contract_name string REQUIRED

Contract name

map_name string REQUIRED

Map name

Query Parameters
proof integer

Returns object without the proof field when set to 0

tip string

The Stacks chain tip to query from

Request Body REQUIRED

Hex string serialization of the lookup key (which should be a Clarity value)

string
Responses
200

Success

Schema OPTIONAL
data string

Hex-encoded string of clarity value. It is always an optional tuple.

proof string OPTIONAL

Hex-encoded string of the MARF proof for the data

400

Failed loading data map