File tree Expand file tree Collapse file tree 3 files changed +28
-10
lines changed
docs/content/docs/modules/core Expand file tree Collapse file tree 3 files changed +28
-10
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ parent: Modules
4343 - [ arbitrary] ( #arbitrary )
4444- [ utilities] ( #utilities )
4545 - [ countRequiredSigners] ( #countrequiredsigners )
46+ - [ extractKeyHashes] ( #extractkeyhashes )
4647- [ utils] ( #utils )
4748 - [ CDDLSchema] ( #cddlschema )
4849 - [ FromCBORBytes] ( #fromcborbytes-1 )
@@ -374,6 +375,19 @@ export declare const countRequiredSigners: (script: NativeScriptVariants) => num
374375
375376Added in v2 .0.0
376377
378+ ## extractKeyHashes
379+
380+ Extract all key hashes from a native script .
381+ Recursively traverses nested scripts to find all ScriptPubKey key hashes .
382+
383+ **Signature **
384+
385+ ```ts
386+ export declare const extractKeyHashes : (script : NativeScriptVariants ) => ReadonlyArray <Uint8Array >
387+ ```
388+
389+ Added in v2 .0.0
390+
377391# utils
378392
379393## CDDLSchema
Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ parent: Modules
4343 - [ arbitrary] ( #arbitrary )
4444- [ utilities] ( #utilities )
4545 - [ countRequiredSigners] ( #countrequiredsigners )
46+ - [ extractKeyHashes] ( #extractkeyhashes )
4647- [ utils] ( #utils )
4748 - [ CDDLSchema] ( #cddlschema )
4849 - [ FromCBORBytes] ( #fromcborbytes-1 )
@@ -374,6 +375,19 @@ export declare const countRequiredSigners: (script: NativeScriptVariants) => num
374375
375376Added in v2 .0.0
376377
378+ ## extractKeyHashes
379+
380+ Extract all key hashes from a native script .
381+ Recursively traverses nested scripts to find all ScriptPubKey key hashes .
382+
383+ **Signature **
384+
385+ ```ts
386+ export declare const extractKeyHashes : (script : NativeScriptVariants ) => ReadonlyArray <Uint8Array >
387+ ```
388+
389+ Added in v2 .0.0
390+
377391# utils
378392
379393## CDDLSchema
Original file line number Diff line number Diff line change @@ -640,16 +640,6 @@ export const countRequiredSigners = (script: NativeScriptVariants): number => {
640640 * Extract all key hashes from a native script.
641641 * Recursively traverses nested scripts to find all ScriptPubKey key hashes.
642642 *
643- * @example
644- * import { NativeScripts } from "@evolution-sdk/core"
645- *
646- * const script = NativeScripts.makeScriptAll([
647- * NativeScripts.makeScriptPubKey(keyHash1).script,
648- * NativeScripts.makeScriptPubKey(keyHash2).script
649- * ])
650- * const keyHashes = NativeScripts.extractKeyHashes(script.script)
651- * // Returns Set<Uint8Array> containing keyHash1 and keyHash2
652- *
653643 * @since 2.0.0
654644 * @category utilities
655645 */
You can’t perform that action at this time.
0 commit comments