Class: TonClient::Boc
- Includes:
- CommonInstanceHelpers
- Defined in:
- lib/ton-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.
-
#core ⇒ Object
readonly
Returns the value of attribute core.
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_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.
-
#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: Context.new, core: TonClient::TonBinding) ⇒ 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: Context.new, core: TonClient::TonBinding) ⇒ Boc
Returns a new instance of Boc.
9 10 11 12 |
# File 'lib/ton-client-ruby/Client/Boc.rb', line 9 def initialize(context: Context.new, core: TonClient::TonBinding) @context = context @core = core end |
Instance Attribute Details
#context ⇒ Object (readonly)
Returns the value of attribute context.
6 7 8 |
# File 'lib/ton-client-ruby/Client/Boc.rb', line 6 def context @context end |
#core ⇒ Object (readonly)
Returns the value of attribute core.
6 7 8 |
# File 'lib/ton-client-ruby/Client/Boc.rb', line 6 def core @core 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.
92 93 94 |
# File 'lib/ton-client-ruby/Client/Boc.rb', line 92 def cache_get(payload, &block) core.requestLibrary(context: context.id, 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
101 102 103 |
# File 'lib/ton-client-ruby/Client/Boc.rb', line 101 def cache_set(payload, &block) core.requestLibrary(context: context.id, 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
108 109 110 |
# File 'lib/ton-client-ruby/Client/Boc.rb', line 108 def cache_unpin(payload, &block) core.requestLibrary(context: context.id, 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’
155 156 157 |
# File 'lib/ton-client-ruby/Client/Boc.rb', line 155 def decode_tvc(payload, &block) core.requestLibrary(context: context.id, 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.
117 118 119 |
# File 'lib/ton-client-ruby/Client/Boc.rb', line 117 def encode_boc(payload, &block) core.requestLibrary(context: context.id, 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
169 170 171 |
# File 'lib/ton-client-ruby/Client/Boc.rb', line 169 def encode_tvc(payload, &block) core.requestLibrary(context: context.id, 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
60 61 62 |
# File 'lib/ton-client-ruby/Client/Boc.rb', line 60 def get_blockchain_config(payload, &block) core.requestLibrary(context: context.id, 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
76 77 78 |
# File 'lib/ton-client-ruby/Client/Boc.rb', line 76 def get_boc_depth(payload, &block) core.requestLibrary(context: context.id, 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
68 69 70 |
# File 'lib/ton-client-ruby/Client/Boc.rb', line 68 def get_boc_hash(payload, &block) core.requestLibrary(context: context.id, 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
84 85 86 |
# File 'lib/ton-client-ruby/Client/Boc.rb', line 84 def get_code_from_tvc(payload, &block) core.requestLibrary(context: context.id, 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
126 127 128 |
# File 'lib/ton-client-ruby/Client/Boc.rb', line 126 def get_code_salt(payload, &block) core.requestLibrary(context: context.id, 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’
177 178 179 |
# File 'lib/ton-client-ruby/Client/Boc.rb', line 177 def get_compiler_version(payload, &block) core.requestLibrary(context: context.id, 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
34 35 36 |
# File 'lib/ton-client-ruby/Client/Boc.rb', line 34 def parse_account(payload, &block) core.requestLibrary(context: context.id, 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
42 43 44 |
# File 'lib/ton-client-ruby/Client/Boc.rb', line 42 def parse_block(payload, &block) core.requestLibrary(context: context.id, 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
18 19 20 |
# File 'lib/ton-client-ruby/Client/Boc.rb', line 18 def (payload, &block) core.requestLibrary(context: context.id, 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
52 53 54 |
# File 'lib/ton-client-ruby/Client/Boc.rb', line 52 def parse_shardstate(payload, &block) core.requestLibrary(context: context.id, 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
26 27 28 |
# File 'lib/ton-client-ruby/Client/Boc.rb', line 26 def parse_transaction(payload, &block) core.requestLibrary(context: context.id, 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
136 137 138 |
# File 'lib/ton-client-ruby/Client/Boc.rb', line 136 def set_code_salt(payload, &block) core.requestLibrary(context: context.id, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block) end |