Resolve "WIP: UTXO Selection and Storage"
This commit is contained in:
@@ -6,6 +6,7 @@ import {
|
||||
binToHex,
|
||||
hexToBin,
|
||||
isHex,
|
||||
parseScript,
|
||||
} from '@bitauth/libauth';
|
||||
|
||||
/**
|
||||
@@ -23,6 +24,19 @@ export class Script {
|
||||
this.bytes = bytes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a Script Entity from the given Assembly String.
|
||||
*
|
||||
* @param asm {string} String of assembly code.
|
||||
*
|
||||
* @throws {Error} If script cannot be decoded.
|
||||
*
|
||||
* @returns {Script} The created Script Entity.
|
||||
*/
|
||||
public static fromBytes(bytes: Uint8Array): Script {
|
||||
return new Script(bytes);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a Script Entity from the given Assembly String.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user