All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
TupleReader
: always pop current element inreadStringOpt
andreadBufferOpt
(thx @anton-trunov)
ContractProvider
:get
now accept numbers as method IDs (thx @anton-trunov)Cell.fromHex
method (thx @krigga)
- Contract proxy method discovery
- Methods, prefixed with "is" in the contract classes are now wrapped like "send"/"get"
- More flexible merkle proof generation (thx @akifoq)
- reserve_currecy, change_library actions for OutList (thx @1IxI1)
- Number type safety check in BitReader (thx @Trinketer22)
- Updated
typescript
to5.4.3
and fixed compilation errors
getRepr
andgetRefsDescriptor
now using level mask instead of level- Cells with prunned branches hash and serialization fixes
- Fixed BoC serialization with indicies
- Improve BoC serialization perfomance (thanks @krigga)
Notes: BoC topological sort now is more like C++ impl, however there are still some differences. Tests in your project may fail after this update if you rely on serialized BoC.
ContractProvider.getTransactions
methodContractProvider.open
method
ReopenableContractProvider
,isReopenableContractProvider
due to inconvenience
ReopenableContractProvider
interface to allow reusing same provider for another contractisReopenableContractProvider
type guard to check if contract provider supports new API
- Added
exotic
flag toCell.endCell
args (thanks @Gusarich)
- Exotic cells in
storeMessageRelaxed
- Extracurrency edgecase for
storeMessage
(thanks @aSpite) AccountStatusChange
status parsing (thanks @TrueCarry)- type definitions for
StateInit
(thanks @Gusarich)
Dictionary
BitString
keys and values (thanks @Trinketer22)BitString.isBitString
method (thanks @Trinketer22)paddedBufferToBits
helper (thanks @Trinketer22)Dictionary.generateMerkeProof
andDictionary.generateMerkleUpdate
(thanks @Gusarich)OutAction
andOutList
(de)serializers (thanks @siandreev)
BitString.substring
now acceptsoffset
==str.length
Address.isRaw
invalid address regexp
- ton-crypto replaced with @ton/crypto in build
Transaction.raw
field contains raw transaction cellTransaction.hash
function computes hash of raw transaction cell
TupleReader.readLispList
/TupleReader.readLispListDirect
toNano
now accepts fractional numbers
Address.parse
/Address.parseRaw
/Address.parseFriendly
now checks validity of address before parsingloadStringTail
crashed if the slice was partially read
- Migrated to @ton/crypto package instead of ton-crypto
Cell.fromBoc
exotic cell parsingCell.hash
calculation if there is merkle proof in the cell treeBitString.substring
correct shortcut for empty substring
Slice.clone(true)
to clone slice and reset it to the beginingSlice.offsetBits
andSlice.offsetRefs
to get current offset in bits and refsBitReader.offset
to get current offset in reader
Library
exotic cell parsing
- Refs Overflow in
storeMessage
andstoreMessageRelaxed
address
helper function for easier address parsingContractGetMethodResult
and added optionalgasUsed
andlogs
to it
- export the
OpenedContract
type
skip
toTupleReader
- Ability to pass
Cell
to dict load functions
- Allow provide key/value serializers only during storing in cell allowing to create an empty dicts
- Limited dictionary key types by
number
,bigint
,Address
andBuffer
map
->dict
in ABI
writeAddress
toTupleBuilder
- Rename
Tuple*
toTupleItem
to avoid name clashing
- Add
TupleBuilder
helper to build tuples
readBuffer
,readBufferOpt
,readString
,readStringOpt
toTupleReader
storeMaybeBuffer
toBuilder
loadBoolean
,loadMaybeBoolean
,loadMaybeUint
,loadMaybeUintBig
,loadMaybeInt
,loadMaybeIntBig
toSlice
ABITypeRef
,ABIField
,ABIArgument
,ABIGetter
,ABIType
,ABIReceiverMessage
,ABIReceiver
for ABI interface
peek
method inTupleReader
parseTuple
with slices with refs
ContractABI
,ABIError
and optional fieldabi
inContract
type
init
field serialization inMessageRelaxed
- possible broken
refs
when usingBuilder
multiple times
- Make
errorCode
non optional inComputeError
ComputeError
for throwing when executing contract
- removed
prando
peer dependency
- Rename
AccountState
toContractState
to avoid name clashing with blockchain primitives
openContract
- universal method for libraries to use to open a contractgetMethodId
- helper method to get method id from a method name
- Disallow parsing of exotics by default
ShardAccount
parsingAccount
parsing
- Missing exports of
StateInit
🔧 Big refactoring, removing obsolete Message
type and adding new types for working with contracts and accounts.
- Add parsing of transactions, accounts and blocks
- Remove old
Message
type and all relevant types
- Fix optionals type in
internal
/external
helpers
- Fix
body
type ininternal
helper
- Improved
SenderArguments
types
Sender
arguments optionals
- Renamed
send
tointernal
andexternal
inContractProvider
SenderArguments
bounce
flag toSenderArguments
- Ability to pass strings as value or body in
internal
helper
- Change
amount
tovalue
to match schema
- Change helpers signatures
- Add
Sender
type for sending internal messages - Add
internal
,external
andcomment
helpers
- Change account state from
Cell
toBuffer
- Added
Contract
,ContractProvider
andAccountState
types
- Added
SendMode
- Added
safeSign
andsafeSignVerify
- Fixed mutation of a
Cell
when reading from aSlice
clone
- improved return types in
loadDict
andloadDictDirect
Dictionary
,DictionaryKey
andDictionaryValue
to work with TVM dictsloadDict
andloadDictDirect
toSlice
storeDict
andstoreDictDirect
toBuilder
- Critical issue in calculating
StateInit
andcontractAddress
toNano
andfromNano
helper methodscrc16
andcrc32c
checksum functions that compatible with TONbase32Decode
andbase32Encode
for base32 encoding/decoding- Messages:
StateInit
,InternalMessage
,ExternalMessage
,EmptyMessage
,CommentMessage
,CommonMessageInfo
,CellMessage
,BufferMessage
contractAddress
function for calculation of an addressstoreStringTail
,storeMaybeStringTail
,storeStringRefTail
,storeMaybeStringRefTail
inBuilder
loadStringTail
,loadMaybeStringTail
,loadStringRefTail
,loadMaybeStringRefTail
inSlice
availableBits
inBuilder
Tuple
object with serialization
- Hotfix for config contract proofs
- Fix reading of external addresses in
BitReader
loadMaybeCell
/loadCell
->loadMaybeRef
/loadRef
inSlice
asSlice
toBuilder
andCell
asCell
toBuilder
andSlice
asBuilder
toCell
andSlice
clone
function toSlice
loadCoins
andpreloadCoins
returnsbigint
instead ofnumber
availableBits
andavailableRefs
inBuilder
length
inBitBuilder
bits
andrefs
inBuilder
storeBuilder
andstoreMaybeBuilder
inBuilder
remaining
inBitReader
remainingBits
,remainingRefs
,loadBuffer
andpreloadBuffer
inSlice
Writable
type that provides an abstraction of something that could be written toBuilder
storeSlice
,storeMaybeSlice
,storeWritable
,storeMaybeWritable
inBuilder
fromBoc
andtoBoc
toCell
for parsing and serializing cells to a BOC.
Cell
,Builder
,Slice
primitivesBitString
,BitReader
,BitBuilder
functionsexoticMerkleProof
,exoticMerkleUpdate
,exoticPruned
functions to parse exotic cells
Address
type that represents TON Standard Address