Versions in this module Expand all Collapse all v2 v2.8.3 Jul 3, 2025 Changes in this version + const LongLivedConnection + const RegularConnection + const UnknownJettonName + var ErrRateLimit = errors.New("rate limit") + var NoneAccount = oas.AccountAddress + var SupportedWallets = map[tongoWallet.Version]abi.ContractInterface + func EmulatedTreeToTrace(ctx context.Context, executor executor, resolver core.LibraryResolver, ...) (*core.Trace, error) + func GetPackageVersionInt(packagePath string) (int, error) + func Scale(amount tlb.VarUInteger16, decimals int) decimal.Decimal + func ScaleJettons(amount big.Int, decimals int) decimal.Decimal + type AsyncHandler func(w http.ResponseWriter, r *http.Request, connectionType int, ...) error + type AsyncMiddleware func(AsyncHandler) AsyncHandler + type ErrorWithExtendedCode struct + Code int + ExtendedCode references.ExtendedCode + Message string + func (e ErrorWithExtendedCode) Error() string + type Gasless interface + Config func(ctx context.Context) (gasless.Config, error) + Estimate func(ctx context.Context, params gasless.EstimationParams) (gasless.SignRawParams, error) + Send func(ctx context.Context, walletPublicKey ed25519.PublicKey, payload []byte) (*gasless.TxSendingResults, error) + type Handler struct + func NewHandler(logger *zap.Logger, opts ...Option) (*Handler, error) + 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) 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 struct + BulkLimits int + type NormalizedMetadata struct + CustomPayloadApiUri string + Decimals int + Description string + Image string + Name string + PreviewImage string + Social []string + Symbol string + Verification core.TrustType + Websites []string + func NormalizeMetadata(addr ton.AccountID, meta tep64.Metadata, info *addressbook.KnownJetton, ...) NormalizedMetadata + type Option func(o *Options) + 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 struct + type Server struct + func NewServer(log *zap.Logger, handler *Handler, opts ...ServerOption) (*Server, error) + func (s *Server) RegisterAsyncHandler(pattern string, handler AsyncHandler, connectionType int, ...) + func (s *Server) Run(address string, unixSockets []string) + type ServerOption func(options *ServerOptions) + 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 struct + type SpamFilter interface + AccountTrust func(address tongo.AccountID) core.TrustType + GetEventsScamData func(ctx context.Context, ids []string) (map[string]bool, error) + GetNftsScamData func(ctx context.Context, addresses []ton.AccountID) (map[ton.AccountID]core.TrustType, error) + IsScamEvent func(actions []oas.Action, viewer *ton.AccountID, initiator ton.AccountID) bool + JettonTrust func(address tongo.AccountID, symbol, name, image string) core.TrustType + NftTrust func(address tongo.AccountID, collection *ton.AccountID, description, image string) core.TrustType Other modules containing this package github.com/tonkeeper/opentonapi