v2

package module
v2.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 30, 2020 License: MIT Imports: 12 Imported by: 4

README

TONLIB Golang library

Go Report Card GoDoc

TONLIB Golang library for accessing Telegram Open Network with liteclient protocol, which is based itself on tdlib library. Warning: this repository is under active development, not ready for production use

Install

$ go get -u github.com/mercuryoio/tonlib-go

Usage

import tonlib "github.com/mercuryoio/tonlib-go/v2"

Supported methods

  • createNewKey
  • deleteKey
  • exportKey
  • exportPemKey
  • exportEncryptedKey
  • importKey
  • importPemKey
  • importEncryptedKey
  • changeLocalPassword
  • unpackAccountAddress
  • packAccountAddress
  • wallet.init
  • wallet.getAccountAddress
  • [-] wallet.getAccountState
  • [-] wallet.sendGrams
  • raw.sendMessage
  • raw.getTransactions
  • raw.getAccountState
  • generic.sendGrams
  • getLogStream
  • sync
  • CreateAndSendMessage
  • generic.createSendGramsQuery
  • query.send
  • query.forge
  • query.estimateFees
  • query.getInfo
  • smc.load
  • smc.getCode
  • smc.getData
  • smc.getState
  • smc.runGetMethod

Examples

Create new client

    options, err := tonlib.ParseConfigFile("path/to/config.json")
    if err != nil {
        panic(err)
    }

    // make req
    req := tonlib.TonInitRequest{
        "init",
        *options,
    }

    tonClient, err = tonlib.NewClient(
    	&req, // init request
    	tonlib.Config{}, // config
    	10, // timeout in seconds for each (currently only QueryEstimateFees) tonlib.Client`s public method
    	true, // enable client`s logs
    	9, // logging level in ton lib.
    )
    if err != nil {
        panic(err)
    }
    defer cln.Destroy()
Create new private key
    // prepare data
    loc := SecureBytes("loc_pass")
    mem := SecureBytes("mem_pass")
    seed := SecureBytes("")

    // create new key
    pKey, err := cln.CreateNewKey(&loc, &mem, &seed)
    if err != nil {
       panic(err)
    }
Get wallet address
    addrr, err := cln.WalletGetAccountAddress(tonlib.NewWalletInitialAccountState("YourPublicKey"))
    if err != nil {
        panic(err)
    }

CLI:

To install sample cli application:

$ go get -u github.com/mercuryoio/tonlib-go/cmd/tongo

To run sample cli app your have to set LD_LIBRARY_PATH:

For linux export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:<path2repository>/lib/linux

For MacOS export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:<path2repository>/lib/darwin

Code generation from new *.tl files released by TON team

If you need to update structures and add new methods based on a fresh release of TON`s client you can do it by using code generation command. In order to perform such operation - run the command bellow and provide path of *.tl file to the running command as in the example bellow.

$ go run github.com/mercuryoio/tonlib-go/cmd/tlgenerator /path/to/repos/ton/tl/generate/scheme/tonlib_api.tl

Developers

Mercuryo.io

Contribute

PRs are welcome!

Documentation

Index

Constants

View Source
const (
	DEFAULT_TIMEOUT = 4.5
	DefaultRetries  = 10
)
View Source
const NoErrorCode = 0
View Source
const SmcComputeReturnedStakeMethod = "compute_returned_stake"
View Source
const SmcElectionIdMethod = "active_election_id"
View Source
const SmcParicipiantListExtendedMethod = "participant_list_extended"
View Source
const SmcParicipiantListMethod = "participant_list"
View Source
const SmcParticipatesInMethod = "participates_in"
View Source
const SmcRunResultType = "smc.runResult"
View Source
const SmcWalletSeqnoMethod = "seqno"

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountAddress

type AccountAddress struct {
	AccountAddress string `json:"account_address"` //
	// contains filtered or unexported fields
}

AccountAddress

func NewAccountAddress

func NewAccountAddress(accountAddress string) *AccountAddress

NewAccountAddress creates a new AccountAddress

@param accountAddress

func (*AccountAddress) MessageType

func (accountAddress *AccountAddress) MessageType() string

MessageType return the string telegram-type of AccountAddress

type AccountList added in v2.3.0

type AccountList struct {
	Accounts []FullAccountState `json:"accounts"` //
	// contains filtered or unexported fields
}

AccountList

func NewAccountList added in v2.3.0

func NewAccountList(accounts []FullAccountState) *AccountList

NewAccountList creates a new AccountList

@param accounts

func (*AccountList) MessageType added in v2.3.0

func (accountList *AccountList) MessageType() string

MessageType return the string telegram-type of AccountList

type AccountRevisionList

type AccountRevisionList struct {
	Revisions []FullAccountState `json:"revisions"` //
	// contains filtered or unexported fields
}

AccountRevisionList

func NewAccountRevisionList

func NewAccountRevisionList(revisions []FullAccountState) *AccountRevisionList

NewAccountRevisionList creates a new AccountRevisionList

@param revisions

func (*AccountRevisionList) MessageType

func (accountRevisionList *AccountRevisionList) MessageType() string

MessageType return the string telegram-type of AccountRevisionList

type AccountState

type AccountState RawAccountState

type Action

type Action interface{ MessageType() string }

type ActionDns

type ActionDns struct {
	Actions []DnsAction `json:"actions"` //
	// contains filtered or unexported fields
}

ActionDns

func NewActionDns

func NewActionDns(actions []DnsAction) *ActionDns

NewActionDns creates a new ActionDns

@param actions

func (*ActionDns) MessageType

func (actionDns *ActionDns) MessageType() string

MessageType return the string telegram-type of ActionDns

type ActionMsg

type ActionMsg struct {
	AllowSendToUninited bool         `json:"allow_send_to_uninited"` //
	Messages            []MsgMessage `json:"messages"`               //
	// contains filtered or unexported fields
}

ActionMsg

func NewActionMsg

func NewActionMsg(allowSendToUninited bool, messages []MsgMessage) *ActionMsg

NewActionMsg creates a new ActionMsg

@param allowSendToUninited @param messages

func (*ActionMsg) MessageType

func (actionMsg *ActionMsg) MessageType() string

MessageType return the string telegram-type of ActionMsg

type ActionNoop

type ActionNoop struct {
	// contains filtered or unexported fields
}

ActionNoop

func NewActionNoop

func NewActionNoop() *ActionNoop

NewActionNoop creates a new ActionNoop

func (*ActionNoop) MessageType

func (actionNoop *ActionNoop) MessageType() string

MessageType return the string telegram-type of ActionNoop

type ActionPchan added in v2.3.0

type ActionPchan struct {
	Action PchanAction `json:"action"` //
	// contains filtered or unexported fields
}

ActionPchan

func NewActionPchan added in v2.3.0

func NewActionPchan(action PchanAction) *ActionPchan

NewActionPchan creates a new ActionPchan

@param action

func (*ActionPchan) MessageType added in v2.3.0

func (actionPchan *ActionPchan) MessageType() string

MessageType return the string telegram-type of ActionPchan

type ActionRwallet added in v2.3.0

type ActionRwallet struct {
	Action *RwalletActionInit `json:"action"` //
	// contains filtered or unexported fields
}

ActionRwallet

func NewActionRwallet added in v2.3.0

func NewActionRwallet(action *RwalletActionInit) *ActionRwallet

NewActionRwallet creates a new ActionRwallet

@param action

func (*ActionRwallet) MessageType added in v2.3.0

func (actionRwallet *ActionRwallet) MessageType() string

MessageType return the string telegram-type of ActionRwallet

type AdnlAddress

type AdnlAddress struct {
	AdnlAddress string `json:"adnl_address"` //
	// contains filtered or unexported fields
}

AdnlAddress

func NewAdnlAddress

func NewAdnlAddress(adnlAddress string) *AdnlAddress

NewAdnlAddress creates a new AdnlAddress

@param adnlAddress

func (*AdnlAddress) MessageType

func (adnlAddress *AdnlAddress) MessageType() string

MessageType return the string telegram-type of AdnlAddress

type Bip39Hints

type Bip39Hints struct {
	Words []string `json:"words"` //
	// contains filtered or unexported fields
}

Bip39Hints

func NewBip39Hints

func NewBip39Hints(words []string) *Bip39Hints

NewBip39Hints creates a new Bip39Hints

@param words

func (*Bip39Hints) MessageType

func (bip39Hints *Bip39Hints) MessageType() string

MessageType return the string telegram-type of Bip39Hints

type BoolFalse

type BoolFalse struct {
	// contains filtered or unexported fields
}

BoolFalse

func NewBoolFalse

func NewBoolFalse() *BoolFalse

NewBoolFalse creates a new BoolFalse

func (*BoolFalse) MessageType

func (boolFalse *BoolFalse) MessageType() string

MessageType return the string telegram-type of BoolFalse

type BoolTrue

type BoolTrue struct {
	// contains filtered or unexported fields
}

BoolTrue

func NewBoolTrue

func NewBoolTrue() *BoolTrue

NewBoolTrue creates a new BoolTrue

func (*BoolTrue) MessageType

func (boolTrue *BoolTrue) MessageType() string

MessageType return the string telegram-type of BoolTrue

type Bytes

type Bytes []byte

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is the Telegram TdLib client

func NewClient

func NewClient(tonCnf *TonInitRequest, config Config, timeout int64, clientLogging bool, tonLogging int32) (*Client, error)

NewClient Creates a new instance of TONLib.

func (*Client) AddLogMessage

func (client *Client) AddLogMessage(text string, verbosityLevel int32) (*Ok, error)

AddLogMessage Adds a message to tonlib internal log. This is an offline method. Can be called before authorization. Can be called synchronously @param text Text of a message to log @param verbosityLevel Minimum verbosity level needed for the message to be logged, 0-1023

func (*Client) ChangeLocalPassword

func (client *Client) ChangeLocalPassword(inputKey InputKey, newLocalPassword SecureBytes) (*Key, error)

ChangeLocalPassword @param inputKey @param newLocalPassword

func (*Client) CheckParticipatesIn added in v2.1.2

func (client *Client) CheckParticipatesIn(pubKey, address string) (int64, error)

func (*Client) CheckReward added in v2.1.2

func (client *Client) CheckReward(address, electorAddress string) (int64, error)

func (*Client) Close

func (client *Client) Close() (*Ok, error)

Close

func (*Client) CreateNewKey

func (client *Client) CreateNewKey(localPassword SecureBytes, mnemonicPassword SecureBytes, randomExtraSeed SecureBytes) (*Key, error)

CreateNewKey @param localPassword @param mnemonicPassword @param randomExtraSeed

func (*Client) CreateQuery

func (client *Client) CreateQuery(action Action, address AccountAddress, initialAccountState InitialAccountState, privateKey InputKey, timeout int32) (*QueryInfo, error)

CreateQuery @param action @param address @param initialAccountState @param privateKey @param timeout

func (*Client) Decrypt

func (client *Client) Decrypt(encryptedData SecureBytes, secret SecureBytes) (*Data, error)

Decrypt @param encryptedData @param secret

func (*Client) DeleteAllKeys

func (client *Client) DeleteAllKeys() (*Ok, error)

DeleteAllKeys

func (*Client) DeleteKey

func (client *Client) DeleteKey(key Key) (*Ok, error)

DeleteKey @param key

func (*Client) Destroy

func (client *Client) Destroy()

func (*Client) DnsResolve

func (client *Client) DnsResolve(accountAddress AccountAddress, category int32, name string, ttl int32) (*DnsResolved, error)

DnsResolve @param accountAddress @param category @param name @param ttl

func (*Client) Encrypt

func (client *Client) Encrypt(decryptedData SecureBytes, secret SecureBytes) (*Data, error)

Encrypt @param decryptedData @param secret

func (*Client) ExportEncryptedKey

func (client *Client) ExportEncryptedKey(inputKey InputKey, keyPassword SecureBytes) (*ExportedEncryptedKey, error)

ExportEncryptedKey @param inputKey @param keyPassword

func (*Client) ExportKey

func (client *Client) ExportKey(inputKey InputKey) (*ExportedKey, error)

ExportKey @param inputKey

func (*Client) ExportPemKey

func (client *Client) ExportPemKey(inputKey InputKey, keyPassword SecureBytes) (*ExportedPemKey, error)

ExportPemKey @param inputKey @param keyPassword

func (*Client) ExportUnencryptedKey

func (client *Client) ExportUnencryptedKey(inputKey InputKey) (*ExportedUnencryptedKey, error)

ExportUnencryptedKey @param inputKey

func (*Client) GetAccountAddress

func (client *Client) GetAccountAddress(initialAccountState InitialAccountState, revision int32, workchainId int32) (*AccountAddress, error)

GetAccountAddress @param initialAccountState @param revision @param workchainId

func (*Client) GetAccountState

func (client *Client) GetAccountState(accountAddress AccountAddress) (*FullAccountState, error)

GetAccountState @param accountAddress

func (*Client) GetAccountStateSimple added in v2.1.2

func (client *Client) GetAccountStateSimple(address string) (*FullAccountState, error)

func (*Client) GetActiveElectionID added in v2.1.2

func (client *Client) GetActiveElectionID(address string) (int64, error)

func (*Client) GetBip39Hints

func (client *Client) GetBip39Hints(prefix string) (*Bip39Hints, error)

GetBip39Hints @param prefix

func (*Client) GetLastBlock added in v2.1.2

func (client *Client) GetLastBlock() (string, error)

func (*Client) GetLogStream

func (client *Client) GetLogStream() (LogStream, error)

GetLogStream Returns information about currently used log stream for internal logging of tonlib. This is an offline method. Can be called before authorization. Can be called synchronously

func (*Client) GetLogTagVerbosityLevel

func (client *Client) GetLogTagVerbosityLevel(tag string) (*LogVerbosityLevel, error)

GetLogTagVerbosityLevel Returns current verbosity level for a specified tonlib internal log tag. This is an offline method. Can be called before authorization. Can be called synchronously @param tag Logging tag to change verbosity level

func (*Client) GetLogTags

func (client *Client) GetLogTags() (*LogTags, error)

GetLogTags Returns list of available tonlib internal log tags, for example, ["actor", "binlog", "connections", "notifications", "proxy"]. This is an offline method. Can be called before authorization. Can be called synchronously

func (*Client) GetLogVerbosityLevel

func (client *Client) GetLogVerbosityLevel() (*LogVerbosityLevel, error)

GetLogVerbosityLevel Returns current verbosity level of the internal logging of tonlib. This is an offline method. Can be called before authorization. Can be called synchronously

func (*Client) GetParticipantList added in v2.1.2

func (client *Client) GetParticipantList(address string) (*[]TvmStackEntry, error)

func (*Client) GetParticipantListExtended added in v2.1.2

func (client *Client) GetParticipantListExtended(electorAddress string) (*[]ElectionParticipant, error)

func (*Client) GetWalletSeqno added in v2.1.2

func (client *Client) GetWalletSeqno(address string) (int64, error)

func (*Client) GuessAccount added in v2.3.0

func (client *Client) GuessAccount(publicKey string, rwalletInitPublicKey string) (*AccountRevisionList, error)

GuessAccount @param publicKey @param rwalletInitPublicKey

func (*Client) GuessAccountRevision added in v2.2.0

func (client *Client) GuessAccountRevision(initialAccountState InitialAccountState, workchainId int32) (*AccountRevisionList, error)

GuessAccountRevision @param initialAccountState @param workchainId

func (*Client) ImportEncryptedKey

func (client *Client) ImportEncryptedKey(exportedEncryptedKey ExportedEncryptedKey, keyPassword SecureBytes, localPassword SecureBytes) (*Key, error)

ImportEncryptedKey @param exportedEncryptedKey @param keyPassword @param localPassword

func (*Client) ImportKey

func (client *Client) ImportKey(exportedKey ExportedKey, localPassword SecureBytes, mnemonicPassword SecureBytes) (*Key, error)

ImportKey @param exportedKey @param localPassword @param mnemonicPassword

func (*Client) ImportPemKey

func (client *Client) ImportPemKey(exportedKey ExportedPemKey, keyPassword SecureBytes, localPassword SecureBytes) (*Key, error)

ImportPemKey @param exportedKey @param keyPassword @param localPassword

func (*Client) ImportUnencryptedKey

func (client *Client) ImportUnencryptedKey(exportedUnencryptedKey ExportedUnencryptedKey, localPassword SecureBytes) (*Key, error)

ImportUnencryptedKey @param exportedUnencryptedKey @param localPassword

func (*Client) Init

func (client *Client) Init(options Options) (*OptionsInfo, error)

Init @param options

func (*Client) Kdf

func (client *Client) Kdf(iterations int32, password SecureBytes, salt SecureBytes) (*Data, error)

Kdf @param iterations @param password @param salt

func (*Client) LiteServerGetInfo

func (client *Client) LiteServerGetInfo() (*LiteServerInfo, error)

LiteServerGetInfo

func (*Client) LoadContract added in v2.1.2

func (client *Client) LoadContract(address string) (*SmcInfo, error)

func (*Client) MsgDecrypt added in v2.2.0

func (client *Client) MsgDecrypt(data MsgDataEncryptedArray, inputKey InputKey) (*MsgDataDecryptedArray, error)

MsgDecrypt @param data @param inputKey

func (*Client) MsgDecryptWithProof added in v2.2.0

func (client *Client) MsgDecryptWithProof(data MsgDataEncrypted, proof []byte) (*MsgData, error)

MsgDecryptWithProof @param data @param proof

func (*Client) OnLiteServerQueryError

func (client *Client) OnLiteServerQueryError(error Error, id JSONInt64) (*Ok, error)

OnLiteServerQueryError @param error @param id

func (*Client) OnLiteServerQueryResult

func (client *Client) OnLiteServerQueryResult(bytes []byte, id JSONInt64) (*Ok, error)

OnLiteServerQueryResult @param bytes @param id

func (*Client) OptionsSetConfig

func (client *Client) OptionsSetConfig(config Config) (*OptionsConfigInfo, error)

OptionsSetConfig @param config

func (*Client) OptionsValidateConfig

func (client *Client) OptionsValidateConfig(config Config) (*OptionsConfigInfo, error)

OptionsValidateConfig @param config

func (*Client) PackAccountAddress

func (client *Client) PackAccountAddress(accountAddress UnpackedAccountAddress) (*AccountAddress, error)

PackAccountAddress @param accountAddress

func (*Client) PchanPackPromise added in v2.3.0

func (client *Client) PchanPackPromise(promise PchanPromise) (*Data, error)

PchanPackPromise @param promise

func (*Client) PchanSignPromise added in v2.3.0

func (client *Client) PchanSignPromise(inputKey InputKey, promise PchanPromise) (*PchanPromise, error)

PchanSignPromise @param inputKey @param promise

func (*Client) PchanUnpackPromise added in v2.3.0

func (client *Client) PchanUnpackPromise(data SecureBytes) (*PchanPromise, error)

PchanUnpackPromise @param data

func (*Client) PchanValidatePromise added in v2.3.0

func (client *Client) PchanValidatePromise(promise PchanPromise, publicKey []byte) (*Ok, error)

PchanValidatePromise @param promise @param publicKey

func (*Client) QueryEstimateFees

func (client *Client) QueryEstimateFees(id int64, ignoreChksig bool) (*QueryFees, error)

QueryEstimateFees sometimes it`s respond with "@type: ok" instead of "query.fees" @param id @param ignoreChksig

