@emurgo/cardano-serialization-lib-browser-inlined-gc 16.0.0-beta.1 → 17.0.0

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.
@@ -1,7 +1,17 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
+ export function encode_json_str_to_plutus_datum(json: string, schema: PlutusDatumSchema): PlutusData;
4
+ export function decode_plutus_datum_to_json_str(datum: PlutusData, schema: PlutusDatumSchema): string;
3
5
  export function encrypt_with_password(password: string, salt: string, nonce: string, data: string): string;
4
6
  export function decrypt_with_password(password: string, data: string): string;
7
+ export function decode_metadatum_to_json_str(metadatum: TransactionMetadatum, schema: MetadataJsonSchema): string;
8
+ export function encode_json_str_to_metadatum(json: string, schema: MetadataJsonSchema): TransactionMetadatum;
9
+ export function encode_arbitrary_bytes_as_metadatum(bytes: Uint8Array): TransactionMetadatum;
10
+ export function decode_arbitrary_bytes_from_metadatum(metadata: TransactionMetadatum): Uint8Array;
11
+ export function min_fee(tx: Transaction, linear_fee: LinearFee): BigNum;
12
+ export function min_script_fee(tx: Transaction, ex_unit_prices: ExUnitPrices): BigNum;
13
+ export function calculate_ex_units_ceil_cost(ex_units: ExUnits, ex_unit_prices: ExUnitPrices): BigNum;
14
+ export function min_ref_script_fee(total_ref_scripts_size: number, ref_script_coins_per_byte: UnitInterval): BigNum;
5
15
  /**
6
16
  * Returns the state of the transaction sets.
7
17
  * If all sets have a tag, it returns AllSetsHaveTag.
@@ -12,16 +22,6 @@ export function decrypt_with_password(password: string, data: string): string;
12
22
  * WARNING this function will be deleted after all tags for set types will be mandatory. Approx after next hf
13
23
  */
14
24
  export function has_transaction_set_tag(tx_bytes: Uint8Array): TransactionSetsState;
15
- export function make_daedalus_bootstrap_witness(tx_body_hash: TransactionHash, addr: ByronAddress, key: LegacyDaedalusPrivateKey): BootstrapWitness;
16
- export function make_vkey_witness(tx_body_hash: TransactionHash, sk: PrivateKey): Vkeywitness;
17
- export function get_deposit(txbody: TransactionBody, pool_deposit: BigNum, key_deposit: BigNum): BigNum;
18
- export function hash_auxiliary_data(auxiliary_data: AuxiliaryData): AuxiliaryDataHash;
19
- export function make_icarus_bootstrap_witness(tx_body_hash: TransactionHash, addr: ByronAddress, key: Bip32PrivateKey): BootstrapWitness;
20
- export function get_implicit_input(txbody: TransactionBody, pool_deposit: BigNum, key_deposit: BigNum): Value;
21
- /**
22
- * returns minimal amount of ada for the output for case when the amount is included to the output
23
- */
24
- export function min_ada_for_output(output: TransactionOutput, data_cost: DataCost): BigNum;
25
25
  /**
26
26
  * Receives a script JSON string
27
27
  * and returns a NativeScript.
@@ -33,19 +33,19 @@ export function min_ada_for_output(output: TransactionOutput, data_cost: DataCos
33
33
  * self_xpub is expected to be a Bip32PublicKey as hex-encoded bytes
34
34
  */
35
35
  export function encode_json_str_to_native_script(json: string, self_xpub: string, schema: ScriptSchema): NativeScript;
36
- export function hash_plutus_data(plutus_data: PlutusData): DataHash;
36
+ export function get_deposit(txbody: TransactionBody, pool_deposit: BigNum, key_deposit: BigNum): BigNum;
37
37
  export function hash_script_data(redeemers: Redeemers, cost_models: Costmdls, datums?: PlutusList | null): ScriptDataHash;
38
+ /**
39
+ * returns minimal amount of ada for the output for case when the amount is included to the output
40
+ */
41
+ export function min_ada_for_output(output: TransactionOutput, data_cost: DataCost): BigNum;
42
+ export function hash_plutus_data(plutus_data: PlutusData): DataHash;
43
+ export function make_icarus_bootstrap_witness(tx_body_hash: TransactionHash, addr: ByronAddress, key: Bip32PrivateKey): BootstrapWitness;
44
+ export function get_implicit_input(txbody: TransactionBody, pool_deposit: BigNum, key_deposit: BigNum): Value;
45
+ export function make_vkey_witness(tx_body_hash: TransactionHash, sk: PrivateKey): Vkeywitness;
46
+ export function make_daedalus_bootstrap_witness(tx_body_hash: TransactionHash, addr: ByronAddress, key: LegacyDaedalusPrivateKey): BootstrapWitness;
47
+ export function hash_auxiliary_data(auxiliary_data: AuxiliaryData): AuxiliaryDataHash;
38
48
  export function create_send_all(address: Address, utxos: TransactionUnspentOutputs, config: TransactionBuilderConfig): TransactionBatchList;
