Skip to content

Commit

Permalink
rdm
Browse files Browse the repository at this point in the history
  • Loading branch information
nerzh committed Oct 23, 2022
1 parent d727366 commit 6a8307f
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ client = TonClient.create(config: {network: {endpoints: ["https://eri01.net.ever

# All methods are asynchronous

# example: call method for Crypto module
## example 1: call method for Crypto module
payload = {composite: '17ED48941A08F981'}

# Sync
Expand All @@ -48,6 +48,23 @@ client.crypto.factorize(payload) do |response|
p response.result['factors']
end


## example 2: parse message from boc base64 encoded
payload = {boc: "te6ccgEBAQEAWAAAq2n+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAE/zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzSsG8DgAAAAAjuOu9NAL7BxYpA"}

# Sync
response = client.boc.parse_message_sync(payload)
p response['result']['parsed']['id']
p response['result']['parsed']['src']
p response['result']['parsed']['dst']

# Async
client.boc.parse_message_sync(payload) do |response|
p response.result['parsed']['id']
p response.result['parsed']['src']
p response.result['parsed']['dst']
end

# e.g. ...
```

Expand Down

0 comments on commit 6a8307f

Please sign in to comment.