@biglup/cometa 1.0.7 → 1.0.111

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.
@@ -1004,6 +1004,13 @@ declare const uint8ArrayToHex: (byteArray: Uint8Array) => string;
1004
1004
  * @returns {Uint8Array} The converted Uint8Array.
1005
1005
  */
1006
1006
  declare const utf8ToUint8Array: (str: string) => Uint8Array;
1007
+ /**
1008
+ * Converts a UTF-8 string to its hex string representation.
1009
+ *
1010
+ * @param {string} str - The UTF-8 string to convert.
1011
+ * @returns {string} The hex string representation of the UTF-8 string.
1012
+ */
1013
+ declare const utf8ToHex: (str: string) => string;
1007
1014
  /**
1008
1015
  * Converts a Uint8Array to a UTF-8 string.
1009
1016
  *
@@ -1011,6 +1018,15 @@ declare const utf8ToUint8Array: (str: string) => Uint8Array;
1011
1018
  * @returns {string} The converted UTF-8 string.
1012
1019
  */
1013
1020
  declare const uint8ArrayToUtf8: (uint8Array: Uint8Array) => string;
1021
+ /**
1022
+ * Decodes a Base64 encoded string to a Uint8Array.
1023
+ * This function is isomorphic, providing an optimized path for Node.js
1024
+ * and a universal fallback for browsers.
1025
+ *
1026
+ * @param {string} base64 - The Base64 encoded string to decode.
1027
+ * @returns {Uint8Array} A Uint8Array containing the decoded bytes.
1028
+ */
1029
+ declare const base64ToBytes: (base64: string) => Uint8Array;
1014
1030
  /**
1015
1031
  * A simple state tracker to manually signal when an async operation,
1016
1032
  * callable from WASM, has been initiated.
@@ -1038,11 +1054,11 @@ interface Anchor {
1038
1054
  */
1039
1055
  declare enum Vote {
1040
1056
  /** A vote against the governance action. */
1041
- no = 0,
1057
+ No = 0,
1042
1058
  /** A vote in favor of the governance action. */
1043
- yes = 1,
1059
+ Yes = 1,
1044
1060
  /** A vote to abstain, neither for nor against the action. */
1045
- abstain = 2
1061
+ Abstain = 2
1046
1062
  }
1047
1063
  /**
1048
1064
  * Encapsulates a single voting action, including the vote itself
@@ -1123,6 +1139,49 @@ declare const isDRepNoConfidence: (drep: DRep) => drep is AlwaysNoConfidence;
1123
1139
  * @returns {boolean} True if the DRep is of the 'Credential' type.
1124
1140
  */
1125
1141
  declare const isDRepCredential: (drep: DRep) => drep is Credential;
1142
+ /**
1143
+ * Deserializes a Bech32-encoded governance action ID string into a GovernanceActionId object.
1144
+ *
1145
+ * This function parses a governance action ID string (e.g., "gov_action1...") according to the
1146
+ * [CIP-129](https://cips.cardano.org/cip/CIP-129) specification and returns a structured object
1147
+ * containing the transaction ID and action index.
1148
+ *
1149
+ * @param {string} bech32 - The CIP-129 formatted, Bech32-encoded governance action ID string.
1150
+ * @returns {GovernanceActionId} A structured object representing the governance action ID.
1151
+ * @throws {Error} Throws an error if the Bech32 string is malformed or invalid.
1152
+ * @see {@link https://cips.cardano.org/cip/CIP-129|CIP-129} for the official specification.
1153
+ * @example
1154
+ * const bech32Id = 'gov_action1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqpzklpgpf';
1155
+ * const govActionId = govActionIdFromBech32(bech32Id);
1156
+ *
1157
+ * console.log(govActionId.id);
1158
+ * //-> "0000000000000000000000000000000000000000000000000000000000000000"
1159
+ *
1160
+ * console.log(govActionId.actionIndex);
1161
+ * //-> 11
1162
+ */
1163
+ declare const govActionIdFromBech32: (bech32: string) => GovernanceActionId;
1164
+ /**
1165
+ * Serializes a GovernanceActionId object into its Bech32 string representation.
1166
+ *
1167
+ * This function converts a structured GovernanceActionId object (containing a transaction ID
1168
+ * and action index) into its CIP-129 formatted Bech32 string (e.g., "gov_action1...").
1169
+ *
1170
+ * @param {GovernanceActionId} govActionId - The structured object to serialize.
1171
+ * @returns {string} The Bech32-encoded governance action ID string.
1172
+ * @throws {Error} Throws an error if the serialization fails.
1173
+ * @see {@link https://cips.cardano.org/cip/CIP-129|CIP-129} for the official specification.
1174
+ * @example
1175
+ * const govActionId = {
1176
+ * id: '0000000000000000000000000000000000000000000000000000000000000000',
1177
+ * actionIndex: 11
1178
+ * };
1179
+ * const bech32Id = govActionIdToBech32(govActionId);
1180
+ *
1181
+ * console.log(bech32Id);
1182
+ * //-> "gov_action1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqpzklpgpf"
1183
+ */
1184
+ declare const govActionIdToBech32: (govActionId: GovernanceActionId) => string;
1126
1185
 
1127
1186
  /**
1128
1187
  * This relay points to a single host via its ipv4/ipv6 address and a given port.
@@ -1572,6 +1631,291 @@ interface CostModel {
1572
1631
  costs: number[];
1573
1632
  }
1574
1633
 
1634
+ /** Plutus script type. */
1635
+ declare enum ScriptType {
1636
+ Native = "native",
1637
+ Plutus = "plutus"
1638
+ }
1639
+ /** native script kind. */
1640
+ declare enum NativeScriptKind {
1641
+ RequireSignature = 0,
1642
+ RequireAllOf = 1,
1643
+ RequireAnyOf = 2,
1644
+ RequireNOf = 3,
1645
+ RequireTimeAfter = 4,
1646
+ RequireTimeBefore = 5
1647
+ }
1648
+ /**
1649
+ * This script evaluates to true if the transaction also includes a valid key witness
1650
+ * where the witness verification key hashes to the given hash.
1651
+ *
1652
+ * In other words, this checks that the transaction is signed by a particular key, identified by its verification
1653
+ * key hash.
1654
+ */
1655
+ interface RequireSignatureScript {
1656
+ /** Script type. */
1657
+ type: ScriptType.Native;
1658
+ /** The hash of a verification key. */
1659
+ keyHash: string;
1660
+ /** The native script kind. */
1661
+ kind: NativeScriptKind.RequireSignature;
1662
+ }
1663
+ /**
1664
+ * This script evaluates to true if all the sub-scripts evaluate to true.
1665
+ *
1666
+ * If the list of sub-scripts is empty, this script evaluates to true.
1667
+ */
1668
+ interface RequireAllOfScript {
1669
+ /** Script type. */
1670
+ type: ScriptType.Native;
1671
+ /** The list of sub-scripts. */
1672
+ scripts: NativeScript[];
1673
+ /** The native script kind. */
1674
+ kind: NativeScriptKind.RequireAllOf;
1675
+ }
1676
+ /**
1677
+ * This script evaluates to true if any the sub-scripts evaluate to true. That is, if one
1678
+ * or more evaluate to true.
1679
+ *
1680
+ * If the list of sub-scripts is empty, this script evaluates to false.
1681
+ */
1682
+ interface RequireAnyOfScript {
1683
+ /** Script type. */
1684
+ type: ScriptType.Native;
1685
+ /** The list of sub-scripts. */
1686
+ scripts: NativeScript[];
1687
+ /** The native script kind. */
1688
+ kind: NativeScriptKind.RequireAnyOf;
1689
+ }
1690
+ /** This script evaluates to true if at least M (required field) of the sub-scripts evaluate to true. */
1691
+ interface RequireAtLeastScript {
1692
+ /** Script type. */
1693
+ type: ScriptType.Native;
1694
+ /** The number of sub-scripts that must evaluate to true for this script to evaluate to true. */
1695
+ required: number;
1696
+ /** The list of sub-scripts. */
1697
+ scripts: NativeScript[];
1698
+ /** The native script kind. */
1699
+ kind: NativeScriptKind.RequireNOf;
1700
+ }
1701
+ /**
1702
+ * This script evaluates to true if the upper bound of the transaction validity interval is a
1703
+ * slot number Y, and X <= Y.
1704
+ *
1705
+ * This condition guarantees that the actual slot number in which the transaction is included is
1706
+ * (strictly) less than slot number X.
1707
+ */
1708
+ interface RequireTimeBeforeScript {
1709
+ /** Script type. */
1710
+ type: ScriptType.Native;
1711
+ /** The slot number specifying the upper bound of the validity interval. */
1712
+ slot: number;
1713
+ /** The native script kind. */
1714
+ kind: NativeScriptKind.RequireTimeBefore;
1715
+ }
1716
+ /**
1717
+ * This script evaluates to true if the lower bound of the transaction validity interval is a
1718
+ * slot number Y, and Y <= X.
1719
+ *
1720
+ * This condition guarantees that the actual slot number in which the transaction is included
1721
+ * is greater than or equal to slot number X.
1722
+ */
1723
+ interface RequireTimeAfterScript {
1724
+ /** Script type. */
1725
+ type: ScriptType.Native;
1726
+ /** The slot number specifying the lower bound of the validity interval. */
1727
+ slot: number;
1728
+ /** The native script kind. */
1729
+ kind: NativeScriptKind.RequireTimeAfter;
1730
+ }
1731
+ /**
1732
+ * The Native scripts form an expression tree, the evaluation of the script produces either true or false.
1733
+ *
1734
+ * Note that it is recursive. There are no constraints on the nesting or size, except that imposed by the overall
1735
+ * transaction size limit (given that the script must be included in the transaction in a script witnesses).
1736
+ */
1737
+ type NativeScript = RequireAllOfScript | RequireSignatureScript | RequireAnyOfScript | RequireAtLeastScript | RequireTimeBeforeScript | RequireTimeAfterScript;
1738
+ /**
1739
+ * The Cardano ledger tags scripts with a language that determines what the ledger will do with the script.
1740
+ *
1741
+ * In most cases this language will be very similar to the ones that came before, we refer to these as
1742
+ * 'Plutus language versions'. However, from the ledger’s perspective they are entirely unrelated and there
1743
+ * is generally no requirement that they be similar or compatible in any way.
1744
+ */
1745
+ declare enum PlutusLanguageVersion {
1746
+ /** V1 was the initial version of Plutus, introduced in the Alonzo hard fork. */
1747
+ V1 = 0,
1748
+ /**
1749
+ * V2 was introduced in the Vasil hard fork.
1750
+ *
1751
+ * The main changes in V2 of Plutus were to the interface to scripts. The ScriptContext was extended
1752
+ * to include the following information:
1753
+ *
1754
+ * - The full “redeemers” structure, which contains all the redeemers used in the transaction
1755
+ * - Reference inputs in the transaction (proposed in CIP-31)
1756
+ * - Inline datums in the transaction (proposed in CIP-32)
1757
+ * - Reference scripts in the transaction (proposed in CIP-33)
1758
+ */
1759
+ V2 = 1,
1760
+ /**
1761
+ * V3 was introduced in the Conway hard fork.
1762
+ *
1763
+ * The main changes in V3 of Plutus introduce:
1764
+ *
1765
+ * - The value of costmdls map at key 2 is encoded as a definite length list.
1766
+ */
1767
+ V3 = 2
1768
+ }
1769
+ /**
1770
+ * Plutus scripts are pieces of code that implement pure functions with True or False outputs. These functions take
1771
+ * several inputs such as Datum, Redeemer and the transaction context to decide whether an output can be spent or not.
1772
+ */
1773
+ interface PlutusScript {
1774
+ type: ScriptType.Plutus;
1775
+ bytes: string;
1776
+ version: PlutusLanguageVersion;
1777
+ }
1778
+ /** Program that decides whether the transaction that spends the output is authorized to do so. */
1779
+ type Script = NativeScript | PlutusScript;
1780
+ /**
1781
+ * Predicate that returns true if the given core script is a native script.
1782
+ *
1783
+ * @param script The Script to check.
1784
+ */
1785
+ declare const isNativeScript: (script: Script) => script is NativeScript;
1786
+ /**
1787
+ * Predicate that returns true if the given core script is a plutus script.
1788
+ *
1789
+ * @param script The Script to check.
1790
+ */
1791
+ declare const isPlutusScript: (script: Script) => script is PlutusScript;
1792
+ /**
1793
+ * Performs a deep equality check on two Script.
1794
+ *
1795
+ * @param a The first Script object.
1796
+ * @param b The second Script object.
1797
+ * @returns True if the objects are deeply equal, false otherwise.
1798
+ */
1799
+ declare const deepEqualsScript: (a: Script, b: Script) => boolean;
1800
+ /**
1801
+ * Computes the hash of a Script object.
1802
+ *
1803
+ * This function calculates the Blake2b hash of the provided Script.
1804
+ *
1805
+ * @param script The Script object to hash.
1806
+ * @returns The hexadecimal string representation of the hash.
1807
+ */
1808
+ declare const computeScriptHash: (script: Script) => string;
1809
+ /**
1810
+ * Derives a script address (enterprise address) from a script.
1811
+ *
1812
+ * This function calculates the script's hash, creates a script credential from it,
1813
+ * and then constructs an enterprise address for the specified network.
1814
+ *
1815
+ * @param {Script} script The script (Native or Plutus) from which to derive the address.
1816
+ * @param {NetworkId} networkId The network identifier (e.g., Mainnet or Testnet).
1817
+ * @returns {Address} An Address object representing the script address.
1818
+ * @throws {Error} If any step of the address creation process fails.
1819
+ */
1820
+ declare const getScriptAddress: (script: Script, networkId: NetworkId) => Address;
1821
+ /**
1822
+ * Serializes a Script object into its CBOR hexadecimal string representation.
1823
+ *
1824
+ * @param data The Script object to serialize.
1825
+ * @returns A hex-encoded CBOR string.
1826
+ */
1827
+ declare const scriptToCbor: (data: Script) => string;
1828
+ /**
1829
+ * Deserializes a CBOR hexadecimal string into a Script object.
1830
+ *
1831
+ * @param cborHex The hex-encoded CBOR string to deserialize.
1832
+ * @returns The deserialized Script object.
1833
+ */
1834
+ declare const cborToScript: (cborHex: string) => Script;
1835
+ /**
1836
+ * Converts a json representation of a native script into a NativeScript.
1837
+ *
1838
+ * @param json The JSON representation of a native script. The JSON must conform
1839
+ * to the following format:
1840
+ *
1841
+ * https://github.com/input-output-hk/cardano-node/blob/master/doc/reference/simple-scripts.md
1842
+ */
1843
+ declare const jsonToNativeScript: (json: any) => NativeScript;
1844
+ /**
1845
+ * Converts a NativeScript into its json representation.
1846
+ *
1847
+ * @param script The native script to be converted to JSON following the format described at:
1848
+ *
1849
+ * https://github.com/input-output-hk/cardano-node/blob/master/doc/reference/simple-scripts.md
1850
+ */
1851
+ declare const nativeScriptToJson: (script: NativeScript) => any;
1852
+
1853
+ /**
1854
+ * Build a **CIP-105** DRep ID from a governance credential.
1855
+ *
1856
+ * @param credential - Credential containing `type` and hex `hash`.
1857
+ * @returns Bech32-encoded CIP-105 DRep ID (`drep1...` or `drep_script1...`).
1858
+ */
1859
+ declare const cip105DRepFromCredential: (credential: Credential) => string;
1860
+ /**
1861
+ * Build a **CIP-129** DRep ID from a governance credential.
1862
+ *
1863
+ * Prepends the appropriate 1-byte header (0x22 for key-hash, 0x23 for script-hash)
1864
+ * before Bech32-encoding with HRP `drep`.
1865
+ *
1866
+ * @param credential - Credential containing `type` and hex `hash`.
1867
+ * @returns Bech32-encoded CIP-129 DRep ID (`drep1...`).
1868
+ */
1869
+ declare const cip129DRepFromCredential: (credential: Credential) => string;
1870
+ /**
1871
+ * Construct a **CIP-129** DRep ID from a public key.
1872
+ * @param publicKey - Hex-encoded Ed25519 public key.
1873
+ */
1874
+ declare const cip129DRepFromPublicKey: (publicKey: string) => string;
1875
+ /**
1876
+ * Construct a **CIP-129** DRep ID from a script.
1877
+ * @param script - Script that controls the DRep credential.
1878
+ */
1879
+ declare const cip129DRepFromScript: (script: Script) => string;
1880
+ /**
1881
+ * Decode a DRep ID (CIP-105 or CIP-129) back to a governance credential.
1882
+ *
1883
+ * - For **CIP-105**, the credential type is inferred from the HRP (`drep` vs `drep_script`).
1884
+ * - For **CIP-129**, the credential type is inferred from the header byte.
1885
+ *
1886
+ * @param drepId - Bech32-encoded DRep ID (`drep1...` or `drep_script1...`).
1887
+ * @returns The extracted `Credential` (`{ hash, type }`).
1888
+ * @throws Error if the payload length is not `CIP_105_DREP_ID_LENGTH` or `CIP_129_DREP_ID_LENGTH`,
1889
+ * or if a CIP-129 header does not indicate a DRep governance credential.
1890
+ * @see toCip105DRepID
1891
+ * @see toCip129DRepID
1892
+ */
1893
+ declare const dRepToCredential: (drepId: string) => Credential;
1894
+ /**
1895
+ * Convert any DRep ID (CIP-105 or CIP-129) to **CIP-105** form.
1896
+ *
1897
+ * @param drepId - Bech32 DRep ID.
1898
+ * @returns CIP-105 DRep ID (`drep1...` or `drep_script1...`).
1899
+ */
1900
+ declare const toCip105DRepID: (drepId: string) => string;
1901
+ /**
1902
+ * Convert any DRep ID (CIP-105 or CIP-129) to **CIP-129** form.
1903
+ *
1904
+ * @param drepId - Bech32 DRep ID.
1905
+ * @returns CIP-129 DRep ID (`drep1...`).
1906
+ */
1907
+ declare const toCip129DRepID: (drepId: string) => string;
1908
+ /**
1909
+ * Construct a **mainnet enterprise address** from a DRep ID, if possible.
1910
+ *
1911
+ * Uses the extracted governance credential (key-hash or script-hash) as the payment credential.
1912
+ *
1913
+ * @param drepId - Bech32 DRep ID.
1914
+ * @returns A mainnet `EnterpriseAddress`, or `undefined` if construction fails upstream.
1915
+ * @note This always uses `NetworkId.Mainnet`. If you need testnet, create a variant that accepts a `NetworkId`.
1916
+ */
1917
+ declare const dRepToAddress: (drepId: string) => EnterpriseAddress | undefined;
1918
+
1575
1919
  /**
1576
1920
  * Interface representing a unit interval, which is a fraction with a numerator and denominator.
1577
1921
  */
