Provide access to indexed TON blockchain
This API client was generated by the OpenAPI Generator project. By using the OpenAPI-spec from a remote server, you can easily generate an API client.
- API version: 2.0.0
- Package version: 1.0.0
- Generator version: 7.7.0
- Build package: org.openapitools.codegen.languages.GoClientCodegen
Install the following dependencies:
go get github.com/stretchr/testify/assert
go get golang.org/x/net/context
Put the package under your project folder and add the following in import:
import tonapi "github.com/GIT_USER_ID/GIT_REPO_ID/tonapi"
To use a proxy, set the environment variable HTTP_PROXY
:
os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")
Default configuration comes with Servers
field that contains server objects as defined in the OpenAPI specification.
For using other server than the one defined on index 0 set context value tonapi.ContextServerIndex
of type int
.
ctx := context.WithValue(context.Background(), tonapi.ContextServerIndex, 1)
Templated server URL is formatted using default variables from configuration or from context value tonapi.ContextServerVariables
of type map[string]string
.
ctx := context.WithValue(context.Background(), tonapi.ContextServerVariables, map[string]string{
"basePath": "v2",
})
Note, enum values are always validated and all unused variables are silently ignored.
Each operation can use different server URL defined using OperationServers
map in the Configuration
.
An operation is uniquely identified by "{classname}Service.{nickname}"
string.
Similar rules for overriding default operation server index and variables applies by using tonapi.ContextOperationServerIndices
and tonapi.ContextOperationServerVariables
context maps.
ctx := context.WithValue(context.Background(), tonapi.ContextOperationServerIndices, map[string]int{
"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), tonapi.ContextOperationServerVariables, map[string]map[string]string{
"{classname}Service.{nickname}": {
"port": "8443",
},
})
All URIs are relative to https://tonapi.io
Class | Method | HTTP request | Description |
---|---|---|---|
AccountsAPI | AccountDnsBackResolve | Get /v2/accounts/{account_id}/dns/backresolve | |
AccountsAPI | AddressParse | Get /v2/address/{account_id}/parse | |
AccountsAPI | GetAccount | Get /v2/accounts/{account_id} | |
AccountsAPI | GetAccountDiff | Get /v2/accounts/{account_id}/diff | |
AccountsAPI | GetAccountDnsExpiring | Get /v2/accounts/{account_id}/dns/expiring | |
AccountsAPI | GetAccountEvent | Get /v2/accounts/{account_id}/events/{event_id} | |
AccountsAPI | GetAccountEvents | Get /v2/accounts/{account_id}/events | |
AccountsAPI | GetAccountJettonBalance | Get /v2/accounts/{account_id}/jettons/{jetton_id} | |
AccountsAPI | GetAccountJettonHistoryByID | Get /v2/accounts/{account_id}/jettons/{jetton_id}/history | |
AccountsAPI | GetAccountJettonsBalances | Get /v2/accounts/{account_id}/jettons | |
AccountsAPI | GetAccountJettonsHistory | Get /v2/accounts/{account_id}/jettons/history | |
AccountsAPI | GetAccountMultisigs | Get /v2/accounts/{account_id}/multisigs | |
AccountsAPI | GetAccountNftItems | Get /v2/accounts/{account_id}/nfts | |
AccountsAPI | GetAccountPublicKey | Get /v2/accounts/{account_id}/publickey | |
AccountsAPI | GetAccountSubscriptions | Get /v2/accounts/{account_id}/subscriptions | |
AccountsAPI | GetAccountTraces | Get /v2/accounts/{account_id}/traces | |
AccountsAPI | GetAccounts | Post /v2/accounts/_bulk | |
AccountsAPI | ReindexAccount | Post /v2/accounts/{account_id}/reindex | |
AccountsAPI | SearchAccounts | Get /v2/accounts/search | |
BlockchainAPI | BlockchainAccountInspect | Get /v2/blockchain/accounts/{account_id}/inspect | |
BlockchainAPI | ExecGetMethodForBlockchainAccount | Get /v2/blockchain/accounts/{account_id}/methods/{method_name} | |
BlockchainAPI | GetBlockchainAccountTransactions | Get /v2/blockchain/accounts/{account_id}/transactions | |
BlockchainAPI | GetBlockchainBlock | Get /v2/blockchain/blocks/{block_id} | |
BlockchainAPI | GetBlockchainBlockTransactions | Get /v2/blockchain/blocks/{block_id}/transactions | |
BlockchainAPI | GetBlockchainConfig | Get /v2/blockchain/config | |
BlockchainAPI | GetBlockchainConfigFromBlock | Get /v2/blockchain/masterchain/{masterchain_seqno}/config | |
BlockchainAPI | GetBlockchainMasterchainBlocks | Get /v2/blockchain/masterchain/{masterchain_seqno}/blocks | |
BlockchainAPI | GetBlockchainMasterchainHead | Get /v2/blockchain/masterchain-head | |
BlockchainAPI | GetBlockchainMasterchainShards | Get /v2/blockchain/masterchain/{masterchain_seqno}/shards | |
BlockchainAPI | GetBlockchainMasterchainTransactions | Get /v2/blockchain/masterchain/{masterchain_seqno}/transactions | |
BlockchainAPI | GetBlockchainRawAccount | Get /v2/blockchain/accounts/{account_id} | |
BlockchainAPI | GetBlockchainTransaction | Get /v2/blockchain/transactions/{transaction_id} | |
BlockchainAPI | GetBlockchainTransactionByMessageHash | Get /v2/blockchain/messages/{msg_id}/transaction | |
BlockchainAPI | GetBlockchainValidators | Get /v2/blockchain/validators | |
BlockchainAPI | GetRawBlockchainConfig | Get /v2/blockchain/config/raw | |
BlockchainAPI | GetRawBlockchainConfigFromBlock | Get /v2/blockchain/masterchain/{masterchain_seqno}/config/raw | |
BlockchainAPI | GetReducedBlockchainBlocks | Get /v2/blockchain/reduced/blocks | |
BlockchainAPI | SendBlockchainMessage | Post /v2/blockchain/message | |
BlockchainAPI | Status | Get /v2/status | |
ConnectAPI | GetAccountInfoByStateInit | Post /v2/tonconnect/stateinit | |
ConnectAPI | GetTonConnectPayload | Get /v2/tonconnect/payload | |
DNSAPI | DnsResolve | Get /v2/dns/{domain_name}/resolve | |
DNSAPI | GetAllAuctions | Get /v2/dns/auctions | |
DNSAPI | GetDnsInfo | Get /v2/dns/{domain_name} | |
DNSAPI | GetDomainBids | Get /v2/dns/{domain_name}/bids | |
EmulationAPI | DecodeMessage | Post /v2/message/decode | |
EmulationAPI | EmulateMessageToAccountEvent | Post /v2/accounts/{account_id}/events/emulate | |
EmulationAPI | EmulateMessageToEvent | Post /v2/events/emulate | |
EmulationAPI | EmulateMessageToTrace | Post /v2/traces/emulate | |
EmulationAPI | EmulateMessageToWallet | Post /v2/wallet/emulate | |
EventsAPI | GetEvent | Get /v2/events/{event_id} | |
GaslessAPI | GaslessConfig | Get /v2/gasless/config | |
GaslessAPI | GaslessEstimate | Post /v2/gasless/estimate/{master_id} | |
GaslessAPI | GaslessSend | Post /v2/gasless/send | |
InscriptionsAPI | GetAccountInscriptions | Get /v2/experimental/accounts/{account_id}/inscriptions | |
InscriptionsAPI | GetAccountInscriptionsHistory | Get /v2/experimental/accounts/{account_id}/inscriptions/history | |
InscriptionsAPI | GetAccountInscriptionsHistoryByTicker | Get /v2/experimental/accounts/{account_id}/inscriptions/{ticker}/history | |
InscriptionsAPI | GetInscriptionOpTemplate | Get /v2/experimental/inscriptions/op-template | |
JettonsAPI | GetJettonHolders | Get /v2/jettons/{account_id}/holders | |
JettonsAPI | GetJettonInfo | Get /v2/jettons/{account_id} | |
JettonsAPI | GetJettons | Get /v2/jettons | |
JettonsAPI | GetJettonsEvents | Get /v2/events/{event_id}/jettons | |
LiteServerAPI | GetAllRawShardsInfo | Get /v2/liteserver/get_all_shards_info/{block_id} | |
LiteServerAPI | GetOutMsgQueueSizes | Get /v2/liteserver/get_out_msg_queue_sizes | |
LiteServerAPI | GetRawAccountState | Get /v2/liteserver/get_account_state/{account_id} | |
LiteServerAPI | GetRawBlockProof | Get /v2/liteserver/get_block_proof | |
LiteServerAPI | GetRawBlockchainBlock | Get /v2/liteserver/get_block/{block_id} | |
LiteServerAPI | GetRawBlockchainBlockHeader | Get /v2/liteserver/get_block_header/{block_id} | |
LiteServerAPI | GetRawBlockchainBlockState | Get /v2/liteserver/get_state/{block_id} | |
LiteServerAPI | GetRawConfig | Get /v2/liteserver/get_config_all/{block_id} | |
LiteServerAPI | GetRawListBlockTransactions | Get /v2/liteserver/list_block_transactions/{block_id} | |
LiteServerAPI | GetRawMasterchainInfo | Get /v2/liteserver/get_masterchain_info | |
LiteServerAPI | GetRawMasterchainInfoExt | Get /v2/liteserver/get_masterchain_info_ext | |
LiteServerAPI | GetRawShardBlockProof | Get /v2/liteserver/get_shard_block_proof/{block_id} | |
LiteServerAPI | GetRawShardInfo | Get /v2/liteserver/get_shard_info/{block_id} | |
LiteServerAPI | GetRawTime | Get /v2/liteserver/get_time | |
LiteServerAPI | GetRawTransactions | Get /v2/liteserver/get_transactions/{account_id} | |
LiteServerAPI | SendRawMessage | Post /v2/liteserver/send_message | |
MultisigAPI | GetMultisigAccount | Get /v2/multisig/{account_id} | |
NFTAPI | GetAccountNftHistory | Get /v2/accounts/{account_id}/nfts/history | |
NFTAPI | GetItemsFromCollection | Get /v2/nfts/collections/{account_id}/items | |
NFTAPI | GetNftCollection | Get /v2/nfts/collections/{account_id} | |
NFTAPI | GetNftCollections | Get /v2/nfts/collections | |
NFTAPI | GetNftHistoryByID | Get /v2/nfts/{account_id}/history | |
NFTAPI | GetNftItemByAddress | Get /v2/nfts/{account_id} | |
NFTAPI | GetNftItemsByAddresses | Post /v2/nfts/_bulk | |
RatesAPI | GetChartRates | Get /v2/rates/chart | |
RatesAPI | GetMarketsRates | Get /v2/rates/markets | |
RatesAPI | GetRates | Get /v2/rates | |
StakingAPI | GetAccountNominatorsPools | Get /v2/staking/nominator/{account_id}/pools | |
StakingAPI | GetStakingPoolHistory | Get /v2/staking/pool/{account_id}/history | |
StakingAPI | GetStakingPoolInfo | Get /v2/staking/pool/{account_id} | |
StakingAPI | GetStakingPools | Get /v2/staking/pools | |
StorageAPI | GetStorageProviders | Get /v2/storage/providers | |
TracesAPI | GetTrace | Get /v2/traces/{trace_id} | |
WalletAPI | GetAccountSeqno | Get /v2/wallet/{account_id}/seqno | |
WalletAPI | GetWalletBackup | Get /v2/wallet/backup | |
WalletAPI | GetWalletsByPublicKey | Get /v2/pubkeys/{public_key}/wallets | |
WalletAPI | SetWalletBackup | Put /v2/wallet/backup | |
WalletAPI | TonConnectProof | Post /v2/wallet/auth/proof |
- AccStatusChange
- Account
- AccountAddress
- AccountEvent
- AccountEvents
- AccountInfoByStateInit
- AccountStaking
- AccountStakingInfo
- AccountStatus
- AccountStorageInfo
- Accounts
- Action
- ActionPhase
- ActionSimplePreview
- AddressParse200Response
- AddressParse200ResponseBounceable
- ApyHistory
- Auction
- AuctionBidAction
- Auctions
- BlockCurrencyCollection
- BlockCurrencyCollectionOtherInner
- BlockLimits
- BlockParamLimits
- BlockRaw
- BlockValueFlow
- BlockchainAccountInspect
- BlockchainAccountInspectMethodsInner
- BlockchainBlock
- BlockchainBlockShards
- BlockchainBlockShardsShardsInner
- BlockchainBlocks
- BlockchainConfig
- BlockchainConfig10
- BlockchainConfig11
- BlockchainConfig12
- BlockchainConfig13
- BlockchainConfig14
- BlockchainConfig15
- BlockchainConfig16
- BlockchainConfig17
- BlockchainConfig18
- BlockchainConfig18StoragePricesInner
- BlockchainConfig20
- BlockchainConfig21
- BlockchainConfig22
- BlockchainConfig23
- BlockchainConfig24
- BlockchainConfig25
- BlockchainConfig28
- BlockchainConfig29
- BlockchainConfig31
- BlockchainConfig40
- BlockchainConfig43
- BlockchainConfig44
- BlockchainConfig5
- BlockchainConfig6
- BlockchainConfig7
- BlockchainConfig71
- BlockchainConfig79
- BlockchainConfig7CurrenciesInner
- BlockchainConfig8
- BlockchainConfig9
- BlockchainRawAccount
- BlockchainRawAccountLibrariesInner
- BouncePhaseType
- ComputePhase
- ComputeSkipReason
- ConfigProposalSetup
- ContractDeployAction
- CreditPhase
- DecodeMessageRequest
- DecodedMessage
- DecodedMessageExtInMsgDecoded
- DecodedMessageExtInMsgDecodedWalletHighloadV2
- DecodedMessageExtInMsgDecodedWalletV3
- DecodedMessageExtInMsgDecodedWalletV4
- DecodedRawMessage
- DecodedRawMessageMessage
- DepositStakeAction
- DnsExpiring
- DnsExpiringItemsInner
- DnsRecord
- DomainBid
- DomainBids
- DomainInfo
- DomainNames
- DomainRenewAction
- ElectionsDepositStakeAction
- ElectionsRecoverStakeAction
- EmulateMessageToWalletRequest
- EmulateMessageToWalletRequestParamsInner
- EncryptedComment
- Error
- Event
- FoundAccounts
- FoundAccountsAddressesInner
- GasLimitPrices
- GaslessConfig
- GaslessConfigGasJettonsInner
- GaslessEstimateRequest
- GaslessEstimateRequestMessagesInner
- GaslessSendRequest
- GetAccountDiff200Response
- GetAccountInfoByStateInitRequest
- GetAccountPublicKey200Response
- GetAccountsRequest
- GetAllRawShardsInfo200Response
- GetChartRates200Response
- GetInscriptionOpTemplate200Response
- GetMarketsRates200Response
- GetOutMsgQueueSizes200Response
- GetOutMsgQueueSizes200ResponseShardsInner
- GetRates200Response
- GetRawAccountState200Response
- GetRawBlockProof200Response
- GetRawBlockProof200ResponseStepsInner
- GetRawBlockProof200ResponseStepsInnerLiteServerBlockLinkBack
- GetRawBlockProof200ResponseStepsInnerLiteServerBlockLinkForward
- GetRawBlockProof200ResponseStepsInnerLiteServerBlockLinkForwardSignatures
- GetRawBlockProof200ResponseStepsInnerLiteServerBlockLinkForwardSignaturesSignaturesInner
- GetRawBlockchainBlock200Response
- GetRawBlockchainBlockHeader200Response
- GetRawBlockchainBlockState200Response
- GetRawConfig200Response
- GetRawListBlockTransactions200Response
- GetRawListBlockTransactions200ResponseIdsInner
- GetRawMasterchainInfo200Response
- GetRawMasterchainInfoExt200Response
- GetRawShardBlockProof200Response
- GetRawShardBlockProof200ResponseLinksInner
- GetRawShardInfo200Response
- GetRawTime200Response
- GetRawTransactions200Response
- GetStakingPoolHistory200Response
- GetStakingPoolInfo200Response
- GetStakingPools200Response
- GetStorageProviders200Response
- GetTonConnectPayload200Response
- GetWalletBackup200Response
- ImagePreview
- InitStateRaw
- InscriptionBalance
- InscriptionBalances
- InscriptionMintAction
- InscriptionTransferAction
- JettonBalance
- JettonBalanceLock
- JettonBridgeParams
- JettonBridgePrices
- JettonBurnAction
- JettonHolders
- JettonHoldersAddressesInner
- JettonInfo
- JettonMetadata
- JettonMintAction
- JettonPreview
- JettonQuantity
- JettonSwapAction
- JettonTransferAction
- JettonVerificationType
- Jettons
- JettonsBalances
- MarketTonRates
- Message
- MessageConsequences
- MethodExecutionResult
- MisbehaviourPunishmentConfig
- MsgForwardPrices
- Multisig
- MultisigOrder
- Multisigs
- NftCollection
- NftCollections
- NftItem
- NftItemCollection
- NftItemTransferAction
- NftItems
- NftPurchaseAction
- Oracle
- OracleBridgeParams
- PoolImplementation
- PoolImplementationType
- PoolInfo
- Price
- RawBlockchainConfig
- ReducedBlock
- ReducedBlocks
- Refund
- Risk
- Sale
- SendBlockchainMessageRequest
- SendRawMessage200Response
- SendRawMessageRequest
- Seqno
- ServiceStatus
- SignRawMessage
- SignRawParams
- SizeLimitsConfig
- SmartContractAction
- StateInit
- StatusDefaultResponse
- StoragePhase
- StorageProvider
- Subscription
- SubscriptionAction
- Subscriptions
- TokenRates
- TonConnectProof200Response
- TonConnectProofRequest
- TonConnectProofRequestProof
- TonConnectProofRequestProofDomain
- TonTransferAction
- Trace
- TraceID
- TraceIDs
- Transaction
- TransactionType
- Transactions
- TrustType
- TvmStackRecord
- UnSubscriptionAction
- Validator
- Validators
- ValidatorsSet
- ValidatorsSetListInner
- ValueFlow
- ValueFlowJettonsInner
- WalletDNS
- WithdrawStakeAction
- WithdrawStakeRequestAction
- WorkchainDescr
Endpoints do not require authorization.
Due to the fact that model structure members are all pointers, this package contains a number of utility functions to easily obtain pointers to values of basic types. Each of these functions takes a value of the given basic type and returns a pointer to it:
PtrBool
PtrInt
PtrInt32
PtrInt64
PtrFloat
PtrFloat32
PtrFloat64
PtrString
PtrTime