# README
Go API client for api
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
Overview
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: 3.0
- Package version: 1.0.0-beta.1
- Build package: org.openapitools.codegen.languages.GoClientCodegen
Installation
Install the following dependencies:
go get github.com/stretchr/testify/assert
go get golang.org/x/oauth2
go get golang.org/x/net/context
Put the package under your project folder and add the following in import:
import api "github.com/immutable/imx-core-sdk-golang/imx/api"
To use a proxy, set the environment variable HTTP_PROXY
:
os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")
Configuration of Server URL
Default configuration comes with Servers
field that contains server objects as defined in the OpenAPI specification.
Select Server Configuration
For using other server than the one defined on index 0 set context value sw.ContextServerIndex
of type int
.
ctx := context.WithValue(context.Background(), api.ContextServerIndex, 1)
Templated Server URL
Templated server URL is formatted using default variables from configuration or from context value sw.ContextServerVariables
of type map[string]string
.
ctx := context.WithValue(context.Background(), api.ContextServerVariables, map[string]string{
"basePath": "v2",
})
Note, enum values are always validated and all unused variables are silently ignored.
URLs Configuration per Operation
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 sw.ContextOperationServerIndices
and sw.ContextOperationServerVariables
context maps.
ctx := context.WithValue(context.Background(), api.ContextOperationServerIndices, map[string]int{
"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), api.ContextOperationServerVariables, map[string]map[string]string{
"{classname}Service.{nickname}": {
"port": "8443",
},
})
Documentation for API Endpoints
All URIs are relative to https://api.sandbox.x.immutable.com
Class | Method | HTTP request | Description |
---|---|---|---|
AssetsApi | GetAsset | Get /v1/assets/{token_address}/{token_id} | Get details of an asset |
AssetsApi | ListAssets | Get /v1/assets | Get a list of assets |
BalancesApi | GetBalance | Get /v2/balances/{owner}/{address} | Fetches the token balances of the user |
BalancesApi | ListBalances | Get /v2/balances/{owner} | Get a list of balances for given user |
CollectionsApi | CreateCollection | Post /v1/collections | Create collection |
CollectionsApi | GetCollection | Get /v1/collections/{address} | Get details of a collection at the given address |
CollectionsApi | ListCollectionFilters | Get /v1/collections/{address}/filters | Get a list of collection filters |
CollectionsApi | ListCollections | Get /v1/collections | Get a list of collections |
CollectionsApi | UpdateCollection | Patch /v1/collections/{address} | Update collection |
DepositsApi | GetDeposit | Get /v1/deposits/{id} | Get details of a deposit with the given ID |
DepositsApi | GetSignableDeposit | Post /v1/signable-deposit-details | Gets details of a signable deposit |
DepositsApi | ListDeposits | Get /v1/deposits | Get a list of deposits |
EncodingApi | EncodeAsset | Post /v1/encode/{assetType} | Retrieves the Starkex Encoded format for a given asset |
ExchangesApi | CreateExchange | Post /v3/exchanges | Create an exchange with URL |
ExchangesApi | CreateExchangeTransfer | Post /v2/exchanges/{id}/transfers | Accepts a transfer request and updates the transfer_status after processing transfer (offramp) |
ExchangesApi | GetExchange | Get /v3/exchanges/{id} | Get an exchange by ID |
ExchangesApi | GetExchangeSignableTransfer | Post /v2/exchanges/{id}/signable-transfer-details | Send a request for signable-transfer-details (offramp) |
ExchangesApi | GetExchanges | Get /v3/exchanges | Returns a list of exchanges based on the request |
MetadataApi | AddMetadataSchemaToCollection | Post /v1/collections/{address}/metadata-schema | Add metadata schema to collection |
MetadataApi | GetMetadataSchema | Get /v1/collections/{address}/metadata-schema | Get collection metadata schema |
MetadataApi | UpdateMetadataSchemaByName | Patch /v1/collections/{address}/metadata-schema/{name} | Update metadata schema by name |
MetadataRefreshesApi | GetAListOfMetadataRefreshes | Get /v1/metadata-refreshes | |
MetadataRefreshesApi | GetMetadataRefreshErrors | Get /v1/metadata-refreshes/{refresh_id}/errors | |
MetadataRefreshesApi | GetMetadataRefreshResults | Get /v1/metadata-refreshes/{refresh_id} | |
MetadataRefreshesApi | RequestAMetadataRefresh | Post /v1/metadata-refreshes | |
MintsApi | GetMint | Get /v1/mints/{id} | Get details of a mint with the given ID |
MintsApi | GetMintableTokenDetailsByClientTokenId | Get /v1/mintable-token/{token_address}/{token_id} | Get details of a mintable token with the given token address and token ID |
MintsApi | ListMints | Get /v1/mints | Get a list of mints |
MintsApi | MintTokens | Post /v2/mints | Mint Tokens V2 |
NftCheckoutPrimaryApi | CreateNftPrimary | Post /v2/nft/primary | Create NFT primary sale transaction |
NftCheckoutPrimaryApi | GetCurrenciesNFTCheckoutPrimary | Get /v2/nft/primary/currencies | Get currencies with limits |
NftCheckoutPrimaryApi | GetNftPrimaryTransaction | Get /v2/nft/primary/{transaction_id} | Get NFT primary sale transaction by id |
NftCheckoutPrimaryApi | GetNftPrimaryTransactions | Get /v2/nft/primary | Get a list of NFT primary sales transactions |
NftCheckoutPrimaryApi | RegisterNftPrimarySalesContract | Post /v2/nft/primary/register | Executes NFT primary sales contract registration |
OrdersApi | CancelOrder | Delete /v1/orders/{id} | Cancel an order |
OrdersApi | CreateOrder | Post /v1/orders | Create an order |
OrdersApi | GetOrder | Get /v1/orders/{id} | Get details of an order with the given ID |
OrdersApi | GetSignableCancelOrder | Post /v1/signable-cancel-order-details | Get details a signable cancel order |
OrdersApi | GetSignableOrder | Post /v3/signable-order-details | Get a signable order request (V3) |
OrdersApi | ListOrders | Get /v1/orders | Get a list of orders |
ProjectsApi | CreateProject | Post /v1/projects | Create a project |
ProjectsApi | GetProject | Get /v1/projects/{id} | Get a project |
ProjectsApi | GetProjects | Get /v1/projects | Get projects |
TokensApi | GetToken | Get /v1/tokens/{address} | Get details of a token |
TokensApi | ListTokens | Get /v1/tokens | Get a list of tokens |
TradesApi | CreateTrade | Post /v1/trades | Create a Trade between two parties |
TradesApi | GetSignableTrade | Post /v3/signable-trade-details | Get details a signable trade V3 |
TradesApi | GetTrade | Get /v1/trades/{id} | Get details of a trade with the given ID |
TradesApi | ListTrades | Get /v1/trades | Get a list of trades |
TransfersApi | CreateTransfer | Post /v2/transfers | Creates a transfer of multiple tokens between two parties |
TransfersApi | CreateTransferV1 | Post /v1/transfers | Creates a transfer of tokens between two parties |
TransfersApi | GetSignableTransfer | Post /v2/signable-transfer-details | Gets bulk details of a signable transfer |
TransfersApi | GetSignableTransferV1 | Post /v1/signable-transfer-details | Gets details of a signable transfer |
TransfersApi | GetTransfer | Get /v1/transfers/{id} | Get details of a transfer with the given ID |
TransfersApi | ListTransfers | Get /v1/transfers | Get a list of transfers |
UsersApi | GetSignableRegistration | Post /v1/signable-registration | Get operator signature to allow clients to register the user |
UsersApi | GetSignableRegistrationOffchain | Post /v1/signable-registration-offchain | Get encoded details to allow clients to register the user offchain |
UsersApi | GetUsers | Get /v1/users/{user} | Get stark keys for a registered user |
UsersApi | RegisterUser | Post /v1/users | Registers a user |
WithdrawalsApi | CreateWithdrawal | Post /v1/withdrawals | Creates a withdrawal of a token |
WithdrawalsApi | GetSignableWithdrawal | Post /v1/signable-withdrawal-details | Gets details of a signable withdrawal |
WithdrawalsApi | GetWithdrawal | Get /v1/withdrawals/{id} | Gets details of withdrawal with the given ID |
WithdrawalsApi | ListWithdrawals | Get /v1/withdrawals | Get a list of withdrawals |
Documentation For Models
- APIError
- AddMetadataSchemaToCollectionRequest
- AggregateLimit
- Asset
- AssetProperties
- AssetWithOrders
- Balance
- CancelOrderRequest
- CancelOrderResponse
- Collection
- CollectionDetails
- CollectionFilter
- ContractCreateAPIRequest
- ContractCreateResponse
- CreateCollectionRequest
- CreateExchangeAndURLAPIRequest
- CreateMetadataRefreshRequest
- CreateMetadataRefreshResponse
- CreateOrderRequest
- CreateOrderResponse
- CreateProjectRequest
- CreateProjectResponse
- CreateTradeRequestV1
- CreateTradeResponse
- CreateTransferRequest
- CreateTransferRequestV1
- CreateTransferResponse
- CreateTransferResponseV1
- CreateWithdrawalRequest
- CreateWithdrawalResponse
- CurrencyWithLimits
- Deposit
- EncodeAssetRequest
- EncodeAssetRequestToken
- EncodeAssetResponse
- EncodeAssetTokenData
- Exchange
- ExchangeCreateExchangeAndURLResponse
- Fee
- FeeData
- FeeEntry
- FeeInfo
- FeeToken
- GetMetadataRefreshErrorsResponse
- GetMetadataRefreshResponse
- GetMetadataRefreshes
- GetProjectsResponse
- GetSignableCancelOrderRequest
- GetSignableCancelOrderResponse
- GetSignableDepositRequest
- GetSignableDepositResponse
- GetSignableOrderRequest
- GetSignableOrderResponse
- GetSignableRegistrationOffchainResponse
- GetSignableRegistrationRequest
- GetSignableRegistrationResponse
- GetSignableTradeRequest
- GetSignableTradeResponse
- GetSignableTransferRequest
- GetSignableTransferRequestV1
- GetSignableTransferResponse
- GetSignableTransferResponseV1
- GetSignableWithdrawalRequest
- GetSignableWithdrawalResponse
- GetTransactionsResponse
- GetUsersApiResponse
- LambdasAPIError
- ListAssetsResponse
- ListBalancesResponse
- ListCollectionsResponse
- ListDepositsResponse
- ListMintsResponse
- ListOrdersResponse
- ListTokensResponse
- ListTradesResponse
- ListTransfersResponse
- ListWithdrawalsResponse
- MetadataRefreshErrors
- MetadataRefreshExcludingSummary
- MetadataRefreshSummary
- MetadataSchemaProperty
- MetadataSchemaRequest
- Mint
- MintFee
- MintRequest
- MintResultDetails
- MintTokenDataV2
- MintTokensResponse
- MintUser
- MintableTokenDetails
- NftprimarytransactionCreateAPIRequest
- NftprimarytransactionCreateResponse
- NftprimarytransactionGetResponse
- NftprimarytransactionListTransactionsResponse
- NftprimarytransactionTransactionData
- NftprimarytransactionWidgetParams
- OptionalExchangeData
- Order
- OrderDetails
- OrderFeeInfo
- Project
- Range
- RegisterUserRequest
- RegisterUserResponse
- SignableToken
- SignableTransferDetails
- SignableTransferResponseDetails
- SuccessResponse
- Token
- TokenData
- TokenDetails
- Trade
- TradeSide
- Transfer
- TransferRequest
- UpdateCollectionRequest
- WidgetParams
- Withdrawal
Documentation For Authorization
Endpoints do not require authorization.
Documentation for Utility Methods
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