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

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,27 +1,21 @@
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;
5
- export function encrypt_with_password(password: string, salt: string, nonce: string, data: string): string;
6
3
  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;
4
+ export function encrypt_with_password(password: string, salt: string, nonce: string, data: string): string;
12
5
  export function min_script_fee(tx: Transaction, ex_unit_prices: ExUnitPrices): BigNum;
13
6
  export function calculate_ex_units_ceil_cost(ex_units: ExUnits, ex_unit_prices: ExUnitPrices): BigNum;
14
7
  export function min_ref_script_fee(total_ref_scripts_size: number, ref_script_coins_per_byte: UnitInterval): BigNum;
8
+ export function min_fee(tx: Transaction, linear_fee: LinearFee): BigNum;
9
+ export function make_vkey_witness(tx_body_hash: TransactionHash, sk: PrivateKey): Vkeywitness;
10
+ export function hash_script_data(redeemers: Redeemers, cost_models: Costmdls, datums?: PlutusList | null): ScriptDataHash;
15
11
  /**
16
- * Returns the state of the transaction sets.
17
- * If all sets have a tag, it returns AllSetsHaveTag.
18
- * If all sets have no tag, it returns AllSetsHaveNoTag.
19
- * If there is a mix of tagged and untagged sets, it returns MixedSets.
20
- * This function is useful for checking if a transaction might be signed by a hardware wallet.
21
- * And for checking which parameter should be used in a hardware wallet api.
22
- * WARNING this function will be deleted after all tags for set types will be mandatory. Approx after next hf
12
+ * returns minimal amount of ada for the output for case when the amount is included to the output
23
13
  */
24
- export function has_transaction_set_tag(tx_bytes: Uint8Array): TransactionSetsState;
14
+ export function min_ada_for_output(output: TransactionOutput, data_cost: DataCost): BigNum;
15
+ export function make_icarus_bootstrap_witness(tx_body_hash: TransactionHash, addr: ByronAddress, key: Bip32PrivateKey): BootstrapWitness;
16
+ export function get_implicit_input(txbody: TransactionBody, pool_deposit: BigNum, key_deposit: BigNum): Value;
17
+ export function hash_plutus_data(plutus_data: PlutusData): DataHash;
18
+ export function make_daedalus_bootstrap_witness(tx_body_hash: TransactionHash, addr: ByronAddress, key: LegacyDaedalusPrivateKey): BootstrapWitness;
25
19
  /**
26
20
  * Receives a script JSON string
27
21
  * and returns a NativeScript.
@@ -33,19 +27,25 @@ export function has_transaction_set_tag(tx_bytes: Uint8Array): TransactionSetsSt
33
27
  * self_xpub is expected to be a Bip32PublicKey as hex-encoded bytes
34
28
  */
35
29
  export function encode_json_str_to_native_script(json: string, self_xpub: string, schema: ScriptSchema): NativeScript;
36
- export function get_deposit(txbody: TransactionBody, pool_deposit: BigNum, key_deposit: BigNum): BigNum;
37
- export function hash_script_data(redeemers: Redeemers, cost_models: Costmdls, datums?: PlutusList | null): ScriptDataHash;
30
+ export function hash_auxiliary_data(auxiliary_data: AuxiliaryData): AuxiliaryDataHash;
38
31
  /**
39
- * returns minimal amount of ada for the output for case when the amount is included to the output
32
+ * Returns the state of the transaction sets.
33
+ * If all sets have a tag, it returns AllSetsHaveTag.
34
+ * If all sets have no tag, it returns AllSetsHaveNoTag.
35
+ * If there is a mix of tagged and untagged sets, it returns MixedSets.
36
+ * This function is useful for checking if a transaction might be signed by a hardware wallet.
37
+ * And for checking which parameter should be used in a hardware wallet api.
38
+ * WARNING this function will be deleted after all tags for set types will be mandatory. Approx after next hf
40
39
  */
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;
40
+ export function has_transaction_set_tag(tx_bytes: Uint8Array): TransactionSetsState;
41
+ export function get_deposit(txbody: TransactionBody, pool_deposit: BigNum, key_deposit: BigNum): BigNum;
42
+ export function encode_json_str_to_plutus_datum(json: string, schema: PlutusDatumSchema): PlutusData;
43
+ export function decode_plutus_datum_to_json_str(datum: PlutusData, schema: PlutusDatumSchema): string;
48
44
  export function create_send_all(address: Address, utxos: TransactionUnspentOutputs, config: TransactionBuilderConfig): TransactionBatchList;
45
+ export function decode_metadatum_to_json_str(metadatum: TransactionMetadatum, schema: MetadataJsonSchema): string;
46
+ export function encode_arbitrary_bytes_as_metadatum(bytes: Uint8Array): TransactionMetadatum;
47
+ export function encode_json_str_to_metadatum(json: string, schema: MetadataJsonSchema): TransactionMetadatum;
48
+ export function decode_arbitrary_bytes_from_metadatum(metadata: TransactionMetadatum): Uint8Array;
49
49
  export enum AddressKind {
50
50
  Base = 0,
51
51
  Pointer = 1,
@@ -2582,8 +2582,16 @@ export class ScriptNOfK {
2582
2582
  free(): void;
2583
2583
  static from_bytes(bytes: Uint8Array): ScriptNOfK;
2584
2584
  to_js_value(): ScriptNOfKJSON;
2585
+ /**
2586
+ * Any int64 count, as the ledger allows; fails when `n` does not fit int64.
2587
+ */
2588
+ static new_from_int(n: Int, native_scripts: NativeScripts): ScriptNOfK;
2585
2589
  native_scripts(): NativeScripts;
2586
- n(): number;
2590
+ /**
2591
+ * The count exactly as encoded: any int64, as the ledger allows. A negative count is
2592
+ * always satisfied, one above the number of scripts never is.
2593
+ */
2594
+ n(): Int;
2587
2595
  static new(n: number, native_scripts: NativeScripts): ScriptNOfK;
2588
2596
  to_hex(): string;
2589
2597
  to_json(): string;