Skip to content

Commit 17eab60

Browse files
committed
Add SignatureHashType export
1 parent 3c69863 commit 17eab60

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export {
1818
} from './internal';
1919

2020
export {
21-
Int, Bool, Bytes, SubBytes, PrivKey, PubKey, Sig, Ripemd160, Sha1, Sha256, SigHashType, SigHashPreimage,
21+
Int, Bool, Bytes, SubBytes, PrivKey, PubKey, Sig, Ripemd160, Sha1, Sha256, SigHashType, SignatureHashType, SigHashPreimage,
2222
OpCodeType, SupportedParamType, PubKeyHash, TxContext, ContractClass, Contract, SortedItem, HashedMap, HashedSet,
2323
StructObject, TypeResolver, PrimitiveTypes, AsmVarValues, Flavor,
2424
Arguments, Argument, StructEntity, LibraryEntity, ABIEntity, ABIEntityType, ABI, ParamEntity,

src/utils.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export { bsv };
1010

1111
import { ABIEntity, LibraryEntity } from '.';
1212
import { compileAsync, OpCode } from './compilerWrapper';
13-
import { AbstractContract, compile, CompileResult, findCompiler, getValidatedHexString, Script, ScryptType, StructEntity, SupportedParamType } from './internal';
13+
import { AbstractContract, compile, CompileResult, findCompiler, getValidatedHexString, Script, ScryptType, SignatureHashType, StructEntity, SupportedParamType } from './internal';
1414
import { arrayTypeAndSizeStr, isGenericType, parseGenericType } from './typeCheck';
1515

1616
const BN = bsv.crypto.BN;
@@ -26,8 +26,7 @@ export const DEFAULT_FLAGS =
2626
Interp.SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS |
2727
Interp.SCRIPT_VERIFY_CHECKLOCKTIMEVERIFY | Interp.SCRIPT_VERIFY_CHECKSEQUENCEVERIFY | Interp.SCRIPT_VERIFY_CLEANSTACK;
2828

29-
export const DEFAULT_SIGHASH_TYPE =
30-
bsv.crypto.Signature.SIGHASH_ALL | bsv.crypto.Signature.SIGHASH_FORKID;
29+
export const DEFAULT_SIGHASH_TYPE: SignatureHashType = SignatureHashType.ALL;
3130

3231

3332
/**

0 commit comments

Comments
 (0)