# IronWeaveCore

Service providing core IronWeave operations such as reading blocks, retrieving chain heads, and submitting transactions. Implemented using gRPC transcoding.

## POST /ironweave/api/core/block/read

> Retrieve a block from storage by its identifier.

```json
{"openapi":"3.0.1","info":{"title":"IronWeave Core API","version":"v3"},"tags":[{"name":"IronWeaveCore","description":"Service providing core IronWeave operations such as reading blocks,\r\nretrieving chain heads, and submitting transactions.  Implemented using gRPC transcoding."}],"paths":{"/ironweave/api/core/block/read":{"post":{"tags":["IronWeaveCore"],"summary":"Retrieve a block from storage by its identifier.","requestBody":{"description":"The request containing the block ID to read.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadBlockRequest"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadBlockResponse"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}}},"components":{"schemas":{"ReadBlockRequest":{"type":"object","properties":{"blockId":{"$ref":"#/components/schemas/Hash"}},"additionalProperties":false,"description":"ReadBlockRequest requests a specific block by its unique ID."},"Hash":{"type":"object","properties":{"hashType":{"$ref":"#/components/schemas/HashType"},"value":{"type":"string"}},"additionalProperties":false},"HashType":{"enum":["HASH_TYPE_SHA3_256"],"type":"string"},"ReadBlockResponse":{"type":"object","properties":{"result":{"$ref":"#/components/schemas/RpcResult"},"block":{"$ref":"#/components/schemas/Block"}},"additionalProperties":false,"description":"ReadBlockResponse returns the result and, on success, the requested block."},"RpcResult":{"type":"object","properties":{"success":{"type":"boolean","description":"True if the operation succeeded; false otherwise."},"resultCode":{"type":"integer","description":"Machine-readable result code for the operation outcome.","format":"int32"},"message":{"type":"string","description":"Human-readable message providing additional context or error details."}},"additionalProperties":false,"description":"RpcResult represents a standardized outcome for RPC calls."},"Block":{"type":"object","properties":{"blockId":{"$ref":"#/components/schemas/Hash"},"networkSignatures":{"type":"array","items":{"$ref":"#/components/schemas/Signature"}},"header":{"$ref":"#/components/schemas/Header"},"blockType":{"$ref":"#/components/schemas/BlockType"},"data":{"$ref":"#/components/schemas/Payload"},"primaryValidatorSignature":{"$ref":"#/components/schemas/Signature"}},"additionalProperties":false},"Signature":{"type":"object","properties":{"signatureType":{"$ref":"#/components/schemas/SignatureType"},"signerAddress":{"$ref":"#/components/schemas/Address"},"value":{"type":"string"}},"additionalProperties":false},"SignatureType":{"enum":["SIGNATURE_TYPE_ED25519"],"type":"string"},"Address":{"type":"object","properties":{"addressType":{"$ref":"#/components/schemas/AddressType"},"value":{"type":"string"}},"additionalProperties":false},"AddressType":{"enum":["ADDRESS_TYPE_EC","ADDRESS_TYPE_PQC"],"type":"string"},"Header":{"type":"object","properties":{"version":{"$ref":"#/components/schemas/HeaderVersion"},"transactionIds":{"type":"array","items":{"$ref":"#/components/schemas/UUID"}},"initiatorSignature":{"$ref":"#/components/schemas/Signature"},"participants":{"type":"array","items":{"$ref":"#/components/schemas/Participant"}},"backReferences":{"type":"array","items":{"$ref":"#/components/schemas/BackReference"}},"timestamp":{"type":"integer","format":"int64"},"category":{"$ref":"#/components/schemas/Category"},"gasLimit":{"type":"integer","format":"int64"},"nonce":{"type":"integer","format":"int64"},"gasAllocations":{"type":"array","items":{"$ref":"#/components/schemas/GasAllocation"}}},"additionalProperties":false},"HeaderVersion":{"enum":["VERSION_1"],"type":"string"},"UUID":{"type":"object","properties":{"value":{"type":"string"}},"additionalProperties":false},"Participant":{"type":"object","properties":{"address":{"$ref":"#/components/schemas/Address"},"payloadKey":{"type":"string"},"isInitiator":{"type":"boolean"}},"additionalProperties":false},"BackReference":{"type":"object","properties":{"address":{"$ref":"#/components/schemas/Address"},"sequence":{"type":"integer","format":"int64"},"blockId":{"$ref":"#/components/schemas/Hash"}},"additionalProperties":false},"Category":{"type":"object","properties":{"value":{"type":"array","items":{"type":"integer","format":"int64"}}},"additionalProperties":false},"GasAllocation":{"type":"object","properties":{"validatorAddress":{"$ref":"#/components/schemas/Address"},"gasAmount":{"type":"integer","format":"int64"},"totalGasAmount":{"type":"integer","format":"int64"}},"additionalProperties":false},"BlockType":{"enum":["BLOCK_TYPE_KNOT","BLOCK_TYPE_MERGE","BLOCK_TYPE_DIGEST","BLOCK_TYPE_GENESIS","BLOCK_TYPE_ASSIGNMENT"],"type":"string"},"Payload":{"type":"object","properties":{"type":{"type":"string"},"data":{"type":"string"},"encoding":{"type":"string"},"encryption":{"type":"string"}},"additionalProperties":false},"Status":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"$ref":"#/components/schemas/Any"}}},"additionalProperties":false},"Any":{"required":["@type"],"type":"object","properties":{"@type":{"type":"string"}},"additionalProperties":{"$ref":"#/components/schemas/Value"}}}}}
```

