Skip to content

Commit

Permalink
[v1.40.0-rc] Add support for SDK 1.40.0
Browse files Browse the repository at this point in the history
  • Loading branch information
risentveber committed Jan 28, 2023
1 parent 9767280 commit 497d482
Show file tree
Hide file tree
Showing 12 changed files with 123 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Readme.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# TON SDK client Golang

[![EVER-SDK](https://img.shields.io/badge/EVER_SDK-1.39.0-green.svg)](https://github.com/tonlabs/EVER-SDK/tree/1.39.0)
[![EVER-SDK](https://img.shields.io/badge/EVER_SDK-1.40.0-green.svg)](https://github.com/tonlabs/EVER-SDK/tree/1.40.0)
[![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)
Expand Down
88 changes: 87 additions & 1 deletion api-spec.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.39.0",
"version": "1.40.0",
"modules": [
{
"name": "client",
Expand Down Expand Up @@ -254,6 +254,13 @@
"value": "35",
"summary": null,
"description": null
},
{
"name": "InvalidData",
"type": "Number",
"value": "36",
"summary": null,
"description": null
}
],
"summary": null,
Expand Down Expand Up @@ -7126,6 +7133,47 @@
],
"summary": null,
"description": null
},
{
"name": "ParamsOfGetSignatureData",
"type": "Struct",
"struct_fields": [
{
"name": "abi",
"type": "Ref",
"ref_name": "abi.Abi",
"summary": "Contract ABI used to decode.",
"description": null
},
{
"name": "message",
"type": "String",
"summary": "Message BOC encoded in `base64`.",
"description": null
}
],
"summary": null,
"description": null
},
{
"name": "ResultOfGetSignatureData",
"type": "Struct",
"struct_fields": [
{
"name": "signature",
"type": "String",
"summary": "Signature from the message in `hex`.",
"description": null
},
{
"name": "hash",
"type": "String",
"summary": "Hash to verify the signature in `base64`.",
"description": null
}
],
"summary": null,
"description": null
}
],
"functions": [
Expand Down Expand Up @@ -7698,6 +7746,44 @@
]
},
"errors": null
},
{
"name": "get_signature_data",
"summary": "Extracts signature from message body and calculates hash to verify the signature",
"description": null,
"params": [
{
"name": "context",
"type": "Generic",
"generic_name": "Arc",
"generic_args": [
{
"type": "Ref",
"ref_name": "ClientContext"
}
],
"summary": null,
"description": null
},
{
"name": "params",
"type": "Ref",
"ref_name": "abi.ParamsOfGetSignatureData",
"summary": null,
"description": null
}
],
"result": {
"type": "Generic",
"generic_name": "ClientResult",
"generic_args": [
{
"type": "Ref",
"ref_name": "abi.ResultOfGetSignatureData"
}
]
},
"errors": null
}
]
},
Expand Down
25 changes: 24 additions & 1 deletion client/mod_abi.gen.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package client

// DON'T EDIT THIS FILE! It is generated via 'task generate' at 09 Dec 22 11:48 UTC
// DON'T EDIT THIS FILE! It is generated via 'task generate' at 28 Jan 23 13:55 UTC
//
// Mod abi
//
Expand Down Expand Up @@ -782,6 +782,20 @@ type ResultOfCalcFunctionId struct {
FunctionID uint32 `json:"function_id"`
}

type ParamsOfGetSignatureData struct {
// Contract ABI used to decode.
Abi Abi `json:"abi"`
// Message BOC encoded in `base64`.
Message string `json:"message"`
}

type ResultOfGetSignatureData struct {
// Signature from the message in `hex`.
Signature string `json:"signature"`
// Hash to verify the signature in `base64`.
Hash string `json:"hash"`
}