@@ -1746,43 +2090,43 @@ interface ExUnitsPrices {
1746
2090
  }
1747
2091
 
1748
2092
  /**
1749
- * \brief Enumerates the available Cardano network environments.
2093
+ * Enumerates the available Cardano network environments.
1750
2094
  *
1751
2095
  * This enumeration defines the different network environments that can be used
1752
2096
  * with the Cardano provider.
1753
2097
  */
1754
2098
  declare enum NetworkMagic {
1755
2099
  /**
1756
- * \brief The Pre-Production test network.
2100
+ * The Pre-Production test network.
1757
2101
  *
1758
2102
  * The Pre-Production network is a Cardano testnet used for testing features
1759
2103
  * before they are deployed to the Mainnet. It closely mirrors the Mainnet
1760
2104
  * environment, providing a final testing ground for applications.
1761
2105
  */
1762
- PREPROD = 1,
2106
+ Preprod = 1,
1763
2107
  /**
1764
- * \brief The Preview test network.
2108
+ * The Preview test network.
1765
2109
  *
1766
2110
  * The Preview network is a Cardano testnet used for testing upcoming features
1767
2111
  * before they are released to the Pre-Production network. It allows developers
1768
2112
  * to experiment with new functionalities in a controlled environment.
1769
2113
  */
1770
- PREVIEW = 2,
2114
+ Preview = 2,
1771
2115
  /**
1772
- * \brief The SanchoNet test network.
2116
+ * The SanchoNet test network.
1773
2117
  *
1774
2118
  * SanchoNet is the testnet for rolling out governance features for the Cardano blockchain,
1775
2119
  * aligning with the comprehensive CIP-1694 specifications.
1776
2120
  */
1777
- SANCHONET = 4,
2121
+ Sanchonet = 4,
1778
2122
  /**
1779
- * \brief The Mainnet network.
2123
+ * The Mainnet network.
1780
2124
  *
1781
2125
  * The Mainnet is the live Cardano network where real transactions occur.
1782
2126
  * Applications interacting with the Mainnet are dealing with actual ADA and
1783
2127
  * other assets. Caution should be exercised to ensure correctness and security.
1784
2128
  */
1785
- MAINNET = 764824073
2129
+ Mainnet = 764824073
1786
2130
  }
1787
2131
 