func (*Client) QueryForget

func (client *Client) QueryForget(id int64) (*Ok, error)

QueryForget @param id

func (*Client) QueryGetInfo

func (client *Client) QueryGetInfo(id int64) (*QueryInfo, error)

QueryGetInfo @param id

func (*Client) QuerySend

func (client *Client) QuerySend(id int64) (*Ok, error)

QuerySend @param id

func (*Client) RawCreateAndSendMessage

func (client *Client) RawCreateAndSendMessage(data []byte, destination AccountAddress, initialAccountState []byte) (*Ok, error)

RawCreateAndSendMessage @param data @param destination @param initialAccountState

func (*Client) RawCreateQuery

func (client *Client) RawCreateQuery(body []byte, destination AccountAddress, initCode []byte, initData []byte) (*QueryInfo, error)

RawCreateQuery @param body @param destination @param initCode @param initData

func (*Client) RawGetAccountState

func (client *Client) RawGetAccountState(accountAddress AccountAddress) (*RawFullAccountState, error)

RawGetAccountState @param accountAddress

func (*Client) RawGetTransactions

func (client *Client) RawGetTransactions(accountAddress AccountAddress, fromTransactionId InternalTransactionId, privateKey InputKey) (*RawTransactions, error)

RawGetTransactions @param accountAddress @param fromTransactionId @param privateKey

func (*Client) RawSendMessage

func (client *Client) RawSendMessage(body []byte) (*Ok, error)

RawSendMessage @param body

func (*Client) RunTests

func (client *Client) RunTests(dir string) (*Ok, error)

RunTests @param dir

func (*Client) SetLogStream

func (client *Client) SetLogStream(logStream LogStream) (*Ok, error)

SetLogStream Sets new log stream for internal logging of tonlib. This is an offline method. Can be called before authorization. Can be called synchronously @param logStream New log stream

func (*Client) SetLogTagVerbosityLevel

func (client *Client) SetLogTagVerbosityLevel(newVerbosityLevel int32, tag string) (*Ok, error)

SetLogTagVerbosityLevel Sets the verbosity level for a specified tonlib internal log tag. This is an offline method. Can be called before authorization. Can be called synchronously @param newVerbosityLevel New verbosity level; 1-1024 @param tag Logging tag to change verbosity level

func (*Client) SetLogVerbosityLevel

func (client *Client) SetLogVerbosityLevel(newVerbosityLevel int32) (*Ok, error)

SetLogVerbosityLevel Sets the verbosity level of the internal logging of tonlib. This is an offline method. Can be called before authorization. Can be called synchronously @param newVerbosityLevel New value of the verbosity level for logging. Value 0 corresponds to fatal errors, value 1 corresponds to errors, value 2 corresponds to warnings and debug warnings, value 3 corresponds to informational, value 4 corresponds to debug, value 5 corresponds to verbose debug, value greater than 5 and up to 1023 can be used to enable even more logging

func (*Client) SmcGetCode

func (client *Client) SmcGetCode(id int64) (*TvmCell, error)

SmcGetCode @param id

func (*Client) SmcGetData

func (client *Client) SmcGetData(id int64) (*TvmCell, error)

SmcGetData @param id

func (*Client) SmcGetState

func (client *Client) SmcGetState(id int64) (*TvmCell, error)

SmcGetState @param id

func (*Client) SmcLoad

func (client *Client) SmcLoad(accountAddress AccountAddress) (*SmcInfo, error)

SmcLoad @param accountAddress

func (*Client) SmcRunGetMethod

func (client *Client) SmcRunGetMethod(id int64, method SmcMethodId, stack []TvmStackEntry) (*SmcRunResult, error)

SmcRunGetMethod @param id @param method @param stack

func (*Client) Sync

func (client *Client) Sync(syncState SyncState) (string, error)