// Encodes message body according to ABI function call.
func (c *Client) AbiEncodeMessageBody(p *ParamsOfEncodeMessageBody) (*ResultOfEncodeMessageBody, error) {
result := new(ResultOfEncodeMessageBody)
Expand Down Expand Up @@ -979,3 +993,12 @@ func (c *Client) AbiCalcFunctionId(p *ParamsOfCalcFunctionId) (*ResultOfCalcFunc

return result, err
}

// Extracts signature from message body and calculates hash to verify the signature.
func (c *Client) AbiGetSignatureData(p *ParamsOfGetSignatureData) (*ResultOfGetSignatureData, error) {
result := new(ResultOfGetSignatureData)

err := c.dllClient.waitErrorOrResultUnmarshal("abi.get_signature_data", p, result)

return result, err
}
2 changes: 1 addition & 1 deletion client/mod_boc.gen.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package client

// DON'T EDIT THIS FILE! It is generated via 'task generate' at 09 Dec 22 11:48 UTC
// DON'T EDIT THIS FILE! It is generated via 'task generate' at 28 Jan 23 13:55 UTC
//
// Mod boc
//
Expand Down
4 changes: 3 additions & 1 deletion client/mod_client.gen.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package client

// DON'T EDIT THIS FILE! It is generated via 'task generate' at 09 Dec 22 11:48 UTC
// DON'T EDIT THIS FILE! It is generated via 'task generate' at 28 Jan 23 13:55 UTC
//
// Mod client
//
Expand Down Expand Up @@ -49,6 +49,7 @@ const (
InternalErrorErrorCode = 33
InvalidHandleErrorCode = 34
LocalStorageErrorErrorCode = 35
InvalidDataErrorCode = 36
)

func init() { // nolint gochecknoinits
Expand Down Expand Up @@ -87,6 +88,7 @@ func init() { // nolint gochecknoinits
errorCodesToErrorTypes[InternalErrorErrorCode] = "InternalErrorErrorCode"
errorCodesToErrorTypes[InvalidHandleErrorCode] = "InvalidHandleErrorCode"
errorCodesToErrorTypes[LocalStorageErrorErrorCode] = "LocalStorageErrorErrorCode"
errorCodesToErrorTypes[InvalidDataErrorCode] = "InvalidDataErrorCode"
}

type Error struct {
Expand Down
2 changes: 1 addition & 1 deletion client/mod_crypto.gen.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package client

// DON'T EDIT THIS FILE! It is generated via 'task generate' at 09 Dec 22 11:48 UTC
// DON'T EDIT THIS FILE! It is generated via 'task generate' at 28 Jan 23 13:55 UTC
//
// Mod crypto
//
Expand Down
2 changes: 1 addition & 1 deletion client/mod_debot.gen.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package client

// DON'T EDIT THIS FILE! It is generated via 'task generate' at 09 Dec 22 11:48 UTC
// DON'T EDIT THIS FILE! It is generated via 'task generate' at 28 Jan 23 13:55 UTC
//
// Mod debot
//
Expand Down
2 changes: 1 addition & 1 deletion client/mod_net.gen.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package client

// DON'T EDIT THIS FILE! It is generated via 'task generate' at 09 Dec 22 11:48 UTC
// DON'T EDIT THIS FILE! It is generated via 'task generate' at 28 Jan 23 13:55 UTC
//
// Mod net
//
Expand Down
2 changes: 1 addition & 1 deletion client/mod_processing.gen.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package client

// DON'T EDIT THIS FILE! It is generated via 'task generate' at 09 Dec 22 11:48 UTC
// DON'T EDIT THIS FILE! It is generated via 'task generate' at 28 Jan 23 13:55 UTC
//
// Mod processing
//
Expand Down
2 changes: 1 addition & 1 deletion client/mod_proofs.gen.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package client

// DON'T EDIT THIS FILE! It is generated via 'task generate' at 09 Dec 22 11:48 UTC
// DON'T EDIT THIS FILE! It is generated via 'task generate' at 28 Jan 23 13:55 UTC
//
// Mod proofs
//
Expand Down
2 changes: 1 addition & 1 deletion client/mod_tvm.gen.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package client

// DON'T EDIT THIS FILE! It is generated via 'task generate' at 09 Dec 22 11:48 UTC
// DON'T EDIT THIS FILE! It is generated via 'task generate' at 28 Jan 23 13:55 UTC
//
// Mod tvm
//
Expand Down
2 changes: 1 addition & 1 deletion client/mod_utils.gen.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package client

// DON'T EDIT THIS FILE! It is generated via 'task generate' at 09 Dec 22 11:48 UTC
// DON'T EDIT THIS FILE! It is generated via 'task generate' at 28 Jan 23 13:55 UTC
//
// Mod utils
//
Expand Down

0 comments on commit 497d482

Please sign in to comment.