UNPKG

scrypt-ts-transpiler

Version:

```bash npm i npx scryptlib download npm t ```

10 lines (9 loc) 1.36 kB
export declare const BUILD_STATE_OUTPUT_FUNCTION = "\nfunction buildStateOutput(int amount) : bytes {\n return Utils.buildOutput(this.getStateScript(), amount);\n}\n"; export declare const BUILD_CHANGE_OUTPUT_FUNCTION = "\nfunction buildChangeOutput() : bytes {\n return this.__scrypt_ts_change.amount > 0 ? Utils.buildOutput(Utils.buildPublicKeyHashScript(this.__scrypt_ts_change.address), this.__scrypt_ts_change.amount) : b'';\n}\n"; export declare const CHANGE_STRUCT = "\nstruct __scrypt_ts_Change {\n int amount;\n Ripemd160 address;\n}\n"; export declare const INIT_CHANGE = "this.__scrypt_ts_change = {__scrypt_ts_changeAmount, __scrypt_ts_changeAddress};"; export declare const INIT_PREVOUTS = "this.__scrypt_ts_prevouts = __scrypt_ts_prevouts;"; export declare const REQUIRE_PREVOUTS_EMPTY = "require(__scrypt_ts_prevouts == b'');"; export declare const VERIFY_PREVOUTS = "require(hash256(__scrypt_ts_prevouts) == this.__scrypt_ts_ctx_hashprevouts);"; export declare const TIME_LOCK_FUNCTION = "\nfunction timeLock(int locktime): bool {\n bool res = true;\n res = this.__scrypt_ts_ctx_sequence < 0xffffffff;\n if (\n locktime < 500000000\n ) {\n res = res && this.__scrypt_ts_ctx_locktime < 500000000;\n }\n return res && this.__scrypt_ts_ctx_locktime >= locktime;\n}\n"; export declare const EMPTY_CONSTRUCTOR = "\nconstructor(){\n}\n";