Skip to content

Commit

Permalink
Version 1.33.0 (#407)
Browse files Browse the repository at this point in the history
* Version 1.33.0

* Fix react-native tests (#406)
  • Loading branch information
d3p authored May 3, 2022
1 parent 71e5582 commit dbc7964
Show file tree
Hide file tree
Showing 74 changed files with 1,482 additions and 13,267 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
All notable changes to this project will be documented in this file.

## [1.33.0] – 2022-05-02

### New

- `allow_partial` flag in all `abi.decode_*` functions. This flag controls decoder behaviour whether return error or not in case of incomplete BOC decoding
- `REMP` supported. `ProcessingEvent` enum is extended with `REMP` statuses (enum of events posted into `processing.wait_for_transaction` function callback )
- UNSTABLE. `first_remp_status_timeout` and `next_remp_status_timeout` parameters in network config

## [1.32.0] – 2022-03-22

### New
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"packages": [
"packages/*"
],
"version": "1.32.0",
"version": "1.33.0",
"command": {
"version": {
"message": "Release"
Expand Down
5 changes: 3 additions & 2 deletions packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@eversdk/core",
"version": "1.32.0",
"version": "1.33.0",
"description": "TON Client for Java Script",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand All @@ -9,7 +9,8 @@
"url": "https://github.com/tonlabs/ever-sdk-js.git"
},
"scripts": {
"prepublishOnly": "npm i && tsc"
"prepublishOnly": "npm i && tsc",
"build": "tsc"
},
"publishConfig": {
"access": "public"
Expand Down
174 changes: 162 additions & 12 deletions packages/core/src/modules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,16 @@ export type ClientConfig = {
export type NetworkConfig = {

/**
* DApp Server public address. For instance, for `net.ton.dev/graphql` GraphQL endpoint the server address will be net.ton.dev
* **This field is deprecated, but left for backward-compatibility.** DApp Server public address.
*/
server_address?: string,

/**
* List of DApp Server addresses.
*
* @remarks
* Any correct URL format can be specified, including IP addresses This parameter is prevailing over `server_address`.
* Any correct URL format can be specified, including IP addresses. This parameter is prevailing over `server_address`.
* Check the full list of [supported network endpoints](../ton-os-api/networks.md).
*/
endpoints?: string[],

Expand Down Expand Up @@ -171,7 +172,7 @@ export type NetworkConfig = {
* Maximum number of randomly chosen endpoints the library uses to broadcast a message.
*
* @remarks
* Default is 2.
* Default is 1.
*/
sending_endpoint_count?: number,

Expand Down Expand Up @@ -215,6 +216,26 @@ export type NetworkConfig = {
*/
queries_protocol?: NetworkQueriesProtocol,

/**
* UNSTABLE.
*
* @remarks
* First REMP status awaiting timeout. If no status recieved during the timeout than fallback transaction scenario is activated.
*
* Must be specified in milliseconds. Default is 1000 (1 sec).
*/
first_remp_status_timeout?: number,

/**
* UNSTABLE.
*
* @remarks
* Subsequent REMP status awaiting timeout. If no status recieved during the timeout than fallback transaction scenario is activated.
*
* Must be specified in milliseconds. Default is 5000 (5 sec).
*/
next_remp_status_timeout?: number,

/**
* Access key to GraphQL API.
*
Expand Down Expand Up @@ -472,7 +493,8 @@ export enum CryptoErrorCode {
CryptoBoxNotRegistered = 130,
InvalidCryptoBoxType = 131,
CryptoBoxSecretSerializationError = 132,
CryptoBoxSecretDeserializationError = 133
CryptoBoxSecretDeserializationError = 133,
InvalidNonceSize = 134
}

export type SigningBoxHandle = number
Expand Down Expand Up @@ -3298,7 +3320,12 @@ export type ParamsOfDecodeMessage = {
/**
* Message BOC
*/
message: string
message: string,

/**
* Flag allowing partial BOC decoding when ABI doesn't describe the full body BOC. Controls decoder behaviour when after decoding all described in ABI params there are some data left in BOC: `true` - return decoded values `false` - return error of incomplete BOC deserialization (default)
*/
allow_partial?: boolean
}

export type DecodedMessageBody = {
Expand Down Expand Up @@ -3339,7 +3366,12 @@ export type ParamsOfDecodeMessageBody = {
/**
* True if the body belongs to the internal message.
*/
is_internal: boolean
is_internal: boolean,

/**
* Flag allowing partial BOC decoding when ABI doesn't describe the full body BOC. Controls decoder behaviour when after decoding all described in ABI params there are some data left in BOC: `true` - return decoded values `false` - return error of incomplete BOC deserialization (default)
*/
allow_partial?: boolean
}

export type ParamsOfEncodeAccount = {
Expand Down Expand Up @@ -3396,7 +3428,12 @@ export type ParamsOfDecodeAccountData = {
/**
* Data BOC or BOC handle
*/
data: string
data: string,

/**
* Flag allowing partial BOC decoding when ABI doesn't describe the full body BOC. Controls decoder behaviour when after decoding all described in ABI params there are some data left in BOC: `true` - return decoded values `false` - return error of incomplete BOC deserialization (default)
*/
allow_partial?: boolean
}

export type ResultOfDecodeAccountData = {
Expand Down Expand Up @@ -3493,7 +3530,12 @@ export type ParamsOfDecodeInitialData = {
/**
* Data BOC or BOC handle
*/
data: string
data: string,

/**
* Flag allowing partial BOC decoding when ABI doesn't describe the full body BOC. Controls decoder behaviour when after decoding all described in ABI params there are some data left in BOC: `true` - return decoded values `false` - return error of incomplete BOC deserialization (default)
*/
allow_partial?: boolean
}

export type ResultOfDecodeInitialData = {
Expand Down Expand Up @@ -4583,7 +4625,10 @@ export enum ProcessingErrorCode {
CanNotCheckBlockShard = 510,
BlockNotFound = 511,
InvalidData = 512,
ExternalSignerMustNotBeUsed = 513
ExternalSignerMustNotBeUsed = 513,
MessageRejected = 514,
InvalidRempStatus = 515,
NextRempStatusTimeout = 516
}

export type ProcessingEvent = {
Expand Down Expand Up @@ -4683,6 +4728,68 @@ export type ProcessingEvent = {
*/
message: string,

/**
*/
error: ClientError
} | {
type: 'RempSentToValidators'

/**
*/
message_id: string,

/**
*/
timestamp: bigint,

/**
*/
json: any
} | {
type: 'RempIncludedIntoBlock'

/**
*/
message_id: string,

/**
*/
timestamp: bigint,

/**
*/
json: any
} | {
type: 'RempIncludedIntoAcceptedBlock'

/**
*/
message_id: string,

/**
*/
timestamp: bigint,

/**
*/
json: any
} | {
type: 'RempOther'

/**
*/
message_id: string,

/**
*/
timestamp: bigint,

/**
*/
json: any
} | {
type: 'RempError'

/**
*/
error: ClientError
Expand Down Expand Up @@ -4757,6 +4864,49 @@ export function processingEventMessageExpired(message_id: string, message: strin
};
}

export function processingEventRempSentToValidators(message_id: string, timestamp: bigint, json: any): ProcessingEvent {
return {
type: 'RempSentToValidators',
message_id,
timestamp,
json,
};
}

export function processingEventRempIncludedIntoBlock(message_id: string, timestamp: bigint, json: any): ProcessingEvent {
return {
type: 'RempIncludedIntoBlock',
message_id,
timestamp,
json,
};
}

export function processingEventRempIncludedIntoAcceptedBlock(message_id: string, timestamp: bigint, json: any): ProcessingEvent {
return {
type: 'RempIncludedIntoAcceptedBlock',
message_id,
timestamp,
json,
};
}

export function processingEventRempOther(message_id: string, timestamp: bigint, json: any): ProcessingEvent {
return {
type: 'RempOther',
message_id,
timestamp,
json,
};
}

export function processingEventRempError(error: ClientError): ProcessingEvent {
return {
type: 'RempError',
error,
};
}

export type ResultOfProcessMessage = {

/**
Expand Down Expand Up @@ -6583,8 +6733,8 @@ export class NetModule {
*
* @remarks
* *Attention* this query retrieves data from 'Counterparties' service which is not supported in
* the opensource version of DApp Server (and will not be supported) as well as in TON OS SE (will be supported in SE in future),
* but is always accessible via [TON OS Devnet/Mainnet Clouds](https://docs.ton.dev/86757ecb2/p/85c869-networks)
* the opensource version of DApp Server (and will not be supported) as well as in Evernode SE (will be supported in SE in future),
* but is always accessible via [EVER OS Clouds](../ton-os-api/networks.md)
*
* @param {ParamsOfQueryCounterparties} params
* @returns ResultOfQueryCollection
Expand Down Expand Up @@ -7572,7 +7722,7 @@ export class ProofsModule {
* a trusted validator set. So we need to check all key-blocks' proofs, started from the zero-state
* and until the block, which we want to prove. But it can take a lot of time and traffic to
* download and prove all key-blocks on a client. For solving this, special trusted blocks are used
* in TON-SDK.
* in Ever-SDK.
*
* The trusted block is the authority root, as well, as the zero-state. Each trusted block is the
* `id` (e.g. `root_hash`) of the already proven key-block. There can be plenty of trusted
Expand Down
2 changes: 1 addition & 1 deletion packages/lib-node/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@eversdk/lib-node",
"version": "1.32.0",
"version": "1.33.0",
"description": "TON Client NodeJs AddOn",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion packages/lib-react-native-jsi/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@eversdk/lib-react-native-jsi",
"version": "1.32.0",
"version": "1.33.0",
"description": "TON Client React Native JSI Module",
"main": "lib/commonjs/index",
"module": "lib/module/index",
Expand Down
2 changes: 1 addition & 1 deletion packages/lib-react-native/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@eversdk/lib-react-native",
"version": "1.32.0",
"version": "1.33.0",
"description": "TON Client React Native Module",
"main": "index.js",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion packages/lib-web/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@eversdk/lib-web",
"version": "1.32.0",
"version": "1.33.0",
"description": "TON Client WASM module for browsers",
"main": "index.js",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion packages/tests-node/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@eversdk/tests-node",
"version": "1.32.0",
"version": "1.33.0",
"private": true,
"description": "TON Client Tests runner on NodeJs",
"main": "index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/tests-react-native-jsi/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@eversdk/tests-react-native-jsi",
"version": "1.32.0",
"version": "1.33.0",
"private": true,
"main": "index.js",
"browser": true,
Expand Down
2 changes: 2 additions & 0 deletions packages/tests-react-native/.bundle/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
BUNDLE_PATH: "vendor/bundle"
BUNDLE_FORCE_RUBY_PLATFORM: 1
1 change: 0 additions & 1 deletion packages/tests-react-native/.gitattributes

This file was deleted.

Loading

0 comments on commit dbc7964

Please sign in to comment.