Releases: everx-labs/ever-sdk
Version: 1.5.0
1.5.0 Dec 25, 2020
New
reconnect_timeout
parameter inNetworkConfig
.endpoints
parameter inNetworkConfig
. It contains the list of available server addresses to connect.
SDK will use one them with the least connect time.server_address
parameter is still supported but
endpoints
is prevailing.net.fetch_endpoints
function to receieve available endpoints from server.net.set_endpoints
function to set endpoints list for using on next reconnect.ErrorCode
type in each module spec inapi.json
.
Fixed
- send
GQL_TERMINATE_CONNECTION
and close websocket on leaving ws loop.
Version: 1.4.0
1.4.0 Dec 18, 2020
New
- GraphQL optimization: use single web socket to serve all subscriptions.
- Support for the
keep-alive
messages from the GraphQL server. tonclient-core-version
http header.net.find_last_shard_block
function returning account shard last block ID.boc.get_code_from_tvc
function extracting contract code from TVC image.- Debot Module:
- Add new variant
ParamsOfAppDebotBrowser::SwitchCompleted
to 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
Fixed
- Debot Module:
- Invoked debot terminated correctly after error occured 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.
- Invoked debot terminated correctly after error occured during
Version: 1.3.0
1.3.0 Dec 8, 2020
Featured
net.query
method . Performs custom graphql query that can be copied directly from the playground.net.suspend
andnet.resume
methods 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.
Version: 1.2.0
1.2.0 Nov 26, 2020
Featured
-
UNSTABLE API. This API is experimental. It can be changed in the next releases.
debot
module was added with debot engine functions, such as :start
,fetch
,execute
,remove
. See thedebot
module documentation for more info.
Check our tests for code examples. -
External signing was supported for message encoding:
SigningBox
type forSigner
enum 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_box
method. It can be used for some test cases. Also it increases security - you need to pass your keys one time only.Check the
crypto
module documentation forSigningBoxHandle
type andregister_signing_box
,get_signing_box
,signing_box_get_public_key
,signing_box_sign
.
Check our tests for code examples.
Fixed
- panic after
tc_destroy_context
call. Now all contexts use global async runtime - field
mnemonic_hdkey_compliant
was removed fromCryptoConfig
(unused by the library) - original and resolved errors are swapped in result. Now
error.code
contains original error code
Version: 1.1.2
1.1.2 Nov 15, 2020
Fixed
wasm
feature was not worked.crypto.factorize
doesn't panic on invalid challengeclient.get_api_reference
returns proper version- ABI JSON with explicit function ID is parsed properly
Version: 1.1.1
1.1.1 Nov 11, 2020
Fixed
- To be compatible with older rust version change api type derivation with
vec![]
instead of prev[].into()
Version 1.1.0
1.1.0 Nov 9, 2020
New
- ChaCha20 encryption support
crypto.chacha20
. boc.parse_shardstate
function for shardstates parsing.boc.get_boc_hash
function for calculating BOC root hashclient.build_info
fully defined and documented.processing.wait_for_transaction
andprocessing.process_message
functions execute contract
locally in case if transaction waiting fails in order to resolve the contract execution errorrun_executor
,run_tvm
now returnexit_arg
in case of TVM errors.- Create the
build_info.json
on the build stage. Abi::Contract
variant as an alias to deprecatedAbi::Serialized
Abi::Json
variant to specify an ABI as a raw JSON string.api.json
now contains details about numeric types: Number and BigInt are now
have new fieldsnumber_type
andnumber_size
.api.json
ref type names are fully qualified now in form ofmodule.type
,
for exampleabi.Signer
.
Fixed
- TS generator fix some field names that is an invalid JS identifiers.
- Use
install_name_tool
to fix loading library paths atlibton_client.dylib
. api.json
is reduced, so it can't contains tuple types, only structs.
All types are exactly match to JSON.out_of_sync_threshold
config parameter isu32
Unstable
tc_request_ptr
function to use pointersvoid*
instead of request_idu32
.
This feature is UNSTABLE yet.
Version 1.0.0
1.0.0 Oct 27, 2020
Differences between Core SDK v0 and v1
- 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,
bocBase64
is 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.
contracts
module 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_address
ATM, later will be used for some useful stuff
query
module is renamed tonet
- new
client
module 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_env
implementation 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.
Featured
-
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_context
now takesconfig
parameter - 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_count
parameter fromwords
function -
[breaking] crypto module.
compliant
parameter 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_transaction
that parse bocs to JSONs are introduced. -
[breaking] net module. Functions
query
,wait.for
,subscribe
are renamed toquery_collection
,wait_for_collection
,subscribe_collection
table
parameter is renamed tocollection
.filter
parameter is now optional and ofjson
type (passed as json object instead ofstring
) -
[breaking] net module. Function
get.next
is removed. -
[breaking] net module.
subscribe_collection
now uses callback to return data. -
[breaking] abi module.
decode_message
introduced instead ofdecode_unknown_run
,decode_run_output
-
[breaking] abi module.
encode_message
introduced instead ofencode_unsigned_deploy_message
,encode_unsigned_run_message
,run.encode_message
,deploy.encode_message
-
[breaking] abi module.
signer: Signer
parameter 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_message
introduced instead ofdeploy
andrun
. 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_message
now 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_local
is divided into 2 functionsrun_tvm
andrun_executor
. -
[new] tvm module.
run_tvm
function - 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_executor
function - 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_get
does not download account boc from the network anymore, but takes account boc as a parameter.
Version 0.26.0
0.26.0 Aug 7, 2020
New
crypto
functioncrypto.derive_sign_keys_from_mnemonic
- full local run functions use
LocalRunContext
to exactly reproduce all transaction parameters and
produce the same result as node
Version 0.25.4
0.25.4 Aug 5, 2020
Fixed
waitForTransaction
didn't use prev_alt_ref for block walking