Skip to content

Commit 271214e

Browse files
committed
Rename RawTransaction to Transaction
The latter is not an object anymore but a hex-encoded CBOR string
1 parent 61eef33 commit 271214e

File tree

2 files changed

+17
-9
lines changed

2 files changed

+17
-9
lines changed

hydra-node/json-schemas/api.yaml

+16-8
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ channels:
162162
Accepts transactions encoded as Base16 CBOR string, TextEnvelope type or JSON.
163163
payload:
164164
oneOf:
165-
- $ref: "api.yaml#/components/schemas/RawTransaction"
165+
- $ref: "api.yaml#/components/schemas/Transaction"
166166
- $ref: "api.yaml#/components/schemas/TextEnvelopeTransaction"
167167
bindings:
168168
http:
@@ -241,7 +241,7 @@ components:
241241
enum: ["NewTx"]
242242
transaction:
243243
oneOf:
244-
- $ref: "api.yaml#/components/schemas/RawTransaction"
244+
- $ref: "api.yaml#/components/schemas/Transaction"
245245
- $ref: "api.yaml#/components/schemas/TextEnvelopeTransaction"
246246

247247
Close:
@@ -602,7 +602,7 @@ components:
602602
transaction:
603603
description: Choose between output formats using the `tx-output` query parameter.
604604
oneOf:
605-
- $ref: "api.yaml#/components/schemas/RawTransaction"
605+
- $ref: "api.yaml#/components/schemas/Transaction"
606606
seq:
607607
$ref: "api.yaml#/components/schemas/SequenceNumber"
608608
timestamp:
@@ -637,7 +637,7 @@ components:
637637
transaction:
638638
description: Choose between output formats using the `tx-output` query parameter.
639639
oneOf:
640-
- $ref: "api.yaml#/components/schemas/RawTransaction"
640+
- $ref: "api.yaml#/components/schemas/Transaction"
641641
validationError:
642642
type: object
643643
properties:
@@ -1344,7 +1344,7 @@ components:
13441344
type: string
13451345
enum: ["InternalWalletError"]
13461346
tx:
1347-
$ref: "api.yaml#/components/schemas/RawTransaction"
1347+
$ref: "api.yaml#/components/schemas/Transaction"
13481348
description: |
13491349
A representation of the faulty transaction
13501350
reason:
@@ -1639,8 +1639,8 @@ components:
16391639
type: integer
16401640
minimum: 0
16411641

1642-
RawTransaction:
1643-
title: RawTransaction
1642+
Transaction:
1643+
title: Transaction
16441644
description: |
16451645
A CBOR-serialised signed Cardano transaction, encoded in base16.
16461646
type: string
@@ -1700,7 +1700,15 @@ components:
17001700
description:
17011701
type: string
17021702
cborHex:
1703-
$ref: "api.yaml#/components/schemas/RawTransaction"
1703+
$ref: "api.yaml#/components/schemas/Transaction"
1704+
1705+
TxId:
1706+
type: string
1707+
description: |
1708+
A Cardano transaction identifier. This is the hex-encoded hash of the
1709+
transaction's body.
1710+
pattern: "^[0-9a-f]{64}"
1711+
example: "8df1616d4337ede40bbad2914f12977815234b83951bcce3bfcd735aed3f63e4"
17041712

17051713
TxIn:
17061714
type: string

hydra-node/test/Hydra/Ledger/CardanoSpec.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ spec =
7373
prop "JSON encoding of Tx according to schema" $
7474
withMaxSuccess 5 $
7575
prop_validateJSONSchema @Tx "api.json" $
76-
key "components" . key "schemas" . key "RawTransaction"
76+
key "components" . key "schemas" . key "Transaction"
7777

7878
describe "applyTransactions" $ do
7979
prop "works with valid transaction" appliesValidTransaction

0 commit comments

Comments
 (0)