## POST /ironweave/api/core/chain/head/get

> Retrieve the current head of a specified chain. Optionally returns the full block.

```json
{"openapi":"3.0.1","info":{"title":"IronWeave Core API","version":"v3"},"tags":[{"name":"IronWeaveCore","description":"Service providing core IronWeave operations such as reading blocks,\r\nretrieving chain heads, and submitting transactions.  Implemented using gRPC transcoding."}],"paths":{"/ironweave/api/core/chain/head/get":{"post":{"tags":["IronWeaveCore"],"summary":"Retrieve the current head of a specified chain. Optionally returns the full block.","requestBody":{"description":"The request containing the target chain address and a flag indicating whether to return the full block.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetChainHeadRequest"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetChainHeadResponse"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}}},"components":{"schemas":{"GetChainHeadRequest":{"type":"object","properties":{"chainAddress":{"$ref":"#/components/schemas/Address"},"returnBlock":{"type":"boolean","description":"If true, include the full block in the response; otherwise return only its ID."}},"additionalProperties":false,"description":"GetChainHeadRequest requests the current head of a chain."},"Address":{"type":"object","properties":{"addressType":{"$ref":"#/components/schemas/AddressType"},"value":{"type":"string"}},"additionalProperties":false},"AddressType":{"enum":["ADDRESS_TYPE_EC","ADDRESS_TYPE_PQC"],"type":"string"},"GetChainHeadResponse":{"type":"object","properties":{"result":{"$ref":"#/components/schemas/RpcResult"},"blockId":{"$ref":"#/components/schemas/Hash"},"block":{"$ref":"#/components/schemas/Block"}},"additionalProperties":false,"description":"GetChainHeadResponse returns either the head block ID or the full head block."},"RpcResult":{"type":"object","properties":{"success":{"type":"boolean","description":"True if the operation succeeded; false otherwise."},"resultCode":{"type":"integer","description":"Machine-readable result code for the operation outcome.","format":"int32"},"message":{"type":"string","description":"Human-readable message providing additional context or error details."}},"additionalProperties":false,"description":"RpcResult represents a standardized outcome for RPC calls."},"Hash":{"type":"object","properties":{"hashType":{"$ref":"#/components/schemas/HashType"},"value":{"type":"string"}},"additionalProperties":false},"HashType":{"enum":["HASH_TYPE_SHA3_256"],"type":"string"},"Block":{"type":"object","properties":{"blockId":{"$ref":"#/components/schemas/Hash"},"networkSignatures":{"type":"array","items":{"$ref":"#/components/schemas/Signature"}},"header":{"$ref":"#/components/schemas/Header"},"blockType":{"$ref":"#/components/schemas/BlockType"},"data":{"$ref":"#/components/schemas/Payload"},"primaryValidatorSignature":{"$ref":"#/components/schemas/Signature"}},"additionalProperties":false},"Signature":{"type":"object","properties":{"signatureType":{"$ref":"#/components/schemas/SignatureType"},"signerAddress":{"$ref":"#/components/schemas/Address"},"value":{"type":"string"}},"additionalProperties":false},"SignatureType":{"enum":["SIGNATURE_TYPE_ED25519"],"type":"string"},"Header":{"type":"object","properties":{"version":{"$ref":"#/components/schemas/HeaderVersion"},"transactionIds":{"type":"array","items":{"$ref":"#/components/schemas/UUID"}},"initiatorSignature":{"$ref":"#/components/schemas/Signature"},"participants":{"type":"array","items":{"$ref":"#/components/schemas/Participant"}},"backReferences":{"type":"array","items":{"$ref":"#/components/schemas/BackReference"}},"timestamp":{"type":"integer","format":"int64"},"category":{"$ref":"#/components/schemas/Category"},"gasLimit":{"type":"integer","format":"int64"},"nonce":{"type":"integer","format":"int64"},"gasAllocations":{"type":"array","items":{"$ref":"#/components/schemas/GasAllocation"}}},"additionalProperties":false},"HeaderVersion":{"enum":["VERSION_1"],"type":"string"},"UUID":{"type":"object","properties":{"value":{"type":"string"}},"additionalProperties":false},"Participant":{"type":"object","properties":{"address":{"$ref":"#/components/schemas/Address"},"payloadKey":{"type":"string"},"isInitiator":{"type":"boolean"}},"additionalProperties":false},"BackReference":{"type":"object","properties":{"address":{"$ref":"#/components/schemas/Address"},"sequence":{"type":"integer","format":"int64"},"blockId":{"$ref":"#/components/schemas/Hash"}},"additionalProperties":false},"Category":{"type":"object","properties":{"value":{"type":"array","items":{"type":"integer","format":"int64"}}},"additionalProperties":false},"GasAllocation":{"type":"object","properties":{"validatorAddress":{"$ref":"#/components/schemas/Address"},"gasAmount":{"type":"integer","format":"int64"},"totalGasAmount":{"type":"integer","format":"int64"}},"additionalProperties":false},"BlockType":{"enum":["BLOCK_TYPE_KNOT","BLOCK_TYPE_MERGE","BLOCK_TYPE_DIGEST","BLOCK_TYPE_GENESIS","BLOCK_TYPE_ASSIGNMENT"],"type":"string"},"Payload":{"type":"object","properties":{"type":{"type":"string"},"data":{"type":"string"},"encoding":{"type":"string"},"encryption":{"type":"string"}},"additionalProperties":false},"Status":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"$ref":"#/components/schemas/Any"}}},"additionalProperties":false},"Any":{"required":["@type"],"type":"object","properties":{"@type":{"type":"string"}},"additionalProperties":{"$ref":"#/components/schemas/Value"}}}}}
```

