Skip to content

Commit 105813b

Browse files
committed
hTransaction
1 parent c50759e commit 105813b

File tree

5 files changed

+16
-16
lines changed

5 files changed

+16
-16
lines changed

packages/mesh-hydra/src/hydra-provider.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import {
1919

2020
import { parseHttpError } from "./utils";
2121
import { HydraConnection } from "./hydra-connection";
22-
import { hStatus, HydraTransaction, hUTxO } from "./types";
22+
import { hStatus, hTransaction, hUTxO } from "./types";
2323
import {
2424
CommandFailed,
2525
Committed,
@@ -201,7 +201,7 @@ export class HydraProvider implements IFetcher, ISubmitter {
201201
description = "",
202202
txId?: string
203203
) {
204-
const transaction: HydraTransaction = {
204+
const transaction: hTransaction = {
205205
type: type,
206206
description: description,
207207
cborHex: cborHex,

packages/mesh-hydra/src/types/events.ts

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {
22
HydraParty,
33
HydraSnapshot,
4-
HydraTransaction,
4+
hTransaction,
55
} from "../types";
66
import { hUTxOs } from "./hUTxOs";
77
import { PostChainTx } from "./hydra-post-chain-tx";
@@ -123,7 +123,7 @@ export type HeadIsFinalized = {
123123
export type TxValid = {
124124
tag: "TxValid";
125125
headId: string;
126-
transaction: HydraTransaction;
126+
transaction: hTransaction;
127127
seq: number;
128128
timestamp: string;
129129
};
@@ -132,7 +132,7 @@ export type TxInvalid = {
132132
tag: "TxInvalid";
133133
headId: string;
134134
utxo: hUTxOs;
135-
transaction: HydraTransaction;
135+
transaction: hTransaction;
136136
validationError: { reason: string };
137137
seq: number;
138138
timestamp: string;
@@ -176,9 +176,9 @@ export type CommandFailed = {
176176
| {
177177
tag: "Abort";
178178
}
179-
| { tag: "NewTx"; transaction: HydraTransaction }
179+
| { tag: "NewTx"; transaction: hTransaction }
180180
| { tag: "GetUTxO" }
181-
| { tag: "Decommit"; decommitTx: HydraTransaction }
181+
| { tag: "Decommit"; decommitTx: hTransaction }
182182
| { tag: "Close" }
183183
| { tag: "Contest" }
184184
| { tag: "Fanout" };
@@ -199,7 +199,7 @@ export type IgnoredHeadInitializing = {
199199
export type DecommitInvalid = {
200200
tag: "DecommitInvalid";
201201
headId: string;
202-
decommitTx: HydraTransaction;
202+
decommitTx: hTransaction;
203203
decommitInvalidReason:
204204
| {
205205
tag: "DecommitTxInvalid";
@@ -212,7 +212,7 @@ export type DecommitInvalid = {
212212
export type DecommitRequested = {
213213
tag: "DecommitRequested";
214214
headId: string;
215-
decommitTx: HydraTransaction;
215+
decommitTx: hTransaction;
216216
utxoToDecommit: hUTxOs;
217217
seq: number;
218218
timestmap: string;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
export type hTransaction = {
2+
type: "Tx ConwayEra" | "Unwitnessed Tx ConwayEra" | "Witnessed Tx ConwayEra";
3+
description: string;
4+
cborHex: string;
5+
txId?: string;
6+
};

packages/mesh-hydra/src/types/hydra.ts

-7
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,3 @@ export type HydraSnapshot = {
2424
utxoToDecommit: hUTxOs;
2525
version: number;
2626
};
27-
28-
export type HydraTransaction = {
29-
type: "Tx ConwayEra" | "Unwitnessed Tx ConwayEra" | "Witnessed Tx ConwayEra";
30-
description: string;
31-
cborHex: string;
32-
txId?: string;
33-
};

packages/mesh-hydra/src/types/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ export * from "./hydra";
33
export * from "./hAssets";
44
export * from "./hReferenceScript";
55
export * from "./hStatus";
6+
export * from "./hTransaction";
67
export * from "./hUTxOs";

0 commit comments

Comments
 (0)