Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@stacks/stacks-blockchain-api-types

Package Overview
Dependencies
Maintainers
8
Versions
226
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stacks/stacks-blockchain-api-types - npm Package Compare versions

Comparing version 0.62.1 to 0.63.0-beta.0

api/errors/microblock-not-found.json

8

api/address/get-address-transactions-with-transfers.example.json

@@ -21,2 +21,6 @@ {

"canonical": true,
"is_unanchored": false,
"microblock_hash": "0x590a1bb1d7bcbeafce0a9fc8f8a69e369486192d14687fe95fbe4dc1c71d49df",
"microblock_sequence": 5,
"microblock_canonical": true,
"tx_index": 1,

@@ -84,2 +88,6 @@ "tx_result": {

"canonical": true,
"is_unanchored": false,
"microblock_hash": "",
"microblock_sequence": 2147483647,
"microblock_canonical": true,
"tx_index": 2,

@@ -86,0 +94,0 @@ "tx_result": {

4

api/address/get-address-transactions.example.json

@@ -18,2 +18,6 @@ {

"canonical": true,
"is_unanchored": false,
"microblock_hash": "0x590a1bb1d7bcbeafce0a9fc8f8a69e369486192d14687fe95fbe4dc1c71d49df",
"microblock_sequence": 5,
"microblock_canonical": true,
"tx_index": 0,

@@ -20,0 +24,0 @@ "coinbase_payload": {

2

api/address/get-address-transactions.schema.json

@@ -23,3 +23,3 @@ {

"type": "object",
"oneOf": [
"anyOf": [
{

@@ -26,0 +26,0 @@ "$ref": "../../entities/mempool-transactions/transaction.schema.json"

{
"limit": 20,
"limit": 1,
"offset": 0,
"total": 3275,
"total": 21707,
"results": [
{
"canonical": true,
"height": 3275,
"hash": "0xe77ba8cf6bb7c0e4f64adc83356289ed467d31a22354907b4bb814590058430f",
"parent_block_hash": "0x75ab21ef25cbff2caa14c27d830ed7886a4d1522e1b6f9e5dc3b59ccf73ed49f",
"burn_block_time": 1594233639,
"txs": ["0x66557c219c6b0cdb40681ecf79a69f03654d88ef1910651a7db0b078f58af5ca"]
"height": 21698,
"hash": "0x9be3e38eab9c7d094fd51792383c66706838d6392e95bc05cc730b8f7520e352",
"parent_block_hash": "0x76ee36d1d6c88e56b5c0e80f0d7bc7d3492141faf1b900efb19fcd00457d4654",
"burn_block_time": 1626281749,
"burn_block_time_iso": "2021-07-14T16:55:49.000Z",
"burn_block_hash": "0x0000000000000000000ea16f8e906e85ee1cb4dff1e5424e93843b3cec8b0bcb",
"burn_block_height": 691014,
"miner_txid": "0x118f7122a69441d13e6a3dfd4c3b0f9950be25195bb8126aae7fadea1aa9185d",
"parent_microblock_hash": "0x54647c277eefe60519b407f2c897749005fdb7f831034135063b2ee43fdacb04",
"parent_microblock_sequence": 3,
"txs": [
"0x76f58b2eaff65a07a5971b241c4e71fee92ee0f9396809f911f90839f9004cac",
"0x32972d9052b068f218f6e13451f7aff937099b74bbf95fac7d9402295b1b3941",
"0x8cd30724c02a9cc1d8879a34dc136ebfdb2008420badcfb5947b92f85ebce79b",
"0xf5c1577f42d3753a508101e045dd2dc60491eb0aa552e0ecd0ad37cc697143f4",
"0x35e4c20e2838f999e0cf0b40c5fabce154c2df1912a1074150d26784c53f7a20",
"0x501eb42b82e5b7a7350b47fa143cd4e90bb46d43e4a7d22830b2bf2aa70b7922"
],
"microblocks_accepted": [
"0x54647c277eefe60519b407f2c897749005fdb7f831034135063b2ee43fdacb04",
"0xdaf61d2b355f35c94cf019af99aeb73d8e7db7301c7cd693a464ebd1cfc2228c",
"0xb9e9b308cf9621ecbf66ca7b4689fe384b9b67c4588ec827d8163ab602fb935e",
"0x754562cba6ec243f90485e97778ab472f462fd123ef5b83cc79d8759ca8875f5"
],
"microblocks_streamed": [
"0x54647c277eefe60519b407f2c897749005fdb7f831034135063b2ee43fdacb04",
"0xdaf61d2b355f35c94cf019af99aeb73d8e7db7301c7cd693a464ebd1cfc2228c",
"0xb9e9b308cf9621ecbf66ca7b4689fe384b9b67c4588ec827d8163ab602fb935e",
"0x754562cba6ec243f90485e97778ab472f462fd123ef5b83cc79d8759ca8875f5"
]
}
]
}

@@ -8,2 +8,3 @@ {

"required": ["network_identifier", "account_identifier"],
"additionalProperties": false,
"properties": {

@@ -10,0 +11,0 @@ "network_identifier": {

@@ -8,2 +8,3 @@ {

"required": ["network_identifier", "block_identifier"],
"additionalProperties": false,
"properties": {

@@ -10,0 +11,0 @@ "network_identifier": {

@@ -8,2 +8,3 @@ {

"required": ["network_identifier", "block_identifier", "transaction_identifier"],
"additionalProperties": false,
"properties": {

@@ -10,0 +11,0 @@ "network_identifier": {

@@ -8,2 +8,3 @@ {

"required": ["network_identifier", "transaction_identifier"],
"additionalProperties": false,
"properties": {

@@ -10,0 +11,0 @@ "network_identifier": {

@@ -8,2 +8,3 @@ {

"required": [],
"additionalProperties": false,
"properties": {

@@ -10,0 +11,0 @@ "metadata": {

@@ -8,2 +8,3 @@ {

"required": ["network_identifier"],
"additionalProperties": false,
"properties": {

@@ -10,0 +11,0 @@ "network_identifier": {

@@ -8,2 +8,3 @@ {

"required": ["network_identifier"],
"additionalProperties": false,
"properties": {

@@ -10,0 +11,0 @@ "network_identifier": {

@@ -16,2 +16,4 @@ {

"post_condition_mode": "deny",
"post_conditions": [],
"anchor_mode": "any",
"token_transfer": {

@@ -33,2 +35,4 @@ "recipient_address": "ST1GY25DM8RZV4X15X07THRZ2C5NMWPGQWKFGV87F",

"post_condition_mode": "deny",
"post_conditions": [],
"anchor_mode": "any",
"token_transfer": {

@@ -51,2 +55,3 @@ "recipient_address": "ST2H33S8SEY27QKEKQKR6S5PECYPKY45CQYGGQR8X",

"post_conditions": [],
"anchor_mode": "any",
"smart_contract": {

@@ -68,2 +73,3 @@ "contract_id": "ST2R1XSFXYHCSFE426HP45TTD8ZWV9XHX2SRP3XA8.test-loans-1",

"post_conditions": [],
"anchor_mode": "any",
"smart_contract": {

@@ -85,2 +91,3 @@ "contract_id": "ST1FJGMWPGM1P7N0K3N9QEPZK5H1VDC5YWTVMEAZ1.contract-hook-1598230358601",

"post_conditions": [],
"anchor_mode": "any",
"smart_contract": {

@@ -90,4 +97,41 @@ "contract_id": "ST1FJGMWPGM1P7N0K3N9QEPZK5H1VDC5YWTVMEAZ1.contract-hook-1598230054238",

}
},
{
"tx_id": "0x7402d8e52204d6c8cba7465e159e79750338c3ee31d4fe6ddef1d4d226304b65",
"nonce": 1,
"fee_rate": "227",
"sender_address": "SP1HJDP35SSMYP98CG8SHMYHMZDK0A495ZCH6ARYS",
"sponsored": false,
"post_condition_mode": "deny",
"post_conditions": [
{
"type": "stx",
"condition_code": "sent_equal_to",
"amount": "88884500",
"principal": {
"type_id": "principal_standard",
"address": "SP2J6HSSDYSTM71S0K0KK4YWRKX59JN1AD52M4B59"
}
}
],
"anchor_mode": "any",
"tx_status": "pending",
"receipt_time": 1626286631,
"receipt_time_iso": "2021-07-14T18:17:11.000Z",
"tx_type": "contract_call",
"contract_call": {
"contract_id": "SP3FBR2AGK5H9QBDH3EEN6DF8EK8JY7RX8QJ5SVTE.send-many-memo",
"function_name": "send-many",
"function_signature": "(define-public (send-many (recipients (list 200 (tuple (memo (buff 34)) (to principal) (ustx uint))))))",
"function_args": [
{
"hex": "0x0b000000010c00000003046d656d6f020000000e357a62597346716a52336d736b7102746f0516b734e97043840503dc1091661c105d32b7c5c75d047573747801000000000000000000000000054c4514",
"repr": "(list (tuple (memo 0x357a62597346716a52336d736b71) (to SP2VK9TBG8E20A0YW228PC70GBMSBFHE7BNVMKB57) (ustx u88884500)))",
"name": "recipients",
"type": "(list 200 (tuple (memo (buff 34)) (to principal) (ustx uint)))"
}
]
}
}
]
}

@@ -7,14 +7,29 @@ {

{
"tx_id": "0x5e9f3933e358df6a73fec0d47ce3e1062c20812c129f5294e6f37a8d27c051d9",
"tx_status": "success",
"tx_type": "coinbase",
"tx_id": "0x20dedbef812e44d712569224411b27324b68ab4667321a4badd5e81ba76bf0eb",
"nonce": 269,
"fee_rate": "0",
"sender_address": "ST3WCQ6S0DFT7YHF53M8JPKGDS1N1GSSR91677XF1",
"sender_address": "SPQXK10DBF5ECAM30XVE3EJA8DNZF3VE0BK4MKV",
"sponsored": false,
"post_condition_mode": "deny",
"block_hash": "0x58412b50266debd0c35b1a20348ad9c0f17e5525fb155a97033256c83c9e2491",
"block_height": 3231,
"burn_block_time": 1594230455,
"post_conditions": [],
"anchor_mode": "on_chain_only",
"is_unanchored": false,
"block_hash": "0x28a9e2749b82bdc058776781a5abd5c9a6efed38f05545a8a51152655b8e1f4b",
"parent_block_hash": "0x3789b75ccfe7f2acf85c3f069fd5b8f95f73aba5332fa618243957d1c017a2a3",
"block_height": 21709,
"burn_block_time": 1626286436,
"burn_block_time_iso": "2021-07-14T18:13:56.000Z",
"canonical": true,
"tx_index": 0,
"tx_status": "success",
"tx_result": {
"hex": "0x0703",
"repr": "(ok true)"
},
"microblock_hash": "",
"microblock_sequence": 2147483647,
"microblock_canonical": true,
"event_count": 0,
"events": [],
"tx_type": "coinbase",
"coinbase_payload": {

@@ -21,0 +36,0 @@ "data": "0x0000000000000000000000000000000000000000000000000000000000000000"

@@ -11,3 +11,20 @@ {

"miner_txid": "0xd7d56070277ccd87b42acf0c91f915dd181f9db4cf878a4e95518bc397c240cc",
"txs": ["0x66557c219c6b0cdb40681ecf79a69f03654d88ef1910651a7db0b078f58af5ca"]
"parent_microblock_hash": "0x590a1bb1d7bcbeafce0a9fc8f8a69e369486192d14687fe95fbe4dc1c71d49df",
"parent_microblock_sequence": 2,
"txs": [
"0x4262db117659d1ca9406970c8f44ffd3d8f11f8e18c591d2e3960f4070107754",
"0x383632cd3b5464dffb684082750fcfaddd1f52625bbb9f884ed8f45d2b1f0547",
"0xc99fe597e44b8bd15a50eec660c6e679a7144a5a8553d214b9d5f1406d278c22"
],
"microblocks_accepted": [
"0xce0b1a4099d3fc7d5885cc7a3baa952b6d999f9709d0683b98b843597208231c",
"0x4c0529b6448a5885991c5021bd869cc97f1692c128a98b382729dc962203c326",
"0x64968846291dfea1015228a9d4bbd60aac81378cd6774b810b08e59e6b0e7494"
],
"microblocks_streamed": [
"0xb5650ef855f7d90fc146942e85cf9fac3a8c47ec408aca02f3cf9ed7c82f6cc6",
"0xeeb9aa5741d84aa0bc5de4f2fbdeae57ae29694479475d45a67ae7bd7e2c98f3",
"0x4f4c368d5f06fdf6065c5bafd9cb37391fddc9c279cfc57be35e4bf8ee932cbd",
"0xde2fc8d99872c827f144c752c002d29f9315dfc09472a09572ac7447ae623dea"
]
}

@@ -6,3 +6,3 @@ {

"type": "object",
"required": ["canonical", "height", "hash", "parent_block_hash", "txs", "burn_block_time", "burn_block_time_iso", "burn_block_hash", "burn_block_height", "miner_txid"],
"required": ["canonical", "height", "hash", "parent_block_hash", "txs", "burn_block_time", "burn_block_time_iso", "burn_block_hash", "burn_block_height", "miner_txid", "parent_microblock_hash", "parent_microblock_sequence", "microblocks_accepted", "microblocks_streamed"],
"properties": {

@@ -45,2 +45,10 @@ "canonical": {

},
"parent_microblock_hash": {
"type": "string",
"description": "The hash of the last streamed block that precedes this block to which this block is to be appended. Not every anchored block will have a parent microblock stream. An anchored block that does not have a parent microblock stream has the parent microblock hash set to an empty string, and the parent microblock sequence number set to -1."
},
"parent_microblock_sequence": {
"type": "integer",
"description": "The hash of the last streamed block that precedes this block to which this block is to be appended. Not every anchored block will have a parent microblock stream. An anchored block that does not have a parent microblock stream has the parent microblock hash set to an empty string, and the parent microblock sequence number set to -1."
},
"txs": {

@@ -53,4 +61,20 @@ "type": "array",

}
},
"microblocks_accepted": {
"type": "array",
"description": "List of microblocks that were accepted in this anchor block. Not every anchored block will have a accepted all (or any) of the previously streamed microblocks. Microblocks that were orphaned are not included in this list.",
"items": {
"type": "string",
"description": "Microblock hash"
}
},
"microblocks_streamed": {
"type": "array",
"description": "List of microblocks that were streamed/produced by this anchor block's miner. This list only includes microblocks that were accepted in the following anchor block. Microblocks that were orphaned are not included in this list.",
"items": {
"type": "string",
"description": "Microblock hash"
}
}
}
}
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "AbstractMempoolTransaction",
"description": "Abstract transaction. This schema makes up all properties common between all Stacks 2.0 transaction types",
"type": "object",
"required": [
"tx_id",
"tx_status",
"nonce",
"fee_rate",
"sender_address",
"sponsored",
"post_condition_mode",
"receipt_time",
"receipt_time_iso"
],
"properties": {
"tx_id": {
"type": "string"
"allOf": [
{
"$ref": "../transactions/base-transaction.schema.json"
},
"tx_status": {
"type": "string",
"description": "Status of the transaction in the mempool. Can be pending in the mempool. Or dropped from the mempool from being replaced by a transaction with the same nonce but a higher fee, replaced by a transaction with the same nonce but in the canonical fork, the transaction is too expensive to include in a block, or because it became stale.",
"$ref": "./transaction-status.schema.json"
},
"tx_result": {
"type": "object",
"required": ["hex", "repr"],
{
"required": [
"tx_status",
"receipt_time",
"receipt_time_iso"
],
"additionalProperties": false,
"properties": {
"hex": {
"type": "string"
"tx_status": {
"type": "string",
"description": "Status of the transaction in the mempool. Can be pending in the mempool. Or dropped from the mempool from being replaced by a transaction with the same nonce but a higher fee, replaced by a transaction with the same nonce but in the canonical fork, the transaction is too expensive to include in a block, or because it became stale.",
"$ref": "./transaction-status.schema.json"
},
"repr": {
"type": "string"
"receipt_time": {
"type": "number",
"description": "A unix timestamp (in seconds) indicating when the transaction broadcast was received by the node."
},
"receipt_time_iso": {
"type": "string",
"description": "An ISO 8601 (YYYY-MM-DDTHH:mm:ss.sssZ) timestamp indicating when the transaction broadcast was received by the node."
}
}
},
"nonce": {
"type": "integer",
"description": "Used for ordering the transactions originating from and paying from an account. The nonce ensures that a transaction is processed at most once. The nonce counts the number of times an account's owner(s) have authorized a transaction. The first transaction from an account will have a nonce value equal to 0, the second will have a nonce value equal to 1, and so on."
},
"fee_rate": {
"type": "string",
"description": "Integer string (64-bit unsigned integer)."
},
"sender_address": {
"type": "string"
},
"sponsored": {
"type": "boolean",
"description": "Denotes whether the originating account is the same as the paying account"
},
"sponsor_address": {
"type": "string"
},
"post_condition_mode": {
"$ref": "../post-conditions/post-condition-mode.schema.json"
},
"receipt_time": {
"type": "number",
"description": "A unix timestamp (in seconds) indicating when the transaction broadcast was received by the node."
},
"receipt_time_iso": {
"type": "string",
"description": "An ISO 8601 (YYYY-MM-DDTHH:mm:ss.sssZ) timestamp indicating when the transaction broadcast was received by the node."
}
}
]
}

@@ -11,30 +11,5 @@ {

{
"type": "object",
"required": ["tx_type", "token_transfer"],
"properties": {
"tx_type": {
"type": "string",
"enum": ["token_transfer"]
},
"token_transfer": {
"type": "object",
"required": ["recipient_address", "amount", "memo"],
"additionalProperties": false,
"properties": {
"recipient_address": {
"type": "string"
},
"amount": {
"type": "string",
"description": "Integer string (64-bit unsigned integer)"
},
"memo": {
"type": "string",
"description": "Hex encoded arbitrary message, up to 34 bytes length (should try decoding to an ASCII string)"
}
}
}
}
"$ref": "../transactions/transaction-0-token-transfer-metadata.schema.json"
}
]
}

@@ -11,32 +11,5 @@ {

{
"type": "object",
"required": ["tx_type", "smart_contract"],
"properties": {
"tx_type": {
"type": "string",
"enum": ["smart_contract"]
},
"smart_contract": {
"type": "object",
"additionalProperties": false,
"required": ["contract_id", "source_code"],
"properties": {
"contract_id": {
"type": "string"
},
"source_code": {
"type": "string",
"description": "Clarity code of the smart contract being deployed"
}
}
},
"post_conditions": {
"type": "array",
"items": {
"$ref": "../post-conditions/post-condition.schema.json"
}
}
}
"$ref": "../transactions/transaction-1-smart-contract-metadata.schema.json"
}
]
}

@@ -11,32 +11,5 @@ {

{
"type": "object",
"required": ["tx_type", "contract_call", "post_conditions"],
"properties": {
"tx_type": {
"type": "string",
"enum": ["contract_call"]
},
"contract_call": {
"type": "object",
"additionalProperties": false,
"required": ["contract_id", "function_name"],
"properties": {
"contract_id": {
"type": "string"
},
"function_name": {
"type": "string",
"description": "Name of the Clarity function to be invoked"
}
}
},
"post_conditions": {
"type": "array",
"items": {
"$ref": "../post-conditions/post-condition.schema.json"
}
}
}
"$ref": "../transactions/transaction-2-contract-call-metadata.schema.json"
}
]
}

@@ -11,28 +11,5 @@ {

{
"type": "object",
"required": ["tx_type", "poison_microblock"],
"additionalProperties": false,
"properties": {
"tx_type": {
"type": "string",
"enum": ["poison_microblock"]
},
"poison_microblock": {
"type": "object",
"required": ["microblock_header_1", "microblock_header_2"],
"additionalProperties": false,
"properties": {
"microblock_header_1": {
"type": "string",
"description": "Hex encoded microblock header"
},
"microblock_header_2": {
"type": "string",
"description": "Hex encoded microblock header"
}
}
}
}
"$ref": "../transactions/transaction-3-poison-microblock-metadata.schema.json"
}
]
}

@@ -11,23 +11,5 @@ {

{
"type": "object",
"required": ["tx_type", "coinbase_payload"],
"properties": {
"tx_type": {
"type": "string",
"enum": ["coinbase"]
},
"coinbase_payload": {
"type": "object",
"additionalProperties": false,
"required": ["data"],
"properties": {
"data": {
"type": "string",
"description": "Hex encoded 32-byte scratch space for block leader's use"
}
}
}
}
"$ref": "../transactions/transaction-4-coinbase-metadata.schema.json"
}
]
}

@@ -6,3 +6,3 @@ {

"description": "Describes all transaction types on Stacks 2.0 blockchain",
"oneOf": [
"anyOf": [
{

@@ -9,0 +9,0 @@ "$ref": "./transaction-0-token-transfer.schema.json"

@@ -6,4 +6,17 @@ {

"title": "RosettaError",
"allOf": [{ "$ref": "./rosetta-error-no-details.schema.json" }],
"description": "Instead of utilizing HTTP status codes to describe node errors (which often do not have a good analog), rich errors are returned using this object. Both the code and message fields can be individually used to correctly identify an error. Implementations MUST use unique values for both fields.",
"required": ["code", "message", "retriable"],
"properties": {
"code": {
"type": "integer",
"description": "Code is a network-specific error code. If desired, this code can be equivalent to an HTTP status code."
},
"message": {
"type": "string",
"description": "Message is a network-specific error message. The message MUST NOT change for a given code. In particular, this means that any contextual information should be included in the details field."
},
"retriable": {
"type": "boolean",
"description": "An error is retriable if the same request may succeed if submitted again."
},
"details": {

@@ -10,0 +23,0 @@ "type": "object",

@@ -5,3 +5,3 @@ {

"title": "TransactionEvent",
"oneOf": [
"anyOf": [
{

@@ -8,0 +8,0 @@ "$ref": "./transaction-event-smart-contract-log.schema.json"

{
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Abstract transaction. This schema makes up all properties common between all Stacks 2.0 transaction types",
"title": "AbstractTransaction",
"description": "Anchored transaction metadata. All mined/anchored Stacks transactions have these properties.",
"type": "object",
"required": [
"tx_id",
"tx_index",
"block_hash",
"block_height",
"burn_block_time",
"burn_block_time_iso",
"canonical",
"tx_status",
"nonce",
"fee_rate",
"sender_address",
"sponsored",
"post_condition_mode",
"events",
"event_count"
],
"properties": {
"block_hash": {
"type": "string",
"description": "Hash of the blocked this transactions was associated with"
"allOf": [
{
"$ref": "./base-transaction.schema.json"
},
"block_height": {
"type": "integer",
"description": "Height of the block this transactions was associated with"
},
"burn_block_time": {
"type": "integer",
"description": "Unix timestamp (in seconds) indicating when this block was mined"
},
"burn_block_time_iso": {
"type": "string",
"description": "An ISO 8601 (YYYY-MM-DDTHH:mm:ss.sssZ) timestamp indicating when this block was mined."
},
"canonical": {
"type": "boolean",
"description": "Set to `true` if block corresponds to the canonical chain tip"
},
"tx_id": {
"type": "string",
"description": "Transaction ID"
},
"tx_index": {
"type": "integer",
"description": "Index of the transaction, indicating the order. Starts at `0` and increases with each transaction"
},
"tx_status": {
"description": "Status of the transaction. Can be included in a block with a success or aborted status. Or pending in the mempool. Or dropped from the mempool from being replaced by a transaction with the same nonce but a higher fee, replaced by a transaction with the same nonce but in the canonical fork, the transaction is too expensive to include in a block, or because it became stale.",
"$ref": "./transaction-status.schema.json"
},
"tx_result": {
"type": "object",
"required": ["hex", "repr"],
"description": "Result of the transaction. For contract calls, this will show the value returned by the call. For other transaction types, this will return a boolean indicating the success of the transaction.",
{
"required": [
"tx_index",
"block_hash",
"block_height",
"burn_block_time",
"burn_block_time_iso",
"parent_burn_block_time",
"parent_burn_block_time_iso",
"canonical",
"tx_status",
"tx_result",
"events",
"event_count",
"parent_block_hash",
"is_unanchored",
"microblock_hash",
"microblock_sequence",
"microblock_canonical"
],
"additionalProperties": false,
"properties": {
"hex": {
"block_hash": {
"type": "string",
"description": "Hex string representing the value fo the transaction result"
"description": "Hash of the blocked this transactions was associated with"
},
"repr": {
"block_height": {
"type": "integer",
"description": "Height of the block this transactions was associated with"
},
"burn_block_time": {
"type": "integer",
"description": "Unix timestamp (in seconds) indicating when this block was mined"
},
"burn_block_time_iso": {
"type": "string",
"description": "Readable string of the transaction result"
"description": "An ISO 8601 (YYYY-MM-DDTHH:mm:ss.sssZ) timestamp indicating when this block was mined."
},
"parent_burn_block_time": {
"type": "integer",
"description": "Unix timestamp (in seconds) indicating when this parent block was mined"
},
"parent_burn_block_time_iso": {
"type": "string",
"description": "An ISO 8601 (YYYY-MM-DDTHH:mm:ss.sssZ) timestamp indicating when this parent block was mined."
},
"canonical": {
"type": "boolean",
"description": "Set to `true` if block corresponds to the canonical chain tip"
},
"tx_index": {
"type": "integer",
"description": "Index of the transaction, indicating the order. Starts at `0` and increases with each transaction"
},
"tx_status": {
"description": "Status of the transaction. Can be included in a block with a success or aborted status. Or pending in the mempool. Or dropped from the mempool from being replaced by a transaction with the same nonce but a higher fee, replaced by a transaction with the same nonce but in the canonical fork, the transaction is too expensive to include in a block, or because it became stale.",
"$ref": "./transaction-status.schema.json"
},
"tx_result": {
"type": "object",
"required": ["hex", "repr"],
"description": "Result of the transaction. For contract calls, this will show the value returned by the call. For other transaction types, this will return a boolean indicating the success of the transaction.",
"additionalProperties": false,
"properties": {
"hex": {
"type": "string",
"description": "Hex string representing the value fo the transaction result"
},
"repr": {
"type": "string",
"description": "Readable string of the transaction result"
}
}
},
"event_count": {
"type": "integer",
"description": "Number of transaction events"
},
"parent_block_hash": {
"type": "string",
"description": "Hash of the previous block."
},
"is_unanchored": {
"type": "boolean",
"description": "True if the transaction is included in a microblock that has not been confirmed by an anchor block."
},
"microblock_hash": {
"type": "string",
"description": "The microblock hash that this transaction was streamed in. If the transaction was batched in an anchor block (not included within a microblock) then this value will be an empty string."
},
"microblock_sequence": {
"type": "integer",
"description": "The microblock sequence number that this transaction was streamed in. If the transaction was batched in an anchor block (not included within a microblock) then this value will be 2147483647 (0x7fffffff, the max int32 value), this value preserves logical transaction ordering on (block_height, microblock_sequence, tx_index)."
},
"microblock_canonical": {
"type": "boolean",
"description": "Set to `true` if microblock is anchored in the canonical chain tip, `false` if the transaction was orphaned in a micro-fork."
},
"events" : {
"type": "array",
"description": "List of transaction events",
"items": {
"$ref": "../transaction-events/transaction-event.schema.json"
}
}
}
},
"nonce": {
"type": "integer",
"description": "Used for ordering the transactions originating from and paying from an account. The nonce ensures that a transaction is processed at most once. The nonce counts the number of times an account's owner(s) have authorized a transaction. The first transaction from an account will have a nonce value equal to 0, the second will have a nonce value equal to 1, and so on."
},
"fee_rate": {
"type": "string",
"description": "Transaction fee as Integer string (64-bit unsigned integer)."
},
"sender_address": {
"type": "string",
"description": "Address of the transaction initiator"
},
"sponsored": {
"type": "boolean",
"description": "Denotes whether the originating account is the same as the paying account"
},
"sponsor_address": {
"type": "string"
},
"post_condition_mode": {
"$ref": "../post-conditions/post-condition-mode.schema.json"
},
"event_count":{
"type": "integer",
"description": "Number of transaction events"
},
"events" : {
"type": "array",
"description": "List of transaction events",
"items": {
"$ref": "../transaction-events/transaction-event.schema.json"
}
}
}
]
}

@@ -9,2 +9,6 @@ {

"post_condition_mode": "deny",
"is_unanchored": false,
"microblock_hash": "",
"microblock_sequence": 2147483647,
"microblock_canonical": true,
"block_hash": "0x9080f6df3e0be0d6de67569330e547346a44c8ecd30d9d76b5edd1b49e2c22f6",

@@ -11,0 +15,0 @@ "block_height": 3190,

@@ -11,30 +11,5 @@ {

{
"type": "object",
"required": ["tx_type", "token_transfer"],
"properties": {
"tx_type": {
"type": "string",
"enum": ["token_transfer"]
},
"token_transfer": {
"type": "object",
"required": ["recipient_address", "amount", "memo"],
"additionalProperties": false,
"properties": {
"recipient_address": {
"type": "string"
},
"amount": {
"type": "string",
"description": "Transfer amount as Integer string (64-bit unsigned integer)"
},
"memo": {
"type": "string",
"description": "Hex encoded arbitrary message, up to 34 bytes length (should try decoding to an ASCII string)"
}
}
}
}
"$ref": "./transaction-0-token-transfer-metadata.schema.json"
}
]
}

@@ -9,2 +9,6 @@ {

"post_condition_mode": "allow",
"is_unanchored": false,
"microblock_hash": "",
"microblock_sequence": 2147483647,
"microblock_canonical": true,
"block_hash": "0x105685d3d4f251d73b75865b192cefb111dd49f67b8970a95094dc7ecf826caa",

@@ -11,0 +15,0 @@ "block_height": 3196,

@@ -11,33 +11,5 @@ {

{
"type": "object",
"required": ["tx_type", "smart_contract"],
"properties": {
"tx_type": {
"type": "string",
"enum": ["smart_contract"]
},
"smart_contract": {
"type": "object",
"additionalProperties": false,
"required": ["contract_id", "source_code"],
"properties": {
"contract_id": {
"type": "string",
"description": "Contract identifier formatted as `<principaladdress>.<contract_name>`"
},
"source_code": {
"type": "string",
"description": "Clarity code of the smart contract being deployed"
}
}
},
"post_conditions": {
"type": "array",
"items": {
"$ref": "../post-conditions/post-condition.schema.json"
}
}
}
"$ref": "./transaction-1-smart-contract-metadata.schema.json"
}
]
}

@@ -9,2 +9,6 @@ {

"post_condition_mode": "allow",
"is_unanchored": false,
"microblock_hash": "",
"microblock_sequence": 2147483647,
"microblock_canonical": true,
"block_hash": "0x196f4bef47694eabe72e6278913fa464916ec2e3f6bbfa5abc81347379382a39",

@@ -11,0 +15,0 @@ "block_height": 3201,

@@ -11,60 +11,5 @@ {

{
"type": "object",
"required": ["tx_type", "contract_call", "post_conditions"],
"properties": {
"tx_type": {
"type": "string",
"enum": ["contract_call"]
},
"contract_call": {
"type": "object",
"additionalProperties": false,
"required": ["contract_id", "function_name", "function_signature"],
"properties": {
"contract_id": {
"type": "string",
"description": "Contract identifier formatted as `<principaladdress>.<contract_name>`"
},
"function_name": {
"type": "string",
"description": "Name of the Clarity function to be invoked"
},
"function_signature": {
"type": "string",
"description": "Function definition, including function name and type as well as parameter names and types"
},
"function_args": {
"type": "array",
"description": "List of arguments used to invoke the function",
"items": {
"type": "object",
"additionalProperties": false,
"required": ["hex", "repr", "name", "type"],
"properties": {
"hex": {
"type": "string"
},
"repr": {
"type": "string"
},
"name": {
"type": "string"
},
"type": {
"type": "string"
}
}
}
}
}
},
"post_conditions": {
"type": "array",
"items": {
"$ref": "../post-conditions/post-condition.schema.json"
}
}
}
"$ref": "./transaction-2-contract-call-metadata.schema.json"
}
]
}

@@ -11,28 +11,5 @@ {

{
"type": "object",
"required": ["tx_type", "poison_microblock"],
"additionalProperties": false,
"properties": {
"tx_type": {
"type": "string",
"enum": ["poison_microblock"]
},
"poison_microblock": {
"type": "object",
"required": ["microblock_header_1", "microblock_header_2"],
"additionalProperties": false,
"properties": {
"microblock_header_1": {
"type": "string",
"description": "Hex encoded microblock header"
},
"microblock_header_2": {
"type": "string",
"description": "Hex encoded microblock header"
}
}
}
}
"$ref": "./transaction-3-poison-microblock-metadata.schema.json"
}
]
}

@@ -9,2 +9,6 @@ {

"post_condition_mode": "deny",
"is_unanchored": false,
"microblock_hash": "",
"microblock_sequence": 2147483647,
"microblock_canonical": true,
"block_hash": "0x58412b50266debd0c35b1a20348ad9c0f17e5525fb155a97033256c83c9e2491",

@@ -11,0 +15,0 @@ "block_height": 3231,

@@ -11,23 +11,5 @@ {

{
"type": "object",
"required": ["tx_type", "coinbase_payload"],
"properties": {
"tx_type": {
"type": "string",
"enum": ["coinbase"]
},
"coinbase_payload": {
"type": "object",
"additionalProperties": false,
"required": ["data"],
"properties": {
"data": {
"type": "string",
"description": "Hex encoded 32-byte scratch space for block leader's use"
}
}
}
}
"$ref": "./transaction-4-coinbase-metadata.schema.json"
}
]
}

@@ -6,3 +6,3 @@ {

"description": "Describes all transaction types on Stacks 2.0 blockchain",
"oneOf": [
"anyOf": [
{

@@ -9,0 +9,0 @@ "$ref": "./transaction-0-token-transfer.schema.json"

@@ -23,3 +23,3 @@ {

"tx_status": {
"oneOf": [
"anyOf": [
{

@@ -26,0 +26,0 @@ "$ref": "../transactions/transaction-status.schema.json"

@@ -19,3 +19,3 @@ {

"tx_status": {
"oneOf": [
"anyOf": [
{

@@ -22,0 +22,0 @@ "$ref": "../transactions/transaction-status.schema.json"

{
"name": "@stacks/stacks-blockchain-api-types",
"version": "0.62.1",
"version": "0.63.0-beta.0",
"access": "public",
"description": "TypeScript descriptions of Stacks 2.0 blockchain API entities",
"main": "index.d.ts",
"main": "index.js",
"types": "index.d.ts",
"scripts": {

@@ -35,3 +36,3 @@ "build": "npm run generate:schemas",

"devDependencies": {
"@apidevtools/json-schema-ref-parser": "^9.0.1",
"@apidevtools/json-schema-ref-parser": "^9.0.7",
"@types/json-schema-merge-allof": "^0.6.0",

@@ -48,3 +49,3 @@ "ajv": "^6.12.2",

"json-schema-merge-allof": "^0.7.0",
"json-schema-to-typescript": "^9.1.0",
"json-schema-to-typescript": "^10.1.4",
"jsonlint-cli": "^1.0.1",

@@ -51,0 +52,0 @@ "redoc-cli": "^0.9.8",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc