All notable changes to this project will be documented in this file.
- Make execution fee constant for executions that failed with execution timeout
- Add ZK Halo2 verification insns:
ZKHALO2VERIFY(C749),ZKHALO2VERIFYWITHVK(C74A); extending priorVERGRTH16/ Poseidon ZK support with a Halo2/KZG backend. - Add
CHKHISTPROOF(C750) for TVM block history Merkle proof checks.
- Improve Poseidon hash implementation
tvm_abi: fixed an off-by-32 error when decoding values spanning multiple cells, which producedWrongDataLayoutwhen the last field spilled into a reference cell.tvm_client/tvm-cli: sending a message (e.g.tvm-cli call/callx) to a node that serves only the REST message API and returns 404 on/graphqlno longer fails withcode 11: Server responded with code 404. The GraphQL server-version probe is now best-effort: when GraphQL is reachable itsinfo.versionis trusted as before; when it is unavailable the send proceeds using the current v3 wire format instead of aborting, mirroring the existingget_accountfallback.
tvm_types/tvm_executor: use a fixed seed for the per-thread unique-cell Bloom filter, reset it before and after transaction execution, and manage executor cell size limits with an RAII guard so Bloom state and TLS limits are always cleared, including early error paths such asMaxBOCSizeExceeded. This makes transaction cell/tree size accounting deterministic and prevents producer/verifier divergence caused by stale warm Bloom state.tvm_cli: fixeddecode::tests::test_decode_body_jsonto use an existing manifest-relative wallet ABI fixture instead of a missingtests/samples/wallet.abi.jsonpath.tvm_debugger: fixed the testRunArgsinitializer to includeblock_seq_no.
Upgrading from 2.x? See
docs/MIGRATION-3.0.mdfor a step-by-step migration guide covering the dapp_id changes below.
- Default HD key derivation path changed from
m/44'/396'/0'/0/0tom/44'/1331'/0'/0/0. Crypto functions (tvm_client) and key/address generation (tvm_cli) that rely on the default path now derive different keys from the same seed phrase. To keep previous keys, pass the old path explicitly. tvm_client:ParamsOfGetAccount.addressrenamed toaccount_id; now strict 64-character hex (no0x, no workchain). Added requireddapp_idfield.tvm_client:ResultOfGetAccount.dapp_idis nowString(notOption); addedaccount_idfield.tvm_client:ParamsOfSendMessage.dst_dapp_id: Option<String>renamed todapp_id: String(empty allowed only for pre-1.0.0 servers).tvm_client:ResultOfSendMessagenow exposesaccount_idanddapp_id(always populated; derived from the request when the server doesn't return them).tvm_client:ParamsOfProcessMessage.dst_dapp_idrenamed todapp_id: String.tvm-clinow requires thedapp_id::account_idaddress form on all commands and against all nodes; legacy0:<hex>and bare-hex address inputs are no longer accepted.tvm-clideploy/deployxnow always require--dst-dapp-id(including--feemode); pass all zeros for a self-rooted dapp.tvm-cligenaddradditionally prints thedapp_id::account_id(dapp_accountin JSON) self-rooted form.
tvm_client: SDK version-gates/v2/accountand/v2/messageswire formats based on GraphQLinfo.version. v>=1.0.0 sends newdapp_id/account_idfields; v<1.0.0 keeps legacyaddress/dst_dapp_id.tvm_client: newServerLink::server_version()andServerLink::supports_dapp_id()helpers.
--block-seq-nooption fortvm-debugger runthat allows to set block seq no for TVM execution
tvm_apiandtvm_block_json: gated TON-specific code behind thetonfeature- TON-related dependencies are now optional to allow lighter builds without TON support
tvm_client: newaccount.get_accountAPI returning account BOC, optionaldapp_id, and state timestamptvm_cli: support for extended address parsing viaSdkAddress::from_str, includingdapp_idextraction from user-provided addresses
tvm_client:ClientErrornow exposes accessor methods (code(),message(),data(), etc.) instead of relying on direct public field access, and now carries optionaltraceparenttvm_client:ParamsOfSendMessagenow includesthread_idanddst_dapp_idtvm_client:ParamsOfProcessMessagenow includesdst_dapp_idtvm_client:ParamsOfWaitForTransactionnow acceptstx_hash;shard_block_idis deprecated and no longer used for transaction lookuptvm_client:ResultOfSendMessagenow returns message and transaction metadata (message_hash,block_hash,tx_hash,return_value,aborted,exit_code,thread_id,producers,current_time) instead ofshard_block_idandsending_endpointstvm_client:process_messageandwait_for_transactionnow use the transaction hash returned bysend_messagetvm_cli:call,callx, and proposal commands now derive destinationdapp_idfrom extended addressestvm_cli:deploy,deployx, andsendcommands now accept explicit--dst-dapp-idwhere the destinationdapp_idcan not be derived from an address
tvm_cli: fixeddump accountsaddress validation for the currentSdkAddressAPI
tvm_client: retry with exponential backoff forquery_httptvm_cli:--log-pathand--log-filteroptions to redirect and filter log output to a file, keeping stdout/stderr clean for automation
- Removed
failurecrate dependency across all workspace crates in favor ofanyhow - Replaced
anyhow::Error::msgwithanyhow::anyhow!macro for idiomatic error construction tvm_client: removed non-standard REST API port 8600, use standard HTTP/HTTPS portstvm_cli: console log output is suppressed in--jsonmode; default log level lowered from Warn to Error
- Fixed WASM web build compatibility and ZK dependency handling
- Fixed
current_traceparentfunction in endpoint.rs - Optimized dependencies: ZK deps behind feature gate, dependency deduplication, workspace consolidation
- Removed redundant
compliantflag from HD key derivation
- Fixed fwd_fee with flag 16
- Fixed use_new_version artifacts
- Fixed exchange system for 16 flag in message
- Fixed MerkleUpdate generation for a single account cell
tvm_client: outgoing HTTP requests now include atraceparentheader; on failure the trace identifier is included in the error message for easier diagnostics
tvm_cli: migrated CLI argument definitions to current clap v3 API, removing deprecated usage
tvm_cli:--abiargument is now required for thegenaddrsubcommand, preventing confusing runtime errors when omitted (breaking)
- Refactored transaction execute to properly initialize account state from StateInit before execution
- Fix token transfers between and within dapp_id
- Hash used for calculating BOC depth when applying BOC size limits
- Add general purpose Poseidon TVM instruction based on Axiom.
tvm_clientnow can be compiled without a wasmtime runtime (e.g. for the browser environment) with a new featurewasm_web
- Add and modify reward instruction for mvrewards and mining
- Fix deploy between dapp_id
- Client will choose https protocol for BK rest API if client's config endpoint uses https
- Add support of Gosh provider into TLS wasm binary and update related tests
- Fix mvreward
- Set big minstake
- Facebook tls wasm test
- Add get_proof and get_nonce functions
- Block seq no to repair accounts moved from SDK
- Added engine version to execute params
- MobileVerifiers rewards fixes
- In the
tvm_client::send_message()/tvm-cli call(x)execution error result, the recipient account address has been added. This is particularly useful in cases where errors occur during contract deployment tvm-cli account|run|runxcalls now returnstate_timestamp— the timestamp of the state from which the account’s BOC was loaded- A
state_timestampfield has also been added toResultOfGetAccount
-
Rename tvm-cli config files:
tonos-cli.conf.jsontotvm-cli.conf.jsontonos-cli.global.conf.jsontotvm-cli.global.conf.json
On first run after upgrade, if the new files don’t exist but the deprecated ones do, they are automatically renamed
-
Decoding of
return_valuereturned intvm-cli call(x)invocations
- Fixed tvm-debugger crashes when executing solidity functions that accept and return.
- Replace
bloomwithfastbloom
- Tests fixed
- Leaf cert subject check and some error codes in certs checking added
- Fixed VM deadlines setup
- Removed full shard state balance from ValueFlow
- Changed ShardAccountsMap from HashmapAugE to HashmapE
- Fixed hardcoded root certificates and sha384 issue in TLS wasm binary.
- Changed how the depth and bits are counted in BOC to account for deduplication (duplicate cells are not counted as they do not grow the account state). This updated counter is used to limit the max BOC size to avoid edge-case issues with node state updates.
- Wasmtime upgrade to 36.0.2
- Fixed some wasm tests
- External function for loading a wasm hash whitelist file from disk. Intended for use as a node config.
- Fix mv reward instructions
- Change reward instructions
- Change Constructor FunctionId to 1
- Fix bug with extract expires
- New type OptionalAccount that can either contain account data or be account redirect
- ShardAccount now contain OptionalAccount
- New int message header field: dest_dapp_id
- Added filed dapp_id_changed to AccountBlock struct
- FWD fees increased *2 for messages without dest_dapp_id
- Ability to write BOC into generic Write destination
- Now function
tvm_client::accountreturns account boc and dapp_id
- Fix mintshell action
- Add gas prices for Vergrth16 and Poseidon instructions
- Add wasm binary to checl TLS data for multifactor
- Error codes for different wasm-related errors for better on-chain debugging
- Various tests related to wasm clocks
- Wasi random functions now use block timestamps as seed.
- Cell optimizations
- UsageTree refactoring + optimizations
- Wasm plugs for wasi-io, wasi-clocks, wasi-random, providing access to some tvm blockchain info.
- Matching tests and examples
- Major refactor of wasm-related code
- Usage tree seg fault and added usage tree/set stoping tracking on tree drop
- Passing wasm binaries as arguments to
runwasmandrunwasmconcatmultiargnow behind a feature flag. With default flags, those binaries will be ignored.
- Add
getavailablecreditsendtodappconfigmintshellqinstructions - Change
mintshellinstruction. - Refactor fee in executor
- Update CALCBMREWARDADJ. Rename into CALCBMMVREWARDADJ
- Fixed
runwasmandrunwasmconcatmultiargto support wasm components dependent on, when no real io access is needed:
import wasi:io/streams@0.2.3;
import wasi:io/error@0.2.3;
import wasi:cli/stdin@0.2.3;
import wasi:cli/stdout@0.2.3;
import wasi:cli/stderr@0.2.3;
import wasi:filesystem/types@0.2.3;
import wasi:filesystem/preopens@0.2.3;
- Local wasm execution by hash now enforces sha256sum checking of the local wasm binary against a whitelist.
- added support for relaxed SIMD proposal with deterministic behaviour
- added memory limiter support for dynamic table and linear memory allocation
- enable other determinism settings via cranelift
- Wasm Component Precompilation: Wasm Enginge gets preinitialised and Components get pre-compiled and passed into the Executor via the Executor Engine. There is support for initialising via the Executor Engine or passing pre-initialised from an external context.
ExtMessagestructure changed:bm_license,bm_tokenfields removed,ext_message_tokenfield addednetwork.endpointsinitialization changed:- If port is specified in the endpoint URL then use this port for sending messages and getting account
- If port is not specified in the endoint URL then use 8600 for sending and getting account
- For graphql - always use http(s)://hostname/graphql url
- Use the specified schema (protocol) (https/http)
- Fixed an error decoding account data:
Invalid BOC: error decode contract data BOC base64
- Changed
api.jsonfile. Added properties related to module account.
- Fixed
runwasmandrunwasmconcatmultiargcausing panic on using invalid hash.
- Added
runwasmconcatmultiarginstruction that allows multiple arguments to be concatenated then passed torunwasm
accountmodule withget_accountfunction that requests account boc from BM or BK nodeapi-tokenadded toconfig.network
- Changed
runwasmgas usage to match other instruction prices
- Changed
runwasminstruction to accept local wasm binaries, selected by hash.
- Added fixed gas metering and wasm fuel limiting to
runwasminstruction
- Added
RUNWASMinstruction, allowing execution of WASM Component Binaries. Details and examples in WASM instruction docs.
- Add the ability to fill in the source address for external messages if it is provided by the Block Manager (required for Block Keepers with authentication enabled)
- Optimized build for new versions of Rust
- Add
BURNECCinstructions.
- Add support of authorization on Block Producers
- Fixed redirection while sending external messages
- Add
CALCBMREWARD,CALCBMREWARDADJ,CALCMINSTAKEBMinstructions.
goshfeature made default
- While sending external messages, using the port provided in the redirection response
- Message is sent to the
bk/v2/messagesorbm/v2/messagesendpoints
BOC v3stores all hashes and cell stats (tree cell count, tree bits count). It increases BOC size but speeds up deserialization time. It stores cell offsets instead of cell indexes, to avoid extra indirection level when resolving cell address inside boc. It also introduces new internal cell variantBoc3Cellthat holds ref to entire boc and offset of raw cell data. So whe using boc3 and new cell variant, it is possible to avoid boc deserialization into cell tree structure.Cellnow declared as ан enum instead of Arc.BocReaderparameterforce_cell_finalization- forces cell verification and hash rebuilding when reading cell(s) from BOC. It is by default. Turning this parameter off will speed up deserialization time in case when BOC contains stored hashes.
return_valueis added to theResultOfSendMessage- returns the executed contract's return value
- Restored the utility for generating
api.json. - Changed the type of the
thread_idfield in theParamsOfSendMessagestructure.
- Message delivery to the target thread has been made more reliable.
- Issue with tvm_api formatting
Error.data.tvm_exit_code renamed to Error.data.exit_code
- tvm-debugger commands: boc-encode Encodes given parameters in JSON into a BOC boc-decode Decodes BOC into JSON as a set of provided parameters boc-hash Read BOC string from stdin and print its hash state-encode Encodes initial contract state from code, data, libraries ans special options state-decode Decodes initial contract state into code, data, libraries ans special options account-encode Creates account state BOC
- tvm-debugger:
- existing functionality was moved under command
run
- existing functionality was moved under command
- In case of "THREAD_MISMATCH" error message will be re-sent to the right thread.
- In case of "WRONG_PRODUCER" error message was not re-sent to the right producer correctly.
- Removed some unused dependencies
tvm_vm: execution time control parameterstermination_deadlineandexecution_timeout. See details
- Fix bugs in VERGRTH16 and POSEIDON instructions.
dapp_id is moved form Account structure to the wrapping structure ShardAccount
- Add instructions CALCBKREWARDADJ, CALCREPCOEF functions
- Add free fee with same ThreadId
- Fix CNVRTSHELLQ, CALCBKREWARD, CALCMINSTAKE instructions.
processing.send_messageworks withbm/v2/messagesendpoint and synchronously returns execution result from the node
- Delete some flags from RawReserve instruction
- Fix src dapp id for out messages
- Rawreserve didn't include credit money.
- Transfer all balance sent credit money and transaction failed.
- Abort ext_message didn't restore balances
- Add support of VERGRTH16 and POSEIDON instructions for zk-login.
- Increase message credit.
- Update Dapp_id field in AccountStuff into Option.
- Work with CurrencyCollections. Fixed add and sub.
- Fix SEND_ALL_BALANCE_FLAG
Improve RawReserve instruction
- Fix with read_from_cell in VarIntegerN.
- Update MINTECC, EXCHANGE, CALCBKREWARD instruction.
- Fix check_overflow in grams.
- Add MINTSHELL intruction and credit program.
- Set
dapp_idin executor to have it the same for inbound and outbound messages.
dapp_idwas not set for the accounts which state changed from nonExist to Active
- Add tvm-client function
set_code_salt_cellto set code salt with both objects passed by cells (not shared in json-api).
- New instruction - CALCMINSTAKEREWARD.
- Change CNVRTSHELLQ instruction.
- New field in internal message -
src_dapp_id.
- New field in account -
dapp_id.
Validator reward formula updated.
- New VM instructions supported: MINTECC - mint ecc tokens for special contracts CNVRTSHELLQ - convert ecc shell tokens into shell 1:1 CALCBKREWARD - calculate reward for validators after validator epoch
tvm_debugger crate added
AccountActive Stack Overflow issue fixed
account state: AccountActive
Stack Overflow:
0: backtrace_on_stack_overflow::handle_sigsegv
1: <unknown>
2: <tvm_types::cell::DataCell as tvm_types::cell::CellImpl>::reference...
Resolved stack overflow issue: returning an error instead of using anyhow.
First release of SDK supporting Acki Nacki protocol.
- Updated dependences
- ABI 2.4 supported.
-
For contracts with ABI version => 2.4 initial public key should be explicitly supplied inside
initial_datainabimodule functions. Signer public key andinitial_pubkeyparameter are not used in contract initial data encoding since ABI version 2.4. -
abi.decode_initial_dataandabi.update_initial_datafunctions don't support ABI version => 2.4.abi.decode_account_dataandabi.encode_initial_datashould be used instead -
Only
workchain_idparameter is allowed ifstate_initparameter ofDeploySetis provided. State init should be finalized and ready to be used in message as is. -
abi.encode_accountparameterstate_initis BOC or cached BOC reference instead ofStateInitSourceenum. There is only one way to provide account state init now.
- Account BOC for local error resolving is fetched from blockchain API instead of collections API
- Error appeared during network paramaters resolving is returned to client instead of using default parameters
- Pruned account serialization supported
- functions with callbacks (e.g.
processing.process_messages) can be called as sync. send_eventparameter is now optional with default valuefalse.
- Debot module is DEPRECATED
- Ability to call async functions via
tc_request_sync. - In rust API, the following functions become sync (slight breaking):
abi::encode_internal_message,abi::attach_signature_to_message_body,abi::attach_signature,abi::decode_message,abi::decode_message_body,abi::decode_account_data,abi::update_initial_data,abi::encode_initial_data,abi::decode_initial_data,abi::decode_boc,abi::encode_boc,boc::decode_tvc,boc::parse_message,boc::parse_transaction,boc::parse_account,boc::parse_block,boc::parse_shardstate,boc::get_blockchain_config,boc::get_boc_hash,boc::get_code_from_tvc,boc::cache_get,boc::cache_set,boc::cache_unpin,boc::encode_boc,boc::get_code_salt,boc::set_code_salt,boc::decode_state_init,boc::encode_state_init,boc::encode_external_in_message,boc::get_compiler_version,processing::monitor_messages,processing::get_monitor_info,processing::cancel_monitor - Code generator for
modules.tsproduces_syncwrapper for all API functions.
- Memory leak in a spawned loop of the web socket link.
- Non existing accounts are treated as missing since q-server return
non existedif account is missing - Next block awaiting timeout calculation on message with long expiration time
MonitoredMessageAPI representation simplified.
network.network_retries_countconfig parameter is finally deprecated and not used in SDK.max_reconnect_timeoutis used instead- Message monitoring errors received by subscription are returned from
processing.fetch_next_monitor_resultsfunction - Message monitor buffers new messages for delayed start of the subscription. New subscription starts when 1 second has passed since the last addition or when 5 seconds has passed since last sending
- Message monitor uses more than one subscription.
- Version of
ton_typesupped to 2.0.0 - Fixed code for changed dependencies api
- Removed logic related to client-server clock sync
boc.encode_tvcandboc.decode_tvcare renamed toboc.encode_state_initandboc.decode_state_init.boc.decode_tvcdecodes TVC BOC according to the TVC spec.DeploySet.tvcsupports new TVC file format (according to new TVC spec). Old tvc files (with serialized state init) are also supported.DeploySet.state_initallows to specify serialized state init.DeploySet.codeallows to construct state init from provided serialized code.DeploySet's fieldstvc,state_initandcodeare mutually exclusive (so you should provide value for one of these fields).ProcessingEvent::MessageExpiredis sent to callback in case of retry inprocessing.process_message
boc.encode_tvcandboc.decode_tvcare renamed toboc.encode_state_initandboc.decode_state_init
- Client was notified about every REMP status timeout. Now it is notified only once when fallback scenario is started
- Added message monitoring functions to the
processingmodule:monitor_messages,fetch_next_monitor_results,get_monitor_info,cancel_monitor****. - Added
processing.send_messagesfunction. - Improved error resolving for deleted accounts
net.first_remp_status_timeoutconfig parameter default value set to 1 ms in order to start fallback scenario together with REMP statuses processing while REMP is not properly tuned yet.- Network errors are returned on subscription creation if occured
ParamsOfSubscribewas not public.subscribedid not trim subscription query text. It is required for some graphql servers expecting that query text starts from operation text.
api_derivecompilation errors
-
CapSignatureWithIdcapability is supported.Network signature ID is used by VM in signature verifying instructions if capability
CapSignatureWithIdis enabled in blockchain configuration parameters.This parameter should be set to
global_idfield from any blockchain block if network can not be reached at the moment of message encoding and the message is aimed to be sent into network withCapSignatureWithIdenabled. Otherwise signature ID is detected automatically inside message encoding functions. Overwrite priority: ExecutionOptions.signature_id -> ClientConfig.network.signature_id -> last network blockClientConfig.network.signature_idoptional parameter is added. Specify it in case of offline work for all message signing operations to use.ExecutionOptionsis extended withsignature_idoptional parameter. Specify locally for a particularrun_tvmorrun_executorcall.net.get_signature_idfunction returnsglobal_idifCapSignatureWithIdcapability is enabled,
-
message_idandmessage_dstfields are added to allProcessingEventvariants -
Config parameter
binding: { library: string, version: string }. Binding authors should define this parameter at context initialization. -
tonclient-binding-libraryandtonclient-binding-versionGraphQL request headers. Read more here -
Error.data.binding_libraryandError.data.binding_versionerror data fields. Read more here
abi.get_signature_datafunction ouput parameterhashis renamed tounsignedfor consistency with other crypto functions parameters
- Changed type of the
dictionaryparameter or mnemonic crypto functions and crypto config. Now it usesMnemonicDictionaryenum type instead ofnumber.MnemonicDictionarynumeric constants are compatible with previous values.
debotengine module is deprecated. Debot engine development has migrated to a separate repository (soon will be published). So, in order to reduce sdk binary size, we will removedebotengine module from sdk in the next releases.
abi.get_signature_datafunction that returns signature from message and hash to verify the signature
- local endpoints with port specified are expanded with
httpprotocol instead ofhttps(e.g.localhost:8033in expanded tohttp://localhost:8033/graphql)
-
Resolved endpoints are cached for 10 minutes so subsequent messages sent will not require additional server request
-
Queries are retried in case of network errors when websocket connection is used
-
WaitForTimeouterror code (607) is returned in case ofwait_for_transactionfunction was successfully executed but expected data did not appeared during the specified timeout -
timeoutparameter innet.query_transaction_treebehaviour changed. Now value 0 indicates that no time limit should be used and function will wait for all transactions execution
-
transaction_max_countparameter innet.query_transaction_treewhich controls the count of transaction to be awaited and returned -
data_layoutandfunction_nameparameters inabi.decode_messageandabi.decode_message_bodythat can be used to decode responsible function output and optimize message decoding by strict layout check
-
abi.encode_initial_datafunction properly creates data in case of public key omitted. Nowabi.encode_initial_datacall without initial data values and public key creates the same data as compiled tvc -
Graphql error messages with HTTP response 400 was skipped (was not propagated to the SDK client application).
-
Several misspelling.
-
Message processing freeze in case of large amount of messages parallel processing using Websocket connection
-
Websocket interaction thread panic
-
Debot module:
- fill hash argument in
SDK.signHashmethod with leading zeroes up to 32 bytes.
- fill hash argument in
- Additional info query is removed from
send_messageto minimize API usage
- Error code
Unauthorizedis returned from all network functions in case of authentication failure - Server connection attempt is not retried in case of authentication failure
- Debot module:
- ABI specification v2.3 is supported in DEngine.
- Supported flags
OVERRIDE_TS,OVERRIDE_EXPT,ASYNC_CALLfor external messages in DEngine.
- Support cookies in net module for std mode (not wasm)
- Remove network aliases (main, dev, main.ton.dev, net.ton.dev)
- No balancing logic in case of 1 endpoint + removed the check of REMP support on backend during client initialization. These changes will make client initialization faster -> CLI tools that use SDK will work faster, web pages will load initial data faster.
- Changed 401 error message to response message from API
- Tests improvements: cryptobox tests made stable
crypto.encryption_box_get_inforeturns nacl box public key ininfo.publicfield.- Gosh instruction are supported in local VM and executor:
- execute_diff
- execute_diff_patch_not_quiet
- execute_zip
- execute_unzip
- execute_diff_zip
- execute_diff_patch_zip_not_quiet
- execute_diff_patch_quiet
- execute_diff_patch_zip_quiet
- execute_diff_patch_binary_not_quiet
- execute_diff_patch_binary_zip_not_quiet
- execute_diff_patch_binary_quiet
- execute_diff_patch_binary_zip_quiet
create_crypto_boxoptimisation. When a user creates a crypto box, library encrypts provided secret information using provided password and salt. When library encrypts the secret, it calculates encryption key from password and salt usingscryptfunction which takes a lot of CPU time (about 1 second). So when a user creates many crypto boxes using the same password and salt, it takes a lot of time (about 12 seconds for 10 crypto boxes). With the optimisations introduced in this version the library stores the pair (password+salt => encryption key) in internal cache for approximately 2 seconds. So when a user creates many crypto boxes at a time using the same password and salt, library uses cached information to skip heavy calculations. As a result now it takes only a second to create 10 crypto boxes.
- Some enum types were not properly presented in api.json (some types that use serde(content=" value"))
- Pinned BOC cache now has reference counter for each pin in BOC. BOC can be pinned several times
with the same pin. BOC is removed from cache after all references for all pins are unpinned with
cache_unpinfunction calls. - Fixed error resolving in case when account state was modified after message expiration time. Now appropriate error text is added to error message instead of executor internal error
- client sends
config.network.access_keyasAuthorization: Basic ...orAuthorization: Bearer ...header depending on the value passed: if value is in hex, then it is processed as project secret (basic), if in base64 - then as JWT token (bearer). - client accepts endpoints with
/graphqlsuffixes specified in config.
- Updated zstd in order to fix building.
- Time synchronization check between device and server improved: calculation of time-diff with server is moved from batched query to send_message function and therefore now query execution time does not affect this time diff.
- ABI specification v2.3 is supported
- parameter
addressis added toabi.encode_message_bodyfunction
abimodule errors have been improved
chksig_always_succeedexecution option used in params of thetvm.run_get,tvm.run_tvmandtvm.run_executor.abi.calc_function_idfunctiontokiolibrary is updated to 1.* version
- send
accessKeyheader in api requests (specified inconfig.network.accessKey)
- send headers in
infoapi requests
- build process
- supported removing Copy interface from UInt256
- supported changed interface of
ton_types::Cell
-
client.configfunction that returns the current client config -
run_executor().feesis extended with these fields:ext_in_msg_fee- fee for processing external inbound messagetotal_fwd_fees- total fees of action phaseaccount_fees- total fees the account pays for the transaction
-
mainanddevendpoints aliases for Evernode Cloud Mainnet and Devnet endpoints
- Added documentation for
TransactionFeestype (run_executor().fees). - Documentation now includes
enumtypes descriptions. To achieve it we updated binding-gen: enum of types now produces its own type for each enum variant.
- Websocket errors weren't treated as a network errors. This is why all the processing functions that worked via wss protocol failed on these errors without retries. Now retries are performed.
- SDK tried to rebalance even if only a single endpoint was specified. Now in case of a single endpoint, no rebalancing occurs.
allow_partialflag in allabi.decode_*functions. This flag controls decoder behaviour whether return error or not in case of incomplete BOC decodingREMPsupported.ProcessingEventenum is extended withREMPstatuses (enum of events posted intoprocessing.wait_for_transactionfunction callback )- UNSTABLE.
first_remp_status_timeoutandnext_remp_status_timeoutparameters in network config
network.queries_protocolconfig parameter allows selecting protocol the SDK uses to communicate with GraphQL endpoint:HTTP– SDK performs single HTTP-request for each request.WS– SDK uses single WebSocket connection to send all requests. This protocol is a preferable way when the application sends many GraphQL requests in parallel.
- Debot module:
- If DEngine received a non-zero exit_code while emulating a transaction while sending a message, DEngine will call onErrorId callback of the message.
crypto module:
-
Cryptoboxintroduced: root crypto object that stores encrypted secret and acts as a factory for all crypto primitives used in SDK. Crypto box provides signing and encryption boxes.Functions:
create_crypto_box- initializes cryptobox with secretremove_crypto_box- removes cryptobox and overwrites all secrets with zeroesget_crypto_box_seed_phrase- returns decrypted seed phrase
get_crypto_box_info- returns encrypted cryptobox secret for next cryptobox initializationsget_signing_box_from_crypto_box - derives signing box from secret
get_encryption_box_from_crypto_box - derives encryption box from secret
clear_crypto_box_secret_cache - forces secret cache (signing and encryption) clean up (overwrites all secrets with zeroes).
- returns decrypted seed phrase
-
Support of
initCodeHashin tvm:X-Evernode-Expected-Account-Boc-Version=2 http header added to graphql requests. value=2 means that SDK requests the latest account boc version with initCodeHash support from API. This was done because new boc version is not compatible with old transaction executor, i.e. with previous SDK versions. New transaction executor is compatible with new and old boc formats. New SDK asks for new boc format if it exists,if it does not - old boc version is returned. Previous version of SDK will fetch only old version without initCodeHash support.
Attention! Migrate your applications to the new SDK version ASAP because in some period of time we will stop supporting old boc version in API and default value of X-Evernode-Expected-Account-Boc-Version on backend side will become 2, missing value will cause an error. Now default value on API side is Null which means that API returns the old version. This is done to avoid breaking changes in existing applications and give time to migrate to the new SDK.
- Documentation generator for app object interface fills documentation from
ParamsOfXXXAppObjectenum. - Documentation generator for function with
objparameter add this parameter into parameters section with link to appropriate AppObject interface.
- Added
boc.encode_external_in_messagefunction to encode message BOC based on a low level message parts such as a body, state init etc. - Added
net.subscribefunction to start a low level GraphQL subscription. - Added support for new MYCODE TVM command in
tvm.run_tvmandtvm.run_getfunctions.
- Added
abi.encode_bocfunction to encode parameters with values to BOC, using ABI types. - Added support of
addresstype inboc.encode_boc. - All fetch requests are now called with timeouts to prevent freezing in case of infinite answer.
- Support of
MYCODEinstruction in TVM
- Support breaking changes in
ton-labs-block-jsonv0.7.1 - Updated endpoints for
main.ton.devalias.
- DevNet endpoints now changed to EVER OS domain: eri01.net.everos.dev, rbx01.net.everos.dev, gra01.net.everos.dev
- Debot module:
- Added float numbers support for Json interface
- Added guide for custom giver usage.
- Debot module: fixed a bug in Query.query function called with an empty
variablesfield.
- Empty
function_namefield in the "create run message failed" error.
Function abi.encode_initial_data
which
encodes initial account data with initial values for the contract's static variables and owner's
public key.
This function is analogue of tvm.buildDataInit function in Solidity.
- Subscription for Counterparties failed with 'Unknown type "CounterpartieFilter"' error.
- Fixed building and warning.
- Debot module:
- Added
allow_no_signatureparameter todecode_and_fix_ext_msg()andonerror_idreturn value toprepare_ext_in_message()inner functions used in TS4. - Added support for async external calls.
Queryinterface extended withwaitForCollectionandquerymethods.waitForCollectionallows to wait for completion of async external calls.- Added support for DeBots with ABI 2.2.
- Added
Function proofs.proof_message_data
which proves message data, retrieved
from Graphql API.
-
New module
proofsis introduced! -
Functions
proofs.proof_block_dataandproofs.proof_transaction_datawhich prove block data, retrieved from Graphql API.These are the first functions from proofs series :) Wait for others(
proof_account_data,proof_message_data) in the next releases.Read about them more in the documentation.
-
abi.decode_bocfunction to decode custom BOC data into JSON parameters. -
Ref(<ParamType>)type was added to ABI. Solidity functions use ABI types for builder encoding. The simplest way to decode such a BOC is to use ABI decoding. ABI has it own rules for fields layout in cells so manually encoded BOC can not be described in terms of ABI rules. To solve this problem we introduce a new ABI typeRef(<ParamType>)which allows to storeParamTypeABI parameter in cell reference and, thus, decode manually encoded BOCs. This type is available only indecode_bocfunction and will not be available in ABI messages encoding until it is included into some ABI revision.
-
boc.get_boc_depthfunction to get depth of the provided boc. -
boc.decode_tvcfunction returns additional fieldscode_hash,code_depth,data_hash,data_depthandcompiler_version -
Debot module:
- added
parsefunction to Json interface.
- added
boc.get_code_saltandboc.set_code_saltfunctions for contract code salt management.boc.encode_tvcandboc.decode_tvcfunctions for TVC image encoding and decodingboc.get_compiler_versionfunction extracting compiler version from contract codeabi.update_initial_dataandabi.decode_initial_datafunction for pre-deployment contract data management
-
ABI v2.2 with fixed message body layout supported. See the specification .
Now, for contracts with ABI version < 2.2 compact layout will still be used for compatibility, for contracts with ABI version 2.2 and more - fixed layout will be used. Please, make sure that you updated the ABI if you recompiled your contract with 2.2 ABI, or you may get an inconsistent contract behaviour.
-
Debot module:
- added
getEncryptionBoxInfo,getSigningBoxInfofunctions to Sdk interface. - implemented Query DeBot interface in DEngine.
- added
abi.encode_messageandprocessing.process_messagecreated invalid deploy message in case ofSigner::Nonewas used, and contract could not be deployed.
- Support MacOS aarch64 target
- Information about used endpoint is added to subscription errors.
- Graphql response error codes 500-599 are treated as retriable network errors
- Updated crypto libraries in order to fix building.
- http errors were not processed as network errors and didn't lead to endpoint reconnect and request retry
crypto.create_encryption_boxfunction for creating SDK-defined encryption boxes. First supported algorithm - AES with CBC mode.- Debot module:
- Added public
prepare_ext_in_messagefunction.
- Added public
tvm.run_executordid not work when SDK is configured to use TONOS SE, because of incomplete default blockchain configuration. Now mainnet config from key block 10660619 (last key block at the moment of fix) is used as default.
- Added support of contract error messages. Error messages (for example, require(...) in Solidity)
are now parsed by SDK
and returned in error message. New field
contract_errorwas added to error'sdata.
- Fixed problem with WASM binaries (everx-labs/ever-types#42)
-
ABI version
2.1supported. Attention! If you work with contracts, that contain String parameters, then during migration from ABI 2.0 to 2.1 you will need to remove all String type conversions to bytes and back and pass string to your contract as is. -
Now all requests to GraphQL are limited with timeout to react on unexpected server unavailability. Existing timeouts in waiting functions keep the same behaviour. All other requests timeout now can be set with
net.query_timeoutconfig parameter. Its default value is 60000 ms -
Debot module:
- added
encrypt,decryptfunctions to Sdk interface which accept encryption box handles.
- added
- Deployment with empty signer in cases of public key set in TVC or deploy set.
get_address_typefunction inutilsmodule, which validates address and returns its type. See the documentation.decode_account_datafunction inabimodule that converts account data BOC into JSON representation according to ABI 2.1. See the documentation.- Diagnostic fields
filterandtimestampadded towait_for_collectionerror main.ton.devandnet.ton.devendpoints that will be deprecated on 12.07.21 are now replaced with proper endpoints list, if they were specified in networkendpointsconfig
- Search of the first master blocks during the network start period was fixed in blocks and transactions iterators
- Iterators in
netmodule: robust way to iterate blockchain items (blocks, transactions) in specified range. See documentation forcreate_block_iterator,create_transaction_iterator,resume_block_iterator,resume_transaction_iterator,iterator_next,iterator_removefunctions. - Library adds
http://protocol to endpointslocalhost,127.0.0.1,0.0.0.0if protocol isn't specified in config. - Debot module:
- added tests for Json interface.
- Added support of external encryption boxes. See the documentation
- Debot module:
- Dengine waits for completion of all transactions in a chain initiated by debot's onchain call.
timeoutoption toquery_transaction_tree– timeout used to limit waiting time for the next message and transaction in the transaction tree.
- Improved error messages regarding ABI and JSON interface. SDK now shows additional tips for the user in cases of errors.
- Warnings in Rust 1.52+. Little fixes in the documentation.
total_outputfield in fees was always 0.query_transaction_treedidn't wait for messages.
query_transaction_treefunction that returns messages and transactions tree produced by the specified message was added tonetmodule. See the documentation
AbiData.keytype changed to u32.- attempt to use
orderByinstead oforderinquery_collectionwill raise error.
-
Sync latency detection increases connection reliability. Library will change the current endpoint when it detects data sync latency on it.
-
Configuration parameters:
latency_detection_interval,max_latency. See client documentation for details. -
Debot module:
- signing messages with signing box handles returned from debots.
- return any sdk errors to debot in case of external calls.
- defining signing box handle used to sign message in approve callback.
- Fixed building under Rust versions older than 1.51.
- Debot module:
- implementation of Network DeBot interface in DEngine.
- implementation of
signHashfunction in Sdk interface.
- Debot module:
- fixed bug in Json interface with supporting nested structures and arrays of structures.
- fixed bug in Json interface with keys containing hyphens.
-
net.query_counterparties- allows to query and paginate through the list of accounts that the specified account has interacted with, sorted by the time of the last internal message between accounts. Subscription to counterparties collection is available vianet.subscribe_collectionfunction. -
Blockchain interaction reliability improvement (broadcast): library sends external inbound messages simultaneously to the N randomly chosen endpoints. If all N endpoints failed to response then library repeats sending to another random N endpoints (except the failed one). If all the available endpoints fail to respond then library throws error. The N parameter is taken from
config.network.sending_endpoint_count(default is 2). -
Blockchain interaction reliability improvement (bad delivery list): library tracks endpoints with bad message delivery (expired messages). These endpoints have lower priority when library chooses endpoints to send message.
-
Debot module:
- Implementation of
JsonDeBot interface in DEngine.
- Implementation of
BuilderOp::Integer.sizetype has changed fromu8tou32.- Debot Module:
Sdkinterface functiongetAccountsDataByHashdidn't find accounts bycode_hashwith leading zero.
utils.compress_zstdcompresses data using Facebook's Zstandard algorithm.utils.decompress_zstddecompresses data using Facebook's Zstandard algorithm.- Debot module:
initfunction that creates an instance of DeBot and returns DeBot metadata.- Dengine fetches metadata form DeBot by calling 2 mandatory functions:
getRequiredInterfacesandgetDebotInfo. This data is returned byfetchandinitfunctions. approveDeBot Browser callback which is called by DEngine to request permission for DeBot activities.
- Debot Module:
- [breaking]
fetchfunction doesn't create an instance of debot. It returns DeBot metadata (DebotInfo). - [breaking]
startfunction doesn't create an instance of debot. It accepts DeBot handle created ininitfunction.
- [breaking]
- Some internal refactor due to
ton-blockchanges
- Giver address in tests is calculated from secret key. Default values are provided for TON OS SE giver
utils.calc_storage_feefunction to calculate account storage fee over a some time period.- Debot Module:
- Added unstable functions to
Sdkinterface:getAccountsDataByHash
- Added unstable functions to
- Add optional field
src_addresstoParamsOfEncodeInternalMessage. - Field
abiinParamsOfEncodeInternalMessageis optional and can beNoneifcall_setanddeploy_setareNone. boc.encode_bocfunction provides ability to build and serialize any custom tree of cells. Application can use several base Builder serialization primitives like integers, bitstrings and nested cells.boc.get_blockchain_configfunction can extract blockchain configuration from key block and also from zerostate.tvmmodule functions download current blockchain configuration ifnetis initialized with DApp Server endpoints. Otherwise, default configuration is used.- Debot Module:
- Support for debot invoking in Debot Engine.
sendbrowser callback is used not only for interface calls but to invoke debots. startandfetchfunctions returns debot ABI.- Added new built-in interface
Hexwhich implements hexadecimal encoding and decoding. - Added unstable functions to
Sdkinterface: naclBox, naclBoxOpen, naclKeypairFromSecret, getAccountCodeHash.
- Support for debot invoking in Debot Engine.
- Both
call_setanddeploy_setinParamsOfEncodeInternalMessagecan be omitted. In this caseencode_internal_messagegenerates internal message with empty body. - Debot Module:
sendfunction accepts one argument - serialized internal message as string encoded into base64.
- Debot browser app object and signing box app object descriptions added
- functions-helpers for enum type variable creation for Signer , Abi, ParamsOfAppDebotBrowser
- doc generator: app object interface description, constructor functions-helpers for enum type variable creation, added new line in the end if api.json
- library libsecp256k1 upgraded to fix https://rustsec.org/advisories/RUSTSEC-2019-0027
tuple_list_as_arrayparameter intvm.run_getfunction which controls lists representation. Default is stack-like based on nested tuples. If set totruethen returned lists are encoded as plain arrays. Use this option if you receive this error on Web: "Runtime error. Unreachable code should not be executed..." This reduces stack size requirements for long lists.function_namefield ofCallSetstructure can be the name or id (as string in hex starting with 0x) of the called function.- Fields
config_servers,query_url,account_address,gas_usedadded into specific errors'ClientError.dataobject.
- Binaries download links are now under https protocol
- If you receive this error on Web: "Runtime error. Unreachable code should not be executed..."
in
run_get, use the new parametertuple_list_as_array = true. See the documentation. This may happen, for example, when elector contract contains too many participants
- Debot Module:
- Added new built-in interface
Msgwhich allows to send external message to blockchain and sign it with supplied keypair.
- Added new built-in interface
crypto.hdkey_public_from_xprvused compressed 33-byte form instead of normal 32-byte.
- BOC cache management functions were introduced:
boc.cache_set,boc.cache_getboc.cache_unpin
- Now functions that take boc as a parameter can also take a reference to boc cash instead so that
it decreases the number of boc serialization
and deserializations which drastically improves performance of
run_tvmandrun_executorespecially in case of numerous calls on the same data. boc_cacheparameter intvm.run_tvmandtvm.run_executorfunctions to save resulting messages and account BOCs into cache.return_updated_accountflag parameter introduced intvm.run_tvmandtvm.run_executorfunctions to return updated account state. Important: by default this flag isfalseand account data is not returned.abi.encode_internal_messagefunction to encode an internal ABI-compatible message.- Debot Module:
- Support for get-methods and external calls in debots. Debots can send external inbound messages to destination contracts (signed - for external calls and unsigned - for get-methods) using native language syntax without actions.
- Built-in debot interfaces (interfaces implemented by DEngine). Added two built-in interfaces: base64 and Sdk.
- Added
DebotInterfaceExecutorto automatically route messages to destination interfaces. - Debot's
fetchfunction is optional now. New debots can implement onlystartfunction.
- Expired message wasn't retried if local execution succeeded.
ResponseHandlertype description intomodules.md.
net.batch_queryparameters serialization did't match to docs.- Module description in docs generator contains
nullinstead of summary. - Function result section header hadn't the line separator before.
nacl_sign_detached_verifyfunction to verify detached signature.aggregate_collectionfunction as a wrapper for GraphQL aggregation queries.batch_queryfunction performs multiple queries per single fetch.- Active endpoint invalidation in case of network error occurring.
network.network_retries_countconfig parameter is deprecated.network.max_reconnect_timeoutis introduced that allows to specify maximum network resolving timeout. Default value is 2 min.initial_pubkeyfield inDeploySetto specify public key instead of one from TVC file or provided by signer.- Support for debot interfaces:
sendBrowser Callback to send messages with interface calls to Browser.- new variant
ParamsOfAppDebotBrowser::Send. sendAPI function to send messages from Browser to Debot.run_output.rs- internal structure RunOutput to filter messages generated by debot to 4 categories: interface calls, external calls, get-method calls and invoke calls.
- Device time synchronization is checked only in
send_message. Data querying does not require proper time now
netmodule functions waits fornet.resumecall instead of returning error if called while the module is suspended
- How to work with
Application Objectsspecification added
- Updated the dependence on
ton-labs-abi
reconnect_timeoutparameter inNetworkConfig.endpointsparameter inNetworkConfig. It contains the list of available server addresses to connect. SDK will use one them with the least connect time.server_addressparameter is still supported butendpointsis prevailing.net.fetch_endpointsfunction to receive available endpoints from server.net.set_endpointsfunction to set endpoints list for using on next reconnect.ErrorCodetype in each module spec inapi.json.
- send
GQL_TERMINATE_CONNECTIONand close websocket on leaving ws loop.
- GraphQL optimization: use single web socket to serve all subscriptions.
- Support for the
keep-alivemessages from the GraphQL server. tonclient-core-versionhttp header.net.find_last_shard_blockfunction returning account shard last block ID.boc.get_code_from_tvcfunction extracting contract code from TVC image.- Debot Module:
- Add new variant
ParamsOfAppDebotBrowser::SwitchCompletedto notify browser when all context actions are shown. - Added new 3 engine routines for crypto operations and 1 routine for querying account state ( balance, state type, code, data) that can be used in debots.
- Add new variant
- Debot Module:
- Invoked debot terminated correctly after error occurred during execution of one of its actions. Initial prev_state of invoked debot changed to STATE_EXIT.
- Fixed double jumping to current context in invoker debot after returning control to it from invoked debot.
- Fixed conversation of exception codes thrown by debots to their user-friendly description.
net.querymethod . Performs custom graphql query that can be copied directly from the playground.net.suspendandnet.resumemethods for disabling and enabling network activity. One of the possible use-cases is to manage subscriptions when a mobile application is brought to the background and into the foreground again.- Smart summary and description doc separation.
- ts-generator includes doc comments in JSDoc format.
-
UNSTABLE API. This API is experimental. It can be changed in the next releases.
debotmodule was added with debot engine functions, such as :start,fetch,execute,remove. See thedebotmodule documentation for more info. Check our tests for code examples. -
External signing was supported for message encoding:
SigningBoxtype forSignerenum was supported. Now it is possible to sign messages with externally implemented signing box interface without private key disclosure to the library. Can be used in case of signing via HSM API or via cold wallet - when there is no access to the private key.It is also possible to create a Signing Box instance inside SDK - from a key pair passed into the library with
get_signing_boxmethod. It can be used for some test cases. Also it increases security - you need to pass your keys one time only.Check the
cryptomodule documentation forSigningBoxHandletype andregister_signing_box,get_signing_box,signing_box_get_public_key,signing_box_sign. Check our tests for code examples.
- panic after
tc_destroy_contextcall. Now all contexts use global async runtime - field
mnemonic_hdkey_compliantwas removed fromCryptoConfig(unused by the library) - original and resolved errors are swapped in result. Now
error.codecontains original error code
wasmfeature has been fixedcrypto.factorizedoesn't panic on invalid challengeclient.get_api_referencereturns proper version- ABI JSON with explicit function ID is parsed properly
- Compatible with older rust version change api type derivation with
vec![]instead of prev[].into()
- ChaCha20 encryption support
crypto.chacha20. boc.parse_shardstatefunction for shardstates parsing.boc.get_boc_hashfunction for calculating BOC root hashclient.build_infofully defined and documented.processing.wait_for_transactionandprocessing.process_messagefunctions execute contract locally in case if transaction waiting fails in order to resolve the contract execution errorrun_executor,run_tvmnow returnexit_argin case of TVM errors.- Create the
build_info.jsonon the build stage. Abi::Contractvariant as an alias to deprecatedAbi::SerializedAbi::Jsonvariant to specify an ABI as a raw JSON string.api.jsonnow contains details about numeric types: Number and BigInt are now have new fieldsnumber_typeandnumber_size.api.jsonref type names are fully qualified now in form ofmodule.type, for exampleabi.Signer.
- TS generator fix some field names that is an invalid JS identifiers.
- Use
install_name_toolto fix loading library paths atlibton_client.dylib. api.jsonis reduced, so it can't contain tuple types, only structs. All types are exactly match to JSON.out_of_sync_thresholdconfig parameter isu32
tc_request_ptrfunction to use pointersvoid*instead of request_idu32. This feature is UNSTABLE yet.
- All api functions are defined in mod.rs of appropriate modules
- Function names are the same as API function names:
module.function_name - Parameters naming:
- In snake case
- Base64 suffix is removed from parameter names. For example,
bocBase64is changed toboc
- Parsed boc replaced with unparsed boc in all function input parameters
- All functions take byte arrays in a defined encoding:
base64- encoding used for byte arrays of variable length: text, images, etc.hex-lower-case- encoding used to encode fixed length bit sequences: hashes, keys, salt, etc.
contractsmodule is splitted into 5 modules:tvm- embedded TVM execution functionsboc- raw cell and BOC manipulation functionsabi- abi-compatible messages creation and parsing functionsprocessing- blockchain interaction functionsutils- has onlyconvert_addressATM, later will be used for some useful stuff
querymodule is renamed tonet- new
clientmodule with functionsversion,api_reference - All the environment functions (fetch, websocket, spawn, now, etc.) were abstracted behind a
separate environment layer crate
ClientEnv. The standard core env layer implementation is instd_client_env. Later (in 1.1 release)web_client_envimplementation for Web will be added. - Error codes are distributed across the modules the following way:
client- 0..99,crypto- 100..199,boc- 200..299,abi- 300..399,tvm- 400..499,processing- 500..599,net- 600..699 - Error descriptions related to a module are described in error.rs file in the module's folder
decode_message,process_message,wait_for_transaction,run_tvm,run_executor, etc. (all the functions that return decoded messages) now returns int*/uint* data as a string which can be either decimal or 0x-prefixed hex string. Hex representation can be in any register and have any number of leading zeroes.
-
All the functions are asynchronous
-
All the functions that can be called via JSON-api are public, so that they can be used directly without JSON-api.
-
Inline documentation and api reference added.
-
[breaking]
interops.rs,tonclient.h.create_contextnow takesconfigparameter - context creation and setup happen at the same time. Config structure has been changed. -
[breaking]
crypto module.default values for mnemonic-related functions have been changed:dictionary is 1, for word count is 12, derivation path is 'm/44'/396'/0'/0/0
-
[breaking] crypto module. removed
word_countparameter fromwordsfunction -
[breaking] crypto module.
compliantparameter is removed from functionsmnemonic_derive_sign_keys,hdkey_xprv_derive_path,hdkey_xprv_derive, -
[new] boc module. Functions
parse_block,parse_account,parse_message,parse_transactionthat parse bocs to JSONs are introduced. -
[breaking] net module. Functions
query,wait.for,subscribeare renamed toquery_collection,wait_for_collection,subscribe_collectiontableparameter is renamed tocollection.filterparameter is now optional and ofjsontype (passed as json object instead ofstring) -
[breaking] net module. Function
get.nextis removed. -
[breaking] net module.
subscribe_collectionnow uses callback to return data. -
[breaking] abi module.
decode_messageintroduced instead ofdecode_unknown_run,decode_run_output -
[breaking] abi module.
encode_messageintroduced instead ofencode_unsigned_deploy_message,encode_unsigned_run_message,run.encode_message,deploy.encode_message -
[breaking] abi module.
signer: Signerparameter used instead ofkey_pair: KeyPair, which can be ofNone(unsigned message will be produced),External(data to be signed +unsigned message),Keys(signed message will be produced),SigningBox(message will be signed using a provided interface - will be supported in coming releases) -
[breaking] processing module.
process_messageintroduced instead ofdeployandrun. Parameter set was drastically changed. -
[breaking] processing module.
process_message- now, if the contract was already deployed, deploy fails with an exception of double constructor call. -
[new] processing module.
process_message- any function can be called at deploy, not only constructor, also there can be no function call. -
[new] processing module.
process_messagenow can optionally use callback to monitor message processing (creation, sending, shard block fetching, transaction receiving). -
[fixed] processing module.
process_message- deploy can be performed without a key pair -
[breaking] tvm module.
run_localis divided into 2 functionsrun_tvmandrun_executor. -
[new] tvm module.
run_tvmfunction - performs contract code execution on tvm (part of compute phase). Helps to run contract methods without ACCEPT. Returns account state with updated data, list of external messages and (optional, for ABI contracts only) list of messages decoded data. -
[new] tvm module.
run_executorfunction - performs full contract code execution on Transaction Executor (part of collator protocol that performs all phases and checks and - as a successful result - forms a transaction) Returns updated account state, parsed transaction, list of parsed messages with optional decoded message bodies. -
[breaking] tvm module.
run_getdoes not download account boc from the network anymore, but takes account boc as a parameter.
config.get_api_referenceapi function (pre release).ton_sdk_clicli tool (pre release).- full local run functions use
LocalRunContextto exactly reproduce all transaction parameters and produce the same result as node
waitForTransactiondidn't use prev_alt_ref for block walking
- All methods that require contract's code/data can use field
bocin account document to extract code and data (instead ofcodeanddatafields). - Optional
bocBase64parameter of methodtvm.getthat can be used instead ofcodeBase64anddataBase64.
error.dataobject extended with fieldsaddress,function_name,account_balance,account_address,query_url,config_serverfor appropriate errors
- supports for core context in all platforms
- local run functions return updated contract state when running with
full_run = true - time sync check while initializing
- parallel requests on different contexts don't block each other. Requests on the same context remain sequential
- new transaction wait mechanism. All account's shard blocks are checked for transaction to guarantee message expiration
contracts.wait.transactionfunction for awaiting previously sent message processingcontracts.send.messagereturns message processing state forcontracts.wait.transactionfunctioncontracts.find.shardfunction for account shard matching- added logging on warning messages
- error resolving by local message processing
contracts.resolve.errorfunction for manual error resolving callcontracts.process.transactionfunction processing transaction to check errors and get outputcontracts.run.localandcontracts.run.localfunctions now havefullRunflag to emulate node transaction processing and calculate feestonsdkcommand line tool.ton_clientfunctionget_method_names.
- TON mnemonic functions didn't check validity of the seed phrase.
- Platform builder generates ready to use
index.jsfor web clients (instead of install script ofton-client-web-jsbinding)
tvm.getnow can fetch account data if it is not provided
- Message processing functions added
- Run get methods function added
ed25519-dalekversion updated to1.0.0-pre.3- SDK is fully open sourced since open repo
ton-labs-executorused
- Panic in fee calculation under WASM
reqwestcrate version synced in all projects- Memory leaking in Node JS