@meshsdk/core-cst 1.9.0-beta.2 → 1.9.0-beta.4

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/dist/index.d.cts CHANGED
@@ -2,16 +2,14 @@ import { Cardano, Serialization } from '@cardano-sdk/core';
2
2
  import * as core from '@cardano-sdk/core';
3
3
  export { core as CardanoSDK };
4
4
  export { Cardano, Serialization } from '@cardano-sdk/core';
5
- import * as _cardano_sdk_util from '@cardano-sdk/util';
6
- import { OpaqueString, HexBlob } from '@cardano-sdk/util';
7
- export { _cardano_sdk_util as CardanoSDKUtil };
5
+ import { HexBlob as HexBlob$1, OpaqueString } from '@cardano-sdk/util';
6
+ import * as util from '@cardano-sdk/util';
7
+ export { util as CardanoSDKUtil };
8
8
  import * as Crypto from '@cardano-sdk/crypto';
9
9
  export { Crypto };
10
- import * as cjsBip32ed25519 from '@stricahq/bip32ed25519';
11
10
  import { DataSignature, Data, NativeScript as NativeScript$1, PlutusScript, IMeshTxSerializer, Protocol, DeserializedAddress, BuilderData, IDeserializer, IResolver, MeshTxBuilderBody, UTxO, Asset, LanguageVersion, PubKeyAddress, ScriptAddress, PlutusDataType } from '@meshsdk/common';
12
11
  import { Buffer as Buffer$1 } from 'buffer';
13
- import * as cjsCbors from '@stricahq/cbors';
14
- import * as _cardano_sdk_core_dist_cjs_Cardano from '@cardano-sdk/core/dist/cjs/Cardano';
12
+ import { CborMap, CborBytes } from '@harmoniclabs/cbor';
15
13
 
16
14
  declare const Slot: (value: number) => Cardano.Slot;
17
15
  type Slot = Cardano.Slot;
@@ -22,7 +20,7 @@ declare const Transaction: typeof Serialization.Transaction;
22
20
  type Transaction = Serialization.Transaction;
23
21
  declare const TransactionId: {
24
22
  (value: string): Cardano.TransactionId;
25
- fromHexBlob(value: _cardano_sdk_util.HexBlob): Cardano.TransactionId;
23
+ fromHexBlob(value: HexBlob$1): Cardano.TransactionId;
26
24
  };
27
25
  type TransactionId = Cardano.TransactionId;
28
26
  declare const TransactionBody: typeof Serialization.TransactionBody;
