Skip to content

Commit

Permalink
Merge pull request #364 from tonlabs/1.10.0-rc
Browse files Browse the repository at this point in the history
Version 1.10.0
  • Loading branch information
d3p authored Mar 5, 2021
2 parents 7873392 + 3587742 commit 85c6a8f
Show file tree
Hide file tree
Showing 54 changed files with 2,767 additions and 445 deletions.
35 changes: 33 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,52 @@

All notable changes to this project will be documented in this file.

## [1.10.0] – 2021-03-04

### New
- Add optional field `src_address` to [`ParamsOfEncodeInternalMessage`](docs/mod_abi.md#encode_internal_message).
- Field `abi` in [`ParamsOfEncodeInternalMessage`](docs/mod_abi.md#encode_internal_message) is optional and can be `None` if `call_set` and `deploy_set` are `None`.
- [`boc.encode_boc`](docs/mod_boc.md#encode_boc) function 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_config`](docs/mod_boc.md#get_blockchain_config) function can extract blockchain configuration from key block and also
from zerostate.
- [`tvm` module](docs/mod_tvm.md) functions download current blockchain configuration if `net` is initialized with
DApp Server endpoints. Otherwise [default configuration](https://github.com/tonlabs/ton-executor/blob/11f46c416ebf1f145eacfb996587891a0a3cb940/src/blockchain_config.rs#L214) is used.
- **Debot Module**:
- Support for debot invoking in Debot Engine. `send` browser callback is used not only for interface calls but to invoke debots.
- `start` and `fetch` functions returns debot ABI.
- Added new built-in interface `Hex` which implements hexadecimal encoding and decoding.
- Added unstable functions to `Sdk` interface: naclBox, naclBoxOpen, naclKeypairFromSecret, getAccountCodeHash.

### Changed
- Both `call_set` and `deploy_set` in [`ParamsOfEncodeInternalMessage`](docs/mod_abi.md#encode_internal_message) can be omitted. In this case `encode_internal_message` generates internal message with empty body.
- **Debot Module**:
- `send` function accepts one argument - serialized internal message as string encoded into base64.
### Documentation
- [Debot browser app object](docs/mod_debot.md#AppDebotBrowser) and [signing box app object](docs/mod_crypto.md#appsigningbox) descriptions added
- functions-helpers for enum type variable creation for [Signer](docs/mod_abi.md#signer), [Abi](docs/mod_abi.md#abi), [ParamsOfAppDebotBrowser](mod_debot.md#paramsofappdebotbrowser)

### Fixed

- 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

## 1.9.0 Feb 19, 2021

### New

- `tuple_list_as_array` parameter in `tvm.run_get` function which controls lists representation.
Default is stack-like based on nested tuples. If set to `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..."
This reduces stack size requirements for long lists.
- `function_name` field of `CallSet` structure can be the name or **id (as string in hex starting with 0x)** of the called function.
- `function_name` field of `CallSet` structure 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_used` added into specific errors' `ClientError.data` object.

### Fixed

- 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 parameter `tuple_list_as_array = true`. [See the documentation](docs/mod_tvm.md#run_get). This may happen, for example, when elector contract contains too many participants

## 1.8.0 Feb 11, 2021

### New
Expand Down
26 changes: 16 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
# TONOS Client Library for TON DApp development
<p align="center"><a href="https://github.com/tonlabs/TON-SDK"><img src="assets/ton-sdk-blue.png" height="60"/></a></p>
<h1 align="center">TON-SDK</h1>
<p align="center">Core Client Library built on the TON OS GraphQL API</p>
<p align="center">for Free TON DApp development</p>

**Community links:**

[![Channel on Telegram](https://img.shields.io/badge/chat-on%20telegram-9cf.svg)](https://t.me/freeton_sdk)
**Get quick help in our telegram channel:**

**Documentation**
[![Channel on Telegram](https://img.shields.io/badge/chat-on%20telegram-9cf.svg)](https://t.me/ton_sdk)

[API Reference](https://github.com/tonlabs/TON-SDK/blob/master/docs/modules.md)
[GraphQL API documentation](https://docs.ton.dev/86757ecb2/p/70a850-introduction)
# Documentation
[Full API/SDK documentation](https://docs.ton.dev/86757ecb2/p/39fc5e-products)

# What is TONOS Client Library
[Javascript SDK](https://github.com/tonlabs/ton-client-js)

TONOS Client Library is a library written in Rust that can be dynamically linked. It provides all
[Example Hello World](https://github.com/tonlabs/sdk-samples/tree/master/v1/node-js/core-api/hello)

# What is Core Free TON Client Library

Core Client Library is written in Rust that can be dynamically linked. It provides all
heavy-computation components and functions, such as TON Virtual Machine, TON Transaction
Executor, ABI-related functions, boc-related functions, crypto functions.

Expand All @@ -35,12 +41,12 @@ So, it can be used to interact directly with TON OS Clouds:
- [Freeton](https://main.ton.dev/graphql)
- [Devnet](https://net.ton.dev/graphql)

# Bindings
# SDKs in other languages (bindings over TON-SDK)

Binding is a thin client library written on the specific language that acts like a bridge between
a client library and an application code written on that language.

## Official Typescript binding
## Official Javascript(Typescript) SDK
Platforms: Node.js, Web, React-Native for IOS/Android
- [ton-client-js](https://github.com/tonlabs/ton-client-js)

Expand Down
2 changes: 1 addition & 1 deletion api/derive/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "api_derive"
version = "1.9.0"
version = "1.10.0"
authors = ["TON DEV SOLUTIONS LTD <[email protected]>"]
edition = "2018"

Expand Down
2 changes: 1 addition & 1 deletion api/info/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "api_info"
version = "1.9.0"
version = "1.10.0"
authors = ["TON DEV SOLUTIONS LTD <[email protected]>"]
edition = "2018"

Expand Down
2 changes: 1 addition & 1 deletion api/test/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "api_test"
version = "1.9.0"
version = "1.10.0"
authors = ["TON DEV SOLUTIONS LTD <[email protected]>"]
edition = "2018"

Expand Down
Binary file added assets/ton-sdk-blue.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/ton-sdk.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
51 changes: 45 additions & 6 deletions docs/mod_abi.md
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,9 @@ Public key resolving priority:

```ts
type ParamsOfEncodeInternalMessage = {
abi: Abi,
abi?: Abi,
address?: string,
src_address?: string,
deploy_set?: DeploySet,
call_set?: CallSet,
value: string,
Expand All @@ -276,14 +277,16 @@ function encode_internal_message(
): Promise<ResultOfEncodeInternalMessage>;
```
### Parameters
- `abi`: _[Abi](mod_abi.md#Abi)_ – Contract ABI.
- `abi`?: _[Abi](mod_abi.md#Abi)_ – Contract ABI.
<br>Can be None if both deploy_set and call_set are None.
- `address`?: _string_ – Target address the message will be sent to.
<br>Must be specified in case of non-deploy message.
- `src_address`?: _string_ – Source address of the message.
- `deploy_set`?: _[DeploySet](mod_abi.md#DeploySet)_ – Deploy parameters.
<br>Must be specified in case of deploy message.
- `call_set`?: _[CallSet](mod_abi.md#CallSet)_ – Function call parameters.
<br>Must be specified in case of non-deploy message.<br><br>In case of deploy message it is optional and contains parameters<br>of the functions that will to be called upon deploy transaction.
- `value`: _string_ – Value in nanograms to be sent with message.
- `value`: _string_ – Value in nanotokens to be sent with message.
- `bounce`?: _boolean_ – Flag of bounceable message.
<br>Default is true.
- `enable_ihr`?: _boolean_ – Enable Instant Hypercube Routing for the message.
Expand Down Expand Up @@ -515,6 +518,15 @@ When _type_ is _'Serialized'_
- `value`: _[AbiContract](mod_abi.md#AbiContract)_
Variant constructors:
```ts
function abiContract(value: AbiContract): Abi;
function abiJson(value: string): Abi;
function abiHandle(value: AbiHandle): Abi;
function abiSerialized(value: AbiContract): Abi;
```

## AbiHandle
```ts
type AbiHandle = number
Expand Down Expand Up @@ -621,6 +633,15 @@ Signing Box interface is provided for signing, allows Dapps to sign messages usi
- `handle`: _[SigningBoxHandle](mod_crypto.md#SigningBoxHandle)_
Variant constructors:
```ts
function signerNone(): Signer;
function signerExternal(public_key: string): Signer;
function signerKeys(keys: KeyPair): Signer;
function signerSigningBox(handle: SigningBoxHandle): Signer;
```

## MessageBodyType
```ts
enum MessageBodyType {
Expand Down Expand Up @@ -689,6 +710,14 @@ Encoded in `base64`.
- `init_params`?: _[StateInitParams](mod_abi.md#StateInitParams)_
Variant constructors:
```ts
function stateInitSourceMessage(source: MessageSource): StateInitSource;
function stateInitSourceStateInit(code: string, data: string, library?: string): StateInitSource;
function stateInitSourceTvc(tvc: string, public_key?: string, init_params?: StateInitParams): StateInitSource;
```

## StateInitParams
```ts
type StateInitParams = {
Expand Down Expand Up @@ -732,6 +761,13 @@ When _type_ is _'EncodingParams'_
<br>Used in message processing with retries (if contract's ABI includes "expire" header).<br><br>Encoder uses the provided try index to calculate message<br>expiration time. The 1st message expiration time is specified in<br>Client config.<br><br>Expiration timeouts will grow with every retry.<br>Retry grow factor is set in Client config:<br><.....add config parameter with default value here><br><br>Default value is 0.
Variant constructors:
```ts
function messageSourceEncoded(message: string, abi?: Abi): MessageSource;
function messageSourceEncodingParams(params: ParamsOfEncodeMessage): MessageSource;
```

## AbiParam
```ts
type AbiParam = {
Expand Down Expand Up @@ -907,23 +943,26 @@ type ResultOfEncodeMessage = {
## ParamsOfEncodeInternalMessage
```ts
type ParamsOfEncodeInternalMessage = {
abi: Abi,
abi?: Abi,
address?: string,
src_address?: string,
deploy_set?: DeploySet,
call_set?: CallSet,
value: string,
bounce?: boolean,
enable_ihr?: boolean
}
```
- `abi`: _[Abi](mod_abi.md#Abi)_ – Contract ABI.
- `abi`?: _[Abi](mod_abi.md#Abi)_ – Contract ABI.
<br>Can be None if both deploy_set and call_set are None.
- `address`?: _string_ – Target address the message will be sent to.
<br>Must be specified in case of non-deploy message.
- `src_address`?: _string_ – Source address of the message.
- `deploy_set`?: _[DeploySet](mod_abi.md#DeploySet)_ – Deploy parameters.
<br>Must be specified in case of deploy message.
- `call_set`?: _[CallSet](mod_abi.md#CallSet)_ – Function call parameters.
<br>Must be specified in case of non-deploy message.<br><br>In case of deploy message it is optional and contains parameters<br>of the functions that will to be called upon deploy transaction.
- `value`: _string_ – Value in nanograms to be sent with message.
- `value`: _string_ – Value in nanotokens to be sent with message.
- `bounce`?: _boolean_ – Flag of bounceable message.
<br>Default is true.
- `enable_ihr`?: _boolean_ – Enable Instant Hypercube Routing for the message.
Expand Down
Loading

0 comments on commit 85c6a8f

Please sign in to comment.