1788
2132
  /**
@@ -1869,227 +2213,8 @@ interface Redeemer {
1869
2213
  index: number;
1870
2214
  purpose: RedeemerPurpose;
1871
2215
  data: PlutusData;
1872
- executionUnits: ExUnits;
1873
- }
1874
-
1875
- /** Plutus script type. */
1876
- declare enum ScriptType {
1877
- Native = "native",
1878
- Plutus = "plutus"
1879
- }
1880
- /** native script kind. */
1881
- declare enum NativeScriptKind {
1882
- RequireSignature = 0,
1883
- RequireAllOf = 1,
1884
- RequireAnyOf = 2,
1885
- RequireNOf = 3,
1886
- RequireTimeAfter = 4,
1887
- RequireTimeBefore = 5
1888
- }
1889
- /**
1890
- * This script evaluates to true if the transaction also includes a valid key witness
1891
- * where the witness verification key hashes to the given hash.
1892
- *
1893
- * In other words, this checks that the transaction is signed by a particular key, identified by its verification
1894
- * key hash.
1895
- */
1896
- interface RequireSignatureScript {
1897
- /** Script type. */
1898
- __type: ScriptType.Native;
1899
- /** The hash of a verification key. */
1900
- keyHash: string;
1901
- /** The native script kind. */
1902
- kind: NativeScriptKind.RequireSignature;
1903
- }
1904
- /**
1905
- * This script evaluates to true if all the sub-scripts evaluate to true.
1906
- *
1907
- * If the list of sub-scripts is empty, this script evaluates to true.
1908
- */
1909
- interface RequireAllOfScript {
1910
- /** Script type. */
1911
- __type: ScriptType.Native;
1912
- /** The list of sub-scripts. */
1913
- scripts: NativeScript[];
1914
- /** The native script kind. */
1915
- kind: NativeScriptKind.RequireAllOf;
1916
- }
1917
- /**
1918
- * This script evaluates to true if any the sub-scripts evaluate to true. That is, if one
1919
- * or more evaluate to true.
1920
- *
1921
- * If the list of sub-scripts is empty, this script evaluates to false.
1922
- */
1923
- interface RequireAnyOfScript {
1924
- /** Script type. */
1925
- __type: ScriptType.Native;
1926
- /** The list of sub-scripts. */
1927
- scripts: NativeScript[];
1928
- /** The native script kind. */
1929
- kind: NativeScriptKind.RequireAnyOf;
1930
- }
1931
- /** This script evaluates to true if at least M (required field) of the sub-scripts evaluate to true. */
1932
- interface RequireAtLeastScript {
1933
- /** Script type. */
1934
- __type: ScriptType.Native;
1935
- /** The number of sub-scripts that must evaluate to true for this script to evaluate to true. */
1936
- required: number;
1937
- /** The list of sub-scripts. */
1938
- scripts: NativeScript[];
1939
- /** The native script kind. */
1940
- kind: NativeScriptKind.RequireNOf;
1941
- }
1942
- /**
1943
- * This script evaluates to true if the upper bound of the transaction validity interval is a
1944
- * slot number Y, and X <= Y.
1945
- *
1946
- * This condition guarantees that the actual slot number in which the transaction is included is
1947
- * (strictly) less than slot number X.
1948
- */
1949
- interface RequireTimeBeforeScript {
1950
- /** Script type. */
1951
- __type: ScriptType.Native;
1952
- /** The slot number specifying the upper bound of the validity interval. */
1953
- slot: number;
1954
- /** The native script kind. */
1955
- kind: NativeScriptKind.RequireTimeBefore;
1956
- }
1957
- /**
1958
- * This script evaluates to true if the lower bound of the transaction validity interval is a
1959
- * slot number Y, and Y <= X.
1960
- *
1961
- * This condition guarantees that the actual slot number in which the transaction is included
1962
- * is greater than or equal to slot number X.
1963
- */
1964
- interface RequireTimeAfterScript {
1965
- /** Script type. */
1966
- __type: ScriptType.Native;
1967
- /** The slot number specifying the lower bound of the validity interval. */
1968
- slot: number;
1969
- /** The native script kind. */
1970
- kind: NativeScriptKind.RequireTimeAfter;
1971
- }
1972
- /**
1973
- * The Native scripts form an expression tree, the evaluation of the script produces either true or false.
1974
- *
1975
- * Note that it is recursive. There are no constraints on the nesting or size, except that imposed by the overall
1976
- * transaction size limit (given that the script must be included in the transaction in a script witnesses).
1977
- */
1978
- type NativeScript = RequireAllOfScript | RequireSignatureScript | RequireAnyOfScript | RequireAtLeastScript | RequireTimeBeforeScript | RequireTimeAfterScript;
1979
- /**
1980
- * The Cardano ledger tags scripts with a language that determines what the ledger will do with the script.
1981
- *
1982
- * In most cases this language will be very similar to the ones that came before, we refer to these as
1983
- * 'Plutus language versions'. However, from the ledger’s perspective they are entirely unrelated and there
1984
- * is generally no requirement that they be similar or compatible in any way.
1985
- */
1986
- declare enum PlutusLanguageVersion {
1987
- /** V1 was the initial version of Plutus, introduced in the Alonzo hard fork. */
1988
- V1 = 0,
1989
- /**
1990
- * V2 was introduced in the Vasil hard fork.
1991
- *
1992
- * The main changes in V2 of Plutus were to the interface to scripts. The ScriptContext was extended
1993
- * to include the following information:
1994
- *
1995
- * - The full “redeemers” structure, which contains all the redeemers used in the transaction
1996
- * - Reference inputs in the transaction (proposed in CIP-31)
1997
- * - Inline datums in the transaction (proposed in CIP-32)
1998
- * - Reference scripts in the transaction (proposed in CIP-33)
1999
- */
2000
- V2 = 1,
2001
- /**
2002
- * V3 was introduced in the Conway hard fork.
2003
- *
2004
- * The main changes in V3 of Plutus introduce:
2005
- *
2006
- * - The value of costmdls map at key 2 is encoded as a definite length list.
2007
- */
2008
- V3 = 2
2009
- }
2010
- /**
2011
- * Plutus scripts are pieces of code that implement pure functions with True or False outputs. These functions take
2012
- * several inputs such as Datum, Redeemer and the transaction context to decide whether an output can be spent or not.
2013
- */
2014
- interface PlutusScript {
2015
- __type: ScriptType.Plutus;
2016
- bytes: string;
2017
- version: PlutusLanguageVersion;
2018
- }
2019
- /** Program that decides whether the transaction that spends the output is authorized to do so. */
2020
- type Script = NativeScript | PlutusScript;
2021
- /**
2022
- * Predicate that returns true if the given core script is a native script.
2023
- *
2024
- * @param script The Script to check.
2025
- */
2026
- declare const isNativeScript: (script: Script) => script is NativeScript;
2027
- /**
2028
- * Predicate that returns true if the given core script is a plutus script.
2029
- *
2030
- * @param script The Script to check.
2031
- */
2032
- declare const isPlutusScript: (script: Script) => script is PlutusScript;
2033
- /**
2034
- * Performs a deep equality check on two Script.
2035
- *
2036
- * @param a The first Script object.
2037
- * @param b The second Script object.
2038
- * @returns True if the objects are deeply equal, false otherwise.
2039
- */
2040
- declare const deepEqualsScript: (a: Script, b: Script) => boolean;
2041
- /**
2042
- * Computes the hash of a Script object.
2043
- *
2044
- * This function calculates the Blake2b hash of the provided Script.
2045
- *
2046
- * @param script The Script object to hash.
2047
- * @returns The hexadecimal string representation of the hash.
2048
- */
2049
- declare const computeScriptHash: (script: Script) => string;
2050
- /**
2051
- * Derives a script address (enterprise address) from a script.
2052
- *
2053
- * This function calculates the script's hash, creates a script credential from it,
2054
- * and then constructs an enterprise address for the specified network.
2055
- *
2056
- * @param {Script} script The script (Native or Plutus) from which to derive the address.
2057
- * @param {NetworkId} networkId The network identifier (e.g., Mainnet or Testnet).
2058
- * @returns {Address} An Address object representing the script address.
2059
- * @throws {Error} If any step of the address creation process fails.
2060
- */
2061
- declare const getScriptAddress: (script: Script, networkId: NetworkId) => Address;
2062
- /**
2063
- * Serializes a Script object into its CBOR hexadecimal string representation.
2064
- *
2065
- * @param data The Script object to serialize.
2066
- * @returns A hex-encoded CBOR string.
2067
- */
2068
- declare const scriptToCbor: (data: Script) => string;
2069
- /**
2070
- * Deserializes a CBOR hexadecimal string into a Script object.
2071
- *
2072
- * @param cborHex The hex-encoded CBOR string to deserialize.
2073
- * @returns The deserialized Script object.
2074
- */
2075
- declare const cborToScript: (cborHex: string) => Script;
2076
- /**
2077
- * Converts a json representation of a native script into a NativeScript.
2078
- *
2079
- * @param json The JSON representation of a native script. The JSON must conform
2080
- * to the following format:
2081
- *
2082
- * https://github.com/input-output-hk/cardano-node/blob/master/doc/reference/simple-scripts.md
2083
- */
2084
- declare const jsonToNativeScript: (json: any) => NativeScript;
2085
- /**
2086
- * Converts a NativeScript into its json representation.
2087
- *
2088
- * @param script The native script to be converted to JSON following the format described at:
2089
- *
2090
- * https://github.com/input-output-hk/cardano-node/blob/master/doc/reference/simple-scripts.md
2091
- */
2092
- declare const nativeScriptToJson: (script: NativeScript) => any;
2216
+ executionUnits: ExUnits;
2217
+ }
2093
2218
 
2094
2219
  /**
2095
2220
  * Interface representing a transaction input in the Cardano blockchain.
@@ -4412,7 +4537,7 @@ declare class SoftwareBip32SecureKeyHandler implements Bip32SecureKeyHandler {
4412
4537
  * @returns {Promise<Bip32SecureKeyHandler>} A new instance of the key handler.
4413
4538
  * @warning For security, this function will zero out the `entropy` and `passphrase` Uint8Array buffers after they are used. Do not reuse them.
4414
4539
  */
4415
- static fromEntropy(entropy: Uint8Array, passphrase: Uint8Array, getPassphrase: () => Promise<Uint8Array>): Promise<Bip32SecureKeyHandler>;
4540
+ static fromEntropy(entropy: Uint8Array, passphrase: Uint8Array, getPassphrase: () => Promise<Uint8Array>): Bip32SecureKeyHandler;
4416
4541
  /**
4417
4542
  * Deserializes an encrypted key handler from a byte array.
4418
4543
  *
@@ -4603,12 +4728,9 @@ declare const readBlake2bHashData: (bufferPtr: number, freeNativeObject?: boolea
4603
4728
  * and their corresponding WASM memory representations.
4604
4729
  */
