@meshsdk/core-csl 1.6.0-alpha.6 → 1.6.0-alpha.8

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.
@@ -18,6 +18,7 @@ const emptyTxBuilderBody = () => ({
18
18
  validityRange: {},
19
19
  certificates: [],
20
20
  signingKey: [],
21
+ withdrawals: [],
21
22
  });
22
23
  exports.emptyTxBuilderBody = emptyTxBuilderBody;
23
24
  class CSLSerializer {
@@ -7,6 +7,7 @@ export declare const serializeBech32Address: (bech32Addr: string) => {
7
7
  pubKeyHash: string;
8
8
  scriptHash: string;
9
9
  stakeCredential: string;
10
+ stakeScriptCredential: string;
10
11
  };
11
- export declare const scriptHashToBech32: (scriptHash: string, stakeCredential?: string, networkId?: number) => string;
12
- export declare const v2ScriptToBech32: (scriptCbor: string, stakeCredential?: string, networkId?: number) => string;
12
+ export declare const scriptHashToBech32: (scriptHash: string, stakeCredential?: string, networkId?: number, isScriptStakeCredential?: boolean) => string;
13
+ export declare const v2ScriptToBech32: (scriptCbor: string, stakeCredential?: string, networkId?: number, isScriptStakeCredential?: boolean) => string;
@@ -34,10 +34,11 @@ const serializeBech32Address = (bech32Addr) => {
34
34
  pubKeyHash: serializedAddress.get_pub_key_hash(),
35
35
  scriptHash: serializedAddress.get_script_hash(),
36
36
  stakeCredential: serializedAddress.get_stake_key_hash(),
37
+ stakeScriptCredential: serializedAddress.get_stake_key_script_hash(),
37
38
  };
38
39
  };
39
40
  exports.serializeBech32Address = serializeBech32Address;
40
- const scriptHashToBech32 = (scriptHash, stakeCredential, networkId = 0) => deser_1.csl.script_to_address(networkId, scriptHash, stakeCredential);
41
+ const scriptHashToBech32 = (scriptHash, stakeCredential, networkId = 0, isScriptStakeCredential = false) => deser_1.csl.wasm_script_to_address(networkId, scriptHash, stakeCredential, isScriptStakeCredential);
41
42
  exports.scriptHashToBech32 = scriptHashToBech32;
42
- const v2ScriptToBech32 = (scriptCbor, stakeCredential, networkId = 0) => (0, exports.scriptHashToBech32)((0, scripts_1.getV2ScriptHash)(scriptCbor), stakeCredential, networkId);
43
+ const v2ScriptToBech32 = (scriptCbor, stakeCredential, networkId = 0, isScriptStakeCredential = false) => (0, exports.scriptHashToBech32)((0, scripts_1.getV2ScriptHash)(scriptCbor), stakeCredential, networkId, isScriptStakeCredential);
43
44
  exports.v2ScriptToBech32 = v2ScriptToBech32;
@@ -15,6 +15,7 @@ export const emptyTxBuilderBody = () => ({
15
15
  validityRange: {},
16
16
  certificates: [],
17
17
  signingKey: [],
18
+ withdrawals: [],
18
19
  });
19
20
  export class CSLSerializer {
20
21
  protocolParams;
@@ -7,6 +7,7 @@ export declare const serializeBech32Address: (bech32Addr: string) => {
7
7
  pubKeyHash: string;
8
8
  scriptHash: string;
9
9
  stakeCredential: string;
10
+ stakeScriptCredential: string;
10
11
  };
11
- export declare const scriptHashToBech32: (scriptHash: string, stakeCredential?: string, networkId?: number) => string;
12
- export declare const v2ScriptToBech32: (scriptCbor: string, stakeCredential?: string, networkId?: number) => string;
12
+ export declare const scriptHashToBech32: (scriptHash: string, stakeCredential?: string, networkId?: number, isScriptStakeCredential?: boolean) => string;
13
+ export declare const v2ScriptToBech32: (scriptCbor: string, stakeCredential?: string, networkId?: number, isScriptStakeCredential?: boolean) => string;
@@ -27,7 +27,8 @@ export const serializeBech32Address = (bech32Addr) => {
27
27
  pubKeyHash: serializedAddress.get_pub_key_hash(),
28
28
  scriptHash: serializedAddress.get_script_hash(),
29
29
  stakeCredential: serializedAddress.get_stake_key_hash(),
30
+ stakeScriptCredential: serializedAddress.get_stake_key_script_hash(),
30
31
  };
31
32
  };
32
- export const scriptHashToBech32 = (scriptHash, stakeCredential, networkId = 0) => csl.script_to_address(networkId, scriptHash, stakeCredential);
33
- export const v2ScriptToBech32 = (scriptCbor, stakeCredential, networkId = 0) => scriptHashToBech32(getV2ScriptHash(scriptCbor), stakeCredential, networkId);
33
+ export const scriptHashToBech32 = (scriptHash, stakeCredential, networkId = 0, isScriptStakeCredential = false) => csl.wasm_script_to_address(networkId, scriptHash, stakeCredential, isScriptStakeCredential);
34
+ export const v2ScriptToBech32 = (scriptCbor, stakeCredential, networkId = 0, isScriptStakeCredential = false) => scriptHashToBech32(getV2ScriptHash(scriptCbor), stakeCredential, networkId, isScriptStakeCredential);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@meshsdk/core-csl",
3
3
  "description": "Cardano Off-chain Code APIs built on cardano-serialization-lib",
4
- "version": "1.6.0-alpha.6",
4
+ "version": "1.6.0-alpha.8",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/cjs/index.js",
7
7
  "module": "dist/mjs/index.js",
@@ -38,8 +38,8 @@
38
38
  "@sidan-lab/sidan-csl-rs-nodejs": "@sidan-lab/sidan-csl-rs-browser"
39
39
  },
40
40
  "dependencies": {
41
- "@sidan-lab/sidan-csl-rs-browser": "^0.5.0-alpha.9",
42
- "@sidan-lab/sidan-csl-rs-nodejs": "^0.5.0-alpha.9",
41
+ "@sidan-lab/sidan-csl-rs-browser": "^0.5.4",
42
+ "@sidan-lab/sidan-csl-rs-nodejs": "^0.5.4",
43
43
  "blakejs": "^1.2.1",
44
44
  "json-bigint": "^1.0.0"
45
45
  },