## POST /ironweave/api/core/transaction/submit

> Submit a transaction for inclusion in a block.> \
> The transaction is simultaneously:> \
> 1\. Published to the EventStream where ConsensusService validates it based on node role:> \
> &#x20;  \- Primary nodes: validate synchronously and send PrepareRequest if valid> \
> &#x20;  \- Backup nodes: wait for PrepareRequest and validate then> \
> 2\. Broadcast to all connected remote nodes via the P2P network

```json
{"openapi":"3.0.1","info":{"title":"IronWeave Core API","version":"v3"},"tags":[{"name":"IronWeaveCore","description":"Service providing core IronWeave operations such as reading blocks,\r\nretrieving chain heads, and submitting transactions.  Implemented using gRPC transcoding."}],"paths":{"/ironweave/api/core/transaction/submit":{"post":{"tags":["IronWeaveCore"],"summary":"Submit a transaction for inclusion in a block.\r\nThe transaction is simultaneously:\r\n1. Published to the EventStream where ConsensusService validates it based on node role:\r\n   - Primary nodes: validate synchronously and send PrepareRequest if valid\r\n   - Backup nodes: wait for PrepareRequest and validate then\r\n2. Broadcast to all connected remote nodes via the P2P network","requestBody":{"description":"The request containing the serialized transaction and its signature.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitTransactionRequest"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitTransactionResponse"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}}},"components":{"schemas":{"SubmitTransactionRequest":{"type":"object","properties":{"transaction":{"type":"string","description":"Serialized Transaction message"},"signature":{"$ref":"#/components/schemas/Signature"}},"additionalProperties":false,"description":"SubmitTransactionRequest carries a transaction to be validated and included in a block."},"Signature":{"type":"object","properties":{"signatureType":{"$ref":"#/components/schemas/SignatureType"},"signerAddress":{"$ref":"#/components/schemas/Address"},"value":{"type":"string"}},"additionalProperties":false},"SignatureType":{"enum":["SIGNATURE_TYPE_ED25519"],"type":"string"},"Address":{"type":"object","properties":{"addressType":{"$ref":"#/components/schemas/AddressType"},"value":{"type":"string"}},"additionalProperties":false},"AddressType":{"enum":["ADDRESS_TYPE_EC","ADDRESS_TYPE_PQC"],"type":"string"},"SubmitTransactionResponse":{"type":"object","properties":{"result":{"$ref":"#/components/schemas/RpcResult"},"block":{"$ref":"#/components/schemas/Block"}},"additionalProperties":false,"description":"SubmitTransactionResponse returns the result and the block that includes the submitted transaction."},"RpcResult":{"type":"object","properties":{"success":{"type":"boolean","description":"True if the operation succeeded; false otherwise."},"resultCode":{"type":"integer","description":"Machine-readable result code for the operation outcome.","format":"int32"},"message":{"type":"string","description":"Human-readable message providing additional context or error details."}},"additionalProperties":false,"description":"RpcResult represents a standardized outcome for RPC calls."},"Block":{"type":"object","properties":{"blockId":{"$ref":"#/components/schemas/Hash"},"networkSignatures":{"type":"array","items":{"$ref":"#/components/schemas/Signature"}},"header":{"$ref":"#/components/schemas/Header"},"blockType":{"$ref":"#/components/schemas/BlockType"},"data":{"$ref":"#/components/schemas/Payload"},"primaryValidatorSignature":{"$ref":"#/components/schemas/Signature"}},"additionalProperties":false},"Hash":{"type":"object","properties":{"hashType":{"$ref":"#/components/schemas/HashType"},"value":{"type":"string"}},"additionalProperties":false},"HashType":{"enum":["HASH_TYPE_SHA3_256"],"type":"string"},"Header":{"type":"object","properties":{"version":{"$ref":"#/components/schemas/HeaderVersion"},"transactionIds":{"type":"array","items":{"$ref":"#/components/schemas/UUID"}},"initiatorSignature":{"$ref":"#/components/schemas/Signature"},"participants":{"type":"array","items":{"$ref":"#/components/schemas/Participant"}},"backReferences":{"type":"array","items":{"$ref":"#/components/schemas/BackReference"}},"timestamp":{"type":"integer","format":"int64"},"category":{"$ref":"#/components/schemas/Category"},"gasLimit":{"type":"integer","format":"int64"},"nonce":{"type":"integer","format":"int64"},"gasAllocations":{"type":"array","items":{"$ref":"#/components/schemas/GasAllocation"}}},"additionalProperties":false},"HeaderVersion":{"enum":["VERSION_1"],"type":"string"},"UUID":{"type":"object","properties":{"value":{"type":"string"}},"additionalProperties":false},"Participant":{"type":"object","properties":{"address":{"$ref":"#/components/schemas/Address"},"payloadKey":{"type":"string"},"isInitiator":{"type":"boolean"}},"additionalProperties":false},"BackReference":{"type":"object","properties":{"address":{"$ref":"#/components/schemas/Address"},"sequence":{"type":"integer","format":"int64"},"blockId":{"$ref":"#/components/schemas/Hash"}},"additionalProperties":false},"Category":{"type":"object","properties":{"value":{"type":"array","items":{"type":"integer","format":"int64"}}},"additionalProperties":false},"GasAllocation":{"type":"object","properties":{"validatorAddress":{"$ref":"#/components/schemas/Address"},"gasAmount":{"type":"integer","format":"int64"},"totalGasAmount":{"type":"integer","format":"int64"}},"additionalProperties":false},"BlockType":{"enum":["BLOCK_TYPE_KNOT","BLOCK_TYPE_MERGE","BLOCK_TYPE_DIGEST","BLOCK_TYPE_GENESIS","BLOCK_TYPE_ASSIGNMENT"],"type":"string"},"Payload":{"type":"object","properties":{"type":{"type":"string"},"data":{"type":"string"},"encoding":{"type":"string"},"encryption":{"type":"string"}},"additionalProperties":false},"Status":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"$ref":"#/components/schemas/Any"}}},"additionalProperties":false},"Any":{"required":["@type"],"type":"object","properties":{"@type":{"type":"string"}},"additionalProperties":{"$ref":"#/components/schemas/Value"}}}}}
```

