curl --request POST \
--url https://ton-mainnet.core.chainstack.com/f2a2411bce1e54a2658f2710cd7969c3/api/v2/sendBocReturnHash \
--header 'Content-Type: application/json' \
--data '
{
"boc": "te6ccgEBAgEAqwAB4YgBVbC7Hu+g3htYXzst8L5ucV76NMzeBK3URJKebN2Y1kwADRfFu/r0HxgrOp/Iml8Li5x4gR10J5XYFS8z0fMWJ6JPeUF5xNSLrSDGFIqhJqkW1SEYQF8Dw5p4dI3oaFs4LCmpoxdkfKw0AAAAGAAcAQBoQgAwwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL68="
}
'{
"ok": true,
"result": {
"@type": "<string>",
"hash": "<string>",
"@extra": "<string>"
}
}curl --request POST \
--url https://ton-mainnet.core.chainstack.com/f2a2411bce1e54a2658f2710cd7969c3/api/v2/sendBocReturnHash \
--header 'Content-Type: application/json' \
--data '
{
"boc": "te6ccgEBAgEAqwAB4YgBVbC7Hu+g3htYXzst8L5ucV76NMzeBK3URJKebN2Y1kwADRfFu/r0HxgrOp/Iml8Li5x4gR10J5XYFS8z0fMWJ6JPeUF5xNSLrSDGFIqhJqkW1SEYQF8Dw5p4dI3oaFs4LCmpoxdkfKw0AAAAGAAcAQBoQgAwwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL68="
}
'{
"ok": true,
"result": {
"@type": "<string>",
"hash": "<string>",
"@extra": "<string>"
}
}sendBocReturnHash method sends a serialized bag-of-cells (BoC) to the TON blockchain and returns the message hash. This method is similar to sendBoc but additionally returns the hash of the sent message for tracking purposes.
boc (string, required) — The serialized bag-of-cells in base64 format. This contains the signed external message to be sent to the blockchain.curl -X POST \
'https://ton-mainnet.core.chainstack.com/f2a2411bce1e54a2658f2710cd7969c3/api/v2/jsonRPC' \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "sendBocReturnHash",
"params": {
"boc": "te6ccgEBAgEAqwAB4YgBVbC7Hu+g3htYXzst8L5ucV76NMzeBK3URJKebN2Y1kwADRfFu/r0HxgrOp/Iml8Li5x4gR10J5XYFS8z0fMWJ6JPeUF5xNSLrSDGFIqhJqkW1SEYQF8Dw5p4dI3oaFs4LCmpoxdkfKw0AAAAGAAcAQBoQgAwwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL68="
}
}'
ok (boolean) — Whether the operation was successful.
result (object) — The result of the operation. Contains:
@type (string) — The type of the result, typically raw.extMessageInfo.hash (string) — The hash of the sent message. This can be used to track the transaction status.@extra (string) — Extra information about the operation.sendBocReturnHash method is preferred over sendBoc when you need to track transaction status:
curl -X 'POST' \
'https://ton-mainnet.core.chainstack.com/f2a2411bce1e54a2658f2710cd7969c3/api/v2/sendBocReturnHash' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"boc": "te6ccgEBAgEAqwAB4YgBVbC7Hu+g3htYXzst8L5ucV76NMzeBK3URJKebN2Y1kwADRfFu/r0HxgrOp/Iml8Li5x4gR10J5XYFS8z0fMWJ6JPeUF5xNSLrSDGFIqhJqkW1SEYQF8Dw5p4dI3oaFs4LCmpoxdkfKw0AAAAGAAcAQBoQgAwwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL68="
}'
The serialized bag-of-cells in base64 format
Was this page helpful?