Javascript SDK for TVM blockchains (Everscale, TON, Venom, etc)
APACHE-2.0 License
Published by d3p over 3 years ago
Published by d3p over 3 years ago
timeout
option to query_transaction_tree
– timeout used to limit waiting time for the nexttotal_output
field in fees was always 0.query_transaction_tree
didn't wait for messages.Published by d3p over 3 years ago
query_transaction_tree
function that returns messages and transactions tree producedquery
module. See the documentation
libOptions.loadModule
– ability to specify alternative WASM module loader.AbiData.key
type changed to u32.orderBy
instead of order
in query_collection
will raise error.Published by d3p over 3 years ago
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:
Published by d3p over 3 years ago
Published by d3p over 3 years ago
key
renamed to caption
Published by d3p over 3 years ago
signHash
function in Sdk interface.Published by d3p over 3 years ago
Refined bridging model in core
package. Library introduces new interface BinaryBridge.
Bridge authors can implement this interface instead of BinaryLibrary to
get more precise control over bridging.
For example it makes possible to use separated response handlers for different
requests.
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 via net.subscribe_collection
function.
Blockchain interaction reliability improvement (broadcast): library sends external inbound messages simultaneously
to the N randomly chosen endpoints. If all N endpoints failed to responce 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:
Json
DeBot interface in DEngine.Published by d3p over 3 years ago
utils.compress_zstd
compresses data using Facebook's Zstandard algorithm.utils.decompress_zstd
decompresses data using Facebook's Zstandard algorithm.init
function that creates an instance of DeBot and returns DeBot metadata.getRequiredInterfaces
and getDebotInfo
. This data is returned by fetch
and init
functions.approve
DeBot Browser callback which is called by DEngine to request permission for DeBot activities.fetch
function does't create an instance of debot. It returns DeBot metadata (DebotInfo
).start
function does't create an instance of debot. It accepts DeBot handle created in init
function.Published by d3p over 3 years ago
Published by d3p over 3 years ago
utils.calc_storage_fee
function to calculate account storage fee over a some time period.Sdk
interface: getAccountsDataByHash
Published by d3p over 3 years ago
index.d.ts
files in lib-
packages are refined to be more typed.account.ts
added to core/index
.Published by d3p over 3 years ago
New high-level wrapper Account.ts that simplifies work with accounts:
Account
class is introduced that supports these high-level methods:
giver
- allows to specify a giver to be used in all deploy operationsdeploy
- deploys a contractrun
- executes a contract on-chainrunLocal
- executes a contract off-chain (on client side, contract state does not change) (execution is syncronized with the previously called deploy
or run
so that it is performed on the updated account state)getAddress
- returns account addressgetAccount
- returns all the data about the account in json formatboc
- returns the account boc.GiverContract
object is introduced that is ititialized with TON OS SE Giver address and keys.
Published by d3p over 3 years ago
src_address
to ParamsOfEncodeInternalMessage
.abi
in ParamsOfEncodeInternalMessage
is optional and can be None
if call_set
and deploy_set
are None
.boc.encode_boc
function provides ability to build and serialize any custom tree of cells.boc.get_blockchain_config
function can extract blockchain configuration from key block and alsotvm
module functions download current blockchain configuration if net
is initialized withsend
browser callback is used not only for interface calls but to invoke debots.start
and fetch
functions returns debot ABI.Hex
which implements hexadecimal encoding and decoding.Sdk
interface: naclBox, naclBoxOpen, naclKeypairFromSecret, getAccountCodeHash.call_set
and deploy_set
in ParamsOfEncodeInternalMessage
can be omitted. In this case encode_internal_message
generates internal message with empty body.send
function accepts one argument - serialized internal message as string encoded into base64.Published by d3p over 3 years ago
tuple_list_as_array
parameter in tvm.run_get
function which controls lists representation.true
then 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..."function_name
field of CallSet
structure can be the name or id (as string in hex starting with 0x) of the called function.config_servers
, query_url
, account_address
, gas_used
added into specific errors' ClientError.data
object.run_get
, use the new parameter tuple_list_as_array = true
. See the documentation. This may happen, for example, when elector contract contains too many participantsPublished by d3p over 3 years ago
Msg
which allows to send external message to blockchain and sign it with supplied keypair.crypto.hdkey_public_from_xprv
used compressed 33-byte form instead of normal 32-byte.Published by d3p over 3 years ago
boc.cache_set
,boc.cache_get
boc.cache_unpin
run_tvm
and run_executor
expecially in case of numerous calls on the same data.boc_cache
parameter in tvm.run_tvm
and tvm.run_executor
functions to save resulting messages and account BOCs into cache.return_updated_account
flag parameter introduced in tvm.run_tvm
and tvm.run_executor
functions to return updated account state. Important: by default this flag is false
and account data is not returned.abi.encode_internal_message
function to encode an internal ABI-compatible message.DebotInterfaceExecutor
to automatically route messages to destination interfaces.fetch
function is optional now. New debots can implement only start
function.Published by d3p over 3 years ago
Published by d3p over 3 years ago
Published by d3p over 3 years ago
nacl_sign_detached_verify
function to verify detached signature.aggregate_collection
function as a wrapper for GraphQL aggregation queries.batch_query
function performs multiple queries per single fetch.network.network_retries_count
config parameter is deprecated. network.max_reconnect_timeout
is introduced that allows to specify maximum network resolving timeout. Default value is 2 mins.initial_pubkey
field in DeploySet
to specify public key instead of one from TVC file or provided by signer.send
Browser Callback to send messages with interface calls to Browser.ParamsOfAppDebotBrowser::Send
.send
API 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.send_message
. Data querying does not require proper time now