Documentation
¶
Index ¶
Constants ¶
View Source
const ( // ParameterFoundryID is used to identify a foundry by its ID. ParameterFoundryID = "foundryID" // ParameterAliasID is used to identify an alias by its ID. ParameterAliasID = "aliasID" // ParameterNFTID is used to identify a nft by its ID. ParameterNFTID = "nftID" // QueryParameterUnlockableByAddress is used to filter for all unlock conditions regarding a certain address. QueryParameterUnlockableByAddress = "unlockableByAddress" // QueryParameterAddress is used to filter for a certain address. QueryParameterAddress = "address" // QueryParameterAliasAddress is used to filter for a certain alias address. QueryParameterAliasAddress = "aliasAddress" // QueryParameterIssuer is used to filter for a certain issuer. QueryParameterIssuer = "issuer" // QueryParameterSender is used to filter for a certain sender. QueryParameterSender = "sender" // QueryParameterTag is used to filter for a certain tag. QueryParameterTag = "tag" // QueryParameterHasStorageDepositReturn is used to filter for outputs having a storage deposit return unlock condition. QueryParameterHasStorageDepositReturn = "hasStorageDepositReturn" // QueryParameterStorageDepositReturnAddress is used to filter for outputs with a certain storage deposit return address. QueryParameterStorageDepositReturnAddress = "storageDepositReturnAddress" // QueryParameterHasExpiration is used to filter for outputs having an expiration unlock condition. QueryParameterHasExpiration = "hasExpiration" // QueryParameterExpiresBefore is used to filter for outputs that expire before a certain unix time. QueryParameterExpiresBefore = "expiresBefore" // QueryParameterExpiresAfter is used to filter for outputs that expire after a certain unix time. QueryParameterExpiresAfter = "expiresAfter" // QueryParameterExpirationReturnAddress is used to filter for outputs with a certain expiration return address. QueryParameterExpirationReturnAddress = "expirationReturnAddress" // QueryParameterHasTimelock is used to filter for outputs having a timelock unlock condition. QueryParameterHasTimelock = "hasTimelock" // QueryParameterTimelockedBefore is used to filter for outputs that are timelocked before a certain unix time. QueryParameterTimelockedBefore = "timelockedBefore" // QueryParameterTimelockedAfter is used to filter for outputs that are timelocked after a certain unix time. QueryParameterTimelockedAfter = "timelockedAfter" // QueryParameterStateController is used to filter for a certain state controller address. QueryParameterStateController = "stateController" // QueryParameterGovernor is used to filter for a certain governance controller address. QueryParameterGovernor = "governor" // QueryParameterPageSize is used to define the page size for the results. QueryParameterPageSize = "pageSize" // QueryParameterCursor is used to pass the offset we want to start the next results from. QueryParameterCursor = "cursor" // QueryParameterCreatedBefore is used to filter for outputs that were created before the given time. QueryParameterCreatedBefore = "createdBefore" // QueryParameterCreatedAfter is used to filter for outputs that were created after the given time. QueryParameterCreatedAfter = "createdAfter" // QueryParameterHasNativeTokens is used to filter for outputs that have native tokens. QueryParameterHasNativeTokens = "hasNativeTokens" // QueryParameterMinNativeTokenCount is used to filter for outputs that have at least an amount of native tokens. QueryParameterMinNativeTokenCount = "minNativeTokenCount" // QueryParameterMaxNativeTokenCount is used to filter for outputs that have at the most an amount of native tokens. QueryParameterMaxNativeTokenCount = "maxNativeTokenCount" )
View Source
const ( // RouteOutputs is the route for getting basic, foundry, alias and nft outputs filtered by the given parameters. // GET with query parameter returns all outputIDs that fit these filter criteria. // Query parameters: "hasNativeTokens", "minNativeTokenCount", "maxNativeTokenCount", // "unlockableByAddress", "createdBefore", "createdAfter" // Returns an empty list if no results are found. RouteOutputs = "/outputs" // RouteOutputsBasic is the route for getting basic outputs filtered by the given parameters. // GET with query parameter returns all outputIDs that fit these filter criteria. // Query parameters: "hasNativeTokens", "minNativeTokenCount", "maxNativeTokenCount", // "address", "unlockableByAddress", "hasStorageDepositReturn", "storageDepositReturnAddress", // "hasExpiration", "expiresBefore", "expiresAfter", "expirationReturnAddress", // "hasTimelock", "timelockedBefore", "timelockedAfter", "sender", "tag", // "createdBefore", "createdAfter" // Returns an empty list if no results are found. RouteOutputsBasic = "/outputs/basic" // RouteOutputsAliases is the route for getting aliases filtered by the given parameters. // GET with query parameter returns all outputIDs that fit these filter criteria. // Query parameters: "hasNativeTokens", "minNativeTokenCount", "maxNativeTokenCount", // "unlockableByAddress", "stateController", "governor", "issuer", "sender", // "createdBefore", "createdAfter" // Returns an empty list if no results are found. RouteOutputsAliases = "/outputs/alias" // RouteOutputsAliasByID is the route for getting aliases by their aliasID. // GET returns the outputIDs or 404 if no record is found. RouteOutputsAliasByID = "/outputs/alias/:" + ParameterAliasID // RouteOutputsNFTs is the route for getting NFT filtered by the given parameters. // Query parameters: "hasNativeTokens", "minNativeTokenCount", "maxNativeTokenCount", // "address", "unlockableByAddress", "hasStorageDepositReturn", "storageDepositReturnAddress", // "hasExpiration", "expiresBefore", "expiresAfter", "expirationReturnAddress", // "hasTimelock", "timelockedBefore", "timelockedAfter", "issuer", "sender", "tag", // "createdBefore", "createdAfter" // Returns an empty list if no results are found. RouteOutputsNFTs = "/outputs/nft" // RouteOutputsNFTByID is the route for getting NFT by their nftID. // GET returns the outputIDs or 404 if no record is found. RouteOutputsNFTByID = "/outputs/nft/:" + ParameterNFTID // RouteOutputsFoundries is the route for getting foundries filtered by the given parameters. // GET with query parameter returns all outputIDs that fit these filter criteria. // Query parameters: "hasNativeTokens", "minNativeTokenCount", "maxNativeTokenCount", // "aliasAddress", "createdBefore", "createdAfter" // Returns an empty list if no results are found. RouteOutputsFoundries = "/outputs/foundry" // RouteOutputsFoundryByID is the route for getting foundries by their foundryID. // GET returns the outputIDs or 404 if no record is found. RouteOutputsFoundryByID = "/outputs/foundry/:" + ParameterFoundryID )
View Source
const (
APIRoute = "/api/indexer/v1"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IndexerServer ¶
type IndexerServer struct {
Indexer *indexer.Indexer
Bech32HRP iotago.NetworkPrefix
RestAPILimitsMaxResults int
}
func NewIndexerServer ¶
func NewIndexerServer(indexer *indexer.Indexer, echo *echo.Echo, prefix iotago.NetworkPrefix, maxPageSize int) *IndexerServer
Click to show internal directories.
Click to hide internal directories.