4605
4730
  declare const bridgeCallbacks: {
4606
- get_provider_from_registry(objectId: number): any;
4607
4731
  get_coin_selector_from_registry(objectId: number): any;
4732
+ get_provider_from_registry(objectId: number): any;
4608
4733
  get_tx_evaluator_from_registry(objectId: number): any;
4609
- report_provider_bridge_error(objectId: number, exception: any): void;
4610
- report_coin_selector_bridge_error(objectId: number, exception: any): void;
4611
- report_tx_evaluator_bridge_error(objectId: number, exception: any): void;
4612
4734
  marshal_blake2b_hash_from_hex(jsHexString: string): number;
4613
4735
  marshal_plutus_data(jsPlutusDataCborHex: string): number;
4614
4736
  marshal_protocol_parameters(params: ProtocolParameters): number;
@@ -4617,8 +4739,11 @@ declare const bridgeCallbacks: {
4617
4739
  marshal_utxo_list(jsUtxoArray: UTxO[]): number;
4618
4740
  marshall_address(addressPtr: number): string;
4619
4741
  marshall_asset_id(assetIdPtr: number): string;
4742
+ report_coin_selector_bridge_error(objectId: number, exception: any): void;
4620
4743
  marshall_blake2b_hash(hashPtr: number): string;
4744
+ report_provider_bridge_error(objectId: number, exception: any): void;
4621
4745
  marshall_reward_address(rewardAddressPtr: number): string;
4746
+ report_tx_evaluator_bridge_error(objectId: number, exception: any): void;
4622
4747
  marshall_transaction_to_cbor_hex(txPtr: number): string;
4623
4748
  marshall_tx_input_set(inputSetPtr: number): TxIn[];
4624
4749
  marshall_utxo_list_to_js(utxoListPtr: number): UTxO[];
@@ -5593,6 +5718,16 @@ declare const utf8ByteLen: (str: string) => number;
5593
5718
  * @returns {string} A human-readable string describing the error, or `'Unknown error'` if the conversion fails.
5594
5719
  */
5595
5720
  declare const getErrorString: (error: number) => string;
5721
+ /**
5722
+ * Reads a null-terminated UTF-8 string from the WebAssembly memory.
5723
+ *
5724
+ * @param {number} ptr - The pointer to the beginning of the string in Wasm memory.
5725
+ * @returns {string} The resulting JavaScript string.
5726
+ * @remarks
5727
+ * This function only reads the string; it does not free the pointer. The caller is
5728
+ * responsible for managing the memory of the C string if it was dynamically allocated.
5729
+ */
5730
+ declare const readStringFromMemory: (ptr: number) => string;
5596
5731
 
5597
5732
  /**
5598
5733
  * @hidden
@@ -5612,6 +5747,32 @@ declare const writeTransactionToCbor: (transactionPtr: number) => string;
5612
5747
  * @throws {Error} Throws an error if the deserialization fails, including a descriptive message from the CBOR parser.
5613
5748
  */
5614
5749
  declare const readTransactionFromCbor: (transactionCbor: string) => number;
5750
+ /**
5751
+ * @hidden
5752
+ * Extracts the unique set of public key hashes (signers) required to authorize a Cardano transaction.
5753
+ *
5754
+ * This function computes the required signers by analyzing the transaction body and a list of
5755
+ * resolved input UTxOs.
5756
+ *
5757
+ * @param {string} transactionCbor - The CBOR representation of the transaction as a hex string.
5758
+ * @param {UTxO[]} utxos - An array of resolved UTxO objects that are spent by the transaction. If
5759
+ * empty, the function won't resolve signers from inputs or collateral inputs. Additionally if the resolved
5760
+ * inputs are provided, they must account for all inputs and collateral inputs in the transaction or the function will fail.
5761
+ * @returns {string[]} An array of unique public key hashes (signers) as hex strings.
5762
+ * @throws {Error} Throws an error if any part of the process fails.
5763
+ */
5764
+ declare const getUniqueSigners: (transactionCbor: string, utxos: UTxO[]) => string[];
5765
+ /**
5766
+ * @brief Inspects a Cardano transaction CBOR string and converts it into a structured JavaScript object (JSON).
5767
+ *
5768
+ * This function takes a hexadecimal CBOR representation of a Cardano transaction and then serializes it
5769
+ * into a CIP-116 compliant JSON string. Finally, it parses the JSON string into a native JavaScript object.
5770
+ *
5771
+ * @param {string} transactionCbor The hexadecimal string representation of the Cardano transaction CBOR.
5772
+ * @returns {any} A JavaScript object representing the decoded Cardano transaction structure (CIP-116 JSON format).
5773
+ * @throws {Error} If CBOR reading fails, JSON encoding fails, or memory allocation fails.
5774
+ */
5775
+ declare const inspectTx: (transactionCbor: string) => any;
5615
5776
 
5616
5777
  /**
5617
5778
  * @hidden
@@ -5678,6 +5839,15 @@ declare const readTxOut: (ptr: number) => TxOut;
5678
5839
  * @throws {Error} Throws an error if any part of the creation fails (e.g., invalid address format).
5679
5840
  */
5680
5841
  declare const writeTxOut: (txOut: TxOut) => number;
5842
+ /**
5843
+ * @hidden
5844
+ * Deserializes a TxOut from its CBOR hex string representation into a TxOut object.
5845
+ *
5846
+ * @param {string} txOutCbor - The CBOR representation of the TxOut, encoded as a hexadecimal string.
5847
+ * @returns {number} A pointer to the newly created value object in WASM memory.
5848
+ * @throws {Error} Throws an error if the deserialization fails, including a descriptive message from the CBOR parser.
5849
+ */
5850
+ declare const readTxOutFromCbor: (txOutCbor: string) => TxOut;
5681
5851
 
5682
5852
  /**
5683
5853
  * @hidden
@@ -5771,6 +5941,15 @@ declare const writeUtxoList: (utxos: UTxO[]) => number;
5771
5941
  * @returns {UTxO[]} The JavaScript representation of the UTxO list.
5772
5942
  */
5773
5943
  declare const readUtxoList: (ptr: number) => UTxO[];
5944
+ /**
5945
+ * @hidden
5946
+ * Deserializes a UTxO from its CBOR hex string representation into a UTxO object.
5947
+ *
5948
+ * @param {string} utxoCbor - The CBOR representation of the UTxO, encoded as a hexadecimal string.
5949
+ * @returns {number} A pointer to the newly created value object in WASM memory.
5950
+ * @throws {Error} Throws an error if the deserialization fails, including a descriptive message from the CBOR parser.
5951
+ */
5952
+ declare const readUTxOtFromCbor: (utxoCbor: string) => UTxO;
5774
5953
 
5775
5954
  /**
5776
5955
  * @hidden
@@ -5792,6 +5971,15 @@ declare const readValue: (ptr: number) => Value;
5792
5971
  * @throws {Error} If adding an asset to the native value object fails.
5793
5972
  */
5794
5973
  declare const writeValue: (value: Value) => number;
5974
+ /**
5975
+ * @hidden
5976
+ * Deserializes a value from its CBOR hex string representation into a Value object.
5977
+ *
5978
+ * @param {string} valueCbor - The CBOR representation of the value, encoded as a hexadecimal string.
5979
+ * @returns {number} A pointer to the newly created value object in WASM memory.
5980
+ * @throws {Error} Throws an error if the deserialization fails, including a descriptive message from the CBOR parser.
5981
+ */
5982
+ declare const readValueFromCbor: (valueCbor: string) => Value;
5795
5983
 
5796
5984
  /**
5797
5985
  * @hidden
@@ -5819,12 +6007,13 @@ declare const writeVoter: (voter: Voter) => number;
5819
6007
  declare const readGovernanceActionId: (ptr: number) => GovernanceActionId;
5820
6008
  /**
5821
6009
  * @hidden
5822
- * Serializes a JavaScript `GovernanceActionId` object into a native `cardano_governance_action_id_t` object.
6010
+ * Serializes a JavaScript `GovernanceActionId` object or Bech32 string into a
6011
+ * native `cardano_governance_action_id_t` object pointer.
5823
6012
  *
5824
- * @param {GovernanceActionId} govActionId - The `GovernanceActionId` object to serialize.
6013
+ * @param {GovernanceActionId | string} govActionId - The `GovernanceActionId` object or Bech32 string to serialize.
5825
6014
  * @returns {number} A pointer to the newly created native `cardano_governance_action_id_t` object.
5826
6015
  */
5827
- declare const writeGovernanceActionId: (govActionId: GovernanceActionId) => number;
6016
+ declare const writeGovernanceActionId: (govActionId: GovernanceActionId | string) => number;
5828
6017
  /**
5829
6018
  * @hidden
5830
6019
  * Deserializes a native `cardano_voting_procedure_t` object into a JavaScript `VotingProcedure` object.
@@ -5850,6 +6039,7 @@ declare const writeVotingProcedure: (votingProcedure: VotingProcedure) => number
5850
6039
  */
5851
6040
  declare const readVkeyWitnessSet: (setPtr: number) => VkeyWitnessSet;
5852
6041
  /**
6042
+ * @hidden
5853
6043
  * Serializes a JavaScript `VkeyWitnessSet` array into a native C `cardano_vkey_witness_set_t`.
5854
6044
  *
5855
6045
  * @param {VkeyWitnessSet} set - The array of `VkeyWitness` objects to serialize.
@@ -5866,7 +6056,23 @@ declare const writeVkeyWitnessSet: (set: VkeyWitnessSet) => number;
5866
6056
  * The caller is responsible for freeing this memory using `module._free()`.
5867
6057
  */
5868
6058
  declare const writeDerivationPaths: (paths: DerivationPath[]) => number;
6059
+ /**
6060
+ * @hidden
6061
+ * Serializes a JavaScript `AccountDerivationPath` object into a C-style struct
6062
+ * @param path - The `AccountDerivationPath` object to serialize.
6063
+ *
6064
+ * @return {number} A pointer to the start of the allocated memory block for the C struct.
6065
+ */
5869
6066
  declare const writeAccountDerivationPaths: (path: AccountDerivationPath) => number;
6067
+ /**
6068
+ * @hidden
6069
+ * Deserializes a vkey witness set from a transaction witness set in CBOR hex string representation into a VkeyWitnessSet.
6070
+ *
6071
+ * @param {string} witnessSetCbor - The CBOR representation of the witness set, encoded as a hexadecimal string.
6072
+ * @returns {VkeyWitnessSet} The deserialized `VkeyWitnessSet` object containing an array of `VkeyWitness` objects.
6073
+ * @throws {Error} Throws an error if the deserialization fails, including a descriptive message from the CBOR parser.
6074
+ */
6075
+ declare const readVkeyWitnessSetFromWitnessSetCbor: (witnessSetCbor: string) => VkeyWitnessSet;
5870
6076
 
5871
6077
  /**
5872
6078
  * @hidden
@@ -6015,6 +6221,17 @@ interface Provider {
6015
6221
  * @returns {[object, object]} A tuple containing the JSON for the input and the output.
6016
6222
  */
6017
6223
  declare const prepareUtxoForEvaluation: (utxo: UTxO) => [object, object];
6224
+ /**
6225
+ * Configuration options for the BlockfrostProvider.
6226
+ */
6227
+ type BlockfrostProviderConfig = {
6228
+ /** The network identifier (e.g., Mainnet, Preprod). This is ignored if a custom `url` is provided. */
6229
+ network: NetworkMagic;
6230
+ /** The Blockfrost project ID for authentication. */
6231
+ projectId: string;
6232
+ /** An optional, custom base URL for the Blockfrost API. Overrides the `network` setting for URL construction. */
6233
+ baseUrl?: string;
6234
+ };
6018
6235
  /**
6019
6236
  * BlockfrostProvider is a provider for interacting with the Blockfrost API.
6020
6237
  *
@@ -6028,19 +6245,19 @@ declare class BlockfrostProvider implements Provider {
6028
6245
  /**
6029
6246
  * Creates an instance of BlockfrostProvider.
6030
6247
  *
6031
- * @param {NetworkMagic} network The network magic number (e.g., MAINNET, PREPROD).
6032
- * @param {string} projectId The Blockfrost project ID.
6248
+ * @param {BlockfrostProviderConfig} config - The configuration object for the provider.
6249
+ * @param {string} config.projectId - The Blockfrost project ID for authentication.
6250
+ * @param {string} [config.baseUrl] - An optional, custom base URL for the API. If provided, this URL is used directly and the `network` parameter is ignored for URL construction.
6251
+ * @param {NetworkMagic} [config.network] - The network identifier (e.g., Mainnet, Preprod). This is required if a custom `url` is not provided.
6033
6252
  */
6034
- constructor({ network, projectId }: {
6035
- network: NetworkMagic;
6036
- projectId: string;
6037
- });
6253
+ constructor({ network, projectId, baseUrl }: BlockfrostProviderConfig);
6038
6254
  /**
6039
6255
  * Returns the headers required for Blockfrost API requests.
6040
6256
  *
6041
6257
  * @returns {Object} An object containing the project ID header.
6042
6258
  */
6043
6259
  headers(): {
6260
+ Origin: string;
6044
6261
  project_id: string;
6045
6262
  };
6046
6263
  /**
@@ -6361,25 +6578,75 @@ declare class TransactionBuilder {
6361
6578
  * This function marks the transaction as invalid if it is not included in a block
6362
6579
  * before the specified time.
6363
6580
  *
6364
- * @param {number | bigint | Date} value The expiration time for the transaction.
6365
- * - If a `number` or `bigint` is provided, it is treated as an absolute **slot number**.
6366
- * - If a `Date` object is provided, it is converted to a **Unix timestamp** (in seconds).
6581
+ * @param {number | bigint} slot The absolute **slot number** after which this transaction will be invalid.
6582
+ * @returns {TransactionBuilder} The builder instance for chaining.
6583
+ */
6584
+ setInvalidAfter(slot: number | bigint): TransactionBuilder;
6585
+ /**
6586
+ * Sets the transaction to be valid for a specific duration from now.
6587
+ *
6588
+ * This is a convenience method that calculates a future expiration date and sets it.
6589
+ * The transaction will be marked as invalid if it is not included in a block
6590
+ * within the specified duration.
6591
+ *
6592
+ * @param {number} seconds - The number of seconds from now that the transaction should remain valid.
6593
+ * @returns {TransactionBuilder} The builder instance for chaining.
6594
+ *
6595
+ * @example
6596
+ * // Set the transaction to expire in 3 minutes (180 seconds) from now.
6597
+ * txBuilder.setValidFor(180);
6598
+ */
6599
+ expiresIn(seconds: number): TransactionBuilder;
6600
+ /**
6601
+ * Sets the transaction's expiration to a specific, absolute date and time.
6602
+ *
6603
+ * This function marks the transaction as invalid if it is not included in a block
6604
+ * before the specified date.
6605
+ *
6606
+ * @param {Date} date - The absolute date and time after which the transaction will be invalid.
6367
6607
  * @returns {TransactionBuilder} The builder instance for chaining.
6608
+ *
6609
+ * @example
6610
+ * // Set the transaction to expire on New Year's Day, 2026.
6611
+ * const expiryDate = new Date('2026-01-01T00:00:00Z');
6612
+ * txBuilder.expiresAfter(expiryDate);
6368
6613
  */
6369
- setInvalidAfter(value: number | bigint | Date): TransactionBuilder;
6614
+ expiresAfter(date: Date): TransactionBuilder;
6370
6615
  /**
6371
- * Sets the transaction's validity start time.
6616
+ * Sets the transaction's validity start time using an absolute slot number.
6372
6617
  *
6373
6618
  * This function marks the transaction as invalid if it is included in a block
6374
- * created before the specified time. It defines the earliest point at which
6375
- * the transaction can be processed.
6619
+ * created before the specified slot.
6620
+ *
6621
+ * @param {number | bigint} slot The absolute slot number before which this transaction is invalid.
6622
+ * @returns {TransactionBuilder} The builder instance for chaining.
6623
+ */
6624
+ setInvalidBefore(slot: number | bigint): TransactionBuilder;
6625
+ /**
6626
+ * Sets the transaction's validity start time to a specific, absolute date and time.
6627
+ * The transaction will be invalid if processed before this date.
6628
+ *
6629
+ * @param {Date} date The absolute date and time from which the transaction will be valid.
6630
+ * @returns {TransactionBuilder} The builder instance for chaining.
6631
+ *
6632
+ * @example
6633
+ * // Make the transaction valid starting on New Year's Day, 2026.
6634
+ * const startDate = new Date('2026-01-01T00:00:00Z');
6635
+ * txBuilder.validFromDate(startDate);
6636
+ */
6637
+ validFromDate(date: Date): TransactionBuilder;
6638
+ /**
6639
+ * Sets the transaction to become valid only after a specified duration from now.
6640
+ * This is a convenience method that calculates a future start date.
6376
6641
  *
6377
- * @param {number | bigint | Date} value The validity start time for the transaction.
6378
- * - If a `number` or `bigint` is provided, it is treated as an absolute **slot number**.
6379
- * - If a `Date` object is provided, it is converted to a **Unix timestamp** (in seconds).
6642
+ * @param {number} seconds The number of seconds from now to wait before the transaction becomes valid.
6380
6643
  * @returns {TransactionBuilder} The builder instance for chaining.
6644
+ *
6645
+ * @example
6646
+ * // Make the transaction valid only after 1 hour (3600 seconds) has passed.
6647
+ * txBuilder.validAfter(3600);
6381
6648
  */
6382
- setInvalidBefore(value: number | bigint | Date): TransactionBuilder;
6649
+ validAfter(seconds: number): TransactionBuilder;
6383
6650
  /**
6384
6651
  * Adds a reference input to the transaction.
6385
6652
  *
@@ -6556,12 +6823,12 @@ declare class TransactionBuilder {
6556
6823
  * stake credentials.
6557
6824
  *
6558
6825
  * @param {Object} params - The parameters for the function.
6559
- * @param {string | RewardAddress} params.stakeAddress The stake address to register, as a bech32 string or a RewardAddress object.
6826
+ * @param {string | RewardAddress} params.rewardAddress The stake address to register, as a bech32 string or a RewardAddress object.
6560
6827
  * @param {PlutusData} [params.redeemer] Optional. The redeemer for a script-controlled stake credential.
6561
6828
  * @returns {TransactionBuilder} The builder instance for chaining.
6562
6829
  */
6563
- registerStakeAddress({ stakeAddress, redeemer }: {
6564
- stakeAddress: string | RewardAddress;
6830
+ registerStakeAddress({ rewardAddress, redeemer }: {
6831
+ rewardAddress: string | RewardAddress;
6565
6832
  redeemer?: PlutusData;
6566
6833
  }): TransactionBuilder;
6567
6834
  /**
@@ -6571,12 +6838,12 @@ declare class TransactionBuilder {
6571
6838
  * An optional redeemer can be provided for script-controlled stake credentials.
6572
6839
  *
6573
6840
  * @param {Object} params - The parameters for the function.
6574
- * @param {string | RewardAddress} params.stakeAddress - The stake address to deregister, as a bech32 string or a RewardAddress object.
6841
+ * @param {string | RewardAddress} params.rewardAddress - The stake address to deregister, as a bech32 string or a RewardAddress object.
6575
6842
  * @param {PlutusData} [params.redeemer] - Optional. The redeemer for a script-controlled stake credential.
6576
6843
  * @returns {TransactionBuilder} The builder instance for chaining.
6577
6844
  */
6578
- deregisterStakeAddress({ stakeAddress, redeemer }: {
6579
- stakeAddress: string | RewardAddress;
6845
+ deregisterStakeAddress({ rewardAddress, redeemer }: {
6846
+ rewardAddress: string | RewardAddress;
6580
6847
  redeemer?: PlutusData;
6581
6848
  }): TransactionBuilder;
6582
6849
  /**
@@ -6586,13 +6853,13 @@ declare class TransactionBuilder {
6586
6853
  * An optional redeemer can be provided for script-controlled stake credentials.
6587
6854
  *
6588
6855
  * @param {Object} params - The parameters for the function.
6589
- * @param {string | RewardAddress} params.stakeAddress The bech32-encoded stake address to delegate from.
6856
+ * @param {string | RewardAddress} params.rewardAddress The bech32-encoded stake address to delegate from.
6590
6857
  * @param {string} params.poolId The bech32-encoded ID of the stake pool to delegate to.
6591
6858
  * @param {PlutusData} [params.redeemer] Optional. The redeemer for a script-controlled stake credential.
6592
6859
  * @returns {TransactionBuilder} The builder instance for chaining.
6593
6860
  */
6594
- delegateStake({ stakeAddress, poolId, redeemer }: {
6595
- stakeAddress: string | RewardAddress;
6861
+ delegateStake({ rewardAddress, poolId, redeemer }: {
6862
+ rewardAddress: string | RewardAddress;
6596
6863
  poolId: string;
6597
6864
  redeemer?: PlutusData;
6598
6865
  }): TransactionBuilder;
@@ -6603,14 +6870,14 @@ declare class TransactionBuilder {
6603
6870
  * (Decentralized Representative) for on-chain governance.
6604
6871
  *
6605
6872
  * @param {Object} params - The parameters for the function.
6606
- * @param {string | RewardAddress} params.stakeAddress The bech32-encoded stake address to delegate from.
6873
+ * @param {string | RewardAddress} params.rewardAddress The bech32-encoded stake address to delegate from.
6607
6874
  * @param {string} params.drepId The bech32-encoded ID of the DRep to delegate to. The DRep ID can be
6608
6875
  * in CIP-129 format or CIP-105 format.
6609
6876
  * @param {PlutusData} [params.redeemer] Optional. The redeemer for a script-controlled stake credential.
6610
6877
  * @returns {TransactionBuilder} The builder instance for chaining.
6611
6878
  */
6612
- delegateVotingPower({ stakeAddress, drepId, redeemer }: {
6613
- stakeAddress: string | RewardAddress;
6879
+ delegateVotingPower({ rewardAddress, drepId, redeemer }: {
6880
+ rewardAddress: string | RewardAddress;
6614
6881
  drepId: string;
6615
6882
  redeemer?: PlutusData;
6616
6883
  }): TransactionBuilder;
@@ -6675,7 +6942,7 @@ declare class TransactionBuilder {
6675
6942
  */
6676
6943
  vote({ voter, actionId, votingProcedure, redeemer }: {
6677
6944
  voter: Voter;
6678
- actionId: GovernanceActionId;
6945
+ actionId: GovernanceActionId | string;
6679
6946
  votingProcedure: VotingProcedure;
6680
6947
  redeemer?: PlutusData;
6681
6948
  }): TransactionBuilder;
@@ -6885,9 +7152,9 @@ interface CoinSelectorParams {
6885
7152
  */
6886
7153
  availableUtxo: UTxO[];
6887
7154
  /**
6888
- * The target amount of lovelace that the selection must cover.
7155
+ * The target value that the selection must cover.
6889
7156
  */
6890
- targetValue: bigint;
7157
+ targetValue: Value;
6891
7158
  }
6892
7159
  /**
6893
7160
  * Defines the contract for a coin selection strategy.
@@ -6938,6 +7205,10 @@ declare class EmscriptenCoinSelector implements CoinSelector {
6938
7205
  select(params: CoinSelectorParams): Promise<CoinSelectorResult>;
6939
7206
  }
6940
7207
 
7208
+ /**
7209
+ * Interface for transaction evaluation strategies. This will compute the required
7210
+ * execution units for each redeemer in a transaction.
7211
+ */
6941
7212
  interface TxEvaluator {
6942
7213
  /**
6943
7214
  * Gets the human-readable name of the coin selection strategy.
@@ -6985,4 +7256,520 @@ declare class EmscriptenTxEvaluator implements TxEvaluator {
6985
7256
  evaluate(tx: string, additionalUtxos?: UTxO[]): Promise<Redeemer[]>;
6986
7257
  }
6987
7258
 
6988
- export { type AccountDerivationPath, Address, AddressType, type AlwaysAbstain, type AlwaysNoConfidence, type Anchor, type AssetAmounts, type AuthCommitteeHotCertificate, Base58, BaseAddress, Bech32, type Bech32DecodeResult, Bip32PrivateKey, Bip32PublicKey, type Bip32SecureKeyHandler, Blake2b, BlockfrostProvider, ByronAddress, ByronAddressType, CborMajorType, CborReader, CborReaderState, CborSimpleValue, CborTag, CborWriter, type Certificate, CertificateType, type CoinSelector, type CoinSelectorParams, type CoinSelectorResult, CoinType, type CommitteeMember, type CommitteeMembers, type Constitution, type ConstrPlutusData, type CostModel, Crc32, type Credential, type CredentialSet, CredentialType, type DRep, type DRepRegistrationCertificate, type DRepThresholds, type DRepUnregistrationCertificate, type Datum, DatumType, type DerivationPath, Ed25519PrivateKey, Ed25519PublicKey, type Ed25519SecureKeyHandler, Ed25519Signature, Emip003, EmscriptenCoinSelector, EmscriptenProvider, EmscriptenTxEvaluator, EnterpriseAddress, type ExUnits, type ExUnitsPrices, type GenesisKeyDelegationCertificate, type GovernanceActionId, InstanceType, KeyDerivationPurpose, KeyDerivationRole, MAX_SIGNED_64BIT, MAX_UNSIGNED_64BIT, MIN_SIGNED_64BIT, type MirCertificate, MirCertificateKind, MirCertificatePot, type MirToPot, type MirToStakeCreds, type NativeScript, NativeScriptKind, NetworkId, NetworkMagic, Pbkdf2HmacSha512, type PlutusData, PlutusLanguageVersion, type PlutusList, type PlutusMap, type PlutusScript, PointerAddress, type PoolParameters, type PoolRegistrationCertificate, type PoolRetirementCertificate, type PoolVotingThresholds, type ProtocolParameters, type ProtocolParametersUpdate, type ProtocolVersion, type Provider, type Redeemer, RedeemerPurpose, type RegistrationCertificate, type Relay, type RelayByAddress, type RelayByName, type RelayByNameMultihost, type RequireAllOfScript, type RequireAnyOfScript, type RequireAtLeastScript, type RequireSignatureScript, type RequireTimeAfterScript, type RequireTimeBeforeScript, type ResignCommitteeColdCertificate, RewardAddress, type Script, ScriptType, type SecureKeyHandler, SoftwareBip32SecureKeyHandler, SoftwareEd25519SecureKeyHandler, type StakeDelegationCertificate, type StakeDeregistrationCertificate, type StakePointer, type StakeRegistrationCertificate, type StakeRegistrationDelegationCertificate, type StakeVoteDelegationCertificate, type StakeVoteRegistrationDelegationCertificate, TransactionBuilder, type TxEvaluator, type TxIn, type TxOut, type UTxO, type UnitInterval, type UnregistrationCertificate, type UpdateDRepCertificate, type Value, type VkeyWitness, type VkeyWitnessSet, Vote, type VoteDelegationCertificate, type VoteRegistrationDelegationCertificate, type Voter, VoterType, type VotingProcedure, type Withdrawals, addWithdrawal, applyVkeyWitnessSet, assertSuccess, assetIdFromParts, assetNameFromAssetId, asyncifyStateTracker, blake2bHashFromBytes, blake2bHashFromHex, bridgeCallbacks, cborToPlutusData, cborToScript, computeScriptHash, deepEqualsPlutusData, deepEqualsScript, derefCostModel, derefCostModels, derefDRepVotingThresholds, derefExUnitPrices, derefExUnits, derefPoolVotingThresholds, derefProtocolParameters, derefProtocolVersion, derefUnitInterval, entropyToMnemonic, finalizationRegistry, getErrorString, getFromInstanceRegistry, getLibCardanoCVersion, getModule, getScriptAddress, harden, hexToBufferObject, hexToUint8Array, isDRepAbstain, isDRepCredential, isDRepNoConfidence, isNativeScript, isPlutusDataBigInt, isPlutusDataByteArray, isPlutusDataConstr, isPlutusDataList, isPlutusDataMap, isPlutusDataWithCborCache, isPlutusScript, isReady, jsonToNativeScript, mnemonicToEntropy, nativeScriptToJson, plutusDataToCbor, policyIdFromAssetId, prepareUtxoForEvaluation, readAnchor, readAssetId, readAuthCommitteeHotCertificate, readBlake2bHashData, readBufferData, readCertificate, readCommitteeMembersMap, readConstitution, readCostModel, readCostModels, readCredential, readCredentialSet, readDRepRegistrationCertificate, readDRepUnregistrationCertificate, readDRepVotingThresholds, readDatum, readExUnitPrices, readExUnits, readGenesisKeyDelegationCertificate, readGovernanceActionId, readI64, readInputSet, readIntervalComponents, readMoveInstantaneousRewardsCertificate, readPlutusData, readPoolParameters, readPoolRegistrationCertificate, readPoolRetirementCertificate, readPoolVotingThresholds, readProtocolParamUpdate, readProtocolParameters, readProtocolVersion, readRedeemer, readRedeemerList, readRedeemersFromTx, readRegistrationCertificate, readResignCommitteeColdCertificate, readScript, readStakeDelegationCertificate, readStakeDeregistrationCertificate, readStakeRegistrationCertificate, readStakeRegistrationDelegationCertificate, readStakeVoteDelegationCertificate, readStakeVoteRegistrationDelegationCertificate, readTransactionFromCbor, readTxIn, readTxOut, readUnitIntervalAsDouble, readUnregistrationCertificate, readUpdateDRepCertificate, readUtxo, readUtxoList, readValue, readVkeyWitnessSet, readVoteDelegationCertificate, readVoteRegistrationDelegationCertificate, readVoter, readVotingProcedure, readWithdrawalMap, ready, registerBridgeErrorHandler, registerInstance, reportBridgeError, scriptToCbor, splitToLowHigh64bit, toUnitInterval, uint8ArrayToHex, uint8ArrayToUtf8, unrefObject, unregisterBridgeErrorHandler, unregisterInstance, utf8ByteLen, utf8ToUint8Array, writeAccountDerivationPaths, writeAnchor, writeAssetId, writeAuthCommitteeHotCertificate, writeBytesToMemory, writeCertificate, writeCommitteeMembersMap, writeConstitution, writeCostModel, writeCostModels, writeCredential, writeCredentialSet, writeDRepRegistrationCertificate, writeDRepUnregistrationCertificate, writeDRepVotingThresholds, writeDatum, writeDerivationPaths, writeExUnitPrices, writeExUnits, writeGenesisKeyDelegationCertificate, writeGovernanceActionId, writeI64, writeInputSet, writeMoveInstantaneousRewardsCertificate, writePlutusData, writePoolParameters, writePoolRegistrationCertificate, writePoolRetirementCertificate, writePoolVotingThresholds, writeProtocolParamUpdate, writeProtocolParameters, writeProtocolVersion, writeRedeemer, writeRedeemerList, writeRegistrationCertificate, writeResignCommitteeColdCertificate, writeScript, writeStakeDelegationCertificate, writeStakeDeregistrationCertificate, writeStakeRegistrationCertificate, writeStakeRegistrationDelegationCertificate, writeStakeVoteDelegationCertificate, writeStakeVoteRegistrationDelegationCertificate, writeStringToMemory, writeTransactionToCbor, writeTxIn, writeTxOut, writeUnitInterval, writeUnitIntervalAsDouble, writeUnregistrationCertificate, writeUpdateDRepCertificate, writeUtxo, writeUtxoList, writeValue, writeVkeyWitnessSet, writeVoteDelegationCertificate, writeVoteRegistrationDelegationCertificate, writeVoter, writeVotingProcedure, writeWithdrawalMap };
7259
+ /**
7260
+ * Represents a CIP-30 compatible Cardano wallet for dApp interaction.
7261
+ */
7262
+ interface Cip30Wallet {
7263
+ /**
7264
+ * Returns the wallet's current network ID.
7265
+ * @returns {Promise<number>} A promise that resolves to the network ID (0 for Testnet, 1 for Mainnet).
7266
+ * @remarks This is used to ensure the dApp and wallet are operating on the same network.
7267
+ */
7268
+ getNetworkId(): Promise<number>;
7269
+ /**
7270
+ * Returns a list of all Unspent Transaction Outputs (UTXOs) controlled by the wallet.
7271
+ * @returns {Promise<string[] | undefined>} A promise that resolves to an array of UTXOs.
7272
+ * @remarks UTXOs represent the "coins" or assets in the wallet that are available to be spent.
7273
+ */
7274
+ getUtxos(): Promise<string[] | undefined>;
7275
+ /**
7276
+ * Returns the total balance of all assets controlled by the wallet.
7277
+ * @returns {Promise<string>} A promise that resolves to the wallet's total balance, including Lovelace and any native tokens.
7278
+ */
7279
+ getBalance(): Promise<string>;
7280
+ /**
7281
+ * Returns a list of addresses that have been used in past transactions.
7282
+ * @returns {Promise<string[]>} A promise that resolves to an array of used, Bech32-encoded addresses.
7283
+ */
7284
+ getUsedAddresses(): Promise<string[]>;
7285
+ /**
7286
+ * Returns a list of unused addresses for receiving payments.
7287
+ * @returns {Promise<string[]>} A promise that resolves to an array of unused, Bech32-encoded addresses.
7288
+ * @remarks Using a fresh address for each transaction can improve user privacy.
7289
+ */
7290
+ getUnusedAddresses(): Promise<string[]>;
7291
+ /**
7292
+ * Returns a single, unused address suitable for receiving change from a transaction.
7293
+ * @returns {Promise<string>} A promise that resolves to a Bech32-encoded change address.
7294
+ */
7295
+ getChangeAddress(): Promise<string>;
7296
+ /**
7297
+ * Returns the wallet's reward addresses, used for receiving staking rewards.
7298
+ * @returns {Promise<string[]>} A promise that resolves to an array of Bech32-encoded reward addresses.
7299
+ */
7300
+ getRewardAddresses(): Promise<string[]>;
7301
+ /**
7302
+ * Requests the user to sign a given transaction.
7303
+ * @param {string} tx - The transaction to be signed, provided as a CBOR hex string.
7304
+ * @param {boolean} partialSign - If true, the wallet will only add its witness and not require all signatures to be present. This is for multi-signature transactions.
7305
+ * @returns {Promise<string>} A promise that resolves to the CBOR hex string of the transaction witness set.
7306
+ */
7307
+ signTx(tx: string, partialSign: boolean): Promise<string>;
7308
+ /**
7309
+ * Requests the user to sign arbitrary data with a specific address, compliant with CIP-8.
7310
+ * @param {string} address - The Bech32-encoded address to sign with.
7311
+ * @param {string} payload - The hex-encoded data payload to be signed.
7312
+ * @returns {Promise<{ signature: string; key: string }>} A promise that resolves to the signature and public key.
7313
+ * @remarks This is useful for proving ownership of an address without creating a blockchain transaction.
7314
+ */
7315
+ signData(address: string, payload: string): Promise<{
7316
+ signature: string;
7317
+ key: string;
7318
+ }>;
7319
+ /**
7320
+ * Submits a fully signed transaction to the blockchain through the wallet's provider.
7321
+ * @param {string} tx - The fully signed transaction, provided as a CBOR hex string.
7322
+ * @returns {Promise<string>} A promise that resolves to the transaction ID (hash).
7323
+ */
7324
+ submitTx(tx: string): Promise<string>;
7325
+ /**
7326
+ * Returns a list of UTXOs that are designated as collateral.
7327
+ * @returns {Promise<string[]>} A promise that resolves to an array of collateral UTXOs.
7328
+ * @remarks Collateral is required for transactions that interact with Plutus smart contracts to cover potential script execution failure fees.
7329
+ */
7330
+ getCollateral(): Promise<string[]>;
7331
+ /**
7332
+ * Namespace for CIP-142 methods.
7333
+ * @see {@link https://cips.cardano.org/cip/CIP-142}
7334
+ */
7335
+ cip142: {
7336
+ /**
7337
+ * Returns the "network magic," a unique number identifying the Cardano network.
7338
+ * @returns {Promise<number>} A promise that resolves to the network magic number (e.g., Mainnet: `764824073`, Preprod: `1`).
7339
+ */
7340
+ getNetworkMagic: () => Promise<number>;
7341
+ };
7342
+ /**
7343
+ * Namespace for CIP-95 governance methods, supporting the Voltaire era.
7344
+ * @see {@link https://cips.cardano.org/cip/CIP-95}
7345
+ */
7346
+ cip95: {
7347
+ /**
7348
+ * Returns the wallet's active public DRep (Delegated Representative) key.
7349
+ * @returns {Promise<string>} A promise that resolves to the hex-encoded public DRep key.
7350
+ */
7351
+ getPubDRepKey: () => Promise<string>;
7352
+ /**
7353
+ * Returns public stake keys from the wallet that are currently registered for on-chain governance voting.
7354
+ * @returns {Promise<string[]>} A promise that resolves to an array of hex-encoded public stake keys.
7355
+ */
7356
+ getRegisteredPubStakeKeys: () => Promise<string[]>;
7357
+ /**
7358
+ * Returns public stake keys from the wallet that are NOT yet registered for on-chain governance voting.
7359
+ * @returns {Promise<string[]>} A promise that resolves to an array of hex-encoded public stake keys.
7360
+ */
7361
+ getUnregisteredPubStakeKeys: () => Promise<string[]>;
7362
+ };
7363
+ }
7364
+
7365
+ /**
7366
+ * Defines the standard interface for a Cardano wallet.
7367
+ * This interface provides dApps with a consistent way to interact with a user's wallet for querying information
7368
+ * and requesting transaction creation.
7369
+ */
7370
+ interface Wallet {
7371
+ /**
7372
+ * Returns the wallet's current network ID.
7373
+ * @returns {Promise<NetworkId>} A promise that resolves to the network ID (0 for Testnet, 1 for Mainnet).
7374
+ * @remarks This is used to ensure the dApp and wallet are operating on the same network.
7375
+ */
7376
+ getNetworkId(): Promise<NetworkId>;
7377
+ /**
7378
+ * Returns a list of all Unspent Transaction Outputs (UTxOs) controlled by the wallet.
7379
+ * @returns {Promise<UTxO[]>} A promise that resolves to an array of UTxOs.
7380
+ * @remarks UTxOs represent the "coins" or assets in the wallet that are available to be spent.
7381
+ */
7382
+ getUnspentOutputs(): Promise<UTxO[]>;
7383
+ /**
7384
+ * Returns the total balance of all assets controlled by the wallet.
7385
+ * @returns {Promise<Value>} A promise that resolves to the wallet's total balance, including Lovelace and any native tokens.
7386
+ */
7387
+ getBalance(): Promise<Value>;
7388
+ /**
7389
+ * Returns a list of addresses that have been used in past transactions.
7390
+ * @returns {Promise<string[]>} A promise that resolves to an array of used, Bech32-encoded addresses.
7391
+ */
7392
+ getUsedAddresses(): Promise<Address[]>;
7393
+ /**
7394
+ * Returns a list of unused addresses for receiving payments.
7395
+ * @returns {Promise<string[]>} A promise that resolves to an array of unused, Bech32-encoded addresses.
7396
+ * @remarks Using a fresh address for each transaction can improve user privacy.
7397
+ */
7398
+ getUnusedAddresses(): Promise<Address[]>;
7399
+ /**
7400
+ * Returns a single, unused address suitable for receiving change from a transaction.
7401
+ * @returns {Promise<string>} A promise that resolves to a Bech32-encoded change address.
7402
+ */
7403
+ getChangeAddress(): Promise<Address>;
7404
+ /**
7405
+ * Returns the wallet's reward addresses, used for receiving staking rewards.
7406
+ * @returns {Promise<string[]>} A promise that resolves to an array of Bech32-encoded reward addresses.
7407
+ */
7408
+ getRewardAddresses(): Promise<RewardAddress[]>;
7409
+ /**
7410
+ * Requests the user to sign a given transaction.
7411
+ * @param {string} txCbor - The transaction to be signed, provided as a CBOR hex string.
7412
+ * @param {boolean} partialSign - If true, the wallet will only add its witness and not require all signatures to be present. This is for multi-signature transactions.
7413
+ * @returns {Promise<VkeyWitness>} A promise that resolves to the CBOR hex string of the transaction witness set.
7414
+ */
7415
+ signTransaction(txCbor: string, partialSign: boolean): Promise<VkeyWitnessSet>;
7416
+ /**
7417
+ * Requests the user to sign arbitrary data with a specific address, compliant with CIP-8.
7418
+ * @param {Address | string} address - The Bech32-encoded address to sign with.
7419
+ * @param {string} payload - The hex-encoded data payload to be signed.
7420
+ * @returns {Promise<{ signature: string; key: string }>} A promise that resolves to the signature and public key.
7421
+ * @remarks This is useful for proving ownership of an address without creating a blockchain transaction.
7422
+ */
7423
+ signData(address: Address | string, payload: string): Promise<{
7424
+ signature: string;
7425
+ key: string;
7426
+ }>;
7427
+ /**
7428
+ * Submits a fully signed transaction to the blockchain through the wallet's provider.
7429
+ * @param {string} txCbor - The fully signed transaction, provided as a CBOR hex string.
7430
+ * @returns {Promise<string>} A promise that resolves to the transaction ID (hash).
7431
+ */
7432
+ submitTransaction(txCbor: string): Promise<string>;
7433
+ /**
7434
+ * Returns a list of UTxOs that are designated as collateral.
7435
+ * @returns {Promise<UTxO[]>} A promise that resolves to an array of collateral UTxOs.
7436
+ * @remarks Collateral is required for transactions that interact with Plutus smart contracts to cover potential script execution failure fees.
7437
+ */
7438
+ getCollateral(): Promise<UTxO[]>;
7439
+ /**
7440
+ * Returns the "network magic," a unique number identifying the Cardano network.
7441
+ * @returns {Promise<number>} A promise that resolves to the network magic number (e.g., Mainnet: `764824073`, Preprod: `1`).
7442
+ */
7443
+ getNetworkMagic: () => Promise<number>;
7444
+ /**
7445
+ * Returns the wallet's active public DRep (Delegated Representative) key.
7446
+ * @returns {Promise<string>} A promise that resolves to the hex-encoded public DRep key.
7447
+ */
7448
+ getPubDRepKey: () => Promise<string>;
7449
+ /**
7450
+ * Returns public stake keys from the wallet that are currently registered for on-chain governance voting.
7451
+ * @returns {Promise<string[]>} A promise that resolves to an array of hex-encoded public stake keys.
7452
+ */
7453
+ getRegisteredPubStakeKeys: () => Promise<string[]>;
7454
+ /**
7455
+ * Returns public stake keys from the wallet that are NOT yet registered for on-chain governance voting.
7456
+ * @returns {Promise<string[]>} A promise that resolves to an array of hex-encoded public stake keys.
7457
+ */
7458
+ getUnregisteredPubStakeKeys: () => Promise<string[]>;
7459
+ /**
7460
+ * Creates and initializes a new transaction builder with the wallet's current state.
7461
+ *
7462
+ * @returns {Promise<TransactionBuilder>} A promise that resolves to a pre-configured `TransactionBuilder` instance.
7463
+ * @remarks
7464
+ * This method simplifies transaction construction by automatically pre-populating the builder with:
7465
+ * 1. The wallet's available UTxOs as inputs.
7466
+ * 2. The wallet's change address to receive any leftover funds.
7467
+ * 3. The network parameters from the wallet's provider.
7468
+ *
7469
+ * The returned builder is ready for you to add outputs and other transaction details.
7470
+ */
7471
+ createTransactionBuilder(): Promise<TransactionBuilder>;
7472
+ }
7473
+
7474
+ /**
7475
+ * Defines part of the BIP-44 derivation path components for a single Cardano address.
7476
+ * @property {number} account - The account index.
7477
+ * @property {number} paymentIndex - The address index for the payment key (role 0).
7478
+ * @property {number} [stakingIndex] - The address index for the staking key (role 2). If provided, a **Base address** (payment + staking) will be derived. If omitted, an **Enterprise address** (payment only) will be derived.
7479
+ * @property {number} [drepIndex] - The address index for the DRep key (role 3). If not provided, 0 will be assumed.
7480
+ */
7481
+ type SingleAddressCredentialsConfig = {
7482
+ account: number;
7483
+ paymentIndex: number;
7484
+ stakingIndex?: number;
7485
+ drepIndex?: number;
7486
+ };
7487
+ /**
7488
+ * Configuration for creating a `SingleAddressWallet` instance from pre-existing key objects.
7489
+ * @property {Bip32SecureKeyHandler} secureKeyHandler - The handler that manages encrypted private keys.
7490
+ * @property {Bip32PublicKey} accountRootPublicKey - The public key for the specified account from which addresses are derived.
7491
+ * @property {Provider} provider - The provider instance for interacting with the Cardano blockchain.
7492
+ * @property {SingleAddressCredentialsConfig} credentialsConfig - Specifies the derivation path for the address this wallet will manage.
7493
+ */
7494
+ type SingleAddressWalletConfig = {
7495
+ secureKeyHandler: Bip32SecureKeyHandler;
7496
+ accountRootPublicKey: Bip32PublicKey;
7497
+ provider: Provider;
7498
+ credentialsConfig: SingleAddressCredentialsConfig;
7499
+ };
7500
+ /**
7501
+ * Configuration for creating a `SingleAddressWallet` instance from a mnemonic phrase.
7502
+ * @property {string[]} mnemonics - The mnemonic (seed) phrase used to derive the root key.
7503
+ * @property {Provider} provider - The provider instance for interacting with the Cardano blockchain.
7504
+ * @property {SingleAddressCredentialsConfig} credentialsConfig - Specifies the derivation path for the address this wallet will manage.
7505
+ * @property {() => Promise<Uint8Array>} getPassword - An async callback function that securely provides the password for encrypting the derived keys.
7506
+ */
7507
+ type SingleAddressWalletFromMnemonicsConfig = {
7508
+ mnemonics: string[];
7509
+ provider: Provider;
7510
+ credentialsConfig: SingleAddressCredentialsConfig;
7511
+ getPassword: () => Promise<Uint8Array>;
7512
+ };
7513
+ /**
7514
+ * A simple, single-address wallet implementation for programmatic use.
7515
+ *
7516
+ * @class SingleAddressWallet
7517
+ * @implements {Wallet}
7518
+ * @remarks
7519
+ * This class provides a straightforward wallet interface that manages a single
7520
+ * payment and staking key pair derived from a specific path. It is not a
7521
+ * full Hierarchical Deterministic (HD) wallet and does not perform address
7522
+ * discovery. Its simplicity makes it ideal for testing, scripting, or backend
7523
+ * applications where interaction with a single, known address is required.
7524
+ */
7525
+ declare class SingleAddressWallet implements Wallet {
7526
+ private secureKeyHandler;
7527
+ private provider;
7528
+ private credentialsConfig;
7529
+ private accountRootPublicKey;
7530
+ private paymentAddress;
7531
+ private rewardAddress;
7532
+ private drepPubKey;
7533
+ private protocolParams;
7534
+ /**
7535
+ * Constructs a new instance of the SingleAddressWallet.
7536
+ * @param {SingleAddressWalletConfig} config - The configuration object for the wallet.
7537
+ * @remarks This constructor is private. Use the static `createFromMnemonics` method to create an instance.
7538
+ */
7539
+ constructor({ secureKeyHandler, provider, credentialsConfig, accountRootPublicKey }: SingleAddressWalletConfig);
7540
+ /**
7541
+ * Creates a new wallet instance from a mnemonic phrase.
7542
+ *
7543
+ * This factory method is the primary way to instantiate a wallet from a user's
7544
+ * seed phrase, handling the necessary key derivation and encryption.
7545
+ *
7546
+ * @param {SingleAddressWalletFromMnemonicsConfig} config - The configuration options for creating the wallet.
7547
+ * @returns {Promise<SingleAddressWallet>} A promise that resolves to the newly created wallet instance.
7548
+ */
7549
+ static createFromMnemonics({ mnemonics, provider, credentialsConfig, getPassword }: SingleAddressWalletFromMnemonicsConfig): Promise<SingleAddressWallet>;
7550
+ /**
7551
+ * Returns the wallet's current network ID.
7552
+ * @returns {Promise<NetworkId>} A promise that resolves to the network ID (0 for Testnet, 1 for Mainnet).
7553
+ */
7554
+ getNetworkId(): Promise<NetworkId>;
7555
+ /**
7556
+ * Fetches all Unspent Transaction Outputs (UTxOs) for the wallet's address.
7557
+ * @returns {Promise<UTxO[]>} A promise that resolves to an array of the wallet's UTxOs.
7558
+ */
7559
+ getUnspentOutputs(): Promise<UTxO[]>;
7560
+ /**
7561
+ * Fetches and deserializes the total balance of all assets controlled by the wallet.
7562
+ * @returns {Promise<Value>} A promise that resolves to a `Value` object representing the wallet's complete balance.
7563
+ */
7564
+ getBalance(): Promise<Value>;
7565
+ /**
7566
+ * Fetches and parses all used addresses controlled by the wallet.
7567
+ * @returns {Promise<Address[]>} A promise that resolves to an array of parsed `Address` objects.
7568
+ */
7569
+ getUsedAddresses(): Promise<Address[]>;
7570
+ /**
7571
+ * Fetches and parses all unused addresses controlled by the wallet.
7572
+ * @returns {Promise<Address[]>} A promise that resolves to an array of parsed `Address` objects.
7573
+ * @remarks This method is currently not supported and always returns an empty array.
7574
+ */
7575
+ getUnusedAddresses(): Promise<Address[]>;
7576
+ /**
7577
+ * Fetches and parses a single change address from the wallet.
7578
+ * @returns {Promise<Address>} A promise that resolves to a parsed `Address` object.
7579
+ */
7580
+ getChangeAddress(): Promise<Address>;
7581
+ /**
7582
+ * Fetches and parses all reward addresses controlled by the wallet.
7583
+ * @returns {Promise<RewardAddress[]>} A promise that resolves to an array of parsed `RewardAddress` objects.
7584
+ */
7585
+ getRewardAddresses(): Promise<RewardAddress[]>;
7586
+ /**
7587
+ * Requests a signature for a transaction using the wallet's keys.
7588
+ * @param {string} txCbor - The transaction to be signed, provided as a CBOR hex string.
7589
+ * @param {boolean} _partialSign - A flag to control which credentials are used for signing.
7590
+ * @returns {Promise<VkeyWitnessSet>} A promise that resolves to the deserialized `VkeyWitnessSet`.
7591
+ */
7592
+ signTransaction(txCbor: string, _partialSign: boolean): Promise<VkeyWitnessSet>;
7593
+ /**
7594
+ * Requests a CIP-8 compliant data signature from the wallet.
7595
+ * @param {Address | string} _address - The address to sign with (as an `Address` object or Bech32 string).
7596
+ * @param {string} _payload - The hex-encoded data payload to be signed.
7597
+ * @returns {Promise<{ signature: string; key: string }>} A promise that resolves to the signature and public key.
7598
+ */
7599
+ signData(_address: Address | string, _payload: string): Promise<{
7600
+ signature: string;
7601
+ key: string;
7602
+ }>;
7603
+ /**
7604
+ * Submits a fully signed transaction to the blockchain via the wallet's provider.
7605
+ * @param {string} txCbor - The fully signed transaction as a CBOR hex string.
7606
+ * @returns {Promise<string>} A promise that resolves to the transaction ID (hash).
7607
+ */
7608
+ submitTransaction(txCbor: string): Promise<string>;
7609
+ /**
7610
+ * Fetches and deserializes the wallet's collateral UTxOs.
7611
+ * @returns {Promise<TxOut[]>} A promise that resolves to an array of collateral `TxOut` objects.
7612
+ * @remarks This method is currently not supported and always returns an empty array.
7613
+ */
7614
+ getCollateral(): Promise<UTxO[]>;
7615
+ /**
7616
+ * Returns the "network magic," a unique number identifying the Cardano network.
7617
+ * @returns {Promise<number>} A promise that resolves to the network magic number (e.g., Mainnet: `764824073`, Preprod: `1`).
7618
+ */
7619
+ getNetworkMagic(): Promise<NetworkMagic>;
7620
+ /**
7621
+ * Returns the wallet's active public DRep (Delegated Representative) key.
7622
+ * @returns {Promise<string>} A promise that resolves to the hex-encoded public DRep key.
7623
+ */
7624
+ getPubDRepKey(): Promise<string>;
7625
+ /**
7626
+ * Returns public stake keys from the wallet that are currently registered for on-chain governance voting.
7627
+ * @returns {Promise<string[]>} A promise that resolves to an array of hex-encoded public stake keys.
7628
+ * @remarks This method is currently not supported and always returns an empty array.
7629
+ */
7630
+ getRegisteredPubStakeKeys(): Promise<string[]>;
7631
+ /**
7632
+ * Returns public stake keys from the wallet that are NOT yet registered for on-chain governance voting.
7633
+ * @returns {Promise<string[]>} A promise that resolves to an array of hex-encoded public stake keys.
7634
+ * @remarks This method is currently not supported and always returns an empty array.
7635
+ */
7636
+ getUnregisteredPubStakeKeys(): Promise<string[]>;
7637
+ /**
7638
+ * Creates and initializes a new transaction builder with the wallet's current state.
7639
+ *
7640
+ * @returns {Promise<TransactionBuilder>} A promise that resolves to a pre-configured `TransactionBuilder` instance.
7641
+ * @remarks
7642
+ * This method simplifies transaction construction by automatically pre-populating the builder with:
7643
+ * 1. The wallet's available UTxOs as inputs.
7644
+ * 2. The wallet's change address to receive any leftover funds.
7645
+ * 3. The network parameters from the wallet's provider.
7646
+ *
7647
+ * The returned builder is ready for you to add outputs and other transaction details.
7648
+ */
7649
+ createTransactionBuilder(): Promise<TransactionBuilder>;
7650
+ /**
7651
+ * Derives the payment address based on the wallet's configuration.
7652
+ * @returns {Promise<Address>} A promise resolving to a BaseAddress (with staking) or an EnterpriseAddress (without staking).
7653
+ */
7654
+ private getAddress;
7655
+ /**
7656
+ * Derives the rewards address based on the wallet's configuration.
7657
+ * @returns {Promise<Address>} A promise resolving to a Rewards.
7658
+ */
7659
+ private getRewardAddress;
7660
+ }
7661
+
7662
+ /**
7663
+ * This class acts as an adapter, consuming the raw, CBOR-based API of a CIP-30 wallet
7664
+ * and exposing methods that return deserialized, object types from Cometa.
7665
+ */
7666
+ declare class BrowserExtensionWallet implements Wallet {
7667
+ private cip30Wallet;
7668
+ private protocolParams;
7669
+ private provider;
7670
+ /**
7671
+ * Constructs a new instance of the BrowserExtensionWallet.
7672
+ * @param {Cip30Wallet} cip30Wallet - The raw CIP-30 wallet API provided by the browser extension.
7673
+ * @param {Provider} provider - The provider used to fetch additional data.
7674
+ */
7675
+ constructor(cip30Wallet: Cip30Wallet, provider: Provider);
7676
+ /**
7677
+ * Returns the wallet's current network ID.
7678
+ * @returns {Promise<NetworkId>} A promise that resolves to the network ID (0 for Testnet, 1 for Mainnet).
7679
+ */
7680
+ getNetworkId(): Promise<NetworkId>;
7681
+ /**
7682
+ * Fetches the wallet's UTxOs and deserializes them from CBOR into an array of `TxOut` objects.
7683
+ * @returns {Promise<UTxO[]>} A promise that resolves to an array of the wallet's UTxOs.
7684
+ */
7685
+ getUnspentOutputs(): Promise<UTxO[]>;
7686
+ /**
7687
+ * Fetches and deserializes the total balance of all assets controlled by the wallet.
7688
+ * @returns {Promise<Value>} A promise that resolves to a `Value` object representing the wallet's complete balance.
7689
+ */
7690
+ getBalance(): Promise<Value>;
7691
+ /**
7692
+ * Fetches and parses all used addresses controlled by the wallet.
7693
+ * @returns {Promise<Address[]>} A promise that resolves to an array of parsed `Address` objects.
7694
+ */
7695
+ getUsedAddresses(): Promise<Address[]>;
7696
+ /**
7697
+ * Fetches and parses all unused addresses controlled by the wallet.
7698
+ * @returns {Promise<Address[]>} A promise that resolves to an array of parsed `Address` objects.
7699
+ */
7700
+ getUnusedAddresses(): Promise<Address[]>;
7701
+ /**
7702
+ * Fetches and parses a single change address from the wallet.
7703
+ * @returns {Promise<Address>} A promise that resolves to a parsed `Address` object.
7704
+ */
7705
+ getChangeAddress(): Promise<Address>;
7706
+ /**
7707
+ * Fetches and parses all reward addresses controlled by the wallet.
7708
+ * @returns {Promise<RewardAddress[]>} A promise that resolves to an array of parsed `RewardAddress` objects.
7709
+ */
7710
+ getRewardAddresses(): Promise<RewardAddress[]>;
7711
+ /**
7712
+ * Requests a transaction signature from the wallet and deserializes the resulting witness set.
7713
+ * @param {string} txCbor - The transaction to be signed, provided as a CBOR hex string.
7714
+ * @param {boolean} partialSign - If true, the wallet will only add its witness for multi-signature transactions.
7715
+ * @returns {Promise<VkeyWitnessSet>} A promise that resolves to the deserialized `VkeyWitnessSet`.
7716
+ */
7717
+ signTransaction(txCbor: string, partialSign: boolean): Promise<VkeyWitnessSet>;
7718
+ /**
7719
+ * Requests a CIP-8 compliant data signature from the wallet.
7720
+ * @param {Address | string} address - The address to sign with (as an `Address` object or Bech32 string).
7721
+ * @param {string} payload - The hex-encoded data payload to be signed.
7722
+ * @returns {Promise<{ signature: string; key: string }>} A promise that resolves to the signature and public key.
7723
+ */
7724
+ signData(address: Address | string, payload: string): Promise<{
7725
+ signature: string;
7726
+ key: string;
7727
+ }>;
7728
+ /**
7729
+ * Submits a fully signed transaction to the blockchain via the wallet's provider.
7730
+ * @param {string} txCbor - The fully signed transaction as a CBOR hex string.
7731
+ * @returns {Promise<string>} A promise that resolves to the transaction ID (hash).
7732
+ */
7733
+ submitTransaction(txCbor: string): Promise<string>;
7734
+ /**
7735
+ * Fetches and deserializes the wallet's collateral UTxOs.
7736
+ * @returns {Promise<TxOut[]>} A promise that resolves to an array of collateral `TxOut` objects.
7737
+ * @remarks Collateral is required for transactions involving Plutus smart contracts.
7738
+ */
7739
+ getCollateral(): Promise<UTxO[]>;
7740
+ /**
7741
+ * Returns the "network magic," a unique number identifying the Cardano network.
7742
+ * @returns {Promise<number>} A promise that resolves to the network magic number (e.g., Mainnet: `764824073`, Preprod: `1`).
7743
+ */
7744
+ getNetworkMagic(): Promise<NetworkMagic>;
7745
+ /**
7746
+ * Returns the wallet's active public DRep (Delegated Representative) key.
7747
+ * @returns {Promise<string>} A promise that resolves to the hex-encoded public DRep key.
7748
+ */
7749
+ getPubDRepKey(): Promise<string>;
7750
+ /**
7751
+ * Returns public stake keys from the wallet that are currently registered for on-chain governance voting.
7752
+ * @returns {Promise<string[]>} A promise that resolves to an array of hex-encoded public stake keys.
7753
+ */
7754
+ getRegisteredPubStakeKeys(): Promise<string[]>;
7755
+ /**
7756
+ * Returns public stake keys from the wallet that are NOT yet registered for on-chain governance voting.
7757
+ * @returns {Promise<string[]>} A promise that resolves to an array of hex-encoded public stake keys.
7758
+ */
7759
+ getUnregisteredPubStakeKeys(): Promise<string[]>;
7760
+ /**
7761
+ * Creates and initializes a new transaction builder with the wallet's current state.
7762
+ *
7763
+ * @returns {Promise<TransactionBuilder>} A promise that resolves to a pre-configured `TransactionBuilder` instance.
7764
+ * @remarks
7765
+ * This method simplifies transaction construction by automatically pre-populating the builder with:
7766
+ * 1. The wallet's available UTxOs as inputs.
7767
+ * 2. The wallet's change address to receive any leftover funds.
7768
+ * 3. The network parameters from the wallet's provider.
7769
+ *
7770
+ * The returned builder is ready for you to add outputs and other transaction details.
7771
+ */
7772
+ createTransactionBuilder(): Promise<TransactionBuilder>;
7773
+ }
7774
+
7775
+ export { type AccountDerivationPath, Address, AddressType, type AlwaysAbstain, type AlwaysNoConfidence, type Anchor, type AssetAmounts, type AuthCommitteeHotCertificate, Base58, BaseAddress, Bech32, type Bech32DecodeResult, Bip32PrivateKey, Bip32PublicKey, type Bip32SecureKeyHandler, Blake2b, BlockfrostProvider, type BlockfrostProviderConfig, BrowserExtensionWallet, ByronAddress, ByronAddressType, CborMajorType, CborReader, CborReaderState, CborSimpleValue, CborTag, CborWriter, type Certificate, CertificateType, type Cip30Wallet, type CoinSelector, type CoinSelectorParams, type CoinSelectorResult, CoinType, type CommitteeMember, type CommitteeMembers, type Constitution, type ConstrPlutusData, type CostModel, Crc32, type Credential, type CredentialSet, CredentialType, type DRep, type DRepRegistrationCertificate, type DRepThresholds, type DRepUnregistrationCertificate, type Datum, DatumType, type DerivationPath, Ed25519PrivateKey, Ed25519PublicKey, type Ed25519SecureKeyHandler, Ed25519Signature, Emip003, EmscriptenCoinSelector, EmscriptenProvider, EmscriptenTxEvaluator, EnterpriseAddress, type ExUnits, type ExUnitsPrices, type GenesisKeyDelegationCertificate, type GovernanceActionId, InstanceType, KeyDerivationPurpose, KeyDerivationRole, MAX_SIGNED_64BIT, MAX_UNSIGNED_64BIT, MIN_SIGNED_64BIT, type MirCertificate, MirCertificateKind, MirCertificatePot, type MirToPot, type MirToStakeCreds, type NativeScript, NativeScriptKind, NetworkId, NetworkMagic, Pbkdf2HmacSha512, type PlutusData, PlutusLanguageVersion, type PlutusList, type PlutusMap, type PlutusScript, PointerAddress, type PoolParameters, type PoolRegistrationCertificate, type PoolRetirementCertificate, type PoolVotingThresholds, type ProtocolParameters, type ProtocolParametersUpdate, type ProtocolVersion, type Provider, type Redeemer, RedeemerPurpose, type RegistrationCertificate, type Relay, type RelayByAddress, type RelayByName, type RelayByNameMultihost, type RequireAllOfScript, type RequireAnyOfScript, type RequireAtLeastScript, type RequireSignatureScript, type RequireTimeAfterScript, type RequireTimeBeforeScript, type ResignCommitteeColdCertificate, RewardAddress, type Script, ScriptType, type SecureKeyHandler, type SingleAddressCredentialsConfig, SingleAddressWallet, type SingleAddressWalletConfig, type SingleAddressWalletFromMnemonicsConfig, SoftwareBip32SecureKeyHandler, SoftwareEd25519SecureKeyHandler, type StakeDelegationCertificate, type StakeDeregistrationCertificate, type StakePointer, type StakeRegistrationCertificate, type StakeRegistrationDelegationCertificate, type StakeVoteDelegationCertificate, type StakeVoteRegistrationDelegationCertificate, TransactionBuilder, type TxEvaluator, type TxIn, type TxOut, type UTxO, type UnitInterval, type UnregistrationCertificate, type UpdateDRepCertificate, type Value, type VkeyWitness, type VkeyWitnessSet, Vote, type VoteDelegationCertificate, type VoteRegistrationDelegationCertificate, type Voter, VoterType, type VotingProcedure, type Wallet, type Withdrawals, addWithdrawal, applyVkeyWitnessSet, assertSuccess, assetIdFromParts, assetNameFromAssetId, asyncifyStateTracker, base64ToBytes, blake2bHashFromBytes, blake2bHashFromHex, bridgeCallbacks, cborToPlutusData, cborToScript, cip105DRepFromCredential, cip129DRepFromCredential, cip129DRepFromPublicKey, cip129DRepFromScript, computeScriptHash, dRepToAddress, dRepToCredential, deepEqualsPlutusData, deepEqualsScript, derefCostModel, derefCostModels, derefDRepVotingThresholds, derefExUnitPrices, derefExUnits, derefPoolVotingThresholds, derefProtocolParameters, derefProtocolVersion, derefUnitInterval, entropyToMnemonic, finalizationRegistry, getErrorString, getFromInstanceRegistry, getLibCardanoCVersion, getModule, getScriptAddress, getUniqueSigners, govActionIdFromBech32, govActionIdToBech32, harden, hexToBufferObject, hexToUint8Array, inspectTx, isDRepAbstain, isDRepCredential, isDRepNoConfidence, isNativeScript, isPlutusDataBigInt, isPlutusDataByteArray, isPlutusDataConstr, isPlutusDataList, isPlutusDataMap, isPlutusDataWithCborCache, isPlutusScript, isReady, jsonToNativeScript, mnemonicToEntropy, nativeScriptToJson, plutusDataToCbor, policyIdFromAssetId, prepareUtxoForEvaluation, readAnchor, readAssetId, readAuthCommitteeHotCertificate, readBlake2bHashData, readBufferData, readCertificate, readCommitteeMembersMap, readConstitution, readCostModel, readCostModels, readCredential, readCredentialSet, readDRepRegistrationCertificate, readDRepUnregistrationCertificate, readDRepVotingThresholds, readDatum, readExUnitPrices, readExUnits, readGenesisKeyDelegationCertificate, readGovernanceActionId, readI64, readInputSet, readIntervalComponents, readMoveInstantaneousRewardsCertificate, readPlutusData, readPoolParameters, readPoolRegistrationCertificate, readPoolRetirementCertificate, readPoolVotingThresholds, readProtocolParamUpdate, readProtocolParameters, readProtocolVersion, readRedeemer, readRedeemerList, readRedeemersFromTx, readRegistrationCertificate, readResignCommitteeColdCertificate, readScript, readStakeDelegationCertificate, readStakeDeregistrationCertificate, readStakeRegistrationCertificate, readStakeRegistrationDelegationCertificate, readStakeVoteDelegationCertificate, readStakeVoteRegistrationDelegationCertificate, readStringFromMemory, readTransactionFromCbor, readTxIn, readTxOut, readTxOutFromCbor, readUTxOtFromCbor, readUnitIntervalAsDouble, readUnregistrationCertificate, readUpdateDRepCertificate, readUtxo, readUtxoList, readValue, readValueFromCbor, readVkeyWitnessSet, readVkeyWitnessSetFromWitnessSetCbor, readVoteDelegationCertificate, readVoteRegistrationDelegationCertificate, readVoter, readVotingProcedure, readWithdrawalMap, ready, registerBridgeErrorHandler, registerInstance, reportBridgeError, scriptToCbor, splitToLowHigh64bit, toCip105DRepID, toCip129DRepID, toUnitInterval, uint8ArrayToHex, uint8ArrayToUtf8, unrefObject, unregisterBridgeErrorHandler, unregisterInstance, utf8ByteLen, utf8ToHex, utf8ToUint8Array, writeAccountDerivationPaths, writeAnchor, writeAssetId, writeAuthCommitteeHotCertificate, writeBytesToMemory, writeCertificate, writeCommitteeMembersMap, writeConstitution, writeCostModel, writeCostModels, writeCredential, writeCredentialSet, writeDRepRegistrationCertificate, writeDRepUnregistrationCertificate, writeDRepVotingThresholds, writeDatum, writeDerivationPaths, writeExUnitPrices, writeExUnits, writeGenesisKeyDelegationCertificate, writeGovernanceActionId, writeI64, writeInputSet, writeMoveInstantaneousRewardsCertificate, writePlutusData, writePoolParameters, writePoolRegistrationCertificate, writePoolRetirementCertificate, writePoolVotingThresholds, writeProtocolParamUpdate, writeProtocolParameters, writeProtocolVersion, writeRedeemer, writeRedeemerList, writeRegistrationCertificate, writeResignCommitteeColdCertificate, writeScript, writeStakeDelegationCertificate, writeStakeDeregistrationCertificate, writeStakeRegistrationCertificate, writeStakeRegistrationDelegationCertificate, writeStakeVoteDelegationCertificate, writeStakeVoteRegistrationDelegationCertificate, writeStringToMemory, writeTransactionToCbor, writeTxIn, writeTxOut, writeUnitInterval, writeUnitIntervalAsDouble, writeUnregistrationCertificate, writeUpdateDRepCertificate, writeUtxo, writeUtxoList, writeValue, writeVkeyWitnessSet, writeVoteDelegationCertificate, writeVoteRegistrationDelegationCertificate, writeVoter, writeVotingProcedure, writeWithdrawalMap };