sync node`s blocks to current

func (*Client) TonlibSendFile added in v2.1.2

func (client *Client) TonlibSendFile(bocFilePath string) error

func (*Client) UnpackAccountAddress

func (client *Client) UnpackAccountAddress(accountAddress string) (*UnpackedAccountAddress, error)

UnpackAccountAddress @param accountAddress

func (*Client) UpdateTonConnection added in v2.1.2

func (client *Client) UpdateTonConnection() error

for now - a few requests may works wrong, cause it some times get respose form previos reqest for a few times

func (*Client) WithBlock

func (client *Client) WithBlock(function Function, id TonBlockIdExt) (*Object, error)

WithBlock @param function @param id

type Config

type Config struct {
	BlockchainName         string `json:"blockchain_name"`           //
	Config                 string `json:"config"`                    //
	IgnoreCache            bool   `json:"ignore_cache"`              //
	UseCallbacksForNetwork bool   `json:"use_callbacks_for_network"` //
	// contains filtered or unexported fields
}

Config

func NewConfig

func NewConfig(blockchainName string, config string, ignoreCache bool, useCallbacksForNetwork bool) *Config

NewConfig creates a new Config

@param blockchainName @param config @param ignoreCache @param useCallbacksForNetwork

func (*Config) MessageType

func (config *Config) MessageType() string

MessageType return the string telegram-type of Config

type Data

type Data struct {
	Bytes *SecureBytes `json:"bytes"` //
	// contains filtered or unexported fields
}

Data

func NewData

func NewData(bytes *SecureBytes) *Data

NewData creates a new Data

@param bytes

func (*Data) MessageType

func (data *Data) MessageType() string

MessageType return the string telegram-type of Data

type DnsAccountState

type DnsAccountState struct {
	WalletId JSONInt64 `json:"wallet_id"` //
	// contains filtered or unexported fields
}

DnsAccountState

func NewDnsAccountState

func NewDnsAccountState(walletId JSONInt64) *DnsAccountState

NewDnsAccountState creates a new DnsAccountState

@param walletId

func (*DnsAccountState) MessageType

func (dnsAccountState *DnsAccountState) MessageType() string

MessageType return the string telegram-type of DnsAccountState

type DnsAction

type DnsAction Action

type DnsActionDelete

type DnsActionDelete struct {
	Category int32  `json:"category"` //
	Name     string `json:"name"`     //
	// contains filtered or unexported fields
}

DnsActionDelete

func NewDnsActionDelete

func NewDnsActionDelete(category int32, name string) *DnsActionDelete

NewDnsActionDelete creates a new DnsActionDelete

@param category @param name

func (*DnsActionDelete) MessageType

func (dnsActionDelete *DnsActionDelete) MessageType() string

MessageType return the string telegram-type of DnsActionDelete

type DnsActionDeleteAll

type DnsActionDeleteAll struct {
	// contains filtered or unexported fields
}

DnsActionDeleteAll

func NewDnsActionDeleteAll

func NewDnsActionDeleteAll() *DnsActionDeleteAll

NewDnsActionDeleteAll creates a new DnsActionDeleteAll

func (*DnsActionDeleteAll) MessageType

func (dnsActionDeleteAll *DnsActionDeleteAll) MessageType() string

MessageType return the string telegram-type of DnsActionDeleteAll

type DnsActionSet

type DnsActionSet struct {
	Entry *DnsEntry `json:"entry"` //
	// contains filtered or unexported fields
}

DnsActionSet

func NewDnsActionSet

func NewDnsActionSet(entry *DnsEntry) *DnsActionSet

NewDnsActionSet creates a new DnsActionSet

@param entry

func (*DnsActionSet) MessageType

func (dnsActionSet *DnsActionSet) MessageType() string

MessageType return the string telegram-type of DnsActionSet

type DnsEntry

type DnsEntry struct {
	Category int32         `json:"category"` //
	Entry    *DnsEntryData `json:"entry"`    //
	Name     string        `json:"name"`     //
	// contains filtered or unexported fields
}

DnsEntry

func NewDnsEntry

func NewDnsEntry(category int32, entry *DnsEntryData, name string) *DnsEntry

NewDnsEntry creates a new DnsEntry

@param category @param entry @param name

func (*DnsEntry) MessageType

func (dnsEntry *DnsEntry) MessageType() string

MessageType return the string telegram-type of DnsEntry

type DnsEntryData

type DnsEntryData string

type DnsEntryDataAdnlAddress

type DnsEntryDataAdnlAddress struct {
	AdnlAddress *AdnlAddress `json:"adnl_address"` //
	// contains filtered or unexported fields
}

DnsEntryDataAdnlAddress

func NewDnsEntryDataAdnlAddress

func NewDnsEntryDataAdnlAddress(adnlAddress *AdnlAddress) *DnsEntryDataAdnlAddress

NewDnsEntryDataAdnlAddress creates a new DnsEntryDataAdnlAddress

@param adnlAddress

func (*DnsEntryDataAdnlAddress) MessageType

func (dnsEntryDataAdnlAddress *DnsEntryDataAdnlAddress) MessageType() string

MessageType return the string telegram-type of DnsEntryDataAdnlAddress

type DnsEntryDataNextResolver

type DnsEntryDataNextResolver struct {
	Resolver *AccountAddress `json:"resolver"` //
	// contains filtered or unexported fields
}

DnsEntryDataNextResolver

func NewDnsEntryDataNextResolver

func NewDnsEntryDataNextResolver(resolver *AccountAddress) *DnsEntryDataNextResolver

NewDnsEntryDataNextResolver creates a new DnsEntryDataNextResolver

@param resolver

func (*DnsEntryDataNextResolver) MessageType

func (dnsEntryDataNextResolver *DnsEntryDataNextResolver) MessageType() string

MessageType return the string telegram-type of DnsEntryDataNextResolver

type DnsEntryDataSmcAddress

type DnsEntryDataSmcAddress struct {
	SmcAddress *AccountAddress `json:"smc_address"` //
	// contains filtered or unexported fields
}

DnsEntryDataSmcAddress

func NewDnsEntryDataSmcAddress

func NewDnsEntryDataSmcAddress(smcAddress *AccountAddress) *DnsEntryDataSmcAddress

NewDnsEntryDataSmcAddress creates a new DnsEntryDataSmcAddress

@param smcAddress

func (*DnsEntryDataSmcAddress) MessageType

func (dnsEntryDataSmcAddress *DnsEntryDataSmcAddress) MessageType() string

MessageType return the string telegram-type of DnsEntryDataSmcAddress

type DnsEntryDataText

type DnsEntryDataText struct {
	Text string `json:"text"` //
	// contains filtered or unexported fields
}

DnsEntryDataText

func NewDnsEntryDataText

func NewDnsEntryDataText(text string) *DnsEntryDataText

NewDnsEntryDataText creates a new DnsEntryDataText

@param text

func (*DnsEntryDataText) MessageType

func (dnsEntryDataText *DnsEntryDataText) MessageType() string

MessageType return the string telegram-type of DnsEntryDataText

type DnsEntryDataUnknown

type DnsEntryDataUnknown struct {
	Bytes string `json:"bytes"` //
	// contains filtered or unexported fields
}

DnsEntryDataUnknown

func NewDnsEntryDataUnknown

func NewDnsEntryDataUnknown(bytes string) *DnsEntryDataUnknown

NewDnsEntryDataUnknown creates a new DnsEntryDataUnknown

@param bytes

func (*DnsEntryDataUnknown) MessageType

func (dnsEntryDataUnknown *DnsEntryDataUnknown) MessageType() string

MessageType return the string telegram-type of DnsEntryDataUnknown

type DnsInitialAccountState

type DnsInitialAccountState struct {
	PublicKey string    `json:"public_key"` //
	WalletId  JSONInt64 `json:"wallet_id"`  //
	// contains filtered or unexported fields
}

DnsInitialAccountState

func NewDnsInitialAccountState

func NewDnsInitialAccountState(publicKey string, walletId JSONInt64) *DnsInitialAccountState

NewDnsInitialAccountState creates a new DnsInitialAccountState

@param publicKey @param walletId

func (*DnsInitialAccountState) MessageType

func (dnsInitialAccountState *DnsInitialAccountState) MessageType() string

MessageType return the string telegram-type of DnsInitialAccountState

type DnsResolved

type DnsResolved struct {
	Entries []DnsEntry `json:"entries"` //
	// contains filtered or unexported fields
}

DnsResolved

func NewDnsResolved

func NewDnsResolved(entries []DnsEntry) *DnsResolved

NewDnsResolved creates a new DnsResolved

@param entries

func (*DnsResolved) MessageType

func (dnsResolved *DnsResolved) MessageType() string

MessageType return the string telegram-type of DnsResolved

type Double

type Double struct {
	// contains filtered or unexported fields
}

Double

func NewDouble

func NewDouble() *Double

NewDouble creates a new Double

func (*Double) MessageType

func (double *Double) MessageType() string

MessageType return the string telegram-type of Double

type ElectionParticipant added in v2.2.0

type ElectionParticipant struct {
	Id                 string      `json:"id"`
	Stake              string      `json:"stake"`
	MaxFactor          string      `json:"max_factor"`
	ParticipantAddress string      `json:"participant_address"`
	AdnlAddress        string      `json:"adnl_address"`
	Raw                interface{} `json:"-"`
}

type Error

type Error struct {
	Code    int32  `json:"code"`    //
	Message string `json:"message"` //
	// contains filtered or unexported fields
}

Error

func NewError

func NewError(code int32, message string) *Error

NewError creates a new Error

@param code @param message

func (*Error) MessageType

func (error *Error) MessageType() string

MessageType return the string telegram-type of Error

type ExportedEncryptedKey

type ExportedEncryptedKey struct {
	Data *SecureBytes `json:"data"` //
	// contains filtered or unexported fields
}

ExportedEncryptedKey

func NewExportedEncryptedKey

func NewExportedEncryptedKey(data *SecureBytes) *ExportedEncryptedKey

NewExportedEncryptedKey creates a new ExportedEncryptedKey

@param data

func (*ExportedEncryptedKey) MessageType

func (exportedEncryptedKey *ExportedEncryptedKey) MessageType() string

MessageType return the string telegram-type of ExportedEncryptedKey

type ExportedKey

type ExportedKey struct {
	WordList []SecureString `json:"word_list"` //
	// contains filtered or unexported fields
}

ExportedKey

func NewExportedKey

func NewExportedKey(wordList []SecureString) *ExportedKey

NewExportedKey creates a new ExportedKey

@param wordList

func (*ExportedKey) MessageType

func (exportedKey *ExportedKey) MessageType() string

MessageType return the string telegram-type of ExportedKey

type ExportedPemKey

type ExportedPemKey struct {
	Pem *SecureString `json:"pem"` //
	// contains filtered or unexported fields
}

ExportedPemKey

func NewExportedPemKey

func NewExportedPemKey(pem *SecureString) *ExportedPemKey

NewExportedPemKey creates a new ExportedPemKey

@param pem

func (*ExportedPemKey) MessageType

func (exportedPemKey *ExportedPemKey) MessageType() string

MessageType return the string telegram-type of ExportedPemKey

type ExportedUnencryptedKey

type ExportedUnencryptedKey struct {
	Data *SecureBytes `json:"data"` //
	// contains filtered or unexported fields
}

ExportedUnencryptedKey

func NewExportedUnencryptedKey

func NewExportedUnencryptedKey(data *SecureBytes) *ExportedUnencryptedKey

NewExportedUnencryptedKey creates a new ExportedUnencryptedKey

@param data

func (*ExportedUnencryptedKey) MessageType

func (exportedUnencryptedKey *ExportedUnencryptedKey) MessageType() string

MessageType return the string telegram-type of ExportedUnencryptedKey

type Fees

type Fees struct {
	FwdFee     int64 `json:"fwd_fee"`     //
	GasFee     int64 `json:"gas_fee"`     //
	InFwdFee   int64 `json:"in_fwd_fee"`  //
	StorageFee int64 `json:"storage_fee"` //
	// contains filtered or unexported fields
}

Fees

func NewFees

func NewFees(fwdFee int64, gasFee int64, inFwdFee int64, storageFee int64) *Fees

NewFees creates a new Fees

@param fwdFee @param gasFee @param inFwdFee @param storageFee

func (*Fees) MessageType

func (fees *Fees) MessageType() string

MessageType return the string telegram-type of Fees

type FullAccountState

type FullAccountState struct {
	AccountState      *AccountState          `json:"account_state"`       //
	Address           *AccountAddress        `json:"address"`             //
	Balance           JSONInt64              `json:"balance"`             //
	BlockId           *TonBlockIdExt         `json:"block_id"`            //
	LastTransactionId *InternalTransactionId `json:"last_transaction_id"` //
	Revision          int32                  `json:"revision"`            //
	SyncUtime         int64                  `json:"sync_utime"`          //
	// contains filtered or unexported fields
}

FullAccountState

func NewFullAccountState

func NewFullAccountState(accountState *AccountState, address *AccountAddress, balance JSONInt64, blockId *TonBlockIdExt, lastTransactionId *InternalTransactionId, revision int32, syncUtime int64) *FullAccountState

NewFullAccountState creates a new FullAccountState

@param accountState @param address @param balance @param blockId @param lastTransactionId @param revision @param syncUtime

func (*FullAccountState) MessageType

func (fullAccountState *FullAccountState) MessageType() string

MessageType return the string telegram-type of FullAccountState

type Function

type Function struct {
	// contains filtered or unexported fields
}

Function

func NewFunction

func NewFunction() *Function

NewFunction creates a new Function

func (*Function) MessageType

func (function *Function) MessageType() string

MessageType return the string telegram-type of Function

type GenericAccountState

type GenericAccountState string

type InitialAccountState

type InitialAccountState interface{ MessageType() string }

because of different subclasses in common class InitialAccountState and AccountState InitialAccountState

type InputKey

type InputKey struct {
	Type          string        `json:"@type"`
	LocalPassword string        `json:"local_password"`
	Key           TONPrivateKey `json:"key"`
}

type InputKeyFake

type InputKeyFake struct {
	// contains filtered or unexported fields
}

InputKeyFake

func NewInputKeyFake

func NewInputKeyFake() *InputKeyFake

NewInputKeyFake creates a new InputKeyFake

func (*InputKeyFake) MessageType

func (inputKeyFake *InputKeyFake) MessageType() string

MessageType return the string telegram-type of InputKeyFake

type InputKeyRegular

type InputKeyRegular struct {
	Key           *Key         `json:"key"`            //
	LocalPassword *SecureBytes `json:"local_password"` //
	// contains filtered or unexported fields
}

InputKeyRegular

func NewInputKeyRegular

func NewInputKeyRegular(key *Key, localPassword *SecureBytes) *InputKeyRegular

NewInputKeyRegular creates a new InputKeyRegular

@param key @param localPassword

func (*InputKeyRegular) MessageType

func (inputKeyRegular *InputKeyRegular) MessageType() string

MessageType return the string telegram-type of InputKeyRegular

type Int32

type Int32 struct {
	// contains filtered or unexported fields
}

Int32

func NewInt32

func NewInt32() *Int32

NewInt32 creates a new Int32

func (*Int32) MessageType

func (int32 *Int32) MessageType() string

MessageType return the string telegram-type of Int32

type Int53

type Int53 struct {
	// contains filtered or unexported fields
}

Int53

func NewInt53

func NewInt53() *Int53

NewInt53 creates a new Int53

func (*Int53) MessageType

func (int53 *Int53) MessageType() string

MessageType return the string telegram-type of Int53

type Int64

type Int64 struct {
	// contains filtered or unexported fields
}

Int64

func NewInt64

func NewInt64() *Int64

NewInt64 creates a new Int64

func (*Int64) MessageType

func (int64 *Int64) MessageType() string

MessageType return the string telegram-type of Int64

type InternalTransactionId

type InternalTransactionId struct {
	Hash string    `json:"hash"` //
	Lt   JSONInt64 `json:"lt"`   //
	// contains filtered or unexported fields
}

InternalTransactionId

func NewInternalTransactionId

func NewInternalTransactionId(hash string, lt JSONInt64) *InternalTransactionId

NewInternalTransactionId creates a new InternalTransactionId

@param hash @param lt

func (*InternalTransactionId) MessageType

func (internalTransactionId *InternalTransactionId) MessageType() string

MessageType return the string telegram-type of InternalTransactionId

type JSONInt64

type JSONInt64 int64

JSONInt64 alias for int64, in order to deal with json big number problem

func (*JSONInt64) MarshalJSON

func (jsonInt *JSONInt64) MarshalJSON() ([]byte, error)

MarshalJSON marshals to json

func (*JSONInt64) UnmarshalJSON

func (jsonInt *JSONInt64) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals from json

type Key

type Key struct {
	PublicKey string `json:"public_key"` //
	Secret    string `json:"secret"`     //
	// contains filtered or unexported fields
}

key struct cause it strings values no bytes Key

func NewKey

func NewKey(publicKey string, secret string) *Key

NewKey creates a new Key

@param publicKey @param secret

func (*Key) MessageType

func (key *Key) MessageType() string

MessageType return the string telegram-type of Key

type KeyStoreType

type KeyStoreType struct {
	Type      string `json:"@type"`
	Directory string `json:"directory"`
}

KeyStoreType directory

type KeyStoreTypeDirectory

type KeyStoreTypeDirectory struct {
	Directory string `json:"directory"` //
	// contains filtered or unexported fields
}

KeyStoreTypeDirectory

func NewKeyStoreTypeDirectory

func NewKeyStoreTypeDirectory(directory string) *KeyStoreTypeDirectory

NewKeyStoreTypeDirectory creates a new KeyStoreTypeDirectory

@param directory

func (*KeyStoreTypeDirectory) MessageType

func (keyStoreTypeDirectory *KeyStoreTypeDirectory) MessageType() string

MessageType return the string telegram-type of KeyStoreTypeDirectory

type KeyStoreTypeInMemory

type KeyStoreTypeInMemory struct {
	// contains filtered or unexported fields
}

KeyStoreTypeInMemory

func NewKeyStoreTypeInMemory

func NewKeyStoreTypeInMemory() *KeyStoreTypeInMemory

NewKeyStoreTypeInMemory creates a new KeyStoreTypeInMemory

func (*KeyStoreTypeInMemory) MessageType

func (keyStoreTypeInMemory *KeyStoreTypeInMemory) MessageType() string

MessageType return the string telegram-type of KeyStoreTypeInMemory

type LiteServerInfo

type LiteServerInfo struct {
	Capabilities JSONInt64 `json:"capabilities"` //
	Now          int64     `json:"now"`          //
	Version      int32     `json:"version"`      //
	// contains filtered or unexported fields
}

LiteServerInfo

func NewLiteServerInfo

func NewLiteServerInfo(capabilities JSONInt64, now int64, version int32) *LiteServerInfo

NewLiteServerInfo creates a new LiteServerInfo

@param capabilities @param now @param version

func (*LiteServerInfo) MessageType

func (liteServerInfo *LiteServerInfo) MessageType() string

MessageType return the string telegram-type of LiteServerInfo

type LogStream

type LogStream interface {
	GetLogStreamEnum() LogStreamEnum
}

type LogStreamDefault

type LogStreamDefault struct {
	// contains filtered or unexported fields
}

LogStreamDefault The log is written to stderr or an OS specific log

func NewLogStreamDefault

func NewLogStreamDefault() *LogStreamDefault

NewLogStreamDefault creates a new LogStreamDefault

func (*LogStreamDefault) GetLogStreamEnum

func (logStreamDefault *LogStreamDefault) GetLogStreamEnum() LogStreamEnum

GetLogStreamEnum return the enum type of this object

func (*LogStreamDefault) MessageType

func (logStreamDefault *LogStreamDefault) MessageType() string

MessageType return the string telegram-type of LogStreamDefault

type LogStreamEmpty

type LogStreamEmpty struct {
	// contains filtered or unexported fields
}

LogStreamEmpty The log is written nowhere

func NewLogStreamEmpty

func NewLogStreamEmpty() *LogStreamEmpty

NewLogStreamEmpty creates a new LogStreamEmpty

func (*LogStreamEmpty) GetLogStreamEnum

func (logStreamEmpty *LogStreamEmpty) GetLogStreamEnum() LogStreamEnum

GetLogStreamEnum return the enum type of this object

func (*LogStreamEmpty) MessageType

func (logStreamEmpty *LogStreamEmpty) MessageType() string

MessageType return the string telegram-type of LogStreamEmpty

type LogStreamEnum

type LogStreamEnum string

LogStreamEnum Alias for abstract LogStream 'Sub-Classes', used as constant-enum here

const (
	LogStreamDefaultType LogStreamEnum = "logStreamDefault"
	LogStreamFileType    LogStreamEnum = "logStreamFile"
	LogStreamEmptyType   LogStreamEnum = "logStreamEmpty"
)

LogStream enums

type LogStreamFile

type LogStreamFile struct {
	MaxFileSize int64  `json:"max_file_size"` // Maximum size of the file to where the internal tonlib log is written before the file will be auto-rotated
	Path        string `json:"path"`          // Path to the file to where the internal tonlib log will be written
	// contains filtered or unexported fields
}

LogStreamFile The log is written to a file

func NewLogStreamFile

func NewLogStreamFile(maxFileSize int64, path string) *LogStreamFile

NewLogStreamFile creates a new LogStreamFile

@param maxFileSize Maximum size of the file to where the internal tonlib log is written before the file will be auto-rotated @param path Path to the file to where the internal tonlib log will be written

func (*LogStreamFile) GetLogStreamEnum

func (logStreamFile *LogStreamFile) GetLogStreamEnum() LogStreamEnum

GetLogStreamEnum return the enum type of this object

func (*LogStreamFile) MessageType

func (logStreamFile *LogStreamFile) MessageType() string

MessageType return the string telegram-type of LogStreamFile

type LogTags

type LogTags struct {
	Tags []string `json:"tags"` // List of log tags
	// contains filtered or unexported fields
}

LogTags Contains a list of available tonlib internal log tags

func NewLogTags

func NewLogTags(tags []string) *LogTags

NewLogTags creates a new LogTags

@param tags List of log tags

func (*LogTags) MessageType

func (logTags *LogTags) MessageType() string

MessageType return the string telegram-type of LogTags

type LogVerbosityLevel

type LogVerbosityLevel struct {
	VerbosityLevel int32 `json:"verbosity_level"` // Log verbosity level
	// contains filtered or unexported fields
}

LogVerbosityLevel Contains a tonlib internal log verbosity level

func NewLogVerbosityLevel

func NewLogVerbosityLevel(verbosityLevel int32) *LogVerbosityLevel

NewLogVerbosityLevel creates a new LogVerbosityLevel

@param verbosityLevel Log verbosity level

func (*LogVerbosityLevel) MessageType

func (logVerbosityLevel *LogVerbosityLevel) MessageType() string

MessageType return the string telegram-type of LogVerbosityLevel

type MsgData

type MsgData interface{}

type MsgDataDecrypted added in v2.2.0

type MsgDataDecrypted struct {
	Data  MsgData `json:"data"`  //
	Proof string  `json:"proof"` //
	// contains filtered or unexported fields
}

MsgDataDecrypted

func NewMsgDataDecrypted added in v2.2.0

func NewMsgDataDecrypted(data MsgData, proof string) *MsgDataDecrypted

NewMsgDataDecrypted creates a new MsgDataDecrypted

@param data @param proof

func (*MsgDataDecrypted) MessageType added in v2.2.0

func (msgDataDecrypted *MsgDataDecrypted) MessageType() string

MessageType return the string telegram-type of MsgDataDecrypted

type MsgDataDecryptedArray added in v2.2.0

type MsgDataDecryptedArray struct {
	Elements []MsgDataDecrypted `json:"elements"` //
	// contains filtered or unexported fields
}

MsgDataDecryptedArray

func NewMsgDataDecryptedArray added in v2.2.0

func NewMsgDataDecryptedArray(elements []MsgDataDecrypted) *MsgDataDecryptedArray

NewMsgDataDecryptedArray creates a new MsgDataDecryptedArray

@param elements

func (*MsgDataDecryptedArray) MessageType added in v2.2.0

func (msgDataDecryptedArray *MsgDataDecryptedArray) MessageType() string

MessageType return the string telegram-type of MsgDataDecryptedArray

type MsgDataDecryptedText added in v2.2.0

type MsgDataDecryptedText struct {
	Text string `json:"text"` //
	// contains filtered or unexported fields
}

MsgDataDecryptedText

func NewMsgDataDecryptedText added in v2.2.0

func NewMsgDataDecryptedText(text string) *MsgDataDecryptedText

NewMsgDataDecryptedText creates a new MsgDataDecryptedText

@param text

func (*MsgDataDecryptedText) MessageType added in v2.2.0

func (msgDataDecryptedText *MsgDataDecryptedText) MessageType() string

MessageType return the string telegram-type of MsgDataDecryptedText

type MsgDataEncrypted added in v2.2.0

type MsgDataEncrypted struct {
	Data   MsgData         `json:"data"`   //
	Source *AccountAddress `json:"source"` //
	// contains filtered or unexported fields
}

MsgDataEncrypted

func NewMsgDataEncrypted added in v2.2.0

func NewMsgDataEncrypted(data MsgData, source *AccountAddress) *MsgDataEncrypted

NewMsgDataEncrypted creates a new MsgDataEncrypted

@param data @param source

func (*MsgDataEncrypted) MessageType added in v2.2.0

func (msgDataEncrypted *MsgDataEncrypted) MessageType() string

MessageType return the string telegram-type of MsgDataEncrypted

type MsgDataEncryptedArray added in v2.2.0

type MsgDataEncryptedArray struct {
	Elements []MsgDataEncrypted `json:"elements"` //
	// contains filtered or unexported fields
}

MsgDataEncryptedArray

func NewMsgDataEncryptedArray added in v2.2.0

func NewMsgDataEncryptedArray(elements []MsgDataEncrypted) *MsgDataEncryptedArray

NewMsgDataEncryptedArray creates a new MsgDataEncryptedArray

@param elements

func (*MsgDataEncryptedArray) MessageType added in v2.2.0

func (msgDataEncryptedArray *MsgDataEncryptedArray) MessageType() string

MessageType return the string telegram-type of MsgDataEncryptedArray

type MsgDataEncryptedText

type MsgDataEncryptedText struct {
	Text string `json:"text"` //
	// contains filtered or unexported fields
}

MsgDataEncryptedText

func NewMsgDataEncryptedText

func NewMsgDataEncryptedText(text string) *MsgDataEncryptedText

NewMsgDataEncryptedText creates a new MsgDataEncryptedText

@param text

func (*MsgDataEncryptedText) MessageType

func (msgDataEncryptedText *MsgDataEncryptedText) MessageType() string

MessageType return the string telegram-type of MsgDataEncryptedText

type MsgDataRaw added in v2.2.0

type MsgDataRaw struct {
	Body      string `json:"body"`       //
	InitState string `json:"init_state"` //
	// contains filtered or unexported fields
}

MsgDataRaw

func NewMsgDataRaw added in v2.2.0

func NewMsgDataRaw(body string, initState string) *MsgDataRaw

NewMsgDataRaw creates a new MsgDataRaw

@param body @param initState

func (*MsgDataRaw) MessageType added in v2.2.0

func (msgDataRaw *MsgDataRaw) MessageType() string

MessageType return the string telegram-type of MsgDataRaw

type MsgDataText

type MsgDataText struct {
	Text string `json:"text"` //
	// contains filtered or unexported fields
}

MsgDataText

func NewMsgDataText

func NewMsgDataText(text string) *MsgDataText

NewMsgDataText creates a new MsgDataText

@param text

func (*MsgDataText) MessageType

func (msgDataText *MsgDataText) MessageType() string

MessageType return the string telegram-type of MsgDataText

type MsgMessage

type MsgMessage struct {
	Amount      JSONInt64       `json:"amount"`      //
	Data        MsgData         `json:"data"`        //
	Destination *AccountAddress `json:"destination"` //
	PublicKey   string          `json:"public_key"`  //
	// contains filtered or unexported fields
}

MsgMessage

func NewMsgMessage

func NewMsgMessage(amount JSONInt64, data MsgData, destination *AccountAddress, publicKey string) *MsgMessage

NewMsgMessage creates a new MsgMessage

@param amount @param data @param destination @param publicKey

func (*MsgMessage) MessageType

func (msgMessage *MsgMessage) MessageType() string

MessageType return the string telegram-type of MsgMessage

type Object

type Object struct {
	// contains filtered or unexported fields
}

Object

func NewObject

func NewObject() *Object

NewObject creates a new Object

func (*Object) MessageType

func (object *Object) MessageType() string

MessageType return the string telegram-type of Object

type Ok

type Ok struct {
	// contains filtered or unexported fields
}

Ok

func NewOk

func NewOk() *Ok

NewOk creates a new Ok

func (*Ok) MessageType

func (ok *Ok) MessageType() string

MessageType return the string telegram-type of Ok

type Options

type Options struct {
	Config       *Config       `json:"config"`        //
	KeystoreType *KeyStoreType `json:"keystore_type"` //
	// contains filtered or unexported fields
}

Options

func NewOptions

func NewOptions(config *Config, keystoreType *KeyStoreType) *Options

NewOptions creates a new Options

@param config @param keystoreType

func ParseConfigFile

func ParseConfigFile(path string) (*Options, error)

ParseConfigFile parse JSON config file to

func (*Options) MessageType

func (options *Options) MessageType() string

MessageType return the string telegram-type of Options

type OptionsConfigInfo

type OptionsConfigInfo struct {
	DefaultRwalletInitPublicKey string    `json:"default_rwallet_init_public_key"` //
	DefaultWalletId             JSONInt64 `json:"default_wallet_id"`               //
	// contains filtered or unexported fields
}

OptionsConfigInfo

func NewOptionsConfigInfo

func NewOptionsConfigInfo(defaultRwalletInitPublicKey string, defaultWalletId JSONInt64) *OptionsConfigInfo

NewOptionsConfigInfo creates a new OptionsConfigInfo

@param defaultRwalletInitPublicKey @param defaultWalletId

func (*OptionsConfigInfo) MessageType

func (optionsConfigInfo *OptionsConfigInfo) MessageType() string

MessageType return the string telegram-type of OptionsConfigInfo

type OptionsInfo

type OptionsInfo struct {
	ConfigInfo *OptionsConfigInfo `json:"config_info"` //
	// contains filtered or unexported fields
}

OptionsInfo

func NewOptionsInfo

func NewOptionsInfo(configInfo *OptionsConfigInfo) *OptionsInfo

NewOptionsInfo creates a new OptionsInfo

@param configInfo

func (*OptionsInfo) MessageType

func (optionsInfo *OptionsInfo) MessageType() string

MessageType return the string telegram-type of OptionsInfo

type PchanAccountState added in v2.3.0

type PchanAccountState struct {
	Config      *PchanConfig `json:"config"`      //
	Description string       `json:"description"` //
	State       PchanState   `json:"state"`       //
	// contains filtered or unexported fields
}

PchanAccountState

func NewPchanAccountState added in v2.3.0

func NewPchanAccountState(config *PchanConfig, description string, state PchanState) *PchanAccountState

NewPchanAccountState creates a new PchanAccountState

@param config @param description @param state

func (*PchanAccountState) MessageType added in v2.3.0

func (pchanAccountState *PchanAccountState) MessageType() string

MessageType return the string telegram-type of PchanAccountState

type PchanAction added in v2.3.0

type PchanAction interface{ MessageType() string }

type PchanActionClose added in v2.3.0

type PchanActionClose struct {
	ExtraA  JSONInt64     `json:"extra_A"` //
	ExtraB  JSONInt64     `json:"extra_B"` //
	Promise *PchanPromise `json:"promise"` //
	// contains filtered or unexported fields
}

PchanActionClose

func NewPchanActionClose added in v2.3.0

func NewPchanActionClose(extraA JSONInt64, extraB JSONInt64, promise *PchanPromise) *PchanActionClose

NewPchanActionClose creates a new PchanActionClose

@param extraA @param extraB @param promise

func (*PchanActionClose) MessageType added in v2.3.0

func (pchanActionClose *PchanActionClose) MessageType() string

MessageType return the string telegram-type of PchanActionClose

type PchanActionInit added in v2.3.0

type PchanActionInit struct {
	IncA JSONInt64 `json:"inc_A"` //
	IncB JSONInt64 `json:"inc_B"` //
	MinA JSONInt64 `json:"min_A"` //
	MinB JSONInt64 `json:"min_B"` //
	// contains filtered or unexported fields
}

PchanActionInit

func NewPchanActionInit added in v2.3.0

func NewPchanActionInit(incA JSONInt64, incB JSONInt64, minA JSONInt64, minB JSONInt64) *PchanActionInit

NewPchanActionInit creates a new PchanActionInit

@param incA @param incB @param minA @param minB

func (*PchanActionInit) MessageType added in v2.3.0

func (pchanActionInit *PchanActionInit) MessageType() string

MessageType return the string telegram-type of PchanActionInit

type PchanActionTimeout added in v2.3.0

type PchanActionTimeout struct {
	// contains filtered or unexported fields
}

PchanActionTimeout

func NewPchanActionTimeout added in v2.3.0

func NewPchanActionTimeout() *PchanActionTimeout

NewPchanActionTimeout creates a new PchanActionTimeout

func (*PchanActionTimeout) MessageType added in v2.3.0

func (pchanActionTimeout *PchanActionTimeout) MessageType() string

MessageType return the string telegram-type of PchanActionTimeout

type PchanConfig added in v2.3.0

type PchanConfig struct {
	AliceAddress   *AccountAddress `json:"alice_address"`    //
	AlicePublicKey string          `json:"alice_public_key"` //
	BobAddress     *AccountAddress `json:"bob_address"`      //
	BobPublicKey   string          `json:"bob_public_key"`   //
	ChannelId      JSONInt64       `json:"channel_id"`       //
	CloseTimeout   int32           `json:"close_timeout"`    //
	InitTimeout    int32           `json:"init_timeout"`     //
	// contains filtered or unexported fields
}

PchanConfig

func NewPchanConfig added in v2.3.0

func NewPchanConfig(aliceAddress *AccountAddress, alicePublicKey string, bobAddress *AccountAddress, bobPublicKey string, channelId JSONInt64, closeTimeout int32, initTimeout int32) *PchanConfig

NewPchanConfig creates a new PchanConfig

@param aliceAddress @param alicePublicKey @param bobAddress @param bobPublicKey @param channelId @param closeTimeout @param initTimeout

func (*PchanConfig) MessageType added in v2.3.0

func (pchanConfig *PchanConfig) MessageType() string

MessageType return the string telegram-type of PchanConfig

type PchanInitialAccountState added in v2.3.0

type PchanInitialAccountState struct {
	Config *PchanConfig `json:"config"` //
	// contains filtered or unexported fields
}

PchanInitialAccountState

func NewPchanInitialAccountState added in v2.3.0

func NewPchanInitialAccountState(config *PchanConfig) *PchanInitialAccountState

NewPchanInitialAccountState creates a new PchanInitialAccountState

@param config

func (*PchanInitialAccountState) MessageType added in v2.3.0

func (pchanInitialAccountState *PchanInitialAccountState) MessageType() string

MessageType return the string telegram-type of PchanInitialAccountState

type PchanPromise added in v2.3.0

type PchanPromise struct {
	ChannelId JSONInt64 `json:"channel_id"` //
	PromiseA  JSONInt64 `json:"promise_A"`  //
	PromiseB  JSONInt64 `json:"promise_B"`  //
	Signature string    `json:"signature"`  //
	// contains filtered or unexported fields
}

PchanPromise

func NewPchanPromise added in v2.3.0

func NewPchanPromise(channelId JSONInt64, promiseA JSONInt64, promiseB JSONInt64, signature string) *PchanPromise

NewPchanPromise creates a new PchanPromise

@param channelId @param promiseA @param promiseB @param signature

func (*PchanPromise) MessageType added in v2.3.0

func (pchanPromise *PchanPromise) MessageType() string

MessageType return the string telegram-type of PchanPromise

type PchanState added in v2.3.0

type PchanState interface{ MessageType() string }

type PchanStateClose added in v2.3.0

type PchanStateClose struct {
	A        JSONInt64 `json:"A"`         //
	B        JSONInt64 `json:"B"`         //
	ExpireAt int64     `json:"expire_at"` //
	MinA     JSONInt64 `json:"min_A"`     //
	MinB     JSONInt64 `json:"min_B"`     //
	SignedA  bool      `json:"signed_A"`  //
	SignedB  bool      `json:"signed_B"`  //
	// contains filtered or unexported fields
}

PchanStateClose

func NewPchanStateClose added in v2.3.0

func NewPchanStateClose(a JSONInt64, b JSONInt64, expireAt int64, minA JSONInt64, minB JSONInt64, signedA bool, signedB bool) *PchanStateClose

NewPchanStateClose creates a new PchanStateClose

@param a @param b @param expireAt @param minA @param minB @param signedA @param signedB

func (*PchanStateClose) MessageType added in v2.3.0

func (pchanStateClose *PchanStateClose) MessageType() string

MessageType return the string telegram-type of PchanStateClose

type PchanStateInit added in v2.3.0

type PchanStateInit struct {
	A        JSONInt64 `json:"A"`         //
	B        JSONInt64 `json:"B"`         //
	ExpireAt int64     `json:"expire_at"` //
	MinA     JSONInt64 `json:"min_A"`     //
	MinB     JSONInt64 `json:"min_B"`     //
	SignedA  bool      `json:"signed_A"`  //
	SignedB  bool      `json:"signed_B"`  //
	// contains filtered or unexported fields
}

PchanStateInit

func NewPchanStateInit added in v2.3.0

func NewPchanStateInit(a JSONInt64, b JSONInt64, expireAt int64, minA JSONInt64, minB JSONInt64, signedA bool, signedB bool) *PchanStateInit

NewPchanStateInit creates a new PchanStateInit

@param a @param b @param expireAt @param minA @param minB @param signedA @param signedB

func (*PchanStateInit) MessageType added in v2.3.0

func (pchanStateInit *PchanStateInit) MessageType() string

MessageType return the string telegram-type of PchanStateInit

type PchanStatePayout added in v2.3.0

type PchanStatePayout struct {
	A JSONInt64 `json:"A"` //
	B JSONInt64 `json:"B"` //
	// contains filtered or unexported fields
}

PchanStatePayout

func NewPchanStatePayout added in v2.3.0

func NewPchanStatePayout(a JSONInt64, b JSONInt64) *PchanStatePayout

NewPchanStatePayout creates a new PchanStatePayout

@param a @param b

func (*PchanStatePayout) MessageType added in v2.3.0

func (pchanStatePayout *PchanStatePayout) MessageType() string

MessageType return the string telegram-type of PchanStatePayout

type QueryFees

type QueryFees struct {
	DestinationFees []Fees `json:"destination_fees"` //
	SourceFees      *Fees  `json:"source_fees"`      //
	// contains filtered or unexported fields
}

QueryFees

func NewQueryFees

func NewQueryFees(destinationFees []Fees, sourceFees *Fees) *QueryFees

NewQueryFees creates a new QueryFees

@param destinationFees @param sourceFees

func (*QueryFees) MessageType

func (queryFees *QueryFees) MessageType() string

MessageType return the string telegram-type of QueryFees

type QueryInfo

type QueryInfo struct {
	Body       string `json:"body"`        //
	BodyHash   string `json:"body_hash"`   //
	Id         int64  `json:"id"`          //
	InitState  string `json:"init_state"`  //
	ValidUntil int64  `json:"valid_until"` //
	// contains filtered or unexported fields
}

QueryInfo

func NewQueryInfo

func NewQueryInfo(body string, bodyHash string, id int64, initState string, validUntil int64) *QueryInfo

NewQueryInfo creates a new QueryInfo

@param body @param bodyHash @param id @param initState @param validUntil

func (*QueryInfo) MessageType

func (queryInfo *QueryInfo) MessageType() string

MessageType return the string telegram-type of QueryInfo

type RawAccountState

type RawAccountState struct {
	Code       string `json:"code"`        //
	Data       string `json:"data"`        //
	FrozenHash string `json:"frozen_hash"` //
	// contains filtered or unexported fields
}

RawAccountState

func NewRawAccountState

func NewRawAccountState(code string, data string, frozenHash string) *RawAccountState

NewRawAccountState creates a new RawAccountState

@param code @param data @param frozenHash

func (*RawAccountState) MessageType

func (rawAccountState *RawAccountState) MessageType() string

MessageType return the string telegram-type of RawAccountState

type RawFullAccountState

type RawFullAccountState struct {
	Balance           JSONInt64              `json:"balance"`             //
	BlockId           *TonBlockIdExt         `json:"block_id"`            //
	Code              string                 `json:"code"`                //
	Data              string                 `json:"data"`                //
	FrozenHash        string                 `json:"frozen_hash"`         //
	LastTransactionId *InternalTransactionId `json:"last_transaction_id"` //
	SyncUtime         int64                  `json:"sync_utime"`          //
	// contains filtered or unexported fields
}

RawFullAccountState

func NewRawFullAccountState

func NewRawFullAccountState(balance JSONInt64, blockId *TonBlockIdExt, code string, data string, frozenHash string, lastTransactionId *InternalTransactionId, syncUtime int64) *RawFullAccountState

NewRawFullAccountState creates a new RawFullAccountState

@param balance @param blockId @param code @param data @param frozenHash @param lastTransactionId @param syncUtime

func (*RawFullAccountState) MessageType

func (rawFullAccountState *RawFullAccountState) MessageType() string

MessageType return the string telegram-type of RawFullAccountState

type RawInitialAccountState

type RawInitialAccountState struct {
	Code string `json:"code"` //
	Data string `json:"data"` //
	// contains filtered or unexported fields
}

RawInitialAccountState

func NewRawInitialAccountState

func NewRawInitialAccountState(code string, data string) *RawInitialAccountState

NewRawInitialAccountState creates a new RawInitialAccountState

@param code @param data

func (*RawInitialAccountState) MessageType

func (rawInitialAccountState *RawInitialAccountState) MessageType() string

MessageType return the string telegram-type of RawInitialAccountState

type RawMessage

type RawMessage struct {
	BodyHash    string          `json:"body_hash"`   //
	CreatedLt   JSONInt64       `json:"created_lt"`  //
	Destination *AccountAddress `json:"destination"` //
	FwdFee      JSONInt64       `json:"fwd_fee"`     //
	IhrFee      JSONInt64       `json:"ihr_fee"`     //
	MsgData     MsgData         `json:"msg_data"`    //
	Source      *AccountAddress `json:"source"`      //
	Value       JSONInt64       `json:"value"`       //
	// contains filtered or unexported fields
}

RawMessage

func NewRawMessage

func NewRawMessage(bodyHash string, createdLt JSONInt64, destination *AccountAddress, fwdFee JSONInt64, ihrFee JSONInt64, msgData MsgData, source *AccountAddress, value JSONInt64) *RawMessage

NewRawMessage creates a new RawMessage

@param bodyHash @param createdLt @param destination @param fwdFee @param ihrFee @param msgData @param source @param value

func (*RawMessage) MessageType

func (rawMessage *RawMessage) MessageType() string

MessageType return the string telegram-type of RawMessage

type RawTransaction

type RawTransaction struct {
	Data          string                 `json:"data"`           //
	Fee           JSONInt64              `json:"fee"`            //
	InMsg         *RawMessage            `json:"in_msg"`         //
	OtherFee      JSONInt64              `json:"other_fee"`      //
	OutMsgs       []RawMessage           `json:"out_msgs"`       //
	StorageFee    JSONInt64              `json:"storage_fee"`    //
	TransactionId *InternalTransactionId `json:"transaction_id"` //
	Utime         int64                  `json:"utime"`          //
	// contains filtered or unexported fields
}

RawTransaction

func NewRawTransaction

func NewRawTransaction(data string, fee JSONInt64, inMsg *RawMessage, otherFee JSONInt64, outMsgs []RawMessage, storageFee JSONInt64, transactionId *InternalTransactionId, utime int64) *RawTransaction

NewRawTransaction creates a new RawTransaction

@param data @param fee @param inMsg @param otherFee @param outMsgs @param storageFee @param transactionId @param utime

func (*RawTransaction) MessageType

func (rawTransaction *RawTransaction) MessageType() string

MessageType return the string telegram-type of RawTransaction

type RawTransactions

type RawTransactions struct {
	PreviousTransactionId *InternalTransactionId `json:"previous_transaction_id"` //
	Transactions          []RawTransaction       `json:"transactions"`            //
	// contains filtered or unexported fields
}

RawTransactions

func NewRawTransactions

func NewRawTransactions(previousTransactionId *InternalTransactionId, transactions []RawTransaction) *RawTransactions

NewRawTransactions creates a new RawTransactions

@param previousTransactionId @param transactions

func (*RawTransactions) MessageType

func (rawTransactions *RawTransactions) MessageType() string

MessageType return the string telegram-type of RawTransactions

type RwalletAccountState added in v2.3.0

type RwalletAccountState struct {
	Config          *RwalletConfig `json:"config"`           //
	Seqno           int32          `json:"seqno"`            //
	UnlockedBalance JSONInt64      `json:"unlocked_balance"` //
	WalletId        JSONInt64      `json:"wallet_id"`        //
	// contains filtered or unexported fields
}

RwalletAccountState

func NewRwalletAccountState added in v2.3.0

func NewRwalletAccountState(config *RwalletConfig, seqno int32, unlockedBalance JSONInt64, walletId JSONInt64) *RwalletAccountState

NewRwalletAccountState creates a new RwalletAccountState

@param config @param seqno @param unlockedBalance @param walletId

func (*RwalletAccountState) MessageType added in v2.3.0

func (rwalletAccountState *RwalletAccountState) MessageType() string

MessageType return the string telegram-type of RwalletAccountState

type RwalletActionInit added in v2.3.0

type RwalletActionInit struct {
	Config *RwalletConfig `json:"config"` //
	// contains filtered or unexported fields
}

RwalletActionInit

func NewRwalletActionInit added in v2.3.0

func NewRwalletActionInit(config *RwalletConfig) *RwalletActionInit

NewRwalletActionInit creates a new RwalletActionInit

@param config

func (*RwalletActionInit) MessageType added in v2.3.0

func (rwalletActionInit *RwalletActionInit) MessageType() string

MessageType return the string telegram-type of RwalletActionInit

type RwalletConfig added in v2.3.0

type RwalletConfig struct {
	Limits  []RwalletLimit `json:"limits"`   //
	StartAt int64          `json:"start_at"` //
	// contains filtered or unexported fields
}

RwalletConfig

func NewRwalletConfig added in v2.3.0

func NewRwalletConfig(limits []RwalletLimit, startAt int64) *RwalletConfig

NewRwalletConfig creates a new RwalletConfig

@param limits @param startAt

func (*RwalletConfig) MessageType added in v2.3.0

func (rwalletConfig *RwalletConfig) MessageType() string

MessageType return the string telegram-type of RwalletConfig

type RwalletInitialAccountState added in v2.3.0

type RwalletInitialAccountState struct {
	InitPublicKey string    `json:"init_public_key"` //
	PublicKey     string    `json:"public_key"`      //
	WalletId      JSONInt64 `json:"wallet_id"`       //
	// contains filtered or unexported fields
}

RwalletInitialAccountState

func NewRwalletInitialAccountState added in v2.3.0

func NewRwalletInitialAccountState(initPublicKey string, publicKey string, walletId JSONInt64) *RwalletInitialAccountState

NewRwalletInitialAccountState creates a new RwalletInitialAccountState

@param initPublicKey @param publicKey @param walletId

func (*RwalletInitialAccountState) MessageType added in v2.3.0

func (rwalletInitialAccountState *RwalletInitialAccountState) MessageType() string

MessageType return the string telegram-type of RwalletInitialAccountState

type RwalletLimit added in v2.3.0

type RwalletLimit struct {
	Seconds int32     `json:"seconds"` //
	Value   JSONInt64 `json:"value"`   //
	// contains filtered or unexported fields
}

RwalletLimit

func NewRwalletLimit added in v2.3.0

func NewRwalletLimit(seconds int32, value JSONInt64) *RwalletLimit

NewRwalletLimit creates a new RwalletLimit

@param seconds @param value

func (*RwalletLimit) MessageType added in v2.3.0

func (rwalletLimit *RwalletLimit) MessageType() string

MessageType return the string telegram-type of RwalletLimit

type SecureBytes

type SecureBytes []byte

type SecureString

type SecureString string

type SmcInfo

type SmcInfo struct {
	Id int64 `json:"id"` //
	// contains filtered or unexported fields
}

SmcInfo

func NewSmcInfo

func NewSmcInfo(id int64) *SmcInfo

NewSmcInfo creates a new SmcInfo

@param id

func (*SmcInfo) MessageType

func (smcInfo *SmcInfo) MessageType() string

MessageType return the string telegram-type of SmcInfo

type SmcMethodId

type SmcMethodId interface{}

type SmcMethodIdName

type SmcMethodIdName struct {
	Name string `json:"name"` //
	// contains filtered or unexported fields
}

SmcMethodIdName

func NewSmcMethodIdName

func NewSmcMethodIdName(name string) *SmcMethodIdName

NewSmcMethodIdName creates a new SmcMethodIdName

@param name

func (*SmcMethodIdName) MessageType

func (smcMethodIdName *SmcMethodIdName) MessageType() string

MessageType return the string telegram-type of SmcMethodIdName

type SmcMethodIdNumber

type SmcMethodIdNumber struct {
	Number int32 `json:"number"` //
	// contains filtered or unexported fields
}

SmcMethodIdNumber

func NewSmcMethodIdNumber

func NewSmcMethodIdNumber(number int32) *SmcMethodIdNumber

NewSmcMethodIdNumber creates a new SmcMethodIdNumber

@param number

func (*SmcMethodIdNumber) MessageType

func (smcMethodIdNumber *SmcMethodIdNumber) MessageType() string

MessageType return the string telegram-type of SmcMethodIdNumber

type SmcRunResult

type SmcRunResult struct {
	ExitCode int32           `json:"exit_code"` //
	GasUsed  int64           `json:"gas_used"`  //
	Stack    []TvmStackEntry `json:"stack"`     //
	// contains filtered or unexported fields
}

SmcRunResult

func NewSmcRunResult

func NewSmcRunResult(exitCode int32, gasUsed int64, stack []TvmStackEntry) *SmcRunResult

NewSmcRunResult creates a new SmcRunResult

@param exitCode @param gasUsed @param stack

func (*SmcRunResult) MessageType

func (smcRunResult *SmcRunResult) MessageType() string

MessageType return the string telegram-type of SmcRunResult

type String

type String struct {
	// contains filtered or unexported fields
}

String

func NewString

func NewString() *String

NewString creates a new String

func (*String) MessageType

func (string *String) MessageType() string

MessageType return the string telegram-type of String

type SyncState

type SyncState struct {
	Type         string `json:"@type"`
	FromSeqno    int    `json:"from_seqno"`
	ToSeqno      int    `json:"to_seqno"`
	CurrentSeqno int    `json:"current_seqno"`
}

type SyncStateDone

type SyncStateDone struct {
	// contains filtered or unexported fields
}

SyncStateDone

func NewSyncStateDone

func NewSyncStateDone() *SyncStateDone

NewSyncStateDone creates a new SyncStateDone

func (*SyncStateDone) MessageType

func (syncStateDone *SyncStateDone) MessageType() string

MessageType return the string telegram-type of SyncStateDone

type SyncStateInProgress

type SyncStateInProgress struct {
	CurrentSeqno int32 `json:"current_seqno"` //
	FromSeqno    int32 `json:"from_seqno"`    //
	ToSeqno      int32 `json:"to_seqno"`      //
	// contains filtered or unexported fields
}

SyncStateInProgress

func NewSyncStateInProgress

func NewSyncStateInProgress(currentSeqno int32, fromSeqno int32, toSeqno int32) *SyncStateInProgress

NewSyncStateInProgress creates a new SyncStateInProgress

@param currentSeqno @param fromSeqno @param toSeqno

func (*SyncStateInProgress) MessageType

func (syncStateInProgress *SyncStateInProgress) MessageType() string

MessageType return the string telegram-type of SyncStateInProgress

type TONPrivateKey

type TONPrivateKey struct {
	PublicKey string `json:"public_key"`
	Secret    string `json:"secret"`
}

type TONResponse

type TONResponse map[string]interface{}

TONResponse alias for use in TONResult

type TONResult

type TONResult struct {
	Data TONResponse
	Raw  []byte
}

TONResult is used to unmarshal received json strings into

type TestGiverAccountState

type TestGiverAccountState struct {
	Seqno int32 `json:"seqno"` //
	// contains filtered or unexported fields
}

TestGiverAccountState

func NewTestGiverAccountState

func NewTestGiverAccountState(seqno int32) *TestGiverAccountState

NewTestGiverAccountState creates a new TestGiverAccountState

@param seqno

func (*TestGiverAccountState) MessageType

func (testGiverAccountState *TestGiverAccountState) MessageType() string

MessageType return the string telegram-type of TestGiverAccountState

type TestGiverInitialAccountState

type TestGiverInitialAccountState struct {
	// contains filtered or unexported fields
}

TestGiverInitialAccountState

func NewTestGiverInitialAccountState

func NewTestGiverInitialAccountState() *TestGiverInitialAccountState

NewTestGiverInitialAccountState creates a new TestGiverInitialAccountState

func (*TestGiverInitialAccountState) MessageType

func (testGiverInitialAccountState *TestGiverInitialAccountState) MessageType() string

MessageType return the string telegram-type of TestGiverInitialAccountState

type TestWalletAccountState

type TestWalletAccountState struct {
	Seqno int32 `json:"seqno"` //
	// contains filtered or unexported fields
}

TestWalletAccountState

func NewTestWalletAccountState

func NewTestWalletAccountState(seqno int32) *TestWalletAccountState

NewTestWalletAccountState creates a new TestWalletAccountState

@param seqno

func (*TestWalletAccountState) MessageType

func (testWalletAccountState *TestWalletAccountState) MessageType() string

MessageType return the string telegram-type of TestWalletAccountState

type TestWalletInitialAccountState

type TestWalletInitialAccountState struct {
	PublicKey string `json:"public_key"` //
	// contains filtered or unexported fields
}

TestWalletInitialAccountState

func NewTestWalletInitialAccountState

func NewTestWalletInitialAccountState(publicKey string) *TestWalletInitialAccountState

NewTestWalletInitialAccountState creates a new TestWalletInitialAccountState

@param publicKey

func (*TestWalletInitialAccountState) MessageType

func (testWalletInitialAccountState *TestWalletInitialAccountState) MessageType() string

MessageType return the string telegram-type of TestWalletInitialAccountState

type TonBlockId

type TonBlockId struct {
	Seqno     int32     `json:"seqno"`     //
	Shard     JSONInt64 `json:"shard"`     //
	Workchain int32     `json:"workchain"` //
	// contains filtered or unexported fields
}

TonBlockId

func NewTonBlockId

func NewTonBlockId(seqno int32, shard JSONInt64, workchain int32) *TonBlockId

NewTonBlockId creates a new TonBlockId

@param seqno @param shard @param workchain

func (*TonBlockId) MessageType

func (tonBlockId *TonBlockId) MessageType() string

MessageType return the string telegram-type of TonBlockId

type TonBlockIdExt

type TonBlockIdExt struct {
	FileHash  string    `json:"file_hash"` //
	RootHash  string    `json:"root_hash"` //
	Seqno     int32     `json:"seqno"`     //
	Shard     JSONInt64 `json:"shard"`     //
	Workchain int32     `json:"workchain"` //
	// contains filtered or unexported fields
}

TonBlockIdExt

func NewTonBlockIdExt

func NewTonBlockIdExt(fileHash string, rootHash string, seqno int32, shard JSONInt64, workchain int32) *TonBlockIdExt

NewTonBlockIdExt creates a new TonBlockIdExt

@param fileHash @param rootHash @param seqno @param shard @param workchain

func (*TonBlockIdExt) MessageType

func (tonBlockIdExt *TonBlockIdExt) MessageType() string

MessageType return the string telegram-type of TonBlockIdExt

type TonInitRequest

type TonInitRequest struct {
	Type    string  `json:"@type"`
	Options Options `json:"options"`
}

type TonMessage

type TonMessage interface {
	MessageType() string
}

TonMessage is the interface for all messages send and received to/from tonlib

type TonlibConfigFile

type TonlibConfigFile struct {
	Config   TonlibConfigFileConfig `json:"config"`
	Keystore KeyStoreType           `json:"keystore_type"`
}

type TonlibConfigFileConfig

type TonlibConfigFileConfig struct {
	Config                 TonlibConfigServer `json:"config"`
	BlockchainName         string             `json:"blockchain_name"`
	UseCallbacksForNetwork bool               `json:"use_callbacks_for_network"`
	IgnoreCache            bool               `json:"ignore_cache"`
}

type TonlibConfigServer

type TonlibConfigServer struct {
	Liteservers []TonlibListenserverConfig `json:"liteservers"`
	Validator   ValidatorConfig            `json:"validator"`
}

type TonlibListenserverConfig

type TonlibListenserverConfig struct {
	Type string            `json:"@type"`
	Ip   int64             `json:"ip"`
	Port string            `json:"port"`
	ID   map[string]string `json:"id"`
}

type TvmCell

type TvmCell struct {
	Bytes string `json:"bytes"` //
	// contains filtered or unexported fields
}

TvmCell

func NewTvmCell

func NewTvmCell(bytes string) *TvmCell

NewTvmCell creates a new TvmCell

@param bytes

func (*TvmCell) MessageType

func (tvmCell *TvmCell) MessageType() string

MessageType return the string telegram-type of TvmCell

type TvmList

type TvmList struct {
	Elements []TvmStackEntry `json:"elements"` //
	// contains filtered or unexported fields
}

TvmList

func NewTvmList

func NewTvmList(elements []TvmStackEntry) *TvmList

NewTvmList creates a new TvmList

@param elements

func (*TvmList) MessageType

func (tvmList *TvmList) MessageType() string

MessageType return the string telegram-type of TvmList

type TvmNumber

type TvmNumber interface{}

type TvmNumberDecimal

type TvmNumberDecimal struct {
	Number string `json:"number"` //
	// contains filtered or unexported fields
}

TvmNumberDecimal

func NewTvmNumberDecimal

func NewTvmNumberDecimal(number string) *TvmNumberDecimal

NewTvmNumberDecimal creates a new TvmNumberDecimal

@param number

func (*TvmNumberDecimal) MessageType

func (tvmNumberDecimal *TvmNumberDecimal) MessageType() string

MessageType return the string telegram-type of TvmNumberDecimal

type TvmSlice

type TvmSlice struct {
	Bytes string `json:"bytes"` //
	// contains filtered or unexported fields
}

TvmSlice

func NewTvmSlice

func NewTvmSlice(bytes string) *TvmSlice

NewTvmSlice creates a new TvmSlice

@param bytes

func (*TvmSlice) MessageType

func (tvmSlice *TvmSlice) MessageType() string

MessageType return the string telegram-type of TvmSlice

type TvmStackEntry

type TvmStackEntry interface{}

type TvmStackEntryCell

type TvmStackEntryCell struct {
	Cell *TvmCell `json:"cell"` //
	// contains filtered or unexported fields
}

TvmStackEntryCell

func NewTvmStackEntryCell

func NewTvmStackEntryCell(cell *TvmCell) *TvmStackEntryCell

NewTvmStackEntryCell creates a new TvmStackEntryCell

@param cell

func (*TvmStackEntryCell) MessageType

func (tvmStackEntryCell *TvmStackEntryCell) MessageType() string

MessageType return the string telegram-type of TvmStackEntryCell

type TvmStackEntryList

type TvmStackEntryList struct {
	List *TvmList `json:"list"` //
	// contains filtered or unexported fields
}

TvmStackEntryList

func NewTvmStackEntryList

func NewTvmStackEntryList(list *TvmList) *TvmStackEntryList

NewTvmStackEntryList creates a new TvmStackEntryList

@param list

func (*TvmStackEntryList) MessageType

func (tvmStackEntryList *TvmStackEntryList) MessageType() string

MessageType return the string telegram-type of TvmStackEntryList

type TvmStackEntryNumber

type TvmStackEntryNumber struct {
	Number TvmNumber `json:"number"` //
	// contains filtered or unexported fields
}

TvmStackEntryNumber

func NewTvmStackEntryNumber

func NewTvmStackEntryNumber(number TvmNumber) *TvmStackEntryNumber

NewTvmStackEntryNumber creates a new TvmStackEntryNumber

@param number

func (*TvmStackEntryNumber) MessageType

func (tvmStackEntryNumber *TvmStackEntryNumber) MessageType() string

MessageType return the string telegram-type of TvmStackEntryNumber

type TvmStackEntrySlice

type TvmStackEntrySlice struct {
	Slice *TvmSlice `json:"slice"` //
	// contains filtered or unexported fields
}

TvmStackEntrySlice

func NewTvmStackEntrySlice

func NewTvmStackEntrySlice(slice *TvmSlice) *TvmStackEntrySlice

NewTvmStackEntrySlice creates a new TvmStackEntrySlice

@param slice

func (*TvmStackEntrySlice) MessageType

func (tvmStackEntrySlice *TvmStackEntrySlice) MessageType() string

MessageType return the string telegram-type of TvmStackEntrySlice

type TvmStackEntryTuple

type TvmStackEntryTuple struct {
	Tuple *TvmTuple `json:"tuple"` //
	// contains filtered or unexported fields
}

TvmStackEntryTuple

func NewTvmStackEntryTuple

func NewTvmStackEntryTuple(tuple *TvmTuple) *TvmStackEntryTuple

NewTvmStackEntryTuple creates a new TvmStackEntryTuple

@param tuple

func (*TvmStackEntryTuple) MessageType

func (tvmStackEntryTuple *TvmStackEntryTuple) MessageType() string

MessageType return the string telegram-type of TvmStackEntryTuple

type TvmStackEntryUnsupported

type TvmStackEntryUnsupported struct {
	// contains filtered or unexported fields
}

TvmStackEntryUnsupported

func NewTvmStackEntryUnsupported

func NewTvmStackEntryUnsupported() *TvmStackEntryUnsupported

NewTvmStackEntryUnsupported creates a new TvmStackEntryUnsupported

func (*TvmStackEntryUnsupported) MessageType

func (tvmStackEntryUnsupported *TvmStackEntryUnsupported) MessageType() string

MessageType return the string telegram-type of TvmStackEntryUnsupported

type TvmTuple

type TvmTuple struct {
	Elements []TvmStackEntry `json:"elements"` //
	// contains filtered or unexported fields
}

TvmTuple

func NewTvmTuple

func NewTvmTuple(elements []TvmStackEntry) *TvmTuple

NewTvmTuple creates a new TvmTuple

@param elements

func (*TvmTuple) MessageType

func (tvmTuple *TvmTuple) MessageType() string

MessageType return the string telegram-type of TvmTuple

type UninitedAccountState

type UninitedAccountState struct {
	FrozenHash string `json:"frozen_hash"` //
	// contains filtered or unexported fields
}

UninitedAccountState

func NewUninitedAccountState

func NewUninitedAccountState(frozenHash string) *UninitedAccountState

NewUninitedAccountState creates a new UninitedAccountState

@param frozenHash

func (*UninitedAccountState) MessageType

func (uninitedAccountState *UninitedAccountState) MessageType() string

MessageType return the string telegram-type of UninitedAccountState

type UnpackedAccountAddress

type UnpackedAccountAddress struct {
	Addr        string `json:"addr"`         //
	Bounceable  bool   `json:"bounceable"`   //
	Testnet     bool   `json:"testnet"`      //
	WorkchainId int32  `json:"workchain_id"` //
	// contains filtered or unexported fields
}

UnpackedAccountAddress

func NewUnpackedAccountAddress

func NewUnpackedAccountAddress(addr string, bounceable bool, testnet bool, workchainId int32) *UnpackedAccountAddress

NewUnpackedAccountAddress creates a new UnpackedAccountAddress

@param addr @param bounceable @param testnet @param workchainId

func (*UnpackedAccountAddress) MessageType

func (unpackedAccountAddress *UnpackedAccountAddress) MessageType() string

MessageType return the string telegram-type of UnpackedAccountAddress

type UpdateSendLiteServerQuery

type UpdateSendLiteServerQuery struct {
	Data string    `json:"data"` //
	Id   JSONInt64 `json:"id"`   //
	// contains filtered or unexported fields
}

UpdateSendLiteServerQuery

func NewUpdateSendLiteServerQuery

func NewUpdateSendLiteServerQuery(data string, id JSONInt64) *UpdateSendLiteServerQuery

NewUpdateSendLiteServerQuery creates a new UpdateSendLiteServerQuery

@param data @param id

func (*UpdateSendLiteServerQuery) MessageType

func (updateSendLiteServerQuery *UpdateSendLiteServerQuery) MessageType() string

MessageType return the string telegram-type of UpdateSendLiteServerQuery

type UpdateSyncState

type UpdateSyncState struct {
	SyncState *SyncState `json:"sync_state"` //
	// contains filtered or unexported fields
}

UpdateSyncState

func NewUpdateSyncState

func NewUpdateSyncState(syncState *SyncState) *UpdateSyncState

NewUpdateSyncState creates a new UpdateSyncState

@param syncState

func (*UpdateSyncState) MessageType

func (updateSyncState *UpdateSyncState) MessageType() string

MessageType return the string telegram-type of UpdateSyncState

type ValidatorConfig

type ValidatorConfig struct {
	Type      string    `json:"@type"`
	ZeroState ZeroState `json:"zero_state"`
}

type WalletAccountState

type WalletAccountState struct {
	Seqno int32 `json:"seqno"` //
	// contains filtered or unexported fields
}

WalletAccountState

func NewWalletAccountState

func NewWalletAccountState(seqno int32) *WalletAccountState

NewWalletAccountState creates a new WalletAccountState

@param seqno

func (*WalletAccountState) MessageType

func (walletAccountState *WalletAccountState) MessageType() string

MessageType return the string telegram-type of WalletAccountState

type WalletHighloadV1AccountState

type WalletHighloadV1AccountState struct {
	Seqno    int32     `json:"seqno"`     //
	WalletId JSONInt64 `json:"wallet_id"` //
	// contains filtered or unexported fields
}

WalletHighloadV1AccountState

func NewWalletHighloadV1AccountState

func NewWalletHighloadV1AccountState(seqno int32, walletId JSONInt64) *WalletHighloadV1AccountState

NewWalletHighloadV1AccountState creates a new WalletHighloadV1AccountState

@param seqno @param walletId

func (*WalletHighloadV1AccountState) MessageType

func (walletHighloadV1AccountState *WalletHighloadV1AccountState) MessageType() string

MessageType return the string telegram-type of WalletHighloadV1AccountState

type WalletHighloadV1InitialAccountState

type WalletHighloadV1InitialAccountState struct {
	PublicKey string    `json:"public_key"` //
	WalletId  JSONInt64 `json:"wallet_id"`  //
	// contains filtered or unexported fields
}

WalletHighloadV1InitialAccountState

func NewWalletHighloadV1InitialAccountState

func NewWalletHighloadV1InitialAccountState(publicKey string, walletId JSONInt64) *WalletHighloadV1InitialAccountState

NewWalletHighloadV1InitialAccountState creates a new WalletHighloadV1InitialAccountState

@param publicKey @param walletId

func (*WalletHighloadV1InitialAccountState) MessageType

func (walletHighloadV1InitialAccountState *WalletHighloadV1InitialAccountState) MessageType() string

MessageType return the string telegram-type of WalletHighloadV1InitialAccountState

type WalletHighloadV2AccountState

type WalletHighloadV2AccountState struct {
	WalletId JSONInt64 `json:"wallet_id"` //
	// contains filtered or unexported fields
}

WalletHighloadV2AccountState

func NewWalletHighloadV2AccountState

func NewWalletHighloadV2AccountState(walletId JSONInt64) *WalletHighloadV2AccountState

NewWalletHighloadV2AccountState creates a new WalletHighloadV2AccountState

@param walletId

func (*WalletHighloadV2AccountState) MessageType

func (walletHighloadV2AccountState *WalletHighloadV2AccountState) MessageType() string

MessageType return the string telegram-type of WalletHighloadV2AccountState

type WalletHighloadV2InitialAccountState

type WalletHighloadV2InitialAccountState struct {
	PublicKey string    `json:"public_key"` //
	WalletId  JSONInt64 `json:"wallet_id"`  //
	// contains filtered or unexported fields
}

WalletHighloadV2InitialAccountState

func NewWalletHighloadV2InitialAccountState

func NewWalletHighloadV2InitialAccountState(publicKey string, walletId JSONInt64) *WalletHighloadV2InitialAccountState

NewWalletHighloadV2InitialAccountState creates a new WalletHighloadV2InitialAccountState

@param publicKey @param walletId

func (*WalletHighloadV2InitialAccountState) MessageType

func (walletHighloadV2InitialAccountState *WalletHighloadV2InitialAccountState) MessageType() string

MessageType return the string telegram-type of WalletHighloadV2InitialAccountState

type WalletInitialAccountState

type WalletInitialAccountState struct {
	PublicKey string `json:"public_key"` //
	// contains filtered or unexported fields
}

WalletInitialAccountState

func NewWalletInitialAccountState

func NewWalletInitialAccountState(publicKey string) *WalletInitialAccountState

NewWalletInitialAccountState creates a new WalletInitialAccountState

@param publicKey

func (*WalletInitialAccountState) MessageType

func (walletInitialAccountState *WalletInitialAccountState) MessageType() string

MessageType return the string telegram-type of WalletInitialAccountState

type WalletV3AccountState

type WalletV3AccountState struct {
	Seqno    int32     `json:"seqno"`     //
	WalletId JSONInt64 `json:"wallet_id"` //
	// contains filtered or unexported fields
}

WalletV3AccountState

func NewWalletV3AccountState

func NewWalletV3AccountState(seqno int32, walletId JSONInt64) *WalletV3AccountState

NewWalletV3AccountState creates a new WalletV3AccountState

@param seqno @param walletId

func (*WalletV3AccountState) MessageType

func (walletV3AccountState *WalletV3AccountState) MessageType() string

MessageType return the string telegram-type of WalletV3AccountState

type WalletV3InitialAccountState

type WalletV3InitialAccountState struct {
	PublicKey string    `json:"public_key"` //
	WalletId  JSONInt64 `json:"wallet_id"`  //
	// contains filtered or unexported fields
}

WalletV3InitialAccountState

func NewWalletV3InitialAccountState

func NewWalletV3InitialAccountState(publicKey string, walletId JSONInt64) *WalletV3InitialAccountState

NewWalletV3InitialAccountState creates a new WalletV3InitialAccountState

@param publicKey @param walletId

func (*WalletV3InitialAccountState) MessageType

func (walletV3InitialAccountState *WalletV3InitialAccountState) MessageType() string

MessageType return the string telegram-type of WalletV3InitialAccountState

type ZeroState

type ZeroState struct {
	Workchain int    `json:"workchain"`
	Shard     int64  `json:"shard"`
	Seqno     int    `json:"seqno"`
	RootHash  string `json:"root_hash"`
	FileHash  string `json:"file_hash"`
}

Directories

Path Synopsis
cmd
lib

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL