|
1 | 1 | import * as Crypto from '@cardano-sdk/crypto';
|
2 | 2 | import { AuxiliaryData } from './AuxiliaryData';
|
3 | 3 | import { Base64Blob, HexBlob, OpaqueString } from '@cardano-sdk/util';
|
4 |
| -import { Certificate } from './Certificate'; |
| 4 | +import { Certificate, PoolRegistrationCertificate } from './Certificate'; |
5 | 5 | import { ExUnits, Update, ValidityInterval } from './ProtocolParameters';
|
6 | 6 | import { HydratedTxIn, TxIn, TxOut } from './Utxo';
|
7 | 7 | import { Lovelace, TokenMap } from './Value';
|
@@ -36,14 +36,20 @@ export interface Withdrawal {
|
36 | 36 | quantity: Lovelace;
|
37 | 37 | }
|
38 | 38 |
|
| 39 | +export type HydratedPoolRegistrationCertificate = PoolRegistrationCertificate & { deposit?: Lovelace }; |
| 40 | + |
| 41 | +export type HydratedCertificate = |
| 42 | + | Exclude<Certificate, PoolRegistrationCertificate> |
| 43 | + | HydratedPoolRegistrationCertificate; |
| 44 | + |
39 | 45 | export interface HydratedTxBody {
|
40 | 46 | inputs: HydratedTxIn[];
|
41 | 47 | collaterals?: HydratedTxIn[];
|
42 | 48 | outputs: TxOut[];
|
43 | 49 | fee: Lovelace;
|
44 | 50 | validityInterval?: ValidityInterval;
|
45 | 51 | withdrawals?: Withdrawal[];
|
46 |
| - certificates?: Certificate[]; |
| 52 | + certificates?: HydratedCertificate[]; |
47 | 53 | mint?: TokenMap;
|
48 | 54 | scriptIntegrityHash?: Crypto.Hash32ByteBase16;
|
49 | 55 | requiredExtraSignatures?: Crypto.Ed25519KeyHashHex[];
|
@@ -80,9 +86,10 @@ export interface HydratedTxBody {
|
80 | 86 | donation?: Lovelace;
|
81 | 87 | }
|
82 | 88 |
|
83 |
| -export interface TxBody extends Omit<HydratedTxBody, 'inputs' | 'collaterals' | 'referenceInputs'> { |
84 |
| - inputs: TxIn[]; |
| 89 | +export interface TxBody extends Omit<HydratedTxBody, 'certificates' | 'inputs' | 'collaterals' | 'referenceInputs'> { |
| 90 | + certificates?: Certificate[]; |
85 | 91 | collaterals?: TxIn[];
|
| 92 | + inputs: TxIn[]; |
86 | 93 | referenceInputs?: TxIn[];
|
87 | 94 | }
|
88 | 95 |
|
|
0 commit comments