## POST /ironweave/api/bootstrap

> Returns bootstrap information including the network ID, supported protocol versions,> \
> and a list of public API node endpoints discovered from connected peers.

```json
{"openapi":"3.0.1","info":{"title":"IronWeave Core API","version":"v3"},"tags":[{"name":"IronWeaveCore","description":"Service providing core IronWeave operations such as reading blocks,\r\nretrieving chain heads, and submitting transactions.  Implemented using gRPC transcoding."}],"paths":{"/ironweave/api/bootstrap":{"post":{"tags":["IronWeaveCore"],"summary":"Returns bootstrap information including the network ID, supported protocol versions,\r\nand a list of public API node endpoints discovered from connected peers.","requestBody":{"description":"An empty bootstrap request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BootstrapRequest"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BootstrapResponse"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}}},"components":{"schemas":{"BootstrapRequest":{"type":"object","additionalProperties":false,"description":"When requesting bootstrap addresses, the client can specify no parameters, and the node will return a list of public API nodes to connect to.\r\nIn the future, this can be extended to include additional parameters for more customized bootstrap responses."},"BootstrapResponse":{"type":"object","properties":{"network":{"type":"integer","description":"which network the node is running","format":"int64"},"supportedProtocolVersions":{"type":"array","items":{"type":"integer","format":"int32"},"description":"which version of the ironweave protocol the node supports"},"publicApiNodes":{"type":"array","items":{"$ref":"#/components/schemas/EndPoint"},"description":"List of addresses for public API nodes to connect"}},"additionalProperties":false,"description":"BootstrapResponse includes the network ID, supported protocol versions, and a list of public API nodes\r\nwill be exposed as gRPC and rest - will be a json response if using REST"},"EndPoint":{"type":"object","properties":{"address":{"type":"string","description":"address of the endpoint."},"port":{"type":"integer","description":"Port number of the endpoint.","format":"int32"}},"additionalProperties":false,"description":"internet end-point consisting of an address and port number"},"Status":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"$ref":"#/components/schemas/Any"}}},"additionalProperties":false},"Any":{"required":["@type"],"type":"object","properties":{"@type":{"type":"string"}},"additionalProperties":{"$ref":"#/components/schemas/Value"}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ironweave.io/api-reference/ironweavecore.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
