No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
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: 4.5.1
- Package version: 1.0.0
- Generator version: 7.15.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/contextPut the package under your project folder and add the following in import:
import alephium "github.com/alephium/go-sdk"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 alephium.ContextServerIndex of type int.
ctx := context.WithValue(context.Background(), alephium.ContextServerIndex, 1)Templated server URL is formatted using default variables from configuration or from context value alephium.ContextServerVariables of type map[string]string.
ctx := context.WithValue(context.Background(), alephium.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 alephium.ContextOperationServerIndices and alephium.ContextOperationServerVariables context maps.
ctx := context.WithValue(context.Background(), alephium.ContextOperationServerIndices, map[string]int{
"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), alephium.ContextOperationServerVariables, map[string]map[string]string{
"{classname}Service.{nickname}": {
"port": "8443",
},
})All URIs are relative to http://..
| Class | Method | HTTP request | Description |
|---|---|---|---|
| AddressesAPI | GetAddressesAddressBalance | Get /addresses/{address}/balance | Get the balance of an address |
| AddressesAPI | GetAddressesAddressGroup | Get /addresses/{address}/group | Get the group of an address |
| AddressesAPI | GetAddressesAddressUtxos | Get /addresses/{address}/utxos | Get the UTXOs of an address |
| BlockflowAPI | GetBlockflowBlocks | Get /blockflow/blocks | List blocks on the given time interval |
| BlockflowAPI | GetBlockflowBlocksBlockHash | Get /blockflow/blocks/{block_hash} | Get a block with hash |
| BlockflowAPI | GetBlockflowBlocksWithEvents | Get /blockflow/blocks-with-events | List blocks with events on the given time interval |
| BlockflowAPI | GetBlockflowBlocksWithEventsBlockHash | Get /blockflow/blocks-with-events/{block_hash} | Get a block and events with hash |
| BlockflowAPI | GetBlockflowChainInfo | Get /blockflow/chain-info | Get infos about the chain from the given groups |
| BlockflowAPI | GetBlockflowHashes | Get /blockflow/hashes | Get all block's hashes at given height for given groups |
| BlockflowAPI | GetBlockflowHeadersBlockHash | Get /blockflow/headers/{block_hash} | Get block header |
| BlockflowAPI | GetBlockflowIsBlockInMainChain | Get /blockflow/is-block-in-main-chain | Check if the block is in main chain |
| BlockflowAPI | GetBlockflowMainChainBlockByGhostUncleGhostUncleHash | Get /blockflow/main-chain-block-by-ghost-uncle/{ghost_uncle_hash} | Get a mainchain block by ghost uncle hash |
| BlockflowAPI | GetBlockflowRawBlocksBlockHash | Get /blockflow/raw-blocks/{block_hash} | Get raw block in hex format |
| BlockflowAPI | GetBlockflowRichBlocks | Get /blockflow/rich-blocks | Given a time interval, list blocks containing events and transactions with enriched input information when node indexes are enabled. |
| BlockflowAPI | GetBlockflowRichBlocksBlockHash | Get /blockflow/rich-blocks/{block_hash} | Get a block containing events and transactions with enriched input information when node indexes are enabled. |
| ContractsAPI | GetContractsAddressParent | Get /contracts/{address}/parent | Get parent contract address |
| ContractsAPI | GetContractsAddressState | Get /contracts/{address}/state | Get contract state |
| ContractsAPI | GetContractsAddressSubContracts | Get /contracts/{address}/sub-contracts | Get sub-contract addresses |
| ContractsAPI | GetContractsAddressSubContractsCurrentCount | Get /contracts/{address}/sub-contracts/current-count | Get current value of the sub-contracts counter for a contract |
| ContractsAPI | GetContractsCodehashCode | Get /contracts/{codeHash}/code | Get contract code by code hash |
| ContractsAPI | PostContractsCallContract | Post /contracts/call-contract | Call contract |
| ContractsAPI | PostContractsCallTxScript | Post /contracts/call-tx-script | Call TxScript |
| ContractsAPI | PostContractsCompileContract | Post /contracts/compile-contract | Compile a smart contract |
| ContractsAPI | PostContractsCompileProject | Post /contracts/compile-project | Compile a project |
| ContractsAPI | PostContractsCompileScript | Post /contracts/compile-script | Compile a script |
| ContractsAPI | PostContractsMulticallContract | Post /contracts/multicall-contract | Multiple call contract |
| ContractsAPI | PostContractsTestContract | Post /contracts/test-contract | Test contract |
| ContractsAPI | PostContractsUnsignedTxDeployContract | Post /contracts/unsigned-tx/deploy-contract | Build an unsigned contract |
| ContractsAPI | PostContractsUnsignedTxExecuteScript | Post /contracts/unsigned-tx/execute-script | Build an unsigned script |
| EventsAPI | GetEventsBlockHashBlockhash | Get /events/block-hash/{blockHash} | Get contract events for a block |
| EventsAPI | GetEventsContractContractaddress | Get /events/contract/{contractAddress} | Get events for a contract within a counter range |
| EventsAPI | GetEventsContractContractaddressCurrentCount | Get /events/contract/{contractAddress}/current-count | Get current value of the events counter for a contract |
| EventsAPI | GetEventsTxIdTxid | Get /events/tx-id/{txId} | Get contract events for a transaction |
| InfosAPI | GetInfosChainParams | Get /infos/chain-params | Get key params about your blockchain |
| InfosAPI | GetInfosCurrentDifficulty | Get /infos/current-difficulty | Get the average difficulty of the latest blocks from all shards |
| InfosAPI | GetInfosCurrentHashrate | Get /infos/current-hashrate | Get average hashrate from `now - timespan(millis)` to `now` |
| InfosAPI | GetInfosDiscoveredNeighbors | Get /infos/discovered-neighbors | Get discovered neighbors |
| InfosAPI | GetInfosHistoryHashrate | Get /infos/history-hashrate | Get history average hashrate on the given time interval |
| InfosAPI | GetInfosInterCliquePeerInfo | Get /infos/inter-clique-peer-info | Get infos about the inter cliques |
| InfosAPI | GetInfosMisbehaviors | Get /infos/misbehaviors | Get the misbehaviors of peers |
| InfosAPI | GetInfosNode | Get /infos/node | Get info about that node |
| InfosAPI | GetInfosSelfClique | Get /infos/self-clique | Get info about your own clique |
| InfosAPI | GetInfosUnreachable | Get /infos/unreachable | Get the unreachable brokers |
| InfosAPI | GetInfosVersion | Get /infos/version | Get version about that node |
| InfosAPI | PostInfosDiscovery | Post /infos/discovery | Set brokers to be unreachable/reachable |
| InfosAPI | PostInfosMisbehaviors | Post /infos/misbehaviors | Ban/Unban given peers |
| MempoolAPI | DeleteMempoolTransactions | Delete /mempool/transactions | Remove all transactions from mempool |
| MempoolAPI | GetMempoolTransactions | Get /mempool/transactions | List mempool transactions |
| MempoolAPI | PutMempoolTransactionsRebroadcast | Put /mempool/transactions/rebroadcast | Rebroadcase a mempool transaction to the network |
| MempoolAPI | PutMempoolTransactionsValidate | Put /mempool/transactions/validate | Validate all mempool transactions and remove invalid ones |
| MinersAPI | GetMinersAddresses | Get /miners/addresses | List miner's addresses |
| MinersAPI | GetWalletsWalletNameMinerAddresses | Get /wallets/{wallet_name}/miner-addresses | List all miner addresses per group |
| MinersAPI | PostMinersCpuMining | Post /miners/cpu-mining | Execute an action on CPU miner. !!! for test only !!! |
| MinersAPI | PostMinersCpuMiningMineOneBlock | Post /miners/cpu-mining/mine-one-block | Mine a block on CPU miner. !!! for test only !!! |
| MinersAPI | PostWalletsWalletNameDeriveNextMinerAddresses | Post /wallets/{wallet_name}/derive-next-miner-addresses | Derive your next miner addresses for each group |
| MinersAPI | PutMinersAddresses | Put /miners/addresses | Update miner's addresses, but better to use user.conf instead |
| MultiSignatureAPI | PostMultisigAddress | Post /multisig/address | Create the multisig address and unlock script |
| MultiSignatureAPI | PostMultisigBuild | Post /multisig/build | Build a multisig unsigned transaction |
| MultiSignatureAPI | PostMultisigSubmit | Post /multisig/submit | Submit a multi-signed transaction |
| MultiSignatureAPI | PostMultisigSweep | Post /multisig/sweep | Sweep all unlocked ALPH and token balances of a multisig address to another address |
| TransactionsAPI | GetTransactionsDetailsTxid | Get /transactions/details/{txId} | Get transaction details |
| TransactionsAPI | GetTransactionsRawTxid | Get /transactions/raw/{txId} | Get raw transaction in hex format |
| TransactionsAPI | GetTransactionsRichDetailsTxid | Get /transactions/rich-details/{txId} | Get transaction with enriched input information when node indexes are enabled. |
| TransactionsAPI | GetTransactionsStatus | Get /transactions/status | Get tx status |
| TransactionsAPI | GetTransactionsTxIdFromOutputref | Get /transactions/tx-id-from-outputref | Get transaction id from transaction output ref |
| TransactionsAPI | PostTransactionsBuild | Post /transactions/build | Build an unsigned transfer transaction to a number of recipients |
| TransactionsAPI | PostTransactionsBuildChained | Post /transactions/build-chained | Build a chain of transactions |
| TransactionsAPI | PostTransactionsBuildMultiAddresses | Post /transactions/build-multi-addresses | Build an unsigned transaction with multiple addresses to a number of recipients |
| TransactionsAPI | PostTransactionsBuildTransferFromOneToManyGroups | Post /transactions/build-transfer-from-one-to-many-groups | Build unsigned transfer transactions from an address of one group to addresses of many groups. Each target group requires a dedicated transaction or more in case large number of outputs needed to be split. |
| TransactionsAPI | PostTransactionsDecodeUnsignedTx | Post /transactions/decode-unsigned-tx | Decode an unsigned transaction |
| TransactionsAPI | PostTransactionsSubmit | Post /transactions/submit | Submit a signed transaction |
| TransactionsAPI | PostTransactionsSweepAddressBuild | Post /transactions/sweep-address/build | Build unsigned transactions to send all unlocked ALPH and token balances of one address to another address |
| UtilsAPI | PostUtilsTargetToHashrate | Post /utils/target-to-hashrate | Convert a target to hashrate |
| UtilsAPI | PostUtilsVerifySignature | Post /utils/verify-signature | Verify the SecP256K1 signature of some data |
| UtilsAPI | PutUtilsCheckHashIndexing | Put /utils/check-hash-indexing | Check and repair the indexing of block hashes |
| WalletsAPI | DeleteWalletsWalletName | Delete /wallets/{wallet_name} | Delete your wallet file (can be recovered with your mnemonic) |
| WalletsAPI | GetWallets | Get /wallets | List available wallets |
| WalletsAPI | GetWalletsWalletName | Get /wallets/{wallet_name} | Get wallet's status |
| WalletsAPI | GetWalletsWalletNameAddresses | Get /wallets/{wallet_name}/addresses | List all your wallet's addresses |
| WalletsAPI | GetWalletsWalletNameAddressesAddress | Get /wallets/{wallet_name}/addresses/{address} | Get address' info |
| WalletsAPI | GetWalletsWalletNameBalances | Get /wallets/{wallet_name}/balances | Get your total balance |
| WalletsAPI | PostWallets | Post /wallets | Create a new wallet |
| WalletsAPI | PostWalletsWalletNameChangeActiveAddress | Post /wallets/{wallet_name}/change-active-address | Choose the active address |
| WalletsAPI | PostWalletsWalletNameDeriveNextAddress | Post /wallets/{wallet_name}/derive-next-address | Derive your next address |
| WalletsAPI | PostWalletsWalletNameLock | Post /wallets/{wallet_name}/lock | Lock your wallet |
| WalletsAPI | PostWalletsWalletNameRevealMnemonic | Post /wallets/{wallet_name}/reveal-mnemonic | Reveal your mnemonic. !!! use it with caution !!! |
| WalletsAPI | PostWalletsWalletNameSign | Post /wallets/{wallet_name}/sign | Sign the given data and return back the signature |
| WalletsAPI | PostWalletsWalletNameSweepActiveAddress | Post /wallets/{wallet_name}/sweep-active-address | Transfer all unlocked ALPH from the active address to another address |
| WalletsAPI | PostWalletsWalletNameSweepAllAddresses | Post /wallets/{wallet_name}/sweep-all-addresses | Transfer unlocked ALPH from all addresses (including all mining addresses if applicable) to another address |
| WalletsAPI | PostWalletsWalletNameTransfer | Post /wallets/{wallet_name}/transfer | Transfer ALPH from the active address |
| WalletsAPI | PostWalletsWalletNameUnlock | Post /wallets/{wallet_name}/unlock | Unlock your wallet |
| WalletsAPI | PutWallets | Put /wallets | Restore a wallet from your mnemonic |
- AddressAssetState
- AddressBalance
- AddressInfo
- Addresses
- AssetInput
- AssetOutput
- AssetState
- BadRequest
- Balance
- Balances
- Ban
- Banned
- BlockAndEvents
- BlockEntry
- BlockHeaderEntry
- BlocksAndEventsPerTimeStampRange
- BlocksPerTimeStampRange
- BrokerInfo
- BrokerInfoAddress
- BuildChainedDeployContractTx
- BuildChainedDeployContractTxResult
- BuildChainedExecuteScriptTx
- BuildChainedExecuteScriptTxResult
- BuildChainedTransferTx
- BuildChainedTransferTxResult
- BuildChainedTx
- BuildChainedTxResult
- BuildDeployContractTx
- BuildDeployContractTxResult
- BuildExecuteScriptTx
- BuildExecuteScriptTxResult
- BuildGrouplessDeployContractTxResult
- BuildGrouplessExecuteScriptTxResult
- BuildGrouplessTransferTxResult
- BuildInfo
- BuildMultiAddressesTransaction
- BuildMultisig
- BuildMultisigAddress
- BuildMultisigAddressResult
- BuildSimpleDeployContractTxResult
- BuildSimpleExecuteScriptTxResult
- BuildSimpleTransferTxResult
- BuildSweepAddressTransactions
- BuildSweepAddressTransactionsResult
- BuildSweepMultisig
- BuildTransferTx
- BuildTransferTxResult
- CallContract
- CallContractFailed
- CallContractResult
- CallContractSucceeded
- CallTxScript
- CallTxScriptResult
- ChainInfo
- ChainParams
- ChangeActiveAddress
- CompileContractResult
- CompileProjectResult
- CompileScriptResult
- CompilerOptions
- Confirmed
- Conflicted
- Constant
- Contract
- ContractEvent
- ContractEventByBlockHash
- ContractEventByTxId
- ContractEvents
- ContractEventsByBlockHash
- ContractEventsByTxId
- ContractOutput
- ContractState
- CurrentDifficulty
- DebugMessage
- DecodeUnsignedTx
- DecodeUnsignedTxResult
- Destination
- DiscoveryAction
- Enum
- EnumField
- EventSig
- FieldsSig
- FixedAssetOutput
- FunctionSig
- GatewayTimeout
- GhostUncleBlockEntry
- Group
- HashRateResponse
- HashesAtHeight
- InterCliquePeerInfo
- InternalServerError
- MapsSig
- MemPooled
- MempoolTransactions
- MinerAddresses
- MinerAddressesInfo
- MisbehaviorAction
- MultipleCallContract
- MultipleCallContractResult
- NodeInfo
- NodeVersion
- NotFound
- Output
- OutputRef
- PeerAddress
- PeerMisbehavior
- PeerStatus
- Penalty
- Project
- RawBlock
- RawTransaction
- Reachable
- Result
- RevealMnemonic
- RevealMnemonicResult
- RichAssetInput
- RichBlockAndEvents
- RichBlockEntry
- RichBlocksAndEventsPerTimeStampRange
- RichContractInput
- RichTransaction
- RichUnsignedTx
- Script
- SelfClique
- ServiceUnavailable
- Sign
- SignResult
- SimulationResult
- Source
- StructSig
- SubContracts
- SubmitMultisig
- SubmitTransaction
- SubmitTxResult
- Sweep
- SweepAddressTransaction
- TargetToHashrate
- TestContract
- TestContractResult
- TestInputAsset
- Token
- Transaction
- TransactionTemplate
- Transfer
- TransferResult
- TransferResults
- TxNotFound
- TxStatus
- UTXO
- UTXOs
- Unauthorized
- Unban
- Unreachable
- UnsignedTx
- Val
- ValAddress
- ValArray
- ValBool
- ValByteVec
- ValI256
- ValU256
- VerifySignature
- WalletCreation
- WalletCreationResult
- WalletRestore
- WalletRestoreResult
- WalletStatus
- WalletUnlock
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:
PtrBoolPtrIntPtrInt32PtrInt64PtrFloatPtrFloat32PtrFloat64PtrStringPtrTime