Skip to content

Commit f23f586

Browse files
committed
fix: json schema fixes for tx_result property
1 parent 5497dae commit f23f586

File tree

2 files changed

+18
-6
lines changed

2 files changed

+18
-6
lines changed

docs/entities/transactions/abstract-transaction.schema.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,19 @@
3333
"tx_status": {
3434
"$ref": "./transaction-status.schema.json"
3535
},
36+
"tx_result": {
37+
"type": "object",
38+
"required": ["hex", "repr"],
39+
"additionalProperties": false,
40+
"properties": {
41+
"hex": {
42+
"type": "string"
43+
},
44+
"repr": {
45+
"type": "string"
46+
}
47+
}
48+
},
3649
"fee_rate": {
3750
"type": "string",
3851
"description": "Integer string (64-bit unsigned integer)."

docs/index.d.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ export interface TokenTransferTransaction {
205205
tx_id: string;
206206
tx_index?: number;
207207
tx_status: TransactionStatus;
208-
tx_result?: { // return both hex value and deserialized value
208+
tx_result?: {
209209
hex: string;
210210
repr: string;
211211
};
@@ -248,7 +248,7 @@ export interface SmartContractTransaction {
248248
tx_id: string;
249249
tx_index?: number;
250250
tx_status: TransactionStatus;
251-
tx_result?: { // return both hex value and deserialized value
251+
tx_result?: {
252252
hex: string;
253253
repr: string;
254254
};
@@ -288,7 +288,7 @@ export interface ContractCallTransaction {
288288
tx_id: string;
289289
tx_index?: number;
290290
tx_status: TransactionStatus;
291-
tx_result?: { // return both hex value and deserialized value
291+
tx_result?: {
292292
hex: string;
293293
repr: string;
294294
};
@@ -335,7 +335,7 @@ export interface PoisonMicroblockTransaction {
335335
tx_id: string;
336336
tx_index?: number;
337337
tx_status: TransactionStatus;
338-
tx_result?: { // return both hex value and deserialized value
338+
tx_result?: {
339339
hex: string;
340340
repr: string;
341341
};
@@ -376,11 +376,10 @@ export interface CoinbaseTransaction {
376376
tx_id: string;
377377
tx_index?: number;
378378
tx_status: TransactionStatus;
379-
tx_result?: { // return both hex value and deserialized value
379+
tx_result?: {
380380
hex: string;
381381
repr: string;
382382
};
383-
384383
/**
385384
* Integer string (64-bit unsigned integer).
386385
*/

0 commit comments

Comments
 (0)