@@ -117,7 +115,7 @@ declare const Hash28ByteBase16: {
117
115
  type Hash28ByteBase16 = Crypto.Hash28ByteBase16;
118
116
  declare const Hash32ByteBase16: {
119
117
  (value: string): Crypto.Hash32ByteBase16;
120
- fromHexBlob<T>(value: _cardano_sdk_util.HexBlob): T;
118
+ fromHexBlob<T>(value: HexBlob$1): T;
121
119
  };
122
120
  type Hash32ByteBase16 = Crypto.Hash32ByteBase16;
123
121
  declare const CredentialType: typeof Cardano.CredentialType;
@@ -149,6 +147,10 @@ declare const Bip32PrivateKey: typeof Crypto.Bip32PrivateKey;
149
147
  type Bip32PrivateKey = Crypto.Bip32PrivateKey;
150
148
  declare const Bip32PrivateKeyHex: (key: string) => Crypto.Bip32PrivateKeyHex;
151
149
  type Bip32PrivateKeyHex = Crypto.Bip32PrivateKeyHex;
150
+ declare const Bip32PublicKey: typeof Crypto.Bip32PublicKey;
151
+ type Bip32PublicKey = Crypto.Bip32PublicKey;
152
+ declare const Bip32PublicKeyHex: (key: string) => Crypto.Bip32PublicKeyHex;
153
+ type Bip32PublicKeyHex = Crypto.Bip32PublicKeyHex;
152
154
  declare const PlutusLanguageVersion: typeof Cardano.PlutusLanguageVersion;
153
155
  type PlutusLanguageVersion = Cardano.PlutusLanguageVersion;
154
156
  declare const NativeScript: typeof Serialization.NativeScript;
@@ -177,7 +179,7 @@ declare const ConstrPlutusData: typeof Serialization.ConstrPlutusData;
177
179
  type ConstrPlutusData = Serialization.ConstrPlutusData;
178
180
  declare const RewardAccount: {
179
181
  (value: string): Cardano.RewardAccount;
180
- toHash(rewardAccount: Cardano.RewardAccount): Crypto.Ed25519KeyHashHex;
182
+ toHash(rewardAccount: Cardano.RewardAccount): Crypto.Hash28ByteBase16;
181
183
  fromCredential(credential: Cardano.Credential, networkId: Cardano.NetworkId): Cardano.RewardAccount;
182
184
  toNetworkId(rewardAccount: Cardano.RewardAccount): Cardano.NetworkId;
183
185
  };
@@ -186,7 +188,7 @@ declare const Hash: typeof Serialization.Hash;
186
188
  type Hash<T extends string> = Serialization.Hash<T>;
187
189
  declare const DatumHash: {
188
190
  (value: string): Crypto.Hash32ByteBase16;
189
- fromHexBlob<T>(value: _cardano_sdk_util.HexBlob): T;
191
+ fromHexBlob<T>(value: HexBlob$1): T;
190
192
  };
191
193
  type DatumHash = Crypto.Hash32ByteBase16;
192
194
  declare const Datum: typeof Serialization.Datum;
@@ -235,16 +237,31 @@ declare const DRep: typeof Serialization.DRep;
235
237
  type StakeCredentialStatus = Cardano.StakeCredentialStatus;
236
238
  declare const StakeCredentialStatus: typeof Cardano.StakeCredentialStatus;
237
239
  type Metadatum = Cardano.Metadatum;
240
+ type HexBlob = HexBlob$1;
241
+ declare const HexBlob: {
242
+ (target: string): HexBlob$1;
243
+ fromBytes(bytes: Uint8Array): HexBlob$1;
244
+ fromBase64(rawData: string): HexBlob$1;
245
+ toTypedBech32<T>(prefix: string, hexString: HexBlob$1): T;
246
+ };
247
+ type TxCBOR = Serialization.TxCBOR;
248
+ declare const TxCBOR: {
249
+ (tx: string): Serialization.TxCBOR;
250
+ serialize(tx: Cardano.Tx): Serialization.TxCBOR;
251
+ deserialize(tx: Serialization.TxCBOR): Cardano.Tx;
252
+ };
253
+ type Ed25519PrivateKey = Crypto.Ed25519PrivateKey;
254
+ declare const Ed25519PrivateKey: typeof Crypto.Ed25519PrivateKey;
238
255
  declare const computeAuxiliaryDataHash: (data: Cardano.AuxiliaryData | undefined) => Crypto.Hash32ByteBase16 | undefined;
239
256
  declare const blake2b: typeof Crypto.blake2b;
240
257
 
241
258
  type Signer = {
242
259
  address: Address;
243
- key: StricaPrivateKey;
260
+ key: Ed25519PrivateKey;
244
261
  };
245
262
 
246
263
  /** @param address - Optional Bech32 string of a stake, stake_test1, addr, or addr_test1 address. If provided, this function will validate the signer's address against this value. */
247
- declare const checkSignature: (data: string, { key, signature }: DataSignature, address?: string) => boolean;
264
+ declare const checkSignature: (data: string, { key, signature }: DataSignature, address?: string) => Promise<boolean>;
248
265
 
249
266
  declare class CoseSign1 {
250
267
  private protectedMap;
@@ -252,10 +269,10 @@ declare class CoseSign1 {
252
269
  private payload;
253
270
  private signature;
254
271
  constructor(payload: {
255
- protectedMap: Map<any, any>;
256
- unProtectedMap: Map<any, any>;
257
- payload: Buffer$1 | null;
258
- signature?: Buffer$1;
272
+ protectedMap: CborMap;
273
+ unProtectedMap: CborMap;
274
+ payload: CborBytes | null;
275
+ signature?: CborBytes;
259
276
  });
260
277
  static fromCbor(cbor: string): CoseSign1;
261
278
  createSigStructure(externalAad?: Buffer$1): Buffer$1;
@@ -306,32 +323,27 @@ declare class CardanoSDKSerializer implements IMeshTxSerializer {
306
323
  addSigningKeys: (txHex: string, signingKeys: string[]) => string;
307
324
  }
308
325
 
309
- type StricaPrivateKey = cjsBip32ed25519.PrivateKey;
310
- declare const StricaPrivateKey: typeof cjsBip32ed25519.PrivateKey;
311
- type StricaPublicKey = cjsBip32ed25519.PublicKey;
312
- declare const StricaPublicKey: typeof cjsBip32ed25519.PublicKey;
313
- type StricaBip32PrivateKey = cjsBip32ed25519.Bip32PrivateKey;
314
- declare const StricaBip32PrivateKey: typeof cjsBip32ed25519.Bip32PrivateKey;
315
- type StricaBip32PublicKey = cjsBip32ed25519.Bip32PublicKey;
316
- declare const StricaBip32PublicKey: typeof cjsBip32ed25519.Bip32PublicKey;
317
-
318
- declare const StricaEncoder: {
319
- encode: (input: any, options?: {
320
- collapseBigNumber: Boolean;
321
- }) => Buffer;
322
- };
323
- declare const StricaDecoder: typeof cjsCbors.Decoder;
324
- type StricaDecoder = cjsCbors.Decoder;
325
-
326
326
  declare const buildBaseAddress: (networkId: number, paymentKeyHash: Hash28ByteBase16, stakeKeyHash: Hash28ByteBase16) => BaseAddress;
327
327
  declare const buildEnterpriseAddress: (networkId: number, paymentKeyHash: Hash28ByteBase16) => EnterpriseAddress;
328
+ declare const clampScalar: (scalar: Buffer) => Buffer;
328
329
  declare const buildBip32PrivateKey: (entropy: string, password?: string) => Bip32PrivateKey;
329
330
  declare const buildRewardAddress: (networkId: number, stakeKeyHash: Hash28ByteBase16) => RewardAddress;
330
- declare const buildKeys: (entropy: string | [string, string], accountIndex: number, keyIndex?: number) => {
331
- paymentKey: StricaPrivateKey;
332
- stakeKey: StricaPrivateKey;
333
- dRepKey?: StricaPrivateKey;
331
+ /**
332
+ * Build a set of keys from a given private key
333
+ *
334
+ * NOTE - Must be called after `await Crypto.Ready()`
335
+ *
336
+ * @param privateKeyHex - The BIP32 private key hex to derive keys from
337
+ * @param accountIndex - The account index to derive keys for
338
+ * @param keyIndex - The key index to derive keys for
339
+ * @returns The payment and stake keys, and optionally the dRep key if a Bip32PrivateKey is provided
340
+ */
341
+ declare const buildKeys: (privateKeyHex: string | [string, string], accountIndex: number, keyIndex?: number) => {
342
+ paymentKey: Ed25519PrivateKey;
343
+ stakeKey: Ed25519PrivateKey;
344
+ dRepKey?: Ed25519PrivateKey;
334
345
  };
346
+ declare const buildEd25519PrivateKeyFromSecretKey: (secretKeyHex: string) => Crypto.Ed25519PrivateKey;
335
347
  declare const buildScriptPubkey: (keyHash: Ed25519KeyHash) => NativeScript;
336
348
  declare const buildDRepID: (dRepKey: Ed25519PublicKeyHex, networkId?: NetworkId, addressType?: AddressType) => DRepID;
337
349
 
@@ -387,7 +399,7 @@ declare const serialzeAddress: (deserializedAddress: Partial<DeserializedAddress
387
399
  declare const addrBech32ToPlutusDataHex: (bech32: string) => string;
388
400
  declare const addrBech32ToPlutusDataObj: <T>(bech32: string) => T;
389
401
  declare const serializeAddressObj: (plutusDataAddressObject: PubKeyAddress | ScriptAddress, networkId?: number) => string;
390
- declare const serializePlutusAddressToBech32: (plutusHex: string, networkId?: number) => _cardano_sdk_core_dist_cjs_Cardano.PaymentAddress | _cardano_sdk_core_dist_cjs_Cardano.RewardAccount;
402
+ declare const serializePlutusAddressToBech32: (plutusHex: string, networkId?: number) => string;
391
403
  declare const deserializeBech32Address: (bech32Addr: string) => DeserializedAddress;
392
404
  declare const deserializeAddress: (address: string) => Address;
393
405
  declare const scriptHashToBech32: (scriptHash: string, stakeCredentialHash?: string, networkId?: number, isScriptStakeCredentialHash?: boolean) => string;
@@ -395,12 +407,14 @@ declare const v2ScriptToBech32: (scriptCbor: string, stakeCredential?: string, n
395
407
  declare const scriptHashToRewardAddress: (hash: string, networkId?: number) => string;
396
408
  declare const keyHashToRewardAddress: (hash: string, networkId?: number) => string;
397
409
 
398
- declare const bytesToHex: (bytes: Uint8Array) => HexBlob;
399
- declare const hexToBytes: (hex: HexBlob) => Uint8Array;
410
+ declare const bytesToHex: (bytes: Uint8Array) => HexBlob$1;
411
+ declare const hexToBytes: (hex: HexBlob$1) => Uint8Array;
400
412
  declare const utf8ToBytes: (str: string) => Uint8Array;
401
- declare const utf8ToHex: (str: string) => HexBlob;
413
+ declare const utf8ToHex: (str: string) => HexBlob$1;
402
414
  declare const hexToBech32: (prefix: string, hex: string) => string;
403
415
 
416
+ declare const addVKeyWitnessSetToTransaction: (txHex: string, vkeyWitnessSet: string) => string;
417
+
404
418
  /**
405
419
  * MIT License
406
420
  *
@@ -446,4 +460,4 @@ declare const normalizePlutusScript: (plutusScript: string, encoding: OutputEnco
446
460
  declare const applyEncoding: (plutusScript: Uint8Array, outputEncoding: OutputEncoding) => Uint8Array;
447
461
  declare const applyParamsToScript: (rawScript: string, params: object[] | Data[], type?: PlutusDataType) => string;
448
462
 
449
- export { Address, AddressType, AssetFingerprint, AssetId, AssetName, type AuxiliaryData, AuxilliaryData, BaseAddress, Bip32PrivateKey, Bip32PrivateKeyHex, CardanoSDKSerializer, CborSet, CborWriter, CertIndex, Certificate, CertificateType, ConstrPlutusData, CoseSign1, CostModel, type CostModels, Costmdls, Credential, type CredentialCore, CredentialType, DRep, DRepID, Datum, DatumHash, DatumKind, Ed25519KeyHash, Ed25519KeyHashHex, Ed25519PrivateExtendedKeyHex, Ed25519PrivateNormalKeyHex, Ed25519PublicKey, Ed25519PublicKeyHex, Ed25519Signature, Ed25519SignatureHex, EnterpriseAddress, ExUnits, Hash, Hash28ByteBase16, Hash32ByteBase16, type Metadatum, MetadatumList, MetadatumMap, NativeScript, NetworkId, type OutputEncoding, PaymentAddress, PlutusData, PlutusDataKind, PlutusLanguageVersion, PlutusList, PlutusMap, PlutusV1Script, PlutusV2Script, PlutusV3Script, PointerAddress, PolicyId, PoolId, Redeemer, RedeemerPurpose, RedeemerTag, Redeemers, RequireAllOf, RequireAnyOf, RequireNOf, RequireSignature, RequireTimeAfter, RequireTimeBefore, RewardAccount, RewardAddress, Script, ScriptHash, ScriptPubkey, type Signatures, type Signer, Slot, StakeCredentialStatus, StakeDelegation, type StakeDelegationCertificate, StakeRegistration, StricaBip32PrivateKey, StricaBip32PrivateKey as StricaBip32PrivateKeyType, StricaBip32PublicKey, StricaBip32PublicKey as StricaBip32PublicKeyType, StricaDecoder, StricaEncoder, StricaPrivateKey, StricaPrivateKey as StricaPrivateKeyType, StricaPublicKey, StricaPublicKey as StricaPublicKeyType, type TokenMap, Transaction, TransactionBody, TransactionId, TransactionInput, type TransactionInputSet, TransactionMetadatum, TransactionOutput, TransactionUnspentOutput, type TransactionWitnessPlutusData, TransactionWitnessSet, TxIndex, Value, VkeyWitness, VrfVkBech32, type Witness, addrBech32ToPlutusDataHex, addrBech32ToPlutusDataObj, addressToBech32, applyEncoding, applyParamsToScript, assetTypes, blake2b, buildBaseAddress, buildBip32PrivateKey, buildDRepID, buildEnterpriseAddress, buildKeys, buildRewardAddress, buildScriptPubkey, bytesToHex, checkSignature, computeAuxiliaryDataHash, deserializeAddress, deserializeBech32Address, deserializeDataHash, deserializeEd25519KeyHash, deserializeNativeScript, deserializePlutusData, deserializePlutusScript, deserializeScriptHash, deserializeScriptRef, deserializeTx, deserializeTxHash, deserializeTxUnspentOutput, deserializeValue, empty, fromBuilderToPlutusData, fromJsonToPlutusData, fromNativeScript, fromPlutusDataToJson, fromScriptRef, fromTxUnspentOutput, fromValue, generateNonce, getCoseKeyFromPublicKey, getDRepIds, getPublicKeyFromCoseKey, hexToBech32, hexToBytes, keyHashToRewardAddress, mergeValue, negateValue, negatives, normalizePlutusScript, parseDatumCbor, parseInlineDatum, resolveDataHash, resolveEd25519KeyHash, resolveNativeScriptAddress, resolveNativeScriptHash, resolvePaymentKeyHash, resolvePlutusScriptAddress, resolvePlutusScriptHash, resolvePoolId, resolvePrivateKey, resolveRewardAddress, resolveScriptHashDRepId, resolveScriptRef, resolveStakeKeyHash, resolveTxHash, scriptHashToBech32, scriptHashToRewardAddress, serializeAddressObj, serializePlutusAddressToBech32, serialzeAddress, signData, subValue, toAddress, toBaseAddress, toCardanoAddress, toDRep, toEnterpriseAddress, toNativeScript, toPlutusData, toRewardAddress, toScriptRef, toTxUnspentOutput, toValue, utf8ToBytes, utf8ToHex, v2ScriptToBech32 };
463
+ export { Address, AddressType, AssetFingerprint, AssetId, AssetName, type AuxiliaryData, AuxilliaryData, BaseAddress, Bip32PrivateKey, Bip32PrivateKeyHex, Bip32PublicKey, Bip32PublicKeyHex, CardanoSDKSerializer, CborSet, CborWriter, CertIndex, Certificate, CertificateType, ConstrPlutusData, CoseSign1, CostModel, type CostModels, Costmdls, Credential, type CredentialCore, CredentialType, DRep, DRepID, Datum, DatumHash, DatumKind, Ed25519KeyHash, Ed25519KeyHashHex, Ed25519PrivateExtendedKeyHex, Ed25519PrivateKey, Ed25519PrivateNormalKeyHex, Ed25519PublicKey, Ed25519PublicKeyHex, Ed25519Signature, Ed25519SignatureHex, EnterpriseAddress, ExUnits, Hash, Hash28ByteBase16, Hash32ByteBase16, HexBlob, type Metadatum, MetadatumList, MetadatumMap, NativeScript, NetworkId, type OutputEncoding, PaymentAddress, PlutusData, PlutusDataKind, PlutusLanguageVersion, PlutusList, PlutusMap, PlutusV1Script, PlutusV2Script, PlutusV3Script, PointerAddress, PolicyId, PoolId, Redeemer, RedeemerPurpose, RedeemerTag, Redeemers, RequireAllOf, RequireAnyOf, RequireNOf, RequireSignature, RequireTimeAfter, RequireTimeBefore, RewardAccount, RewardAddress, Script, ScriptHash, ScriptPubkey, type Signatures, type Signer, Slot, StakeCredentialStatus, StakeDelegation, type StakeDelegationCertificate, StakeRegistration, type TokenMap, Transaction, TransactionBody, TransactionId, TransactionInput, type TransactionInputSet, TransactionMetadatum, TransactionOutput, TransactionUnspentOutput, type TransactionWitnessPlutusData, TransactionWitnessSet, TxCBOR, TxIndex, Value, VkeyWitness, VrfVkBech32, type Witness, addVKeyWitnessSetToTransaction, addrBech32ToPlutusDataHex, addrBech32ToPlutusDataObj, addressToBech32, applyEncoding, applyParamsToScript, assetTypes, blake2b, buildBaseAddress, buildBip32PrivateKey, buildDRepID, buildEd25519PrivateKeyFromSecretKey, buildEnterpriseAddress, buildKeys, buildRewardAddress, buildScriptPubkey, bytesToHex, checkSignature, clampScalar, computeAuxiliaryDataHash, deserializeAddress, deserializeBech32Address, deserializeDataHash, deserializeEd25519KeyHash, deserializeNativeScript, deserializePlutusData, deserializePlutusScript, deserializeScriptHash, deserializeScriptRef, deserializeTx, deserializeTxHash, deserializeTxUnspentOutput, deserializeValue, empty, fromBuilderToPlutusData, fromJsonToPlutusData, fromNativeScript, fromPlutusDataToJson, fromScriptRef, fromTxUnspentOutput, fromValue, generateNonce, getCoseKeyFromPublicKey, getDRepIds, getPublicKeyFromCoseKey, hexToBech32, hexToBytes, keyHashToRewardAddress, mergeValue, negateValue, negatives, normalizePlutusScript, parseDatumCbor, parseInlineDatum, resolveDataHash, resolveEd25519KeyHash, resolveNativeScriptAddress, resolveNativeScriptHash, resolvePaymentKeyHash, resolvePlutusScriptAddress, resolvePlutusScriptHash, resolvePoolId, resolvePrivateKey, resolveRewardAddress, resolveScriptHashDRepId, resolveScriptRef, resolveStakeKeyHash, resolveTxHash, scriptHashToBech32, scriptHashToRewardAddress, serializeAddressObj, serializePlutusAddressToBech32, serialzeAddress, signData, subValue, toAddress, toBaseAddress, toCardanoAddress, toDRep, toEnterpriseAddress, toNativeScript, toPlutusData, toRewardAddress, toScriptRef, toTxUnspentOutput, toValue, utf8ToBytes, utf8ToHex, v2ScriptToBech32 };
package/dist/index.d.ts CHANGED
@@ -2,16 +2,14 @@ import { Cardano, Serialization } from '@cardano-sdk/core';
2
2
  import * as core from '@cardano-sdk/core';
3
3
  export { core as CardanoSDK };
4
4
  export { Cardano, Serialization } from '@cardano-sdk/core';
5
- import * as _cardano_sdk_util from '@cardano-sdk/util';
6
- import { OpaqueString, HexBlob } from '@cardano-sdk/util';
7
- export { _cardano_sdk_util as CardanoSDKUtil };
5
+ import { HexBlob as HexBlob$1, OpaqueString } from '@cardano-sdk/util';
6
+ import * as util from '@cardano-sdk/util';
7
+ export { util as CardanoSDKUtil };
8
8
  import * as Crypto from '@cardano-sdk/crypto';
9
9
  export { Crypto };
10
- import * as cjsBip32ed25519 from '@stricahq/bip32ed25519';
11
10
  import { DataSignature, Data, NativeScript as NativeScript$1, PlutusScript, IMeshTxSerializer, Protocol, DeserializedAddress, BuilderData, IDeserializer, IResolver, MeshTxBuilderBody, UTxO, Asset, LanguageVersion, PubKeyAddress, ScriptAddress, PlutusDataType } from '@meshsdk/common';
12
11
  import { Buffer as Buffer$1 } from 'buffer';
13
- import * as cjsCbors from '@stricahq/cbors';
14
- import * as _cardano_sdk_core_dist_cjs_Cardano from '@cardano-sdk/core/dist/cjs/Cardano';
12
+ import { CborMap, CborBytes } from '@harmoniclabs/cbor';
15
13
 
16
14
  declare const Slot: (value: number) => Cardano.Slot;
17
15
  type Slot = Cardano.Slot;
@@ -22,7 +20,7 @@ declare const Transaction: typeof Serialization.Transaction;
22
20
  type Transaction = Serialization.Transaction;
23
21
  declare const TransactionId: {
24
22
  (value: string): Cardano.TransactionId;
25
- fromHexBlob(value: _cardano_sdk_util.HexBlob): Cardano.TransactionId;
23
+ fromHexBlob(value: HexBlob$1): Cardano.TransactionId;
26
24
  };
27
25
  type TransactionId = Cardano.TransactionId;
28
26
  declare const TransactionBody: typeof Serialization.TransactionBody;
@@ -117,7 +115,7 @@ declare const Hash28ByteBase16: {
117
115
  type Hash28ByteBase16 = Crypto.Hash28ByteBase16;
118
116
  declare const Hash32ByteBase16: {
119
117
  (value: string): Crypto.Hash32ByteBase16;
120
- fromHexBlob<T>(value: _cardano_sdk_util.HexBlob): T;
118
+ fromHexBlob<T>(value: HexBlob$1): T;
121
119
  };
122
120
  type Hash32ByteBase16 = Crypto.Hash32ByteBase16;
123
121
  declare const CredentialType: typeof Cardano.CredentialType;
@@ -149,6 +147,10 @@ declare const Bip32PrivateKey: typeof Crypto.Bip32PrivateKey;
149
147
  type Bip32PrivateKey = Crypto.Bip32PrivateKey;
150
148
  declare const Bip32PrivateKeyHex: (key: string) => Crypto.Bip32PrivateKeyHex;
151
149
  type Bip32PrivateKeyHex = Crypto.Bip32PrivateKeyHex;
150
+ declare const Bip32PublicKey: typeof Crypto.Bip32PublicKey;
151
+ type Bip32PublicKey = Crypto.Bip32PublicKey;
152
+ declare const Bip32PublicKeyHex: (key: string) => Crypto.Bip32PublicKeyHex;
153
+ type Bip32PublicKeyHex = Crypto.Bip32PublicKeyHex;
152
154
  declare const PlutusLanguageVersion: typeof Cardano.PlutusLanguageVersion;
153
155
  type PlutusLanguageVersion = Cardano.PlutusLanguageVersion;
154
156
  declare const NativeScript: typeof Serialization.NativeScript;
@@ -177,7 +179,7 @@ declare const ConstrPlutusData: typeof Serialization.ConstrPlutusData;
177
179
  type ConstrPlutusData = Serialization.ConstrPlutusData;
178
180
  declare const RewardAccount: {
179
181
  (value: string): Cardano.RewardAccount;
180
- toHash(rewardAccount: Cardano.RewardAccount): Crypto.Ed25519KeyHashHex;
182
+ toHash(rewardAccount: Cardano.RewardAccount): Crypto.Hash28ByteBase16;
181
183
  fromCredential(credential: Cardano.Credential, networkId: Cardano.NetworkId): Cardano.RewardAccount;
182
184
  toNetworkId(rewardAccount: Cardano.RewardAccount): Cardano.NetworkId;
183
185
  };
@@ -186,7 +188,7 @@ declare const Hash: typeof Serialization.Hash;
186
188
  type Hash<T extends string> = Serialization.Hash<T>;
187
189
  declare const DatumHash: {
188
190
  (value: string): Crypto.Hash32ByteBase16;
189
- fromHexBlob<T>(value: _cardano_sdk_util.HexBlob): T;
191
+ fromHexBlob<T>(value: HexBlob$1): T;
190
192
  };
191
193
  type DatumHash = Crypto.Hash32ByteBase16;
192
194
  declare const Datum: typeof Serialization.Datum;
@@ -235,16 +237,31 @@ declare const DRep: typeof Serialization.DRep;
235
237
  type StakeCredentialStatus = Cardano.StakeCredentialStatus;
236
238
  declare const StakeCredentialStatus: typeof Cardano.StakeCredentialStatus;
237
239
  type Metadatum = Cardano.Metadatum;
240
+ type HexBlob = HexBlob$1;
241
+ declare const HexBlob: {
242
+ (target: string): HexBlob$1;
243
+ fromBytes(bytes: Uint8Array): HexBlob$1;
244
+ fromBase64(rawData: string): HexBlob$1;
245
+ toTypedBech32<T>(prefix: string, hexString: HexBlob$1): T;
246
+ };
247
+ type TxCBOR = Serialization.TxCBOR;
248
+ declare const TxCBOR: {
249
+ (tx: string): Serialization.TxCBOR;
250
+ serialize(tx: Cardano.Tx): Serialization.TxCBOR;
251
+ deserialize(tx: Serialization.TxCBOR): Cardano.Tx;
252
+ };
253
+ type Ed25519PrivateKey = Crypto.Ed25519PrivateKey;
254
+ declare const Ed25519PrivateKey: typeof Crypto.Ed25519PrivateKey;
238
255
  declare const computeAuxiliaryDataHash: (data: Cardano.AuxiliaryData | undefined) => Crypto.Hash32ByteBase16 | undefined;
239
256
  declare const blake2b: typeof Crypto.blake2b;
240
257
 
241
258
  type Signer = {
242
259
  address: Address;
243
- key: StricaPrivateKey;
260
+ key: Ed25519PrivateKey;
244
261
  };
245
262
 
246
263
  /** @param address - Optional Bech32 string of a stake, stake_test1, addr, or addr_test1 address. If provided, this function will validate the signer's address against this value. */
247
- declare const checkSignature: (data: string, { key, signature }: DataSignature, address?: string) => boolean;
264
+ declare const checkSignature: (data: string, { key, signature }: DataSignature, address?: string) => Promise<boolean>;
248
265
 
249
266
  declare class CoseSign1 {
250
267
  private protectedMap;
@@ -252,10 +269,10 @@ declare class CoseSign1 {
252
269
  private payload;
253
270
  private signature;
254
271
  constructor(payload: {
255
- protectedMap: Map<any, any>;
256
- unProtectedMap: Map<any, any>;
257
- payload: Buffer$1 | null;
258
- signature?: Buffer$1;
272
+ protectedMap: CborMap;
273
+ unProtectedMap: CborMap;
274
+ payload: CborBytes | null;
275
+ signature?: CborBytes;
259
276
  });
260
277
  static fromCbor(cbor: string): CoseSign1;
261
278
  createSigStructure(externalAad?: Buffer$1): Buffer$1;
@@ -306,32 +323,27 @@ declare class CardanoSDKSerializer implements IMeshTxSerializer {
306
323
  addSigningKeys: (txHex: string, signingKeys: string[]) => string;
307
324
  }
308
325
 
309
- type StricaPrivateKey = cjsBip32ed25519.PrivateKey;
310
- declare const StricaPrivateKey: typeof cjsBip32ed25519.PrivateKey;
311
- type StricaPublicKey = cjsBip32ed25519.PublicKey;
312
- declare const StricaPublicKey: typeof cjsBip32ed25519.PublicKey;
313
- type StricaBip32PrivateKey = cjsBip32ed25519.Bip32PrivateKey;
314
- declare const StricaBip32PrivateKey: typeof cjsBip32ed25519.Bip32PrivateKey;
315
- type StricaBip32PublicKey = cjsBip32ed25519.Bip32PublicKey;
316
- declare const StricaBip32PublicKey: typeof cjsBip32ed25519.Bip32PublicKey;
317
-
318
- declare const StricaEncoder: {
319
- encode: (input: any, options?: {
320
- collapseBigNumber: Boolean;
321
- }) => Buffer;
322
- };
323
- declare const StricaDecoder: typeof cjsCbors.Decoder;
324
- type StricaDecoder = cjsCbors.Decoder;
325
-
326
326
  declare const buildBaseAddress: (networkId: number, paymentKeyHash: Hash28ByteBase16, stakeKeyHash: Hash28ByteBase16) => BaseAddress;
327
327
  declare const buildEnterpriseAddress: (networkId: number, paymentKeyHash: Hash28ByteBase16) => EnterpriseAddress;
328
+ declare const clampScalar: (scalar: Buffer) => Buffer;
328
329
  declare const buildBip32PrivateKey: (entropy: string, password?: string) => Bip32PrivateKey;
329
330
  declare const buildRewardAddress: (networkId: number, stakeKeyHash: Hash28ByteBase16) => RewardAddress;
330
- declare const buildKeys: (entropy: string | [string, string], accountIndex: number, keyIndex?: number) => {
331
- paymentKey: StricaPrivateKey;
332
- stakeKey: StricaPrivateKey;
333
- dRepKey?: StricaPrivateKey;
331
+ /**
332
+ * Build a set of keys from a given private key
333
+ *
334
+ * NOTE - Must be called after `await Crypto.Ready()`
335
+ *
336
+ * @param privateKeyHex - The BIP32 private key hex to derive keys from
337
+ * @param accountIndex - The account index to derive keys for
338
+ * @param keyIndex - The key index to derive keys for
339
+ * @returns The payment and stake keys, and optionally the dRep key if a Bip32PrivateKey is provided
340
+ */
341
+ declare const buildKeys: (privateKeyHex: string | [string, string], accountIndex: number, keyIndex?: number) => {
342
+ paymentKey: Ed25519PrivateKey;
343
+ stakeKey: Ed25519PrivateKey;
344
+ dRepKey?: Ed25519PrivateKey;
334
345
  };
346
+ declare const buildEd25519PrivateKeyFromSecretKey: (secretKeyHex: string) => Crypto.Ed25519PrivateKey;
335
347
  declare const buildScriptPubkey: (keyHash: Ed25519KeyHash) => NativeScript;
336
348
  declare const buildDRepID: (dRepKey: Ed25519PublicKeyHex, networkId?: NetworkId, addressType?: AddressType) => DRepID;
337
349
 
@@ -387,7 +399,7 @@ declare const serialzeAddress: (deserializedAddress: Partial<DeserializedAddress
387
399
  declare const addrBech32ToPlutusDataHex: (bech32: string) => string;
388
400
  declare const addrBech32ToPlutusDataObj: <T>(bech32: string) => T;
389
401
  declare const serializeAddressObj: (plutusDataAddressObject: PubKeyAddress | ScriptAddress, networkId?: number) => string;
390
- declare const serializePlutusAddressToBech32: (plutusHex: string, networkId?: number) => _cardano_sdk_core_dist_cjs_Cardano.PaymentAddress | _cardano_sdk_core_dist_cjs_Cardano.RewardAccount;
402
+ declare const serializePlutusAddressToBech32: (plutusHex: string, networkId?: number) => string;
391
403
  declare const deserializeBech32Address: (bech32Addr: string) => DeserializedAddress;
392
404
  declare const deserializeAddress: (address: string) => Address;
393
405
  declare const scriptHashToBech32: (scriptHash: string, stakeCredentialHash?: string, networkId?: number, isScriptStakeCredentialHash?: boolean) => string;
@@ -395,12 +407,14 @@ declare const v2ScriptToBech32: (scriptCbor: string, stakeCredential?: string, n
395
407
  declare const scriptHashToRewardAddress: (hash: string, networkId?: number) => string;
396
408
  declare const keyHashToRewardAddress: (hash: string, networkId?: number) => string;
397
409
 
398
- declare const bytesToHex: (bytes: Uint8Array) => HexBlob;
399
- declare const hexToBytes: (hex: HexBlob) => Uint8Array;
410
+ declare const bytesToHex: (bytes: Uint8Array) => HexBlob$1;
411
+ declare const hexToBytes: (hex: HexBlob$1) => Uint8Array;
400
412
  declare const utf8ToBytes: (str: string) => Uint8Array;
401
- declare const utf8ToHex: (str: string) => HexBlob;
413
+ declare const utf8ToHex: (str: string) => HexBlob$1;
402
414
  declare const hexToBech32: (prefix: string, hex: string) => string;
403
415
 
416
+ declare const addVKeyWitnessSetToTransaction: (txHex: string, vkeyWitnessSet: string) => string;
417
+
404
418
  /**
405
419
  * MIT License
406
420
  *
@@ -446,4 +460,4 @@ declare const normalizePlutusScript: (plutusScript: string, encoding: OutputEnco
446
460
  declare const applyEncoding: (plutusScript: Uint8Array, outputEncoding: OutputEncoding) => Uint8Array;
447
461
  declare const applyParamsToScript: (rawScript: string, params: object[] | Data[], type?: PlutusDataType) => string;
448
462
 
449
- export { Address, AddressType, AssetFingerprint, AssetId, AssetName, type AuxiliaryData, AuxilliaryData, BaseAddress, Bip32PrivateKey, Bip32PrivateKeyHex, CardanoSDKSerializer, CborSet, CborWriter, CertIndex, Certificate, CertificateType, ConstrPlutusData, CoseSign1, CostModel, type CostModels, Costmdls, Credential, type CredentialCore, CredentialType, DRep, DRepID, Datum, DatumHash, DatumKind, Ed25519KeyHash, Ed25519KeyHashHex, Ed25519PrivateExtendedKeyHex, Ed25519PrivateNormalKeyHex, Ed25519PublicKey, Ed25519PublicKeyHex, Ed25519Signature, Ed25519SignatureHex, EnterpriseAddress, ExUnits, Hash, Hash28ByteBase16, Hash32ByteBase16, type Metadatum, MetadatumList, MetadatumMap, NativeScript, NetworkId, type OutputEncoding, PaymentAddress, PlutusData, PlutusDataKind, PlutusLanguageVersion, PlutusList, PlutusMap, PlutusV1Script, PlutusV2Script, PlutusV3Script, PointerAddress, PolicyId, PoolId, Redeemer, RedeemerPurpose, RedeemerTag, Redeemers, RequireAllOf, RequireAnyOf, RequireNOf, RequireSignature, RequireTimeAfter, RequireTimeBefore, RewardAccount, RewardAddress, Script, ScriptHash, ScriptPubkey, type Signatures, type Signer, Slot, StakeCredentialStatus, StakeDelegation, type StakeDelegationCertificate, StakeRegistration, StricaBip32PrivateKey, StricaBip32PrivateKey as StricaBip32PrivateKeyType, StricaBip32PublicKey, StricaBip32PublicKey as StricaBip32PublicKeyType, StricaDecoder, StricaEncoder, StricaPrivateKey, StricaPrivateKey as StricaPrivateKeyType, StricaPublicKey, StricaPublicKey as StricaPublicKeyType, type TokenMap, Transaction, TransactionBody, TransactionId, TransactionInput, type TransactionInputSet, TransactionMetadatum, TransactionOutput, TransactionUnspentOutput, type TransactionWitnessPlutusData, TransactionWitnessSet, TxIndex, Value, VkeyWitness, VrfVkBech32, type Witness, addrBech32ToPlutusDataHex, addrBech32ToPlutusDataObj, addressToBech32, applyEncoding, applyParamsToScript, assetTypes, blake2b, buildBaseAddress, buildBip32PrivateKey, buildDRepID, buildEnterpriseAddress, buildKeys, buildRewardAddress, buildScriptPubkey, bytesToHex, checkSignature, computeAuxiliaryDataHash, deserializeAddress, deserializeBech32Address, deserializeDataHash, deserializeEd25519KeyHash, deserializeNativeScript, deserializePlutusData, deserializePlutusScript, deserializeScriptHash, deserializeScriptRef, deserializeTx, deserializeTxHash, deserializeTxUnspentOutput, deserializeValue, empty, fromBuilderToPlutusData, fromJsonToPlutusData, fromNativeScript, fromPlutusDataToJson, fromScriptRef, fromTxUnspentOutput, fromValue, generateNonce, getCoseKeyFromPublicKey, getDRepIds, getPublicKeyFromCoseKey, hexToBech32, hexToBytes, keyHashToRewardAddress, mergeValue, negateValue, negatives, normalizePlutusScript, parseDatumCbor, parseInlineDatum, resolveDataHash, resolveEd25519KeyHash, resolveNativeScriptAddress, resolveNativeScriptHash, resolvePaymentKeyHash, resolvePlutusScriptAddress, resolvePlutusScriptHash, resolvePoolId, resolvePrivateKey, resolveRewardAddress, resolveScriptHashDRepId, resolveScriptRef, resolveStakeKeyHash, resolveTxHash, scriptHashToBech32, scriptHashToRewardAddress, serializeAddressObj, serializePlutusAddressToBech32, serialzeAddress, signData, subValue, toAddress, toBaseAddress, toCardanoAddress, toDRep, toEnterpriseAddress, toNativeScript, toPlutusData, toRewardAddress, toScriptRef, toTxUnspentOutput, toValue, utf8ToBytes, utf8ToHex, v2ScriptToBech32 };
463
+ export { Address, AddressType, AssetFingerprint, AssetId, AssetName, type AuxiliaryData, AuxilliaryData, BaseAddress, Bip32PrivateKey, Bip32PrivateKeyHex, Bip32PublicKey, Bip32PublicKeyHex, CardanoSDKSerializer, CborSet, CborWriter, CertIndex, Certificate, CertificateType, ConstrPlutusData, CoseSign1, CostModel, type CostModels, Costmdls, Credential, type CredentialCore, CredentialType, DRep, DRepID, Datum, DatumHash, DatumKind, Ed25519KeyHash, Ed25519KeyHashHex, Ed25519PrivateExtendedKeyHex, Ed25519PrivateKey, Ed25519PrivateNormalKeyHex, Ed25519PublicKey, Ed25519PublicKeyHex, Ed25519Signature, Ed25519SignatureHex, EnterpriseAddress, ExUnits, Hash, Hash28ByteBase16, Hash32ByteBase16, HexBlob, type Metadatum, MetadatumList, MetadatumMap, NativeScript, NetworkId, type OutputEncoding, PaymentAddress, PlutusData, PlutusDataKind, PlutusLanguageVersion, PlutusList, PlutusMap, PlutusV1Script, PlutusV2Script, PlutusV3Script, PointerAddress, PolicyId, PoolId, Redeemer, RedeemerPurpose, RedeemerTag, Redeemers, RequireAllOf, RequireAnyOf, RequireNOf, RequireSignature, RequireTimeAfter, RequireTimeBefore, RewardAccount, RewardAddress, Script, ScriptHash, ScriptPubkey, type Signatures, type Signer, Slot, StakeCredentialStatus, StakeDelegation, type StakeDelegationCertificate, StakeRegistration, type TokenMap, Transaction, TransactionBody, TransactionId, TransactionInput, type TransactionInputSet, TransactionMetadatum, TransactionOutput, TransactionUnspentOutput, type TransactionWitnessPlutusData, TransactionWitnessSet, TxCBOR, TxIndex, Value, VkeyWitness, VrfVkBech32, type Witness, addVKeyWitnessSetToTransaction, addrBech32ToPlutusDataHex, addrBech32ToPlutusDataObj, addressToBech32, applyEncoding, applyParamsToScript, assetTypes, blake2b, buildBaseAddress, buildBip32PrivateKey, buildDRepID, buildEd25519PrivateKeyFromSecretKey, buildEnterpriseAddress, buildKeys, buildRewardAddress, buildScriptPubkey, bytesToHex, checkSignature, clampScalar, computeAuxiliaryDataHash, deserializeAddress, deserializeBech32Address, deserializeDataHash, deserializeEd25519KeyHash, deserializeNativeScript, deserializePlutusData, deserializePlutusScript, deserializeScriptHash, deserializeScriptRef, deserializeTx, deserializeTxHash, deserializeTxUnspentOutput, deserializeValue, empty, fromBuilderToPlutusData, fromJsonToPlutusData, fromNativeScript, fromPlutusDataToJson, fromScriptRef, fromTxUnspentOutput, fromValue, generateNonce, getCoseKeyFromPublicKey, getDRepIds, getPublicKeyFromCoseKey, hexToBech32, hexToBytes, keyHashToRewardAddress, mergeValue, negateValue, negatives, normalizePlutusScript, parseDatumCbor, parseInlineDatum, resolveDataHash, resolveEd25519KeyHash, resolveNativeScriptAddress, resolveNativeScriptHash, resolvePaymentKeyHash, resolvePlutusScriptAddress, resolvePlutusScriptHash, resolvePoolId, resolvePrivateKey, resolveRewardAddress, resolveScriptHashDRepId, resolveScriptRef, resolveStakeKeyHash, resolveTxHash, scriptHashToBech32, scriptHashToRewardAddress, serializeAddressObj, serializePlutusAddressToBech32, serialzeAddress, signData, subValue, toAddress, toBaseAddress, toCardanoAddress, toDRep, toEnterpriseAddress, toNativeScript, toPlutusData, toRewardAddress, toScriptRef, toTxUnspentOutput, toValue, utf8ToBytes, utf8ToHex, v2ScriptToBech32 };