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.
-
#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
- # # 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
- # # 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
- # # 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
- # # Source address. -
#encode_tvc(payload, &block) ⇒ Object
INPUT: ParamsOfEncodeTvc code: String
- # # Contract code BOC encoded as base64 or BOC handle data: String - # # Contract data BOC encoded as base64 or BOC handle library: String - # # Contract library BOC encoded as base64 or BOC handle tick: Boolean - # # 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
- # # 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
- # # 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/everscale-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/everscale-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/everscale-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
92 93 94 |
# File 'lib/everscale-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/everscale-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
108 109 110 |
# File 'lib/everscale-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: BocCacheTypespecial.tick field. # # Specifies the contract ability to handle tick transactions
tock: Booleanspecial.tock field. # # Specifies the contract ability to handle tock transactions
split_depth: Number
155 156 157 |
# File 'lib/everscale-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
117 118 119 |
# File 'lib/everscale-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_external_in_message(payload, &block) ⇒ Object
INPUT: ParamsOfEncodeExternalInMessage
src: Stringbase64.
message_id: String - # # Message id.
182 183 184 |
# File 'lib/everscale-client-ruby/Client/Boc.rb', line 182 def (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: Stringspecial.tick field. # # Specifies the contract ability to handle tick transactions
tock: Booleanspecial.tock field. # # Specifies the contract ability to handle tock transactions
split_depth: Number
169 170 171 |
# File 'lib/everscale-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/everscale-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/everscale-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/everscale-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/everscale-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
126 127 128 |
# File 'lib/everscale-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
190 191 192 |
# File 'lib/everscale-client-ruby/Client/Boc.rb', line 190 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/everscale-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/everscale-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/everscale-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/everscale-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/everscale-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
136 137 138 |
# File 'lib/everscale-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 |