- Pump
compiler
- Pump
@scrypt-inc/bsvdependencies
- Fix dependencies, add
minimist
- Pump
@scrypt-inc/bsvdependencies
- Pump
@scrypt-inc/bsvdependencies
- Pump default compiler version to
1.19.4 - Change
bsvdependencies to@scrypt-inc/bsv, no bsv patch now - Add
optimizeoption - No longer use source code to calculate md5, but script hex templete
- Pump default compiler version to
1.19.4 - Change
bsvdependencies to@scrypt-inc/bsv, no bsv patch now - Add
optimizeoption - No longer use source code to calculate md5, but script hex templete
update bsv lib
- fix transaction over the maximum block size
signTxaddhashCacheparameter
- update bsv lib
- support special sCrypt compiler by Enviroment Variables:
SCRYPTC
- fix
findCompiler
- don't donwload sCrypt compiler when install
- support https proxy
- rename
this.setNOPScript()tothis.prependNOPScript()
- check nopscript when call
this.setNOPScript()
- publish
latesttag
- remove Ordinal and add
nopScript
- Support Ordinal
- Fix
AbstractContract.fromHex(hex: string)
- Fix glob issue.
- Fix patching issue.
PrivateKey.fromRandom()now takesNetwork.Typeparameter
- update bsv to fix change amount error when using a uncompressed public key.
- add
ContractClass.abiCoder.parseCallData(hex: string), which can parse CallData from a unlocking script hex.
PrivateKey.fromRandom()now takesNetwork.Typeparameter
- update bsv
- fix #228
- fix
fromHex()issue
- bsv: add
verifyScript()
- bsv: add
getChangeAddress()forTransactionclass
- fix bsv issue
- make
genLaunchConfig()more independent, now it just generate a debugger launch configuration for the contract's last called public method
- Fix definition of
TxContext
/**
* TxContext provides some context information of the current transaction,
* needed only if signature is checked inside the contract.
*/
export interface TxContext {
/** current transaction represented in bsv.Transaction object or hex string */
tx: bsv.Transaction | string;
/** input index */
inputIndex: number;
/** input amount in satoshis */
inputSatoshis: number;
/** contract state in ASM format */
opReturn?: string;
/** contract state in hex format */
opReturnHex?: string;
}- deprecated
asmfield ofContractArtifact
- fix bsv issue
- update exports
- remove
_preimagesMapand_signaturesMapinbsv.Transaction
- fix transaction fee evaluation
- update bsv index.d.ts
- update bsv index.d.ts
targetin compilerOptions change toes5
- Fix parseStateHex
- update bsv index.d.ts
Release Date: 2023/01/09
- update bsv index.d.ts
Release Date: 2023/01/09
- remove scryptType class, use type
- add bsv typescript defined
- firstCall rename to isGenesis
- auto complete transation sig and sighashpreimage.
- optimize cli
- remove FORKID from sighash flag
- auto calc keyIndex
- Fix genLaunchConfigFile
- rename desc files to contractname.json now
see PR #211
Release Date: 2023/01/08
- Fix big int issue #206
Release Date: 2022/11/11
- Fix
findCompilerfails in docker container
Release Date: 2022/09/15
- Optimize memory usage when building tx
Release Date: 2022/09/15
- fix clean compiler output files
Release Date: 2022/09/07
- export
parseStateHexfunction - remove
_dataPartInASM
Release Date: 2022/09/03
- Update transaction fee rate, now
50satoshis per kilobyte.
Release Date: 2022/08/26
- Optimize memory usage
Release Date: 2022/08/26
- Fix
getLowSPreimagefor new compiler which further optimize optimalpushtx
Release Date: 2022/08/14
- Fix lockingScript changed after verify.
Release Date: 2022/08/03
- Update contract description file version, remove
sources,sourceMap,asmfields, addsourceMapFilefields. - Support the source map format described here.
- Fix out of memery when generating contract description file for large contract
- Deprecated
setDataPart, addsetDataPartInASMandsetDataPartInHex
- Support for structs with generics
struct ST<T> {
T x;
}
contract C {
ST<int> a;
public function unlock(ST<int> a) {
require(this.a == a);
}
}- Breaking change: accessing
HashedMapandHashedSetrequires using the structureSortedItem<T>.
contract C {
public function add2Set(SortedItem<int> val) {
HashedSet<int> set = new HashedSet(b'');
require(set.add(val));
require(set.has(val));
require(true);
}
public function add2Map(SortedItem<int> key, int val) {
HashedMap<int, int> map = new HashedMap(b'');
require(map.set(key, val));
require(map.canGet(key, val));
require(true);
}
}
// call public function in SDK:
const C = buildContractClass(loadDescription('set_map_simple_desc.json'));
let c = new C();
// accessing `HashedSet` using the structure `SortedItem`
let set = new Set<number>();
const e = 1;
set.add(e)
result = c.add2Set(new SortedItem({
item: 1,
idx: findKeyIndex(set, e)
})).verify();
// accessing `HashedMap` using the structure `SortedItem`
let map = new Map<number, number>();
const key = 1, val = 2;
map.set(key, val)
result = c.add2Map(new SortedItem({
item: key,
idx: findKeyIndex(map, key)
}), val).verify();Release Date: 2022/05/22
- Support for parsing compilation results in asynchronous mode
Release Date: 2022/05/14
- Add compileAsync,
compileContractAsync
const result = await compileContractAsync(absolute path);Release Date: 2022/05/07
- Fix memory leak when
verify
Release Date: 2022/04/27
- Add util functions:
and(),or(),xor(),invert(), which are equivalent to the bitwise operators&,|,^,~in scrypt
Release Date: 2022/04/15
- Support auto initializing instance property
Release Date: 2022/03/05
- Support auto initializing instance property
Release Date: 2022/03/05
- Fix
literal2ScryptTypeissue
Release Date: 2022/02/21
- Support bytes with string literal:
new String("hello world 😊")
Release Date: 2022/02/19
- Support verify public function without parameters
Release Date: 2022/02/15
- Added
buildScryptTypeResolver
Release Date: 2022/02/11
- Added PubKeyHash type support
- Added
clonefunction forScryptTypeclass
Release Date: 2022/02/09
- Supports property nested generic library
Release Date: 2022/02/08
- Support
libraryas contract property, function parameter and return type
// now you can new contract with library as a property.
const Test = buildContractClass(loadDescription('desc.json'));
const { L, ST } = buildTypeClasses(Test);
const contract = new Test(2, new L(1, 1));- Add
libraryandstaticsfield to contract description file - Add two function
toHashedMapandtoHashedSetto convert originMapandSettoHashedMapandtoHashedSet
Release Date: 2022/01/27
- Support
constructorin contract with@stateproperty - Upgrade Contract Description, see VERSIONLOG.md
Release Date: 2022/01/12
- Fix #156 sig become invalid after seal Transaction
Release Date: 2021/12/22
- remove type defined for Script,It caused a conflict with the type definition of the BSV library
- add
parseAbiFromUnlockingScript - add
encodePubFunctionCallFromHex
Release Date: 2021/12/06
- rename
cropCodeseparatorstosubScript
Release Date: 2021/12/02
- support
Tx.checkPreimageOCS - add Util function:
buildOpreturnScript,buildPublicKeyHashScript,getLowSPreimage
Release Date: 2021/12/01
- support
HashedSet
Release Date: 2021/11/27
- add
codeHashmethod for contract - add
hash160,sha256,hash256util functions - add
prevoutsmethod for transaction
Release Date: 2021/11/26
- support HashedMap
- contract description file adds
genericfield
Release Date: 2021/11/10
- provides a set of chained APIs to simplify building transactions
Release Date: 2021/11/8
- support access structure members
- support the use of commands to compile contracts, see command in CLI
- change
getStateScripttogetNewStateScript
Release Date: 2021/10/23
- support array/struct state
- add
getStateScript, see Contracts with State - fix bsv library issue: Signature error in the browser environment
Release Date: 2021/10/15
- fix state issue
- revert
serializeBool
Release Date: 2021/10/05
- support
statedecorator - add
hexCompile setting, defaulttrue
Release Date: 2021/10/04
- add
hexfor Contract Description File - fix not working properly if got very big number in contract
- fix circular dependencies
Release Date: 2021/08/25
- add
RelatedInformationfor diagnostics - support Compile Time Constant used in struct & typeAlias
- fix typeAlias resolve issue #118
Release Date: 2021/08/06
- fix crash when using negative numbers to construct structures
- patch bsv to fix Interpreter bug
- add
checkValueto check if an integer is used to constructInt
Release Date: 2021/07/12
- add topVars
Release Date: 2021/07/1
- support browsers that are not compatible with bigint
- add construct contracts from raw transactions
- remove ts-optchain which is now deprecated
- bump ssri from 6.0.1 to 6.0.2
- bump lodash from 4.17.20 to 4.17.21
Release Date: 2021/06/21
- bump
bsvlibrary to version1.5.6 - Contract Description File add
buildType - remove
debugUricommand option, will print Launch Debugger uri default - export
bsvECIES compileContractfunction supports whether to export the sourcemap
- Fix loc undefined
- support bigint in ast
- support print launch.json for debugging in browser webview developer tool. see commit
- remove CheckPreimage/CheckSig Fail Hints
- encodeConstructorCall RegExp replace error Fix #86
- remove
stdinfrom error message - fix IDE UnhandledPromiseRejectionWarning
- support warnings
- add CheckPreimage/CheckSig Fail Hints
- fix VerifyError: SCRIPT_ERR_MINIMALDATA
- fix struct toLiteral not working properly
- fix finalTypeResolver not working properly when passing struct array
- support being required in browser env
- update desc file version, remove finalType field
- add buildTypeResolver
- no more ImportError, using SemanticError
- git ignore desc fils
- add debugUri command option
- add timeout option for compile function
- support mixed struct and array
- CompileResult structs properties contains all dependencyAsts structs
- Does not force an error when the DESC file version is too old
- Support type alias
- Update contract description version, see
VERSIONLOG.md
- export genLaunchConfigFile
- support InternalError
- export genLaunchConfigFile
- support InternalError
- Fix failure when launching debugger after test errors
- add file property to ContractDescription
- small refactor
- add goto source test
- Fix failure when launching debugger after test errors
- Fix source map failure on boilerplate/tests/js/tokenUtxo.scrypttest.js
- Fix desc2CompileResult fail when sourceMap empty
- add sourceMap to desc file
- Locate sCrypt source where scrypttest fails, exactly verify failed
- auto generate launch.json for debugging when contract verify failed
- move desc to out dir
- add struct support
- add static getAsmvars fn
- change rename to renameSync
- return error position with start/end in SemanticError
- remove scryptc dependencies
- fixed get scripcode bug of preimage
- support get asmVars
- bug fix: semantic errors contains end location, besides start loc
- add literal2ScryptType
- add parseLiteral
- deprecated literal2Asm
- support new array
- bug fix: used scrypt binary as compiler in 0.2.17
- support byte
- support bool and int array
- support empty bytes
- support serializer
- support SigHashPreimage type
- add some options to compile function
- change source location in compileResult from path to uri
- support ASM variable instantiation
-
change pub function index start from 0, not 1
-
type "Bytes" -> "byte[]"
Enhancements:
- simplify verify() return to error, not exception