/** * Script Entity. */ export declare class Script { readonly bytes: Uint8Array; /** * Construct a new Script * * @param bytes {Uint8Array} The raw bytes of the Script. */ constructor(bytes: Uint8Array); /** * 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. */ static fromBytes(bytes: Uint8Array): Script; /** * 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. */ static fromASM(asm: string): Script; /** * Create a Script Entity from the given bytes (as hexadecimal string). * * @param hex {string} Raw script bytes encoded as hexadecimal. * * @throws {Error} If script cannot be decoded. * * @returns {Script} The created Script Entity. */ static fromHex(hex: string): Script; /** * Create a Script Entity from the given CashAddr. * * @param cashAddr {string} The Address in CashAddr format. * * @throws {Error} If address cannot be decoded. * * @returns {Script} The created Script Entity. */ static fromCashAddr(cashAddr: string): Script; /** * Create a Script Entity from the given Legacy Address. * * @param legacyAddress {string} The Address in Legacy format. * * @throws {Error} If address cannot be decoded. * * @returns {Script} The created Script Entity. */ static fromLegacyAddress(legacyAddress: string): Script; /** * Convert this script to a human-readable string of assembly. * * @returns {string} Human-readable assembly. */ toASM(joinWith?: string): string; /** * Get the raw bytecode for this script. * * @returns {Uint8Array} The compiled bytes. */ toBytes(): Uint8Array; /** * Get the raw bytecode for this script as a hex string. * * @returns {string} The compiled bytes as a hex string. */ toHex(): string; }