Documentation ¶
Overview ¶
Package provides wrapper to EVER-SDK dll that must be compiled separately.
For methods available see Client interface.
Example usage ¶
import "github.com/radianceteam/everscale-client-go/Client" func main() { client, err := client.NewClient(client.Config{ Network: &client.NetworkConfig{ServerAddress: null.NewString("net.ton.dev", true)}, }, client.WrapperConfig{MaxCGOConcurrentThreads: 10}) if err != nil { return err } defer c.Close() version, err := c.ClientVersion() }
Index ¶
- Constants
- Variables
- func NewDynamicallyBufferedResponses(in <-chan *RawResponse) <-chan *RawResponse
- type Abi
- type AbiConfig
- type AbiContract
- type AbiData
- type AbiEvent
- type AbiFunction
- type AbiHandle
- type AbiParam
- type AbiType
- type AccountAccountForExecutor
- type AccountAddressType
- type AccountForExecutor
- type AccountIDAddressStringFormat
- type AddressBuilderOp
- type AddressStringFormat
- type AesEncryptionAlgorithm
- type AesInfo
- type AesParamsEB
- type AggregationFn
- type AppDebotBrowser
- type AppEncryptionBox
- type AppPasswordProvider
- type AppRequestResult
- type AppSigningBox
- type ApproveParamsOfAppDebotBrowser
- type ApproveResultOfAppDebotBrowser
- type Base64AddressStringFormat
- type BindingConfig
- type BitStringBuilderOp
- type BocCacheType
- type BocConfig
- type BocMonitoredMessage
- type BoxEncryptionAlgorithm
- type BuildInfoDependency
- type BuilderOp
- type CallSet
- type CellBocBuilderOp
- type CellBuilderOp
- type ChaCha20BoxEncryptionAlgorithm
- type ChaCha20EncryptionAlgorithm
- type ChaCha20ParamsCB
- type ChaCha20ParamsEB
- type CipherMode
- type Client
- func (c *Client) AbiAttachSignature(p *ParamsOfAttachSignature) (*ResultOfAttachSignature, error)
- func (c *Client) AbiAttachSignatureToMessageBody(p *ParamsOfAttachSignatureToMessageBody) (*ResultOfAttachSignatureToMessageBody, error)
- func (c *Client) AbiCalcFunctionId(p *ParamsOfCalcFunctionId) (*ResultOfCalcFunctionId, error)
- func (c *Client) AbiDecodeAccountData(p *ParamsOfDecodeAccountData) (*ResultOfDecodeAccountData, error)
- func (c *Client) AbiDecodeBoc(p *ParamsOfDecodeBoc) (*ResultOfDecodeBoc, error)
- func (c *Client) AbiDecodeInitialData(p *ParamsOfDecodeInitialData) (*ResultOfDecodeInitialData, error)
- func (c *Client) AbiDecodeMessage(p *ParamsOfDecodeMessage) (*DecodedMessageBody, error)
- func (c *Client) AbiDecodeMessageBody(p *ParamsOfDecodeMessageBody) (*DecodedMessageBody, error)
- func (c *Client) AbiEncodeAccount(p *ParamsOfEncodeAccount) (*ResultOfEncodeAccount, error)
- func (c *Client) AbiEncodeBoc(p *ParamsOfAbiEncodeBoc) (*ResultOfAbiEncodeBoc, error)
- func (c *Client) AbiEncodeInitialData(p *ParamsOfEncodeInitialData) (*ResultOfEncodeInitialData, error)
- func (c *Client) AbiEncodeInternalMessage(p *ParamsOfEncodeInternalMessage) (*ResultOfEncodeInternalMessage, error)
- func (c *Client) AbiEncodeMessage(p *ParamsOfEncodeMessage) (*ResultOfEncodeMessage, error)
- func (c *Client) AbiEncodeMessageBody(p *ParamsOfEncodeMessageBody) (*ResultOfEncodeMessageBody, error)
- func (c *Client) AbiGetSignatureData(p *ParamsOfGetSignatureData) (*ResultOfGetSignatureData, error)
- func (c *Client) AbiUpdateInitialData(p *ParamsOfUpdateInitialData) (*ResultOfUpdateInitialData, error)
- func (c *Client) BocCacheGet(p *ParamsOfBocCacheGet) (*ResultOfBocCacheGet, error)
- func (c *Client) BocCacheSet(p *ParamsOfBocCacheSet) (*ResultOfBocCacheSet, error)
- func (c *Client) BocCacheUnpin(p *ParamsOfBocCacheUnpin) error
- func (c *Client) BocDecodeStateInit(p *ParamsOfDecodeStateInit) (*ResultOfDecodeStateInit, error)
- func (c *Client) BocDecodeTvc(p *ParamsOfDecodeTvc) (*ResultOfDecodeTvc, error)
- func (c *Client) BocEncodeBoc(p *ParamsOfEncodeBoc) (*ResultOfEncodeBoc, error)
- func (c *Client) BocEncodeExternalInMessage(p *ParamsOfEncodeExternalInMessage) (*ResultOfEncodeExternalInMessage, error)
- func (c *Client) BocEncodeStateInit(p *ParamsOfEncodeStateInit) (*ResultOfEncodeStateInit, error)
- func (c *Client) BocGetBlockchainConfig(p *ParamsOfGetBlockchainConfig) (*ResultOfGetBlockchainConfig, error)
- func (c *Client) BocGetBocDepth(p *ParamsOfGetBocDepth) (*ResultOfGetBocDepth, error)
- func (c *Client) BocGetBocHash(p *ParamsOfGetBocHash) (*ResultOfGetBocHash, error)
- func (c *Client) BocGetCodeFromTvc(p *ParamsOfGetCodeFromTvc) (*ResultOfGetCodeFromTvc, error)
- func (c *Client) BocGetCodeSalt(p *ParamsOfGetCodeSalt) (*ResultOfGetCodeSalt, error)
- func (c *Client) BocGetCompilerVersion(p *ParamsOfGetCompilerVersion) (*ResultOfGetCompilerVersion, error)
- func (c *Client) BocParseAccount(p *ParamsOfParse) (*ResultOfParse, error)
- func (c *Client) BocParseBlock(p *ParamsOfParse) (*ResultOfParse, error)
- func (c *Client) BocParseMessage(p *ParamsOfParse) (*ResultOfParse, error)
- func (c *Client) BocParseShardstate(p *ParamsOfParseShardstate) (*ResultOfParse, error)
- func (c *Client) BocParseTransaction(p *ParamsOfParse) (*ResultOfParse, error)
- func (c *Client) BocSetCodeSalt(p *ParamsOfSetCodeSalt) (*ResultOfSetCodeSalt, error)
- func (c *Client) ClientBuildInfo() (*ResultOfBuildInfo, error)
- func (c *Client) ClientConfig() (*Config, error)
- func (c *Client) ClientGetAPIReference() (*spec.APIReference, error)
- func (c *Client) ClientResolveAppRequest(p *ParamsOfResolveAppRequest) error
- func (c *Client) ClientVersion() (*ResultOfVersion, error)
- func (c *Client) Close()
- func (c *Client) CryptoChacha20(p *ParamsOfChaCha20) (*ResultOfChaCha20, error)
- func (c *Client) CryptoClearCryptoBoxSecretCache(p *RegisteredCryptoBox) error
- func (c *Client) CryptoConvertPublicKeyToTonSafeFormat(p *ParamsOfConvertPublicKeyToTonSafeFormat) (*ResultOfConvertPublicKeyToTonSafeFormat, error)
- func (c *Client) CryptoCreateCryptoBox(p *ParamsOfCreateCryptoBox, app AppPasswordProvider) (*RegisteredCryptoBox, error)
- func (c *Client) CryptoCreateEncryptionBox(p *ParamsOfCreateEncryptionBox) (*RegisteredEncryptionBox, error)
- func (c *Client) CryptoEncryptionBoxDecrypt(p *ParamsOfEncryptionBoxDecrypt) (*ResultOfEncryptionBoxDecrypt, error)
- func (c *Client) CryptoEncryptionBoxEncrypt(p *ParamsOfEncryptionBoxEncrypt) (*ResultOfEncryptionBoxEncrypt, error)
- func (c *Client) CryptoEncryptionBoxGetInfo(p *ParamsOfEncryptionBoxGetInfo) (*ResultOfEncryptionBoxGetInfo, error)
- func (c *Client) CryptoFactorize(p *ParamsOfFactorize) (*ResultOfFactorize, error)
- func (c *Client) CryptoGenerateRandomBytes(p *ParamsOfGenerateRandomBytes) (*ResultOfGenerateRandomBytes, error)
- func (c *Client) CryptoGenerateRandomSignKeys() (*KeyPair, error)
- func (c *Client) CryptoGetCryptoBoxInfo(p *RegisteredCryptoBox) (*ResultOfGetCryptoBoxInfo, error)
- func (c *Client) CryptoGetCryptoBoxSeedPhrase(p *RegisteredCryptoBox) (*ResultOfGetCryptoBoxSeedPhrase, error)
- func (c *Client) CryptoGetEncryptionBoxFromCryptoBox(p *ParamsOfGetEncryptionBoxFromCryptoBox) (*RegisteredEncryptionBox, error)
- func (c *Client) CryptoGetSigningBox(p *KeyPair) (*RegisteredSigningBox, error)
- func (c *Client) CryptoGetSigningBoxFromCryptoBox(p *ParamsOfGetSigningBoxFromCryptoBox) (*RegisteredSigningBox, error)
- func (c *Client) CryptoHdkeyDeriveFromXprv(p *ParamsOfHDKeyDeriveFromXPrv) (*ResultOfHDKeyDeriveFromXPrv, error)
- func (c *Client) CryptoHdkeyDeriveFromXprvPath(p *ParamsOfHDKeyDeriveFromXPrvPath) (*ResultOfHDKeyDeriveFromXPrvPath, error)
- func (c *Client) CryptoHdkeyPublicFromXprv(p *ParamsOfHDKeyPublicFromXPrv) (*ResultOfHDKeyPublicFromXPrv, error)
- func (c *Client) CryptoHdkeySecretFromXprv(p *ParamsOfHDKeySecretFromXPrv) (*ResultOfHDKeySecretFromXPrv, error)
- func (c *Client) CryptoHdkeyXprvFromMnemonic(p *ParamsOfHDKeyXPrvFromMnemonic) (*ResultOfHDKeyXPrvFromMnemonic, error)
- func (c *Client) CryptoMnemonicDeriveSignKeys(p *ParamsOfMnemonicDeriveSignKeys) (*KeyPair, error)
- func (c *Client) CryptoMnemonicFromEntropy(p *ParamsOfMnemonicFromEntropy) (*ResultOfMnemonicFromEntropy, error)
- func (c *Client) CryptoMnemonicFromRandom(p *ParamsOfMnemonicFromRandom) (*ResultOfMnemonicFromRandom, error)
- func (c *Client) CryptoMnemonicVerify(p *ParamsOfMnemonicVerify) (*ResultOfMnemonicVerify, error)
- func (c *Client) CryptoMnemonicWords(p *ParamsOfMnemonicWords) (*ResultOfMnemonicWords, error)
- func (c *Client) CryptoModularPower(p *ParamsOfModularPower) (*ResultOfModularPower, error)
- func (c *Client) CryptoNaclBox(p *ParamsOfNaclBox) (*ResultOfNaclBox, error)
- func (c *Client) CryptoNaclBoxKeypair() (*KeyPair, error)
- func (c *Client) CryptoNaclBoxKeypairFromSecretKey(p *ParamsOfNaclBoxKeyPairFromSecret) (*KeyPair, error)
- func (c *Client) CryptoNaclBoxOpen(p *ParamsOfNaclBoxOpen) (*ResultOfNaclBoxOpen, error)
- func (c *Client) CryptoNaclSecretBox(p *ParamsOfNaclSecretBox) (*ResultOfNaclBox, error)
- func (c *Client) CryptoNaclSecretBoxOpen(p *ParamsOfNaclSecretBoxOpen) (*ResultOfNaclBoxOpen, error)
- func (c *Client) CryptoNaclSign(p *ParamsOfNaclSign) (*ResultOfNaclSign, error)
- func (c *Client) CryptoNaclSignDetached(p *ParamsOfNaclSign) (*ResultOfNaclSignDetached, error)
- func (c *Client) CryptoNaclSignDetachedVerify(p *ParamsOfNaclSignDetachedVerify) (*ResultOfNaclSignDetachedVerify, error)
- func (c *Client) CryptoNaclSignKeypairFromSecretKey(p *ParamsOfNaclSignKeyPairFromSecret) (*KeyPair, error)
- func (c *Client) CryptoNaclSignOpen(p *ParamsOfNaclSignOpen) (*ResultOfNaclSignOpen, error)
- func (c *Client) CryptoRegisterEncryptionBox(app AppEncryptionBox) (*RegisteredEncryptionBox, error)
- func (c *Client) CryptoRegisterSigningBox(app AppSigningBox) (*RegisteredSigningBox, error)
- func (c *Client) CryptoRemoveCryptoBox(p *RegisteredCryptoBox) error
- func (c *Client) CryptoRemoveEncryptionBox(p *RegisteredEncryptionBox) error
- func (c *Client) CryptoRemoveSigningBox(p *RegisteredSigningBox) error
- func (c *Client) CryptoScrypt(p *ParamsOfScrypt) (*ResultOfScrypt, error)
- func (c *Client) CryptoSha256(p *ParamsOfHash) (*ResultOfHash, error)
- func (c *Client) CryptoSha512(p *ParamsOfHash) (*ResultOfHash, error)
- func (c *Client) CryptoSign(p *ParamsOfSign) (*ResultOfSign, error)
- func (c *Client) CryptoSigningBoxGetPublicKey(p *RegisteredSigningBox) (*ResultOfSigningBoxGetPublicKey, error)
- func (c *Client) CryptoSigningBoxSign(p *ParamsOfSigningBoxSign) (*ResultOfSigningBoxSign, error)
- func (c *Client) CryptoTonCrc16(p *ParamsOfTonCrc16) (*ResultOfTonCrc16, error)
- func (c *Client) CryptoVerifySignature(p *ParamsOfVerifySignature) (*ResultOfVerifySignature, error)
- func (c *Client) DebotExecute(p *ParamsOfExecute) error
- func (c *Client) DebotFetch(p *ParamsOfFetch) (*ResultOfFetch, error)
- func (c *Client) DebotInit(p *ParamsOfInit, app AppDebotBrowser) (*RegisteredDebot, error)
- func (c *Client) DebotRemove(p *ParamsOfRemove) error
- func (c *Client) DebotSend(p *ParamsOfSend) error
- func (c *Client) DebotStart(p *ParamsOfStart) error
- func (c *Client) NetAggregateCollection(p *ParamsOfAggregateCollection) (*ResultOfAggregateCollection, error)
- func (c *Client) NetBatchQuery(p *ParamsOfBatchQuery) (*ResultOfBatchQuery, error)
- func (c *Client) NetCreateBlockIterator(p *ParamsOfCreateBlockIterator) (*RegisteredIterator, error)
- func (c *Client) NetCreateTransactionIterator(p *ParamsOfCreateTransactionIterator) (*RegisteredIterator, error)
- func (c *Client) NetFetchEndpoints() (*EndpointsSet, error)
- func (c *Client) NetFindLastShardBlock(p *ParamsOfFindLastShardBlock) (*ResultOfFindLastShardBlock, error)
- func (c *Client) NetGetEndpoints() (*ResultOfGetEndpoints, error)
- func (c *Client) NetGetSignatureId() (*ResultOfGetSignatureId, error)
- func (c *Client) NetIteratorNext(p *ParamsOfIteratorNext) (*ResultOfIteratorNext, error)
- func (c *Client) NetQuery(p *ParamsOfQuery) (*ResultOfQuery, error)
- func (c *Client) NetQueryCollection(p *ParamsOfQueryCollection) (*ResultOfQueryCollection, error)
- func (c *Client) NetQueryCounterparties(p *ParamsOfQueryCounterparties) (*ResultOfQueryCollection, error)
- func (c *Client) NetQueryTransactionTree(p *ParamsOfQueryTransactionTree) (*ResultOfQueryTransactionTree, error)
- func (c *Client) NetRemoveIterator(p *RegisteredIterator) error
- func (c *Client) NetResume() error
- func (c *Client) NetResumeBlockIterator(p *ParamsOfResumeBlockIterator) (*RegisteredIterator, error)
- func (c *Client) NetResumeTransactionIterator(p *ParamsOfResumeTransactionIterator) (*RegisteredIterator, error)
- func (c *Client) NetSetEndpoints(p *EndpointsSet) error
- func (c *Client) NetSubscribe(p *ParamsOfSubscribe) (<-chan *RawResponse, *ResultOfSubscribeCollection, error)
- func (c *Client) NetSubscribeCollection(p *ParamsOfSubscribeCollection) (<-chan json.RawMessage, *ResultOfSubscribeCollection, error)
- func (c *Client) NetSuspend() error
- func (c *Client) NetUnsubscribe(p *ResultOfSubscribeCollection) error
- func (c *Client) NetWaitForCollection(p *ParamsOfWaitForCollection) (*ResultOfWaitForCollection, error)
- func (c *Client) ProcessingCancelMonitor(p *ParamsOfCancelMonitor) error
- func (c *Client) ProcessingFetchNextMonitorResults(p *ParamsOfFetchNextMonitorResults) (*ResultOfFetchNextMonitorResults, error)
- func (c *Client) ProcessingGetMonitorInfo(p *ParamsOfGetMonitorInfo) (*MonitoringQueueInfo, error)
- func (c *Client) ProcessingMonitorMessages(p *ParamsOfMonitorMessages) error
- func (c *Client) ProcessingProcessMessage(p *ParamsOfProcessMessage, callback EventCallback) (*ResultOfProcessMessage, error)
- func (c *Client) ProcessingSendMessage(p *ParamsOfSendMessage, callback EventCallback) (*ResultOfSendMessage, error)
- func (c *Client) ProcessingSendMessages(p *ParamsOfSendMessages) (*ResultOfSendMessages, error)
- func (c *Client) ProcessingWaitForTransaction(p *ParamsOfWaitForTransaction, callback EventCallback) (*ResultOfProcessMessage, error)
- func (c *Client) ProofsProofBlockData(p *ParamsOfProofBlockData) error
- func (c *Client) ProofsProofMessageData(p *ParamsOfProofMessageData) error
- func (c *Client) ProofsProofTransactionData(p *ParamsOfProofTransactionData) error
- func (c *Client) TvmRunExecutor(p *ParamsOfRunExecutor) (*ResultOfRunExecutor, error)
- func (c *Client) TvmRunGet(p *ParamsOfRunGet) (*ResultOfRunGet, error)
- func (c *Client) TvmRunTvm(p *ParamsOfRunTvm) (*ResultOfRunTvm, error)
- func (c *Client) UtilsCalcStorageFee(p *ParamsOfCalcStorageFee) (*ResultOfCalcStorageFee, error)
- func (c *Client) UtilsCompressZstd(p *ParamsOfCompressZstd) (*ResultOfCompressZstd, error)
- func (c *Client) UtilsConvertAddress(p *ParamsOfConvertAddress) (*ResultOfConvertAddress, error)
- func (c *Client) UtilsDecompressZstd(p *ParamsOfDecompressZstd) (*ResultOfDecompressZstd, error)
- func (c *Client) UtilsGetAddressType(p *ParamsOfGetAddressType) (*ResultOfGetAddressType, error)
- type Config
- type CryptoBoxHandle
- type CryptoBoxSecret
- type CryptoConfig
- type DataLayout
- type DebotAction
- type DebotActivity
- type DebotHandle
- type DebotInfo
- type DecodedMessageBody
- type DecodedOutput
- type DecryptParamsOfAppEncryptionBox
- type DecryptResultOfAppEncryptionBox
- type DeploySet
- type DidSendProcessingEvent
- type EncodedMessageSource
- type EncryptParamsOfAppEncryptionBox
- type EncryptResultOfAppEncryptionBox
- type EncryptedSecretCryptoBoxSecret
- type EncryptionAlgorithm
- type EncryptionBoxHandle
- type EncryptionBoxInfo
- type EndpointsSet
- type EnumOfTypesDescriptor
- type Error
- type ErrorAppRequestResult
- type EventCallback
- type ExecutionOptions
- type ExternalSigner
- type FetchFirstBlockFailedProcessingEvent
- type FetchNextBlockFailedProcessingEvent
- type FieldAggregation
- type FunctionHeader
- type GetInfoParamsOfAppEncryptionBox
- type GetInfoResultOfAppEncryptionBox
- type GetPasswordParamsOfAppPasswordProvider
- type GetPasswordResultOfAppPasswordProvider
- type GetPublicKeyParamsOfAppSigningBox
- type GetPublicKeyResultOfAppSigningBox
- type GetSigningBoxParamsOfAppDebotBrowser
- type GetSigningBoxResultOfAppDebotBrowser
- type HashAddressMonitoredMessage
- type HexAddressStringFormat
- type InputParamsOfAppDebotBrowser
- type InputResultOfAppDebotBrowser
- type IntegerBuilderOp
- type InvokeDebotParamsOfAppDebotBrowser
- type InvokeDebotResultOfAppDebotBrowser
- type KeyPair
- type KeysSigner
- type LogParamsOfAppDebotBrowser
- type MessageBodyType
- type MessageExpiredProcessingEvent
- type MessageMonitoringParams
- type MessageMonitoringResult
- type MessageMonitoringStatus
- type MessageMonitoringTransaction
- type MessageMonitoringTransactionCompute
- type MessageNode
- type MessageSendingParams
- type MessageSource
- type MessageStateInitSource
- type MnemonicDictionary
- type MonitorFetchWaitMode
- type MonitoredMessage
- type MonitoringQueueInfo
- type Multiplexer
- type NaclBoxBoxEncryptionAlgorithm
- type NaclBoxEncryptionAlgorithm
- type NaclBoxParamsCB
- type NaclBoxParamsEB
- type NaclSecretBoxBoxEncryptionAlgorithm
- type NaclSecretBoxEncryptionAlgorithm
- type NaclSecretBoxParamsCB
- type NaclSecretBoxParamsEB
- type NetworkConfig
- type NetworkQueriesProtocol
- type NoneAccountForExecutor
- type NoneSigner
- type OkAppRequestResult
- type OrderBy
- type ParamsOfAbiEncodeBoc
- type ParamsOfAggregateCollection
- type ParamsOfAppDebotBrowser
- type ParamsOfAppEncryptionBox
- type ParamsOfAppPasswordProvider
- type ParamsOfAppRequest
- type ParamsOfAppSigningBox
- type ParamsOfAttachSignature
- type ParamsOfAttachSignatureToMessageBody
- type ParamsOfBatchQuery
- type ParamsOfBocCacheGet
- type ParamsOfBocCacheSet
- type ParamsOfBocCacheUnpin
- type ParamsOfCalcFunctionId
- type ParamsOfCalcStorageFee
- type ParamsOfCancelMonitor
- type ParamsOfChaCha20
- type ParamsOfCompressZstd
- type ParamsOfConvertAddress
- type ParamsOfConvertPublicKeyToTonSafeFormat
- type ParamsOfCreateBlockIterator
- type ParamsOfCreateCryptoBox
- type ParamsOfCreateEncryptionBox
- type ParamsOfCreateTransactionIterator
- type ParamsOfDecodeAccountData
- type ParamsOfDecodeBoc
- type ParamsOfDecodeInitialData
- type ParamsOfDecodeMessage
- type ParamsOfDecodeMessageBody
- type ParamsOfDecodeStateInit
- type ParamsOfDecodeTvc
- type ParamsOfDecompressZstd
- type ParamsOfEncodeAccount
- type ParamsOfEncodeBoc
- type ParamsOfEncodeExternalInMessage
- type ParamsOfEncodeInitialData
- type ParamsOfEncodeInternalMessage
- type ParamsOfEncodeMessage
- type ParamsOfEncodeMessageBody
- type ParamsOfEncodeStateInit
- type ParamsOfEncryptionBoxDecrypt
- type ParamsOfEncryptionBoxEncrypt
- type ParamsOfEncryptionBoxGetInfo
- type ParamsOfExecute
- type ParamsOfFactorize
- type ParamsOfFetch
- type ParamsOfFetchNextMonitorResults
- type ParamsOfFindLastShardBlock
- type ParamsOfGenerateRandomBytes
- type ParamsOfGetAddressType
- type ParamsOfGetBlockchainConfig
- type ParamsOfGetBocDepth
- type ParamsOfGetBocHash
- type ParamsOfGetCodeFromTvc
- type ParamsOfGetCodeSalt
- type ParamsOfGetCompilerVersion
- type ParamsOfGetEncryptionBoxFromCryptoBox
- type ParamsOfGetMonitorInfo
- type ParamsOfGetSignatureData
- type ParamsOfGetSigningBoxFromCryptoBox
- type ParamsOfHDKeyDeriveFromXPrv
- type ParamsOfHDKeyDeriveFromXPrvPath
- type ParamsOfHDKeyPublicFromXPrv
- type ParamsOfHDKeySecretFromXPrv
- type ParamsOfHDKeyXPrvFromMnemonic
- type ParamsOfHash
- type ParamsOfInit
- type ParamsOfIteratorNext
- type ParamsOfMnemonicDeriveSignKeys
- type ParamsOfMnemonicFromEntropy
- type ParamsOfMnemonicFromRandom
- type ParamsOfMnemonicVerify
- type ParamsOfMnemonicWords
- type ParamsOfModularPower
- type ParamsOfMonitorMessages
- type ParamsOfNaclBox
- type ParamsOfNaclBoxKeyPairFromSecret
- type ParamsOfNaclBoxOpen
- type ParamsOfNaclSecretBox
- type ParamsOfNaclSecretBoxOpen
- type ParamsOfNaclSign
- type ParamsOfNaclSignDetachedVerify
- type ParamsOfNaclSignKeyPairFromSecret
- type ParamsOfNaclSignOpen
- type ParamsOfParse
- type ParamsOfParseShardstate
- type ParamsOfProcessMessage
- type ParamsOfProofBlockData
- type ParamsOfProofMessageData
- type ParamsOfProofTransactionData
- type ParamsOfQuery
- type ParamsOfQueryCollection
- type ParamsOfQueryCounterparties
- type ParamsOfQueryOperation
- type ParamsOfQueryTransactionTree
- type ParamsOfRemove
- type ParamsOfResolveAppRequest
- type ParamsOfResumeBlockIterator
- type ParamsOfResumeTransactionIterator
- type ParamsOfRunExecutor
- type ParamsOfRunGet
- type ParamsOfRunTvm
- type ParamsOfScrypt
- type ParamsOfSend
- type ParamsOfSendMessage
- type ParamsOfSendMessages
- type ParamsOfSetCodeSalt
- type ParamsOfSign
- type ParamsOfSigningBoxSign
- type ParamsOfStart
- type ParamsOfSubscribe
- type ParamsOfSubscribeCollection
- type ParamsOfTonCrc16
- type ParamsOfUpdateInitialData
- type ParamsOfVerifySignature
- type ParamsOfWaitForCollection
- type ParamsOfWaitForTransaction
- type PinnedBocCacheType
- type PredefinedSeedPhraseCryptoBoxSecret
- type ProcessingEvent
- type ProofsConfig
- type RandomSeedPhraseCryptoBoxSecret
- type RawResponse
- type RegisteredCryptoBox
- type RegisteredDebot
- type RegisteredEncryptionBox
- type RegisteredIterator
- type RegisteredSigningBox
- type RempErrorProcessingEvent
- type RempIncludedIntoAcceptedBlockProcessingEvent
- type RempIncludedIntoBlockProcessingEvent
- type RempOtherProcessingEvent
- type RempSentToValidatorsProcessingEvent
- type ResponseCode
- type ResultOfAbiEncodeBoc
- type ResultOfAggregateCollection
- type ResultOfAppDebotBrowser
- type ResultOfAppEncryptionBox
- type ResultOfAppPasswordProvider
- type ResultOfAppSigningBox
- type ResultOfAttachSignature
- type ResultOfAttachSignatureToMessageBody
- type ResultOfBatchQuery
- type ResultOfBocCacheGet
- type ResultOfBocCacheSet
- type ResultOfBuildInfo
- type ResultOfCalcFunctionId
- type ResultOfCalcStorageFee
- type ResultOfChaCha20
- type ResultOfCompressZstd
- type ResultOfConvertAddress
- type ResultOfConvertPublicKeyToTonSafeFormat
- type ResultOfDecodeAccountData
- type ResultOfDecodeBoc
- type ResultOfDecodeInitialData
- type ResultOfDecodeStateInit
- type ResultOfDecodeTvc
- type ResultOfDecompressZstd
- type ResultOfEncodeAccount
- type ResultOfEncodeBoc
- type ResultOfEncodeExternalInMessage
- type ResultOfEncodeInitialData
- type ResultOfEncodeInternalMessage
- type ResultOfEncodeMessage
- type ResultOfEncodeMessageBody
- type ResultOfEncodeStateInit
- type ResultOfEncryptionBoxDecrypt
- type ResultOfEncryptionBoxEncrypt
- type ResultOfEncryptionBoxGetInfo
- type ResultOfFactorize
- type ResultOfFetch
- type ResultOfFetchNextMonitorResults
- type ResultOfFindLastShardBlock
- type ResultOfGenerateRandomBytes
- type ResultOfGetAddressType
- type ResultOfGetBlockchainConfig
- type ResultOfGetBocDepth
- type ResultOfGetBocHash
- type ResultOfGetCodeFromTvc
- type ResultOfGetCodeSalt
- type ResultOfGetCompilerVersion
- type ResultOfGetCryptoBoxInfo
- type ResultOfGetCryptoBoxSeedPhrase
- type ResultOfGetEndpoints
- type ResultOfGetSignatureData
- type ResultOfGetSignatureId
- type ResultOfHDKeyDeriveFromXPrv
- type ResultOfHDKeyDeriveFromXPrvPath
- type ResultOfHDKeyPublicFromXPrv
- type ResultOfHDKeySecretFromXPrv
- type ResultOfHDKeyXPrvFromMnemonic
- type ResultOfHash
- type ResultOfIteratorNext
- type ResultOfMnemonicFromEntropy
- type ResultOfMnemonicFromRandom
- type ResultOfMnemonicVerify
- type ResultOfMnemonicWords
- type ResultOfModularPower
- type ResultOfNaclBox
- type ResultOfNaclBoxOpen
- type ResultOfNaclSign
- type ResultOfNaclSignDetached
- type ResultOfNaclSignDetachedVerify
- type ResultOfNaclSignOpen
- type ResultOfParse
- type ResultOfProcessMessage
- type ResultOfQuery
- type ResultOfQueryCollection
- type ResultOfQueryTransactionTree
- type ResultOfRunExecutor
- type ResultOfRunGet
- type ResultOfRunTvm
- type ResultOfScrypt
- type ResultOfSendMessage
- type ResultOfSendMessages
- type ResultOfSetCodeSalt
- type ResultOfSign
- type ResultOfSigningBoxGetPublicKey
- type ResultOfSigningBoxSign
- type ResultOfSubscribeCollection
- type ResultOfTonCrc16
- type ResultOfUpdateInitialData
- type ResultOfVerifySignature
- type ResultOfVersion
- type ResultOfWaitForCollection
- type SendFailedProcessingEvent
- type SendParamsOfAppDebotBrowser
- type ShowActionParamsOfAppDebotBrowser
- type SignParamsOfAppSigningBox
- type SignResultOfAppSigningBox
- type Signer
- type SigningBoxHandle
- type SigningBoxSigner
- type SortDirection
- type Spending
- type StateInitParams
- type StateInitSource
- type StateInitStateInitSource
- type SwitchCompletedParamsOfAppDebotBrowser
- type SwitchParamsOfAppDebotBrowser
- type TransactionDebotActivity
- type TransactionFees
- type TransactionNode
- type Tvc
- type TvcStateInitSource
- type TvcV1
- type UninitAccountForExecutor
- type UnpinnedBocCacheType
- type V1Tvc
- type WillFetchFirstBlockProcessingEvent
- type WillFetchNextBlockProcessingEvent
- type WillSendProcessingEvent
- type WrapperConfig
Constants ¶
const ( ResponseCodeSuccess = ResponseCode(C.tc_response_success) ResponseCodeError = ResponseCode(C.tc_response_error) ResponseCodeNop = ResponseCode(C.tc_response_nop) // User-level code never sees this event ResponseCodeAppRequest = ResponseCode(C.tc_response_app_request) ResponseCodeAppNotify = ResponseCode(C.tc_response_app_notify) ResponseCodeCustom = ResponseCode(C.tc_response_custom) )
const ( RequiredAddressMissingForEncodeMessageAbiErrorCode = 301 RequiredCallSetMissingForEncodeMessageAbiErrorCode = 302 InvalidJSONAbiErrorCode = 303 InvalidMessageAbiErrorCode = 304 EncodeDeployMessageFailedAbiErrorCode = 305 EncodeRunMessageFailedAbiErrorCode = 306 AttachSignatureFailedAbiErrorCode = 307 InvalidTvcImageAbiErrorCode = 308 RequiredPublicKeyMissingForFunctionHeaderAbiErrorCode = 309 InvalidSignerAbiErrorCode = 310 InvalidAbiAbiErrorCode = 311 InvalidFunctionIDAbiErrorCode = 312 InvalidDataAbiErrorCode = 313 EncodeInitialDataFailedAbiErrorCode = 314 InvalidFunctionNameAbiErrorCode = 315 )
const ( InvalidBocBocErrorCode = 201 SerializationErrorBocErrorCode = 202 InappropriateBlockBocErrorCode = 203 MissingSourceBocBocErrorCode = 204 InsufficientCacheSizeBocErrorCode = 205 BocRefNotFoundBocErrorCode = 206 InvalidBocRefBocErrorCode = 207 )
const ( NotImplementedErrorCode = 1 InvalidHexErrorCode = 2 InvalidBase64ErrorCode = 3 InvalidAddressErrorCode = 4 CallbackParamsCantBeConvertedToJSONErrorCode = 5 WebsocketConnectErrorErrorCode = 6 WebsocketReceiveErrorErrorCode = 7 WebsocketSendErrorErrorCode = 8 HTTPClientCreateErrorErrorCode = 9 HTTPRequestCreateErrorErrorCode = 10 HTTPRequestSendErrorErrorCode = 11 HTTPRequestParseErrorErrorCode = 12 CallbackNotRegisteredErrorCode = 13 NetModuleNotInitErrorCode = 14 InvalidConfigErrorCode = 15 CannotCreateRuntimeErrorCode = 16 InvalidContextHandleErrorCode = 17 CannotSerializeResultErrorCode = 18 CannotSerializeErrorErrorCode = 19 CannotConvertJsValueToJSONErrorCode = 20 CannotReceiveSpawnedResultErrorCode = 21 SetTimerErrorErrorCode = 22 InvalidParamsErrorCode = 23 ContractsAddressConversionFailedErrorCode = 24 UnknownFunctionErrorCode = 25 AppRequestErrorErrorCode = 26 NoSuchRequestErrorCode = 27 CanNotSendRequestResultErrorCode = 28 CanNotReceiveRequestResultErrorCode = 29 CanNotParseRequestResultErrorCode = 30 UnexpectedCallbackResponseErrorCode = 31 CanNotParseNumberErrorCode = 32 InternalErrorErrorCode = 33 InvalidHandleErrorCode = 34 LocalStorageErrorErrorCode = 35 InvalidDataErrorCode = 36 )
const ( InvalidPublicKeyCryptoErrorCode = 100 InvalidSecretKeyCryptoErrorCode = 101 InvalidKeyCryptoErrorCode = 102 InvalidFactorizeChallengeCryptoErrorCode = 106 InvalidBigIntCryptoErrorCode = 107 ScryptFailedCryptoErrorCode = 108 InvalidKeySizeCryptoErrorCode = 109 NaclSecretBoxFailedCryptoErrorCode = 110 NaclBoxFailedCryptoErrorCode = 111 NaclSignFailedCryptoErrorCode = 112 Bip39InvalidEntropyCryptoErrorCode = 113 Bip39InvalidPhraseCryptoErrorCode = 114 Bip32InvalidKeyCryptoErrorCode = 115 Bip32InvalidDerivePathCryptoErrorCode = 116 Bip39InvalidDictionaryCryptoErrorCode = 117 Bip39InvalidWordCountCryptoErrorCode = 118 MnemonicGenerationFailedCryptoErrorCode = 119 MnemonicFromEntropyFailedCryptoErrorCode = 120 SigningBoxNotRegisteredCryptoErrorCode = 121 InvalidSignatureCryptoErrorCode = 122 EncryptionBoxNotRegisteredCryptoErrorCode = 123 InvalidIvSizeCryptoErrorCode = 124 UnsupportedCipherModeCryptoErrorCode = 125 CannotCreateCipherCryptoErrorCode = 126 EncryptDataErrorCryptoErrorCode = 127 DecryptDataErrorCryptoErrorCode = 128 IvRequiredCryptoErrorCode = 129 CryptoBoxNotRegisteredCryptoErrorCode = 130 InvalidCryptoBoxTypeCryptoErrorCode = 131 CryptoBoxSecretSerializationErrorCryptoErrorCode = 132 CryptoBoxSecretDeserializationErrorCryptoErrorCode = 133 InvalidNonceSizeCryptoErrorCode = 134 )
const ( DebotStartFailedDebotErrorCode = 801 DebotFetchFailedDebotErrorCode = 802 DebotExecutionFailedDebotErrorCode = 803 DebotInvalidHandleDebotErrorCode = 804 DebotInvalidJSONParamsDebotErrorCode = 805 DebotInvalidFunctionIDDebotErrorCode = 806 DebotInvalidAbiDebotErrorCode = 807 DebotGetMethodFailedDebotErrorCode = 808 DebotInvalidMsgDebotErrorCode = 809 DebotExternalCallFailedDebotErrorCode = 810 DebotBrowserCallbackFailedDebotErrorCode = 811 DebotOperationRejectedDebotErrorCode = 812 DebotNoCodeDebotErrorCode = 813 )
const ( QueryFailedNetErrorCode = 601 SubscribeFailedNetErrorCode = 602 WaitForFailedNetErrorCode = 603 GetSubscriptionResultFailedNetErrorCode = 604 InvalidServerResponseNetErrorCode = 605 ClockOutOfSyncNetErrorCode = 606 WaitForTimeoutNetErrorCode = 607 GraphqlErrorNetErrorCode = 608 NetworkModuleSuspendedNetErrorCode = 609 WebsocketDisconnectedNetErrorCode = 610 NotSupportedNetErrorCode = 611 NoEndpointsProvidedNetErrorCode = 612 GraphqlWebsocketInitErrorNetErrorCode = 613 NetworkModuleResumedNetErrorCode = 614 QueryTransactionTreeTimeoutNetErrorCode = 616 GraphqlConnectionErrorNetErrorCode = 617 WrongWebscoketProtocolSequenceNetErrorCode = 618 )
const ( MessageAlreadyExpiredProcessingErrorCode = 501 MessageHasNotDestinationAddressProcessingErrorCode = 502 CanNotBuildMessageCellProcessingErrorCode = 503 FetchBlockFailedProcessingErrorCode = 504 SendMessageFailedProcessingErrorCode = 505 InvalidMessageBocProcessingErrorCode = 506 MessageExpiredProcessingErrorCode = 507 TransactionWaitTimeoutProcessingErrorCode = 508 InvalidBlockReceivedProcessingErrorCode = 509 CanNotCheckBlockShardProcessingErrorCode = 510 BlockNotFoundProcessingErrorCode = 511 InvalidDataProcessingErrorCode = 512 ExternalSignerMustNotBeUsedProcessingErrorCode = 513 MessageRejectedProcessingErrorCode = 514 InvalidRempStatusProcessingErrorCode = 515 NextRempStatusTimeoutProcessingErrorCode = 516 )
const ( InvalidDataProofsErrorCode = 901 ProofCheckFailedProofsErrorCode = 902 InternalErrorProofsErrorCode = 903 DataDiffersFromProvenProofsErrorCode = 904 )
const ( CanNotReadTransactionTvmErrorCode = 401 CanNotReadBlockchainConfigTvmErrorCode = 402 TransactionAbortedTvmErrorCode = 403 InternalErrorTvmErrorCode = 404 ActionPhaseFailedTvmErrorCode = 405 AccountCodeMissingTvmErrorCode = 406 LowBalanceTvmErrorCode = 407 AccountFrozenOrDeletedTvmErrorCode = 408 AccountMissingTvmErrorCode = 409 UnknownExecutionErrorTvmErrorCode = 410 InvalidInputStackTvmErrorCode = 411 InvalidAccountBocTvmErrorCode = 412 InvalidMessageTypeTvmErrorCode = 413 ContractExecutionErrorTvmErrorCode = 414 AccountIsSuspendedTvmErrorCode = 415 )
Variables ¶
var ErrContextIsClosed = errors.New("context is closed")
var ErrNoCallbackSpecified = errors.New("no callback specified error when send_events enabled")
Functions ¶
func NewDynamicallyBufferedResponses ¶
func NewDynamicallyBufferedResponses(in <-chan *RawResponse) <-chan *RawResponse
Types ¶
type AbiConfig ¶
type AbiConfig struct { // Workchain id that is used by default in DeploySet. Workchain null.Int32 `json:"workchain"` // optional // Message lifetime for contracts which ABI includes "expire" header. // Must be specified in milliseconds. Default is 40000 (40 sec). MessageExpirationTimeout null.Uint32 `json:"message_expiration_timeout"` // optional // Factor that increases the expiration timeout for each retry. // Default is 1.5. MessageExpirationTimeoutGrowFactor null.Float32 `json:"message_expiration_timeout_grow_factor"` // optional }
type AbiContract ¶
type AbiContract struct { ABIVersion null.Uint32 `json:"ABI version"` // optional AbiVersion null.Uint32 `json:"abi_version"` // optional Version *null.String `json:"version"` // optional Header []string `json:"header"` // optional Functions []AbiFunction `json:"functions"` // optional Events []AbiEvent `json:"events"` // optional Data []AbiData `json:"data"` // optional Fields []AbiParam `json:"fields"` // optional }
type AbiFunction ¶
type AccountAccountForExecutor ¶
type AccountAccountForExecutor struct { // Account BOC. // Encoded as base64. Boc string `json:"boc"` // Flag for running account with the unlimited balance. // Can be used to calculate transaction fees without balance check. UnlimitedBalance null.Bool `json:"unlimited_balance"` // optional }
Account state to run message.
type AccountAddressType ¶
type AccountAddressType string
const ( AccountIDAccountAddressType AccountAddressType = "AccountId" HexAccountAddressType AccountAddressType = "Hex" Base64AccountAddressType AccountAddressType = "Base64" )
type AccountForExecutor ¶
type AccountForExecutor struct { // Should be any of // NoneAccountForExecutor // UninitAccountForExecutor // AccountAccountForExecutor EnumTypeValue interface{} }
func (*AccountForExecutor) MarshalJSON ¶
func (p *AccountForExecutor) MarshalJSON() ([]byte, error)
MarshalJSON implements custom marshalling for rust directive #[serde(tag="type")] for enum of types.
func (*AccountForExecutor) UnmarshalJSON ¶
func (p *AccountForExecutor) UnmarshalJSON(b []byte) error
UnmarshalJSON implements custom unmarshalling for rust directive #[serde(tag="type")] for enum of types.
type AccountIDAddressStringFormat ¶
type AccountIDAddressStringFormat struct{}
type AddressBuilderOp ¶
type AddressBuilderOp struct { // Address in a common `workchain:account` or base64 format. Address string `json:"address"` }
Address.
type AddressStringFormat ¶
type AddressStringFormat struct { // Should be any of // AccountIDAddressStringFormat // HexAddressStringFormat // Base64AddressStringFormat EnumTypeValue interface{} }
func (*AddressStringFormat) MarshalJSON ¶
func (p *AddressStringFormat) MarshalJSON() ([]byte, error)
MarshalJSON implements custom marshalling for rust directive #[serde(tag="type")] for enum of types.
func (*AddressStringFormat) UnmarshalJSON ¶
func (p *AddressStringFormat) UnmarshalJSON(b []byte) error
UnmarshalJSON implements custom unmarshalling for rust directive #[serde(tag="type")] for enum of types.
type AesEncryptionAlgorithm ¶ added in v1.37.2
type AesEncryptionAlgorithm struct {
Value AesParamsEB `json:"value"`
}
type AesInfo ¶
type AesInfo struct { Mode CipherMode `json:"mode"` Iv null.String `json:"iv"` // optional }
type AesParamsEB ¶
type AesParamsEB struct { Mode CipherMode `json:"mode"` Key string `json:"key"` Iv null.String `json:"iv"` // optional }
type AggregationFn ¶
type AggregationFn string
const ( // Returns count of filtered record. CountAggregationFn AggregationFn = "COUNT" // Returns the minimal value for a field in filtered records. MinAggregationFn AggregationFn = "MIN" // Returns the maximal value for a field in filtered records. MaxAggregationFn AggregationFn = "MAX" // Returns a sum of values for a field in filtered records. SumAggregationFn AggregationFn = "SUM" // Returns an average value for a field in filtered records. AverageAggregationFn AggregationFn = "AVERAGE" )
type AppDebotBrowser ¶
type AppDebotBrowser interface { ApproveRequest(ApproveParamsOfAppDebotBrowser) (ApproveResultOfAppDebotBrowser, error) InputRequest(InputParamsOfAppDebotBrowser) (InputResultOfAppDebotBrowser, error) GetSigningBoxRequest(GetSigningBoxParamsOfAppDebotBrowser) (GetSigningBoxResultOfAppDebotBrowser, error) InvokeDebotRequest(InvokeDebotParamsOfAppDebotBrowser) (InvokeDebotResultOfAppDebotBrowser, error) LogNotify(LogParamsOfAppDebotBrowser) SwitchNotify(SwitchParamsOfAppDebotBrowser) SwitchCompletedNotify(SwitchCompletedParamsOfAppDebotBrowser) ShowActionNotify(ShowActionParamsOfAppDebotBrowser) SendNotify(SendParamsOfAppDebotBrowser) }
type AppEncryptionBox ¶
type AppEncryptionBox interface { GetInfoRequest(GetInfoParamsOfAppEncryptionBox) (GetInfoResultOfAppEncryptionBox, error) EncryptRequest(EncryptParamsOfAppEncryptionBox) (EncryptResultOfAppEncryptionBox, error) DecryptRequest(DecryptParamsOfAppEncryptionBox) (DecryptResultOfAppEncryptionBox, error) }
type AppPasswordProvider ¶
type AppPasswordProvider interface {
GetPasswordRequest(GetPasswordParamsOfAppPasswordProvider) (GetPasswordResultOfAppPasswordProvider, error)
}
type AppRequestResult ¶
type AppRequestResult struct { // Should be any of // ErrorAppRequestResult // OkAppRequestResult EnumTypeValue interface{} }
func (*AppRequestResult) MarshalJSON ¶
func (p *AppRequestResult) MarshalJSON() ([]byte, error)
MarshalJSON implements custom marshalling for rust directive #[serde(tag="type")] for enum of types.
func (*AppRequestResult) UnmarshalJSON ¶
func (p *AppRequestResult) UnmarshalJSON(b []byte) error
UnmarshalJSON implements custom unmarshalling for rust directive #[serde(tag="type")] for enum of types.
type AppSigningBox ¶
type AppSigningBox interface { GetPublicKeyRequest(GetPublicKeyParamsOfAppSigningBox) (GetPublicKeyResultOfAppSigningBox, error) SignRequest(SignParamsOfAppSigningBox) (SignResultOfAppSigningBox, error) }
type ApproveParamsOfAppDebotBrowser ¶
type ApproveParamsOfAppDebotBrowser struct { // DeBot activity details. Activity DebotActivity `json:"activity"` }
Requests permission from DeBot Browser to execute DeBot operation.
type ApproveResultOfAppDebotBrowser ¶
type ApproveResultOfAppDebotBrowser struct { // Indicates whether the DeBot is allowed to perform the specified operation. Approved bool `json:"approved"` }
Result of `approve` callback.
type BindingConfig ¶ added in v1.41.0
type BitStringBuilderOp ¶
type BitStringBuilderOp struct { // Bit string content using bitstring notation. See `TON VM specification` 1.0. // Contains hexadecimal string representation: // - Can end with `_` tag. // - Can be prefixed with `x` or `X`. // - Can be prefixed with `x{` or `X{` and ended with `}`. // // Contains binary string represented as a sequence // of `0` and `1` prefixed with `n` or `N`. // // Examples: // `1AB`, `x1ab`, `X1AB`, `x{1abc}`, `X{1ABC}` // `2D9_`, `x2D9_`, `X2D9_`, `x{2D9_}`, `X{2D9_}` // `n00101101100`, `N00101101100`. Value string `json:"value"` }
Append bit string to cell data.
type BocCacheType ¶
type BocCacheType struct { // Should be any of // PinnedBocCacheType // UnpinnedBocCacheType EnumTypeValue interface{} }
func (*BocCacheType) MarshalJSON ¶
func (p *BocCacheType) MarshalJSON() ([]byte, error)
MarshalJSON implements custom marshalling for rust directive #[serde(tag="type")] for enum of types.
func (*BocCacheType) UnmarshalJSON ¶
func (p *BocCacheType) UnmarshalJSON(b []byte) error
UnmarshalJSON implements custom unmarshalling for rust directive #[serde(tag="type")] for enum of types.
type BocMonitoredMessage ¶ added in v1.42.1
type BocMonitoredMessage struct {
Boc string `json:"boc"`
}
BOC of the message.
type BoxEncryptionAlgorithm ¶
type BoxEncryptionAlgorithm struct { // Should be any of // ChaCha20BoxEncryptionAlgorithm // NaclBoxBoxEncryptionAlgorithm // NaclSecretBoxBoxEncryptionAlgorithm EnumTypeValue interface{} }
func (*BoxEncryptionAlgorithm) MarshalJSON ¶
func (p *BoxEncryptionAlgorithm) MarshalJSON() ([]byte, error)
MarshalJSON implements custom marshalling for rust directive #[serde(tag="type")] for enum of types.
func (*BoxEncryptionAlgorithm) UnmarshalJSON ¶
func (p *BoxEncryptionAlgorithm) UnmarshalJSON(b []byte) error
UnmarshalJSON implements custom unmarshalling for rust directive #[serde(tag="type")] for enum of types.
type BuildInfoDependency ¶
type BuilderOp ¶
type BuilderOp struct { // Should be any of // IntegerBuilderOp // BitStringBuilderOp // CellBuilderOp // CellBocBuilderOp // AddressBuilderOp EnumTypeValue interface{} }
func (*BuilderOp) MarshalJSON ¶
MarshalJSON implements custom marshalling for rust directive #[serde(tag="type")] for enum of types.
func (*BuilderOp) UnmarshalJSON ¶
UnmarshalJSON implements custom unmarshalling for rust directive #[serde(tag="type")] for enum of types.
type CallSet ¶
type CallSet struct { // Function name that is being called. Or function id encoded as string in hex (starting with 0x). FunctionName string `json:"function_name"` // Function header. // If an application omits some header parameters required by the // contract's ABI, the library will set the default values for // them. Header *FunctionHeader `json:"header"` // optional // Function input parameters according to ABI. Input json.RawMessage `json:"input"` // optional }
type CellBocBuilderOp ¶
type CellBocBuilderOp struct { // Nested cell BOC encoded with `base64` or BOC cache key. Boc string `json:"boc"` }
Append ref to nested cell.
type CellBuilderOp ¶
type CellBuilderOp struct { // Nested cell builder. Builder []BuilderOp `json:"builder"` }
Append ref to nested cells.
type ChaCha20BoxEncryptionAlgorithm ¶ added in v1.37.2
type ChaCha20BoxEncryptionAlgorithm struct {
Value ChaCha20ParamsCB `json:"value"`
}
type ChaCha20EncryptionAlgorithm ¶ added in v1.37.2
type ChaCha20EncryptionAlgorithm struct {
Value ChaCha20ParamsEB `json:"value"`
}
type ChaCha20ParamsCB ¶
type ChaCha20ParamsCB struct { // 96-bit nonce. // Must be encoded with `hex`. Nonce string `json:"nonce"` }
type ChaCha20ParamsEB ¶
type CipherMode ¶
type CipherMode string
const ( CbcCipherMode CipherMode = "CBC" CfbCipherMode CipherMode = "CFB" CtrCipherMode CipherMode = "CTR" EcbCipherMode CipherMode = "ECB" OfbCipherMode CipherMode = "OFB" )
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) AbiAttachSignature ¶
func (c *Client) AbiAttachSignature(p *ParamsOfAttachSignature) (*ResultOfAttachSignature, error)
Combines `hex`-encoded `signature` with `base64`-encoded `unsigned_message`. Returns signed message encoded in `base64`.
func (*Client) AbiAttachSignatureToMessageBody ¶
func (c *Client) AbiAttachSignatureToMessageBody(p *ParamsOfAttachSignatureToMessageBody) (*ResultOfAttachSignatureToMessageBody, error)
func (*Client) AbiCalcFunctionId ¶ added in v1.35.1
func (c *Client) AbiCalcFunctionId(p *ParamsOfCalcFunctionId) (*ResultOfCalcFunctionId, error)
Calculates contract function ID by contract ABI.
func (*Client) AbiDecodeAccountData ¶
func (c *Client) AbiDecodeAccountData(p *ParamsOfDecodeAccountData) (*ResultOfDecodeAccountData, error)
Decodes account data using provided data BOC and ABI. Note: this feature requires ABI 2.1 or higher.
func (*Client) AbiDecodeBoc ¶
func (c *Client) AbiDecodeBoc(p *ParamsOfDecodeBoc) (*ResultOfDecodeBoc, error)
Decodes BOC into JSON as a set of provided parameters. Solidity functions use ABI types for [builder encoding](https://github.com/tonlabs/TON-Solidity-Compiler/blob/master/API.md#tvmbuilderstore). The simplest way to decode such a BOC is to use ABI decoding. ABI has it own rules for fields layout in cells so manually encoded BOC can not be described in terms of ABI rules.
To solve this problem we introduce a new ABI type `Ref(<ParamType>)` which allows to store `ParamType` ABI parameter in cell reference and, thus, decode manually encoded BOCs. This type is available only in `decode_boc` function and will not be available in ABI messages encoding until it is included into some ABI revision.
Such BOC descriptions covers most users needs. If someone wants to decode some BOC which can not be described by these rules (i.e. BOC with TLB containing constructors of flags defining some parsing conditions) then they can decode the fields up to fork condition, check the parsed data manually, expand the parsing schema and then decode the whole BOC with the full schema.
func (*Client) AbiDecodeInitialData ¶
func (c *Client) AbiDecodeInitialData(p *ParamsOfDecodeInitialData) (*ResultOfDecodeInitialData, error)
Decodes initial values of a contract's static variables and owner's public key from account initial data This operation is applicable only for initial account data (before deploy). If the contract is already deployed, its data doesn't contain this data section any more.
func (*Client) AbiDecodeMessage ¶
func (c *Client) AbiDecodeMessage(p *ParamsOfDecodeMessage) (*DecodedMessageBody, error)
Decodes message body using provided message BOC and ABI.
func (*Client) AbiDecodeMessageBody ¶
func (c *Client) AbiDecodeMessageBody(p *ParamsOfDecodeMessageBody) (*DecodedMessageBody, error)
Decodes message body using provided body BOC and ABI.
func (*Client) AbiEncodeAccount ¶
func (c *Client) AbiEncodeAccount(p *ParamsOfEncodeAccount) (*ResultOfEncodeAccount, error)
Creates account state BOC. Creates account state provided with one of these sets of data : 1. BOC of code, BOC of data, BOC of library 2. TVC (string in `base64`), keys, init params.
func (*Client) AbiEncodeBoc ¶
func (c *Client) AbiEncodeBoc(p *ParamsOfAbiEncodeBoc) (*ResultOfAbiEncodeBoc, error)
Encodes given parameters in JSON into a BOC using param types from ABI.
func (*Client) AbiEncodeInitialData ¶
func (c *Client) AbiEncodeInitialData(p *ParamsOfEncodeInitialData) (*ResultOfEncodeInitialData, error)
Encodes initial account data with initial values for the contract's static variables and owner's public key into a data BOC that can be passed to `encode_tvc` function afterwards. This function is analogue of `tvm.buildDataInit` function in Solidity.
func (*Client) AbiEncodeInternalMessage ¶
func (c *Client) AbiEncodeInternalMessage(p *ParamsOfEncodeInternalMessage) (*ResultOfEncodeInternalMessage, error)
Encodes an internal ABI-compatible message. Allows to encode deploy and function call messages.
Use cases include messages of any possible type: - deploy with initial function call (i.e. `constructor` or any other function that is used for some kind of initialization); - deploy without initial function call; - simple function call
There is an optional public key can be provided in deploy set in order to substitute one in TVM file.
Public key resolving priority: 1. Public key from deploy set. 2. Public key, specified in TVM file.
func (*Client) AbiEncodeMessage ¶
func (c *Client) AbiEncodeMessage(p *ParamsOfEncodeMessage) (*ResultOfEncodeMessage, error)
Encodes an ABI-compatible message. Allows to encode deploy and function call messages, both signed and unsigned.
Use cases include messages of any possible type: - deploy with initial function call (i.e. `constructor` or any other function that is used for some kind of initialization); - deploy without initial function call; - signed/unsigned + data for signing.
`Signer` defines how the message should or shouldn't be signed:
`Signer::None` creates an unsigned message. This may be needed in case of some public methods, that do not require authorization by pubkey.
`Signer::External` takes public key and returns `data_to_sign` for later signing. Use `attach_signature` method with the result signature to get the signed message.
`Signer::Keys` creates a signed message with provided key pair.
[SOON] `Signer::SigningBox` Allows using a special interface to implement signing without private key disclosure to SDK. For instance, in case of using a cold wallet or HSM, when application calls some API to sign data.
There is an optional public key can be provided in deploy set in order to substitute one in TVM file.
Public key resolving priority: 1. Public key from deploy set. 2. Public key, specified in TVM file. 3. Public key, provided by signer.
func (*Client) AbiEncodeMessageBody ¶
func (c *Client) AbiEncodeMessageBody(p *ParamsOfEncodeMessageBody) (*ResultOfEncodeMessageBody, error)
Encodes message body according to ABI function call.
func (*Client) AbiGetSignatureData ¶ added in v1.40.0
func (c *Client) AbiGetSignatureData(p *ParamsOfGetSignatureData) (*ResultOfGetSignatureData, error)
Extracts signature from message body and calculates hash to verify the signature.
func (*Client) AbiUpdateInitialData ¶
func (c *Client) AbiUpdateInitialData(p *ParamsOfUpdateInitialData) (*ResultOfUpdateInitialData, error)
Updates initial account data with initial values for the contract's static variables and owner's public key. This operation is applicable only for initial account data (before deploy). If the contract is already deployed, its data doesn't contain this data section any more.
func (*Client) BocCacheGet ¶
func (c *Client) BocCacheGet(p *ParamsOfBocCacheGet) (*ResultOfBocCacheGet, error)
Get BOC from cache.
func (*Client) BocCacheSet ¶
func (c *Client) BocCacheSet(p *ParamsOfBocCacheSet) (*ResultOfBocCacheSet, error)
Save BOC into cache or increase pin counter for existing pinned BOC.
func (*Client) BocCacheUnpin ¶
func (c *Client) BocCacheUnpin(p *ParamsOfBocCacheUnpin) error
Unpin BOCs with specified pin defined in the `cache_set`. Decrease pin reference counter for BOCs with specified pin defined in the `cache_set`. BOCs which have only 1 pin and its reference counter become 0 will be removed from cache.
func (*Client) BocDecodeStateInit ¶ added in v1.43.3
func (c *Client) BocDecodeStateInit(p *ParamsOfDecodeStateInit) (*ResultOfDecodeStateInit, error)
Decodes contract's initial state into code, data, libraries and special options.
func (*Client) BocDecodeTvc ¶
func (c *Client) BocDecodeTvc(p *ParamsOfDecodeTvc) (*ResultOfDecodeTvc, error)
Decodes tvc according to the tvc spec. Read more about tvc structure here https://github.com/tonlabs/ever-struct/blob/main/src/scheme/mod.rs#L30.
func (*Client) BocEncodeBoc ¶
func (c *Client) BocEncodeBoc(p *ParamsOfEncodeBoc) (*ResultOfEncodeBoc, error)
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.
func (*Client) BocEncodeExternalInMessage ¶
func (c *Client) BocEncodeExternalInMessage(p *ParamsOfEncodeExternalInMessage) (*ResultOfEncodeExternalInMessage, error)
Encodes a message. Allows to encode any external inbound message.
func (*Client) BocEncodeStateInit ¶ added in v1.43.3
func (c *Client) BocEncodeStateInit(p *ParamsOfEncodeStateInit) (*ResultOfEncodeStateInit, error)
Encodes initial contract state from code, data, libraries ans special options (see input params).
func (*Client) BocGetBlockchainConfig ¶
func (c *Client) BocGetBlockchainConfig(p *ParamsOfGetBlockchainConfig) (*ResultOfGetBlockchainConfig, error)
Extract blockchain configuration from key block and also from zerostate.
func (*Client) BocGetBocDepth ¶
func (c *Client) BocGetBocDepth(p *ParamsOfGetBocDepth) (*ResultOfGetBocDepth, error)
Calculates BOC depth.
func (*Client) BocGetBocHash ¶
func (c *Client) BocGetBocHash(p *ParamsOfGetBocHash) (*ResultOfGetBocHash, error)
Calculates BOC root hash.
func (*Client) BocGetCodeFromTvc ¶
func (c *Client) BocGetCodeFromTvc(p *ParamsOfGetCodeFromTvc) (*ResultOfGetCodeFromTvc, error)
Extracts code from TVC contract image.
func (*Client) BocGetCodeSalt ¶
func (c *Client) BocGetCodeSalt(p *ParamsOfGetCodeSalt) (*ResultOfGetCodeSalt, error)
Returns the contract code's salt if it is present.
func (*Client) BocGetCompilerVersion ¶
func (c *Client) BocGetCompilerVersion(p *ParamsOfGetCompilerVersion) (*ResultOfGetCompilerVersion, error)
Returns the compiler version used to compile the code.
func (*Client) BocParseAccount ¶
func (c *Client) BocParseAccount(p *ParamsOfParse) (*ResultOfParse, error)
Parses account boc into a JSON. JSON structure is compatible with GraphQL API account object.
func (*Client) BocParseBlock ¶
func (c *Client) BocParseBlock(p *ParamsOfParse) (*ResultOfParse, error)
Parses block boc into a JSON. JSON structure is compatible with GraphQL API block object.
func (*Client) BocParseMessage ¶
func (c *Client) BocParseMessage(p *ParamsOfParse) (*ResultOfParse, error)
Parses message boc into a JSON. JSON structure is compatible with GraphQL API message object.
func (*Client) BocParseShardstate ¶
func (c *Client) BocParseShardstate(p *ParamsOfParseShardstate) (*ResultOfParse, error)
Parses shardstate boc into a JSON. JSON structure is compatible with GraphQL API shardstate object.
func (*Client) BocParseTransaction ¶
func (c *Client) BocParseTransaction(p *ParamsOfParse) (*ResultOfParse, error)
Parses transaction boc into a JSON. JSON structure is compatible with GraphQL API transaction object.
func (*Client) BocSetCodeSalt ¶
func (c *Client) BocSetCodeSalt(p *ParamsOfSetCodeSalt) (*ResultOfSetCodeSalt, error)
Sets new salt to contract code. Returns the new contract code with salt.
func (*Client) ClientBuildInfo ¶
func (c *Client) ClientBuildInfo() (*ResultOfBuildInfo, error)
Returns detailed information about this build.
func (*Client) ClientConfig ¶
Returns Core Library API reference.
func (*Client) ClientGetAPIReference ¶
func (c *Client) ClientGetAPIReference() (*spec.APIReference, error)
ClientGetAPIReference loads and parses JSON API spec.
func (*Client) ClientResolveAppRequest ¶
func (c *Client) ClientResolveAppRequest(p *ParamsOfResolveAppRequest) error
Resolves application request processing result.
func (*Client) ClientVersion ¶
func (c *Client) ClientVersion() (*ResultOfVersion, error)
Returns Core Library version.
func (*Client) CryptoChacha20 ¶
func (c *Client) CryptoChacha20(p *ParamsOfChaCha20) (*ResultOfChaCha20, error)
Performs symmetric `chacha20` encryption.
func (*Client) CryptoClearCryptoBoxSecretCache ¶
func (c *Client) CryptoClearCryptoBoxSecretCache(p *RegisteredCryptoBox) error
Removes cached secrets (overwrites with zeroes) from all signing and encryption boxes, derived from crypto box.
func (*Client) CryptoConvertPublicKeyToTonSafeFormat ¶
func (c *Client) CryptoConvertPublicKeyToTonSafeFormat(p *ParamsOfConvertPublicKeyToTonSafeFormat) (*ResultOfConvertPublicKeyToTonSafeFormat, error)
Converts public key to ton safe_format.
func (*Client) CryptoCreateCryptoBox ¶
func (c *Client) CryptoCreateCryptoBox(p *ParamsOfCreateCryptoBox, app AppPasswordProvider) (*RegisteredCryptoBox, error)
func (*Client) CryptoCreateEncryptionBox ¶
func (c *Client) CryptoCreateEncryptionBox(p *ParamsOfCreateEncryptionBox) (*RegisteredEncryptionBox, error)
Creates encryption box with specified algorithm.
func (*Client) CryptoEncryptionBoxDecrypt ¶
func (c *Client) CryptoEncryptionBoxDecrypt(p *ParamsOfEncryptionBoxDecrypt) (*ResultOfEncryptionBoxDecrypt, error)
Decrypts data using given encryption box Note. Block cipher algorithms pad data to cipher block size so encrypted data can be longer then original data. Client should store the original data size after encryption and use it after decryption to retrieve the original data from decrypted data.
func (*Client) CryptoEncryptionBoxEncrypt ¶
func (c *Client) CryptoEncryptionBoxEncrypt(p *ParamsOfEncryptionBoxEncrypt) (*ResultOfEncryptionBoxEncrypt, error)
Encrypts data using given encryption box Note. Block cipher algorithms pad data to cipher block size so encrypted data can be longer then original data. Client should store the original data size after encryption and use it after decryption to retrieve the original data from decrypted data.
func (*Client) CryptoEncryptionBoxGetInfo ¶
func (c *Client) CryptoEncryptionBoxGetInfo(p *ParamsOfEncryptionBoxGetInfo) (*ResultOfEncryptionBoxGetInfo, error)
Queries info from the given encryption box.
func (*Client) CryptoFactorize ¶
func (c *Client) CryptoFactorize(p *ParamsOfFactorize) (*ResultOfFactorize, error)
Integer factorization. Performs prime factorization – decomposition of a composite number into a product of smaller prime integers (factors). See [https://en.wikipedia.org/wiki/Integer_factorization].
func (*Client) CryptoGenerateRandomBytes ¶
func (c *Client) CryptoGenerateRandomBytes(p *ParamsOfGenerateRandomBytes) (*ResultOfGenerateRandomBytes, error)
Generates random byte array of the specified length and returns it in `base64` format.
func (*Client) CryptoGenerateRandomSignKeys ¶
Generates random ed25519 key pair.
func (*Client) CryptoGetCryptoBoxInfo ¶
func (c *Client) CryptoGetCryptoBoxInfo(p *RegisteredCryptoBox) (*ResultOfGetCryptoBoxInfo, error)
Get Crypto Box Info. Used to get `encrypted_secret` that should be used for all the cryptobox initializations except the first one.
func (*Client) CryptoGetCryptoBoxSeedPhrase ¶
func (c *Client) CryptoGetCryptoBoxSeedPhrase(p *RegisteredCryptoBox) (*ResultOfGetCryptoBoxSeedPhrase, error)
Get Crypto Box Seed Phrase. Attention! Store this data in your application for a very short period of time and overwrite it with zeroes ASAP.
func (*Client) CryptoGetEncryptionBoxFromCryptoBox ¶
func (c *Client) CryptoGetEncryptionBoxFromCryptoBox(p *ParamsOfGetEncryptionBoxFromCryptoBox) (*RegisteredEncryptionBox, error)
Gets Encryption Box from Crypto Box. Derives encryption keypair from cryptobox secret and hdpath and stores it in cache for `secret_lifetime` or until explicitly cleared by `clear_crypto_box_secret_cache` method. If `secret_lifetime` is not specified - overwrites encryption secret with zeroes immediately after encryption operation.
func (*Client) CryptoGetSigningBox ¶
func (c *Client) CryptoGetSigningBox(p *KeyPair) (*RegisteredSigningBox, error)
Creates a default signing box implementation.
func (*Client) CryptoGetSigningBoxFromCryptoBox ¶
func (c *Client) CryptoGetSigningBoxFromCryptoBox(p *ParamsOfGetSigningBoxFromCryptoBox) (*RegisteredSigningBox, error)
Get handle of Signing Box derived from Crypto Box.
func (*Client) CryptoHdkeyDeriveFromXprv ¶
func (c *Client) CryptoHdkeyDeriveFromXprv(p *ParamsOfHDKeyDeriveFromXPrv) (*ResultOfHDKeyDeriveFromXPrv, error)
Returns extended private key derived from the specified extended private key and child index.
func (*Client) CryptoHdkeyDeriveFromXprvPath ¶
func (c *Client) CryptoHdkeyDeriveFromXprvPath(p *ParamsOfHDKeyDeriveFromXPrvPath) (*ResultOfHDKeyDeriveFromXPrvPath, error)
Derives the extended private key from the specified key and path.
func (*Client) CryptoHdkeyPublicFromXprv ¶
func (c *Client) CryptoHdkeyPublicFromXprv(p *ParamsOfHDKeyPublicFromXPrv) (*ResultOfHDKeyPublicFromXPrv, error)
Extracts the public key from the serialized extended private key.
func (*Client) CryptoHdkeySecretFromXprv ¶
func (c *Client) CryptoHdkeySecretFromXprv(p *ParamsOfHDKeySecretFromXPrv) (*ResultOfHDKeySecretFromXPrv, error)
Extracts the private key from the serialized extended private key.
func (*Client) CryptoHdkeyXprvFromMnemonic ¶
func (c *Client) CryptoHdkeyXprvFromMnemonic(p *ParamsOfHDKeyXPrvFromMnemonic) (*ResultOfHDKeyXPrvFromMnemonic, error)
Generates an extended master private key that will be the root for all the derived keys.
func (*Client) CryptoMnemonicDeriveSignKeys ¶
func (c *Client) CryptoMnemonicDeriveSignKeys(p *ParamsOfMnemonicDeriveSignKeys) (*KeyPair, error)
Derives a key pair for signing from the seed phrase. Validates the seed phrase, generates master key and then derives the key pair from the master key and the specified path.
func (*Client) CryptoMnemonicFromEntropy ¶
func (c *Client) CryptoMnemonicFromEntropy(p *ParamsOfMnemonicFromEntropy) (*ResultOfMnemonicFromEntropy, error)
Generates mnemonic from pre-generated entropy.
func (*Client) CryptoMnemonicFromRandom ¶
func (c *Client) CryptoMnemonicFromRandom(p *ParamsOfMnemonicFromRandom) (*ResultOfMnemonicFromRandom, error)
Generates a random mnemonic from the specified dictionary and word count.
func (*Client) CryptoMnemonicVerify ¶
func (c *Client) CryptoMnemonicVerify(p *ParamsOfMnemonicVerify) (*ResultOfMnemonicVerify, error)
Validates a mnemonic phrase. The phrase supplied will be checked for word length and validated according to the checksum specified in BIP0039.
func (*Client) CryptoMnemonicWords ¶
func (c *Client) CryptoMnemonicWords(p *ParamsOfMnemonicWords) (*ResultOfMnemonicWords, error)
Prints the list of words from the specified dictionary.
func (*Client) CryptoModularPower ¶
func (c *Client) CryptoModularPower(p *ParamsOfModularPower) (*ResultOfModularPower, error)
Modular exponentiation. Performs modular exponentiation for big integers (`base`^`exponent` mod `modulus`). See [https://en.wikipedia.org/wiki/Modular_exponentiation].
func (*Client) CryptoNaclBox ¶
func (c *Client) CryptoNaclBox(p *ParamsOfNaclBox) (*ResultOfNaclBox, error)
Public key authenticated encryption. Encrypt and authenticate a message using the senders secret key, the receivers public key, and a nonce.
func (*Client) CryptoNaclBoxKeypair ¶
Generates a random NaCl key pair.
func (*Client) CryptoNaclBoxKeypairFromSecretKey ¶
func (c *Client) CryptoNaclBoxKeypairFromSecretKey(p *ParamsOfNaclBoxKeyPairFromSecret) (*KeyPair, error)
Generates key pair from a secret key.
func (*Client) CryptoNaclBoxOpen ¶
func (c *Client) CryptoNaclBoxOpen(p *ParamsOfNaclBoxOpen) (*ResultOfNaclBoxOpen, error)
Decrypt and verify the cipher text using the receivers secret key, the senders public key, and the nonce.
func (*Client) CryptoNaclSecretBox ¶
func (c *Client) CryptoNaclSecretBox(p *ParamsOfNaclSecretBox) (*ResultOfNaclBox, error)
Encrypt and authenticate message using nonce and secret key.
func (*Client) CryptoNaclSecretBoxOpen ¶
func (c *Client) CryptoNaclSecretBoxOpen(p *ParamsOfNaclSecretBoxOpen) (*ResultOfNaclBoxOpen, error)
Decrypts and verifies cipher text using `nonce` and secret `key`.
func (*Client) CryptoNaclSign ¶
func (c *Client) CryptoNaclSign(p *ParamsOfNaclSign) (*ResultOfNaclSign, error)
Signs data using the signer's secret key.
func (*Client) CryptoNaclSignDetached ¶
func (c *Client) CryptoNaclSignDetached(p *ParamsOfNaclSign) (*ResultOfNaclSignDetached, error)
Signs the message using the secret key and returns a signature. Signs the message `unsigned` using the secret key `secret` and returns a signature `signature`.
func (*Client) CryptoNaclSignDetachedVerify ¶
func (c *Client) CryptoNaclSignDetachedVerify(p *ParamsOfNaclSignDetachedVerify) (*ResultOfNaclSignDetachedVerify, error)
Verifies the signature with public key and `unsigned` data.
func (*Client) CryptoNaclSignKeypairFromSecretKey ¶
func (c *Client) CryptoNaclSignKeypairFromSecretKey(p *ParamsOfNaclSignKeyPairFromSecret) (*KeyPair, error)
Generates a key pair for signing from the secret key. **NOTE:** In the result the secret key is actually the concatenation of secret and public keys (128 symbols hex string) by design of [NaCL](http://nacl.cr.yp.to/sign.html). See also [the stackexchange question](https://crypto.stackexchange.com/questions/54353/).
func (*Client) CryptoNaclSignOpen ¶
func (c *Client) CryptoNaclSignOpen(p *ParamsOfNaclSignOpen) (*ResultOfNaclSignOpen, error)
Verifies the signature and returns the unsigned message. Verifies the signature in `signed` using the signer's public key `public` and returns the message `unsigned`.
If the signature fails verification, crypto_sign_open raises an exception.
func (*Client) CryptoRegisterEncryptionBox ¶
func (c *Client) CryptoRegisterEncryptionBox(app AppEncryptionBox) (*RegisteredEncryptionBox, error)
func (*Client) CryptoRegisterSigningBox ¶
func (c *Client) CryptoRegisterSigningBox(app AppSigningBox) (*RegisteredSigningBox, error)
func (*Client) CryptoRemoveCryptoBox ¶
func (c *Client) CryptoRemoveCryptoBox(p *RegisteredCryptoBox) error
Removes Crypto Box. Clears all secret data.
func (*Client) CryptoRemoveEncryptionBox ¶
func (c *Client) CryptoRemoveEncryptionBox(p *RegisteredEncryptionBox) error
Removes encryption box from SDK.
func (*Client) CryptoRemoveSigningBox ¶
func (c *Client) CryptoRemoveSigningBox(p *RegisteredSigningBox) error
Removes signing box from SDK.
func (*Client) CryptoScrypt ¶
func (c *Client) CryptoScrypt(p *ParamsOfScrypt) (*ResultOfScrypt, error)
Perform `scrypt` encryption. Derives key from `password` and `key` using `scrypt` algorithm. See [https://en.wikipedia.org/wiki/Scrypt].
# Arguments - `log_n` - The log2 of the Scrypt parameter `N` - `r` - The Scrypt parameter `r` - `p` - The Scrypt parameter `p` # Conditions - `log_n` must be less than `64` - `r` must be greater than `0` and less than or equal to `4294967295` - `p` must be greater than `0` and less than `4294967295` # Recommended values sufficient for most use-cases - `log_n = 15` (`n = 32768`) - `r = 8` - `p = 1`.
func (*Client) CryptoSha256 ¶
func (c *Client) CryptoSha256(p *ParamsOfHash) (*ResultOfHash, error)
Calculates SHA256 hash of the specified data.
func (*Client) CryptoSha512 ¶
func (c *Client) CryptoSha512(p *ParamsOfHash) (*ResultOfHash, error)
Calculates SHA512 hash of the specified data.
func (*Client) CryptoSign ¶
func (c *Client) CryptoSign(p *ParamsOfSign) (*ResultOfSign, error)
Signs a data using the provided keys.
func (*Client) CryptoSigningBoxGetPublicKey ¶
func (c *Client) CryptoSigningBoxGetPublicKey(p *RegisteredSigningBox) (*ResultOfSigningBoxGetPublicKey, error)
Returns public key of signing key pair.
func (*Client) CryptoSigningBoxSign ¶
func (c *Client) CryptoSigningBoxSign(p *ParamsOfSigningBoxSign) (*ResultOfSigningBoxSign, error)
Returns signed user data.
func (*Client) CryptoTonCrc16 ¶
func (c *Client) CryptoTonCrc16(p *ParamsOfTonCrc16) (*ResultOfTonCrc16, error)
Calculates CRC16 using TON algorithm.
func (*Client) CryptoVerifySignature ¶
func (c *Client) CryptoVerifySignature(p *ParamsOfVerifySignature) (*ResultOfVerifySignature, error)
Verifies signed data using the provided public key. Raises error if verification is failed.
func (*Client) DebotExecute ¶
func (c *Client) DebotExecute(p *ParamsOfExecute) error
[UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md) Executes debot action. Calls debot engine referenced by debot handle to execute input action. Calls Debot Browser Callbacks if needed.
# Remarks Chain of actions can be executed if input action generates a list of subactions.
func (*Client) DebotFetch ¶
func (c *Client) DebotFetch(p *ParamsOfFetch) (*ResultOfFetch, error)
[UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md) Fetches DeBot metadata from blockchain. Downloads DeBot from blockchain and creates and fetches its metadata.
func (*Client) DebotInit ¶
func (c *Client) DebotInit(p *ParamsOfInit, app AppDebotBrowser) (*RegisteredDebot, error)
func (*Client) DebotRemove ¶
func (c *Client) DebotRemove(p *ParamsOfRemove) error
[UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md) Destroys debot handle. Removes handle from Client Context and drops debot engine referenced by that handle.
func (*Client) DebotSend ¶
func (c *Client) DebotSend(p *ParamsOfSend) error
[UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md) Sends message to Debot. Used by Debot Browser to send response on Dinterface call or from other Debots.
func (*Client) DebotStart ¶
func (c *Client) DebotStart(p *ParamsOfStart) error
[UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md) Starts the DeBot. Downloads debot smart contract from blockchain and switches it to context zero.
This function must be used by Debot Browser to start a dialog with debot. While the function is executing, several Browser Callbacks can be called, since the debot tries to display all actions from the context 0 to the user.
When the debot starts SDK registers `BrowserCallbacks` AppObject. Therefore when `debote.remove` is called the debot is being deleted and the callback is called with `finish`=`true` which indicates that it will never be used again.
func (*Client) NetAggregateCollection ¶
func (c *Client) NetAggregateCollection(p *ParamsOfAggregateCollection) (*ResultOfAggregateCollection, error)
Aggregates collection data. Aggregates values from the specified `fields` for records that satisfies the `filter` conditions,.
func (*Client) NetBatchQuery ¶
func (c *Client) NetBatchQuery(p *ParamsOfBatchQuery) (*ResultOfBatchQuery, error)
Performs multiple queries per single fetch.
func (*Client) NetCreateBlockIterator ¶
func (c *Client) NetCreateBlockIterator(p *ParamsOfCreateBlockIterator) (*RegisteredIterator, error)
Creates block iterator. Block iterator uses robust iteration methods that guaranties that every block in the specified range isn't missed or iterated twice.
Iterated range can be reduced with some filters: - `start_time` – the bottom time range. Only blocks with `gen_utime` more or equal to this value is iterated. If this parameter is omitted then there is no bottom time edge, so all blocks since zero state is iterated. - `end_time` – the upper time range. Only blocks with `gen_utime` less then this value is iterated. If this parameter is omitted then there is no upper time edge, so iterator never finishes. - `shard_filter` – workchains and shard prefixes that reduce the set of interesting blocks. Block conforms to the shard filter if it belongs to the filter workchain and the first bits of block's `shard` fields matches to the shard prefix. Only blocks with suitable shard are iterated.
Items iterated is a JSON objects with block data. The minimal set of returned fields is: ```text id gen_utime workchain_id shard after_split after_merge prev_ref { root_hash } prev_alt_ref { root_hash } ``` Application can request additional fields in the `result` parameter.
Application should call the `remove_iterator` when iterator is no longer required.
func (*Client) NetCreateTransactionIterator ¶
func (c *Client) NetCreateTransactionIterator(p *ParamsOfCreateTransactionIterator) (*RegisteredIterator, error)
Creates transaction iterator. Transaction iterator uses robust iteration methods that guaranty that every transaction in the specified range isn't missed or iterated twice.
Iterated range can be reduced with some filters: - `start_time` – the bottom time range. Only transactions with `now` more or equal to this value are iterated. If this parameter is omitted then there is no bottom time edge, so all the transactions since zero state are iterated. - `end_time` – the upper time range. Only transactions with `now` less then this value are iterated. If this parameter is omitted then there is no upper time edge, so iterator never finishes. - `shard_filter` – workchains and shard prefixes that reduce the set of interesting accounts. Account address conforms to the shard filter if it belongs to the filter workchain and the first bits of address match to the shard prefix. Only transactions with suitable account addresses are iterated. - `accounts_filter` – set of account addresses whose transactions must be iterated. Note that accounts filter can conflict with shard filter so application must combine these filters carefully.
Iterated item is a JSON objects with transaction data. The minimal set of returned fields is: ```text id account_addr now balance_delta(format:DEC) bounce { bounce_type } in_message { id value(format:DEC) msg_type src } out_messages { id value(format:DEC) msg_type dst } ``` Application can request an additional fields in the `result` parameter.
Another parameter that affects on the returned fields is the `include_transfers`. When this parameter is `true` the iterator computes and adds `transfer` field containing list of the useful `TransactionTransfer` objects. Each transfer is calculated from the particular message related to the transaction and has the following structure: - message – source message identifier. - isBounced – indicates that the transaction is bounced, which means the value will be returned back to the sender. - isDeposit – indicates that this transfer is the deposit (true) or withdraw (false). - counterparty – account address of the transfer source or destination depending on `isDeposit`. - value – amount of nano tokens transferred. The value is represented as a decimal string because the actual value can be more precise than the JSON number can represent. Application must use this string carefully – conversion to number can follow to loose of precision.
Application should call the `remove_iterator` when iterator is no longer required.
func (*Client) NetFetchEndpoints ¶
func (c *Client) NetFetchEndpoints() (*EndpointsSet, error)
Requests the list of alternative endpoints from server.
func (*Client) NetFindLastShardBlock ¶
func (c *Client) NetFindLastShardBlock(p *ParamsOfFindLastShardBlock) (*ResultOfFindLastShardBlock, error)
Returns ID of the last block in a specified account shard.
func (*Client) NetGetEndpoints ¶
func (c *Client) NetGetEndpoints() (*ResultOfGetEndpoints, error)
Requests the list of alternative endpoints from server.
func (*Client) NetGetSignatureId ¶ added in v1.41.0
func (c *Client) NetGetSignatureId() (*ResultOfGetSignatureId, error)
Returns signature ID for configured network if it should be used in messages signature.
func (*Client) NetIteratorNext ¶
func (c *Client) NetIteratorNext(p *ParamsOfIteratorNext) (*ResultOfIteratorNext, error)
Returns next available items. In addition to available items this function returns the `has_more` flag indicating that the iterator isn't reach the end of the iterated range yet.
This function can return the empty list of available items but indicates that there are more items is available. This situation appears when the iterator doesn't reach iterated range but database doesn't contains available items yet.
If application requests resume state in `return_resume_state` parameter then this function returns `resume_state` that can be used later to resume the iteration from the position after returned items.
The structure of the items returned depends on the iterator used. See the description to the appropriated iterator creation function.
func (*Client) NetQuery ¶
func (c *Client) NetQuery(p *ParamsOfQuery) (*ResultOfQuery, error)
Performs DAppServer GraphQL query.
func (*Client) NetQueryCollection ¶
func (c *Client) NetQueryCollection(p *ParamsOfQueryCollection) (*ResultOfQueryCollection, error)
Queries collection data. Queries data that satisfies the `filter` conditions, limits the number of returned records and orders them. The projection fields are limited to `result` fields.
func (*Client) NetQueryCounterparties ¶
func (c *Client) NetQueryCounterparties(p *ParamsOfQueryCounterparties) (*ResultOfQueryCollection, error)
Allows to query and paginate through the list of accounts that the specified account has interacted with, sorted by the time of the last internal message between accounts. *Attention* this query retrieves data from 'Counterparties' service which is not supported in the opensource version of DApp Server (and will not be supported) as well as in Evernode SE (will be supported in SE in future), but is always accessible via [EVER OS Clouds](../ton-os-api/networks.md).
func (*Client) NetQueryTransactionTree ¶
func (c *Client) NetQueryTransactionTree(p *ParamsOfQueryTransactionTree) (*ResultOfQueryTransactionTree, error)
Returns a tree of transactions triggered by a specific message. Performs recursive retrieval of a transactions tree produced by a specific message: in_msg -> dst_transaction -> out_messages -> dst_transaction -> ... If the chain of transactions execution is in progress while the function is running, it will wait for the next transactions to appear until the full tree or more than 50 transactions are received.
All the retrieved messages and transactions are included into `result.messages` and `result.transactions` respectively.
Function reads transactions layer by layer, by pages of 20 transactions.
The retrieval process goes like this: Let's assume we have an infinite chain of transactions and each transaction generates 5 messages. 1. Retrieve 1st message (input parameter) and corresponding transaction - put it into result. It is the first level of the tree of transactions - its root. Retrieve 5 out message ids from the transaction for next steps. 2. Retrieve 5 messages and corresponding transactions on the 2nd layer. Put them into result. Retrieve 5*5 out message ids from these transactions for next steps 3. Retrieve 20 (size of the page) messages and transactions (3rd layer) and 20*5=100 message ids (4th layer). 4. Retrieve the last 5 messages and 5 transactions on the 3rd layer + 15 messages and transactions (of 100) from the 4th layer + 25 message ids of the 4th layer + 75 message ids of the 5th layer. 5. Retrieve 20 more messages and 20 more transactions of the 4th layer + 100 more message ids of the 5th layer. 6. Now we have 1+5+20+20+20 = 66 transactions, which is more than 50. Function exits with the tree of 1m->1t->5m->5t->25m->25t->35m->35t. If we see any message ids in the last transactions out_msgs, which don't have corresponding messages in the function result, it means that the full tree was not received and we need to continue iteration.
To summarize, it is guaranteed that each message in `result.messages` has the corresponding transaction in the `result.transactions`. But there is no guarantee that all messages from transactions `out_msgs` are presented in `result.messages`. So the application has to continue retrieval for missing messages if it requires.
func (*Client) NetRemoveIterator ¶
func (c *Client) NetRemoveIterator(p *RegisteredIterator) error
Removes an iterator. Frees all resources allocated in library to serve iterator.
Application always should call the `remove_iterator` when iterator is no longer required.
func (*Client) NetResumeBlockIterator ¶
func (c *Client) NetResumeBlockIterator(p *ParamsOfResumeBlockIterator) (*RegisteredIterator, error)
Resumes block iterator. The iterator stays exactly at the same position where the `resume_state` was caught.
Application should call the `remove_iterator` when iterator is no longer required.
func (*Client) NetResumeTransactionIterator ¶
func (c *Client) NetResumeTransactionIterator(p *ParamsOfResumeTransactionIterator) (*RegisteredIterator, error)
Resumes transaction iterator. The iterator stays exactly at the same position where the `resume_state` was caught. Note that `resume_state` doesn't store the account filter. If the application requires to use the same account filter as it was when the iterator was created then the application must pass the account filter again in `accounts_filter` parameter.
Application should call the `remove_iterator` when iterator is no longer required.
func (*Client) NetSetEndpoints ¶
func (c *Client) NetSetEndpoints(p *EndpointsSet) error
Sets the list of endpoints to use on reinit.
func (*Client) NetSubscribe ¶
func (c *Client) NetSubscribe(p *ParamsOfSubscribe) (<-chan *RawResponse, *ResultOfSubscribeCollection, error)
NetSubscribe Creates a subscription.
The subscription is a persistent communication channel between client and Everscale Network.
### Important Notes on Subscriptions
Unfortunately sometimes the connection with the network brakes down. In this situation the library attempts to reconnect to the network. This reconnection sequence can take significant time. All of this time the client is disconnected from the network. Bad news is that all changes that happened while the client was disconnected are lost.
Good news is that the client report errors to the callback when it loses and resumes connection.
So, if the lost changes are important to the application then the application must handle these error reports.
Library reports errors with `responseType` == 101 and the error object passed via `params`. When the library has successfully reconnected the application receives callback with `responseType` == 101 and `params.code` == 614 (NetworkModuleResumed). Application can use several ways to handle this situation: - If application monitors changes for the single object (for example specific account): application can perform a query for this object and handle actual data as a regular data from the subscription. - If application monitors sequence of some objects (for example transactions of the specific account): application must refresh all cached (or visible to user) lists where this sequences presents.
func (*Client) NetSubscribeCollection ¶
func (c *Client) NetSubscribeCollection(p *ParamsOfSubscribeCollection) (<-chan json.RawMessage, *ResultOfSubscribeCollection, error)
NetSubscribeCollection Creates a subscription with unmarshalled to interface{} data.
Triggers for each insert/update of data that satisfies the `filter` conditions. The projection fields are limited to `result` fields.
func (*Client) NetSuspend ¶
Suspends network module to stop any network activity.
func (*Client) NetUnsubscribe ¶
func (c *Client) NetUnsubscribe(p *ResultOfSubscribeCollection) error
Cancels a subscription specified by its handle.
func (*Client) NetWaitForCollection ¶
func (c *Client) NetWaitForCollection(p *ParamsOfWaitForCollection) (*ResultOfWaitForCollection, error)
Returns an object that fulfills the conditions or waits for its appearance. Triggers only once. If object that satisfies the `filter` conditions already exists - returns it immediately. If not - waits for insert/update of data within the specified `timeout`, and returns it. The projection fields are limited to `result` fields.
func (*Client) ProcessingCancelMonitor ¶ added in v1.42.1
func (c *Client) ProcessingCancelMonitor(p *ParamsOfCancelMonitor) error
Cancels all background activity and releases all allocated system resources for the specified monitoring queue.
func (*Client) ProcessingFetchNextMonitorResults ¶ added in v1.42.1
func (c *Client) ProcessingFetchNextMonitorResults(p *ParamsOfFetchNextMonitorResults) (*ResultOfFetchNextMonitorResults, error)
Fetches next resolved results from the specified monitoring queue. Results and waiting options are depends on the `wait` parameter. All returned results will be removed from the queue's resolved list.
func (*Client) ProcessingGetMonitorInfo ¶ added in v1.42.1
func (c *Client) ProcessingGetMonitorInfo(p *ParamsOfGetMonitorInfo) (*MonitoringQueueInfo, error)
Returns summary information about current state of the specified monitoring queue.
func (*Client) ProcessingMonitorMessages ¶ added in v1.42.1
func (c *Client) ProcessingMonitorMessages(p *ParamsOfMonitorMessages) error
Starts monitoring for the processing results of the specified messages. Message monitor performs background monitoring for a message processing results for the specified set of messages.
Message monitor can serve several isolated monitoring queues. Each monitor queue has a unique application defined identifier (or name) used to separate several queue's.
There are two important lists inside of the monitoring queue:
- unresolved messages: contains messages requested by the application for monitoring and not yet resolved;
- resolved results: contains resolved processing results for monitored messages.
Each monitoring queue tracks own unresolved and resolved lists. Application can add more messages to the monitoring queue at any time.
Message monitor accumulates resolved results. Application should fetch this results with `fetchNextMonitorResults` function.
When both unresolved and resolved lists becomes empty, monitor stops any background activity and frees all allocated internal memory.
If monitoring queue with specified name already exists then messages will be added to the unresolved list.
If monitoring queue with specified name does not exist then monitoring queue will be created with specified unresolved messages.
func (*Client) ProcessingProcessMessage ¶
func (c *Client) ProcessingProcessMessage(p *ParamsOfProcessMessage, callback EventCallback) (*ResultOfProcessMessage, error)
ProcessingProcessMessage Creates message, sends it to the network and monitors its processing.
Creates ABI-compatible message, sends it to the network and monitors for the result transaction. Decodes the output message's bodies.
If contract's ABI includes "expire" header then SDK implements retries in case of unsuccessful message delivery within the expiration timeout: SDK recreates the message, sends it and processes it again.
The intermediate events, such as `WillFetchFirstBlock`, `WillSend`, `DidSend`, `WillFetchNextBlock`, etc - are switched on/off by `send_events` flag and logged into the supplied callback function. The retry configuration parameters are defined in config: <add correct config params here> pub const DEFAULT_EXPIRATION_RETRIES_LIMIT: i8 = 3; - max number of retries pub const DEFAULT_EXPIRATION_TIMEOUT: u32 = 40000; - message expiration timeout in ms. pub const DEFAULT_....expiration_timeout_grow_factor... = 1.5 - factor that increases the expiration timeout for each retry
If contract's ABI does not include "expire" header then if no transaction is found within the network timeout (see config parameter ), exits with error.
func (*Client) ProcessingSendMessage ¶
func (c *Client) ProcessingSendMessage(p *ParamsOfSendMessage, callback EventCallback) (*ResultOfSendMessage, error)
ProcessingSendMessage Sends message to the network
Sends message to the network and returns the last generated shard block of the destination account before the message was sent. It will be required later for message processing.
func (*Client) ProcessingSendMessages ¶ added in v1.42.1
func (c *Client) ProcessingSendMessages(p *ParamsOfSendMessages) (*ResultOfSendMessages, error)
Sends specified messages to the blockchain.
func (*Client) ProcessingWaitForTransaction ¶
func (c *Client) ProcessingWaitForTransaction(p *ParamsOfWaitForTransaction, callback EventCallback) (*ResultOfProcessMessage, error)
ProcessingWaitForTransaction Performs monitoring of the network for the result transaction of the external inbound message processing.
`send_events` enables intermediate events, such as `WillFetchNextBlock`, `FetchNextBlockFailed` that may be useful for logging of new shard blocks creation during message processing.
Note that presence of the `abi` parameter is critical for ABI compliant contracts. Message processing uses drastically different strategy for processing message for contracts which ABI includes "expire" header.
When the ABI header `expire` is present, the processing uses `message expiration` strategy:
- The maximum block gen time is set to `message_expiration_time + transaction_wait_timeout`.
- When maximum block gen time is reached the processing will be finished with `MessageExpired` error.
When the ABI header `expire` isn't present or `abi` parameter isn't specified, the processing uses `transaction waiting` strategy:
- The maximum block gen time is set to `now() + transaction_wait_timeout`.
- If maximum block gen time is reached and no result transaction is found the processing will exit with an error.
func (*Client) ProofsProofBlockData ¶
func (c *Client) ProofsProofBlockData(p *ParamsOfProofBlockData) error
Proves that a given block's data, which is queried from TONOS API, can be trusted. This function checks block proofs and compares given data with the proven. If the given data differs from the proven, the exception will be thrown. The input param is a single block's JSON object, which was queried from DApp server using functions such as `net.query`, `net.query_collection` or `net.wait_for_collection`. If block's BOC is not provided in the JSON, it will be queried from DApp server (in this case it is required to provide at least `id` of block).
Please note, that joins (like `signatures` in `Block`) are separated entities and not supported, so function will throw an exception in a case if JSON being checked has such entities in it.
If `cache_in_local_storage` in config is set to `true` (default), downloaded proofs and master-chain BOCs are saved into the persistent local storage (e.g. file system for native environments or browser's IndexedDB for the web); otherwise all the data is cached only in memory in current client's context and will be lost after destruction of the client.
**Why Proofs are needed**
Proofs are needed to ensure that the data downloaded from a DApp server is real blockchain data. Checking proofs can protect from the malicious DApp server which can potentially provide fake data, or also from "Man in the Middle" attacks class.
**What Proofs are**
Simply, proof is a list of signatures of validators', which have signed this particular master- block.
The very first validator set's public keys are included in the zero-state. Whe know a root hash of the zero-state, because it is stored in the network configuration file, it is our authority root. For proving zero-state it is enough to calculate and compare its root hash.
In each new validator cycle the validator set is changed. The new one is stored in a key-block, which is signed by the validator set, which we already trust, the next validator set will be stored to the new key-block and signed by the current validator set, and so on.
In order to prove any block in the master-chain we need to check, that it has been signed by a trusted validator set. So we need to check all key-blocks' proofs, started from the zero-state and until the block, which we want to prove. But it can take a lot of time and traffic to download and prove all key-blocks on a client. For solving this, special trusted blocks are used in Ever-SDK.
The trusted block is the authority root, as well, as the zero-state. Each trusted block is the `id` (e.g. `root_hash`) of the already proven key-block. There can be plenty of trusted blocks, so there can be a lot of authority roots. The hashes of trusted blocks for MainNet and DevNet are hardcoded in SDK in a separated binary file (trusted_key_blocks.bin) and is being updated for each release by using `update_trusted_blocks` utility.
See [update_trusted_blocks](../../../tools/update_trusted_blocks) directory for more info.
In future SDK releases, one will also be able to provide their hashes of trusted blocks for other networks, besides for MainNet and DevNet. By using trusted key-blocks, in order to prove any block, we can prove chain of key-blocks to the closest previous trusted key-block, not only to the zero-state.
But shard-blocks don't have proofs on DApp server. In this case, in order to prove any shard- block data, we search for a corresponding master-block, which contains the root hash of this shard-block, or some shard block which is linked to that block in shard-chain. After proving this master-block, we traverse through each link and calculate and compare hashes with links, one-by-one. After that we can ensure that this shard-block has also been proven.
func (*Client) ProofsProofMessageData ¶
func (c *Client) ProofsProofMessageData(p *ParamsOfProofMessageData) error
Proves that a given message's data, which is queried from TONOS API, can be trusted. This function first proves the corresponding transaction, ensures that the proven transaction refers to the given message and compares given data with the proven. If the given data differs from the proven, the exception will be thrown. The input parameter is a single message's JSON object (see params description), which was queried from TONOS API using functions such as `net.query`, `net.query_collection` or `net.wait_for_collection`.
If message's BOC and/or non-null `src_transaction.id` or `dst_transaction.id` are not provided in the JSON, they will be queried from TONOS API.
Please note, that joins (like `block`, `dst_account`, `dst_transaction`, `src_account`, `src_transaction`, etc. in `Message` entity) are separated entities and not supported, so function will throw an exception in a case if JSON being checked has such entities in it.
For more information about proofs checking, see description of `proof_block_data` function.
func (*Client) ProofsProofTransactionData ¶
func (c *Client) ProofsProofTransactionData(p *ParamsOfProofTransactionData) error
Proves that a given transaction's data, which is queried from TONOS API, can be trusted. This function requests the corresponding block, checks block proofs, ensures that given transaction exists in the proven block and compares given data with the proven. If the given data differs from the proven, the exception will be thrown. The input parameter is a single transaction's JSON object (see params description), which was queried from TONOS API using functions such as `net.query`, `net.query_collection` or `net.wait_for_collection`.
If transaction's BOC and/or `block_id` are not provided in the JSON, they will be queried from TONOS API.
Please note, that joins (like `account`, `in_message`, `out_messages`, etc. in `Transaction` entity) are separated entities and not supported, so function will throw an exception in a case if JSON being checked has such entities in it.
For more information about proofs checking, see description of `proof_block_data` function.
func (*Client) TvmRunExecutor ¶
func (c *Client) TvmRunExecutor(p *ParamsOfRunExecutor) (*ResultOfRunExecutor, error)
Emulates all the phases of contract execution locally. Performs all the phases of contract execution on Transaction Executor - the same component that is used on Validator Nodes.
Can be used for contract debugging, to find out the reason why a message was not delivered successfully. Validators throw away the failed external inbound messages (if they failed before `ACCEPT`) in the real network. This is why these messages are impossible to debug in the real network. With the help of run_executor you can do that. In fact, `process_message` function performs local check with `run_executor` if there was no transaction as a result of processing and returns the error, if there is one.
Another use case to use `run_executor` is to estimate fees for message execution. Set `AccountForExecutor::Account.unlimited_balance` to `true` so that emulation will not depend on the actual balance. This may be needed to calculate deploy fees for an account that does not exist yet. JSON with fees is in `fees` field of the result.
One more use case - you can produce the sequence of operations, thus emulating the sequential contract calls locally. And so on.
Transaction executor requires account BOC (bag of cells) as a parameter. To get the account BOC - use `net.query` method to download it from GraphQL API (field `boc` of `account`) or generate it with `abi.encode_account` method.
Also it requires message BOC. To get the message BOC - use `abi.encode_message` or `abi.encode_internal_message`.
If you need this emulation to be as precise as possible (for instance - emulate transaction with particular lt in particular block or use particular blockchain config, downloaded from a particular key block - then specify `execution_options` parameter.
If you need to see the aborted transaction as a result, not as an error, set `skip_transaction_check` to `true`.
func (*Client) TvmRunGet ¶
func (c *Client) TvmRunGet(p *ParamsOfRunGet) (*ResultOfRunGet, error)
Executes a get-method of FIFT contract that fulfills the smc-guidelines https://test.ton.org/smc-guidelines.txt and returns the result data from TVM's stack.
func (*Client) TvmRunTvm ¶
func (c *Client) TvmRunTvm(p *ParamsOfRunTvm) (*ResultOfRunTvm, error)
Executes get-methods of ABI-compatible contracts. Performs only a part of compute phase of transaction execution that is used to run get-methods of ABI-compatible contracts.
If you try to run get-methods with `run_executor` you will get an error, because it checks ACCEPT and exits if there is none, which is actually true for get-methods.
To get the account BOC (bag of cells) - use `net.query` method to download it from GraphQL API (field `boc` of `account`) or generate it with `abi.encode_account method`. To get the message BOC - use `abi.encode_message` or prepare it any other way, for instance, with FIFT script.
Attention! Updated account state is produces as well, but only `account_state.storage.state.data` part of the BOC is updated.
func (*Client) UtilsCalcStorageFee ¶
func (c *Client) UtilsCalcStorageFee(p *ParamsOfCalcStorageFee) (*ResultOfCalcStorageFee, error)
Calculates storage fee for an account over a specified time period.
func (*Client) UtilsCompressZstd ¶
func (c *Client) UtilsCompressZstd(p *ParamsOfCompressZstd) (*ResultOfCompressZstd, error)
Compresses data using Zstandard algorithm.
func (*Client) UtilsConvertAddress ¶
func (c *Client) UtilsConvertAddress(p *ParamsOfConvertAddress) (*ResultOfConvertAddress, error)
Converts address from any TON format to any TON format.
func (*Client) UtilsDecompressZstd ¶
func (c *Client) UtilsDecompressZstd(p *ParamsOfDecompressZstd) (*ResultOfDecompressZstd, error)
Decompresses data using Zstandard algorithm.
func (*Client) UtilsGetAddressType ¶
func (c *Client) UtilsGetAddressType(p *ParamsOfGetAddressType) (*ResultOfGetAddressType, error)
Validates and returns the type of any TON address. Address types are the following
`0:919db8e740d50bf349df2eea03fa30c385d846b991ff5542e67098ee833fc7f7` - standard TON address most commonly used in all cases. Also called as hex address `919db8e740d50bf349df2eea03fa30c385d846b991ff5542e67098ee833fc7f7` - account ID. A part of full address. Identifies account inside particular workchain `EQCRnbjnQNUL80nfLuoD+jDDhdhGuZH/VULmcJjugz/H9wam` - base64 address. Also called "user-friendly". Was used at the beginning of TON. Now it is supported for compatibility.
type Config ¶
type Config struct { Binding *BindingConfig `json:"binding"` // optional Network *NetworkConfig `json:"network"` // optional Crypto *CryptoConfig `json:"crypto"` // optional Abi *AbiConfig `json:"abi"` // optional Boc *BocConfig `json:"boc"` // optional Proofs *ProofsConfig `json:"proofs"` // optional // For file based storage is a folder name where SDK will store its data. For browser based is a browser async storage key prefix. Default (recommended) value is "~/.tonclient" for native environments and ".tonclient" for web-browser. LocalStoragePath null.String `json:"local_storage_path"` // optional }
type CryptoBoxHandle ¶
type CryptoBoxHandle uint32
type CryptoBoxSecret ¶
type CryptoBoxSecret struct { // Should be any of // RandomSeedPhraseCryptoBoxSecret // PredefinedSeedPhraseCryptoBoxSecret // EncryptedSecretCryptoBoxSecret EnumTypeValue interface{} }
func (*CryptoBoxSecret) MarshalJSON ¶
func (p *CryptoBoxSecret) MarshalJSON() ([]byte, error)
MarshalJSON implements custom marshalling for rust directive #[serde(tag="type")] for enum of types.
func (*CryptoBoxSecret) UnmarshalJSON ¶
func (p *CryptoBoxSecret) UnmarshalJSON(b []byte) error
UnmarshalJSON implements custom unmarshalling for rust directive #[serde(tag="type")] for enum of types.
type CryptoConfig ¶
type CryptoConfig struct { // Mnemonic dictionary that will be used by default in crypto functions. If not specified, `English` dictionary will be used. MnemonicDictionary *MnemonicDictionary `json:"mnemonic_dictionary"` // optional // Mnemonic word count that will be used by default in crypto functions. If not specified the default value will be 12. MnemonicWordCount null.Uint8 `json:"mnemonic_word_count"` // optional // Derivation path that will be used by default in crypto functions. If not specified `m/44'/396'/0'/0/0` will be used. HdkeyDerivationPath null.String `json:"hdkey_derivation_path"` // optional }
Crypto config.
type DataLayout ¶ added in v1.39.0
type DataLayout string
const ( // Decode message body as function input parameters. InputDataLayout DataLayout = "Input" // Decode message body as function output. OutputDataLayout DataLayout = "Output" )
type DebotAction ¶
type DebotAction struct { // A short action description. // Should be used by Debot Browser as name of menu item. Description string `json:"description"` // Depends on action type. // Can be a debot function name or a print string (for Print Action). Name string `json:"name"` // Action type. ActionType uint8 `json:"action_type"` // ID of debot context to switch after action execution. To uint8 `json:"to"` // Action attributes. // In the form of "param=value,flag". attribute example: instant, args, fargs, sign. Attributes string `json:"attributes"` // Some internal action data. // Used by debot only. Misc string `json:"misc"` }
[UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md) Describes a debot action in a Debot Context.
type DebotActivity ¶
type DebotActivity struct { // Should be any of // TransactionDebotActivity EnumTypeValue interface{} }
func (*DebotActivity) MarshalJSON ¶
func (p *DebotActivity) MarshalJSON() ([]byte, error)
MarshalJSON implements custom marshalling for rust directive #[serde(tag="type")] for enum of types.
func (*DebotActivity) UnmarshalJSON ¶
func (p *DebotActivity) UnmarshalJSON(b []byte) error
UnmarshalJSON implements custom unmarshalling for rust directive #[serde(tag="type")] for enum of types.
type DebotHandle ¶
type DebotHandle uint32
type DebotInfo ¶
type DebotInfo struct { // DeBot short name. Name null.String `json:"name"` // optional // DeBot semantic version. Version null.String `json:"version"` // optional // The name of DeBot deployer. Publisher null.String `json:"publisher"` // optional // Short info about DeBot. Caption null.String `json:"caption"` // optional // The name of DeBot developer. Author null.String `json:"author"` // optional // TON address of author for questions and donations. Support null.String `json:"support"` // optional // String with the first messsage from DeBot. Hello null.String `json:"hello"` // optional // String with DeBot interface language (ISO-639). Language null.String `json:"language"` // optional // String with DeBot ABI. Dabi null.String `json:"dabi"` // optional // DeBot icon. Icon null.String `json:"icon"` // optional // Vector with IDs of DInterfaces used by DeBot. Interfaces []string `json:"interfaces"` // ABI version ("x.y") supported by DeBot. DabiVersion string `json:"dabiVersion"` }
[UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md) Describes DeBot metadata.
type DecodedMessageBody ¶
type DecodedMessageBody struct { // Type of the message body content. BodyType MessageBodyType `json:"body_type"` // Function or event name. Name string `json:"name"` // Parameters or result value. Value json.RawMessage `json:"value"` // optional // Function header. Header *FunctionHeader `json:"header"` // optional }
type DecodedOutput ¶
type DecodedOutput struct { // Decoded bodies of the out messages. // If the message can't be decoded, then `None` will be stored in // the appropriate position. OutMessages []*DecodedMessageBody `json:"out_messages"` // Decoded body of the function output message. Output json.RawMessage `json:"output"` // optional }
type DecryptParamsOfAppEncryptionBox ¶
type DecryptParamsOfAppEncryptionBox struct { // Data, encoded in Base64. Data string `json:"data"` }
Decrypt data.
type DecryptResultOfAppEncryptionBox ¶
type DecryptResultOfAppEncryptionBox struct { // Decrypted data, encoded in Base64. Data string `json:"data"` }
Result of decrypting data.
type DeploySet ¶
type DeploySet struct { // Content of TVC file encoded in `base64`. For compatibility reason this field can contain an encoded `StateInit`. Tvc null.String `json:"tvc"` // optional // Contract code BOC encoded with base64. Code null.String `json:"code"` // optional // State init BOC encoded with base64. StateInit null.String `json:"state_init"` // optional // Target workchain for destination address. // Default is `0`. WorkchainID null.Int32 `json:"workchain_id"` // optional // List of initial values for contract's public variables. InitialData json.RawMessage `json:"initial_data"` // optional // Optional public key that can be provided in deploy set in order to substitute one in TVM file or provided by Signer. // Public key resolving priority: // 1. Public key from deploy set. // 2. Public key, specified in TVM file. // 3. Public key, provided by Signer. InitialPubkey null.String `json:"initial_pubkey"` // optional }
type DidSendProcessingEvent ¶
type DidSendProcessingEvent struct { ShardBlockID string `json:"shard_block_id"` MessageID string `json:"message_id"` MessageDst string `json:"message_dst"` Message string `json:"message"` }
Notifies the app that the message was sent to the network, i.e `processing.send_message` was successfully executed. Now, the message is in the blockchain. If Application exits at this phase, Developer needs to proceed with processing after the application is restored with `wait_for_transaction` function, passing shard_block_id and message from this event. Do not forget to specify abi of your contract as well, it is crucial for processing. See `processing.wait_for_transaction` documentation.
type EncodedMessageSource ¶
type EncryptParamsOfAppEncryptionBox ¶
type EncryptParamsOfAppEncryptionBox struct { // Data, encoded in Base64. Data string `json:"data"` }
Encrypt data.
type EncryptResultOfAppEncryptionBox ¶
type EncryptResultOfAppEncryptionBox struct { // Encrypted data, encoded in Base64. Data string `json:"data"` }
Result of encrypting data.
type EncryptedSecretCryptoBoxSecret ¶
type EncryptedSecretCryptoBoxSecret struct { // It is an object, containing encrypted seed phrase or private key (now we support only seed phrase). EncryptedSecret string `json:"encrypted_secret"` }
Use this type for wallet reinitializations, when you already have `encrypted_secret` on hands. To get `encrypted_secret`, use `get_crypto_box_info` function after you initialized your crypto box for the first time. It is an object, containing seed phrase or private key, encrypted with `secret_encryption_salt` and password from `password_provider`.
Note that if you want to change salt or password provider, then you need to reinitialize the wallet with `PredefinedSeedPhrase`, then get `EncryptedSecret` via `get_crypto_box_info`, store it somewhere, and only after that initialize the wallet with `EncryptedSecret` type.
type EncryptionAlgorithm ¶
type EncryptionAlgorithm struct { // Should be any of // AesEncryptionAlgorithm // ChaCha20EncryptionAlgorithm // NaclBoxEncryptionAlgorithm // NaclSecretBoxEncryptionAlgorithm EnumTypeValue interface{} }
func (*EncryptionAlgorithm) MarshalJSON ¶
func (p *EncryptionAlgorithm) MarshalJSON() ([]byte, error)
MarshalJSON implements custom marshalling for rust directive #[serde(tag="type")] for enum of types.
func (*EncryptionAlgorithm) UnmarshalJSON ¶
func (p *EncryptionAlgorithm) UnmarshalJSON(b []byte) error
UnmarshalJSON implements custom unmarshalling for rust directive #[serde(tag="type")] for enum of types.
type EncryptionBoxHandle ¶
type EncryptionBoxHandle uint32
type EncryptionBoxInfo ¶
type EncryptionBoxInfo struct { // Derivation path, for instance "m/44'/396'/0'/0/0". Hdpath null.String `json:"hdpath"` // optional // Cryptographic algorithm, used by this encryption box. Algorithm null.String `json:"algorithm"` // optional // Options, depends on algorithm and specific encryption box implementation. Options json.RawMessage `json:"options"` // optional // Public information, depends on algorithm. Public json.RawMessage `json:"public"` // optional }
Encryption box information.
type EndpointsSet ¶
type EndpointsSet struct { // List of endpoints provided by server. Endpoints []string `json:"endpoints"` }
type EnumOfTypesDescriptor ¶
type EnumOfTypesDescriptor struct {
Type string `json:"type"`
}
type Error ¶
type Error struct { Code uint32 `json:"code"` Message string `json:"message"` Data json.RawMessage `json:"data"` }
type ErrorAppRequestResult ¶
type ErrorAppRequestResult struct { // Error description. Text string `json:"text"` }
Error occurred during request processing.
type EventCallback ¶
type EventCallback func(event *ProcessingEvent)
type ExecutionOptions ¶
type ExecutionOptions struct { // boc with config. BlockchainConfig null.String `json:"blockchain_config"` // optional // time that is used as transaction time. BlockTime null.Uint32 `json:"block_time"` // optional // block logical time. BlockLt *big.Int `json:"block_lt"` // optional // transaction logical time. TransactionLt *big.Int `json:"transaction_lt"` // optional // Overrides standard TVM behaviour. If set to `true` then CHKSIG always will return `true`. ChksigAlwaysSucceed null.Bool `json:"chksig_always_succeed"` // optional // Signature ID to be used in signature verifying instructions when CapSignatureWithId capability is enabled. SignatureID null.Int32 `json:"signature_id"` // optional }
type ExternalSigner ¶
type ExternalSigner struct {
PublicKey string `json:"public_key"`
}
Only public key is provided in unprefixed hex string format to generate unsigned message and `data_to_sign` which can be signed later.
type FetchFirstBlockFailedProcessingEvent ¶
type FetchFirstBlockFailedProcessingEvent struct { Error Error `json:"error"` MessageID string `json:"message_id"` MessageDst string `json:"message_dst"` }
Notifies the app that the client has failed to fetch the account's current shard block. This may happen due to the network issues. Receiving this event means that message processing will not proceed - message was not sent, and Developer can try to run `process_message` again, in the hope that the connection is restored.
type FetchNextBlockFailedProcessingEvent ¶
type FetchNextBlockFailedProcessingEvent struct { ShardBlockID string `json:"shard_block_id"` MessageID string `json:"message_id"` MessageDst string `json:"message_dst"` Message string `json:"message"` Error Error `json:"error"` }
Notifies the app that the next block can't be fetched. If no block was fetched within `NetworkConfig.wait_for_timeout` then processing stops. This may happen when the shard stops, or there are other network issues. In this case Developer should resume message processing with `wait_for_transaction`, passing shard_block_id, message and contract abi to it. Note that passing ABI is crucial, because it will influence the processing strategy.
Another way to tune this is to specify long timeout in `NetworkConfig.wait_for_timeout`.
type FieldAggregation ¶
type FieldAggregation struct { // Dot separated path to the field. Field string `json:"field"` // Aggregation function that must be applied to field values. Fn AggregationFn `json:"fn"` }
type FunctionHeader ¶
type FunctionHeader struct { // Message expiration timestamp (UNIX time) in seconds. // If not specified - calculated automatically from message_expiration_timeout(), // try_index and message_expiration_timeout_grow_factor() (if ABI includes `expire` header). Expire null.Uint32 `json:"expire"` // optional // Message creation time in milliseconds. // If not specified, `now` is used (if ABI includes `time` header). Time *big.Int `json:"time"` // optional // Public key is used by the contract to check the signature. // Encoded in `hex`. If not specified, method fails with exception (if ABI includes `pubkey` header).. Pubkey null.String `json:"pubkey"` // optional }
The ABI function header. Includes several hidden function parameters that contract uses for security, message delivery monitoring and replay protection reasons.
The actual set of header fields depends on the contract's ABI. If a contract's ABI does not include some headers, then they are not filled.
type GetInfoParamsOfAppEncryptionBox ¶
type GetInfoParamsOfAppEncryptionBox struct{}
Get encryption box info.
type GetInfoResultOfAppEncryptionBox ¶
type GetInfoResultOfAppEncryptionBox struct {
Info EncryptionBoxInfo `json:"info"`
}
Result of getting encryption box info.
type GetPasswordParamsOfAppPasswordProvider ¶
type GetPasswordParamsOfAppPasswordProvider struct { // Temporary library pubkey, that is used on application side for password encryption, along with application temporary private key and nonce. Used for password decryption on library side. EncryptionPublicKey string `json:"encryption_public_key"` }
type GetPasswordResultOfAppPasswordProvider ¶
type GetPasswordResultOfAppPasswordProvider struct { // Password, encrypted and encoded to base64. Crypto box uses this password to decrypt its secret (seed phrase). EncryptedPassword string `json:"encrypted_password"` // Hex encoded public key of a temporary key pair, used for password encryption on application side. // Used together with `encryption_public_key` to decode `encrypted_password`. AppEncryptionPubkey string `json:"app_encryption_pubkey"` }
type GetPublicKeyParamsOfAppSigningBox ¶
type GetPublicKeyParamsOfAppSigningBox struct{}
Get signing box public key.
type GetPublicKeyResultOfAppSigningBox ¶
type GetPublicKeyResultOfAppSigningBox struct { // Signing box public key. PublicKey string `json:"public_key"` }
Result of getting public key.
type GetSigningBoxParamsOfAppDebotBrowser ¶
type GetSigningBoxParamsOfAppDebotBrowser struct{}
Get signing box to sign data. Signing box returned is owned and disposed by debot engine.
type GetSigningBoxResultOfAppDebotBrowser ¶
type GetSigningBoxResultOfAppDebotBrowser struct { // Signing box for signing data requested by debot engine. // Signing box is owned and disposed by debot engine. SigningBox SigningBoxHandle `json:"signing_box"` }
Result of getting signing box.
type HashAddressMonitoredMessage ¶ added in v1.42.1
type HashAddressMonitoredMessage struct { // Hash of the message. Hash string `json:"hash"` // Destination address of the message. Address string `json:"address"` }
Message's hash and destination address.
type HexAddressStringFormat ¶
type HexAddressStringFormat struct{}
type InputParamsOfAppDebotBrowser ¶
type InputParamsOfAppDebotBrowser struct { // A prompt string that must be printed to user before input request. Prompt string `json:"prompt"` }
Request user input.
type InputResultOfAppDebotBrowser ¶
type InputResultOfAppDebotBrowser struct { // String entered by user. Value string `json:"value"` }
Result of user input.
type IntegerBuilderOp ¶
type IntegerBuilderOp struct { // Bit size of the value. Size uint32 `json:"size"` // Value: - `Number` containing integer number. // e.g. `123`, `-123`. - Decimal string. e.g. `"123"`, `"-123"`. // - `0x` prefixed hexadecimal string. // e.g `0x123`, `0X123`, `-0x123`. Value json.RawMessage `json:"value"` }
Append integer to cell data.
type InvokeDebotParamsOfAppDebotBrowser ¶
type InvokeDebotParamsOfAppDebotBrowser struct { // Address of debot in blockchain. DebotAddr string `json:"debot_addr"` // Debot action to execute. Action DebotAction `json:"action"` }
Execute action of another debot.
type InvokeDebotResultOfAppDebotBrowser ¶
type InvokeDebotResultOfAppDebotBrowser struct{}
Result of debot invoking.
type KeysSigner ¶
type KeysSigner struct {
Keys KeyPair `json:"keys"`
}
Key pair is provided for signing.
type LogParamsOfAppDebotBrowser ¶
type LogParamsOfAppDebotBrowser struct { // A string that must be printed to user. Msg string `json:"msg"` }
Print message to user.
type MessageBodyType ¶
type MessageBodyType string
const ( // Message contains the input of the ABI function. InputMessageBodyType MessageBodyType = "Input" // Message contains the output of the ABI function. OutputMessageBodyType MessageBodyType = "Output" // Message contains the input of the imported ABI function. // Occurs when contract sends an internal message to other // contract. InternalOutputMessageBodyType MessageBodyType = "InternalOutput" // Message contains the input of the ABI event. EventMessageBodyType MessageBodyType = "Event" )
type MessageExpiredProcessingEvent ¶
type MessageExpiredProcessingEvent struct { MessageID string `json:"message_id"` MessageDst string `json:"message_dst"` Message string `json:"message"` Error Error `json:"error"` }
Notifies the app that the message was not executed within expire timeout on-chain and will never be because it is already expired. The expiration timeout can be configured with `AbiConfig` parameters. This event occurs only for the contracts which ABI includes "expire" header.
If Application specifies `NetworkConfig.message_retries_count` > 0, then `process_message` will perform retries: will create a new message and send it again and repeat it until it reaches the maximum retries count or receives a successful result. All the processing events will be repeated.
type MessageMonitoringParams ¶ added in v1.42.1
type MessageMonitoringParams struct { // Monitored message identification. Can be provided as a message's BOC or (hash, address) pair. BOC is a preferable way because it helps to determine possible error reason (using TVM execution of the message). Message MonitoredMessage `json:"message"` // Block time Must be specified as a UNIX timestamp in seconds. WaitUntil uint32 `json:"wait_until"` // User defined data associated with this message. Helps to identify this message when user received `MessageMonitoringResult`. UserData json.RawMessage `json:"user_data"` // optional }
type MessageMonitoringResult ¶ added in v1.42.1
type MessageMonitoringResult struct { // Hash of the message. Hash string `json:"hash"` // Processing status. Status MessageMonitoringStatus `json:"status"` // In case of `Finalized` the transaction is extracted from the block. In case of `Timeout` the transaction is emulated using the last known account state. Transaction *MessageMonitoringTransaction `json:"transaction"` // optional // In case of `Timeout` contains possible error reason. Error null.String `json:"error"` // optional // User defined data related to this message. This is the same value as passed before with `MessageMonitoringParams` or `SendMessageParams`. UserData json.RawMessage `json:"user_data"` // optional }
type MessageMonitoringStatus ¶ added in v1.42.1
type MessageMonitoringStatus string
const ( // Returned when the messages was processed and included into finalized block before `wait_until` block time. FinalizedMessageMonitoringStatus MessageMonitoringStatus = "Finalized" // Returned when the message was not processed until `wait_until` block time. TimeoutMessageMonitoringStatus MessageMonitoringStatus = "Timeout" // Reserved for future statuses. // Is never returned. Application should wait for one of the `Finalized` or `Timeout` statuses. // All other statuses are intermediate. ReservedMessageMonitoringStatus MessageMonitoringStatus = "Reserved" )
type MessageMonitoringTransaction ¶ added in v1.42.1
type MessageMonitoringTransaction struct { // Hash of the transaction. Present if transaction was included into the blocks. When then transaction was emulated this field will be missing. Hash null.String `json:"hash"` // optional // Aborted field of the transaction. Aborted bool `json:"aborted"` // Optional information about the compute phase of the transaction. Compute *MessageMonitoringTransactionCompute `json:"compute"` // optional }
type MessageMonitoringTransactionCompute ¶ added in v1.42.1
type MessageMonitoringTransactionCompute struct { // Compute phase exit code. ExitCode int32 `json:"exit_code"` }
type MessageNode ¶
type MessageNode struct { // Message id. ID string `json:"id"` // Source transaction id. // This field is missing for an external inbound messages. SrcTransactionID null.String `json:"src_transaction_id"` // optional // Destination transaction id. // This field is missing for an external outbound messages. DstTransactionID null.String `json:"dst_transaction_id"` // optional // Source address. Src null.String `json:"src"` // optional // Destination address. Dst null.String `json:"dst"` // optional // Transferred tokens value. Value null.String `json:"value"` // optional // Bounce flag. Bounce bool `json:"bounce"` // Decoded body. // Library tries to decode message body using provided `params.abi_registry`. // This field will be missing if none of the provided abi can be used to decode. DecodedBody *DecodedMessageBody `json:"decoded_body"` // optional }
type MessageSendingParams ¶ added in v1.42.1
type MessageSendingParams struct { // BOC of the message, that must be sent to the blockchain. Boc string `json:"boc"` // Expiration time of the message. Must be specified as a UNIX timestamp in seconds. WaitUntil uint32 `json:"wait_until"` // User defined data associated with this message. Helps to identify this message when user received `MessageMonitoringResult`. UserData json.RawMessage `json:"user_data"` // optional }
type MessageSource ¶
type MessageSource struct { // Should be any of // EncodedMessageSource // ParamsOfEncodeMessage EnumTypeValue interface{} }
func (*MessageSource) MarshalJSON ¶
func (p *MessageSource) MarshalJSON() ([]byte, error)
MarshalJSON implements custom marshalling for rust directive #[serde(tag="type")] for enum of types.
func (*MessageSource) UnmarshalJSON ¶
func (p *MessageSource) UnmarshalJSON(b []byte) error
UnmarshalJSON implements custom unmarshalling for rust directive #[serde(tag="type")] for enum of types.
type MessageStateInitSource ¶
type MessageStateInitSource struct {
Source MessageSource `json:"source"`
}
Deploy message.
type MnemonicDictionary ¶ added in v1.41.0
type MnemonicDictionary int
const ( // TON compatible dictionary. TonMnemonicDictionary MnemonicDictionary = 0 // English BIP-39 dictionary. EnglishMnemonicDictionary MnemonicDictionary = 1 // Chinese simplified BIP-39 dictionary. ChineseSimplifiedMnemonicDictionary MnemonicDictionary = 2 // Chinese traditional BIP-39 dictionary. ChineseTraditionalMnemonicDictionary MnemonicDictionary = 3 // French BIP-39 dictionary. FrenchMnemonicDictionary MnemonicDictionary = 4 // Italian BIP-39 dictionary. ItalianMnemonicDictionary MnemonicDictionary = 5 // Japanese BIP-39 dictionary. JapaneseMnemonicDictionary MnemonicDictionary = 6 // Korean BIP-39 dictionary. KoreanMnemonicDictionary MnemonicDictionary = 7 // Spanish BIP-39 dictionary. SpanishMnemonicDictionary MnemonicDictionary = 8 )
type MonitorFetchWaitMode ¶ added in v1.42.1
type MonitorFetchWaitMode string
const ( // If there are no resolved results yet, then monitor awaits for the next resolved result. AtLeastOneMonitorFetchWaitMode MonitorFetchWaitMode = "AtLeastOne" // Monitor waits until all unresolved messages will be resolved. If there are no unresolved messages then monitor will wait. AllMonitorFetchWaitMode MonitorFetchWaitMode = "All" NoWaitMonitorFetchWaitMode MonitorFetchWaitMode = "NoWait" )
type MonitoredMessage ¶ added in v1.42.1
type MonitoredMessage struct { // Should be any of // BocMonitoredMessage // HashAddressMonitoredMessage EnumTypeValue interface{} }
func (*MonitoredMessage) MarshalJSON ¶ added in v1.42.1
func (p *MonitoredMessage) MarshalJSON() ([]byte, error)
MarshalJSON implements custom marshalling for rust directive #[serde(tag="type")] for enum of types.
func (*MonitoredMessage) UnmarshalJSON ¶ added in v1.42.1
func (p *MonitoredMessage) UnmarshalJSON(b []byte) error
UnmarshalJSON implements custom unmarshalling for rust directive #[serde(tag="type")] for enum of types.
type MonitoringQueueInfo ¶ added in v1.42.1
type Multiplexer ¶
type Multiplexer interface { SetChannels(chan<- *RawResponse, <-chan struct{}) uint32 DeleteByRequestID(uint32) GetChannels(requestID uint32, deleteAfterGet bool) (chan<- *RawResponse, <-chan struct{}, bool) }
type NaclBoxBoxEncryptionAlgorithm ¶ added in v1.37.2
type NaclBoxBoxEncryptionAlgorithm struct {
Value NaclBoxParamsCB `json:"value"`
}
type NaclBoxEncryptionAlgorithm ¶ added in v1.37.2
type NaclBoxEncryptionAlgorithm struct {
Value NaclBoxParamsEB `json:"value"`
}
type NaclBoxParamsCB ¶
type NaclBoxParamsEB ¶
type NaclSecretBoxBoxEncryptionAlgorithm ¶ added in v1.37.2
type NaclSecretBoxBoxEncryptionAlgorithm struct {
Value NaclSecretBoxParamsCB `json:"value"`
}
type NaclSecretBoxEncryptionAlgorithm ¶ added in v1.37.2
type NaclSecretBoxEncryptionAlgorithm struct {
Value NaclSecretBoxParamsEB `json:"value"`
}
type NaclSecretBoxParamsCB ¶
type NaclSecretBoxParamsCB struct { // Nonce in `hex`. Nonce string `json:"nonce"` }
type NaclSecretBoxParamsEB ¶
type NetworkConfig ¶
type NetworkConfig struct { // **This field is deprecated, but left for backward-compatibility.** Evernode endpoint. ServerAddress null.String `json:"server_address"` // optional // List of Evernode endpoints. // Any correct URL format can be specified, including IP addresses. This parameter is prevailing over `server_address`. // Check the full list of [supported network endpoints](https://docs.evercloud.dev/products/evercloud/networks-endpoints). Endpoints []string `json:"endpoints"` // optional // Deprecated. // You must use `network.max_reconnect_timeout` that allows to specify maximum network resolving timeout. NetworkRetriesCount null.Int8 `json:"network_retries_count"` // optional // Maximum time for sequential reconnections. // Must be specified in milliseconds. Default is 120000 (2 min). MaxReconnectTimeout null.Uint32 `json:"max_reconnect_timeout"` // optional // Deprecated. ReconnectTimeout null.Uint32 `json:"reconnect_timeout"` // optional // The number of automatic message processing retries that SDK performs in case of `Message Expired (507)` error - but only for those messages which local emulation was successful or failed with replay protection error. // Default is 5. MessageRetriesCount null.Int8 `json:"message_retries_count"` // optional // Timeout that is used to process message delivery for the contracts which ABI does not include "expire" header. If the message is not delivered within the specified timeout the appropriate error occurs. // Must be specified in milliseconds. Default is 40000 (40 sec). MessageProcessingTimeout null.Uint32 `json:"message_processing_timeout"` // optional // Maximum timeout that is used for query response. // Must be specified in milliseconds. Default is 40000 (40 sec). WaitForTimeout null.Uint32 `json:"wait_for_timeout"` // optional // **DEPRECATED**: This parameter was deprecated. OutOfSyncThreshold null.Uint32 `json:"out_of_sync_threshold"` // optional // Maximum number of randomly chosen endpoints the library uses to broadcast a message. // Default is 1. SendingEndpointCount null.Uint8 `json:"sending_endpoint_count"` // optional // Frequency of sync latency detection. // Library periodically checks the current endpoint for blockchain data synchronization latency. // If the latency (time-lag) is less then `NetworkConfig.max_latency` // then library selects another endpoint. // // Must be specified in milliseconds. Default is 60000 (1 min). LatencyDetectionInterval null.Uint32 `json:"latency_detection_interval"` // optional // Maximum value for the endpoint's blockchain data synchronization latency (time-lag). Library periodically checks the current endpoint for blockchain data synchronization latency. If the latency (time-lag) is less then `NetworkConfig.max_latency` then library selects another endpoint. // Must be specified in milliseconds. Default is 60000 (1 min). MaxLatency null.Uint32 `json:"max_latency"` // optional // Default timeout for http requests. // Is is used when no timeout specified for the request to limit the answer waiting time. If no answer received during the timeout requests ends with // error. // // Must be specified in milliseconds. Default is 60000 (1 min). QueryTimeout null.Uint32 `json:"query_timeout"` // optional // Queries protocol. // `HTTP` or `WS`. // Default is `HTTP`. QueriesProtocol *NetworkQueriesProtocol `json:"queries_protocol"` // optional // UNSTABLE. // First REMP status awaiting timeout. If no status received during the timeout than fallback transaction scenario is activated. // // Must be specified in milliseconds. Default is 1 (1 ms) in order to start fallback scenario // together with REMP statuses processing while REMP is not properly tuned yet. FirstRempStatusTimeout null.Uint32 `json:"first_remp_status_timeout"` // optional // UNSTABLE. // Subsequent REMP status awaiting timeout. If no status received during the timeout than fallback transaction scenario is activated. // // Must be specified in milliseconds. Default is 5000 (5 sec). NextRempStatusTimeout null.Uint32 `json:"next_remp_status_timeout"` // optional // Network signature ID which is used by VM in signature verifying instructions if capability `CapSignatureWithId` is enabled in blockchain configuration parameters. // This parameter should be set to `global_id` field from any blockchain block if network can // not be reachable at the moment of message encoding and the message is aimed to be sent into // network with `CapSignatureWithId` enabled. Otherwise signature ID is detected automatically // inside message encoding functions. SignatureID null.Int32 `json:"signature_id"` // optional // Access key to GraphQL API (Project secret). AccessKey null.String `json:"access_key"` // optional }
type NetworkQueriesProtocol ¶
type NetworkQueriesProtocol string
const ( // Each GraphQL query uses separate HTTP request. HTTPNetworkQueriesProtocol NetworkQueriesProtocol = "HTTP" // All GraphQL queries will be served using single web socket connection. SDK is tested to reliably handle 5000 parallel network requests (sending and processing messages, quering and awaiting blockchain data). WsNetworkQueriesProtocol NetworkQueriesProtocol = "WS" )
type NoneAccountForExecutor ¶
type NoneAccountForExecutor struct{}
Non-existing account to run a creation internal message. Should be used with `skip_transaction_check = true` if the message has no deploy data since transactions on the uninitialized account are always aborted.
type OkAppRequestResult ¶
type OkAppRequestResult struct { // Request processing result. Result json.RawMessage `json:"result"` }
Request processed successfully.
type OrderBy ¶
type OrderBy struct { Path string `json:"path"` Direction SortDirection `json:"direction"` }
type ParamsOfAbiEncodeBoc ¶
type ParamsOfAbiEncodeBoc struct { // Parameters to encode into BOC. Params []AbiParam `json:"params"` // Parameters and values as a JSON structure. Data json.RawMessage `json:"data"` // Cache type to put the result. // The BOC itself returned if no cache type provided. BocCache *BocCacheType `json:"boc_cache"` // optional }
type ParamsOfAggregateCollection ¶
type ParamsOfAggregateCollection struct { // Collection name (accounts, blocks, transactions, messages, block_signatures). Collection string `json:"collection"` // Collection filter. Filter json.RawMessage `json:"filter"` // optional // Projection (result) string. Fields []FieldAggregation `json:"fields"` // optional }
type ParamsOfAppDebotBrowser ¶
type ParamsOfAppDebotBrowser struct { // Should be any of // LogParamsOfAppDebotBrowser // SwitchParamsOfAppDebotBrowser // SwitchCompletedParamsOfAppDebotBrowser // ShowActionParamsOfAppDebotBrowser // InputParamsOfAppDebotBrowser // GetSigningBoxParamsOfAppDebotBrowser // InvokeDebotParamsOfAppDebotBrowser // SendParamsOfAppDebotBrowser // ApproveParamsOfAppDebotBrowser EnumTypeValue interface{} }
func (*ParamsOfAppDebotBrowser) MarshalJSON ¶
func (p *ParamsOfAppDebotBrowser) MarshalJSON() ([]byte, error)
MarshalJSON implements custom marshalling for rust directive #[serde(tag="type")] for enum of types.
func (*ParamsOfAppDebotBrowser) UnmarshalJSON ¶
func (p *ParamsOfAppDebotBrowser) UnmarshalJSON(b []byte) error
UnmarshalJSON implements custom unmarshalling for rust directive #[serde(tag="type")] for enum of types.
type ParamsOfAppEncryptionBox ¶
type ParamsOfAppEncryptionBox struct { // Should be any of // GetInfoParamsOfAppEncryptionBox // EncryptParamsOfAppEncryptionBox // DecryptParamsOfAppEncryptionBox EnumTypeValue interface{} }
func (*ParamsOfAppEncryptionBox) MarshalJSON ¶
func (p *ParamsOfAppEncryptionBox) MarshalJSON() ([]byte, error)
MarshalJSON implements custom marshalling for rust directive #[serde(tag="type")] for enum of types.
func (*ParamsOfAppEncryptionBox) UnmarshalJSON ¶
func (p *ParamsOfAppEncryptionBox) UnmarshalJSON(b []byte) error
UnmarshalJSON implements custom unmarshalling for rust directive #[serde(tag="type")] for enum of types.
type ParamsOfAppPasswordProvider ¶
type ParamsOfAppPasswordProvider struct { // Should be any of // GetPasswordParamsOfAppPasswordProvider EnumTypeValue interface{} }
func (*ParamsOfAppPasswordProvider) MarshalJSON ¶
func (p *ParamsOfAppPasswordProvider) MarshalJSON() ([]byte, error)
MarshalJSON implements custom marshalling for rust directive #[serde(tag="type")] for enum of types.
func (*ParamsOfAppPasswordProvider) UnmarshalJSON ¶
func (p *ParamsOfAppPasswordProvider) UnmarshalJSON(b []byte) error
UnmarshalJSON implements custom unmarshalling for rust directive #[serde(tag="type")] for enum of types.
type ParamsOfAppRequest ¶
type ParamsOfAppRequest struct { // Request ID. // Should be used in `resolve_app_request` call. AppRequestID uint32 `json:"app_request_id"` // Request describing data. RequestData json.RawMessage `json:"request_data"` }
type ParamsOfAppSigningBox ¶
type ParamsOfAppSigningBox struct { // Should be any of // GetPublicKeyParamsOfAppSigningBox // SignParamsOfAppSigningBox EnumTypeValue interface{} }
func (*ParamsOfAppSigningBox) MarshalJSON ¶
func (p *ParamsOfAppSigningBox) MarshalJSON() ([]byte, error)
MarshalJSON implements custom marshalling for rust directive #[serde(tag="type")] for enum of types.
func (*ParamsOfAppSigningBox) UnmarshalJSON ¶
func (p *ParamsOfAppSigningBox) UnmarshalJSON(b []byte) error
UnmarshalJSON implements custom unmarshalling for rust directive #[serde(tag="type")] for enum of types.
type ParamsOfAttachSignature ¶
type ParamsOfAttachSignatureToMessageBody ¶
type ParamsOfAttachSignatureToMessageBody struct { // Contract ABI. Abi Abi `json:"abi"` // Public key. // Must be encoded with `hex`. PublicKey string `json:"public_key"` // Unsigned message body BOC. // Must be encoded with `base64`. Message string `json:"message"` // Signature. // Must be encoded with `hex`. Signature string `json:"signature"` }
type ParamsOfBatchQuery ¶
type ParamsOfBatchQuery struct { // List of query operations that must be performed per single fetch. Operations []ParamsOfQueryOperation `json:"operations"` }
type ParamsOfBocCacheGet ¶
type ParamsOfBocCacheGet struct { // Reference to the cached BOC. BocRef string `json:"boc_ref"` }
type ParamsOfBocCacheSet ¶
type ParamsOfBocCacheSet struct { // BOC encoded as base64 or BOC reference. Boc string `json:"boc"` // Cache type. CacheType BocCacheType `json:"cache_type"` }
type ParamsOfBocCacheUnpin ¶
type ParamsOfCalcFunctionId ¶ added in v1.35.1
type ParamsOfCalcFunctionId struct { // Contract ABI. Abi Abi `json:"abi"` // Contract function name. FunctionName string `json:"function_name"` // If set to `true` output function ID will be returned which is used in contract response. Default is `false`. Output null.Bool `json:"output"` // optional }
type ParamsOfCalcStorageFee ¶
type ParamsOfCancelMonitor ¶ added in v1.42.1
type ParamsOfCancelMonitor struct { // Name of the monitoring queue. Queue string `json:"queue"` }
type ParamsOfChaCha20 ¶
type ParamsOfCompressZstd ¶
type ParamsOfCompressZstd struct { // Uncompressed data. // Must be encoded as base64. Uncompressed string `json:"uncompressed"` // Compression level, from 1 to 21. Where: 1 - lowest compression level (fastest compression); 21 - highest compression level (slowest compression). If level is omitted, the default compression level is used (currently `3`). Level null.Int32 `json:"level"` // optional }
type ParamsOfConvertAddress ¶
type ParamsOfConvertAddress struct { // Account address in any TON format. Address string `json:"address"` // Specify the format to convert to. OutputFormat AddressStringFormat `json:"output_format"` }
type ParamsOfConvertPublicKeyToTonSafeFormat ¶
type ParamsOfConvertPublicKeyToTonSafeFormat struct { // Public key - 64 symbols hex string. PublicKey string `json:"public_key"` }
type ParamsOfCreateBlockIterator ¶
type ParamsOfCreateBlockIterator struct { // Starting time to iterate from. // If the application specifies this parameter then the iteration // includes blocks with `gen_utime` >= `start_time`. // Otherwise the iteration starts from zero state. // // Must be specified in seconds. StartTime null.Uint32 `json:"start_time"` // optional // Optional end time to iterate for. // If the application specifies this parameter then the iteration // includes blocks with `gen_utime` < `end_time`. // Otherwise the iteration never stops. // // Must be specified in seconds. EndTime null.Uint32 `json:"end_time"` // optional // Shard prefix filter. // If the application specifies this parameter and it is not the empty array // then the iteration will include items related to accounts that belongs to // the specified shard prefixes. // Shard prefix must be represented as a string "workchain:prefix". // Where `workchain` is a signed integer and the `prefix` if a hexadecimal // representation if the 64-bit unsigned integer with tagged shard prefix. // For example: "0:3800000000000000". ShardFilter []string `json:"shard_filter"` // optional // Projection (result) string. // List of the fields that must be returned for iterated items. // This field is the same as the `result` parameter of // the `query_collection` function. // Note that iterated items can contains additional fields that are // not requested in the `result`. Result null.String `json:"result"` // optional }
type ParamsOfCreateCryptoBox ¶
type ParamsOfCreateCryptoBox struct { // Salt used for secret encryption. For example, a mobile device can use device ID as salt. SecretEncryptionSalt string `json:"secret_encryption_salt"` // Cryptobox secret. Secret CryptoBoxSecret `json:"secret"` }
type ParamsOfCreateEncryptionBox ¶
type ParamsOfCreateEncryptionBox struct { // Encryption algorithm specifier including cipher parameters (key, IV, etc). Algorithm EncryptionAlgorithm `json:"algorithm"` }
type ParamsOfCreateTransactionIterator ¶
type ParamsOfCreateTransactionIterator struct { // Starting time to iterate from. // If the application specifies this parameter then the iteration // includes blocks with `gen_utime` >= `start_time`. // Otherwise the iteration starts from zero state. // // Must be specified in seconds. StartTime null.Uint32 `json:"start_time"` // optional // Optional end time to iterate for. // If the application specifies this parameter then the iteration // includes blocks with `gen_utime` < `end_time`. // Otherwise the iteration never stops. // // Must be specified in seconds. EndTime null.Uint32 `json:"end_time"` // optional // Shard prefix filters. // If the application specifies this parameter and it is not an empty array // then the iteration will include items related to accounts that belongs to // the specified shard prefixes. // Shard prefix must be represented as a string "workchain:prefix". // Where `workchain` is a signed integer and the `prefix` if a hexadecimal // representation if the 64-bit unsigned integer with tagged shard prefix. // For example: "0:3800000000000000". // Account address conforms to the shard filter if // it belongs to the filter workchain and the first bits of address match to // the shard prefix. Only transactions with suitable account addresses are iterated. ShardFilter []string `json:"shard_filter"` // optional // Account address filter. // Application can specify the list of accounts for which // it wants to iterate transactions. // // If this parameter is missing or an empty list then the library iterates // transactions for all accounts that pass the shard filter. // // Note that the library doesn't detect conflicts between the account filter and the shard filter // if both are specified. // So it is an application responsibility to specify the correct filter combination. AccountsFilter []string `json:"accounts_filter"` // optional // Projection (result) string. // List of the fields that must be returned for iterated items. // This field is the same as the `result` parameter of // the `query_collection` function. // Note that iterated items can contain additional fields that are // not requested in the `result`. Result null.String `json:"result"` // optional // Include `transfers` field in iterated transactions. // If this parameter is `true` then each transaction contains field // `transfers` with list of transfer. See more about this structure in function description. IncludeTransfers null.Bool `json:"include_transfers"` // optional }
type ParamsOfDecodeAccountData ¶
type ParamsOfDecodeAccountData struct { // Contract ABI. Abi Abi `json:"abi"` // Data BOC or BOC handle. Data string `json:"data"` // Flag allowing partial BOC decoding when ABI doesn't describe the full body BOC. Controls decoder behaviour when after decoding all described in ABI params there are some data left in BOC: `true` - return decoded values `false` - return error of incomplete BOC deserialization (default). AllowPartial null.Bool `json:"allow_partial"` // optional }
type ParamsOfDecodeBoc ¶
type ParamsOfDecodeInitialData ¶
type ParamsOfDecodeInitialData struct { // Contract ABI. // Initial data is decoded if this parameter is provided. Abi *Abi `json:"abi"` // optional // Data BOC or BOC handle. Data string `json:"data"` // Flag allowing partial BOC decoding when ABI doesn't describe the full body BOC. Controls decoder behaviour when after decoding all described in ABI params there are some data left in BOC: `true` - return decoded values `false` - return error of incomplete BOC deserialization (default). AllowPartial null.Bool `json:"allow_partial"` // optional }
type ParamsOfDecodeMessage ¶
type ParamsOfDecodeMessage struct { // contract ABI. Abi Abi `json:"abi"` // Message BOC. Message string `json:"message"` // Flag allowing partial BOC decoding when ABI doesn't describe the full body BOC. Controls decoder behaviour when after decoding all described in ABI params there are some data left in BOC: `true` - return decoded values `false` - return error of incomplete BOC deserialization (default). AllowPartial null.Bool `json:"allow_partial"` // optional // Function name or function id if is known in advance. FunctionName null.String `json:"function_name"` // optional DataLayout *DataLayout `json:"data_layout"` // optional }
type ParamsOfDecodeMessageBody ¶
type ParamsOfDecodeMessageBody struct { // Contract ABI used to decode. Abi Abi `json:"abi"` // Message body BOC encoded in `base64`. Body string `json:"body"` // True if the body belongs to the internal message. IsInternal bool `json:"is_internal"` // Flag allowing partial BOC decoding when ABI doesn't describe the full body BOC. Controls decoder behaviour when after decoding all described in ABI params there are some data left in BOC: `true` - return decoded values `false` - return error of incomplete BOC deserialization (default). AllowPartial null.Bool `json:"allow_partial"` // optional // Function name or function id if is known in advance. FunctionName null.String `json:"function_name"` // optional DataLayout *DataLayout `json:"data_layout"` // optional }
type ParamsOfDecodeStateInit ¶ added in v1.43.3
type ParamsOfDecodeStateInit struct { // Contract StateInit image BOC encoded as base64 or BOC handle. StateInit string `json:"state_init"` // Cache type to put the result. The BOC itself returned if no cache type provided. BocCache *BocCacheType `json:"boc_cache"` // optional }
type ParamsOfDecodeTvc ¶
type ParamsOfDecodeTvc struct { // Contract TVC BOC encoded as base64 or BOC handle. Tvc string `json:"tvc"` }
type ParamsOfDecompressZstd ¶
type ParamsOfDecompressZstd struct { // Compressed data. // Must be encoded as base64. Compressed string `json:"compressed"` }
type ParamsOfEncodeAccount ¶
type ParamsOfEncodeAccount struct { // Source of the account state init. StateInit StateInitSource `json:"state_init"` // Initial balance. Balance *big.Int `json:"balance"` // optional // Initial value for the `last_trans_lt`. LastTransLt *big.Int `json:"last_trans_lt"` // optional // Initial value for the `last_paid`. LastPaid null.Uint32 `json:"last_paid"` // optional // Cache type to put the result. // The BOC itself returned if no cache type provided. BocCache *BocCacheType `json:"boc_cache"` // optional }
type ParamsOfEncodeBoc ¶
type ParamsOfEncodeBoc struct { // Cell builder operations. Builder []BuilderOp `json:"builder"` // Cache type to put the result. The BOC itself returned if no cache type provided. BocCache *BocCacheType `json:"boc_cache"` // optional }
type ParamsOfEncodeExternalInMessage ¶
type ParamsOfEncodeExternalInMessage struct { // Source address. Src null.String `json:"src"` // optional // Destination address. Dst string `json:"dst"` // Bag of cells with state init (used in deploy messages). Init null.String `json:"init"` // optional // Bag of cells with the message body encoded as base64. Body null.String `json:"body"` // optional // Cache type to put the result. // The BOC itself returned if no cache type provided. BocCache *BocCacheType `json:"boc_cache"` // optional }
type ParamsOfEncodeInitialData ¶
type ParamsOfEncodeInitialData struct { // Contract ABI. Abi *Abi `json:"abi"` // optional // List of initial values for contract's static variables. // `abi` parameter should be provided to set initial data. InitialData json.RawMessage `json:"initial_data"` // optional // Initial account owner's public key to set into account data. InitialPubkey null.String `json:"initial_pubkey"` // optional // Cache type to put the result. The BOC itself returned if no cache type provided. BocCache *BocCacheType `json:"boc_cache"` // optional }
type ParamsOfEncodeInternalMessage ¶
type ParamsOfEncodeInternalMessage struct { // Contract ABI. // Can be None if both deploy_set and call_set are None. Abi *Abi `json:"abi"` // optional // Target address the message will be sent to. // Must be specified in case of non-deploy message. Address null.String `json:"address"` // optional // Source address of the message. SrcAddress null.String `json:"src_address"` // optional // Deploy parameters. // Must be specified in case of deploy message. DeploySet *DeploySet `json:"deploy_set"` // optional // Function call parameters. // Must be specified in case of non-deploy message. // // In case of deploy message it is optional and contains parameters // of the functions that will to be called upon deploy transaction. CallSet *CallSet `json:"call_set"` // optional // Value in nanotokens to be sent with message. Value string `json:"value"` // Flag of bounceable message. // Default is true. Bounce null.Bool `json:"bounce"` // optional // Enable Instant Hypercube Routing for the message. // Default is false. EnableIhr null.Bool `json:"enable_ihr"` // optional }
type ParamsOfEncodeMessage ¶
type ParamsOfEncodeMessage struct { // Contract ABI. Abi Abi `json:"abi"` // Target address the message will be sent to. // Must be specified in case of non-deploy message. Address null.String `json:"address"` // optional // Deploy parameters. // Must be specified in case of deploy message. DeploySet *DeploySet `json:"deploy_set"` // optional // Function call parameters. // Must be specified in case of non-deploy message. // // In case of deploy message it is optional and contains parameters // of the functions that will to be called upon deploy transaction. CallSet *CallSet `json:"call_set"` // optional // Signing parameters. Signer Signer `json:"signer"` // Processing try index. // Used in message processing with retries (if contract's ABI includes "expire" header). // // Encoder uses the provided try index to calculate message // expiration time. The 1st message expiration time is specified in // Client config. // // Expiration timeouts will grow with every retry. // Retry grow factor is set in Client config: // <.....add config parameter with default value here> // // Default value is 0. ProcessingTryIndex null.Uint8 `json:"processing_try_index"` // optional // Signature ID to be used in data to sign preparing when CapSignatureWithId capability is enabled. SignatureID null.Int32 `json:"signature_id"` // optional }
type ParamsOfEncodeMessageBody ¶
type ParamsOfEncodeMessageBody struct { // Contract ABI. Abi Abi `json:"abi"` // Function call parameters. // Must be specified in non deploy message. // // In case of deploy message contains parameters of constructor. CallSet CallSet `json:"call_set"` // True if internal message body must be encoded. IsInternal bool `json:"is_internal"` // Signing parameters. Signer Signer `json:"signer"` // Processing try index. // Used in message processing with retries. // // Encoder uses the provided try index to calculate message // expiration time. // // Expiration timeouts will grow with every retry. // // Default value is 0. ProcessingTryIndex null.Uint8 `json:"processing_try_index"` // optional // Destination address of the message. // Since ABI version 2.3 destination address of external inbound message is used in message // body signature calculation. Should be provided when signed external inbound message body is // created. Otherwise can be omitted. Address null.String `json:"address"` // optional // Signature ID to be used in data to sign preparing when CapSignatureWithId capability is enabled. SignatureID null.Int32 `json:"signature_id"` // optional }
type ParamsOfEncodeStateInit ¶ added in v1.43.3
type ParamsOfEncodeStateInit struct { // Contract code BOC encoded as base64 or BOC handle. Code null.String `json:"code"` // optional // Contract data BOC encoded as base64 or BOC handle. Data null.String `json:"data"` // optional // Contract library BOC encoded as base64 or BOC handle. Library null.String `json:"library"` // optional // `special.tick` field. // Specifies the contract ability to handle tick transactions. Tick null.Bool `json:"tick"` // optional // `special.tock` field. // Specifies the contract ability to handle tock transactions. Tock null.Bool `json:"tock"` // optional // Is present and non-zero only in instances of large smart contracts. SplitDepth null.Uint32 `json:"split_depth"` // optional // Cache type to put the result. The BOC itself returned if no cache type provided. BocCache *BocCacheType `json:"boc_cache"` // optional }
type ParamsOfEncryptionBoxDecrypt ¶
type ParamsOfEncryptionBoxDecrypt struct { // Encryption box handle. EncryptionBox EncryptionBoxHandle `json:"encryption_box"` // Data to be decrypted, encoded in Base64. Data string `json:"data"` }
type ParamsOfEncryptionBoxEncrypt ¶
type ParamsOfEncryptionBoxEncrypt struct { // Encryption box handle. EncryptionBox EncryptionBoxHandle `json:"encryption_box"` // Data to be encrypted, encoded in Base64. Data string `json:"data"` }
type ParamsOfEncryptionBoxGetInfo ¶
type ParamsOfEncryptionBoxGetInfo struct { // Encryption box handle. EncryptionBox EncryptionBoxHandle `json:"encryption_box"` }
type ParamsOfExecute ¶
type ParamsOfExecute struct { // Debot handle which references an instance of debot engine. DebotHandle DebotHandle `json:"debot_handle"` // Debot Action that must be executed. Action DebotAction `json:"action"` }
[UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md) Parameters for executing debot action.
type ParamsOfFactorize ¶
type ParamsOfFactorize struct { // Hexadecimal representation of u64 composite number. Composite string `json:"composite"` }
type ParamsOfFetch ¶
type ParamsOfFetch struct { // Debot smart contract address. Address string `json:"address"` }
[UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md) Parameters to fetch DeBot metadata.
type ParamsOfFetchNextMonitorResults ¶ added in v1.42.1
type ParamsOfFetchNextMonitorResults struct { // Name of the monitoring queue. Queue string `json:"queue"` // Wait mode. // Default is `NO_WAIT`. WaitMode *MonitorFetchWaitMode `json:"wait_mode"` // optional }
type ParamsOfFindLastShardBlock ¶
type ParamsOfFindLastShardBlock struct { // Account address. Address string `json:"address"` }
type ParamsOfGenerateRandomBytes ¶
type ParamsOfGenerateRandomBytes struct { // Size of random byte array. Length uint32 `json:"length"` }
type ParamsOfGetAddressType ¶
type ParamsOfGetAddressType struct { // Account address in any TON format. Address string `json:"address"` }
type ParamsOfGetBlockchainConfig ¶
type ParamsOfGetBlockchainConfig struct { // Key block BOC or zerostate BOC encoded as base64. BlockBoc string `json:"block_boc"` }
type ParamsOfGetBocDepth ¶
type ParamsOfGetBocDepth struct { // BOC encoded as base64 or BOC handle. Boc string `json:"boc"` }
type ParamsOfGetBocHash ¶
type ParamsOfGetBocHash struct { // BOC encoded as base64 or BOC handle. Boc string `json:"boc"` }
type ParamsOfGetCodeFromTvc ¶
type ParamsOfGetCodeFromTvc struct { // Contract TVC image or image BOC handle. Tvc string `json:"tvc"` }
type ParamsOfGetCodeSalt ¶
type ParamsOfGetCodeSalt struct { // Contract code BOC encoded as base64 or code BOC handle. Code string `json:"code"` // Cache type to put the result. The BOC itself returned if no cache type provided. BocCache *BocCacheType `json:"boc_cache"` // optional }
type ParamsOfGetCompilerVersion ¶
type ParamsOfGetCompilerVersion struct { // Contract code BOC encoded as base64 or code BOC handle. Code string `json:"code"` }
type ParamsOfGetEncryptionBoxFromCryptoBox ¶
type ParamsOfGetEncryptionBoxFromCryptoBox struct { // Crypto Box Handle. Handle uint32 `json:"handle"` // HD key derivation path. // By default, Everscale HD path is used. Hdpath null.String `json:"hdpath"` // optional // Encryption algorithm. Algorithm BoxEncryptionAlgorithm `json:"algorithm"` // Store derived secret for encryption algorithm for this lifetime (in ms). The timer starts after each encryption box operation. Secrets will be deleted (overwritten with zeroes) after each encryption operation, if this value is not set. SecretLifetime null.Uint32 `json:"secret_lifetime"` // optional }
type ParamsOfGetMonitorInfo ¶ added in v1.42.1
type ParamsOfGetMonitorInfo struct { // Name of the monitoring queue. Queue string `json:"queue"` }
type ParamsOfGetSignatureData ¶ added in v1.40.0
type ParamsOfGetSignatureData struct { // Contract ABI used to decode. Abi Abi `json:"abi"` // Message BOC encoded in `base64`. Message string `json:"message"` // Signature ID to be used in unsigned data preparing when CapSignatureWithId capability is enabled. SignatureID null.Int32 `json:"signature_id"` // optional }
type ParamsOfGetSigningBoxFromCryptoBox ¶
type ParamsOfGetSigningBoxFromCryptoBox struct { // Crypto Box Handle. Handle uint32 `json:"handle"` // HD key derivation path. // By default, Everscale HD path is used. Hdpath null.String `json:"hdpath"` // optional // Store derived secret for this lifetime (in ms). The timer starts after each signing box operation. Secrets will be deleted immediately after each signing box operation, if this value is not set. SecretLifetime null.Uint32 `json:"secret_lifetime"` // optional }
type ParamsOfHDKeyPublicFromXPrv ¶
type ParamsOfHDKeyPublicFromXPrv struct { // Serialized extended private key. XPrv string `json:"xprv"` }
type ParamsOfHDKeySecretFromXPrv ¶
type ParamsOfHDKeySecretFromXPrv struct { // Serialized extended private key. XPrv string `json:"xprv"` }
type ParamsOfHDKeyXPrvFromMnemonic ¶
type ParamsOfHDKeyXPrvFromMnemonic struct { // String with seed phrase. Phrase string `json:"phrase"` // Dictionary identifier. Dictionary *MnemonicDictionary `json:"dictionary"` // optional // Mnemonic word count. WordCount null.Uint8 `json:"word_count"` // optional }
type ParamsOfHash ¶
type ParamsOfHash struct { // Input data for hash calculation. // Encoded with `base64`. Data string `json:"data"` }
type ParamsOfInit ¶
type ParamsOfInit struct { // Debot smart contract address. Address string `json:"address"` }
[UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md) Parameters to init DeBot.
type ParamsOfIteratorNext ¶
type ParamsOfIteratorNext struct { // Iterator handle. Iterator uint32 `json:"iterator"` // Maximum count of the returned items. // If value is missing or is less than 1 the library uses 1. Limit null.Uint32 `json:"limit"` // optional // Indicates that function must return the iterator state that can be used for resuming iteration. ReturnResumeState null.Bool `json:"return_resume_state"` // optional }
type ParamsOfMnemonicDeriveSignKeys ¶
type ParamsOfMnemonicDeriveSignKeys struct { // Phrase. Phrase string `json:"phrase"` // Derivation path, for instance "m/44'/396'/0'/0/0". Path null.String `json:"path"` // optional // Dictionary identifier. Dictionary *MnemonicDictionary `json:"dictionary"` // optional // Word count. WordCount null.Uint8 `json:"word_count"` // optional }
type ParamsOfMnemonicFromEntropy ¶
type ParamsOfMnemonicFromEntropy struct { // Entropy bytes. // Hex encoded. Entropy string `json:"entropy"` // Dictionary identifier. Dictionary *MnemonicDictionary `json:"dictionary"` // optional // Mnemonic word count. WordCount null.Uint8 `json:"word_count"` // optional }
type ParamsOfMnemonicFromRandom ¶
type ParamsOfMnemonicFromRandom struct { // Dictionary identifier. Dictionary *MnemonicDictionary `json:"dictionary"` // optional // Mnemonic word count. WordCount null.Uint8 `json:"word_count"` // optional }
type ParamsOfMnemonicVerify ¶
type ParamsOfMnemonicVerify struct { // Phrase. Phrase string `json:"phrase"` // Dictionary identifier. Dictionary *MnemonicDictionary `json:"dictionary"` // optional // Word count. WordCount null.Uint8 `json:"word_count"` // optional }
type ParamsOfMnemonicWords ¶
type ParamsOfMnemonicWords struct { // Dictionary identifier. Dictionary *MnemonicDictionary `json:"dictionary"` // optional }
type ParamsOfModularPower ¶
type ParamsOfMonitorMessages ¶ added in v1.42.1
type ParamsOfMonitorMessages struct { // Name of the monitoring queue. Queue string `json:"queue"` // Messages to start monitoring for. Messages []MessageMonitoringParams `json:"messages"` }
type ParamsOfNaclBox ¶
type ParamsOfNaclBox struct { // Data that must be encrypted encoded in `base64`. Decrypted string `json:"decrypted"` // Nonce, encoded in `hex`. Nonce string `json:"nonce"` // Receiver's public key - unprefixed 0-padded to 64 symbols hex string. TheirPublic string `json:"their_public"` // Sender's private key - unprefixed 0-padded to 64 symbols hex string. Secret string `json:"secret"` }
type ParamsOfNaclBoxKeyPairFromSecret ¶
type ParamsOfNaclBoxKeyPairFromSecret struct { // Secret key - unprefixed 0-padded to 64 symbols hex string. Secret string `json:"secret"` }
type ParamsOfNaclBoxOpen ¶
type ParamsOfNaclBoxOpen struct { // Data that must be decrypted. // Encoded with `base64`. Encrypted string `json:"encrypted"` // Nonce. Nonce string `json:"nonce"` // Sender's public key - unprefixed 0-padded to 64 symbols hex string. TheirPublic string `json:"their_public"` // Receiver's private key - unprefixed 0-padded to 64 symbols hex string. Secret string `json:"secret"` }
type ParamsOfNaclSecretBox ¶
type ParamsOfNaclSign ¶
type ParamsOfNaclSign struct { // Data that must be signed encoded in `base64`. Unsigned string `json:"unsigned"` // Signer's secret key - unprefixed 0-padded to 128 symbols hex string (concatenation of 64 symbols secret and 64 symbols public keys). See `nacl_sign_keypair_from_secret_key`. Secret string `json:"secret"` }
type ParamsOfNaclSignDetachedVerify ¶
type ParamsOfNaclSignDetachedVerify struct { // Unsigned data that must be verified. // Encoded with `base64`. Unsigned string `json:"unsigned"` // Signature that must be verified. // Encoded with `hex`. Signature string `json:"signature"` // Signer's public key - unprefixed 0-padded to 64 symbols hex string. Public string `json:"public"` }
type ParamsOfNaclSignKeyPairFromSecret ¶
type ParamsOfNaclSignKeyPairFromSecret struct { // Secret key - unprefixed 0-padded to 64 symbols hex string. Secret string `json:"secret"` }
type ParamsOfNaclSignOpen ¶
type ParamsOfParse ¶
type ParamsOfParse struct { // BOC encoded as base64. Boc string `json:"boc"` }
type ParamsOfParseShardstate ¶
type ParamsOfProcessMessage ¶
type ParamsOfProcessMessage struct { // Message encode parameters. MessageEncodeParams ParamsOfEncodeMessage `json:"message_encode_params"` // Flag for requesting events sending. Default is `false`. SendEvents null.Bool `json:"send_events"` // optional }
type ParamsOfProofBlockData ¶
type ParamsOfProofBlockData struct { // Single block's data, retrieved from TONOS API, that needs proof. Required fields are `id` and/or top-level `boc` (for block identification), others are optional. Block json.RawMessage `json:"block"` }
type ParamsOfProofMessageData ¶
type ParamsOfProofMessageData struct { // Single message's data as queried from DApp server, without modifications. The required fields are `id` and/or top-level `boc`, others are optional. In order to reduce network requests count, it is recommended to provide at least `boc` of message and non-null `src_transaction.id` or `dst_transaction.id`. Message json.RawMessage `json:"message"` }
type ParamsOfProofTransactionData ¶
type ParamsOfProofTransactionData struct { // Single transaction's data as queried from DApp server, without modifications. The required fields are `id` and/or top-level `boc`, others are optional. In order to reduce network requests count, it is recommended to provide `block_id` and `boc` of transaction. Transaction json.RawMessage `json:"transaction"` }
type ParamsOfQuery ¶
type ParamsOfQuery struct { // GraphQL query text. Query string `json:"query"` // Variables used in query. // Must be a map with named values that can be used in query. Variables json.RawMessage `json:"variables"` // optional }
type ParamsOfQueryCollection ¶
type ParamsOfQueryCollection struct { // Collection name (accounts, blocks, transactions, messages, block_signatures). Collection string `json:"collection"` // Collection filter. Filter json.RawMessage `json:"filter"` // optional // Projection (result) string. Result string `json:"result"` // Sorting order. Order []OrderBy `json:"order"` // optional // Number of documents to return. Limit null.Uint32 `json:"limit"` // optional }
type ParamsOfQueryCounterparties ¶
type ParamsOfQueryCounterparties struct { // Account address. Account string `json:"account"` // Projection (result) string. Result string `json:"result"` // Number of counterparties to return. First null.Uint32 `json:"first"` // optional // `cursor` field of the last received result. After null.String `json:"after"` // optional }
type ParamsOfQueryOperation ¶
type ParamsOfQueryOperation struct { // Should be any of // ParamsOfQueryCollection // ParamsOfWaitForCollection // ParamsOfAggregateCollection // ParamsOfQueryCounterparties EnumTypeValue interface{} }
func (*ParamsOfQueryOperation) MarshalJSON ¶
func (p *ParamsOfQueryOperation) MarshalJSON() ([]byte, error)
MarshalJSON implements custom marshalling for rust directive #[serde(tag="type")] for enum of types.
func (*ParamsOfQueryOperation) UnmarshalJSON ¶
func (p *ParamsOfQueryOperation) UnmarshalJSON(b []byte) error
UnmarshalJSON implements custom unmarshalling for rust directive #[serde(tag="type")] for enum of types.
type ParamsOfQueryTransactionTree ¶
type ParamsOfQueryTransactionTree struct { // Input message id. InMsg string `json:"in_msg"` // List of contract ABIs that will be used to decode message bodies. Library will try to decode each returned message body using any ABI from the registry. AbiRegistry []Abi `json:"abi_registry"` // optional // Timeout used to limit waiting time for the missing messages and transaction. // If some of the following messages and transactions are missing yet // The maximum waiting time is regulated by this option. // // Default value is 60000 (1 min). If `timeout` is set to 0 then function will wait infinitely // until the whole transaction tree is executed. Timeout null.Uint32 `json:"timeout"` // optional // Maximum transaction count to wait. // If transaction tree contains more transaction then this parameter then only first `transaction_max_count` transaction are awaited and returned. // // Default value is 50. If `transaction_max_count` is set to 0 then no limitation on // transaction count is used and all transaction are returned. TransactionMaxCount null.Uint32 `json:"transaction_max_count"` // optional }
type ParamsOfRemove ¶
type ParamsOfRemove struct { // Debot handle which references an instance of debot engine. DebotHandle DebotHandle `json:"debot_handle"` }
[UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md).
type ParamsOfResolveAppRequest ¶
type ParamsOfResolveAppRequest struct { // Request ID received from SDK. AppRequestID uint32 `json:"app_request_id"` // Result of request processing. Result AppRequestResult `json:"result"` }
type ParamsOfResumeBlockIterator ¶
type ParamsOfResumeBlockIterator struct { // Iterator state from which to resume. // Same as value returned from `iterator_next`. ResumeState json.RawMessage `json:"resume_state"` }
type ParamsOfResumeTransactionIterator ¶
type ParamsOfResumeTransactionIterator struct { // Iterator state from which to resume. // Same as value returned from `iterator_next`. ResumeState json.RawMessage `json:"resume_state"` // Account address filter. // Application can specify the list of accounts for which // it wants to iterate transactions. // // If this parameter is missing or an empty list then the library iterates // transactions for all accounts that passes the shard filter. // // Note that the library doesn't detect conflicts between the account filter and the shard filter // if both are specified. // So it is the application's responsibility to specify the correct filter combination. AccountsFilter []string `json:"accounts_filter"` // optional }
type ParamsOfRunExecutor ¶
type ParamsOfRunExecutor struct { // Input message BOC. // Must be encoded as base64. Message string `json:"message"` // Account to run on executor. Account AccountForExecutor `json:"account"` // Execution options. ExecutionOptions *ExecutionOptions `json:"execution_options"` // optional // Contract ABI for decoding output messages. Abi *Abi `json:"abi"` // optional // Skip transaction check flag. SkipTransactionCheck null.Bool `json:"skip_transaction_check"` // optional // Cache type to put the result. // The BOC itself returned if no cache type provided. BocCache *BocCacheType `json:"boc_cache"` // optional // Return updated account flag. // Empty string is returned if the flag is `false`. ReturnUpdatedAccount null.Bool `json:"return_updated_account"` // optional }
type ParamsOfRunGet ¶
type ParamsOfRunGet struct { // Account BOC in `base64`. Account string `json:"account"` // Function name. FunctionName string `json:"function_name"` // Input parameters. Input json.RawMessage `json:"input"` // optional // Execution options. ExecutionOptions *ExecutionOptions `json:"execution_options"` // optional // Convert lists based on nested tuples in the **result** into plain arrays. // Default is `false`. Input parameters may use any of lists representations // If you receive this error on Web: "Runtime error. Unreachable code should not be executed...", // set this flag to true. // This may happen, for example, when elector contract contains too many participants. TupleListAsArray null.Bool `json:"tuple_list_as_array"` // optional }
type ParamsOfRunTvm ¶
type ParamsOfRunTvm struct { // Input message BOC. // Must be encoded as base64. Message string `json:"message"` // Account BOC. // Must be encoded as base64. Account string `json:"account"` // Execution options. ExecutionOptions *ExecutionOptions `json:"execution_options"` // optional // Contract ABI for decoding output messages. Abi *Abi `json:"abi"` // optional // Cache type to put the result. // The BOC itself returned if no cache type provided. BocCache *BocCacheType `json:"boc_cache"` // optional // Return updated account flag. // Empty string is returned if the flag is `false`. ReturnUpdatedAccount null.Bool `json:"return_updated_account"` // optional }
type ParamsOfScrypt ¶
type ParamsOfScrypt struct { // The password bytes to be hashed. Must be encoded with `base64`. Password string `json:"password"` // Salt bytes that modify the hash to protect against Rainbow table attacks. Must be encoded with `base64`. Salt string `json:"salt"` // CPU/memory cost parameter. LogN uint8 `json:"log_n"` // The block size parameter, which fine-tunes sequential memory read size and performance. R uint32 `json:"r"` // Parallelization parameter. P uint32 `json:"p"` // Intended output length in octets of the derived key. DkLen uint32 `json:"dk_len"` }
type ParamsOfSend ¶
type ParamsOfSend struct { // Debot handle which references an instance of debot engine. DebotHandle DebotHandle `json:"debot_handle"` // BOC of internal message to debot encoded in base64 format. Message string `json:"message"` }
[UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md) Parameters of `send` function.
type ParamsOfSendMessage ¶
type ParamsOfSendMessage struct { // Message BOC. Message string `json:"message"` // Optional message ABI. // If this parameter is specified and the message has the // `expire` header then expiration time will be checked against // the current time to prevent unnecessary sending of already expired message. // // The `message already expired` error will be returned in this // case. // // Note, that specifying `abi` for ABI compliant contracts is // strongly recommended, so that proper processing strategy can be // chosen. Abi *Abi `json:"abi"` // optional // Flag for requesting events sending. Default is `false`. SendEvents null.Bool `json:"send_events"` // optional }
type ParamsOfSendMessages ¶ added in v1.42.1
type ParamsOfSendMessages struct { // Messages that must be sent to the blockchain. Messages []MessageSendingParams `json:"messages"` // Optional message monitor queue that starts monitoring for the processing results for sent messages. MonitorQueue null.String `json:"monitor_queue"` // optional }
type ParamsOfSetCodeSalt ¶
type ParamsOfSetCodeSalt struct { // Contract code BOC encoded as base64 or code BOC handle. Code string `json:"code"` // Code salt to set. // BOC encoded as base64 or BOC handle. Salt string `json:"salt"` // Cache type to put the result. The BOC itself returned if no cache type provided. BocCache *BocCacheType `json:"boc_cache"` // optional }
type ParamsOfSign ¶
type ParamsOfSigningBoxSign ¶
type ParamsOfSigningBoxSign struct { // Signing Box handle. SigningBox SigningBoxHandle `json:"signing_box"` // Unsigned user data. // Must be encoded with `base64`. Unsigned string `json:"unsigned"` }
type ParamsOfStart ¶
type ParamsOfStart struct { // Debot handle which references an instance of debot engine. DebotHandle DebotHandle `json:"debot_handle"` }
[UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md) Parameters to start DeBot. DeBot must be already initialized with init() function.
type ParamsOfSubscribe ¶
type ParamsOfSubscribe struct { // GraphQL subscription text. Subscription string `json:"subscription"` // Variables used in subscription. // Must be a map with named values that can be used in query. Variables json.RawMessage `json:"variables"` // optional }
type ParamsOfSubscribeCollection ¶
type ParamsOfSubscribeCollection struct { // Collection name (accounts, blocks, transactions, messages, block_signatures). Collection string `json:"collection"` // Collection filter. Filter json.RawMessage `json:"filter"` // optional // Projection (result) string. Result string `json:"result"` }
type ParamsOfTonCrc16 ¶
type ParamsOfTonCrc16 struct { // Input data for CRC calculation. // Encoded with `base64`. Data string `json:"data"` }
type ParamsOfUpdateInitialData ¶
type ParamsOfUpdateInitialData struct { // Contract ABI. Abi *Abi `json:"abi"` // optional // Data BOC or BOC handle. Data string `json:"data"` // List of initial values for contract's static variables. // `abi` parameter should be provided to set initial data. InitialData json.RawMessage `json:"initial_data"` // optional // Initial account owner's public key to set into account data. InitialPubkey null.String `json:"initial_pubkey"` // optional // Cache type to put the result. The BOC itself returned if no cache type provided. BocCache *BocCacheType `json:"boc_cache"` // optional }
type ParamsOfVerifySignature ¶
type ParamsOfWaitForCollection ¶
type ParamsOfWaitForCollection struct { // Collection name (accounts, blocks, transactions, messages, block_signatures). Collection string `json:"collection"` // Collection filter. Filter json.RawMessage `json:"filter"` // optional // Projection (result) string. Result string `json:"result"` // Query timeout. Timeout null.Uint32 `json:"timeout"` // optional }
type ParamsOfWaitForTransaction ¶
type ParamsOfWaitForTransaction struct { // Optional ABI for decoding the transaction result. // If it is specified, then the output messages' bodies will be // decoded according to this ABI. // // The `abi_decoded` result field will be filled out. Abi *Abi `json:"abi"` // optional // Message BOC. // Encoded with `base64`. Message string `json:"message"` // The last generated block id of the destination account shard before the message was sent. // You must provide the same value as the `send_message` has returned. ShardBlockID string `json:"shard_block_id"` // Flag that enables/disables intermediate events. Default is `false`. SendEvents null.Bool `json:"send_events"` // optional // The list of endpoints to which the message was sent. // Use this field to get more informative errors. // Provide the same value as the `send_message` has returned. // If the message was not delivered (expired), SDK will log the endpoint URLs, used for its sending. SendingEndpoints []string `json:"sending_endpoints"` // optional }
type PinnedBocCacheType ¶
type PinnedBocCacheType struct {
Pin string `json:"pin"`
}
Pin the BOC with `pin` name. Such BOC will not be removed from cache until it is unpinned BOCs can have several pins and each of the pins has reference counter indicating how many times the BOC was pinned with the pin. BOC is removed from cache after all references for all pins are unpinned with `cache_unpin` function calls.
type PredefinedSeedPhraseCryptoBoxSecret ¶
type PredefinedSeedPhraseCryptoBoxSecret struct { Phrase string `json:"phrase"` Dictionary MnemonicDictionary `json:"dictionary"` Wordcount uint8 `json:"wordcount"` }
Restores crypto box instance from an existing seed phrase. This type should be used when Crypto Box is initialized from a seed phrase, entered by a user. This type should be used only upon the first wallet initialization, all further initializations should use `EncryptedSecret` type instead.
Get `encrypted_secret` with `get_crypto_box_info` function and store it on your side.
type ProcessingEvent ¶
type ProcessingEvent struct { // Should be any of // WillFetchFirstBlockProcessingEvent // FetchFirstBlockFailedProcessingEvent // WillSendProcessingEvent // DidSendProcessingEvent // SendFailedProcessingEvent // WillFetchNextBlockProcessingEvent // FetchNextBlockFailedProcessingEvent // MessageExpiredProcessingEvent // RempSentToValidatorsProcessingEvent // RempIncludedIntoBlockProcessingEvent // RempIncludedIntoAcceptedBlockProcessingEvent // RempOtherProcessingEvent // RempErrorProcessingEvent EnumTypeValue interface{} }
func (*ProcessingEvent) MarshalJSON ¶
func (p *ProcessingEvent) MarshalJSON() ([]byte, error)
MarshalJSON implements custom marshalling for rust directive #[serde(tag="type")] for enum of types.
func (*ProcessingEvent) UnmarshalJSON ¶
func (p *ProcessingEvent) UnmarshalJSON(b []byte) error
UnmarshalJSON implements custom unmarshalling for rust directive #[serde(tag="type")] for enum of types.
type ProofsConfig ¶
type ProofsConfig struct { // Cache proofs in the local storage. // Default is `true`. If this value is set to `true`, downloaded proofs and master-chain BOCs are saved into the // persistent local storage (e.g. file system for native environments or browser's IndexedDB // for the web); otherwise all the data is cached only in memory in current client's context // and will be lost after destruction of the client. CacheInLocalStorage null.Bool `json:"cache_in_local_storage"` // optional }
type RandomSeedPhraseCryptoBoxSecret ¶
type RandomSeedPhraseCryptoBoxSecret struct { Dictionary MnemonicDictionary `json:"dictionary"` Wordcount uint8 `json:"wordcount"` }
Creates Crypto Box from a random seed phrase. This option can be used if a developer doesn't want the seed phrase to leave the core library's memory, where it is stored encrypted. This type should be used upon the first wallet initialization, all further initializations should use `EncryptedSecret` type instead.
Get `encrypted_secret` with `get_crypto_box_info` function and store it on your side.
type RawResponse ¶
type RawResponse struct { Data []byte Code ResponseCode Error error }
type RegisteredCryptoBox ¶
type RegisteredCryptoBox struct {
Handle CryptoBoxHandle `json:"handle"`
}
type RegisteredDebot ¶
type RegisteredDebot struct { // Debot handle which references an instance of debot engine. DebotHandle DebotHandle `json:"debot_handle"` // Debot abi as json string. DebotAbi string `json:"debot_abi"` // Debot metadata. Info DebotInfo `json:"info"` }
[UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md) Structure for storing debot handle returned from `init` function.
type RegisteredEncryptionBox ¶
type RegisteredEncryptionBox struct { // Handle of the encryption box. Handle EncryptionBoxHandle `json:"handle"` }
type RegisteredIterator ¶
type RegisteredIterator struct { // Iterator handle. // Must be removed using `remove_iterator` // when it is no more needed for the application. Handle uint32 `json:"handle"` }
type RegisteredSigningBox ¶
type RegisteredSigningBox struct { // Handle of the signing box. Handle SigningBoxHandle `json:"handle"` }
type RempErrorProcessingEvent ¶
type RempErrorProcessingEvent struct { MessageID string `json:"message_id"` MessageDst string `json:"message_dst"` Error Error `json:"error"` }
Notifies the app about any problem that has occurred in REMP processing - in this case library switches to the fallback transaction awaiting scenario (sequential block reading).
type RempIncludedIntoAcceptedBlockProcessingEvent ¶
type RempIncludedIntoAcceptedBlockProcessingEvent struct { MessageID string `json:"message_id"` MessageDst string `json:"message_dst"` Timestamp big.Int `json:"timestamp"` JSON json.RawMessage `json:"json"` }
Notifies the app that the block candidate with the message has been accepted by the thread's validators.
type RempIncludedIntoBlockProcessingEvent ¶
type RempIncludedIntoBlockProcessingEvent struct { MessageID string `json:"message_id"` MessageDst string `json:"message_dst"` Timestamp big.Int `json:"timestamp"` JSON json.RawMessage `json:"json"` }
Notifies the app that the message has been successfully included into a block candidate by the thread's collator.
type RempOtherProcessingEvent ¶
type RempOtherProcessingEvent struct { MessageID string `json:"message_id"` MessageDst string `json:"message_dst"` Timestamp big.Int `json:"timestamp"` JSON json.RawMessage `json:"json"` }
Notifies the app about some other minor REMP statuses occurring during message processing.
type RempSentToValidatorsProcessingEvent ¶
type RempSentToValidatorsProcessingEvent struct { MessageID string `json:"message_id"` MessageDst string `json:"message_dst"` Timestamp big.Int `json:"timestamp"` JSON json.RawMessage `json:"json"` }
Notifies the app that the message has been delivered to the thread's validators.
type ResponseCode ¶
type ResponseCode uint32
type ResultOfAbiEncodeBoc ¶
type ResultOfAbiEncodeBoc struct { // BOC encoded as base64. Boc string `json:"boc"` }
type ResultOfAggregateCollection ¶
type ResultOfAggregateCollection struct { // Values for requested fields. // Returns an array of strings. Each string refers to the corresponding `fields` item. // Numeric value is returned as a decimal string representations. Values json.RawMessage `json:"values"` }
type ResultOfAppDebotBrowser ¶
type ResultOfAppDebotBrowser struct { // Should be any of // InputResultOfAppDebotBrowser // GetSigningBoxResultOfAppDebotBrowser // InvokeDebotResultOfAppDebotBrowser // ApproveResultOfAppDebotBrowser EnumTypeValue interface{} }
func (*ResultOfAppDebotBrowser) MarshalJSON ¶
func (p *ResultOfAppDebotBrowser) MarshalJSON() ([]byte, error)
MarshalJSON implements custom marshalling for rust directive #[serde(tag="type")] for enum of types.
func (*ResultOfAppDebotBrowser) UnmarshalJSON ¶
func (p *ResultOfAppDebotBrowser) UnmarshalJSON(b []byte) error
UnmarshalJSON implements custom unmarshalling for rust directive #[serde(tag="type")] for enum of types.
type ResultOfAppEncryptionBox ¶
type ResultOfAppEncryptionBox struct { // Should be any of // GetInfoResultOfAppEncryptionBox // EncryptResultOfAppEncryptionBox // DecryptResultOfAppEncryptionBox EnumTypeValue interface{} }
func (*ResultOfAppEncryptionBox) MarshalJSON ¶
func (p *ResultOfAppEncryptionBox) MarshalJSON() ([]byte, error)
MarshalJSON implements custom marshalling for rust directive #[serde(tag="type")] for enum of types.
func (*ResultOfAppEncryptionBox) UnmarshalJSON ¶
func (p *ResultOfAppEncryptionBox) UnmarshalJSON(b []byte) error
UnmarshalJSON implements custom unmarshalling for rust directive #[serde(tag="type")] for enum of types.
type ResultOfAppPasswordProvider ¶
type ResultOfAppPasswordProvider struct { // Should be any of // GetPasswordResultOfAppPasswordProvider EnumTypeValue interface{} }
func (*ResultOfAppPasswordProvider) MarshalJSON ¶
func (p *ResultOfAppPasswordProvider) MarshalJSON() ([]byte, error)
MarshalJSON implements custom marshalling for rust directive #[serde(tag="type")] for enum of types.
func (*ResultOfAppPasswordProvider) UnmarshalJSON ¶
func (p *ResultOfAppPasswordProvider) UnmarshalJSON(b []byte) error
UnmarshalJSON implements custom unmarshalling for rust directive #[serde(tag="type")] for enum of types.
type ResultOfAppSigningBox ¶
type ResultOfAppSigningBox struct { // Should be any of // GetPublicKeyResultOfAppSigningBox // SignResultOfAppSigningBox EnumTypeValue interface{} }
func (*ResultOfAppSigningBox) MarshalJSON ¶
func (p *ResultOfAppSigningBox) MarshalJSON() ([]byte, error)
MarshalJSON implements custom marshalling for rust directive #[serde(tag="type")] for enum of types.
func (*ResultOfAppSigningBox) UnmarshalJSON ¶
func (p *ResultOfAppSigningBox) UnmarshalJSON(b []byte) error
UnmarshalJSON implements custom unmarshalling for rust directive #[serde(tag="type")] for enum of types.
type ResultOfAttachSignature ¶
type ResultOfAttachSignatureToMessageBody ¶
type ResultOfAttachSignatureToMessageBody struct {
Body string `json:"body"`
}
type ResultOfBatchQuery ¶
type ResultOfBatchQuery struct { // Result values for batched queries. // Returns an array of values. Each value corresponds to `queries` item. Results []json.RawMessage `json:"results"` }
type ResultOfBocCacheGet ¶
type ResultOfBocCacheSet ¶
type ResultOfBocCacheSet struct { // Reference to the cached BOC. BocRef string `json:"boc_ref"` }
type ResultOfBuildInfo ¶
type ResultOfBuildInfo struct { // Build number assigned to this build by the CI. BuildNumber uint32 `json:"build_number"` // Fingerprint of the most important dependencies. Dependencies []BuildInfoDependency `json:"dependencies"` }
type ResultOfCalcFunctionId ¶ added in v1.35.1
type ResultOfCalcFunctionId struct { // Contract function ID. FunctionID uint32 `json:"function_id"` }
type ResultOfCalcStorageFee ¶
type ResultOfCalcStorageFee struct {
Fee string `json:"fee"`
}
type ResultOfChaCha20 ¶
type ResultOfChaCha20 struct { // Encrypted/decrypted data. // Encoded with `base64`. Data string `json:"data"` }
type ResultOfCompressZstd ¶
type ResultOfCompressZstd struct { // Compressed data. // Must be encoded as base64. Compressed string `json:"compressed"` }
type ResultOfConvertAddress ¶
type ResultOfConvertAddress struct { // Address in the specified format. Address string `json:"address"` }
type ResultOfConvertPublicKeyToTonSafeFormat ¶
type ResultOfConvertPublicKeyToTonSafeFormat struct { // Public key represented in TON safe format. TonPublicKey string `json:"ton_public_key"` }
type ResultOfDecodeAccountData ¶
type ResultOfDecodeAccountData struct { // Decoded data as a JSON structure. Data json.RawMessage `json:"data"` }
type ResultOfDecodeBoc ¶
type ResultOfDecodeBoc struct { // Decoded data as a JSON structure. Data json.RawMessage `json:"data"` }
type ResultOfDecodeInitialData ¶
type ResultOfDecodeInitialData struct { // List of initial values of contract's public variables. // Initial data is decoded if `abi` input parameter is provided. InitialData json.RawMessage `json:"initial_data"` // optional // Initial account owner's public key. InitialPubkey string `json:"initial_pubkey"` }
type ResultOfDecodeStateInit ¶ added in v1.43.3
type ResultOfDecodeStateInit struct { // Contract code BOC encoded as base64 or BOC handle. Code null.String `json:"code"` // optional // Contract code hash. CodeHash null.String `json:"code_hash"` // optional // Contract code depth. CodeDepth null.Uint32 `json:"code_depth"` // optional // Contract data BOC encoded as base64 or BOC handle. Data null.String `json:"data"` // optional // Contract data hash. DataHash null.String `json:"data_hash"` // optional // Contract data depth. DataDepth null.Uint32 `json:"data_depth"` // optional // Contract library BOC encoded as base64 or BOC handle. Library null.String `json:"library"` // optional // `special.tick` field. // Specifies the contract ability to handle tick transactions. Tick null.Bool `json:"tick"` // optional // `special.tock` field. // Specifies the contract ability to handle tock transactions. Tock null.Bool `json:"tock"` // optional // Is present and non-zero only in instances of large smart contracts. SplitDepth null.Uint32 `json:"split_depth"` // optional // Compiler version, for example 'sol 0.49.0'. CompilerVersion null.String `json:"compiler_version"` // optional }
type ResultOfDecodeTvc ¶
type ResultOfDecodeTvc struct { // Decoded TVC. Tvc Tvc `json:"tvc"` }
type ResultOfDecompressZstd ¶
type ResultOfDecompressZstd struct { // Decompressed data. // Must be encoded as base64. Decompressed string `json:"decompressed"` }
type ResultOfEncodeAccount ¶
type ResultOfEncodeBoc ¶
type ResultOfEncodeBoc struct { // Encoded cell BOC or BOC cache key. Boc string `json:"boc"` }
type ResultOfEncodeInitialData ¶
type ResultOfEncodeInitialData struct { // Updated data BOC or BOC handle. Data string `json:"data"` }
type ResultOfEncodeMessage ¶
type ResultOfEncodeMessage struct { // Message BOC encoded with `base64`. Message string `json:"message"` // Optional data to be signed encoded in `base64`. // Returned in case of `Signer::External`. Can be used for external // message signing. Is this case you need to use this data to create signature and // then produce signed message using `abi.attach_signature`. DataToSign null.String `json:"data_to_sign"` // optional // Destination address. Address string `json:"address"` // Message id. MessageID string `json:"message_id"` }
type ResultOfEncodeMessageBody ¶
type ResultOfEncodeMessageBody struct { // Message body BOC encoded with `base64`. Body string `json:"body"` // Optional data to sign. // Encoded with `base64`. // Presents when `message` is unsigned. Can be used for external // message signing. Is this case you need to sing this data and // produce signed message using `abi.attach_signature`. DataToSign null.String `json:"data_to_sign"` // optional }
type ResultOfEncodeStateInit ¶ added in v1.43.3
type ResultOfEncodeStateInit struct { // Contract StateInit image BOC encoded as base64 or BOC handle of boc_cache parameter was specified. StateInit string `json:"state_init"` }
type ResultOfEncryptionBoxDecrypt ¶
type ResultOfEncryptionBoxDecrypt struct { // Decrypted data, encoded in Base64. Data string `json:"data"` }
type ResultOfEncryptionBoxEncrypt ¶
type ResultOfEncryptionBoxEncrypt struct { // Encrypted data, encoded in Base64. // Padded to cipher block size. Data string `json:"data"` }
type ResultOfEncryptionBoxGetInfo ¶
type ResultOfEncryptionBoxGetInfo struct { // Encryption box information. Info EncryptionBoxInfo `json:"info"` }
type ResultOfFactorize ¶
type ResultOfFactorize struct { // Two factors of composite or empty if composite can't be factorized. Factors []string `json:"factors"` }
type ResultOfFetch ¶
type ResultOfFetch struct { // Debot metadata. Info DebotInfo `json:"info"` }
[UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md).
type ResultOfFetchNextMonitorResults ¶ added in v1.42.1
type ResultOfFetchNextMonitorResults struct { // List of the resolved results. Results []MessageMonitoringResult `json:"results"` }
type ResultOfFindLastShardBlock ¶
type ResultOfFindLastShardBlock struct { // Account shard last block ID. BlockID string `json:"block_id"` }
type ResultOfGenerateRandomBytes ¶
type ResultOfGenerateRandomBytes struct { // Generated bytes encoded in `base64`. Bytes string `json:"bytes"` }
type ResultOfGetAddressType ¶
type ResultOfGetAddressType struct { // Account address type. AddressType AccountAddressType `json:"address_type"` }
type ResultOfGetBlockchainConfig ¶
type ResultOfGetBlockchainConfig struct { // Blockchain config BOC encoded as base64. ConfigBoc string `json:"config_boc"` }
type ResultOfGetBocDepth ¶
type ResultOfGetBocDepth struct { // BOC root cell depth. Depth uint32 `json:"depth"` }
type ResultOfGetBocHash ¶
type ResultOfGetBocHash struct { // BOC root hash encoded with hex. Hash string `json:"hash"` }
type ResultOfGetCodeFromTvc ¶
type ResultOfGetCodeFromTvc struct { // Contract code encoded as base64. Code string `json:"code"` }
type ResultOfGetCodeSalt ¶
type ResultOfGetCryptoBoxInfo ¶
type ResultOfGetCryptoBoxInfo struct { // Secret (seed phrase) encrypted with salt and password. EncryptedSecret string `json:"encrypted_secret"` }
type ResultOfGetCryptoBoxSeedPhrase ¶
type ResultOfGetCryptoBoxSeedPhrase struct { Phrase string `json:"phrase"` Dictionary MnemonicDictionary `json:"dictionary"` Wordcount uint8 `json:"wordcount"` }
type ResultOfGetEndpoints ¶
type ResultOfGetSignatureData ¶ added in v1.40.0
type ResultOfGetSignatureId ¶ added in v1.41.0
type ResultOfHDKeyDeriveFromXPrv ¶
type ResultOfHDKeyDeriveFromXPrv struct { // Serialized extended private key. XPrv string `json:"xprv"` }
type ResultOfHDKeyDeriveFromXPrvPath ¶
type ResultOfHDKeyDeriveFromXPrvPath struct { // Derived serialized extended private key. XPrv string `json:"xprv"` }
type ResultOfHDKeyPublicFromXPrv ¶
type ResultOfHDKeyPublicFromXPrv struct { // Public key - 64 symbols hex string. Public string `json:"public"` }
type ResultOfHDKeySecretFromXPrv ¶
type ResultOfHDKeySecretFromXPrv struct { // Private key - 64 symbols hex string. Secret string `json:"secret"` }
type ResultOfHDKeyXPrvFromMnemonic ¶
type ResultOfHDKeyXPrvFromMnemonic struct { // Serialized extended master private key. XPrv string `json:"xprv"` }
type ResultOfHash ¶
type ResultOfHash struct { // Hash of input `data`. // Encoded with 'hex'. Hash string `json:"hash"` }
type ResultOfIteratorNext ¶
type ResultOfIteratorNext struct { // Next available items. // Note that `iterator_next` can return an empty items and `has_more` equals to `true`. // In this case the application have to continue iteration. // Such situation can take place when there is no data yet but // the requested `end_time` is not reached. Items []json.RawMessage `json:"items"` // Indicates that there are more available items in iterated range. HasMore bool `json:"has_more"` // Optional iterator state that can be used for resuming iteration. // This field is returned only if the `return_resume_state` parameter // is specified. // // Note that `resume_state` corresponds to the iteration position // after the returned items. ResumeState json.RawMessage `json:"resume_state"` // optional }
type ResultOfMnemonicFromEntropy ¶
type ResultOfMnemonicFromEntropy struct { // Phrase. Phrase string `json:"phrase"` }
type ResultOfMnemonicFromRandom ¶
type ResultOfMnemonicFromRandom struct { // String of mnemonic words. Phrase string `json:"phrase"` }
type ResultOfMnemonicVerify ¶
type ResultOfMnemonicVerify struct { // Flag indicating if the mnemonic is valid or not. Valid bool `json:"valid"` }
type ResultOfMnemonicWords ¶
type ResultOfMnemonicWords struct { // The list of mnemonic words. Words string `json:"words"` }
type ResultOfModularPower ¶
type ResultOfModularPower struct { // Result of modular exponentiation. ModularPower string `json:"modular_power"` }
type ResultOfNaclBox ¶
type ResultOfNaclBox struct { // Encrypted data encoded in `base64`. Encrypted string `json:"encrypted"` }
type ResultOfNaclBoxOpen ¶
type ResultOfNaclBoxOpen struct { // Decrypted data encoded in `base64`. Decrypted string `json:"decrypted"` }
type ResultOfNaclSign ¶
type ResultOfNaclSign struct { // Signed data, encoded in `base64`. Signed string `json:"signed"` }
type ResultOfNaclSignDetached ¶
type ResultOfNaclSignDetached struct { // Signature encoded in `hex`. Signature string `json:"signature"` }
type ResultOfNaclSignDetachedVerify ¶
type ResultOfNaclSignDetachedVerify struct { // `true` if verification succeeded or `false` if it failed. Succeeded bool `json:"succeeded"` }
type ResultOfNaclSignOpen ¶
type ResultOfNaclSignOpen struct { // Unsigned data, encoded in `base64`. Unsigned string `json:"unsigned"` }
type ResultOfParse ¶
type ResultOfParse struct { // JSON containing parsed BOC. Parsed json.RawMessage `json:"parsed"` }
type ResultOfProcessMessage ¶
type ResultOfProcessMessage struct { // Parsed transaction. // In addition to the regular transaction fields there is a // `boc` field encoded with `base64` which contains source // transaction BOC. Transaction json.RawMessage `json:"transaction"` // List of output messages' BOCs. // Encoded as `base64`. OutMessages []string `json:"out_messages"` // Optional decoded message bodies according to the optional `abi` parameter. Decoded *DecodedOutput `json:"decoded"` // optional // Transaction fees. Fees TransactionFees `json:"fees"` }
type ResultOfQuery ¶
type ResultOfQuery struct { // Result provided by DAppServer. Result json.RawMessage `json:"result"` }
type ResultOfQueryCollection ¶
type ResultOfQueryCollection struct { // Objects that match the provided criteria. Result []json.RawMessage `json:"result"` }
type ResultOfQueryTransactionTree ¶
type ResultOfQueryTransactionTree struct { // Messages. Messages []MessageNode `json:"messages"` // Transactions. Transactions []TransactionNode `json:"transactions"` }
type ResultOfRunExecutor ¶
type ResultOfRunExecutor struct { // Parsed transaction. // In addition to the regular transaction fields there is a // `boc` field encoded with `base64` which contains source // transaction BOC. Transaction json.RawMessage `json:"transaction"` // List of output messages' BOCs. // Encoded as `base64`. OutMessages []string `json:"out_messages"` // Optional decoded message bodies according to the optional `abi` parameter. Decoded *DecodedOutput `json:"decoded"` // optional // Updated account state BOC. // Encoded as `base64`. Account string `json:"account"` // Transaction fees. Fees TransactionFees `json:"fees"` }
type ResultOfRunGet ¶
type ResultOfRunGet struct { // Values returned by get-method on stack. Output json.RawMessage `json:"output"` }
type ResultOfRunTvm ¶
type ResultOfRunTvm struct { // List of output messages' BOCs. // Encoded as `base64`. OutMessages []string `json:"out_messages"` // Optional decoded message bodies according to the optional `abi` parameter. Decoded *DecodedOutput `json:"decoded"` // optional // Updated account state BOC. // Encoded as `base64`. Attention! Only `account_state.storage.state.data` part of the BOC is updated. Account string `json:"account"` }
type ResultOfScrypt ¶
type ResultOfScrypt struct { // Derived key. // Encoded with `hex`. Key string `json:"key"` }
type ResultOfSendMessage ¶
type ResultOfSendMessage struct { // The last generated shard block of the message destination account before the message was sent. // This block id must be used as a parameter of the // `wait_for_transaction`. ShardBlockID string `json:"shard_block_id"` // The list of endpoints to which the message was sent. // This list id must be used as a parameter of the // `wait_for_transaction`. SendingEndpoints []string `json:"sending_endpoints"` }
type ResultOfSendMessages ¶ added in v1.42.1
type ResultOfSendMessages struct { // Messages that was sent to the blockchain for execution. Messages []MessageMonitoringParams `json:"messages"` }
type ResultOfSetCodeSalt ¶
type ResultOfSetCodeSalt struct { // Contract code with salt set. // BOC encoded as base64 or BOC handle. Code string `json:"code"` }
type ResultOfSign ¶
type ResultOfSigningBoxGetPublicKey ¶
type ResultOfSigningBoxGetPublicKey struct { // Public key of signing box. // Encoded with hex. Pubkey string `json:"pubkey"` }
type ResultOfSigningBoxSign ¶
type ResultOfSigningBoxSign struct { // Data signature. // Encoded with `hex`. Signature string `json:"signature"` }
type ResultOfSubscribeCollection ¶
type ResultOfSubscribeCollection struct { // Subscription handle. // Must be closed with `unsubscribe`. Handle uint32 `json:"handle"` }
type ResultOfTonCrc16 ¶
type ResultOfTonCrc16 struct { // Calculated CRC for input data. Crc uint16 `json:"crc"` }
type ResultOfUpdateInitialData ¶
type ResultOfUpdateInitialData struct { // Updated data BOC or BOC handle. Data string `json:"data"` }
type ResultOfVerifySignature ¶
type ResultOfVerifySignature struct { // Unsigned data encoded in `base64`. Unsigned string `json:"unsigned"` }
type ResultOfVersion ¶
type ResultOfVersion struct { // Core Library version. Version string `json:"version"` }
type ResultOfWaitForCollection ¶
type ResultOfWaitForCollection struct { // First found object that matches the provided criteria. Result json.RawMessage `json:"result"` }
type SendFailedProcessingEvent ¶
type SendFailedProcessingEvent struct { ShardBlockID string `json:"shard_block_id"` MessageID string `json:"message_id"` MessageDst string `json:"message_dst"` Message string `json:"message"` Error Error `json:"error"` }
Notifies the app that the sending operation was failed with network error. Nevertheless the processing will be continued at the waiting phase because the message possibly has been delivered to the node. If Application exits at this phase, Developer needs to proceed with processing after the application is restored with `wait_for_transaction` function, passing shard_block_id and message from this event. Do not forget to specify abi of your contract as well, it is crucial for processing. See `processing.wait_for_transaction` documentation.
type SendParamsOfAppDebotBrowser ¶
type SendParamsOfAppDebotBrowser struct { // Internal message to DInterface address. // Message body contains interface function and parameters. Message string `json:"message"` }
Used by Debot to call DInterface implemented by Debot Browser.
type ShowActionParamsOfAppDebotBrowser ¶
type ShowActionParamsOfAppDebotBrowser struct { // Debot action that must be shown to user as menu item. At least `description` property must be shown from [DebotAction] structure. Action DebotAction `json:"action"` }
Show action to the user. Called after `switch` for each action in context.
type SignParamsOfAppSigningBox ¶
type SignParamsOfAppSigningBox struct { // Data to sign encoded as base64. Unsigned string `json:"unsigned"` }
Sign data.
type SignResultOfAppSigningBox ¶
type SignResultOfAppSigningBox struct { // Data signature encoded as hex. Signature string `json:"signature"` }
Result of signing data.
type Signer ¶
type Signer struct { // Should be any of // NoneSigner // ExternalSigner // KeysSigner // SigningBoxSigner EnumTypeValue interface{} }
func (*Signer) MarshalJSON ¶
MarshalJSON implements custom marshalling for rust directive #[serde(tag="type")] for enum of types.
func (*Signer) UnmarshalJSON ¶
UnmarshalJSON implements custom unmarshalling for rust directive #[serde(tag="type")] for enum of types.
type SigningBoxHandle ¶
type SigningBoxHandle uint32
type SigningBoxSigner ¶
type SigningBoxSigner struct {
Handle SigningBoxHandle `json:"handle"`
}
Signing Box interface is provided for signing, allows Dapps to sign messages using external APIs, such as HSM, cold wallet, etc.
type SortDirection ¶
type SortDirection string
const ( AscSortDirection SortDirection = "ASC" DescSortDirection SortDirection = "DESC" )
type Spending ¶
type Spending struct { // Amount of nanotokens that will be sent to `dst` address. Amount big.Int `json:"amount"` // Destination address of recipient of funds. Dst string `json:"dst"` }
[UNSTABLE](UNSTABLE.md) [DEPRECATED](DEPRECATED.md) Describes how much funds will be debited from the target contract balance as a result of the transaction.
type StateInitParams ¶
type StateInitParams struct { Abi Abi `json:"abi"` Value json.RawMessage `json:"value"` }
type StateInitSource ¶
type StateInitSource struct { // Should be any of // MessageStateInitSource // StateInitStateInitSource // TvcStateInitSource EnumTypeValue interface{} }
func (*StateInitSource) MarshalJSON ¶
func (p *StateInitSource) MarshalJSON() ([]byte, error)
MarshalJSON implements custom marshalling for rust directive #[serde(tag="type")] for enum of types.
func (*StateInitSource) UnmarshalJSON ¶
func (p *StateInitSource) UnmarshalJSON(b []byte) error
UnmarshalJSON implements custom unmarshalling for rust directive #[serde(tag="type")] for enum of types.
type StateInitStateInitSource ¶
type StateInitStateInitSource struct { // Code BOC. // Encoded in `base64`. Code string `json:"code"` // Data BOC. // Encoded in `base64`. Data string `json:"data"` // Library BOC. // Encoded in `base64`. Library null.String `json:"library"` // optional }
State init data.
type SwitchCompletedParamsOfAppDebotBrowser ¶
type SwitchCompletedParamsOfAppDebotBrowser struct{}
Notify browser that all context actions are shown.
type SwitchParamsOfAppDebotBrowser ¶
type SwitchParamsOfAppDebotBrowser struct { // Debot context ID to which debot is switched. ContextID uint8 `json:"context_id"` }
Switch debot to another context (menu).
type TransactionDebotActivity ¶
type TransactionDebotActivity struct { // External inbound message BOC. Msg string `json:"msg"` // Target smart contract address. Dst string `json:"dst"` // List of spendings as a result of transaction. Out []Spending `json:"out"` // Transaction total fee. Fee big.Int `json:"fee"` // Indicates if target smart contract updates its code. Setcode bool `json:"setcode"` // Public key from keypair that was used to sign external message. Signkey string `json:"signkey"` // Signing box handle used to sign external message. SigningBoxHandle uint32 `json:"signing_box_handle"` }
DeBot wants to create new transaction in blockchain.
type TransactionFees ¶
type TransactionFees struct { // Deprecated. // Contains the same data as ext_in_msg_fee field. InMsgFwdFee big.Int `json:"in_msg_fwd_fee"` // Fee for account storage. StorageFee big.Int `json:"storage_fee"` // Fee for processing. GasFee big.Int `json:"gas_fee"` // Deprecated. // Contains the same data as total_fwd_fees field. Deprecated because of its confusing name, that is not the same with GraphQL API Transaction type's field. OutMsgsFwdFee big.Int `json:"out_msgs_fwd_fee"` // Deprecated. // Contains the same data as account_fees field. TotalAccountFees big.Int `json:"total_account_fees"` // Deprecated because it means total value sent in the transaction, which does not relate to any fees. TotalOutput big.Int `json:"total_output"` // Fee for inbound external message import. ExtInMsgFee big.Int `json:"ext_in_msg_fee"` // Total fees the account pays for message forwarding. TotalFwdFees big.Int `json:"total_fwd_fees"` // Total account fees for the transaction execution. Compounds of storage_fee + gas_fee + ext_in_msg_fee + total_fwd_fees. AccountFees big.Int `json:"account_fees"` }
type TransactionNode ¶
type TransactionNode struct { // Transaction id. ID string `json:"id"` // In message id. InMsg string `json:"in_msg"` // Out message ids. OutMsgs []string `json:"out_msgs"` // Account address. AccountAddr string `json:"account_addr"` // Transactions total fees. TotalFees string `json:"total_fees"` // Aborted flag. Aborted bool `json:"aborted"` // Compute phase exit code. ExitCode null.Uint32 `json:"exit_code"` // optional }
type Tvc ¶ added in v1.43.3
type Tvc struct { // Should be any of // V1Tvc EnumTypeValue interface{} }
func (*Tvc) MarshalJSON ¶ added in v1.43.3
MarshalJSON implements custom marshalling for rust directive #[serde(tag="type")] for enum of types.
func (*Tvc) UnmarshalJSON ¶ added in v1.43.3
UnmarshalJSON implements custom unmarshalling for rust directive #[serde(tag="type")] for enum of types.
type TvcStateInitSource ¶
type TvcStateInitSource struct { Tvc string `json:"tvc"` PublicKey null.String `json:"public_key"` // optional InitParams *StateInitParams `json:"init_params"` // optional }
Content of the TVC file. Encoded in `base64`.
type UninitAccountForExecutor ¶
type UninitAccountForExecutor struct{}
Emulate uninitialized account to run deploy message.
type UnpinnedBocCacheType ¶
type UnpinnedBocCacheType struct{}
BOC is placed into a common BOC pool with limited size regulated by LRU (least recently used) cache lifecycle. BOC resides there until it is replaced with other BOCs if it is not used.
type WillFetchFirstBlockProcessingEvent ¶
type WillFetchFirstBlockProcessingEvent struct { MessageID string `json:"message_id"` MessageDst string `json:"message_dst"` }
Notifies the application that the account's current shard block will be fetched from the network. This step is performed before the message sending so that sdk knows starting from which block it will search for the transaction. Fetched block will be used later in waiting phase.
type WillFetchNextBlockProcessingEvent ¶
type WillFetchNextBlockProcessingEvent struct { ShardBlockID string `json:"shard_block_id"` MessageID string `json:"message_id"` MessageDst string `json:"message_dst"` Message string `json:"message"` }
Notifies the app that the next shard block will be fetched from the network. Event can occurs more than one time due to block walking procedure. If Application exits at this phase, Developer needs to proceed with processing after the application is restored with `wait_for_transaction` function, passing shard_block_id and message from this event. Do not forget to specify abi of your contract as well, it is crucial for processing. See `processing.wait_for_transaction` documentation.
type WillSendProcessingEvent ¶
type WillSendProcessingEvent struct { ShardBlockID string `json:"shard_block_id"` MessageID string `json:"message_id"` MessageDst string `json:"message_dst"` Message string `json:"message"` }
Notifies the app that the message will be sent to the network. This event means that the account's current shard block was successfully fetched and the message was successfully created (`abi.encode_message` function was executed successfully).
type WrapperConfig ¶
type WrapperConfig struct { // Prevents from spawning unlimited system threads // when EVER-SDK external code is called via CGO // for more details please see `func cgocall(fn, arg unsafe.Pointer) int32` // implementation and comments in `runtime` package. MaxCGOConcurrentThreads uint }