@@ -5,8 +5,14 @@ export { RootWalletKeys, type WalletKeysArg, type IWalletKeys } from "./RootWall
55export { ReplayProtection , type ReplayProtectionArg } from "./ReplayProtection.js" ;
66export { outputScript , address } from "./address.js" ;
77export { Dimensions } from "./Dimensions.js" ;
8- export { type OutputScriptType , type InputScriptType , type ScriptType } from "./scriptType.js" ;
9- export { ChainCode , chainCodes , type Scope } from "./chains.js" ;
8+ export {
9+ outputScriptTypes ,
10+ inputScriptTypes ,
11+ type OutputScriptType ,
12+ type InputScriptType ,
13+ type ScriptType ,
14+ } from "./scriptType.js" ;
15+ export { ChainCode , chainCodes , assertChainCode , type Scope } from "./chains.js" ;
1016
1117// Bitcoin-like PSBT (for all non-Zcash networks)
1218export {
@@ -61,3 +67,23 @@ import type { ScriptType } from "./scriptType.js";
6167export function supportsScriptType ( coin : CoinName , scriptType : ScriptType ) : boolean {
6268 return FixedScriptWalletNamespace . supports_script_type ( coin , scriptType ) ;
6369}
70+
71+ /**
72+ * Create an OP_RETURN output script with optional data
73+ *
74+ * @param data - Optional data bytes to include in the OP_RETURN script
75+ * @returns The OP_RETURN script as a Uint8Array
76+ *
77+ * @example
78+ * ```typescript
79+ * // Empty OP_RETURN
80+ * const script = createOpReturnScript();
81+ *
82+ * // OP_RETURN with data
83+ * const data = new Uint8Array([1, 2, 3, 4]);
84+ * const script = createOpReturnScript(data);
85+ * ```
86+ */
87+ export function createOpReturnScript ( data ?: Uint8Array ) : Uint8Array {
88+ return FixedScriptWalletNamespace . create_op_return_script ( data ) ;
89+ }
0 commit comments