@meshsdk/core-cst 1.5.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -0
- package/dist/index.d.mts +303 -0
- package/dist/index.d.ts +303 -0
- package/dist/index.js +1481 -0
- package/dist/index.mjs +1324 -0
- package/package.json +44 -0
package/README.md
ADDED
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,303 @@
|
|
|
1
|
+
import * as _cardano_sdk_core from '@cardano-sdk/core';
|
|
2
|
+
import { Cardano, Serialization } from '@cardano-sdk/core';
|
|
3
|
+
export { _cardano_sdk_core as CardanoSDK };
|
|
4
|
+
export { Cardano, Serialization } from '@cardano-sdk/core';
|
|
5
|
+
import { PrivateKey as PrivateKey$1 } from '@stricahq/bip32ed25519';
|
|
6
|
+
export { PublicKey } from '@stricahq/bip32ed25519';
|
|
7
|
+
import * as _cardano_sdk_util from '@cardano-sdk/util';
|
|
8
|
+
import { OpaqueString } from '@cardano-sdk/util';
|
|
9
|
+
export { _cardano_sdk_util as CardanoSDKUtil };
|
|
10
|
+
import * as Crypto from '@cardano-sdk/crypto';
|
|
11
|
+
export { Crypto };
|
|
12
|
+
import { DataSignature, Data, NativeScript as NativeScript$1, PlutusScript, IMeshTxSerializer, DeserializedAddress, BuilderData, IDeserializer, IResolver, MeshTxBuilderBody, Protocol, UTxO, Asset, LanguageVersion } from '@meshsdk/common';
|
|
13
|
+
|
|
14
|
+
declare class PrivateKey extends PrivateKey$1 {
|
|
15
|
+
constructor(privKey: Buffer, extended?: Boolean);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
declare const Slot: (value: number) => Cardano.Slot;
|
|
19
|
+
type Slot = Cardano.Slot;
|
|
20
|
+
declare const Value: typeof Serialization.Value;
|
|
21
|
+
type Value = Serialization.Value;
|
|
22
|
+
type TokenMap = Cardano.TokenMap;
|
|
23
|
+
declare const Transaction: typeof Serialization.Transaction;
|
|
24
|
+
type Transaction = Serialization.Transaction;
|
|
25
|
+
declare const TransactionId: {
|
|
26
|
+
(value: string): Cardano.TransactionId;
|
|
27
|
+
fromHexBlob(value: _cardano_sdk_util.HexBlob): Cardano.TransactionId;
|
|
28
|
+
fromTxBodyCbor(bodyCbor: _cardano_sdk_core.TxBodyCBOR): Cardano.TransactionId;
|
|
29
|
+
};
|
|
30
|
+
type TransactionId = Cardano.TransactionId;
|
|
31
|
+
declare const TransactionBody: typeof Serialization.TransactionBody;
|
|
32
|
+
type TransactionBody = Serialization.TransactionBody;
|
|
33
|
+
declare const TransactionWitnessSet: typeof Serialization.TransactionWitnessSet;
|
|
34
|
+
type TransactionWitnessSet = Serialization.TransactionWitnessSet;
|
|
35
|
+
declare const TransactionUnspentOutput: typeof Serialization.TransactionUnspentOutput;
|
|
36
|
+
type TransactionUnspentOutput = Serialization.TransactionUnspentOutput;
|
|
37
|
+
declare const TransactionInput: typeof Serialization.TransactionInput;
|
|
38
|
+
type TransactionInput = Serialization.TransactionInput;
|
|
39
|
+
declare const TransactionOutput: typeof Serialization.TransactionOutput;
|
|
40
|
+
type TransactionOutput = Serialization.TransactionOutput;
|
|
41
|
+
type TransactionInputSet = Serialization.CborSet<ReturnType<TransactionInput["toCore"]>, TransactionInput>;
|
|
42
|
+
type TransactionWitnessPlutusData = Set<PlutusData>;
|
|
43
|
+
declare const PlutusData: typeof Serialization.PlutusData;
|
|
44
|
+
type PlutusData = Serialization.PlutusData;
|
|
45
|
+
declare const PlutusList: typeof Serialization.PlutusList;
|
|
46
|
+
type PlutusList = Serialization.PlutusList;
|
|
47
|
+
declare const PlutusMap: typeof Serialization.PlutusMap;
|
|
48
|
+
type PlutusMap = Serialization.PlutusMap;
|
|
49
|
+
declare const Redeemers: typeof Serialization.Redeemers;
|
|
50
|
+
type Redeemers = Serialization.Redeemers;
|
|
51
|
+
declare const Redeemer: typeof Serialization.Redeemer;
|
|
52
|
+
type Redeemer = Serialization.Redeemer;
|
|
53
|
+
declare const RedeemerPurpose: typeof Cardano.RedeemerPurpose;
|
|
54
|
+
type RedeemerPurpose = Cardano.RedeemerPurpose;
|
|
55
|
+
declare const RedeemerTag: typeof Serialization.RedeemerTag;
|
|
56
|
+
type RedeemerTag = Serialization.RedeemerTag;
|
|
57
|
+
declare const Script: typeof Serialization.Script;
|
|
58
|
+
type Script = Serialization.Script;
|
|
59
|
+
declare const PolicyId: (value: string) => Cardano.PolicyId;
|
|
60
|
+
type PolicyId = Cardano.PolicyId;
|
|
61
|
+
declare const AssetName: {
|
|
62
|
+
(value: string): Cardano.AssetName;
|
|
63
|
+
toUTF8(assetName: Cardano.AssetName, stripInvisibleCharacters?: boolean): string;
|
|
64
|
+
};
|
|
65
|
+
type AssetName = Cardano.AssetName;
|
|
66
|
+
declare const AssetId: {
|
|
67
|
+
(value: string): Cardano.AssetId;
|
|
68
|
+
getPolicyId(id: Cardano.AssetId): Cardano.PolicyId;
|
|
69
|
+
getAssetName(id: Cardano.AssetId): Cardano.AssetName;
|
|
70
|
+
fromParts(policyId: Cardano.PolicyId, assetName: Cardano.AssetName): Cardano.AssetId;
|
|
71
|
+
getAssetNameAsText(id: Cardano.AssetId): string;
|
|
72
|
+
};
|
|
73
|
+
type AssetId = Cardano.AssetId;
|
|
74
|
+
declare const ScriptHash: {
|
|
75
|
+
(value: string): Crypto.Hash28ByteBase16;
|
|
76
|
+
fromEd25519KeyHashHex(value: Crypto.Ed25519KeyHashHex): Crypto.Hash28ByteBase16;
|
|
77
|
+
};
|
|
78
|
+
type ScriptHash = Crypto.Hash28ByteBase16;
|
|
79
|
+
declare const Address: typeof Cardano.Address;
|
|
80
|
+
type Address = Cardano.Address;
|
|
81
|
+
declare const RewardAddress: typeof Cardano.RewardAddress;
|
|
82
|
+
type RewardAddress = Cardano.RewardAddress;
|
|
83
|
+
declare const AddressType: typeof Cardano.AddressType;
|
|
84
|
+
type AddressType = Cardano.AddressType;
|
|
85
|
+
declare const BaseAddress: typeof Cardano.BaseAddress;
|
|
86
|
+
type BaseAddress = Cardano.BaseAddress;
|
|
87
|
+
declare const EnterpriseAddress: typeof Cardano.EnterpriseAddress;
|
|
88
|
+
type EnterpriseAddress = Cardano.EnterpriseAddress;
|
|
89
|
+
declare const PaymentAddress: (value: string) => Cardano.PaymentAddress;
|
|
90
|
+
type PaymentAddress = Cardano.PaymentAddress;
|
|
91
|
+
declare const AssetFingerprint: {
|
|
92
|
+
(value: string): Cardano.AssetFingerprint;
|
|
93
|
+
fromParts(policyId: Cardano.PolicyId, assetName: Cardano.AssetName): Cardano.AssetFingerprint;
|
|
94
|
+
};
|
|
95
|
+
type AssetFingerprint = Cardano.AssetFingerprint;
|
|
96
|
+
declare const Credential: typeof Serialization.Credential;
|
|
97
|
+
type Credential = Serialization.Credential;
|
|
98
|
+
type CredentialCore = Cardano.Credential;
|
|
99
|
+
declare const Ed25519PublicKeyHex: (value: string) => Crypto.Ed25519PublicKeyHex;
|
|
100
|
+
type Ed25519PublicKeyHex = Crypto.Ed25519PublicKeyHex;
|
|
101
|
+
type Ed25519PrivateNormalKeyHex = OpaqueString<"Ed25519PrivateKeyHex">;
|
|
102
|
+
declare const Ed25519PrivateNormalKeyHex: (value: string) => Ed25519PrivateNormalKeyHex;
|
|
103
|
+
type Ed25519PrivateExtendedKeyHex = OpaqueString<"Ed25519PrivateKeyHex">;
|
|
104
|
+
declare const Ed25519PrivateExtendedKeyHex: (value: string) => Ed25519PrivateExtendedKeyHex;
|
|
105
|
+
declare const Ed25519KeyHash: typeof Crypto.Ed25519KeyHash;
|
|
106
|
+
type Ed25519KeyHash = Crypto.Ed25519KeyHash;
|
|
107
|
+
declare const Ed25519KeyHashHex: (value: string) => Crypto.Ed25519KeyHashHex;
|
|
108
|
+
type Ed25519KeyHashHex = Crypto.Ed25519KeyHashHex;
|
|
109
|
+
declare const Hash28ByteBase16: {
|
|
110
|
+
(value: string): Crypto.Hash28ByteBase16;
|
|
111
|
+
fromEd25519KeyHashHex(value: Crypto.Ed25519KeyHashHex): Crypto.Hash28ByteBase16;
|
|
112
|
+
};
|
|
113
|
+
type Hash28ByteBase16 = Crypto.Hash28ByteBase16;
|
|
114
|
+
declare const Hash32ByteBase16: {
|
|
115
|
+
(value: string): Crypto.Hash32ByteBase16;
|
|
116
|
+
fromHexBlob<T>(value: _cardano_sdk_util.HexBlob): T;
|
|
117
|
+
};
|
|
118
|
+
type Hash32ByteBase16 = Crypto.Hash32ByteBase16;
|
|
119
|
+
declare const CredentialType: typeof Cardano.CredentialType;
|
|
120
|
+
type CredentialType = Cardano.CredentialType;
|
|
121
|
+
declare const Certificate: typeof Serialization.Certificate;
|
|
122
|
+
type Certificate = Serialization.Certificate;
|
|
123
|
+
declare const PoolId: {
|
|
124
|
+
(value: string): Cardano.PoolId;
|
|
125
|
+
fromKeyHash(value: Crypto.Ed25519KeyHashHex): Cardano.PoolId;
|
|
126
|
+
toKeyHash(poolId: Cardano.PoolId): Crypto.Ed25519KeyHashHex;
|
|
127
|
+
};
|
|
128
|
+
type PoolId = Cardano.PoolId;
|
|
129
|
+
declare const StakeRegistration: typeof Serialization.StakeRegistration;
|
|
130
|
+
type StakeRegistration = Serialization.StakeRegistration;
|
|
131
|
+
declare const StakeDelegation: typeof Serialization.StakeDelegation;
|
|
132
|
+
type StakeDelegation = Serialization.StakeDelegation;
|
|
133
|
+
type StakeDelegationCertificate = Cardano.StakeDelegationCertificate;
|
|
134
|
+
declare const CertificateType: typeof Cardano.CertificateType;
|
|
135
|
+
type CertificateType = Cardano.CertificateType;
|
|
136
|
+
declare const VkeyWitness: typeof Serialization.VkeyWitness;
|
|
137
|
+
type VkeyWitness = Serialization.VkeyWitness;
|
|
138
|
+
declare const Ed25519SignatureHex: (value: string) => Crypto.Ed25519SignatureHex;
|
|
139
|
+
type Ed25519SignatureHex = Crypto.Ed25519SignatureHex;
|
|
140
|
+
declare const Ed25519PublicKey: typeof Crypto.Ed25519PublicKey;
|
|
141
|
+
type Ed25519PublicKey = Crypto.Ed25519PublicKey;
|
|
142
|
+
declare const Ed25519Signature: typeof Crypto.Ed25519Signature;
|
|
143
|
+
type Ed25519Signature = Crypto.Ed25519Signature;
|
|
144
|
+
declare const Bip32PrivateKey: typeof Crypto.Bip32PrivateKey;
|
|
145
|
+
type Bip32PrivateKey = Crypto.Bip32PrivateKey;
|
|
146
|
+
declare const Bip32PrivateKeyHex: (key: string) => Crypto.Bip32PrivateKeyHex;
|
|
147
|
+
type Bip32PrivateKeyHex = Crypto.Bip32PrivateKeyHex;
|
|
148
|
+
declare const PlutusLanguageVersion: typeof Cardano.PlutusLanguageVersion;
|
|
149
|
+
type PlutusLanguageVersion = Cardano.PlutusLanguageVersion;
|
|
150
|
+
declare const NativeScript: typeof Serialization.NativeScript;
|
|
151
|
+
type NativeScript = Serialization.NativeScript;
|
|
152
|
+
declare const PlutusV1Script: typeof Serialization.PlutusV1Script;
|
|
153
|
+
type PlutusV1Script = Serialization.PlutusV1Script;
|
|
154
|
+
declare const PlutusV2Script: typeof Serialization.PlutusV2Script;
|
|
155
|
+
type PlutusV2Script = Serialization.PlutusV2Script;
|
|
156
|
+
declare const PlutusV3Script: typeof Serialization.PlutusV3Script;
|
|
157
|
+
type PlutusV3Script = Serialization.PlutusV3Script;
|
|
158
|
+
declare const Costmdls: typeof Serialization.Costmdls;
|
|
159
|
+
type Costmdls = Serialization.Costmdls;
|
|
160
|
+
declare const CostModel: typeof Serialization.CostModel;
|
|
161
|
+
type CostModel = Serialization.CostModel;
|
|
162
|
+
declare const CborWriter: typeof Serialization.CborWriter;
|
|
163
|
+
type CborWriter = Serialization.CborWriter;
|
|
164
|
+
declare const ConstrPlutusData: typeof Serialization.ConstrPlutusData;
|
|
165
|
+
type ConstrPlutusData = Serialization.ConstrPlutusData;
|
|
166
|
+
declare const RewardAccount: {
|
|
167
|
+
(value: string): Cardano.RewardAccount;
|
|
168
|
+
toHash(rewardAccount: Cardano.RewardAccount): Crypto.Ed25519KeyHashHex;
|
|
169
|
+
fromCredential(credential: Cardano.Credential, networkId: Cardano.NetworkId): Cardano.RewardAccount;
|
|
170
|
+
toNetworkId(rewardAccount: Cardano.RewardAccount): Cardano.NetworkId;
|
|
171
|
+
};
|
|
172
|
+
type RewardAccount = Cardano.RewardAccount;
|
|
173
|
+
declare const Hash: typeof Serialization.Hash;
|
|
174
|
+
type Hash<T extends string> = Serialization.Hash<T>;
|
|
175
|
+
declare const DatumHash: {
|
|
176
|
+
(value: string): Crypto.Hash32ByteBase16;
|
|
177
|
+
fromHexBlob<T>(value: _cardano_sdk_util.HexBlob): T;
|
|
178
|
+
};
|
|
179
|
+
type DatumHash = Crypto.Hash32ByteBase16;
|
|
180
|
+
declare const Datum: typeof Serialization.Datum;
|
|
181
|
+
type Datum = PlutusData | DatumHash;
|
|
182
|
+
type CostModels = Cardano.CostModels;
|
|
183
|
+
type ExUnits = Serialization.ExUnits;
|
|
184
|
+
declare const ExUnits: typeof Serialization.ExUnits;
|
|
185
|
+
declare const NetworkId: typeof Cardano.NetworkId;
|
|
186
|
+
type NetworkId = Cardano.ChainId["networkId"];
|
|
187
|
+
declare const DatumKind: typeof Serialization.DatumKind;
|
|
188
|
+
declare const CborSet: typeof Serialization.CborSet;
|
|
189
|
+
type Witness = Cardano.Witness;
|
|
190
|
+
type Signatures = Cardano.Signatures;
|
|
191
|
+
type RequireAllOf = Cardano.NativeScriptKind.RequireAllOf;
|
|
192
|
+
declare const RequireAllOf = Cardano.NativeScriptKind.RequireAllOf;
|
|
193
|
+
type RequireAnyOf = Cardano.NativeScriptKind.RequireAnyOf;
|
|
194
|
+
declare const RequireAnyOf = Cardano.NativeScriptKind.RequireAnyOf;
|
|
195
|
+
type RequireNOf = Cardano.NativeScriptKind.RequireNOf;
|
|
196
|
+
declare const RequireNOf = Cardano.NativeScriptKind.RequireNOf;
|
|
197
|
+
type RequireSignature = Cardano.NativeScriptKind.RequireSignature;
|
|
198
|
+
declare const RequireSignature = Cardano.NativeScriptKind.RequireSignature;
|
|
199
|
+
type RequireTimeAfter = Cardano.NativeScriptKind.RequireTimeAfter;
|
|
200
|
+
declare const RequireTimeAfter = Cardano.NativeScriptKind.RequireTimeAfter;
|
|
201
|
+
type RequireTimeBefore = Cardano.NativeScriptKind.RequireTimeBefore;
|
|
202
|
+
declare const RequireTimeBefore = Cardano.NativeScriptKind.RequireTimeBefore;
|
|
203
|
+
type VrfVkBech32 = Cardano.VrfVkBech32;
|
|
204
|
+
declare const VrfVkBech32: {
|
|
205
|
+
(value: string): Cardano.VrfVkBech32;
|
|
206
|
+
fromHex(value: string): Cardano.VrfVkBech32;
|
|
207
|
+
};
|
|
208
|
+
type ScriptPubkey = Serialization.ScriptPubkey;
|
|
209
|
+
declare const ScriptPubkey: typeof Serialization.ScriptPubkey;
|
|
210
|
+
|
|
211
|
+
type Signer = {
|
|
212
|
+
address: Address;
|
|
213
|
+
key: PrivateKey;
|
|
214
|
+
};
|
|
215
|
+
|
|
216
|
+
declare const signData: (data: string, privateKey: PrivateKey) => DataSignature;
|
|
217
|
+
declare const checkSignature: (data: string, { key, signature }: DataSignature) => any;
|
|
218
|
+
|
|
219
|
+
declare const resolveDataHash: (data: Data) => string;
|
|
220
|
+
declare const resolveNativeScriptAddress: (script: NativeScript$1, networkId?: number) => Cardano.PaymentAddress | Cardano.RewardAccount;
|
|
221
|
+
declare const resolveNativeScriptHash: (script: NativeScript$1) => string;
|
|
222
|
+
declare const resolvePaymentKeyHash: (bech32: string) => string;
|
|
223
|
+
declare const resolvePlutusScriptAddress: (script: PlutusScript, networkId?: number) => Cardano.PaymentAddress | Cardano.RewardAccount;
|
|
224
|
+
declare const resolvePlutusScriptHash: (bech32: string) => string;
|
|
225
|
+
declare const resolvePoolId: (hash: string) => string;
|
|
226
|
+
declare const resolvePrivateKey: (words: string[]) => string;
|
|
227
|
+
declare const resolveScriptRef: (script: PlutusScript | NativeScript$1) => string;
|
|
228
|
+
declare const resolveRewardAddress: (bech32: string) => Cardano.PaymentAddress | Cardano.RewardAccount;
|
|
229
|
+
declare const resolveStakeKeyHash: (bech32: string) => string;
|
|
230
|
+
declare const resolveTxHash: (txHex: string) => Cardano.TransactionId;
|
|
231
|
+
|
|
232
|
+
declare class CardanoSDKSerializer implements IMeshTxSerializer {
|
|
233
|
+
private txBody;
|
|
234
|
+
private txWitnessSet;
|
|
235
|
+
private utxoContext;
|
|
236
|
+
private redeemerContext;
|
|
237
|
+
private scriptsProvided;
|
|
238
|
+
private datumsProvided;
|
|
239
|
+
private usedLanguages;
|
|
240
|
+
constructor();
|
|
241
|
+
serializeAddress(address: DeserializedAddress, networkId?: 0 | 1): string;
|
|
242
|
+
serializeData(data: BuilderData): string;
|
|
243
|
+
deserializer: IDeserializer;
|
|
244
|
+
resolver: IResolver;
|
|
245
|
+
serializeTxBody: (txBuilderBody: MeshTxBuilderBody, protocolParams: Protocol) => string;
|
|
246
|
+
addSigningKeys: (txHex: string, signingKeys: string[]) => string;
|
|
247
|
+
private addAllInputs;
|
|
248
|
+
private addTxIn;
|
|
249
|
+
private addScriptTxIn;
|
|
250
|
+
private addSimpleScriptTxIn;
|
|
251
|
+
private addAllCollateralInputs;
|
|
252
|
+
private addCollateralInput;
|
|
253
|
+
private buildWitnessSet;
|
|
254
|
+
private balanceTx;
|
|
255
|
+
private createDummyTx;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
declare const buildBaseAddress: (networkId: number, paymentKeyHash: Hash28ByteBase16, stakeKeyHash: Hash28ByteBase16) => BaseAddress;
|
|
259
|
+
declare const buildEnterpriseAddress: (networkId: number, paymentKeyHash: Hash28ByteBase16) => EnterpriseAddress;
|
|
260
|
+
declare const buildBip32PrivateKey: (entropy: string, password?: string) => Bip32PrivateKey;
|
|
261
|
+
declare const buildRewardAddress: (networkId: number, stakeKeyHash: Hash28ByteBase16) => RewardAddress;
|
|
262
|
+
declare const buildKeys: (entropy: string | [string, string], accountIndex: number, keyIndex?: number) => {
|
|
263
|
+
paymentKey: PrivateKey;
|
|
264
|
+
stakeKey: PrivateKey;
|
|
265
|
+
};
|
|
266
|
+
declare const buildScriptPubkey: (keyHash: Ed25519KeyHash) => NativeScript;
|
|
267
|
+
|
|
268
|
+
declare const toAddress: (bech32: string) => Address;
|
|
269
|
+
declare const toBaseAddress: (bech32: string) => BaseAddress | undefined;
|
|
270
|
+
declare const toEnterpriseAddress: (bech32: string) => EnterpriseAddress | undefined;
|
|
271
|
+
declare const toRewardAddress: (bech32: string) => RewardAddress | undefined;
|
|
272
|
+
declare const fromTxUnspentOutput: (txUnspentOutput: TransactionUnspentOutput) => UTxO;
|
|
273
|
+
declare const toTxUnspentOutput: (utxo: UTxO) => Serialization.TransactionUnspentOutput;
|
|
274
|
+
declare const addressToBech32: (address: Address) => string;
|
|
275
|
+
declare const fromValue: (value: Value) => Asset[];
|
|
276
|
+
declare const toScriptRef: (script: PlutusScript | NativeScript$1) => Script;
|
|
277
|
+
declare const fromScriptRef: (scriptRef: string) => PlutusScript | NativeScript$1 | undefined;
|
|
278
|
+
declare const fromNativeScript: (script: NativeScript) => NativeScript$1;
|
|
279
|
+
declare const toNativeScript: (script: NativeScript$1) => Serialization.NativeScript;
|
|
280
|
+
declare const toPlutusData: (data: Data) => PlutusData;
|
|
281
|
+
declare const toValue: (assets: Asset[]) => Serialization.Value;
|
|
282
|
+
|
|
283
|
+
declare const deserializeAddress: (address: string) => Address;
|
|
284
|
+
declare const deserializeEd25519KeyHash: (ed25519KeyHash: string) => Crypto.Ed25519KeyHash;
|
|
285
|
+
declare const deserializeDataHash: (dataHash: string) => DatumHash;
|
|
286
|
+
declare const deserializePlutusData: (plutusData: string) => PlutusData;
|
|
287
|
+
declare const deserializePlutusScript: (plutusScript: string, version: LanguageVersion) => PlutusV1Script | PlutusV2Script | PlutusV3Script;
|
|
288
|
+
declare const deserializeNativeScript: (nativeScript: string) => NativeScript;
|
|
289
|
+
declare const deserializeScriptHash: (scriptHash: string) => Crypto.Hash28ByteBase16;
|
|
290
|
+
declare const deserializeScriptRef: (scriptRef: string) => Script;
|
|
291
|
+
declare const deserializeTxUnspentOutput: (txUnspentOutput: string) => TransactionUnspentOutput;
|
|
292
|
+
declare const deserializeValue: (value: string) => Value;
|
|
293
|
+
declare const deserializeTx: (tx: string) => Transaction;
|
|
294
|
+
declare const deserializeTxHash: (txHash: string) => TransactionId;
|
|
295
|
+
|
|
296
|
+
declare function mergeValue(a: Value, b: Value): Value;
|
|
297
|
+
declare function negateValue(v: Value): Value;
|
|
298
|
+
declare function subValue(a: Value, b: Value): Value;
|
|
299
|
+
declare function negatives(v: Value): Value;
|
|
300
|
+
declare function assetTypes(v: Value): number;
|
|
301
|
+
declare function empty(v: Value): boolean;
|
|
302
|
+
|
|
303
|
+
export { Address, AddressType, AssetFingerprint, AssetId, AssetName, BaseAddress, Bip32PrivateKey, Bip32PrivateKeyHex, CardanoSDKSerializer, CborSet, CborWriter, Certificate, CertificateType, ConstrPlutusData, CostModel, type CostModels, Costmdls, Credential, type CredentialCore, CredentialType, Datum, DatumHash, DatumKind, Ed25519KeyHash, Ed25519KeyHashHex, Ed25519PrivateExtendedKeyHex, Ed25519PrivateNormalKeyHex, Ed25519PublicKey, Ed25519PublicKeyHex, Ed25519Signature, Ed25519SignatureHex, EnterpriseAddress, ExUnits, Hash, Hash28ByteBase16, Hash32ByteBase16, NativeScript, NetworkId, PaymentAddress, PlutusData, PlutusLanguageVersion, PlutusList, PlutusMap, PlutusV1Script, PlutusV2Script, PlutusV3Script, PolicyId, PoolId, PrivateKey, Redeemer, RedeemerPurpose, RedeemerTag, Redeemers, RequireAllOf, RequireAnyOf, RequireNOf, RequireSignature, RequireTimeAfter, RequireTimeBefore, RewardAccount, RewardAddress, Script, ScriptHash, ScriptPubkey, type Signatures, type Signer, Slot, StakeDelegation, type StakeDelegationCertificate, StakeRegistration, type TokenMap, Transaction, TransactionBody, TransactionId, TransactionInput, type TransactionInputSet, TransactionOutput, TransactionUnspentOutput, type TransactionWitnessPlutusData, TransactionWitnessSet, Value, VkeyWitness, VrfVkBech32, type Witness, addressToBech32, assetTypes, buildBaseAddress, buildBip32PrivateKey, buildEnterpriseAddress, buildKeys, buildRewardAddress, buildScriptPubkey, checkSignature, deserializeAddress, deserializeDataHash, deserializeEd25519KeyHash, deserializeNativeScript, deserializePlutusData, deserializePlutusScript, deserializeScriptHash, deserializeScriptRef, deserializeTx, deserializeTxHash, deserializeTxUnspentOutput, deserializeValue, empty, fromNativeScript, fromScriptRef, fromTxUnspentOutput, fromValue, mergeValue, negateValue, negatives, resolveDataHash, resolveNativeScriptAddress, resolveNativeScriptHash, resolvePaymentKeyHash, resolvePlutusScriptAddress, resolvePlutusScriptHash, resolvePoolId, resolvePrivateKey, resolveRewardAddress, resolveScriptRef, resolveStakeKeyHash, resolveTxHash, signData, subValue, toAddress, toBaseAddress, toEnterpriseAddress, toNativeScript, toPlutusData, toRewardAddress, toScriptRef, toTxUnspentOutput, toValue };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,303 @@
|
|
|
1
|
+
import * as _cardano_sdk_core from '@cardano-sdk/core';
|
|
2
|
+
import { Cardano, Serialization } from '@cardano-sdk/core';
|
|
3
|
+
export { _cardano_sdk_core as CardanoSDK };
|
|
4
|
+
export { Cardano, Serialization } from '@cardano-sdk/core';
|
|
5
|
+
import { PrivateKey as PrivateKey$1 } from '@stricahq/bip32ed25519';
|
|
6
|
+
export { PublicKey } from '@stricahq/bip32ed25519';
|
|
7
|
+
import * as _cardano_sdk_util from '@cardano-sdk/util';
|
|
8
|
+
import { OpaqueString } from '@cardano-sdk/util';
|
|
9
|
+
export { _cardano_sdk_util as CardanoSDKUtil };
|
|
10
|
+
import * as Crypto from '@cardano-sdk/crypto';
|
|
11
|
+
export { Crypto };
|
|
12
|
+
import { DataSignature, Data, NativeScript as NativeScript$1, PlutusScript, IMeshTxSerializer, DeserializedAddress, BuilderData, IDeserializer, IResolver, MeshTxBuilderBody, Protocol, UTxO, Asset, LanguageVersion } from '@meshsdk/common';
|
|
13
|
+
|
|
14
|
+
declare class PrivateKey extends PrivateKey$1 {
|
|
15
|
+
constructor(privKey: Buffer, extended?: Boolean);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
declare const Slot: (value: number) => Cardano.Slot;
|
|
19
|
+
type Slot = Cardano.Slot;
|
|
20
|
+
declare const Value: typeof Serialization.Value;
|
|
21
|
+
type Value = Serialization.Value;
|
|
22
|
+
type TokenMap = Cardano.TokenMap;
|
|
23
|
+
declare const Transaction: typeof Serialization.Transaction;
|
|
24
|
+
type Transaction = Serialization.Transaction;
|
|
25
|
+
declare const TransactionId: {
|
|
26
|
+
(value: string): Cardano.TransactionId;
|
|
27
|
+
fromHexBlob(value: _cardano_sdk_util.HexBlob): Cardano.TransactionId;
|
|
28
|
+
fromTxBodyCbor(bodyCbor: _cardano_sdk_core.TxBodyCBOR): Cardano.TransactionId;
|
|
29
|
+
};
|
|
30
|
+
type TransactionId = Cardano.TransactionId;
|
|
31
|
+
declare const TransactionBody: typeof Serialization.TransactionBody;
|
|
32
|
+
type TransactionBody = Serialization.TransactionBody;
|
|
33
|
+
declare const TransactionWitnessSet: typeof Serialization.TransactionWitnessSet;
|
|
34
|
+
type TransactionWitnessSet = Serialization.TransactionWitnessSet;
|
|
35
|
+
declare const TransactionUnspentOutput: typeof Serialization.TransactionUnspentOutput;
|
|
36
|
+
type TransactionUnspentOutput = Serialization.TransactionUnspentOutput;
|
|
37
|
+
declare const TransactionInput: typeof Serialization.TransactionInput;
|
|
38
|
+
type TransactionInput = Serialization.TransactionInput;
|
|
39
|
+
declare const TransactionOutput: typeof Serialization.TransactionOutput;
|
|
40
|
+
type TransactionOutput = Serialization.TransactionOutput;
|
|
41
|
+
type TransactionInputSet = Serialization.CborSet<ReturnType<TransactionInput["toCore"]>, TransactionInput>;
|
|
42
|
+
type TransactionWitnessPlutusData = Set<PlutusData>;
|
|
43
|
+
declare const PlutusData: typeof Serialization.PlutusData;
|
|
44
|
+
type PlutusData = Serialization.PlutusData;
|
|
45
|
+
declare const PlutusList: typeof Serialization.PlutusList;
|
|
46
|
+
type PlutusList = Serialization.PlutusList;
|
|
47
|
+
declare const PlutusMap: typeof Serialization.PlutusMap;
|
|
48
|
+
type PlutusMap = Serialization.PlutusMap;
|
|
49
|
+
declare const Redeemers: typeof Serialization.Redeemers;
|
|
50
|
+
type Redeemers = Serialization.Redeemers;
|
|
51
|
+
declare const Redeemer: typeof Serialization.Redeemer;
|
|
52
|
+
type Redeemer = Serialization.Redeemer;
|
|
53
|
+
declare const RedeemerPurpose: typeof Cardano.RedeemerPurpose;
|
|
54
|
+
type RedeemerPurpose = Cardano.RedeemerPurpose;
|
|
55
|
+
declare const RedeemerTag: typeof Serialization.RedeemerTag;
|
|
56
|
+
type RedeemerTag = Serialization.RedeemerTag;
|
|
57
|
+
declare const Script: typeof Serialization.Script;
|
|
58
|
+
type Script = Serialization.Script;
|
|
59
|
+
declare const PolicyId: (value: string) => Cardano.PolicyId;
|
|
60
|
+
type PolicyId = Cardano.PolicyId;
|
|
61
|
+
declare const AssetName: {
|
|
62
|
+
(value: string): Cardano.AssetName;
|
|
63
|
+
toUTF8(assetName: Cardano.AssetName, stripInvisibleCharacters?: boolean): string;
|
|
64
|
+
};
|
|
65
|
+
type AssetName = Cardano.AssetName;
|
|
66
|
+
declare const AssetId: {
|
|
67
|
+
(value: string): Cardano.AssetId;
|
|
68
|
+
getPolicyId(id: Cardano.AssetId): Cardano.PolicyId;
|
|
69
|
+
getAssetName(id: Cardano.AssetId): Cardano.AssetName;
|
|
70
|
+
fromParts(policyId: Cardano.PolicyId, assetName: Cardano.AssetName): Cardano.AssetId;
|
|
71
|
+
getAssetNameAsText(id: Cardano.AssetId): string;
|
|
72
|
+
};
|
|
73
|
+
type AssetId = Cardano.AssetId;
|
|
74
|
+
declare const ScriptHash: {
|
|
75
|
+
(value: string): Crypto.Hash28ByteBase16;
|
|
76
|
+
fromEd25519KeyHashHex(value: Crypto.Ed25519KeyHashHex): Crypto.Hash28ByteBase16;
|
|
77
|
+
};
|
|
78
|
+
type ScriptHash = Crypto.Hash28ByteBase16;
|
|
79
|
+
declare const Address: typeof Cardano.Address;
|
|
80
|
+
type Address = Cardano.Address;
|
|
81
|
+
declare const RewardAddress: typeof Cardano.RewardAddress;
|
|
82
|
+
type RewardAddress = Cardano.RewardAddress;
|
|
83
|
+
declare const AddressType: typeof Cardano.AddressType;
|
|
84
|
+
type AddressType = Cardano.AddressType;
|
|
85
|
+
declare const BaseAddress: typeof Cardano.BaseAddress;
|
|
86
|
+
type BaseAddress = Cardano.BaseAddress;
|
|
87
|
+
declare const EnterpriseAddress: typeof Cardano.EnterpriseAddress;
|
|
88
|
+
type EnterpriseAddress = Cardano.EnterpriseAddress;
|
|
89
|
+
declare const PaymentAddress: (value: string) => Cardano.PaymentAddress;
|
|
90
|
+
type PaymentAddress = Cardano.PaymentAddress;
|
|
91
|
+
declare const AssetFingerprint: {
|
|
92
|
+
(value: string): Cardano.AssetFingerprint;
|
|
93
|
+
fromParts(policyId: Cardano.PolicyId, assetName: Cardano.AssetName): Cardano.AssetFingerprint;
|
|
94
|
+
};
|
|
95
|
+
type AssetFingerprint = Cardano.AssetFingerprint;
|
|
96
|
+
declare const Credential: typeof Serialization.Credential;
|
|
97
|
+
type Credential = Serialization.Credential;
|
|
98
|
+
type CredentialCore = Cardano.Credential;
|
|
99
|
+
declare const Ed25519PublicKeyHex: (value: string) => Crypto.Ed25519PublicKeyHex;
|
|
100
|
+
type Ed25519PublicKeyHex = Crypto.Ed25519PublicKeyHex;
|
|
101
|
+
type Ed25519PrivateNormalKeyHex = OpaqueString<"Ed25519PrivateKeyHex">;
|
|
102
|
+
declare const Ed25519PrivateNormalKeyHex: (value: string) => Ed25519PrivateNormalKeyHex;
|
|
103
|
+
type Ed25519PrivateExtendedKeyHex = OpaqueString<"Ed25519PrivateKeyHex">;
|
|
104
|
+
declare const Ed25519PrivateExtendedKeyHex: (value: string) => Ed25519PrivateExtendedKeyHex;
|
|
105
|
+
declare const Ed25519KeyHash: typeof Crypto.Ed25519KeyHash;
|
|
106
|
+
type Ed25519KeyHash = Crypto.Ed25519KeyHash;
|
|
107
|
+
declare const Ed25519KeyHashHex: (value: string) => Crypto.Ed25519KeyHashHex;
|
|
108
|
+
type Ed25519KeyHashHex = Crypto.Ed25519KeyHashHex;
|
|
109
|
+
declare const Hash28ByteBase16: {
|
|
110
|
+
(value: string): Crypto.Hash28ByteBase16;
|
|
111
|
+
fromEd25519KeyHashHex(value: Crypto.Ed25519KeyHashHex): Crypto.Hash28ByteBase16;
|
|
112
|
+
};
|
|
113
|
+
type Hash28ByteBase16 = Crypto.Hash28ByteBase16;
|
|
114
|
+
declare const Hash32ByteBase16: {
|
|
115
|
+
(value: string): Crypto.Hash32ByteBase16;
|
|
116
|
+
fromHexBlob<T>(value: _cardano_sdk_util.HexBlob): T;
|
|
117
|
+
};
|
|
118
|
+
type Hash32ByteBase16 = Crypto.Hash32ByteBase16;
|
|
119
|
+
declare const CredentialType: typeof Cardano.CredentialType;
|
|
120
|
+
type CredentialType = Cardano.CredentialType;
|
|
121
|
+
declare const Certificate: typeof Serialization.Certificate;
|
|
122
|
+
type Certificate = Serialization.Certificate;
|
|
123
|
+
declare const PoolId: {
|
|
124
|
+
(value: string): Cardano.PoolId;
|
|
125
|
+
fromKeyHash(value: Crypto.Ed25519KeyHashHex): Cardano.PoolId;
|
|
126
|
+
toKeyHash(poolId: Cardano.PoolId): Crypto.Ed25519KeyHashHex;
|
|
127
|
+
};
|
|
128
|
+
type PoolId = Cardano.PoolId;
|
|
129
|
+
declare const StakeRegistration: typeof Serialization.StakeRegistration;
|
|
130
|
+
type StakeRegistration = Serialization.StakeRegistration;
|
|
131
|
+
declare const StakeDelegation: typeof Serialization.StakeDelegation;
|
|
132
|
+
type StakeDelegation = Serialization.StakeDelegation;
|
|
133
|
+
type StakeDelegationCertificate = Cardano.StakeDelegationCertificate;
|
|
134
|
+
declare const CertificateType: typeof Cardano.CertificateType;
|
|
135
|
+
type CertificateType = Cardano.CertificateType;
|
|
136
|
+
declare const VkeyWitness: typeof Serialization.VkeyWitness;
|
|
137
|
+
type VkeyWitness = Serialization.VkeyWitness;
|
|
138
|
+
declare const Ed25519SignatureHex: (value: string) => Crypto.Ed25519SignatureHex;
|
|
139
|
+
type Ed25519SignatureHex = Crypto.Ed25519SignatureHex;
|
|
140
|
+
declare const Ed25519PublicKey: typeof Crypto.Ed25519PublicKey;
|
|
141
|
+
type Ed25519PublicKey = Crypto.Ed25519PublicKey;
|
|
142
|
+
declare const Ed25519Signature: typeof Crypto.Ed25519Signature;
|
|
143
|
+
type Ed25519Signature = Crypto.Ed25519Signature;
|
|
144
|
+
declare const Bip32PrivateKey: typeof Crypto.Bip32PrivateKey;
|
|
145
|
+
type Bip32PrivateKey = Crypto.Bip32PrivateKey;
|
|
146
|
+
declare const Bip32PrivateKeyHex: (key: string) => Crypto.Bip32PrivateKeyHex;
|
|
147
|
+
type Bip32PrivateKeyHex = Crypto.Bip32PrivateKeyHex;
|
|
148
|
+
declare const PlutusLanguageVersion: typeof Cardano.PlutusLanguageVersion;
|
|
149
|
+
type PlutusLanguageVersion = Cardano.PlutusLanguageVersion;
|
|
150
|
+
declare const NativeScript: typeof Serialization.NativeScript;
|
|
151
|
+
type NativeScript = Serialization.NativeScript;
|
|
152
|
+
declare const PlutusV1Script: typeof Serialization.PlutusV1Script;
|
|
153
|
+
type PlutusV1Script = Serialization.PlutusV1Script;
|
|
154
|
+
declare const PlutusV2Script: typeof Serialization.PlutusV2Script;
|
|
155
|
+
type PlutusV2Script = Serialization.PlutusV2Script;
|
|
156
|
+
declare const PlutusV3Script: typeof Serialization.PlutusV3Script;
|
|
157
|
+
type PlutusV3Script = Serialization.PlutusV3Script;
|
|
158
|
+
declare const Costmdls: typeof Serialization.Costmdls;
|
|
159
|
+
type Costmdls = Serialization.Costmdls;
|
|
160
|
+
declare const CostModel: typeof Serialization.CostModel;
|
|
161
|
+
type CostModel = Serialization.CostModel;
|
|
162
|
+
declare const CborWriter: typeof Serialization.CborWriter;
|
|
163
|
+
type CborWriter = Serialization.CborWriter;
|
|
164
|
+
declare const ConstrPlutusData: typeof Serialization.ConstrPlutusData;
|
|
165
|
+
type ConstrPlutusData = Serialization.ConstrPlutusData;
|
|
166
|
+
declare const RewardAccount: {
|
|
167
|
+
(value: string): Cardano.RewardAccount;
|
|
168
|
+
toHash(rewardAccount: Cardano.RewardAccount): Crypto.Ed25519KeyHashHex;
|
|
169
|
+
fromCredential(credential: Cardano.Credential, networkId: Cardano.NetworkId): Cardano.RewardAccount;
|
|
170
|
+
toNetworkId(rewardAccount: Cardano.RewardAccount): Cardano.NetworkId;
|
|
171
|
+
};
|
|
172
|
+
type RewardAccount = Cardano.RewardAccount;
|
|
173
|
+
declare const Hash: typeof Serialization.Hash;
|
|
174
|
+
type Hash<T extends string> = Serialization.Hash<T>;
|
|
175
|
+
declare const DatumHash: {
|
|
176
|
+
(value: string): Crypto.Hash32ByteBase16;
|
|
177
|
+
fromHexBlob<T>(value: _cardano_sdk_util.HexBlob): T;
|
|
178
|
+
};
|
|
179
|
+
type DatumHash = Crypto.Hash32ByteBase16;
|
|
180
|
+
declare const Datum: typeof Serialization.Datum;
|
|
181
|
+
type Datum = PlutusData | DatumHash;
|
|
182
|
+
type CostModels = Cardano.CostModels;
|
|
183
|
+
type ExUnits = Serialization.ExUnits;
|
|
184
|
+
declare const ExUnits: typeof Serialization.ExUnits;
|
|
185
|
+
declare const NetworkId: typeof Cardano.NetworkId;
|
|
186
|
+
type NetworkId = Cardano.ChainId["networkId"];
|
|
187
|
+
declare const DatumKind: typeof Serialization.DatumKind;
|
|
188
|
+
declare const CborSet: typeof Serialization.CborSet;
|
|
189
|
+
type Witness = Cardano.Witness;
|
|
190
|
+
type Signatures = Cardano.Signatures;
|
|
191
|
+
type RequireAllOf = Cardano.NativeScriptKind.RequireAllOf;
|
|
192
|
+
declare const RequireAllOf = Cardano.NativeScriptKind.RequireAllOf;
|
|
193
|
+
type RequireAnyOf = Cardano.NativeScriptKind.RequireAnyOf;
|
|
194
|
+
declare const RequireAnyOf = Cardano.NativeScriptKind.RequireAnyOf;
|
|
195
|
+
type RequireNOf = Cardano.NativeScriptKind.RequireNOf;
|
|
196
|
+
declare const RequireNOf = Cardano.NativeScriptKind.RequireNOf;
|
|
197
|
+
type RequireSignature = Cardano.NativeScriptKind.RequireSignature;
|
|
198
|
+
declare const RequireSignature = Cardano.NativeScriptKind.RequireSignature;
|
|
199
|
+
type RequireTimeAfter = Cardano.NativeScriptKind.RequireTimeAfter;
|
|
200
|
+
declare const RequireTimeAfter = Cardano.NativeScriptKind.RequireTimeAfter;
|
|
201
|
+
type RequireTimeBefore = Cardano.NativeScriptKind.RequireTimeBefore;
|
|
202
|
+
declare const RequireTimeBefore = Cardano.NativeScriptKind.RequireTimeBefore;
|
|
203
|
+
type VrfVkBech32 = Cardano.VrfVkBech32;
|
|
204
|
+
declare const VrfVkBech32: {
|
|
205
|
+
(value: string): Cardano.VrfVkBech32;
|
|
206
|
+
fromHex(value: string): Cardano.VrfVkBech32;
|
|
207
|
+
};
|
|
208
|
+
type ScriptPubkey = Serialization.ScriptPubkey;
|
|
209
|
+
declare const ScriptPubkey: typeof Serialization.ScriptPubkey;
|
|
210
|
+
|
|
211
|
+
type Signer = {
|
|
212
|
+
address: Address;
|
|
213
|
+
key: PrivateKey;
|
|
214
|
+
};
|
|
215
|
+
|
|
216
|
+
declare const signData: (data: string, privateKey: PrivateKey) => DataSignature;
|
|
217
|
+
declare const checkSignature: (data: string, { key, signature }: DataSignature) => any;
|
|
218
|
+
|
|
219
|
+
declare const resolveDataHash: (data: Data) => string;
|
|
220
|
+
declare const resolveNativeScriptAddress: (script: NativeScript$1, networkId?: number) => Cardano.PaymentAddress | Cardano.RewardAccount;
|
|
221
|
+
declare const resolveNativeScriptHash: (script: NativeScript$1) => string;
|
|
222
|
+
declare const resolvePaymentKeyHash: (bech32: string) => string;
|
|
223
|
+
declare const resolvePlutusScriptAddress: (script: PlutusScript, networkId?: number) => Cardano.PaymentAddress | Cardano.RewardAccount;
|
|
224
|
+
declare const resolvePlutusScriptHash: (bech32: string) => string;
|
|
225
|
+
declare const resolvePoolId: (hash: string) => string;
|
|
226
|
+
declare const resolvePrivateKey: (words: string[]) => string;
|
|
227
|
+
declare const resolveScriptRef: (script: PlutusScript | NativeScript$1) => string;
|
|
228
|
+
declare const resolveRewardAddress: (bech32: string) => Cardano.PaymentAddress | Cardano.RewardAccount;
|
|
229
|
+
declare const resolveStakeKeyHash: (bech32: string) => string;
|
|
230
|
+
declare const resolveTxHash: (txHex: string) => Cardano.TransactionId;
|
|
231
|
+
|
|
232
|
+
declare class CardanoSDKSerializer implements IMeshTxSerializer {
|
|
233
|
+
private txBody;
|
|
234
|
+
private txWitnessSet;
|
|
235
|
+
private utxoContext;
|
|
236
|
+
private redeemerContext;
|
|
237
|
+
private scriptsProvided;
|
|
238
|
+
private datumsProvided;
|
|
239
|
+
private usedLanguages;
|
|
240
|
+
constructor();
|
|
241
|
+
serializeAddress(address: DeserializedAddress, networkId?: 0 | 1): string;
|
|
242
|
+
serializeData(data: BuilderData): string;
|
|
243
|
+
deserializer: IDeserializer;
|
|
244
|
+
resolver: IResolver;
|
|
245
|
+
serializeTxBody: (txBuilderBody: MeshTxBuilderBody, protocolParams: Protocol) => string;
|
|
246
|
+
addSigningKeys: (txHex: string, signingKeys: string[]) => string;
|
|
247
|
+
private addAllInputs;
|
|
248
|
+
private addTxIn;
|
|
249
|
+
private addScriptTxIn;
|
|
250
|
+
private addSimpleScriptTxIn;
|
|
251
|
+
private addAllCollateralInputs;
|
|
252
|
+
private addCollateralInput;
|
|
253
|
+
private buildWitnessSet;
|
|
254
|
+
private balanceTx;
|
|
255
|
+
private createDummyTx;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
declare const buildBaseAddress: (networkId: number, paymentKeyHash: Hash28ByteBase16, stakeKeyHash: Hash28ByteBase16) => BaseAddress;
|
|
259
|
+
declare const buildEnterpriseAddress: (networkId: number, paymentKeyHash: Hash28ByteBase16) => EnterpriseAddress;
|
|
260
|
+
declare const buildBip32PrivateKey: (entropy: string, password?: string) => Bip32PrivateKey;
|
|
261
|
+
declare const buildRewardAddress: (networkId: number, stakeKeyHash: Hash28ByteBase16) => RewardAddress;
|
|
262
|
+
declare const buildKeys: (entropy: string | [string, string], accountIndex: number, keyIndex?: number) => {
|
|
263
|
+
paymentKey: PrivateKey;
|
|
264
|
+
stakeKey: PrivateKey;
|
|
265
|
+
};
|
|
266
|
+
declare const buildScriptPubkey: (keyHash: Ed25519KeyHash) => NativeScript;
|
|
267
|
+
|
|
268
|
+
declare const toAddress: (bech32: string) => Address;
|
|
269
|
+
declare const toBaseAddress: (bech32: string) => BaseAddress | undefined;
|
|
270
|
+
declare const toEnterpriseAddress: (bech32: string) => EnterpriseAddress | undefined;
|
|
271
|
+
declare const toRewardAddress: (bech32: string) => RewardAddress | undefined;
|
|
272
|
+
declare const fromTxUnspentOutput: (txUnspentOutput: TransactionUnspentOutput) => UTxO;
|
|
273
|
+
declare const toTxUnspentOutput: (utxo: UTxO) => Serialization.TransactionUnspentOutput;
|
|
274
|
+
declare const addressToBech32: (address: Address) => string;
|
|
275
|
+
declare const fromValue: (value: Value) => Asset[];
|
|
276
|
+
declare const toScriptRef: (script: PlutusScript | NativeScript$1) => Script;
|
|
277
|
+
declare const fromScriptRef: (scriptRef: string) => PlutusScript | NativeScript$1 | undefined;
|
|
278
|
+
declare const fromNativeScript: (script: NativeScript) => NativeScript$1;
|
|
279
|
+
declare const toNativeScript: (script: NativeScript$1) => Serialization.NativeScript;
|
|
280
|
+
declare const toPlutusData: (data: Data) => PlutusData;
|
|
281
|
+
declare const toValue: (assets: Asset[]) => Serialization.Value;
|
|
282
|
+
|
|
283
|
+
declare const deserializeAddress: (address: string) => Address;
|
|
284
|
+
declare const deserializeEd25519KeyHash: (ed25519KeyHash: string) => Crypto.Ed25519KeyHash;
|
|
285
|
+
declare const deserializeDataHash: (dataHash: string) => DatumHash;
|
|
286
|
+
declare const deserializePlutusData: (plutusData: string) => PlutusData;
|
|
287
|
+
declare const deserializePlutusScript: (plutusScript: string, version: LanguageVersion) => PlutusV1Script | PlutusV2Script | PlutusV3Script;
|
|
288
|
+
declare const deserializeNativeScript: (nativeScript: string) => NativeScript;
|
|
289
|
+
declare const deserializeScriptHash: (scriptHash: string) => Crypto.Hash28ByteBase16;
|
|
290
|
+
declare const deserializeScriptRef: (scriptRef: string) => Script;
|
|
291
|
+
declare const deserializeTxUnspentOutput: (txUnspentOutput: string) => TransactionUnspentOutput;
|
|
292
|
+
declare const deserializeValue: (value: string) => Value;
|
|
293
|
+
declare const deserializeTx: (tx: string) => Transaction;
|
|
294
|
+
declare const deserializeTxHash: (txHash: string) => TransactionId;
|
|
295
|
+
|
|
296
|
+
declare function mergeValue(a: Value, b: Value): Value;
|
|
297
|
+
declare function negateValue(v: Value): Value;
|
|
298
|
+
declare function subValue(a: Value, b: Value): Value;
|
|
299
|
+
declare function negatives(v: Value): Value;
|
|
300
|
+
declare function assetTypes(v: Value): number;
|
|
301
|
+
declare function empty(v: Value): boolean;
|
|
302
|
+
|
|
303
|
+
export { Address, AddressType, AssetFingerprint, AssetId, AssetName, BaseAddress, Bip32PrivateKey, Bip32PrivateKeyHex, CardanoSDKSerializer, CborSet, CborWriter, Certificate, CertificateType, ConstrPlutusData, CostModel, type CostModels, Costmdls, Credential, type CredentialCore, CredentialType, Datum, DatumHash, DatumKind, Ed25519KeyHash, Ed25519KeyHashHex, Ed25519PrivateExtendedKeyHex, Ed25519PrivateNormalKeyHex, Ed25519PublicKey, Ed25519PublicKeyHex, Ed25519Signature, Ed25519SignatureHex, EnterpriseAddress, ExUnits, Hash, Hash28ByteBase16, Hash32ByteBase16, NativeScript, NetworkId, PaymentAddress, PlutusData, PlutusLanguageVersion, PlutusList, PlutusMap, PlutusV1Script, PlutusV2Script, PlutusV3Script, PolicyId, PoolId, PrivateKey, Redeemer, RedeemerPurpose, RedeemerTag, Redeemers, RequireAllOf, RequireAnyOf, RequireNOf, RequireSignature, RequireTimeAfter, RequireTimeBefore, RewardAccount, RewardAddress, Script, ScriptHash, ScriptPubkey, type Signatures, type Signer, Slot, StakeDelegation, type StakeDelegationCertificate, StakeRegistration, type TokenMap, Transaction, TransactionBody, TransactionId, TransactionInput, type TransactionInputSet, TransactionOutput, TransactionUnspentOutput, type TransactionWitnessPlutusData, TransactionWitnessSet, Value, VkeyWitness, VrfVkBech32, type Witness, addressToBech32, assetTypes, buildBaseAddress, buildBip32PrivateKey, buildEnterpriseAddress, buildKeys, buildRewardAddress, buildScriptPubkey, checkSignature, deserializeAddress, deserializeDataHash, deserializeEd25519KeyHash, deserializeNativeScript, deserializePlutusData, deserializePlutusScript, deserializeScriptHash, deserializeScriptRef, deserializeTx, deserializeTxHash, deserializeTxUnspentOutput, deserializeValue, empty, fromNativeScript, fromScriptRef, fromTxUnspentOutput, fromValue, mergeValue, negateValue, negatives, resolveDataHash, resolveNativeScriptAddress, resolveNativeScriptHash, resolvePaymentKeyHash, resolvePlutusScriptAddress, resolvePlutusScriptHash, resolvePoolId, resolvePrivateKey, resolveRewardAddress, resolveScriptRef, resolveStakeKeyHash, resolveTxHash, signData, subValue, toAddress, toBaseAddress, toEnterpriseAddress, toNativeScript, toPlutusData, toRewardAddress, toScriptRef, toTxUnspentOutput, toValue };
|