getTimestamp(contract, projectID, timestampIdx)

Feature

Get information about a specific timestamp record. Note: timestampIdx is currently not returned after executing the issue function. It will be updated later.

Parameters

string contract address, string projectID, int | string timestampIdx // Indicates the order of issuing, start with 0 and increase by 1.

data of SuccessResponse

object timestamp Information

example

const contractAddress = "0x41EFb6902ADcb1214a7123b01af66b1D13b89864fca";
const projectID = "testProject";
const timestampIdx = 0;

// Note: an asynchronous request.
const timestampInfo = async () => {
    const info = await mitum.timestamp.getTimestamp(contractAddress, projectID, timestampIdx);
    console.log(info.data);
};
timestampInfo();

// output
{
    _hint: "mitum-timestamp-item-v0.0.1",
    project_id: "testProject",
    request_timestamp: 6000000,
    response_timestamp: 1719303090,
    timestamp_idx: 0,
    data: "exampleRequestDataexampleRequestDataexampleRequestData"
}

Last updated