mirror of
https://github.com/alexgo-io/stacks-blockchain-api.git
synced 2026-04-29 13:25:34 +08:00
docs: add schema files for rosetta construction/metadata endpoint
This commit is contained in:
committed by
Matthew Little
parent
ab4947c7bc
commit
7182ec15cb
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema",
|
||||
"$id": "http://example.com/example.json",
|
||||
"type": "object",
|
||||
"title": "RosettaConstructionMetadataRequest",
|
||||
"description": "A ConstructionMetadataRequest is utilized to get information required to construct a transaction. The Options object used to specify which metadata to return is left purposely unstructured to allow flexibility for implementers. Optionally, the request can also include an array of PublicKeys associated with the AccountIdentifiers returned in ConstructionPreprocessResponse.",
|
||||
"required": ["network_identifier", "options"],
|
||||
"properties": {
|
||||
"network_identifier": {
|
||||
"$ref": "./../../entities/rosetta/rosetta-network-identifier.schema.json"
|
||||
},
|
||||
"options": {
|
||||
"$ref": "./../../entities/rosetta/rosetta-construction-options.schema.json"
|
||||
},
|
||||
"public_keys": {
|
||||
"$ref": "./../../entities/rosetta/rosetta-public-key.schema.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema",
|
||||
"$id": "rosetta-construction-metadata-response",
|
||||
"type": "object",
|
||||
"title": "RosettaConstructionMetadataResponse",
|
||||
"description": "The ConstructionMetadataResponse returns network-specific metadata used for transaction construction. Optionally, the implementer can return the suggested fee associated with the transaction being constructed. The caller may use this info to adjust the intent of the transaction or to create a transaction with a different account that can pay the suggested fee. Suggested fee is an array in case fee payment must occur in multiple currencies.",
|
||||
"required": ["metadata"],
|
||||
"properties": {
|
||||
"metadata": {
|
||||
"type": "object",
|
||||
"required": [],
|
||||
"properties": {
|
||||
"account_sequence": {
|
||||
"type": "integer"
|
||||
},
|
||||
"recent_block_hash": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"suggested_fee": {
|
||||
"$ref": "./../../entities/rosetta/rosetta-amount.schema.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user