@emurgo/cardano-serialization-lib-browser-inlined-gc 16.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,23 +1,21 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
-
export function
|
|
4
|
-
export function
|
|
5
|
-
export function encode_arbitrary_bytes_as_metadatum(bytes: Uint8Array): TransactionMetadatum;
|
|
6
|
-
export function decode_metadatum_to_json_str(metadatum: TransactionMetadatum, schema: MetadataJsonSchema): string;
|
|
7
|
-
export function encode_json_str_to_metadatum(json: string, schema: MetadataJsonSchema): TransactionMetadatum;
|
|
8
|
-
export function decode_arbitrary_bytes_from_metadatum(metadata: TransactionMetadatum): Uint8Array;
|
|
9
|
-
export function min_fee(tx: Transaction, linear_fee: LinearFee): BigNum;
|
|
10
|
-
export function min_ref_script_fee(total_ref_scripts_size: number, ref_script_coins_per_byte: UnitInterval): BigNum;
|
|
3
|
+
export function decrypt_with_password(password: string, data: string): string;
|
|
4
|
+
export function encrypt_with_password(password: string, salt: string, nonce: string, data: string): string;
|
|
11
5
|
export function min_script_fee(tx: Transaction, ex_unit_prices: ExUnitPrices): BigNum;
|
|
12
6
|
export function calculate_ex_units_ceil_cost(ex_units: ExUnits, ex_unit_prices: ExUnitPrices): BigNum;
|
|
13
|
-
export function
|
|
14
|
-
export function
|
|
15
|
-
export function make_daedalus_bootstrap_witness(tx_body_hash: TransactionHash, addr: ByronAddress, key: LegacyDaedalusPrivateKey): BootstrapWitness;
|
|
16
|
-
export function hash_plutus_data(plutus_data: PlutusData): DataHash;
|
|
17
|
-
export function hash_script_data(redeemers: Redeemers, cost_models: Costmdls, datums?: PlutusList | null): ScriptDataHash;
|
|
18
|
-
export function hash_auxiliary_data(auxiliary_data: AuxiliaryData): AuxiliaryDataHash;
|
|
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;
|
|
19
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;
|
|
11
|
+
/**
|
|
12
|
+
* returns minimal amount of ada for the output for case when the amount is included to the output
|
|
13
|
+
*/
|
|
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;
|
|
20
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;
|
|
21
19
|
/**
|
|
22
20
|
* Receives a script JSON string
|
|
23
21
|
* and returns a NativeScript.
|
|
@@ -29,11 +27,7 @@ export function get_implicit_input(txbody: TransactionBody, pool_deposit: BigNum
|
|
|
29
27
|
* self_xpub is expected to be a Bip32PublicKey as hex-encoded bytes
|
|
30
28
|
*/
|
|
31
29
|
export function encode_json_str_to_native_script(json: string, self_xpub: string, schema: ScriptSchema): NativeScript;
|
|
32
|
-
export function
|
|
33
|
-
/**
|
|
34
|
-
* returns minimal amount of ada for the output for case when the amount is included to the output
|
|
35
|
-
*/
|
|
36
|
-
export function min_ada_for_output(output: TransactionOutput, data_cost: DataCost): BigNum;
|
|
30
|
+
export function hash_auxiliary_data(auxiliary_data: AuxiliaryData): AuxiliaryDataHash;
|
|
37
31
|
/**
|
|
38
32
|
* Returns the state of the transaction sets.
|
|
39
33
|
* If all sets have a tag, it returns AllSetsHaveTag.
|
|
@@ -44,8 +38,14 @@ export function min_ada_for_output(output: TransactionOutput, data_cost: DataCos
|
|
|
44
38
|
* WARNING this function will be deleted after all tags for set types will be mandatory. Approx after next hf
|
|
45
39
|
*/
|
|
46
40
|
export function has_transaction_set_tag(tx_bytes: Uint8Array): TransactionSetsState;
|
|
47
|
-
export function
|
|
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
|
-
|
|
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;
|
|
@@ -3925,13 +3933,14 @@ export type NativeScriptJSON =
|
|
|
3925
3933
|
| {
|
|
3926
3934
|
TimelockExpiry: TimelockExpiryJSON;
|
|
3927
3935
|
};
|
|
3936
|
+
export type LanguageJSON = "PlutusV1" | "PlutusV2" | "PlutusV3";
|
|
3928
3937
|
|
|
3929
3938
|
export interface AuxiliaryDataJSON {
|
|
3930
3939
|
metadata?: {
|
|
3931
3940
|
[k: string]: string;
|
|
3932
3941
|
} | null;
|
|
3933
3942
|
native_scripts?: NativeScriptJSON[] | null;
|
|
3934
|
-
plutus_scripts?:
|
|
3943
|
+
plutus_scripts?: PlutusScriptJSON[] | null;
|
|
3935
3944
|
prefer_alonzo_format: boolean;
|
|
3936
3945
|
}
|
|
3937
3946
|
export interface ScriptPubkeyJSON {
|
|
@@ -3953,6 +3962,13 @@ export interface TimelockStartJSON {
|
|
|
3953
3962
|
export interface TimelockExpiryJSON {
|
|
3954
3963
|
slot: string;
|
|
3955
3964
|
}
|
|
3965
|
+
/**
|
|
3966
|
+
* 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.
|
|
3967
|
+
*/
|
|
3968
|
+
export interface PlutusScriptJSON {
|
|
3969
|
+
bytes: string;
|
|
3970
|
+
language: LanguageJSON;
|
|
3971
|
+
}
|
|
3956
3972
|
export type AuxiliaryDataHashJSON = string;
|
|
3957
3973
|
export interface AuxiliaryDataSetJSON {
|
|
3958
3974
|
[k: string]: AuxiliaryDataJSON;
|
|
@@ -4098,7 +4114,7 @@ export type ScriptRefJSON =
|
|
|
4098
4114
|
NativeScript: NativeScriptJSON;
|
|
4099
4115
|
}
|
|
4100
4116
|
| {
|
|
4101
|
-
PlutusScript:
|
|
4117
|
+
PlutusScript: PlutusScriptJSON;
|
|
4102
4118
|
};
|
|
4103
4119
|
export type MintJSON = [string, MintAssetsJSON][];
|
|
4104
4120
|
export type NetworkIdJSON = "Testnet" | "Mainnet";
|
|
@@ -4521,7 +4537,7 @@ export interface TransactionWitnessSetJSON {
|
|
|
4521
4537
|
bootstraps?: BootstrapWitnessJSON[] | null;
|
|
4522
4538
|
native_scripts?: NativeScriptJSON[] | null;
|
|
4523
4539
|
plutus_data?: PlutusListJSON | null;
|
|
4524
|
-
plutus_scripts?:
|
|
4540
|
+
plutus_scripts?: PlutusScriptJSON[] | null;
|
|
4525
4541
|
redeemers?: RedeemerJSON[] | null;
|
|
4526
4542
|
vkeys?: VkeywitnessJSON[] | null;
|
|
4527
4543
|
}
|
|
@@ -4652,7 +4668,6 @@ export type IntJSON = string;
|
|
|
4652
4668
|
* @maxItems 4
|
|
4653
4669
|
*/
|
|
4654
4670
|
export type KESVKeyJSON = string;
|
|
4655
|
-
export type LanguageJSON = LanguageKindJSON;
|
|
4656
4671
|
export type LanguageKindJSON = "PlutusV1" | "PlutusV2" | "PlutusV3";
|
|
4657
4672
|
export type LanguagesJSON = LanguageJSON[];
|
|
4658
4673
|
export type MIRToStakeCredentialsJSON = StakeToCoinJSON[];
|
|
@@ -4662,8 +4677,11 @@ export type MintsAssetsJSON = MintAssetsJSON[];
|
|
|
4662
4677
|
export type NativeScriptsJSON = NativeScriptJSON[];
|
|
4663
4678
|
|
|
4664
4679
|
export type NetworkIdKindJSON = "Testnet" | "Mainnet";
|
|
4665
|
-
export type
|
|
4666
|
-
|
|
4680
|
+
export type PlutusScriptsJSON = PlutusScriptJSON[];
|
|
4681
|
+
|
|
4682
|
+
/**
|
|
4683
|
+
* 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.
|
|
4684
|
+
*/
|
|
4667
4685
|
export type PoolMetadataHashJSON = string;
|
|
4668
4686
|
export interface ProposedProtocolParameterUpdatesJSON {
|
|
4669
4687
|
[k: string]: ProtocolParamUpdateJSON;
|
|
@@ -4696,7 +4714,7 @@ export type ScriptRefEnumJSON =
|
|
|
4696
4714
|
NativeScript: NativeScriptJSON;
|
|
4697
4715
|
}
|
|
4698
4716
|
| {
|
|
4699
|
-
PlutusScript:
|
|
4717
|
+
PlutusScript: PlutusScriptJSON;
|
|
4700
4718
|
};
|
|
4701
4719
|
export interface TransactionJSON {
|
|
4702
4720
|
auxiliary_data?: AuxiliaryDataJSON | null;
|