Class: TonClient::Boc
- Includes:
- CommonInstanceHelpers
- Defined in:
- lib/everscale-client-ruby/Client/Boc.rb
Constant Summary collapse
- MODULE =
self.to_s.downcase.gsub(/^(.+::|)(\w+)$/, '\2').freeze
Instance Attribute Summary collapse
-
#context ⇒ Object
readonly
Returns the value of attribute context.
-
#request_id ⇒ Object
readonly
Returns the value of attribute request_id.
-
#requests ⇒ Object
readonly
Returns the value of attribute requests.
Instance Method Summary collapse
-
#cache_get(payload, &block) ⇒ Object
INPUT: ParamsOfBocCacheGet boc_ref: String - # # Reference to the cached BOC RESPONSE: ResultOfBocCacheGet boc: String<Optional> - # # BOC encoded as base64.
-
#cache_set(payload, &block) ⇒ Object
INPUT: ParamsOfBocCacheSet boc: String - # # BOC encoded as base64 or BOC reference cache_type: BocCacheType - # # Cache type RESPONSE: ResultOfBocCacheSet boc_ref: String - # # Reference to the cached BOC.
-
#cache_unpin(payload, &block) ⇒ Object
INPUT: ParamsOfBocCacheUnpin pin: String - # # Pinned name boc_ref: String<Optional> - # # Reference to the cached BOC.
-
#decode_tvc(payload, &block) ⇒ Object
INPUT: ParamsOfDecodeTvc tvc: String - # # Contract TVC image BOC encoded as base64 or BOC handle boc_cache: BocCacheType<Optional> - # # Cache type to put the result.
-
#encode_boc(payload, &block) ⇒ Object
INPUT: ParamsOfEncodeBoc builder: Array - # # Cell builder operations.
-
#encode_external_in_message(payload, &block) ⇒ Object
INPUT: ParamsOfEncodeExternalInMessage src: String<Optional> - # # Source address.
-
#encode_tvc(payload, &block) ⇒ Object
INPUT: ParamsOfEncodeTvc code: String<Optional> - # # Contract code BOC encoded as base64 or BOC handle data: String<Optional> - # # Contract data BOC encoded as base64 or BOC handle library: String<Optional> - # # Contract library BOC encoded as base64 or BOC handle tick: Boolean<Optional> - # #
special.tickfield. -
#get_blockchain_config(payload, &block) ⇒ Object
INPUT: ParamsOfGetBlockchainConfig block_boc: String - # # Key block BOC or zerostate BOC encoded as base64 RESPONSE: ResultOfGetBlockchainConfig config_boc: String - # # Blockchain config BOC encoded as base64.
-
#get_boc_depth(payload, &block) ⇒ Object
INPUT: ParamsOfGetBocDepth boc: String - # # BOC encoded as base64 or BOC handle RESPONSE: ResultOfGetBocDepth depth: Number - # # BOC root cell depth.
-
#get_boc_hash(payload, &block) ⇒ Object
INPUT: ParamsOfGetBocHash boc: String - # # BOC encoded as base64 or BOC handle RESPONSE: ResultOfGetBocHash hash: String - # # BOC root hash encoded with hex.
-
#get_code_from_tvc(payload, &block) ⇒ Object
INPUT: ParamsOfGetCodeFromTvc tvc: String - # # Contract TVC image or image BOC handle RESPONSE: ResultOfGetCodeFromTvc code: String - # # Contract code encoded as base64.
-
#get_code_salt(payload, &block) ⇒ Object
INPUT: ParamsOfGetCodeSalt code: String - # # Contract code BOC encoded as base64 or code BOC handle boc_cache: BocCacheType<Optional> - # # Cache type to put the result.
-
#get_compiler_version(payload, &block) ⇒ Object
INPUT: ParamsOfGetCompilerVersion code: String - # # Contract code BOC encoded as base64 or code BOC handle RESPONSE: ResultOfGetCompilerVersion version: String<Optional> - # # Compiler version, for example ‘sol 0.49.0’.
-
#initialize(context: nil, request_id: nil, requests: nil) ⇒ Boc
constructor
A new instance of Boc.
-
#parse_account(payload, &block) ⇒ Object
INPUT: ParamsOfParse boc: String - # # BOC encoded as base64 RESPONSE: ResultOfParse parsed: Value - # # JSON containing parsed BOC.
-
#parse_block(payload, &block) ⇒ Object
INPUT: ParamsOfParse boc: String - # # BOC encoded as base64 RESPONSE: ResultOfParse parsed: Value - # # JSON containing parsed BOC.
-
#parse_message(payload, &block) ⇒ Object
INPUT: ParamsOfParse boc: String - # # BOC encoded as base64 RESPONSE: ResultOfParse parsed: Value - # # JSON containing parsed BOC.
-
#parse_shardstate(payload, &block) ⇒ Object
INPUT: ParamsOfParseShardstate boc: String - # # BOC encoded as base64 id: String - # # Shardstate identificator workchain_id: Number - # # Workchain shardstate belongs to RESPONSE: ResultOfParse parsed: Value - # # JSON containing parsed BOC.
-
#parse_transaction(payload, &block) ⇒ Object
INPUT: ParamsOfParse boc: String - # # BOC encoded as base64 RESPONSE: ResultOfParse parsed: Value - # # JSON containing parsed BOC.
-
#set_code_salt(payload, &block) ⇒ Object
INPUT: ParamsOfSetCodeSalt code: String - # # Contract code BOC encoded as base64 or code BOC handle salt: String - # # Code salt to set.
Methods included from CommonInstanceHelpers
#base64?, #encode_to_base64, #full_method_name
Constructor Details
#initialize(context: nil, request_id: nil, requests: nil) ⇒ Boc
9 10 11 12 13 |
# File 'lib/everscale-client-ruby/Client/Boc.rb', line 9 def initialize(context: nil, request_id: nil, requests: nil) @context = context @request_id = request_id @requests = requests end |
Instance Attribute Details
#context ⇒ Object (readonly)
Returns the value of attribute context.
6 7 8 |
# File 'lib/everscale-client-ruby/Client/Boc.rb', line 6 def context @context end |
#request_id ⇒ Object (readonly)
Returns the value of attribute request_id.
6 7 8 |
# File 'lib/everscale-client-ruby/Client/Boc.rb', line 6 def request_id @request_id end |
#requests ⇒ Object (readonly)
Returns the value of attribute requests.
6 7 8 |
# File 'lib/everscale-client-ruby/Client/Boc.rb', line 6 def requests @requests end |
Instance Method Details
#cache_get(payload, &block) ⇒ Object
INPUT: ParamsOfBocCacheGet boc_ref: String - # # Reference to the cached BOC RESPONSE: ResultOfBocCacheGet boc: String<Optional> - # # BOC encoded as base64.
93 94 95 |
# File 'lib/everscale-client-ruby/Client/Boc.rb', line 93 def cache_get(payload, &block) TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block) end |
#cache_set(payload, &block) ⇒ Object
INPUT: ParamsOfBocCacheSet boc: String - # # BOC encoded as base64 or BOC reference cache_type: BocCacheType - # # Cache type RESPONSE: ResultOfBocCacheSet boc_ref: String - # # Reference to the cached BOC
102 103 104 |
# File 'lib/everscale-client-ruby/Client/Boc.rb', line 102 def cache_set(payload, &block) TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block) end |
#cache_unpin(payload, &block) ⇒ Object
INPUT: ParamsOfBocCacheUnpin pin: String - # # Pinned name boc_ref: String<Optional> - # # Reference to the cached BOC. # # If it is provided then only referenced BOC is unpinned
109 110 111 |
# File 'lib/everscale-client-ruby/Client/Boc.rb', line 109 def cache_unpin(payload, &block) TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block) end |
#decode_tvc(payload, &block) ⇒ Object
INPUT: ParamsOfDecodeTvc tvc: String - # # Contract TVC image BOC encoded as base64 or BOC handle boc_cache: BocCacheType<Optional> - # # Cache type to put the result. The BOC itself returned if no cache type provided. RESPONSE: ResultOfDecodeTvc code: String<Optional> - # # Contract code BOC encoded as base64 or BOC handle code_hash: String<Optional> - # # Contract code hash code_depth: Number<Optional> - # # Contract code depth data: String<Optional> - # # Contract data BOC encoded as base64 or BOC handle data_hash: String<Optional> - # # Contract data hash data_depth: Number<Optional> - # # Contract data depth library: String<Optional> - # # Contract library BOC encoded as base64 or BOC handle tick: Boolean<Optional> - # # special.tick field. # # Specifies the contract ability to handle tick transactions tock: Boolean<Optional> - # # special.tock field. # # Specifies the contract ability to handle tock transactions split_depth: Number<Optional> - # # Is present and non-zero only in instances of large smart contracts compiler_version: String<Optional> - # # Compiler version, for example ‘sol 0.49.0’
156 157 158 |
# File 'lib/everscale-client-ruby/Client/Boc.rb', line 156 def decode_tvc(payload, &block) TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block) end |
#encode_boc(payload, &block) ⇒ Object
INPUT: ParamsOfEncodeBoc builder: Array - # # Cell builder operations. boc_cache: BocCacheType<Optional> - # # Cache type to put the result. The BOC itself returned if no cache type provided. RESPONSE: ResultOfEncodeBoc boc: String - # # Encoded cell BOC or BOC cache key.
118 119 120 |
# File 'lib/everscale-client-ruby/Client/Boc.rb', line 118 def encode_boc(payload, &block) TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block) end |
#encode_external_in_message(payload, &block) ⇒ Object
INPUT: ParamsOfEncodeExternalInMessage src: String<Optional> - # # Source address. dst: String - # # Destination address. init: String<Optional> - # # Bag of cells with state init (used in deploy messages). body: String<Optional> - # # Bag of cells with the message body encoded as base64. boc_cache: BocCacheType<Optional> - # # Cache type to put the result. # # The BOC itself returned if no cache type provided RESPONSE: ResultOfEncodeExternalInMessage message: String - # # Message BOC encoded with base64. message_id: String - # # Message id.
183 184 185 |
# File 'lib/everscale-client-ruby/Client/Boc.rb', line 183 def (payload, &block) TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block) end |
#encode_tvc(payload, &block) ⇒ Object
INPUT: ParamsOfEncodeTvc code: String<Optional> - # # Contract code BOC encoded as base64 or BOC handle data: String<Optional> - # # Contract data BOC encoded as base64 or BOC handle library: String<Optional> - # # Contract library BOC encoded as base64 or BOC handle tick: Boolean<Optional> - # # special.tick field. # # Specifies the contract ability to handle tick transactions tock: Boolean<Optional> - # # special.tock field. # # Specifies the contract ability to handle tock transactions split_depth: Number<Optional> - # # Is present and non-zero only in instances of large smart contracts boc_cache: BocCacheType<Optional> - # # Cache type to put the result. The BOC itself returned if no cache type provided. RESPONSE: ResultOfEncodeTvc tvc: String - # # Contract TVC image BOC encoded as base64 or BOC handle of boc_cache parameter was specified
170 171 172 |
# File 'lib/everscale-client-ruby/Client/Boc.rb', line 170 def encode_tvc(payload, &block) TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block) end |
#get_blockchain_config(payload, &block) ⇒ Object
INPUT: ParamsOfGetBlockchainConfig block_boc: String - # # Key block BOC or zerostate BOC encoded as base64 RESPONSE: ResultOfGetBlockchainConfig config_boc: String - # # Blockchain config BOC encoded as base64
61 62 63 |
# File 'lib/everscale-client-ruby/Client/Boc.rb', line 61 def get_blockchain_config(payload, &block) TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block) end |
#get_boc_depth(payload, &block) ⇒ Object
INPUT: ParamsOfGetBocDepth boc: String - # # BOC encoded as base64 or BOC handle RESPONSE: ResultOfGetBocDepth depth: Number - # # BOC root cell depth
77 78 79 |
# File 'lib/everscale-client-ruby/Client/Boc.rb', line 77 def get_boc_depth(payload, &block) TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block) end |
#get_boc_hash(payload, &block) ⇒ Object
INPUT: ParamsOfGetBocHash boc: String - # # BOC encoded as base64 or BOC handle RESPONSE: ResultOfGetBocHash hash: String - # # BOC root hash encoded with hex
69 70 71 |
# File 'lib/everscale-client-ruby/Client/Boc.rb', line 69 def get_boc_hash(payload, &block) TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block) end |
#get_code_from_tvc(payload, &block) ⇒ Object
INPUT: ParamsOfGetCodeFromTvc tvc: String - # # Contract TVC image or image BOC handle RESPONSE: ResultOfGetCodeFromTvc code: String - # # Contract code encoded as base64
85 86 87 |
# File 'lib/everscale-client-ruby/Client/Boc.rb', line 85 def get_code_from_tvc(payload, &block) TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block) end |
#get_code_salt(payload, &block) ⇒ Object
INPUT: ParamsOfGetCodeSalt code: String - # # Contract code BOC encoded as base64 or code BOC handle boc_cache: BocCacheType<Optional> - # # Cache type to put the result. The BOC itself returned if no cache type provided. RESPONSE: ResultOfGetCodeSalt salt: String<Optional> - # # Contract code salt if present. # # BOC encoded as base64 or BOC handle
127 128 129 |
# File 'lib/everscale-client-ruby/Client/Boc.rb', line 127 def get_code_salt(payload, &block) TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block) end |
#get_compiler_version(payload, &block) ⇒ Object
INPUT: ParamsOfGetCompilerVersion code: String - # # Contract code BOC encoded as base64 or code BOC handle RESPONSE: ResultOfGetCompilerVersion version: String<Optional> - # # Compiler version, for example ‘sol 0.49.0’
191 192 193 |
# File 'lib/everscale-client-ruby/Client/Boc.rb', line 191 def get_compiler_version(payload, &block) TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block) end |
#parse_account(payload, &block) ⇒ Object
INPUT: ParamsOfParse boc: String - # # BOC encoded as base64 RESPONSE: ResultOfParse parsed: Value - # # JSON containing parsed BOC
35 36 37 |
# File 'lib/everscale-client-ruby/Client/Boc.rb', line 35 def parse_account(payload, &block) TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block) end |
#parse_block(payload, &block) ⇒ Object
INPUT: ParamsOfParse boc: String - # # BOC encoded as base64 RESPONSE: ResultOfParse parsed: Value - # # JSON containing parsed BOC
43 44 45 |
# File 'lib/everscale-client-ruby/Client/Boc.rb', line 43 def parse_block(payload, &block) TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block) end |
#parse_message(payload, &block) ⇒ Object
INPUT: ParamsOfParse boc: String - # # BOC encoded as base64 RESPONSE: ResultOfParse parsed: Value - # # JSON containing parsed BOC
19 20 21 |
# File 'lib/everscale-client-ruby/Client/Boc.rb', line 19 def (payload, &block) TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block) end |
#parse_shardstate(payload, &block) ⇒ Object
INPUT: ParamsOfParseShardstate boc: String - # # BOC encoded as base64 id: String - # # Shardstate identificator workchain_id: Number - # # Workchain shardstate belongs to RESPONSE: ResultOfParse parsed: Value - # # JSON containing parsed BOC
53 54 55 |
# File 'lib/everscale-client-ruby/Client/Boc.rb', line 53 def parse_shardstate(payload, &block) TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block) end |
#parse_transaction(payload, &block) ⇒ Object
INPUT: ParamsOfParse boc: String - # # BOC encoded as base64 RESPONSE: ResultOfParse parsed: Value - # # JSON containing parsed BOC
27 28 29 |
# File 'lib/everscale-client-ruby/Client/Boc.rb', line 27 def parse_transaction(payload, &block) TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block) end |
#set_code_salt(payload, &block) ⇒ Object
INPUT: ParamsOfSetCodeSalt code: String - # # Contract code BOC encoded as base64 or code BOC handle salt: String - # # Code salt to set. # # BOC encoded as base64 or BOC handle boc_cache: BocCacheType<Optional> - # # Cache type to put the result. The BOC itself returned if no cache type provided. RESPONSE: ResultOfSetCodeSalt code: String - # # Contract code with salt set. # # BOC encoded as base64 or BOC handle
137 138 139 |
# File 'lib/everscale-client-ruby/Client/Boc.rb', line 137 def set_code_salt(payload, &block) TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block) end |