Documentation
¶
Index ¶
- Constants
- Variables
- func EmulatedTreeToTrace(ctx context.Context, executor executor, resolver core.LibraryResolver, ...) (*core.Trace, error)
- func GetPackageVersionInt(packagePath string) (int, error)
- type AsyncHandler
- type AsyncMiddleware
- type ErrorWithExtendedCode
- type Gasless
- type Handler
- func (h *Handler) AccountDnsBackResolve(ctx context.Context, params oas.AccountDnsBackResolveParams) (*oas.DomainNames, error)
- func (h *Handler) AddressParse(ctx context.Context, params oas.AddressParseParams) (*oas.AddressParseOK, error)
- func (h *Handler) BlockchainAccountInspect(ctx context.Context, params oas.BlockchainAccountInspectParams) (*oas.BlockchainAccountInspect, error)
- func (h *Handler) DecodeMessage(ctx context.Context, req *oas.DecodeMessageReq) (*oas.DecodedMessage, error)
- func (h *Handler) DnsResolve(ctx context.Context, params oas.DnsResolveParams) (*oas.DnsRecord, error)
- func (h *Handler) DownloadBlockchainBlockBoc(ctx context.Context, params oas.DownloadBlockchainBlockBocParams) (*oas.DownloadBlockchainBlockBocOKHeaders, error)
- func (h *Handler) EmulateMessageToAccountEvent(ctx context.Context, request *oas.EmulateMessageToAccountEventReq, ...) (*oas.AccountEvent, error)
- func (h *Handler) EmulateMessageToEvent(ctx context.Context, request *oas.EmulateMessageToEventReq, ...) (*oas.Event, error)
- func (h *Handler) EmulateMessageToTrace(ctx context.Context, request *oas.EmulateMessageToTraceReq, ...) (*oas.Trace, error)
- func (h *Handler) EmulateMessageToWallet(ctx context.Context, request *oas.EmulateMessageToWalletReq, ...) (*oas.MessageConsequences, error)
- func (h *Handler) ExecGetMethodForBlockchainAccount(ctx context.Context, params oas.ExecGetMethodForBlockchainAccountParams) (*oas.MethodExecutionResult, error)
- func (h *Handler) ExecGetMethodWithBodyForBlockchainAccount(ctx context.Context, ...) (*oas.MethodExecutionResult, error)
- func (h *Handler) GaslessConfig(ctx context.Context) (*oas.GaslessConfig, error)
- func (h *Handler) GaslessEstimate(ctx context.Context, req *oas.GaslessEstimateReq, ...) (*oas.SignRawParams, error)
- func (h *Handler) GaslessSend(ctx context.Context, req *oas.GaslessSendReq) (*oas.GaslessTx, error)
- func (h *Handler) GetAccount(ctx context.Context, params oas.GetAccountParams) (*oas.Account, error)
- func (h *Handler) GetAccountDiff(ctx context.Context, params oas.GetAccountDiffParams) (*oas.GetAccountDiffOK, error)
- func (h *Handler) GetAccountDnsExpiring(ctx context.Context, params oas.GetAccountDnsExpiringParams) (*oas.DnsExpiring, error)
- func (h *Handler) GetAccountEvent(ctx context.Context, params oas.GetAccountEventParams) (*oas.AccountEvent, error)
- func (h *Handler) GetAccountEvents(ctx context.Context, params oas.GetAccountEventsParams) (*oas.AccountEvents, error)
- func (h *Handler) GetAccountExtraCurrencyHistoryByID(ctx context.Context, params oas.GetAccountExtraCurrencyHistoryByIDParams) (*oas.AccountEvents, error)
- func (h *Handler) GetAccountInfoByStateInit(ctx context.Context, request *oas.GetAccountInfoByStateInitReq) (*oas.AccountInfoByStateInit, error)
- func (h *Handler) GetAccountJettonBalance(ctx context.Context, params oas.GetAccountJettonBalanceParams) (*oas.JettonBalance, error)
- func (h *Handler) GetAccountJettonHistoryByID(ctx context.Context, params oas.GetAccountJettonHistoryByIDParams) (*oas.AccountEvents, error)
- func (h *Handler) GetAccountJettonsBalances(ctx context.Context, params oas.GetAccountJettonsBalancesParams) (*oas.JettonsBalances, error)
- func (h *Handler) GetAccountJettonsHistory(ctx context.Context, params oas.GetAccountJettonsHistoryParams) (*oas.JettonOperations, error)
- func (h *Handler) GetAccountMultisigs(ctx context.Context, params oas.GetAccountMultisigsParams) (*oas.Multisigs, error)
- func (h *Handler) GetAccountNftHistory(ctx context.Context, params oas.GetAccountNftHistoryParams) (*oas.NftOperations, error)
- func (h *Handler) GetAccountNftItems(ctx context.Context, params oas.GetAccountNftItemsParams) (*oas.NftItems, error)
- func (h *Handler) GetAccountNominatorsPools(ctx context.Context, params oas.GetAccountNominatorsPoolsParams) (*oas.AccountStaking, error)
- func (h *Handler) GetAccountPublicKey(ctx context.Context, params oas.GetAccountPublicKeyParams) (*oas.GetAccountPublicKeyOK, error)
- func (h *Handler) GetAccountSeqno(ctx context.Context, params oas.GetAccountSeqnoParams) (*oas.Seqno, error)
- func (h *Handler) GetAccountSubscriptions(ctx context.Context, params oas.GetAccountSubscriptionsParams) (*oas.Subscriptions, error)
- func (h *Handler) GetAccountTraces(ctx context.Context, params oas.GetAccountTracesParams) (*oas.TraceIDs, error)
- func (h *Handler) GetAccounts(ctx context.Context, request oas.OptGetAccountsReq, ...) (*oas.Accounts, error)
- func (h *Handler) GetAllAuctions(ctx context.Context, params oas.GetAllAuctionsParams) (*oas.Auctions, error)
- func (h *Handler) GetAllRawShardsInfo(ctx context.Context, params oas.GetAllRawShardsInfoParams) (*oas.GetAllRawShardsInfoOK, error)
- func (h *Handler) GetBlockchainAccountTransactions(ctx context.Context, params oas.GetBlockchainAccountTransactionsParams) (*oas.Transactions, error)
- func (h *Handler) GetBlockchainBlock(ctx context.Context, params oas.GetBlockchainBlockParams) (*oas.BlockchainBlock, error)
- func (h *Handler) GetBlockchainBlockTransactions(ctx context.Context, params oas.GetBlockchainBlockTransactionsParams) (*oas.Transactions, error)
- func (h *Handler) GetBlockchainConfig(ctx context.Context) (*oas.BlockchainConfig, error)
- func (h *Handler) GetBlockchainConfigFromBlock(ctx context.Context, params oas.GetBlockchainConfigFromBlockParams) (*oas.BlockchainConfig, error)
- func (h *Handler) GetBlockchainMasterchainBlocks(ctx context.Context, params oas.GetBlockchainMasterchainBlocksParams) (*oas.BlockchainBlocks, error)
- func (h *Handler) GetBlockchainMasterchainHead(ctx context.Context) (*oas.BlockchainBlock, error)
- func (h *Handler) GetBlockchainMasterchainShards(ctx context.Context, params oas.GetBlockchainMasterchainShardsParams) (r *oas.BlockchainBlockShards, _ error)
- func (h *Handler) GetBlockchainMasterchainTransactions(ctx context.Context, params oas.GetBlockchainMasterchainTransactionsParams) (*oas.Transactions, error)
- func (h *Handler) GetBlockchainRawAccount(ctx context.Context, params oas.GetBlockchainRawAccountParams) (*oas.BlockchainRawAccount, error)
- func (h *Handler) GetBlockchainTransaction(ctx context.Context, params oas.GetBlockchainTransactionParams) (*oas.Transaction, error)
- func (h *Handler) GetBlockchainTransactionByMessageHash(ctx context.Context, params oas.GetBlockchainTransactionByMessageHashParams) (*oas.Transaction, error)
- func (h *Handler) GetBlockchainValidators(ctx context.Context) (*oas.Validators, error)
- func (h *Handler) GetChartRates(ctx context.Context, params oas.GetChartRatesParams) (*oas.GetChartRatesOK, error)
- func (h *Handler) GetDnsInfo(ctx context.Context, params oas.GetDnsInfoParams) (*oas.DomainInfo, error)
- func (h *Handler) GetDomainBids(ctx context.Context, params oas.GetDomainBidsParams) (*oas.DomainBids, error)
- func (h *Handler) GetEvent(ctx context.Context, params oas.GetEventParams) (*oas.Event, error)
- func (h *Handler) GetExtraCurrencyInfo(ctx context.Context, params oas.GetExtraCurrencyInfoParams) (*oas.EcPreview, error)
- func (h *Handler) GetItemsFromCollection(ctx context.Context, params oas.GetItemsFromCollectionParams) (*oas.NftItems, error)
- func (h *Handler) GetJettonAccountHistoryByID(ctx context.Context, params oas.GetJettonAccountHistoryByIDParams) (*oas.JettonOperations, error)
- func (h *Handler) GetJettonHolders(ctx context.Context, params oas.GetJettonHoldersParams) (*oas.JettonHolders, error)
- func (h *Handler) GetJettonInfo(ctx context.Context, params oas.GetJettonInfoParams) (*oas.JettonInfo, error)
- func (h *Handler) GetJettonInfosByAddresses(ctx context.Context, request oas.OptGetJettonInfosByAddressesReq) (*oas.Jettons, error)
- func (h *Handler) GetJettonNormalizedMetadata(ctx context.Context, master tongo.AccountID) NormalizedMetadata
- func (h *Handler) GetJettonTransferPayload(ctx context.Context, params oas.GetJettonTransferPayloadParams) (*oas.JettonTransferPayload, error)
- func (h *Handler) GetJettons(ctx context.Context, params oas.GetJettonsParams) (*oas.Jettons, error)
- func (h *Handler) GetJettonsEvents(ctx context.Context, params oas.GetJettonsEventsParams) (*oas.Event, error)
- func (h *Handler) GetLibraryByHash(ctx context.Context, params oas.GetLibraryByHashParams) (*oas.BlockchainLibrary, error)
- func (h *Handler) GetMarketsRates(ctx context.Context) (*oas.GetMarketsRatesOK, error)
- func (h *Handler) GetMultisigAccount(ctx context.Context, params oas.GetMultisigAccountParams) (*oas.Multisig, error)
- func (h *Handler) GetMultisigOrder(ctx context.Context, params oas.GetMultisigOrderParams) (*oas.MultisigOrder, error)
- func (h *Handler) GetNftCollection(ctx context.Context, params oas.GetNftCollectionParams) (*oas.NftCollection, error)
- func (h *Handler) GetNftCollectionItemsByAddresses(ctx context.Context, request oas.OptGetNftCollectionItemsByAddressesReq) (*oas.NftCollections, error)
- func (h *Handler) GetNftCollections(ctx context.Context, params oas.GetNftCollectionsParams) (*oas.NftCollections, error)
- func (h *Handler) GetNftHistoryByID(ctx context.Context, params oas.GetNftHistoryByIDParams) (*oas.AccountEvents, error)
- func (h *Handler) GetNftItemByAddress(ctx context.Context, params oas.GetNftItemByAddressParams) (*oas.NftItem, error)
- func (h *Handler) GetNftItemsByAddresses(ctx context.Context, request oas.OptGetNftItemsByAddressesReq) (*oas.NftItems, error)
- func (h *Handler) GetOpenapiJson(ctx context.Context) (jx.Raw, error)
- func (h *Handler) GetOpenapiYml(ctx context.Context) (oas.GetOpenapiYmlOK, error)
- func (h *Handler) GetOutMsgQueueSizes(ctx context.Context) (*oas.GetOutMsgQueueSizesOK, error)
- func (h *Handler) GetPurchaseHistory(ctx context.Context, params oas.GetPurchaseHistoryParams) (r *oas.AccountPurchases, _ error)
- func (h *Handler) GetRates(ctx context.Context, params oas.GetRatesParams) (*oas.GetRatesOK, error)
- func (h *Handler) GetRawAccountState(ctx context.Context, params oas.GetRawAccountStateParams) (*oas.GetRawAccountStateOK, error)
- func (h *Handler) GetRawBlockProof(ctx context.Context, params oas.GetRawBlockProofParams) (*oas.GetRawBlockProofOK, error)
- func (h *Handler) GetRawBlockchainBlock(ctx context.Context, params oas.GetRawBlockchainBlockParams) (*oas.GetRawBlockchainBlockOK, error)
- func (h *Handler) GetRawBlockchainBlockHeader(ctx context.Context, params oas.GetRawBlockchainBlockHeaderParams) (*oas.GetRawBlockchainBlockHeaderOK, error)
- func (h *Handler) GetRawBlockchainBlockState(ctx context.Context, params oas.GetRawBlockchainBlockStateParams) (*oas.GetRawBlockchainBlockStateOK, error)
- func (h *Handler) GetRawBlockchainConfig(ctx context.Context) (r *oas.RawBlockchainConfig, _ error)
- func (h *Handler) GetRawBlockchainConfigFromBlock(ctx context.Context, params oas.GetRawBlockchainConfigFromBlockParams) (r *oas.RawBlockchainConfig, _ error)
- func (h *Handler) GetRawConfig(ctx context.Context, params oas.GetRawConfigParams) (*oas.GetRawConfigOK, error)
- func (h *Handler) GetRawListBlockTransactions(ctx context.Context, params oas.GetRawListBlockTransactionsParams) (*oas.GetRawListBlockTransactionsOK, error)
- func (h *Handler) GetRawMasterchainInfo(ctx context.Context) (*oas.GetRawMasterchainInfoOK, error)
- func (h *Handler) GetRawMasterchainInfoExt(ctx context.Context, params oas.GetRawMasterchainInfoExtParams) (*oas.GetRawMasterchainInfoExtOK, error)
- func (h *Handler) GetRawShardBlockProof(ctx context.Context, params oas.GetRawShardBlockProofParams) (*oas.GetRawShardBlockProofOK, error)
- func (h *Handler) GetRawShardInfo(ctx context.Context, params oas.GetRawShardInfoParams) (*oas.GetRawShardInfoOK, error)
- func (h *Handler) GetRawTime(ctx context.Context) (*oas.GetRawTimeOK, error)
- func (h *Handler) GetRawTransactions(ctx context.Context, params oas.GetRawTransactionsParams) (*oas.GetRawTransactionsOK, error)
- func (h *Handler) GetReducedBlockchainBlocks(ctx context.Context, params oas.GetReducedBlockchainBlocksParams) (*oas.ReducedBlocks, error)
- func (h *Handler) GetStakingPoolHistory(ctx context.Context, params oas.GetStakingPoolHistoryParams) (*oas.GetStakingPoolHistoryOK, error)
- func (h *Handler) GetStakingPoolInfo(ctx context.Context, params oas.GetStakingPoolInfoParams) (*oas.GetStakingPoolInfoOK, error)
- func (h *Handler) GetStakingPools(ctx context.Context, params oas.GetStakingPoolsParams) (*oas.GetStakingPoolsOK, error)
- func (h *Handler) GetStorageProviders(ctx context.Context) (*oas.GetStorageProvidersOK, error)
- func (h *Handler) GetTonConnectPayload(ctx context.Context) (*oas.GetTonConnectPayloadOK, error)
- func (h *Handler) GetTrace(ctx context.Context, params oas.GetTraceParams) (*oas.Trace, error)
- func (h *Handler) GetWalletInfo(ctx context.Context, params oas.GetWalletInfoParams) (*oas.Wallet, error)
- func (h *Handler) GetWalletsByPublicKey(ctx context.Context, params oas.GetWalletsByPublicKeyParams) (*oas.Wallets, error)
- func (h *Handler) NewError(ctx context.Context, err error) *oas.ErrorStatusCode
- func (h *Handler) ReindexAccount(ctx context.Context, params oas.ReindexAccountParams) error
- func (h *Handler) RunEmulation(ctx context.Context, msgCh <-chan blockchain.ExtInMsgCopy, ...)
- func (h *Handler) SearchAccounts(ctx context.Context, params oas.SearchAccountsParams) (*oas.FoundAccounts, error)
- func (h *Handler) SendBlockchainMessage(ctx context.Context, request *oas.SendBlockchainMessageReq) error
- func (h *Handler) SendRawMessage(ctx context.Context, request *oas.SendRawMessageReq) (*oas.SendRawMessageOK, error)
- func (h *Handler) Status(ctx context.Context) (*oas.ServiceStatus, error)
- func (h *Handler) TonConnectProof(ctx context.Context, request *oas.TonConnectProofReq) (*oas.TonConnectProofOK, error)
- type Limits
- type NormalizedMetadata
- type Option
- func WithAddressBook(book addressBook) Option
- func WithChainState(state chainState) Option
- func WithContextToDetails(ctxToDetails ctxToDetails) Option
- func WithExecutor(e executor) Option
- func WithGasless(gasless Gasless) Option
- func WithLimits(limits Limits) Option
- func WithMessageSender(msgSender messageSender) Option
- func WithRatesSource(source ratesSource) Option
- func WithScore(score scoreSource) Option
- func WithSpamFilter(spamFilter SpamFilter) Option
- func WithStorage(s storage) Option
- func WithTonConnectSecret(tonConnectSecret string) Option
- func WithVerifier(verifier verifierSource) Option
- type Options
- type Server
- type ServerOption
- func WithAsyncMiddleware(m ...AsyncMiddleware) ServerOption
- func WithBlockHeadersSource(src sources.BlockHeadersSource) ServerOption
- func WithBlockSource(src sources.BlockSource) ServerOption
- func WithMemPool(memPool sources.MemPoolSource) ServerOption
- func WithOgenMiddleware(m ...oas.Middleware) ServerOption
- func WithTraceSource(src sources.TraceSource) ServerOption
- func WithTransactionSource(txSource sources.TransactionSource) ServerOption
- type ServerOptions
- type SpamFilter
Constants ¶
const ( LongLivedConnection = 0 RegularConnection = 1 )
For authentication purposes we need to distinguish between regular and long-lived connections.
const UnknownJettonName = "UKWN"
Variables ¶
var ErrRateLimit = errors.New("rate limit")
var NoneAccount = oas.AccountAddress{ Address: "", Name: oas.NewOptString("NoneAddr"), }
var SupportedWallets = map[tongoWallet.Version]abi.ContractInterface{ tongoWallet.V1R1: abi.WalletV1R1, tongoWallet.V1R2: abi.WalletV1R2, tongoWallet.V1R3: abi.WalletV1R3, tongoWallet.V2R1: abi.WalletV2R1, tongoWallet.V2R2: abi.WalletV2R2, tongoWallet.V3R1: abi.WalletV3R1, tongoWallet.V3R2: abi.WalletV3R2, tongoWallet.V4R1: abi.WalletV4R1, tongoWallet.V4R2: abi.WalletV4R2, tongoWallet.V5Beta: abi.WalletV5Beta, tongoWallet.V5R1: abi.WalletV5R1, }
Functions ¶
func EmulatedTreeToTrace ¶ added in v1.3.0
func EmulatedTreeToTrace( ctx context.Context, executor executor, resolver core.LibraryResolver, tree *txemulator.TxTree, accounts map[tongo.AccountID]tlb.ShardAccount, inspectionCache map[ton.AccountID]*abi.ContractDescription, configPool *sync.Pool, filterOutMessages bool, ) (*core.Trace, error)
func GetPackageVersionInt ¶ added in v1.3.0
Types ¶
type AsyncHandler ¶
type AsyncMiddleware ¶
type AsyncMiddleware func(AsyncHandler) AsyncHandler
type ErrorWithExtendedCode ¶ added in v1.3.0
type ErrorWithExtendedCode struct {
Code int
Message string
ExtendedCode references.ExtendedCode
}
ErrorWithExtendedCode helps to pass additional information about an error.
func (ErrorWithExtendedCode) Error ¶ added in v1.3.0
func (e ErrorWithExtendedCode) Error() string
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func (*Handler) AccountDnsBackResolve ¶ added in v1.1.0
func (h *Handler) AccountDnsBackResolve(ctx context.Context, params oas.AccountDnsBackResolveParams) (*oas.DomainNames, error)
func (*Handler) AddressParse ¶ added in v1.2.0
func (h *Handler) AddressParse(ctx context.Context, params oas.AddressParseParams) (*oas.AddressParseOK, error)
func (*Handler) BlockchainAccountInspect ¶ added in v1.1.0
func (h *Handler) BlockchainAccountInspect(ctx context.Context, params oas.BlockchainAccountInspectParams) (*oas.BlockchainAccountInspect, error)
func (*Handler) DecodeMessage ¶ added in v1.2.0
func (h *Handler) DecodeMessage(ctx context.Context, req *oas.DecodeMessageReq) (*oas.DecodedMessage, error)
func (*Handler) DnsResolve ¶
func (*Handler) DownloadBlockchainBlockBoc ¶ added in v1.3.0
func (h *Handler) DownloadBlockchainBlockBoc(ctx context.Context, params oas.DownloadBlockchainBlockBocParams) (*oas.DownloadBlockchainBlockBocOKHeaders, error)
func (*Handler) EmulateMessageToAccountEvent ¶
func (h *Handler) EmulateMessageToAccountEvent(ctx context.Context, request *oas.EmulateMessageToAccountEventReq, params oas.EmulateMessageToAccountEventParams) (*oas.AccountEvent, error)
func (*Handler) EmulateMessageToEvent ¶
func (h *Handler) EmulateMessageToEvent(ctx context.Context, request *oas.EmulateMessageToEventReq, params oas.EmulateMessageToEventParams) (*oas.Event, error)
func (*Handler) EmulateMessageToTrace ¶
func (h *Handler) EmulateMessageToTrace(ctx context.Context, request *oas.EmulateMessageToTraceReq, params oas.EmulateMessageToTraceParams) (*oas.Trace, error)
func (*Handler) EmulateMessageToWallet ¶ added in v1.1.0
func (h *Handler) EmulateMessageToWallet(ctx context.Context, request *oas.EmulateMessageToWalletReq, params oas.EmulateMessageToWalletParams) (*oas.MessageConsequences, error)
func (*Handler) ExecGetMethodForBlockchainAccount ¶ added in v1.1.0
func (h *Handler) ExecGetMethodForBlockchainAccount(ctx context.Context, params oas.ExecGetMethodForBlockchainAccountParams) (*oas.MethodExecutionResult, error)
func (*Handler) ExecGetMethodWithBodyForBlockchainAccount ¶ added in v1.3.0
func (h *Handler) ExecGetMethodWithBodyForBlockchainAccount(ctx context.Context, request oas.OptExecGetMethodWithBodyForBlockchainAccountReq, params oas.ExecGetMethodWithBodyForBlockchainAccountParams) (*oas.MethodExecutionResult, error)
func (*Handler) GaslessConfig ¶ added in v1.3.0
func (*Handler) GaslessEstimate ¶ added in v1.3.0
func (h *Handler) GaslessEstimate(ctx context.Context, req *oas.GaslessEstimateReq, params oas.GaslessEstimateParams) (*oas.SignRawParams, error)
func (*Handler) GaslessSend ¶ added in v1.3.0
func (*Handler) GetAccount ¶
func (*Handler) GetAccountDiff ¶ added in v1.1.0
func (h *Handler) GetAccountDiff(ctx context.Context, params oas.GetAccountDiffParams) (*oas.GetAccountDiffOK, error)
func (*Handler) GetAccountDnsExpiring ¶ added in v1.1.0
func (h *Handler) GetAccountDnsExpiring(ctx context.Context, params oas.GetAccountDnsExpiringParams) (*oas.DnsExpiring, error)
func (*Handler) GetAccountEvent ¶ added in v1.1.0
func (h *Handler) GetAccountEvent(ctx context.Context, params oas.GetAccountEventParams) (*oas.AccountEvent, error)
func (*Handler) GetAccountEvents ¶ added in v1.1.0
func (h *Handler) GetAccountEvents(ctx context.Context, params oas.GetAccountEventsParams) (*oas.AccountEvents, error)
func (*Handler) GetAccountExtraCurrencyHistoryByID ¶ added in v1.3.0
func (h *Handler) GetAccountExtraCurrencyHistoryByID(ctx context.Context, params oas.GetAccountExtraCurrencyHistoryByIDParams) (*oas.AccountEvents, error)
func (*Handler) GetAccountInfoByStateInit ¶
func (h *Handler) GetAccountInfoByStateInit(ctx context.Context, request *oas.GetAccountInfoByStateInitReq) (*oas.AccountInfoByStateInit, error)
func (*Handler) GetAccountJettonBalance ¶ added in v1.3.0
func (h *Handler) GetAccountJettonBalance(ctx context.Context, params oas.GetAccountJettonBalanceParams) (*oas.JettonBalance, error)
func (*Handler) GetAccountJettonHistoryByID ¶ added in v1.1.0
func (h *Handler) GetAccountJettonHistoryByID(ctx context.Context, params oas.GetAccountJettonHistoryByIDParams) (*oas.AccountEvents, error)
func (*Handler) GetAccountJettonsBalances ¶ added in v1.1.0
func (h *Handler) GetAccountJettonsBalances(ctx context.Context, params oas.GetAccountJettonsBalancesParams) (*oas.JettonsBalances, error)
func (*Handler) GetAccountJettonsHistory ¶ added in v1.1.0
func (h *Handler) GetAccountJettonsHistory(ctx context.Context, params oas.GetAccountJettonsHistoryParams) (*oas.JettonOperations, error)
func (*Handler) GetAccountMultisigs ¶ added in v1.3.0
func (*Handler) GetAccountNftHistory ¶ added in v1.1.0
func (h *Handler) GetAccountNftHistory(ctx context.Context, params oas.GetAccountNftHistoryParams) (*oas.NftOperations, error)
func (*Handler) GetAccountNftItems ¶ added in v1.1.0
func (*Handler) GetAccountNominatorsPools ¶ added in v1.1.0
func (h *Handler) GetAccountNominatorsPools(ctx context.Context, params oas.GetAccountNominatorsPoolsParams) (*oas.AccountStaking, error)
func (*Handler) GetAccountPublicKey ¶ added in v1.1.0
func (h *Handler) GetAccountPublicKey(ctx context.Context, params oas.GetAccountPublicKeyParams) (*oas.GetAccountPublicKeyOK, error)
func (*Handler) GetAccountSeqno ¶ added in v1.0.0
func (*Handler) GetAccountSubscriptions ¶ added in v1.1.0
func (h *Handler) GetAccountSubscriptions(ctx context.Context, params oas.GetAccountSubscriptionsParams) (*oas.Subscriptions, error)
func (*Handler) GetAccountTraces ¶ added in v1.1.0
func (*Handler) GetAccounts ¶
func (h *Handler) GetAccounts(ctx context.Context, request oas.OptGetAccountsReq, params oas.GetAccountsParams) (*oas.Accounts, error)
func (*Handler) GetAllAuctions ¶
func (*Handler) GetAllRawShardsInfo ¶ added in v1.1.0
func (h *Handler) GetAllRawShardsInfo(ctx context.Context, params oas.GetAllRawShardsInfoParams) (*oas.GetAllRawShardsInfoOK, error)
func (*Handler) GetBlockchainAccountTransactions ¶ added in v1.1.0
func (h *Handler) GetBlockchainAccountTransactions(ctx context.Context, params oas.GetBlockchainAccountTransactionsParams) (*oas.Transactions, error)
func (*Handler) GetBlockchainBlock ¶ added in v1.1.0
func (h *Handler) GetBlockchainBlock(ctx context.Context, params oas.GetBlockchainBlockParams) (*oas.BlockchainBlock, error)
func (*Handler) GetBlockchainBlockTransactions ¶ added in v1.1.0
func (h *Handler) GetBlockchainBlockTransactions(ctx context.Context, params oas.GetBlockchainBlockTransactionsParams) (*oas.Transactions, error)
func (*Handler) GetBlockchainConfig ¶ added in v1.1.0
func (*Handler) GetBlockchainConfigFromBlock ¶ added in v1.2.0
func (h *Handler) GetBlockchainConfigFromBlock(ctx context.Context, params oas.GetBlockchainConfigFromBlockParams) (*oas.BlockchainConfig, error)
func (*Handler) GetBlockchainMasterchainBlocks ¶ added in v1.2.0
func (h *Handler) GetBlockchainMasterchainBlocks(ctx context.Context, params oas.GetBlockchainMasterchainBlocksParams) (*oas.BlockchainBlocks, error)
func (*Handler) GetBlockchainMasterchainHead ¶ added in v1.1.0
func (*Handler) GetBlockchainMasterchainShards ¶ added in v1.2.0
func (h *Handler) GetBlockchainMasterchainShards(ctx context.Context, params oas.GetBlockchainMasterchainShardsParams) (r *oas.BlockchainBlockShards, _ error)
func (*Handler) GetBlockchainMasterchainTransactions ¶ added in v1.2.0
func (h *Handler) GetBlockchainMasterchainTransactions(ctx context.Context, params oas.GetBlockchainMasterchainTransactionsParams) (*oas.Transactions, error)
func (*Handler) GetBlockchainRawAccount ¶ added in v1.1.0
func (h *Handler) GetBlockchainRawAccount(ctx context.Context, params oas.GetBlockchainRawAccountParams) (*oas.BlockchainRawAccount, error)
func (*Handler) GetBlockchainTransaction ¶ added in v1.1.0
func (h *Handler) GetBlockchainTransaction(ctx context.Context, params oas.GetBlockchainTransactionParams) (*oas.Transaction, error)
func (*Handler) GetBlockchainTransactionByMessageHash ¶ added in v1.1.0
func (h *Handler) GetBlockchainTransactionByMessageHash(ctx context.Context, params oas.GetBlockchainTransactionByMessageHashParams) (*oas.Transaction, error)
func (*Handler) GetBlockchainValidators ¶ added in v1.2.0
func (*Handler) GetChartRates ¶ added in v1.1.0
func (h *Handler) GetChartRates(ctx context.Context, params oas.GetChartRatesParams) (*oas.GetChartRatesOK, error)
func (*Handler) GetDnsInfo ¶ added in v1.1.0
func (h *Handler) GetDnsInfo(ctx context.Context, params oas.GetDnsInfoParams) (*oas.DomainInfo, error)
func (*Handler) GetDomainBids ¶ added in v1.0.0
func (h *Handler) GetDomainBids(ctx context.Context, params oas.GetDomainBidsParams) (*oas.DomainBids, error)
func (*Handler) GetExtraCurrencyInfo ¶ added in v1.3.0
func (*Handler) GetItemsFromCollection ¶
func (*Handler) GetJettonAccountHistoryByID ¶ added in v1.3.0
func (h *Handler) GetJettonAccountHistoryByID(ctx context.Context, params oas.GetJettonAccountHistoryByIDParams) (*oas.JettonOperations, error)
func (*Handler) GetJettonHolders ¶ added in v1.1.0
func (h *Handler) GetJettonHolders(ctx context.Context, params oas.GetJettonHoldersParams) (*oas.JettonHolders, error)
func (*Handler) GetJettonInfo ¶
func (h *Handler) GetJettonInfo(ctx context.Context, params oas.GetJettonInfoParams) (*oas.JettonInfo, error)
func (*Handler) GetJettonInfosByAddresses ¶ added in v1.3.0
func (*Handler) GetJettonNormalizedMetadata ¶
func (*Handler) GetJettonTransferPayload ¶ added in v1.3.0
func (h *Handler) GetJettonTransferPayload(ctx context.Context, params oas.GetJettonTransferPayloadParams) (*oas.JettonTransferPayload, error)
func (*Handler) GetJettons ¶ added in v1.0.0
func (*Handler) GetJettonsEvents ¶ added in v1.1.0
func (*Handler) GetLibraryByHash ¶ added in v1.3.1
func (h *Handler) GetLibraryByHash(ctx context.Context, params oas.GetLibraryByHashParams) (*oas.BlockchainLibrary, error)
func (*Handler) GetMarketsRates ¶ added in v1.2.0
func (*Handler) GetMultisigAccount ¶ added in v1.3.0
func (*Handler) GetMultisigOrder ¶ added in v1.3.0
func (h *Handler) GetMultisigOrder(ctx context.Context, params oas.GetMultisigOrderParams) (*oas.MultisigOrder, error)
func (*Handler) GetNftCollection ¶
func (h *Handler) GetNftCollection(ctx context.Context, params oas.GetNftCollectionParams) (*oas.NftCollection, error)
func (*Handler) GetNftCollectionItemsByAddresses ¶ added in v1.3.0
func (h *Handler) GetNftCollectionItemsByAddresses(ctx context.Context, request oas.OptGetNftCollectionItemsByAddressesReq) (*oas.NftCollections, error)
func (*Handler) GetNftCollections ¶
func (h *Handler) GetNftCollections(ctx context.Context, params oas.GetNftCollectionsParams) (*oas.NftCollections, error)
func (*Handler) GetNftHistoryByID ¶ added in v1.1.0
func (h *Handler) GetNftHistoryByID(ctx context.Context, params oas.GetNftHistoryByIDParams) (*oas.AccountEvents, error)
GetNftHistoryByID deprecated - will be removed
func (*Handler) GetNftItemByAddress ¶
func (*Handler) GetNftItemsByAddresses ¶
func (*Handler) GetOpenapiJson ¶ added in v1.3.0
func (*Handler) GetOpenapiYml ¶ added in v1.3.0
func (*Handler) GetOutMsgQueueSizes ¶ added in v1.3.0
func (*Handler) GetPurchaseHistory ¶ added in v1.3.0
func (h *Handler) GetPurchaseHistory(ctx context.Context, params oas.GetPurchaseHistoryParams) (r *oas.AccountPurchases, _ error)
func (*Handler) GetRates ¶
func (h *Handler) GetRates(ctx context.Context, params oas.GetRatesParams) (*oas.GetRatesOK, error)
func (*Handler) GetRawAccountState ¶ added in v1.1.0
func (h *Handler) GetRawAccountState(ctx context.Context, params oas.GetRawAccountStateParams) (*oas.GetRawAccountStateOK, error)
func (*Handler) GetRawBlockProof ¶ added in v1.1.0
func (h *Handler) GetRawBlockProof(ctx context.Context, params oas.GetRawBlockProofParams) (*oas.GetRawBlockProofOK, error)
func (*Handler) GetRawBlockchainBlock ¶ added in v1.1.0
func (h *Handler) GetRawBlockchainBlock(ctx context.Context, params oas.GetRawBlockchainBlockParams) (*oas.GetRawBlockchainBlockOK, error)
func (*Handler) GetRawBlockchainBlockHeader ¶ added in v1.1.0
func (h *Handler) GetRawBlockchainBlockHeader(ctx context.Context, params oas.GetRawBlockchainBlockHeaderParams) (*oas.GetRawBlockchainBlockHeaderOK, error)
func (*Handler) GetRawBlockchainBlockState ¶ added in v1.1.0
func (h *Handler) GetRawBlockchainBlockState(ctx context.Context, params oas.GetRawBlockchainBlockStateParams) (*oas.GetRawBlockchainBlockStateOK, error)
func (*Handler) GetRawBlockchainConfig ¶ added in v1.2.0
func (*Handler) GetRawBlockchainConfigFromBlock ¶ added in v1.2.0
func (h *Handler) GetRawBlockchainConfigFromBlock(ctx context.Context, params oas.GetRawBlockchainConfigFromBlockParams) (r *oas.RawBlockchainConfig, _ error)
func (*Handler) GetRawConfig ¶ added in v1.1.0
func (h *Handler) GetRawConfig(ctx context.Context, params oas.GetRawConfigParams) (*oas.GetRawConfigOK, error)
func (*Handler) GetRawListBlockTransactions ¶ added in v1.1.0
func (h *Handler) GetRawListBlockTransactions(ctx context.Context, params oas.GetRawListBlockTransactionsParams) (*oas.GetRawListBlockTransactionsOK, error)
func (*Handler) GetRawMasterchainInfo ¶ added in v1.1.0
func (*Handler) GetRawMasterchainInfoExt ¶ added in v1.1.0
func (h *Handler) GetRawMasterchainInfoExt(ctx context.Context, params oas.GetRawMasterchainInfoExtParams) (*oas.GetRawMasterchainInfoExtOK, error)
func (*Handler) GetRawShardBlockProof ¶ added in v1.1.0
func (h *Handler) GetRawShardBlockProof(ctx context.Context, params oas.GetRawShardBlockProofParams) (*oas.GetRawShardBlockProofOK, error)
func (*Handler) GetRawShardInfo ¶ added in v1.1.0
func (h *Handler) GetRawShardInfo(ctx context.Context, params oas.GetRawShardInfoParams) (*oas.GetRawShardInfoOK, error)
func (*Handler) GetRawTime ¶ added in v1.1.0
func (*Handler) GetRawTransactions ¶ added in v1.1.0
func (h *Handler) GetRawTransactions(ctx context.Context, params oas.GetRawTransactionsParams) (*oas.GetRawTransactionsOK, error)
func (*Handler) GetReducedBlockchainBlocks ¶ added in v1.3.0
func (h *Handler) GetReducedBlockchainBlocks(ctx context.Context, params oas.GetReducedBlockchainBlocksParams) (*oas.ReducedBlocks, error)
func (*Handler) GetStakingPoolHistory ¶ added in v1.1.0
func (h *Handler) GetStakingPoolHistory(ctx context.Context, params oas.GetStakingPoolHistoryParams) (*oas.GetStakingPoolHistoryOK, error)
func (*Handler) GetStakingPoolInfo ¶ added in v1.1.0
func (h *Handler) GetStakingPoolInfo(ctx context.Context, params oas.GetStakingPoolInfoParams) (*oas.GetStakingPoolInfoOK, error)
func (*Handler) GetStakingPools ¶ added in v1.1.0
func (h *Handler) GetStakingPools(ctx context.Context, params oas.GetStakingPoolsParams) (*oas.GetStakingPoolsOK, error)
func (*Handler) GetStorageProviders ¶
func (*Handler) GetTonConnectPayload ¶
func (*Handler) GetWalletInfo ¶ added in v1.3.0
func (*Handler) GetWalletsByPublicKey ¶ added in v1.0.0
func (*Handler) ReindexAccount ¶
ReindexAccount updates internal cache for a particular account.
func (*Handler) RunEmulation ¶ added in v1.2.0
func (h *Handler) RunEmulation(ctx context.Context, msgCh <-chan blockchain.ExtInMsgCopy, emulationCh chan<- blockchain.ExtInMsgCopy)
func (*Handler) SearchAccounts ¶ added in v1.1.0
func (h *Handler) SearchAccounts(ctx context.Context, params oas.SearchAccountsParams) (*oas.FoundAccounts, error)
func (*Handler) SendBlockchainMessage ¶ added in v1.1.0
func (*Handler) SendRawMessage ¶ added in v1.1.0
func (h *Handler) SendRawMessage(ctx context.Context, request *oas.SendRawMessageReq) (*oas.SendRawMessageOK, error)
func (*Handler) TonConnectProof ¶
func (h *Handler) TonConnectProof(ctx context.Context, request *oas.TonConnectProofReq) (*oas.TonConnectProofOK, error)
type Limits ¶
type Limits struct {
// BulkLimits stands for a number of entities a user is allowed to request at once with a bulk query.
BulkLimits int
}
type NormalizedMetadata ¶
type NormalizedMetadata struct {
Name string
Description string
Image string
Symbol string
Decimals int
Verification core.TrustType
Social []string
Websites []string
CustomPayloadApiUri string
PreviewImage string // path to the converted image
}
NormalizedMetadata is a special version of jetton metadata ready to be shown to the users. It contains a mix of information from two sources: 1. a jetton master metadata taken from the blockchain (onchain/offchain) 2. a jetton description taken from the community git https://github.com/tonkeeper/ton-assets. It additionally rewrites some fields if necessary.
func NormalizeMetadata ¶
func NormalizeMetadata(addr ton.AccountID, meta tep64.Metadata, info *addressbook.KnownJetton, trust core.TrustType) NormalizedMetadata
type Option ¶
type Option func(o *Options)
func WithAddressBook ¶
func WithAddressBook(book addressBook) Option
func WithChainState ¶
func WithChainState(state chainState) Option
func WithContextToDetails ¶ added in v1.2.0
func WithContextToDetails(ctxToDetails ctxToDetails) Option
func WithExecutor ¶
func WithExecutor(e executor) Option
func WithGasless ¶ added in v1.3.0
func WithLimits ¶
func WithMessageSender ¶
func WithMessageSender(msgSender messageSender) Option
func WithRatesSource ¶ added in v1.0.0
func WithRatesSource(source ratesSource) Option
func WithSpamFilter ¶ added in v1.1.0
func WithSpamFilter(spamFilter SpamFilter) Option
func WithStorage ¶
func WithStorage(s storage) Option
func WithTonConnectSecret ¶
func WithVerifier ¶ added in v1.3.0
func WithVerifier(verifier verifierSource) Option
type Options ¶
type Options struct {
// contains filtered or unexported fields
}
Options configures behavior of a Handler instance.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server opens a port and exposes REST-ish API.
Server integrates two groups of endpoints:
- The first group named "Ogen" consists of endpoints generated by ogen based on api/openapi.yml. It has an independent server in "oas" package.
- The second group named "Async" contains methods that aren't supported by ogen (streaming methods with non-standard Content-Type). These methods are defined manually and are exposed with http.ServeMux.
We provide basic middleware like logging and metrics for both groups.
func (*Server) RegisterAsyncHandler ¶
func (s *Server) RegisterAsyncHandler(pattern string, handler AsyncHandler, connectionType int, allowTokenInQuery bool)
type ServerOption ¶
type ServerOption func(options *ServerOptions)
func WithAsyncMiddleware ¶
func WithAsyncMiddleware(m ...AsyncMiddleware) ServerOption
func WithBlockHeadersSource ¶ added in v1.2.0
func WithBlockHeadersSource(src sources.BlockHeadersSource) ServerOption
func WithBlockSource ¶ added in v1.2.0
func WithBlockSource(src sources.BlockSource) ServerOption
func WithMemPool ¶
func WithMemPool(memPool sources.MemPoolSource) ServerOption
func WithOgenMiddleware ¶
func WithOgenMiddleware(m ...oas.Middleware) ServerOption
func WithTraceSource ¶ added in v1.2.0
func WithTraceSource(src sources.TraceSource) ServerOption
func WithTransactionSource ¶
func WithTransactionSource(txSource sources.TransactionSource) ServerOption
type ServerOptions ¶
type ServerOptions struct {
// contains filtered or unexported fields
}
type SpamFilter ¶ added in v1.3.0
type SpamFilter interface {
IsScamEvent(actions []oas.Action, viewer *ton.AccountID, initiator ton.AccountID) bool
GetEventsScamData(ctx context.Context, ids []string) (map[string]bool, error)
JettonTrust(address tongo.AccountID, symbol, name, image string) core.TrustType
AccountTrust(address tongo.AccountID) core.TrustType
NftTrust(address tongo.AccountID, collection *ton.AccountID, description, image string) core.TrustType
GetNftsScamData(ctx context.Context, addresses []ton.AccountID) (map[ton.AccountID]core.TrustType, error)
}
Source Files
¶
- account_converters.go
- account_executor.go
- account_handlers.go
- auction_handlers.go
- blockchain_converters.go
- blockchain_handlers.go
- converters.go
- decode_message.go
- dns_handlers.go
- emulation.go
- event_converters.go
- event_handlers.go
- extra_currency_handlers.go
- gasless_handlers.go
- handler.go
- interfaces.go
- jetton_converters.go
- jetton_handlers.go
- library_handler.go
- limits.go
- liteserver_converters.go
- liteserver_handlers.go
- metadata.go
- middlewares.go
- multisig_handlers.go
- nft_converters.go
- nft_handlers.go
- normalized_metadata.go
- openapi.go
- purchase_handlers.go
- rates_handlers.go
- server.go
- staking_converters.go
- staking_handlers.go
- storage_handlers.go
- tonconnect_handlers.go
- utils.go
- wallet_handlers.go