diff --git a/Readme.md b/Readme.md index 34297a5..526a3f7 100644 --- a/Readme.md +++ b/Readme.md @@ -1,6 +1,6 @@ # TON SDK client Golang -[![EVER-SDK](https://img.shields.io/badge/EVER_SDK-1.43.3-green.svg)](https://github.com/tonlabs/EVER-SDK/tree/1.43.3) +[![EVER-SDK](https://img.shields.io/badge/EVER_SDK-1.44.1-green.svg)](https://github.com/tonlabs/EVER-SDK/tree/1.44.1) [![TON local-node docker image](https://img.shields.io/badge/TON_local_node-0.33.0-green.svg)](https://hub.docker.com/layers/local-node/tonlabs/local-node/0.33.0/images/sha256-40a544432089f2d730f3dd0542fcb59bef6c5192b5d374fdae3a7ea6417070c4) [![Chat Telegram](https://img.shields.io/badge/chat-Telegram-9cf.svg)](https://t.me/RADIANCE_EVER_SDK) [![Documentation](https://godoc.org/github.com/radianceteam/everscale-client-go/client?status.svg)](https://godoc.org/github.com/radianceteam/everscale-client-go/client) diff --git a/api-spec.json b/api-spec.json index 8065e83..e8d0b2f 100644 --- a/api-spec.json +++ b/api-spec.json @@ -1,5 +1,5 @@ { - "version": "1.43.3", + "version": "1.44.1", "modules": [ { "name": "client", @@ -10755,8 +10755,11 @@ }, { "name": "send_events", - "type": "Boolean", - "summary": "Flag for requesting events sending", + "type": "Optional", + "optional_inner": { + "type": "Boolean" + }, + "summary": "Flag for requesting events sending. Default is `false`.", "description": null } ], @@ -10814,8 +10817,11 @@ }, { "name": "send_events", - "type": "Boolean", - "summary": "Flag that enables/disables intermediate events", + "type": "Optional", + "optional_inner": { + "type": "Boolean" + }, + "summary": "Flag that enables/disables intermediate events. Default is `false`.", "description": null }, { @@ -10847,8 +10853,11 @@ }, { "name": "send_events", - "type": "Boolean", - "summary": "Flag for requesting events sending", + "type": "Optional", + "optional_inner": { + "type": "Boolean" + }, + "summary": "Flag for requesting events sending. Default is `false`.", "description": null } ], @@ -14397,7 +14406,7 @@ }, { "name": "debot", - "summary": "[UNSTABLE](UNSTABLE.md) Module for working with debot.", + "summary": "[UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md) Module for working with debot.", "description": null, "types": [ { @@ -14504,7 +14513,7 @@ "type": "Number", "number_type": "UInt", "number_size": 32, - "summary": "[UNSTABLE](UNSTABLE.md) Handle of registered in SDK debot", + "summary": "[UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md) Handle of registered in SDK debot", "description": null }, { @@ -14552,7 +14561,7 @@ "description": "Used by debot only." } ], - "summary": "[UNSTABLE](UNSTABLE.md) Describes a debot action in a Debot Context.", + "summary": "[UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md) Describes a debot action in a Debot Context.", "description": null }, { @@ -14665,7 +14674,7 @@ "description": null } ], - "summary": "[UNSTABLE](UNSTABLE.md) Describes DeBot metadata.", + "summary": "[UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md) Describes DeBot metadata.", "description": null }, { @@ -14731,7 +14740,7 @@ "description": null } ], - "summary": "[UNSTABLE](UNSTABLE.md) Describes the operation that the DeBot wants to perform.", + "summary": "[UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md) Describes the operation that the DeBot wants to perform.", "description": null }, { @@ -14753,7 +14762,7 @@ "description": null } ], - "summary": "[UNSTABLE](UNSTABLE.md) Describes how much funds will be debited from the target contract balance as a result of the transaction.", + "summary": "[UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md) Describes how much funds will be debited from the target contract balance as a result of the transaction.", "description": null }, { @@ -14767,7 +14776,7 @@ "description": null } ], - "summary": "[UNSTABLE](UNSTABLE.md) Parameters to init DeBot.", + "summary": "[UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md) Parameters to init DeBot.", "description": null }, { @@ -14795,7 +14804,7 @@ "description": null } ], - "summary": "[UNSTABLE](UNSTABLE.md) Structure for storing debot handle returned from `init` function.", + "summary": "[UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md) Structure for storing debot handle returned from `init` function.", "description": null }, { @@ -14926,7 +14935,7 @@ "description": null } ], - "summary": "[UNSTABLE](UNSTABLE.md) Debot Browser callbacks", + "summary": "[UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md) Debot Browser callbacks", "description": "Called by debot engine to communicate with debot browser." }, { @@ -14984,7 +14993,7 @@ "description": null } ], - "summary": "[UNSTABLE](UNSTABLE.md) Returning values from Debot Browser callbacks.", + "summary": "[UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md) Returning values from Debot Browser callbacks.", "description": null }, { @@ -14999,7 +15008,7 @@ "description": null } ], - "summary": "[UNSTABLE](UNSTABLE.md) Parameters to start DeBot. DeBot must be already initialized with init() function.", + "summary": "[UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md) Parameters to start DeBot. DeBot must be already initialized with init() function.", "description": null }, { @@ -15013,7 +15022,7 @@ "description": null } ], - "summary": "[UNSTABLE](UNSTABLE.md) Parameters to fetch DeBot metadata.", + "summary": "[UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md) Parameters to fetch DeBot metadata.", "description": null }, { @@ -15028,7 +15037,7 @@ "description": null } ], - "summary": "[UNSTABLE](UNSTABLE.md)", + "summary": "[UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md)", "description": null }, { @@ -15050,7 +15059,7 @@ "description": null } ], - "summary": "[UNSTABLE](UNSTABLE.md) Parameters for executing debot action.", + "summary": "[UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md) Parameters for executing debot action.", "description": null }, { @@ -15071,7 +15080,7 @@ "description": null } ], - "summary": "[UNSTABLE](UNSTABLE.md) Parameters of `send` function.", + "summary": "[UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md) Parameters of `send` function.", "description": null }, { @@ -15086,14 +15095,14 @@ "description": null } ], - "summary": "[UNSTABLE](UNSTABLE.md)", + "summary": "[UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md)", "description": null } ], "functions": [ { "name": "init", - "summary": "[UNSTABLE](UNSTABLE.md) Creates and instance of DeBot.", + "summary": "[UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md) Creates and instance of DeBot.", "description": "Downloads debot smart contract (code and data) from blockchain and creates\nan instance of Debot Engine for it.\n\n# Remarks\nIt does not switch debot to context 0. Browser Callbacks are not called.", "params": [ { @@ -15148,7 +15157,7 @@ }, { "name": "start", - "summary": "[UNSTABLE](UNSTABLE.md) Starts the DeBot.", + "summary": "[UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md) Starts the DeBot.", "description": "Downloads debot smart contract from blockchain and switches it to\ncontext zero.\n\nThis function must be used by Debot Browser to start a dialog with debot.\nWhile the function is executing, several Browser Callbacks can be called,\nsince the debot tries to display all actions from the context 0 to the user.\n\nWhen the debot starts SDK registers `BrowserCallbacks` AppObject.\nTherefore when `debote.remove` is called the debot is being deleted and the callback is called\nwith `finish`=`true` which indicates that it will never be used again.", "params": [ { @@ -15185,7 +15194,7 @@ }, { "name": "fetch", - "summary": "[UNSTABLE](UNSTABLE.md) Fetches DeBot metadata from blockchain.", + "summary": "[UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md) Fetches DeBot metadata from blockchain.", "description": "Downloads DeBot from blockchain and creates and fetches its metadata.", "params": [ { @@ -15223,7 +15232,7 @@ }, { "name": "execute", - "summary": "[UNSTABLE](UNSTABLE.md) Executes debot action.", + "summary": "[UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md) Executes debot action.", "description": "Calls debot engine referenced by debot handle to execute input action.\nCalls Debot Browser Callbacks if needed.\n\n# Remarks\nChain of actions can be executed if input action generates a list of subactions.", "params": [ { @@ -15260,7 +15269,7 @@ }, { "name": "send", - "summary": "[UNSTABLE](UNSTABLE.md) Sends message to Debot.", + "summary": "[UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md) Sends message to Debot.", "description": "Used by Debot Browser to send response on Dinterface call or from other Debots.", "params": [ { @@ -15297,7 +15306,7 @@ }, { "name": "remove", - "summary": "[UNSTABLE](UNSTABLE.md) Destroys debot handle.", + "summary": "[UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md) Destroys debot handle.", "description": "Removes handle from Client Context and drops debot engine referenced by that handle.", "params": [ { @@ -15336,7 +15345,7 @@ }, { "name": "proofs", - "summary": "[UNSTABLE](UNSTABLE.md) Module for proving data, retrieved from TONOS API.", + "summary": "[UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md) Module for proving data, retrieved from TONOS API.", "description": null, "types": [ { diff --git a/client/mod_abi.gen.go b/client/mod_abi.gen.go index a038016..4a03172 100644 --- a/client/mod_abi.gen.go +++ b/client/mod_abi.gen.go @@ -1,6 +1,6 @@ package client -// DON'T EDIT THIS FILE! It is generated via 'task generate' at 26 Jun 23 09:46 UTC +// DON'T EDIT THIS FILE! It is generated via 'task generate' at 08 Aug 23 16:44 UTC // // Mod abi // diff --git a/client/mod_boc.gen.go b/client/mod_boc.gen.go index 74e798d..4a46dfc 100644 --- a/client/mod_boc.gen.go +++ b/client/mod_boc.gen.go @@ -1,6 +1,6 @@ package client -// DON'T EDIT THIS FILE! It is generated via 'task generate' at 26 Jun 23 09:46 UTC +// DON'T EDIT THIS FILE! It is generated via 'task generate' at 08 Aug 23 16:44 UTC // // Mod boc // diff --git a/client/mod_client.gen.go b/client/mod_client.gen.go index 3898f05..fcd5d09 100644 --- a/client/mod_client.gen.go +++ b/client/mod_client.gen.go @@ -1,6 +1,6 @@ package client -// DON'T EDIT THIS FILE! It is generated via 'task generate' at 26 Jun 23 09:46 UTC +// DON'T EDIT THIS FILE! It is generated via 'task generate' at 08 Aug 23 16:44 UTC // // Mod client // diff --git a/client/mod_crypto.gen.go b/client/mod_crypto.gen.go index 86a0709..056a154 100644 --- a/client/mod_crypto.gen.go +++ b/client/mod_crypto.gen.go @@ -1,6 +1,6 @@ package client -// DON'T EDIT THIS FILE! It is generated via 'task generate' at 26 Jun 23 09:46 UTC +// DON'T EDIT THIS FILE! It is generated via 'task generate' at 08 Aug 23 16:44 UTC // // Mod crypto // diff --git a/client/mod_debot.gen.go b/client/mod_debot.gen.go index d414479..c35d11e 100644 --- a/client/mod_debot.gen.go +++ b/client/mod_debot.gen.go @@ -1,10 +1,10 @@ package client -// DON'T EDIT THIS FILE! It is generated via 'task generate' at 26 Jun 23 09:46 UTC +// DON'T EDIT THIS FILE! It is generated via 'task generate' at 08 Aug 23 16:44 UTC // // Mod debot // -// [UNSTABLE](UNSTABLE.md) Module for working with debot. +// [UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md) Module for working with debot. import ( "encoding/json" @@ -49,7 +49,7 @@ func init() { // nolint gochecknoinits type DebotHandle uint32 -// [UNSTABLE](UNSTABLE.md) Describes a debot action in a Debot Context. +// [UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md) Describes a debot action in a Debot Context. type DebotAction struct { // A short action description. // Should be used by Debot Browser as name of menu item. @@ -69,7 +69,7 @@ type DebotAction struct { Misc string `json:"misc"` } -// [UNSTABLE](UNSTABLE.md) Describes DeBot metadata. +// [UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md) Describes DeBot metadata. type DebotInfo struct { // DeBot short name. Name null.String `json:"name"` // optional @@ -97,7 +97,7 @@ type DebotInfo struct { DabiVersion string `json:"dabiVersion"` } -// [UNSTABLE](UNSTABLE.md) Describes the operation that the DeBot wants to perform. +// [UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md) Describes the operation that the DeBot wants to perform. // DeBot wants to create new transaction in blockchain. type TransactionDebotActivity struct { @@ -163,7 +163,7 @@ func (p *DebotActivity) UnmarshalJSON(b []byte) error { // nolint funlen return nil } -// [UNSTABLE](UNSTABLE.md) Describes how much funds will be debited from the target contract balance as a result of the transaction. +// [UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md) Describes how much funds will be debited from the target contract balance as a result of the transaction. type Spending struct { // Amount of nanotokens that will be sent to `dst` address. Amount big.Int `json:"amount"` @@ -171,13 +171,13 @@ type Spending struct { Dst string `json:"dst"` } -// [UNSTABLE](UNSTABLE.md) Parameters to init DeBot. +// [UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md) Parameters to init DeBot. type ParamsOfInit struct { // Debot smart contract address. Address string `json:"address"` } -// [UNSTABLE](UNSTABLE.md) Structure for storing debot handle returned from `init` function. +// [UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md) Structure for storing debot handle returned from `init` function. type RegisteredDebot struct { // Debot handle which references an instance of debot engine. DebotHandle DebotHandle `json:"debot_handle"` @@ -187,7 +187,7 @@ type RegisteredDebot struct { Info DebotInfo `json:"info"` } -// [UNSTABLE](UNSTABLE.md) Debot Browser callbacks. +// [UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md) Debot Browser callbacks. // Called by debot engine to communicate with debot browser. // Print message to user. @@ -424,7 +424,7 @@ func (p *ParamsOfAppDebotBrowser) UnmarshalJSON(b []byte) error { // nolint funl return nil } -// [UNSTABLE](UNSTABLE.md) Returning values from Debot Browser callbacks. +// [UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md) Returning values from Debot Browser callbacks. // Result of user input. type InputResultOfAppDebotBrowser struct { @@ -545,25 +545,25 @@ func (p *ResultOfAppDebotBrowser) UnmarshalJSON(b []byte) error { // nolint funl return nil } -// [UNSTABLE](UNSTABLE.md) Parameters to start DeBot. DeBot must be already initialized with init() function. +// [UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md) Parameters to start DeBot. DeBot must be already initialized with init() function. type ParamsOfStart struct { // Debot handle which references an instance of debot engine. DebotHandle DebotHandle `json:"debot_handle"` } -// [UNSTABLE](UNSTABLE.md) Parameters to fetch DeBot metadata. +// [UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md) Parameters to fetch DeBot metadata. type ParamsOfFetch struct { // Debot smart contract address. Address string `json:"address"` } -// [UNSTABLE](UNSTABLE.md). +// [UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md). type ResultOfFetch struct { // Debot metadata. Info DebotInfo `json:"info"` } -// [UNSTABLE](UNSTABLE.md) Parameters for executing debot action. +// [UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md) Parameters for executing debot action. type ParamsOfExecute struct { // Debot handle which references an instance of debot engine. DebotHandle DebotHandle `json:"debot_handle"` @@ -571,7 +571,7 @@ type ParamsOfExecute struct { Action DebotAction `json:"action"` } -// [UNSTABLE](UNSTABLE.md) Parameters of `send` function. +// [UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md) Parameters of `send` function. type ParamsOfSend struct { // Debot handle which references an instance of debot engine. DebotHandle DebotHandle `json:"debot_handle"` @@ -579,13 +579,13 @@ type ParamsOfSend struct { Message string `json:"message"` } -// [UNSTABLE](UNSTABLE.md). +// [UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md). type ParamsOfRemove struct { // Debot handle which references an instance of debot engine. DebotHandle DebotHandle `json:"debot_handle"` } -// [UNSTABLE](UNSTABLE.md) Creates and instance of DeBot. +// [UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md) Creates and instance of DeBot. // Downloads debot smart contract (code and data) from blockchain and creates // an instance of Debot Engine for it. // @@ -699,7 +699,7 @@ func (c *Client) dispatchNotifyDebotInit(payload []byte, app AppDebotBrowser) { } } -// [UNSTABLE](UNSTABLE.md) Starts the DeBot. +// [UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md) Starts the DeBot. // Downloads debot smart contract from blockchain and switches it to // context zero. // @@ -716,7 +716,7 @@ func (c *Client) DebotStart(p *ParamsOfStart) error { return err } -// [UNSTABLE](UNSTABLE.md) Fetches DeBot metadata from blockchain. +// [UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md) Fetches DeBot metadata from blockchain. // Downloads DeBot from blockchain and creates and fetches its metadata. func (c *Client) DebotFetch(p *ParamsOfFetch) (*ResultOfFetch, error) { result := new(ResultOfFetch) @@ -726,7 +726,7 @@ func (c *Client) DebotFetch(p *ParamsOfFetch) (*ResultOfFetch, error) { return result, err } -// [UNSTABLE](UNSTABLE.md) Executes debot action. +// [UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md) Executes debot action. // Calls debot engine referenced by debot handle to execute input action. // Calls Debot Browser Callbacks if needed. // @@ -738,7 +738,7 @@ func (c *Client) DebotExecute(p *ParamsOfExecute) error { return err } -// [UNSTABLE](UNSTABLE.md) Sends message to Debot. +// [UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md) Sends message to Debot. // Used by Debot Browser to send response on Dinterface call or from other Debots. func (c *Client) DebotSend(p *ParamsOfSend) error { _, err := c.dllClient.waitErrorOrResult("debot.send", p) @@ -746,7 +746,7 @@ func (c *Client) DebotSend(p *ParamsOfSend) error { return err } -// [UNSTABLE](UNSTABLE.md) Destroys debot handle. +// [UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md) Destroys debot handle. // Removes handle from Client Context and drops debot engine referenced by that handle. func (c *Client) DebotRemove(p *ParamsOfRemove) error { _, err := c.dllClient.waitErrorOrResult("debot.remove", p) diff --git a/client/mod_net.gen.go b/client/mod_net.gen.go index 586e644..090c51b 100644 --- a/client/mod_net.gen.go +++ b/client/mod_net.gen.go @@ -1,6 +1,6 @@ package client -// DON'T EDIT THIS FILE! It is generated via 'task generate' at 26 Jun 23 09:46 UTC +// DON'T EDIT THIS FILE! It is generated via 'task generate' at 08 Aug 23 16:44 UTC // // Mod net // diff --git a/client/mod_processing.gen.go b/client/mod_processing.gen.go index 1cb6243..93ba3aa 100644 --- a/client/mod_processing.gen.go +++ b/client/mod_processing.gen.go @@ -1,6 +1,6 @@ package client -// DON'T EDIT THIS FILE! It is generated via 'task generate' at 26 Jun 23 09:46 UTC +// DON'T EDIT THIS FILE! It is generated via 'task generate' at 08 Aug 23 16:44 UTC // // Mod processing // @@ -670,8 +670,8 @@ type ParamsOfSendMessage struct { // strongly recommended, so that proper processing strategy can be // chosen. Abi *Abi `json:"abi"` // optional - // Flag for requesting events sending. - SendEvents bool `json:"send_events"` + // Flag for requesting events sending. Default is `false`. + SendEvents null.Bool `json:"send_events"` // optional } type ResultOfSendMessage struct { @@ -698,8 +698,8 @@ type ParamsOfWaitForTransaction struct { // The last generated block id of the destination account shard before the message was sent. // You must provide the same value as the `send_message` has returned. ShardBlockID string `json:"shard_block_id"` - // Flag that enables/disables intermediate events. - SendEvents bool `json:"send_events"` + // Flag that enables/disables intermediate events. Default is `false`. + SendEvents null.Bool `json:"send_events"` // optional // The list of endpoints to which the message was sent. // Use this field to get more informative errors. // Provide the same value as the `send_message` has returned. @@ -710,8 +710,8 @@ type ParamsOfWaitForTransaction struct { type ParamsOfProcessMessage struct { // Message encode parameters. MessageEncodeParams ParamsOfEncodeMessage `json:"message_encode_params"` - // Flag for requesting events sending. - SendEvents bool `json:"send_events"` + // Flag for requesting events sending. Default is `false`. + SendEvents null.Bool `json:"send_events"` // optional } // Starts monitoring for the processing results of the specified messages. diff --git a/client/mod_processing.go b/client/mod_processing.go index 68f1066..9855dbb 100644 --- a/client/mod_processing.go +++ b/client/mod_processing.go @@ -43,14 +43,14 @@ func handleEvents(responses <-chan *RawResponse, callback EventCallback, result // Sends message to the network and returns the last generated shard block of the destination account // before the message was sent. It will be required later for message processing. func (c *Client) ProcessingSendMessage(p *ParamsOfSendMessage, callback EventCallback) (*ResultOfSendMessage, error) { - if p.SendEvents && callback == nil { + if p.SendEvents.Bool && callback == nil { return nil, ErrNoCallbackSpecified } responses, err := c.dllClient.resultsChannel("processing.send_message", p) if err != nil { return nil, err } - if p.SendEvents { + if p.SendEvents.Bool { responses = NewDynamicallyBufferedResponses(responses) } result := &ResultOfSendMessage{} @@ -86,14 +86,14 @@ func (c *Client) ProcessingSendMessage(p *ParamsOfSendMessage, callback EventCal // - If maximum block gen time is reached and no result transaction is found // the processing will exit with an error. func (c *Client) ProcessingWaitForTransaction(p *ParamsOfWaitForTransaction, callback EventCallback) (*ResultOfProcessMessage, error) { - if p.SendEvents && callback == nil { + if p.SendEvents.Bool && callback == nil { return nil, ErrNoCallbackSpecified } responses, err := c.dllClient.resultsChannel("processing.wait_for_transaction", p) if err != nil { return nil, err } - if p.SendEvents { + if p.SendEvents.Bool { responses = NewDynamicallyBufferedResponses(responses) } @@ -124,14 +124,14 @@ func (c *Client) ProcessingWaitForTransaction(p *ParamsOfWaitForTransaction, cal // If contract's ABI does not include "expire" header // then if no transaction is found within the network timeout (see config parameter ), exits with error. func (c *Client) ProcessingProcessMessage(p *ParamsOfProcessMessage, callback EventCallback) (*ResultOfProcessMessage, error) { - if p.SendEvents && callback == nil { + if p.SendEvents.Bool && callback == nil { return nil, ErrNoCallbackSpecified } responses, err := c.dllClient.resultsChannel("processing.process_message", p) if err != nil { return nil, err } - if p.SendEvents { + if p.SendEvents.Bool { responses = NewDynamicallyBufferedResponses(responses) } diff --git a/client/mod_proofs.gen.go b/client/mod_proofs.gen.go index f9c2c6b..814c69a 100644 --- a/client/mod_proofs.gen.go +++ b/client/mod_proofs.gen.go @@ -1,10 +1,10 @@ package client -// DON'T EDIT THIS FILE! It is generated via 'task generate' at 26 Jun 23 09:46 UTC +// DON'T EDIT THIS FILE! It is generated via 'task generate' at 08 Aug 23 16:44 UTC // // Mod proofs // -// [UNSTABLE](UNSTABLE.md) Module for proving data, retrieved from TONOS API. +// [UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md) Module for proving data, retrieved from TONOS API. import ( "encoding/json" diff --git a/client/mod_tvm.gen.go b/client/mod_tvm.gen.go index c7171c7..0f1a535 100644 --- a/client/mod_tvm.gen.go +++ b/client/mod_tvm.gen.go @@ -1,6 +1,6 @@ package client -// DON'T EDIT THIS FILE! It is generated via 'task generate' at 26 Jun 23 09:46 UTC +// DON'T EDIT THIS FILE! It is generated via 'task generate' at 08 Aug 23 16:44 UTC // // Mod tvm // diff --git a/client/mod_utils.gen.go b/client/mod_utils.gen.go index 28ae3e6..f4a9ab6 100644 --- a/client/mod_utils.gen.go +++ b/client/mod_utils.gen.go @@ -1,6 +1,6 @@ package client -// DON'T EDIT THIS FILE! It is generated via 'task generate' at 26 Jun 23 09:46 UTC +// DON'T EDIT THIS FILE! It is generated via 'task generate' at 08 Aug 23 16:44 UTC // // Mod utils // diff --git a/clienttest/helpers.go b/clienttest/helpers.go index 49a59f3..c547d10 100644 --- a/clienttest/helpers.go +++ b/clienttest/helpers.go @@ -105,7 +105,7 @@ func GetGramsFromGiver(c *client.Client, msgParams *client.ParamsOfEncodeMessage res, err := c.ProcessingProcessMessage(&client.ParamsOfProcessMessage{ MessageEncodeParams: params, - SendEvents: false, + SendEvents: null.BoolFrom(false), }, nil) if err != nil { return err @@ -120,7 +120,7 @@ func GetGramsFromGiver(c *client.Client, msgParams *client.ParamsOfEncodeMessage } _, err = c.ProcessingProcessMessage(&client.ParamsOfProcessMessage{ MessageEncodeParams: params, - SendEvents: false, + SendEvents: null.BoolFrom(false), }, nil) return err diff --git a/clienttest/mod_net_test.go b/clienttest/mod_net_test.go index e5c3add..eab47d1 100644 --- a/clienttest/mod_net_test.go +++ b/clienttest/mod_net_test.go @@ -38,7 +38,7 @@ func TestClient_NetSubscribeCollectionEmpty(t *testing.T) { go func() { defer wg.Done() for r := range responses { - a.NotNil(r, "no data when unsubscribe") + a.Nil(r, "no data when unsubscribe") } }() err = c.NetUnsubscribe(&client.ResultOfSubscribeCollection{Handle: handle.Handle}) diff --git a/clienttest/mod_processing_test.go b/clienttest/mod_processing_test.go index db26b17..11e041d 100644 --- a/clienttest/mod_processing_test.go +++ b/clienttest/mod_processing_test.go @@ -35,7 +35,7 @@ func TestClient_ProcessingWaitMessage(t *testing.T) { events := make(chan *client.ProcessingEvent, 20) sendResult, err := c.ProcessingSendMessage(&client.ParamsOfSendMessage{ Message: msg.Message, - SendEvents: true, + SendEvents: null.BoolFrom(true), Abi: &abi, }, func(e *client.ProcessingEvent) { events <- e }) a.NoError(err, "processing.send_message") @@ -44,7 +44,7 @@ func TestClient_ProcessingWaitMessage(t *testing.T) { waitForTransactionResult, err := c.ProcessingWaitForTransaction(&client.ParamsOfWaitForTransaction{ Message: msg.Message, ShardBlockID: sendResult.ShardBlockID, - SendEvents: true, + SendEvents: null.BoolFrom(true), Abi: &abi, }, func(e *client.ProcessingEvent) { events <- e }) close(events)