java.lang.Object
tech.deplant.java4ever.binding.Boc
boc
Contains methods of "boc" module.
BOC manipulation module.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
static interface
static final record
static final record
static final record
static final record
static final record
static final record
static final record
static final record
static final record
static final record
static final record
static final record
static final record
static final record
static final record
static final record
static final record
static final record
static final record
static final record
static final record
static final record
static final record
static final record
static final record
static final record
static final record
static final record
static final record
static final record
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Boc.ResultOfBocCacheGet
boc.cache_get Get BOC from cachestatic Boc.ResultOfBocCacheSet
cacheSet
(Context ctx, String boc, Boc.BocCacheType cacheType) boc.cache_set Save BOC into cachestatic void
cacheUnpin
(Context ctx, String pin, String bocRef) boc.cache_unpin Unpin BOCs with specified pin.static Boc.ResultOfDecodeTvc
decodeTvc
(Context ctx, String tvc, Boc.BocCacheType bocCache) boc.decode_tvc Decodes tvc into code, data, libraries and special options.static Boc.ResultOfEncodeBoc
encodeBoc
(Context ctx, Boc.BuilderOp[] builder, Boc.BocCacheType bocCache) boc.encode_boc Encodes bag of cells (BOC) with builder operations.encodeExternalInMessage
(Context ctx, String src, String dst, String init, String body, Boc.BocCacheType bocCache) boc.encode_external_in_message Encodes a message Allows to encode any external inbound message.static Boc.ResultOfEncodeTvc
encodeTvc
(Context ctx, String code, String data, String library, Boolean tick, Boolean tock, Number splitDepth, Boc.BocCacheType bocCache) boc.encode_tvc Encodes tvc from code, data, libraries ans special options (see input params)getBlockchainConfig
(Context ctx, String blockBoc) boc.get_blockchain_config Extract blockchain configuration from key block and also from zerostate.static Boc.ResultOfGetBocDepth
getBocDepth
(Context ctx, String boc) boc.get_boc_depth Calculates BOC depthstatic Boc.ResultOfGetBocHash
getBocHash
(Context ctx, String boc) boc.get_boc_hash Calculates BOC root hashstatic Boc.ResultOfGetCodeFromTvc
getCodeFromTvc
(Context ctx, String tvc) boc.get_code_from_tvc Extracts code from TVC contract imagestatic Boc.ResultOfGetCodeSalt
getCodeSalt
(Context ctx, String code, Boc.BocCacheType bocCache) boc.get_code_salt Returns the contract code's salt if it is present.getCompilerVersion
(Context ctx, String code) boc.get_compiler_version Returns the compiler version used to compile the code.static Boc.ResultOfParse
parseAccount
(Context ctx, String boc) boc.parse_account Parses account boc into a JSON JSON structure is compatible with GraphQL API account objectstatic Boc.ResultOfParse
parseBlock
(Context ctx, String boc) boc.parse_block Parses block boc into a JSON JSON structure is compatible with GraphQL API block objectstatic Boc.ResultOfParse
parseMessage
(Context ctx, String boc) boc.parse_message Parses message boc into a JSON JSON structure is compatible with GraphQL API message objectstatic Boc.ResultOfParse
parseShardstate
(Context ctx, String boc, String id, Number workchainId) boc.parse_shardstate Parses shardstate boc into a JSON JSON structure is compatible with GraphQL API shardstate objectstatic Boc.ResultOfParse
parseTransaction
(Context ctx, String boc) /** boc.parse_transaction Parses transaction boc into a JSON JSON structure is compatible with GraphQL API transaction objectstatic Boc.ResultOfSetCodeSalt
setCodeSalt
(Context ctx, String code, String salt, Boc.BocCacheType bocCache) boc.set_code_salt Sets new salt to contract code.
-
Constructor Details
-
Boc
public Boc()
-
-
Method Details
-
parseMessage
boc.parse_message Parses message boc into a JSON JSON structure is compatible with GraphQL API message object- Parameters:
boc
- BOC encoded as base64- Returns:
Boc.ResultOfParse
- Throws:
EverSdkException
-
parseTransaction
/** boc.parse_transaction Parses transaction boc into a JSON JSON structure is compatible with GraphQL API transaction object- Parameters:
boc
- BOC encoded as base64- Returns:
Boc.ResultOfParse
- Throws:
EverSdkException
-
parseAccount
boc.parse_account Parses account boc into a JSON JSON structure is compatible with GraphQL API account object- Parameters:
boc
- BOC encoded as base64- Returns:
Boc.ResultOfParse
- Throws:
EverSdkException
-
parseBlock
boc.parse_block Parses block boc into a JSON JSON structure is compatible with GraphQL API block object- Parameters:
boc
- BOC encoded as base64- Returns:
Boc.ResultOfParse
- Throws:
EverSdkException
-
parseShardstate
public static Boc.ResultOfParse parseShardstate(Context ctx, String boc, String id, Number workchainId) throws EverSdkException boc.parse_shardstate Parses shardstate boc into a JSON JSON structure is compatible with GraphQL API shardstate object- Parameters:
boc
- BOC encoded as base64id
- Shardstate identificatorworkchainId
- Workchain shardstate belongs to- Returns:
Boc.ResultOfParse
- Throws:
EverSdkException
-
getBlockchainConfig
public static Boc.ResultOfGetBlockchainConfig getBlockchainConfig(Context ctx, String blockBoc) throws EverSdkException boc.get_blockchain_config Extract blockchain configuration from key block and also from zerostate.- Parameters:
blockBoc
- Key block BOC or zerostate BOC encoded as base64- Returns:
Boc.ResultOfGetBlockchainConfig
- Throws:
EverSdkException
-
getBocHash
boc.get_boc_hash Calculates BOC root hash- Parameters:
boc
- BOC encoded as base64 or BOC handle- Returns:
Boc.ResultOfGetBocHash
- Throws:
EverSdkException
-
getBocDepth
boc.get_boc_depth Calculates BOC depth- Parameters:
boc
- BOC encoded as base64 or BOC handle- Returns:
Boc.ResultOfGetBocDepth
- Throws:
EverSdkException
-
getCodeFromTvc
public static Boc.ResultOfGetCodeFromTvc getCodeFromTvc(Context ctx, String tvc) throws EverSdkException boc.get_code_from_tvc Extracts code from TVC contract image- Parameters:
tvc
- Contract TVC image or image BOC handle- Returns:
Boc.ResultOfGetCodeFromTvc
- Throws:
EverSdkException
-
cacheGet
boc.cache_get Get BOC from cache- Parameters:
bocRef
- Reference to the cached BOC- Returns:
Boc.ResultOfBocCacheGet
- Throws:
EverSdkException
-
cacheSet
public static Boc.ResultOfBocCacheSet cacheSet(Context ctx, String boc, Boc.BocCacheType cacheType) throws EverSdkException boc.cache_set Save BOC into cache- Parameters:
boc
- BOC encoded as base64 or BOC referencecacheType
- Cache type- Returns:
Boc.ResultOfBocCacheSet
- Throws:
EverSdkException
-
cacheUnpin
boc.cache_unpin Unpin BOCs with specified pin. BOCs which don't have another pins will be removed from cache- Parameters:
pin
- Pinned namebocRef
- Reference to the cached BOC. If it is provided then only referenced BOC is unpinned- Throws:
EverSdkException
-
encodeBoc
public static Boc.ResultOfEncodeBoc encodeBoc(Context ctx, Boc.BuilderOp[] builder, Boc.BocCacheType bocCache) throws EverSdkException boc.encode_boc Encodes bag of cells (BOC) with builder operations. This method provides the same functionality as Solidity TvmBuilder. Resulting BOC of this method can be passed into Solidity and C++ contracts as TvmCell type.- Parameters:
builder
- Cell builder operations.bocCache
- Cache type to put the result. The BOC itself returned if no cache type provided.- Returns:
Boc.ResultOfEncodeBoc
- Throws:
EverSdkException
-
getCodeSalt
public static Boc.ResultOfGetCodeSalt getCodeSalt(Context ctx, String code, Boc.BocCacheType bocCache) throws EverSdkException boc.get_code_salt Returns the contract code's salt if it is present.- Parameters:
code
- Contract code BOC encoded as base64 or code BOC handlebocCache
- Cache type to put the result. The BOC itself returned if no cache type provided.- Returns:
Boc.ResultOfGetCodeSalt
- Throws:
EverSdkException
-
setCodeSalt
public static Boc.ResultOfSetCodeSalt setCodeSalt(Context ctx, String code, String salt, Boc.BocCacheType bocCache) throws EverSdkException boc.set_code_salt Sets new salt to contract code. Returns the new contract code with salt.- Parameters:
code
- Contract code BOC encoded as base64 or code BOC handlesalt
- Code salt to set. BOC encoded as base64 or BOC handlebocCache
- Cache type to put the result. The BOC itself returned if no cache type provided.- Returns:
Boc.ResultOfSetCodeSalt
- Throws:
EverSdkException
-
decodeTvc
public static Boc.ResultOfDecodeTvc decodeTvc(Context ctx, String tvc, Boc.BocCacheType bocCache) throws EverSdkException boc.decode_tvc Decodes tvc into code, data, libraries and special options.- Parameters:
tvc
- Contract TVC image BOC encoded as base64 or BOC handlebocCache
- Cache type to put the result. The BOC itself returned if no cache type provided.- Returns:
Boc.ResultOfDecodeTvc
- Throws:
EverSdkException
-
encodeTvc
public static Boc.ResultOfEncodeTvc encodeTvc(Context ctx, String code, String data, String library, Boolean tick, Boolean tock, Number splitDepth, Boc.BocCacheType bocCache) throws EverSdkException boc.encode_tvc Encodes tvc from code, data, libraries ans special options (see input params)- Parameters:
code
- Contract code BOC encoded as base64 or BOC handledata
- Contract data BOC encoded as base64 or BOC handlelibrary
- Contract library BOC encoded as base64 or BOC handletick
- `special.tick` field. Specifies the contract ability to handle tick transactionstock
- `special.tock` field. Specifies the contract ability to handle tock transactionssplitDepth
- Is present and non-zero only in instances of large smart contractsbocCache
- Cache type to put the result. The BOC itself returned if no cache type provided.- Returns:
Boc.ResultOfEncodeTvc
- Throws:
EverSdkException
-
encodeExternalInMessage
public static Boc.ResultOfEncodeExternalInMessage encodeExternalInMessage(Context ctx, String src, String dst, String init, String body, Boc.BocCacheType bocCache) throws EverSdkException boc.encode_external_in_message Encodes a message Allows to encode any external inbound message.- Parameters:
src
- Source address.dst
- Destination address.init
- Bag of cells with state init (used in deploy messages).body
- Bag of cells with the message body encoded as base64.bocCache
- Cache type to put the result. The BOC itself returned if no cache type provided- Returns:
Boc.ResultOfEncodeExternalInMessage
- Throws:
EverSdkException
-
getCompilerVersion
public static Boc.ResultOfGetCompilerVersion getCompilerVersion(Context ctx, String code) throws EverSdkException boc.get_compiler_version Returns the compiler version used to compile the code.- Parameters:
code
- Contract code BOC encoded as base64 or code BOC handle- Returns:
Boc.ResultOfGetCompilerVersion
- Throws:
EverSdkException
-