39
- export function decode_arbitrary_bytes_from_metadatum(metadata: TransactionMetadatum): Uint8Array;
40
- export function encode_json_str_to_metadatum(json: string, schema: MetadataJsonSchema): TransactionMetadatum;
41
- export function decode_metadatum_to_json_str(metadatum: TransactionMetadatum, schema: MetadataJsonSchema): string;
42
- export function encode_arbitrary_bytes_as_metadatum(bytes: Uint8Array): TransactionMetadatum;
43
- export function min_ref_script_fee(total_ref_scripts_size: number, ref_script_coins_per_byte: UnitInterval): BigNum;
44
- export function min_script_fee(tx: Transaction, ex_unit_prices: ExUnitPrices): BigNum;
45
- export function calculate_ex_units_ceil_cost(ex_units: ExUnits, ex_unit_prices: ExUnitPrices): BigNum;
46
- export function min_fee(tx: Transaction, linear_fee: LinearFee): BigNum;
47
- export function encode_json_str_to_plutus_datum(json: string, schema: PlutusDatumSchema): PlutusData;
48
- export function decode_plutus_datum_to_json_str(datum: PlutusData, schema: PlutusDatumSchema): string;
49
49
  export enum AddressKind {
50
50
  Base = 0,
51
51
  Pointer = 1,
@@ -3925,13 +3925,14 @@ export type NativeScriptJSON =
3925
3925
  | {
3926
3926
  TimelockExpiry: TimelockExpiryJSON;
3927
3927
  };
3928
+ export type LanguageJSON = "PlutusV1" | "PlutusV2" | "PlutusV3";
3928
3929
 
3929
3930
  export interface AuxiliaryDataJSON {
3930
3931
  metadata?: {
3931
3932
  [k: string]: string;
3932
3933
  } | null;
3933
3934
  native_scripts?: NativeScriptJSON[] | null;
3934
- plutus_scripts?: string[] | null;
3935
+ plutus_scripts?: PlutusScriptJSON[] | null;
3935
3936
  prefer_alonzo_format: boolean;
3936
3937
  }
3937
3938
  export interface ScriptPubkeyJSON {
@@ -3953,6 +3954,13 @@ export interface TimelockStartJSON {
3953
3954
  export interface TimelockExpiryJSON {
3954
3955
  slot: string;
3955
3956
  }
3957
+ /**
3958
+ * JSON form: `{ "bytes": "<hex>", "language": "PlutusV1" }`, the same shape for every language version. The hex is the raw compiled script, without the CBOR bytes tag around it.
3959
+ */
3960
+ export interface PlutusScriptJSON {
3961
+ bytes: string;
3962
+ language: LanguageJSON;
3963
+ }
3956
3964
  export type AuxiliaryDataHashJSON = string;
3957
3965
  export interface AuxiliaryDataSetJSON {
3958
3966
  [k: string]: AuxiliaryDataJSON;
@@ -4098,7 +4106,7 @@ export type ScriptRefJSON =
4098
4106
  NativeScript: NativeScriptJSON;
4099
4107
  }
4100
4108
  | {
4101
- PlutusScript: string;
4109
+ PlutusScript: PlutusScriptJSON;
4102
4110
  };
4103
4111
  export type MintJSON = [string, MintAssetsJSON][];
4104
4112
  export type NetworkIdJSON = "Testnet" | "Mainnet";
@@ -4521,7 +4529,7 @@ export interface TransactionWitnessSetJSON {
4521
4529
  bootstraps?: BootstrapWitnessJSON[] | null;
4522
4530
  native_scripts?: NativeScriptJSON[] | null;
4523
4531
  plutus_data?: PlutusListJSON | null;
4524
- plutus_scripts?: string[] | null;
4532
+ plutus_scripts?: PlutusScriptJSON[] | null;
4525
4533
  redeemers?: RedeemerJSON[] | null;
4526
4534
  vkeys?: VkeywitnessJSON[] | null;
4527
4535
  }
@@ -4652,7 +4660,6 @@ export type IntJSON = string;
4652
4660
  * @maxItems 4
4653
4661
  */
4654
4662
  export type KESVKeyJSON = string;
4655
- export type LanguageJSON = LanguageKindJSON;
4656
4663
  export type LanguageKindJSON = "PlutusV1" | "PlutusV2" | "PlutusV3";
4657
4664
  export type LanguagesJSON = LanguageJSON[];
4658
4665
  export type MIRToStakeCredentialsJSON = StakeToCoinJSON[];
@@ -4662,8 +4669,11 @@ export type MintsAssetsJSON = MintAssetsJSON[];
4662
4669
  export type NativeScriptsJSON = NativeScriptJSON[];
4663
4670
 
4664
4671
  export type NetworkIdKindJSON = "Testnet" | "Mainnet";
4665
- export type PlutusScriptJSON = string;
4666
- export type PlutusScriptsJSON = string[];
4672
+ export type PlutusScriptsJSON = PlutusScriptJSON[];
4673
+
4674
+ /**
4675
+ * JSON form: `{ "bytes": "<hex>", "language": "PlutusV1" }`, the same shape for every language version. The hex is the raw compiled script, without the CBOR bytes tag around it.
4676
+ */
4667
4677
  export type PoolMetadataHashJSON = string;
4668
4678
  export interface ProposedProtocolParameterUpdatesJSON {
4669
4679
  [k: string]: ProtocolParamUpdateJSON;
@@ -4696,7 +4706,7 @@ export type ScriptRefEnumJSON =
4696
4706
  NativeScript: NativeScriptJSON;
4697
4707
  }
4698
4708
  | {
4699
- PlutusScript: string;
4709
+ PlutusScript: PlutusScriptJSON;
4700
4710
  };
4701
4711
  export interface TransactionJSON {
4702
4712
  auxiliary_data?: AuxiliaryDataJSON | null;