swagger

package
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 5, 2024 License: MIT Imports: 21 Imported by: 0

README

Go API client for swagger

Service for querying and managing NFDs

Overview

This API client was generated by the swagger-codegen project. By using the swagger-spec from a remote server, you can easily generate an API client.

  • API version: 1.0
  • Package version: 1.0.0
  • Build package: io.swagger.codegen.v3.generators.go.GoClientCodegen For more information, please visit https://discord.gg/7XcuMTfeZP

Installation

Put the package under your project folder and add the following in import:

import "./swagger"

Documentation for API Endpoints

All URIs are relative to https://api.nf.domains

Class Method HTTP request Description
InfoApi InfoVersion Get /info/version version info
InfoApi Infoinfoopenapi3Yaml Get /info/openapi3.yaml Download ./pubfiles/openapi3.yaml
NfdApi NfdActivity Get /nfd/activity Fetch change activity for an NFD
NfdApi NfdAnalytics Get /nfd/analytics Fetch NFD analytics via various filters
NfdApi NfdBadges Get /nfd/badges/{name} Fetch badge information (donations/etc) for an NFD
NfdApi NfdBrowse Get /nfd/browse Browse NFDs via various filters
NfdApi NfdConsensusLeaders Get /nfd/consensus/leaders consensusLeaders nfd
NfdApi NfdConsensusMetrics Get /nfd/consensus/metrics consensusMetrics nfd
NfdApi NfdContractLock Post /nfd/contract/lock/{name} contractLock nfd
NfdApi NfdContractUpgrade Post /nfd/contract/upgrade/{name} contractUpgrade nfd
NfdApi NfdDonationLeaders Get /nfd/donations/leaders/{address} donationLeaders nfd
NfdApi NfdDonationLeadersV2 Get /nfd/v2/donations/leaders/{name} donationLeadersV2 nfd
NfdApi NfdDonationList Get /nfd/donations/list donationList nfd
NfdApi NfdDonationListV2 Get /nfd/v2/donations/list donationListV2 nfd
NfdApi NfdDonations Get /nfd/donations/{name} donations nfd
NfdApi NfdEscrowOffer Post /nfd/escrowOffer/{name} escrowOffer nfd
NfdApi NfdGetLookup Get /nfd/lookup Reverse Address lookup with results returned per address
NfdApi NfdGetNFD Get /nfd/{nameOrID} Get a specific NFD by name or by its application ID
NfdApi NfdGetNFDsForAddressesV2 Get /nfd/v2/address Reverse Address lookup with results returned per address
NfdApi NfdGetNameSig Get /nfd/nameSig/{name} getNameSig nfd
NfdApi NfdGetOpenAuctions Get /nfd/auction Get all open auctions or those open for a particular name
NfdApi NfdGetRevAddressSig Get /nfd/revAddressSig/{address} getRevAddressSig nfd
NfdApi NfdIsValidASA Get /nfd/isValidASA/{asaID} isValidASA nfd
NfdApi NfdIsValidNFD Get /nfd/isValid/{appID} isValidNFD nfd
NfdApi NfdKickoff Post /nfd/kickoff kickoff nfd
NfdApi NfdLinkAddress Post /nfd/links/addAddress/{name} linkAddress nfd
NfdApi NfdOffer Post /nfd/offer/{name} offer nfd
NfdApi NfdPostOfferToOwner Post /nfd/postOfferToOwner/{name} postOfferToOwner nfd
NfdApi NfdPurchase Post /nfd/purchase/{name} purchase nfd
NfdApi NfdRescindOffer Post /nfd/rescindOffer/{name} rescindOffer nfd
NfdApi NfdSearchV1 Get /nfd [DEPRECATED] Search for NFDs based on select lookup criteria
NfdApi NfdSearchV2 Get /nfd/v2/search Search NFDs via various filters
NfdApi NfdSegmentLeaders Get /nfd/segment/leaders segmentLeaders nfd
NfdApi NfdSegmentLock Post /nfd/segment/lock/{name} Lock/Unlock an NFD segment - specifying open price if unlocking
NfdApi NfdSegmentPrice Get /nfd/segment/price/{name} Returns cost to mint a named segment off a particular root.
NfdApi NfdSendFromVault Post /nfd/vault/sendFrom/{name} sendFromVault nfd
NfdApi NfdSendToVault Post /nfd/vault/sendTo/{name} sendToVault nfd
NfdApi NfdSetPrimaryAddress Post /nfd/links/setPrimaryAddress/{name} setPrimaryAddress nfd
NfdApi NfdSetPrimaryNFD Post /nfd/links/setPrimaryNFD/{name} setPrimaryNFD nfd
NfdApi NfdSuggest Get /nfd/suggest/{name} suggest nfd
NfdApi NfdTotals Get /nfd/totals totals nfd
NfdApi NfdTwitterLeaders Get /nfd/twitter/leaders twitterLeaders nfd
NfdApi NfdUnlinkAddress Post /nfd/links/removeAddress/{name} unlinkAddress nfd
NfdApi NfdUpdateAll Put /nfd/update/{name} updateAll nfd
NfdApi NfdUpdateImage Post /nfd/updateImage/{name}/{sender}/{which} updateImage nfd
NfdApi NfdUpdatePartial Patch /nfd/update/{name} updatePartial nfd
NfdApi NfdVaultOptInLock Post /nfd/vault/lock/{name} vaultOptInLock nfd
NfdApi NfdVerifyConfirm Post /nfd/verify/confirm/{id} verifyConfirm nfd
NfdApi NfdVerifyRequest Post /nfd/verify/request verifyRequest nfd

Documentation For Models

Documentation For Authorization

basic_header_Authorization

  • Type: HTTP basic authentication

Example

auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{
	UserName: "username",
	Password: "password",
})
r, err := client.Service.Operation(auth, args)

jwt_header_Authorization

jwt_query_token

Author

feedback@txnlab.dev

Documentation

Overview

* NFD Management Service * * Service for querying and managing NFDs * * API version: 1.0 * Contact: feedback@txnlab.dev * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* NFD Management Service * * Service for querying and managing NFDs * * API version: 1.0 * Contact: feedback@txnlab.dev * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* NFD Management Service * * Service for querying and managing NFDs * * API version: 1.0 * Contact: feedback@txnlab.dev * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* NFD Management Service * * Service for querying and managing NFDs * * API version: 1.0 * Contact: feedback@txnlab.dev * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* NFD Management Service * * Service for querying and managing NFDs * * API version: 1.0 * Contact: feedback@txnlab.dev * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* NFD Management Service * * Service for querying and managing NFDs * * API version: 1.0 * Contact: feedback@txnlab.dev * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* NFD Management Service * * Service for querying and managing NFDs * * API version: 1.0 * Contact: feedback@txnlab.dev * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* NFD Management Service * * Service for querying and managing NFDs * * API version: 1.0 * Contact: feedback@txnlab.dev * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* NFD Management Service * * Service for querying and managing NFDs * * API version: 1.0 * Contact: feedback@txnlab.dev * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* NFD Management Service * * Service for querying and managing NFDs * * API version: 1.0 * Contact: feedback@txnlab.dev * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* NFD Management Service * * Service for querying and managing NFDs * * API version: 1.0 * Contact: feedback@txnlab.dev * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* NFD Management Service * * Service for querying and managing NFDs * * API version: 1.0 * Contact: feedback@txnlab.dev * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* NFD Management Service * * Service for querying and managing NFDs * * API version: 1.0 * Contact: feedback@txnlab.dev * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* NFD Management Service * * Service for querying and managing NFDs * * API version: 1.0 * Contact: feedback@txnlab.dev * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* NFD Management Service * * Service for querying and managing NFDs * * API version: 1.0 * Contact: feedback@txnlab.dev * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* NFD Management Service * * Service for querying and managing NFDs * * API version: 1.0 * Contact: feedback@txnlab.dev * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* NFD Management Service * * Service for querying and managing NFDs * * API version: 1.0 * Contact: feedback@txnlab.dev * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* NFD Management Service * * Service for querying and managing NFDs * * API version: 1.0 * Contact: feedback@txnlab.dev * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* NFD Management Service * * Service for querying and managing NFDs * * API version: 1.0 * Contact: feedback@txnlab.dev * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* NFD Management Service * * Service for querying and managing NFDs * * API version: 1.0 * Contact: feedback@txnlab.dev * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* NFD Management Service * * Service for querying and managing NFDs * * API version: 1.0 * Contact: feedback@txnlab.dev * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* NFD Management Service * * Service for querying and managing NFDs * * API version: 1.0 * Contact: feedback@txnlab.dev * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* NFD Management Service * * Service for querying and managing NFDs * * API version: 1.0 * Contact: feedback@txnlab.dev * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* NFD Management Service * * Service for querying and managing NFDs * * API version: 1.0 * Contact: feedback@txnlab.dev * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* NFD Management Service * * Service for querying and managing NFDs * * API version: 1.0 * Contact: feedback@txnlab.dev * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* NFD Management Service * * Service for querying and managing NFDs * * API version: 1.0 * Contact: feedback@txnlab.dev * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* NFD Management Service * * Service for querying and managing NFDs * * API version: 1.0 * Contact: feedback@txnlab.dev * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* NFD Management Service * * Service for querying and managing NFDs * * API version: 1.0 * Contact: feedback@txnlab.dev * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* NFD Management Service * * Service for querying and managing NFDs * * API version: 1.0 * Contact: feedback@txnlab.dev * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* NFD Management Service * * Service for querying and managing NFDs * * API version: 1.0 * Contact: feedback@txnlab.dev * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* NFD Management Service * * Service for querying and managing NFDs * * API version: 1.0 * Contact: feedback@txnlab.dev * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* NFD Management Service * * Service for querying and managing NFDs * * API version: 1.0 * Contact: feedback@txnlab.dev * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* NFD Management Service * * Service for querying and managing NFDs * * API version: 1.0 * Contact: feedback@txnlab.dev * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* NFD Management Service * * Service for querying and managing NFDs * * API version: 1.0 * Contact: feedback@txnlab.dev * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* NFD Management Service * * Service for querying and managing NFDs * * API version: 1.0 * Contact: feedback@txnlab.dev * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* NFD Management Service * * Service for querying and managing NFDs * * API version: 1.0 * Contact: feedback@txnlab.dev * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* NFD Management Service * * Service for querying and managing NFDs * * API version: 1.0 * Contact: feedback@txnlab.dev * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* NFD Management Service * * Service for querying and managing NFDs * * API version: 1.0 * Contact: feedback@txnlab.dev * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* NFD Management Service * * Service for querying and managing NFDs * * API version: 1.0 * Contact: feedback@txnlab.dev * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* NFD Management Service * * Service for querying and managing NFDs * * API version: 1.0 * Contact: feedback@txnlab.dev * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* NFD Management Service * * Service for querying and managing NFDs * * API version: 1.0 * Contact: feedback@txnlab.dev * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* NFD Management Service * * Service for querying and managing NFDs * * API version: 1.0 * Contact: feedback@txnlab.dev * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* NFD Management Service * * Service for querying and managing NFDs * * API version: 1.0 * Contact: feedback@txnlab.dev * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* NFD Management Service * * Service for querying and managing NFDs * * API version: 1.0 * Contact: feedback@txnlab.dev * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* NFD Management Service * * Service for querying and managing NFDs * * API version: 1.0 * Contact: feedback@txnlab.dev * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* NFD Management Service * * Service for querying and managing NFDs * * API version: 1.0 * Contact: feedback@txnlab.dev * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* NFD Management Service * * Service for querying and managing NFDs * * API version: 1.0 * Contact: feedback@txnlab.dev * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* NFD Management Service * * Service for querying and managing NFDs * * API version: 1.0 * Contact: feedback@txnlab.dev * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* NFD Management Service * * Service for querying and managing NFDs * * API version: 1.0 * Contact: feedback@txnlab.dev * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

Index

Constants

This section is empty.

Variables

View Source
var (
	// ContextOAuth2 takes a oauth2.TokenSource as authentication for the request.
	ContextOAuth2 = contextKey("token")

	// ContextBasicAuth takes BasicAuth as authentication for the request.
	ContextBasicAuth = contextKey("basic")

	// ContextAccessToken takes a string oauth2 access token as authentication for the request.
	ContextAccessToken = contextKey("accesstoken")

	// ContextAPIKey takes an APIKey as authentication for the request
	ContextAPIKey = contextKey("apikey")
)

Functions

func CacheExpires

func CacheExpires(r *http.Response) time.Time

CacheExpires helper function to determine remaining time before repeating a request.

Types

type APIClient

type APIClient struct {
	InfoApi *InfoApiService

	NfdApi *NfdApiService
	// contains filtered or unexported fields
}

APIClient manages communication with the NFD Management Service API v1.0 In most cases there should be only one, shared, APIClient.

func NewAPIClient

func NewAPIClient(cfg *Configuration) *APIClient

NewAPIClient creates a new API client. Requires a userAgent string describing your application. optionally a custom http.Client to allow for advanced features such as caching.

func (*APIClient) ChangeBasePath

func (c *APIClient) ChangeBasePath(path string)

Change base path to allow switching to mocks

type APIKey

type APIKey struct {
	Key    string
	Prefix string
}

APIKey provides API key based authentication to a request passed via context using ContextAPIKey

type APIResponse

type APIResponse struct {
	*http.Response `json:"-"`
	Message        string `json:"message,omitempty"`
	// Operation is the name of the swagger operation.
	Operation string `json:"operation,omitempty"`
	// RequestURL is the request URL. This value is always available, even if the
	// embedded *http.Response is nil.
	RequestURL string `json:"url,omitempty"`
	// Method is the HTTP method used for the request.  This value is always
	// available, even if the embedded *http.Response is nil.
	Method string `json:"method,omitempty"`
	// Payload holds the contents of the response body (which may be nil or empty).
	// This is provided here as the raw response.Body() reader will have already
	// been drained.
	Payload []byte `json:"-"`
}

func NewAPIResponse

func NewAPIResponse(r *http.Response) *APIResponse

func NewAPIResponseWithError

func NewAPIResponseWithError(errorMessage string) *APIResponse

type BasicAuth

type BasicAuth struct {
	UserName string `json:"userName,omitempty"`
	Password string `json:"password,omitempty"`
}

BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth

type Configuration

type Configuration struct {
	BasePath      string            `json:"basePath,omitempty"`
	Host          string            `json:"host,omitempty"`
	Scheme        string            `json:"scheme,omitempty"`
	DefaultHeader map[string]string `json:"defaultHeader,omitempty"`
	UserAgent     string            `json:"userAgent,omitempty"`
	HTTPClient    *http.Client
}

func NewConfiguration

func NewConfiguration() *Configuration

func (*Configuration) AddDefaultHeader

func (c *Configuration) AddDefaultHeader(key string, value string)

type ConsensusRecord

type ConsensusRecord struct {
	Account       string    `json:"account"`
	LastPropBlock int64     `json:"lastPropBlock,omitempty"`
	LastPropTime  time.Time `json:"lastPropTime,omitempty"`
	LastVoteBlock int64     `json:"lastVoteBlock,omitempty"`
	LastVoteTime  time.Time `json:"lastVoteTime,omitempty"`
	LinkType      string    `json:"linkType,omitempty"`
	OwnerAccount  string    `json:"ownerAccount"`
	PctOfOnline   float64   `json:"pctOfOnline"`
	Proposals     int64     `json:"proposals,omitempty"`
	Rank          int64     `json:"rank,omitempty"`
	Votes         int64     `json:"votes,omitempty"`
}

ConsensusRecord contains information about an account that participated in consensus

type ContractLockRequestBody

type ContractLockRequestBody struct {
	// Whether to lock (true), or unlock (false)
	Lock bool `json:"lock"`
	// Sender of transaction - needs to be owner of NFD
	Sender string `json:"sender"`
}

type Donation

type Donation struct {
	// Sender or Receiver Algorand address depending on request
	Address string `json:"address"`
	// Total donation in microAlgos
	Total int64 `json:"total"`
}

Donation contains basic information about donation totals to specific addresses from accounts related to an NFD

type DonationAccount

type DonationAccount struct {
	// Algorand account address for this donation account
	Address string `json:"address"`
	// url of image for this donation target
	Image string `json:"image"`
	Name  string `json:"name"`
	// name of NFD for this cause
	Nfd string `json:"nfd"`
}

Name and account defined as a donation target

type EscrowOfferRequestBody

type EscrowOfferRequestBody struct {
	Buyer string `json:"buyer"`
	// Amount in microAlgo to escrow as new floor price
	Offer int64 `json:"offer"`
}

type GenericSwaggerError

type GenericSwaggerError struct {
	// contains filtered or unexported fields
}

GenericSwaggerError Provides access to the body, error and model on returned errors.

func (GenericSwaggerError) Body

func (e GenericSwaggerError) Body() []byte

Body returns the raw bytes of the response

func (GenericSwaggerError) Error

func (e GenericSwaggerError) Error() string

Error returns non-empty string if there was an error.

func (GenericSwaggerError) Model

func (e GenericSwaggerError) Model() interface{}

Model returns the unpacked model of the error

type InfoApiService

type InfoApiService service

func (*InfoApiService) InfoVersion

InfoApiService version info Returns version information for the service

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return VersionResponseBody

func (*InfoApiService) Infoinfoopenapi3Yaml

func (a *InfoApiService) Infoinfoopenapi3Yaml(ctx context.Context) (*http.Response, error)

InfoApiService Download ./pubfiles/openapi3.yaml YAML document containing the API swagger definition

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

type IsValidAsaResponseBody

type IsValidAsaResponseBody struct {
	AppID   int64  `json:"appID"`
	IsValid bool   `json:"isValid"`
	Message string `json:"message"`
	Name    string `json:"name"`
}

Whether NFD NFT ASA ID is for authentic NFD

type IsValidNfdResponseBody

type IsValidNfdResponseBody struct {
	IsValid        bool   `json:"isValid"`
	Message        string `json:"message"`
	Name           string `json:"name"`
	SigNameAddress string `json:"sigNameAddress,omitempty"`
}

Whether NFD App ID is for authentic NFD

type KickoffRequestBody

type KickoffRequestBody struct {
	Buyer string `json:"buyer"`
	Name  string `json:"name"`
}

type LinkAddressRequestBody

type LinkAddressRequestBody struct {
	// Address(es) to link to the NFD (must be able to sign for each)
	Address []string `json:"address"`
	// Address that will be signing the returned transactions.  Should be owner of NFD
	Sender string `json:"sender"`
}

type ModelError

type ModelError struct {
	// Is the error a server-side fault?
	Fault bool `json:"fault"`
	// ID is a unique identifier for this particular occurrence of the problem.
	Id string `json:"id"`
	// Message is a human-readable explanation specific to this occurrence of the problem.
	Message string `json:"message"`
	// Name is the name of this class of errors.
	Name string `json:"name"`
	// Is the error temporary?
	Temporary bool `json:"temporary"`
	// Is the error a timeout?
	Timeout bool `json:"timeout"`
}

type Nfd

type Nfd struct {
	// NFD Application ID
	AppID int64 `json:"appID,omitempty"`
	// NFD ASA ID
	AsaID int64 `json:"asaID,omitempty"`
	// Whether the verified Avatar set in this NFD is newer (arc19) then is set into the NFD. This will only be present on direct NFD fetch and if true
	AvatarOutdated bool `json:"avatarOutdated,omitempty"`
	// Verified Algorand addresses for this NFD
	CaAlgo []string `json:"caAlgo,omitempty"`
	// Cache-Control header
	CacheControl string `json:"cache-control,omitempty"`
	Category     string `json:"category,omitempty"`
	// Round this data was last fetched from
	CurrentAsOfBlock int64 `json:"currentAsOfBlock,omitempty"`
	// account wallets should send funds to - precedence is: caAlgo[0], unverifiedCaAlgo[0], owner
	DepositAccount string `json:"depositAccount,omitempty"`
	// ETag
	Etag string `json:"etag,omitempty"`
	// Tags set by the system for tracking/analytics
	MetaTags   []string `json:"metaTags,omitempty"`
	Name       string   `json:"name"`
	NfdAccount string   `json:"nfdAccount,omitempty"`
	// Owner of NFD
	Owner string `json:"owner,omitempty"`
	// NFD Application ID of Parent if this is a segment
	ParentAppID int64          `json:"parentAppID,omitempty"`
	Properties  *NfdProperties `json:"properties,omitempty"`
	// Reserved owner of NFD
	ReservedFor string `json:"reservedFor,omitempty"`
	SaleType    string `json:"saleType,omitempty"`
	// amount NFD is being sold for (microAlgos)
	SellAmount int64 `json:"sellAmount,omitempty"`
	// RecipientUid of NFD sales
	Seller         string `json:"seller,omitempty"`
	SigNameAddress string `json:"sigNameAddress,omitempty"`
	State          string `json:"state,omitempty"`
	// Tags assigned to this NFD
	Tags          []string  `json:"tags,omitempty"`
	TimeChanged   time.Time `json:"timeChanged,omitempty"`
	TimeCreated   time.Time `json:"timeCreated,omitempty"`
	TimePurchased time.Time `json:"timePurchased,omitempty"`
	// Unverified (non-algo) Crypto addresses for this NFD
	UnverifiedCa map[string][]string `json:"unverifiedCa,omitempty"`
	// Unverified Algorand addresses for this NFD
	UnverifiedCaAlgo []string `json:"unverifiedCaAlgo,omitempty"`
}

NFD contains all known information about an NFD record

type NfdActivity

type NfdActivity struct {
	// Algorand Block number of change
	Block        int64  `json:"block"`
	CacheControl string `json:"cache-control,omitempty"`
	// Changed properties
	Changes map[string]string `json:"changes,omitempty"`
	Etag    string            `json:"etag,omitempty"`
	// Not returned, used in tagging for response to indicate if-none-match etag matched
	MatchCheck string `json:"match-check,omitempty"`
	// NFD Name
	Name        string    `json:"name"`
	TimeChanged time.Time `json:"timeChanged"`
}

NFDActivity contains the property changes made in a particular NFD contract update call

type NfdAnalyticEvent

type NfdAnalyticEvent struct {
	Block int64  `json:"block,omitempty"`
	Buyer string `json:"buyer,omitempty"`
	// extra amount paid to cover minimum balance requirements - add to price to determine total amount paid
	CarryCost int64  `json:"carryCost,omitempty"`
	Category  string `json:"category,omitempty"`
	// NFD current owner - if set via includeOwner property
	CurrentOwner string   `json:"currentOwner,omitempty"`
	Event        string   `json:"event,omitempty"`
	GroupID      string   `json:"groupID,omitempty"`
	MetaTags     []string `json:"metaTags,omitempty"`
	// NFD Name
	Name     string `json:"name,omitempty"`
	Note     string `json:"note,omitempty"`
	SaleType string `json:"saleType,omitempty"`
	Seller   string `json:"seller,omitempty"`
}

NFDAnalyticEvent contains a price history record for a point in time of an NFD

type NfdAnalyticRecord

type NfdAnalyticRecord struct {
	Data *NfdAnalyticEvent `json:"data,omitempty"`
	// price of event in microAlgos
	Price int64 `json:"price,omitempty"`
	// price of event in USD
	PriceUsd  float64   `json:"priceUsd,omitempty"`
	Timestamp time.Time `json:"timestamp,omitempty"`
}

NFDAnalyticRecord is an NFD Analytics record in a time-series collection, with timestamp, price, and event data for that point in time.

type NfdAnalyticRecords

type NfdAnalyticRecords struct {
	// Not returned, used in tagging for response to indicate if-none-match etag matched
	MatchCheck string              `json:"match-check,omitempty"`
	Results    []NfdAnalyticRecord `json:"results"`
	// total number of results, with data containing paged amount based on offset/limit
	Total int64 `json:"total"`
}

type NfdApiNfdActivityOpts

type NfdApiNfdActivityOpts struct {
	Type_       optional.String
	AfterTime   optional.Time
	Limit       optional.Int64
	Sort        optional.String
	IfNoneMatch optional.String
}

type NfdApiNfdAnalyticsOpts

type NfdApiNfdAnalyticsOpts struct {
	Name               optional.String
	Buyer              optional.String
	Seller             optional.String
	Event              optional.Interface
	RequireBuyer       optional.Bool
	IncludeOwner       optional.Bool
	ExcludeNFDAsSeller optional.Bool
	Category           optional.Interface
	SaleType           optional.Interface
	Length             optional.Interface
	Traits             optional.Interface
	ParentAppID        optional.Int64
	MinPrice           optional.Int64
	MaxPrice           optional.Int64
	AfterTime          optional.Time
	Limit              optional.Int64
	Offset             optional.Int64
	Sort               optional.String
	IfNoneMatch        optional.String
}

type NfdApiNfdBadgesOpts

type NfdApiNfdBadgesOpts struct {
	IfNoneMatch optional.String
}

type NfdApiNfdBrowseOpts

type NfdApiNfdBrowseOpts struct {
	Name         optional.String
	Category     optional.Interface
	SaleType     optional.Interface
	State        optional.Interface
	ParentAppID  optional.Int64
	Length       optional.Interface
	Traits       optional.Interface
	Owner        optional.String
	ReservedFor  optional.String
	Prefix       optional.String
	Substring    optional.String
	Vproperty    optional.String
	Vvalue       optional.String
	MinPrice     optional.Int64
	MaxPrice     optional.Int64
	ChangedAfter optional.Time
	Limit        optional.Int64
	Offset       optional.Int64
	Sort         optional.String
	View         optional.String
	IfNoneMatch  optional.String
}

type NfdApiNfdConsensusLeadersOpts

type NfdApiNfdConsensusLeadersOpts struct {
	RequireNFD  optional.Bool
	IfNoneMatch optional.String
}

type NfdApiNfdConsensusMetricsOpts

type NfdApiNfdConsensusMetricsOpts struct {
	IfNoneMatch optional.String
}

type NfdApiNfdGetLookupOpts

type NfdApiNfdGetLookupOpts struct {
	View            optional.String
	AllowUnverified optional.Bool
	IfNoneMatch     optional.String
}

type NfdApiNfdGetNFDOpts

type NfdApiNfdGetNFDOpts struct {
	View        optional.String
	Poll        optional.Bool
	Nocache     optional.Bool
	IfNoneMatch optional.String
}

type NfdApiNfdGetNFDsForAddressesV2Opts

type NfdApiNfdGetNFDsForAddressesV2Opts struct {
	Limit       optional.Int64
	View        optional.String
	IfNoneMatch optional.String
}

type NfdApiNfdGetOpenAuctionsOpts

type NfdApiNfdGetOpenAuctionsOpts struct {
	Name         optional.String
	StartingSoon optional.Bool
}

type NfdApiNfdSearchV1Opts

type NfdApiNfdSearchV1Opts struct {
	Owner            optional.String
	ReservedFor      optional.String
	Prefix           optional.String
	Substring        optional.String
	Vproperty        optional.String
	Vvalue           optional.String
	RequireAddresses optional.Bool
	Limit            optional.Int64
	View             optional.String
	Test00r          optional.Bool
	IfNoneMatch      optional.String
}

type NfdApiNfdSearchV2Opts

type NfdApiNfdSearchV2Opts struct {
	Name                optional.String
	Category            optional.Interface
	SaleType            optional.Interface
	State               optional.Interface
	ParentAppID         optional.Int64
	Length              optional.Interface
	Traits              optional.Interface
	Owner               optional.String
	ReservedFor         optional.String
	ExcludeUserReserved optional.Bool
	Prefix              optional.String
	Substring           optional.String
	Vproperty           optional.String
	Vvalue              optional.String
	SegmentLocked       optional.Bool
	SegmentRoot         optional.Bool
	MinPrice            optional.Int64
	MaxPrice            optional.Int64
	MinPriceUsd         optional.Int64
	MaxPriceUsd         optional.Int64
	ChangedAfter        optional.Time
	Limit               optional.Int64
	Offset              optional.Int64
	Sort                optional.String
	View                optional.String
	IfNoneMatch         optional.String
}

type NfdApiNfdSegmentLeadersOpts

type NfdApiNfdSegmentLeadersOpts struct {
	IfNoneMatch optional.String
}

type NfdApiNfdSuggestOpts

type NfdApiNfdSuggestOpts struct {
	Limit optional.Int64
	View  optional.String
	Buyer optional.String
}

type NfdApiNfdTotalsOpts

type NfdApiNfdTotalsOpts struct {
	IfNoneMatch optional.String
}

type NfdApiNfdTwitterLeadersOpts

type NfdApiNfdTwitterLeadersOpts struct {
	IfNoneMatch optional.String
}

type NfdApiNfdUpdateImageOpts

type NfdApiNfdUpdateImageOpts struct {
	WantTxn optional.Bool
}

type NfdApiService

type NfdApiService service

func (*NfdApiService) NfdActivity

func (a *NfdApiService) NfdActivity(ctx context.Context, name []string, localVarOptionals *NfdApiNfdActivityOpts) ([]NfdActivity, *http.Response, error)

func (*NfdApiService) NfdAnalytics

func (a *NfdApiService) NfdAnalytics(ctx context.Context, localVarOptionals *NfdApiNfdAnalyticsOpts) (NfdAnalyticRecords, *http.Response, error)

func (*NfdApiService) NfdBadges

func (a *NfdApiService) NfdBadges(ctx context.Context, name string, localVarOptionals *NfdApiNfdBadgesOpts) (map[string][]map[string]string, *http.Response, error)

func (*NfdApiService) NfdBrowse

func (a *NfdApiService) NfdBrowse(ctx context.Context, localVarOptionals *NfdApiNfdBrowseOpts) ([]NfdRecord, *http.Response, error)

func (*NfdApiService) NfdConsensusLeaders

func (a *NfdApiService) NfdConsensusLeaders(ctx context.Context, localVarOptionals *NfdApiNfdConsensusLeadersOpts) ([]ConsensusRecord, *http.Response, error)

func (*NfdApiService) NfdConsensusMetrics

func (a *NfdApiService) NfdConsensusMetrics(ctx context.Context, localVarOptionals *NfdApiNfdConsensusMetricsOpts) (map[string][]map[string]string, *http.Response, error)

func (*NfdApiService) NfdContractLock

func (a *NfdApiService) NfdContractLock(ctx context.Context, body ContractLockRequestBody, name string) (string, *http.Response, error)

NfdApiService contractLock nfd Lock/Unlock an NFD contract - if locked, the contract can never being modified until unlocked again by the owner.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param body
  • @param name

@return string

func (*NfdApiService) NfdContractUpgrade

func (a *NfdApiService) NfdContractUpgrade(ctx context.Context, body RescindOfferRequestBody, name string) (string, *http.Response, error)

NfdApiService contractUpgrade nfd Request upgrade of the contract on an NFD

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param body
  • @param name

@return string

func (*NfdApiService) NfdDonationLeaders

func (a *NfdApiService) NfdDonationLeaders(ctx context.Context, address string) ([]Donation, *http.Response, error)

NfdApiService donationLeaders nfd [DEPRECATED] Get top donors to a specific account

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param address Donation address to get leaderboard for

@return []Donation

func (*NfdApiService) NfdDonationLeadersV2

func (a *NfdApiService) NfdDonationLeadersV2(ctx context.Context, name string) ([]Donation, *http.Response, error)

NfdApiService donationLeadersV2 nfd Get top donors to a specific NFD Donation target

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name

@return []Donation

func (*NfdApiService) NfdDonationList

func (a *NfdApiService) NfdDonationList(ctx context.Context) ([]DonationAccount, *http.Response, error)

NfdApiService donationList nfd [DEPRECATED] Fetch list of tracked Donation 'targets'. Getting name/address for each.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return []DonationAccount

func (*NfdApiService) NfdDonationListV2

func (a *NfdApiService) NfdDonationListV2(ctx context.Context) ([]NfdRecordResponseFull, *http.Response, error)

NfdApiService donationListV2 nfd Fetch list of tracked Donation NFD 'targets'.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return []NfdRecordResponseFull

func (*NfdApiService) NfdDonations

func (a *NfdApiService) NfdDonations(ctx context.Context, name string) ([]Donation, *http.Response, error)

NfdApiService donations nfd Fetch donation activity for an NFD, totalling amounts sent 'to' designated donation accounts

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name

@return []Donation

func (*NfdApiService) NfdEscrowOffer

func (a *NfdApiService) NfdEscrowOffer(ctx context.Context, body EscrowOfferRequestBody, name string) (string, *http.Response, error)

NfdApiService escrowOffer nfd Make escrowed bid for a new 'floor' price of an ongoing auction. Higher bidder refunds you, if price drops to your escrow, you win auction with it being reserved for you

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param body
  • @param name

@return string

func (*NfdApiService) NfdGetLookup

func (a *NfdApiService) NfdGetLookup(ctx context.Context, address []string, localVarOptionals *NfdApiNfdGetLookupOpts) (map[string]NfdRecordinaddress, *http.Response, error)

func (*NfdApiService) NfdGetNFD

func (a *NfdApiService) NfdGetNFD(ctx context.Context, nameOrID string, localVarOptionals *NfdApiNfdGetNFDOpts) (NfdRecord, *http.Response, error)

func (*NfdApiService) NfdGetNFDsForAddressesV2

func (a *NfdApiService) NfdGetNFDsForAddressesV2(ctx context.Context, address []string, localVarOptionals *NfdApiNfdGetNFDsForAddressesV2Opts) (map[string][]NfdRecordinaddress, *http.Response, error)

func (*NfdApiService) NfdGetNameSig

func (a *NfdApiService) NfdGetNameSig(ctx context.Context, name string) (string, *http.Response, error)

NfdApiService getNameSig nfd Returns NameSig address for an NFD name (usable for V1 only)

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name

@return string

func (*NfdApiService) NfdGetOpenAuctions

func (a *NfdApiService) NfdGetOpenAuctions(ctx context.Context, localVarOptionals *NfdApiNfdGetOpenAuctionsOpts) ([]NfdAuctionAndPrice, *http.Response, error)

func (*NfdApiService) NfdGetRevAddressSig

func (a *NfdApiService) NfdGetRevAddressSig(ctx context.Context, address string) (string, *http.Response, error)

NfdApiService getRevAddressSig nfd Returns RevAddress address for an NFD name (usable for V1 only)

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param address

@return string

func (*NfdApiService) NfdIsValidASA

func (a *NfdApiService) NfdIsValidASA(ctx context.Context, asaID int64) (IsValidAsaResponseBody, *http.Response, error)

NfdApiService isValidASA nfd Determines if specified NFD NFT ASA ID is authentic NFD

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param asaID Asset ID of a presumed NFD ASA to verify. The API will verify the found asset references an NFD that in turn references that asset.

@return IsValidAsaResponseBody

func (*NfdApiService) NfdIsValidNFD

func (a *NfdApiService) NfdIsValidNFD(ctx context.Context, appID int64) (IsValidNfdResponseBody, *http.Response, error)

NfdApiService isValidNFD nfd Determines if specified NFD Application ID is authentic

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param appID Application ID of a presumed NFD to verify. The API will perform a forward-name lookup of the name within the NFD to verify it points to the same ID

@return IsValidNfdResponseBody

func (*NfdApiService) NfdKickoff

func (a *NfdApiService) NfdKickoff(ctx context.Context, body KickoffRequestBody) (string, *http.Response, error)

NfdApiService kickoff nfd Kickoff NFD minting process, with user buying specified NFD (or kicking off auction) as appropriate. Purchase price is set by TxnLab

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param body

@return string

func (*NfdApiService) NfdLinkAddress

func (a *NfdApiService) NfdLinkAddress(ctx context.Context, body LinkAddressRequestBody, name string) (string, *http.Response, error)

NfdApiService linkAddress nfd Link one or more addresses to an NFD, adding to the reverse-address lookups as well as to this NFD. Sender must be owner, and each added address must be able to be signed for.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param body
  • @param name

@return string

func (*NfdApiService) NfdOffer

func (a *NfdApiService) NfdOffer(ctx context.Context, body OfferRequestBody, name string) (string, *http.Response, error)

NfdApiService offer nfd Offer up an NFD for sale - specifying price and optionally an address it is reserved for.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param body
  • @param name

@return string

func (*NfdApiService) NfdPostOfferToOwner

func (a *NfdApiService) NfdPostOfferToOwner(ctx context.Context, body PostOfferToOwnerRequestBody, name string) (string, *http.Response, error)

NfdApiService postOfferToOwner nfd Post an offer to buy to the owner of an NFD, offering up a particular amount with optional note for them to consider

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param body
  • @param name

@return string

func (*NfdApiService) NfdPurchase

func (a *NfdApiService) NfdPurchase(ctx context.Context, body PurchaseRequestBody, name string) (string, *http.Response, error)

NfdApiService purchase nfd Purchase an NFD for sale - specifying buyer (to sign transaction) and price

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param body
  • @param name

@return string

func (*NfdApiService) NfdRescindOffer

func (a *NfdApiService) NfdRescindOffer(ctx context.Context, body RescindOfferRequestBody, name string) (string, *http.Response, error)

NfdApiService rescindOffer nfd Rescind offer of sale. Claiming NFD back for self, and removing it for sale.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param body
  • @param name

@return string

func (*NfdApiService) NfdSearchV1

func (a *NfdApiService) NfdSearchV1(ctx context.Context, localVarOptionals *NfdApiNfdSearchV1Opts) ([]NfdRecord, *http.Response, error)

func (*NfdApiService) NfdSearchV2

func (a *NfdApiService) NfdSearchV2(ctx context.Context, localVarOptionals *NfdApiNfdSearchV2Opts) (NfdV2SearchRecords, *http.Response, error)

func (*NfdApiService) NfdSegmentLeaders

func (a *NfdApiService) NfdSegmentLeaders(ctx context.Context, localVarOptionals *NfdApiNfdSegmentLeadersOpts) ([]NfdRecord, *http.Response, error)

func (*NfdApiService) NfdSegmentLock

func (a *NfdApiService) NfdSegmentLock(ctx context.Context, body SegmentLockRequestBody, name string) (string, *http.Response, error)

NfdApiService Lock/Unlock an NFD segment - specifying open price if unlocking Lock/Unlock an NFD segment - if locked, the segment only allows minted names created by the segment owner. If unlocked, anyone can mint off the segment for the price (in USD) the owner sets

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param body
  • @param name

@return string

func (*NfdApiService) NfdSegmentPrice

func (a *NfdApiService) NfdSegmentPrice(ctx context.Context, buyer string, name string) (SegmentPriceResponseBody, *http.Response, error)

NfdApiService Returns cost to mint a named segment off a particular root. Buyer is used for validation if segment is allowed to be minted (locked vs unlocked). Can pass full segment name, or just root.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param buyer Expected buyer of segment
  • @param name

@return SegmentPriceResponseBody

func (*NfdApiService) NfdSendFromVault

func (a *NfdApiService) NfdSendFromVault(ctx context.Context, body SendFromVaultRequestBody, name string) (string, *http.Response, error)

NfdApiService sendFromVault nfd Send an amount of an asset [0 == ALGO] to another account FROM the NFD Vault. Only owner of NFD can send.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param body
  • @param name

@return string

func (*NfdApiService) NfdSendToVault

func (a *NfdApiService) NfdSendToVault(ctx context.Context, body SendToVaultRequestBody, name string) (string, *http.Response, error)

NfdApiService sendToVault nfd Provide transaction to send an asset owned by sender account to an NFD vault. Call to have opt-in to vault will be included if necessary. Callable by NFD owner, or if Opt-in is UNLOCKED (or asset already opted-in), anyone can call

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param body
  • @param name

@return string

func (*NfdApiService) NfdSetPrimaryAddress

func (a *NfdApiService) NfdSetPrimaryAddress(ctx context.Context, body SetPrimaryAddressRequestBody, name string) (string, *http.Response, error)

NfdApiService setPrimaryAddress nfd Set which of the currently verified addresses should be the first in the list (swapping positions as necessary)

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param body
  • @param name

@return string

func (*NfdApiService) NfdSetPrimaryNFD

func (a *NfdApiService) NfdSetPrimaryNFD(ctx context.Context, body SetPrimaryAddressRequestBody, name string) (string, *http.Response, error)

NfdApiService setPrimaryNFD nfd Set the specified NFD as the primary NFD to return for the specified address via its reverse lookup

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param body
  • @param name

@return string

func (*NfdApiService) NfdSuggest

func (a *NfdApiService) NfdSuggest(ctx context.Context, name string, localVarOptionals *NfdApiNfdSuggestOpts) ([]NfdRecord, *http.Response, error)

func (*NfdApiService) NfdTotals

func (a *NfdApiService) NfdTotals(ctx context.Context, localVarOptionals *NfdApiNfdTotalsOpts) (TotalsOkResponseBody, *http.Response, error)

func (*NfdApiService) NfdTwitterLeaders

func (a *NfdApiService) NfdTwitterLeaders(ctx context.Context, localVarOptionals *NfdApiNfdTwitterLeadersOpts) ([]TwitterRecord, *http.Response, error)

func (*NfdApiService) NfdUnlinkAddress

func (a *NfdApiService) NfdUnlinkAddress(ctx context.Context, body LinkAddressRequestBody, name string) (string, *http.Response, error)

NfdApiService unlinkAddress nfd UnLink one or more addresses to an NFD, adding to the reverse-address lookups as well as to this NFD. Sender must be owner, and each added address must be able to be signed for.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param body
  • @param name

@return string

func (*NfdApiService) NfdUpdateAll

func (a *NfdApiService) NfdUpdateAll(ctx context.Context, body UpdatePartialRequestBody, name string) (string, *http.Response, error)

NfdApiService updateAll nfd Replace all NFD user-settable attributes with those passed-in, removing, adding and replacing on behalf of a particular sender (who must be the owner). Returns transaction group of transactions to sign

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param body
  • @param name

@return string

func (*NfdApiService) NfdUpdateImage

func (a *NfdApiService) NfdUpdateImage(ctx context.Context, name string, sender string, which string, localVarOptionals *NfdApiNfdUpdateImageOpts) (string, *http.Response, error)

func (*NfdApiService) NfdUpdatePartial

func (a *NfdApiService) NfdUpdatePartial(ctx context.Context, body UpdatePartialRequestBody, name string) (string, *http.Response, error)

NfdApiService updatePartial nfd Set an attribute in an NFD on behalf of a particular sender (who must be the owner). Can set user-defined fields, or clear verified fields (except v.ca*)

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param body
  • @param name

@return string

func (*NfdApiService) NfdVaultOptInLock

func (a *NfdApiService) NfdVaultOptInLock(ctx context.Context, body VaultOptInLockRequestBody, name string) (string, *http.Response, error)

NfdApiService vaultOptInLock nfd Lock/Unlock ability for the specified NFD Vault to auto opt-in to assets, allowing airdrops from other accounts

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param body
  • @param name

@return string

func (*NfdApiService) NfdVerifyConfirm

NfdApiService verifyConfirm nfd Verify a particular piece of data on, or off-chain. Each verification differs in its requirements

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param body
  • @param id ID of challenge, must be used in subsequent confirmation call

@return VerifyConfirmResponseBody

func (*NfdApiService) NfdVerifyRequest

NfdApiService verifyRequest nfd Request Verification for particular piece of data on, or off-chain. Each verification differs in its requirements. Returns data to be used in challenge

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param body

@return VerifyRequestResponseBody

type NfdAuction

type NfdAuction struct {
	// Price in microAlgos
	CeilingPrice int64 `json:"ceilingPrice"`
	// Price in microAlgos
	CurrentPrice int64     `json:"currentPrice,omitempty"`
	EndTime      time.Time `json:"endTime"`
	// Price in microAlgos
	FloorPrice int64     `json:"floorPrice"`
	Name       string    `json:"name"`
	NewEndTime time.Time `json:"newEndTime,omitempty"`
	// Escrowed floor price in microAlgos
	NewFloorPrice int64     `json:"newFloorPrice,omitempty"`
	StartTime     time.Time `json:"startTime"`
}

type NfdAuctionAndPrice

type NfdAuctionAndPrice struct {
	AuctionInfo *NfdAuction `json:"auctionInfo"`
	// Change in price per minute
	ChangePerMinute int64 `json:"changePerMinute,omitempty"`
	// Minutes elapsed so far in Auction
	ElapsedMinutes int64 `json:"elapsedMinutes,omitempty"`
	// Current price in microAlgos
	Price int64 `json:"price,omitempty"`
	// Total number of minutes in Auction
	TotalMinutes int64 `json:"totalMinutes,omitempty"`
}

type NfdProperties

type NfdProperties struct {
	// Internal properties
	Internal map[string]string `json:"internal,omitempty"`
	// User properties
	UserDefined map[string]string `json:"userDefined,omitempty"`
	// Verified properties
	Verified map[string]string `json:"verified,omitempty"`
}

NFDProperties contains the expanded metadata stored within an NFD contracts' global-state

type NfdRecord

type NfdRecord struct {
	// NFD Application ID
	AppID int64 `json:"appID,omitempty"`
	// NFD ASA ID
	AsaID int64 `json:"asaID,omitempty"`
	// Whether the verified Avatar set in this NFD is newer (arc19) then is set into the NFD. This will only be present on direct NFD fetch and if true
	AvatarOutdated bool `json:"avatarOutdated,omitempty"`
	// Verified Algorand addresses for this NFD
	CaAlgo   []string `json:"caAlgo,omitempty"`
	Category string   `json:"category,omitempty"`
	// Round this data was last fetched from
	CurrentAsOfBlock int64 `json:"currentAsOfBlock,omitempty"`
	// account wallets should send funds to - precedence is: caAlgo[0], unverifiedCaAlgo[0], owner
	DepositAccount string `json:"depositAccount,omitempty"`
	// Not returned, used in tagging for response to indicate if-none-match etag matched
	MatchCheck string `json:"match-check,omitempty"`
	// Tags set by the system for tracking/analytics
	MetaTags   []string `json:"metaTags,omitempty"`
	Name       string   `json:"name"`
	NfdAccount string   `json:"nfdAccount,omitempty"`
	// Owner of NFD
	Owner string `json:"owner,omitempty"`
	// NFD Application ID of Parent if this is a segment
	ParentAppID int64          `json:"parentAppID,omitempty"`
	Properties  *NfdProperties `json:"properties,omitempty"`
	// Reserved owner of NFD
	ReservedFor string `json:"reservedFor,omitempty"`
	SaleType    string `json:"saleType,omitempty"`
	// amount NFD is being sold for (microAlgos)
	SellAmount int64 `json:"sellAmount,omitempty"`
	// RecipientUid of NFD sales
	Seller         string `json:"seller,omitempty"`
	SigNameAddress string `json:"sigNameAddress,omitempty"`
	State          string `json:"state,omitempty"`
	// Tags assigned to this NFD
	Tags          []string  `json:"tags,omitempty"`
	TimeChanged   time.Time `json:"timeChanged,omitempty"`
	TimeCreated   time.Time `json:"timeCreated,omitempty"`
	TimePurchased time.Time `json:"timePurchased,omitempty"`
	// Unverified (non-algo) Crypto addresses for this NFD
	UnverifiedCa map[string][]string `json:"unverifiedCa,omitempty"`
	// Unverified Algorand addresses for this NFD
	UnverifiedCaAlgo []string `json:"unverifiedCaAlgo,omitempty"`
}

type NfdRecordResponseFull

type NfdRecordResponseFull struct {
	// NFD Application ID
	AppID int64 `json:"appID,omitempty"`
	// NFD ASA ID
	AsaID int64 `json:"asaID,omitempty"`
	// Whether the verified Avatar set in this NFD is newer (arc19) then is set into the NFD. This will only be present on direct NFD fetch and if true
	AvatarOutdated bool `json:"avatarOutdated,omitempty"`
	// Verified Algorand addresses for this NFD
	CaAlgo []string `json:"caAlgo,omitempty"`
	// Cache-Control header
	CacheControl string `json:"cache-control,omitempty"`
	Category     string `json:"category,omitempty"`
	// Round this data was last fetched from
	CurrentAsOfBlock int64 `json:"currentAsOfBlock,omitempty"`
	// account wallets should send funds to - precedence is: caAlgo[0], unverifiedCaAlgo[0], owner
	DepositAccount string `json:"depositAccount,omitempty"`
	// ETag
	Etag string `json:"etag,omitempty"`
	// Not returned, used in tagging for response to indicate if-none-match etag matched
	MatchCheck string `json:"match-check,omitempty"`
	// Tags set by the system for tracking/analytics
	MetaTags   []string `json:"metaTags,omitempty"`
	Name       string   `json:"name"`
	NfdAccount string   `json:"nfdAccount,omitempty"`
	// Owner of NFD
	Owner string `json:"owner,omitempty"`
	// NFD Application ID of Parent if this is a segment
	ParentAppID int64          `json:"parentAppID,omitempty"`
	Properties  *NfdProperties `json:"properties,omitempty"`
	// Reserved owner of NFD
	ReservedFor string `json:"reservedFor,omitempty"`
	SaleType    string `json:"saleType,omitempty"`
	// amount NFD is being sold for (microAlgos)
	SellAmount int64 `json:"sellAmount,omitempty"`
	// RecipientUid of NFD sales
	Seller         string `json:"seller,omitempty"`
	SigNameAddress string `json:"sigNameAddress,omitempty"`
	State          string `json:"state,omitempty"`
	// Tags assigned to this NFD
	Tags          []string  `json:"tags,omitempty"`
	TimeChanged   time.Time `json:"timeChanged,omitempty"`
	TimeCreated   time.Time `json:"timeCreated,omitempty"`
	TimePurchased time.Time `json:"timePurchased,omitempty"`
	// Unverified (non-algo) Crypto addresses for this NFD
	UnverifiedCa map[string][]string `json:"unverifiedCa,omitempty"`
	// Unverified Algorand addresses for this NFD
	UnverifiedCaAlgo []string `json:"unverifiedCaAlgo,omitempty"`
}

NFD contains all known information about an NFD record (full view)

type NfdRecordinaddress

type NfdRecordinaddress struct {
	// NFD Application ID
	AppID int64 `json:"appID,omitempty"`
	// NFD ASA ID
	AsaID int64 `json:"asaID,omitempty"`
	// Whether the verified Avatar set in this NFD is newer (arc19) then is set into the NFD. This will only be present on direct NFD fetch and if true
	AvatarOutdated bool `json:"avatarOutdated,omitempty"`
	// Verified Algorand addresses for this NFD
	CaAlgo []string `json:"caAlgo,omitempty"`
	// Cache-Control header
	CacheControl string `json:"cache-control,omitempty"`
	Category     string `json:"category,omitempty"`
	// Round this data was last fetched from
	CurrentAsOfBlock int64 `json:"currentAsOfBlock,omitempty"`
	// account wallets should send funds to - precedence is: caAlgo[0], unverifiedCaAlgo[0], owner
	DepositAccount string `json:"depositAccount,omitempty"`
	// ETag
	Etag string `json:"etag,omitempty"`
	// Not returned, used in tagging for response to indicate if-none-match etag matched
	MatchCheck string `json:"match-check,omitempty"`
	// Tags set by the system for tracking/analytics
	MetaTags   []string `json:"metaTags,omitempty"`
	Name       string   `json:"name"`
	NfdAccount string   `json:"nfdAccount,omitempty"`
	// Owner of NFD
	Owner string `json:"owner,omitempty"`
	// NFD Application ID of Parent if this is a segment
	ParentAppID int64          `json:"parentAppID,omitempty"`
	Properties  *NfdProperties `json:"properties,omitempty"`
	// Reserved owner of NFD
	ReservedFor string `json:"reservedFor,omitempty"`
	SaleType    string `json:"saleType,omitempty"`
	// amount NFD is being sold for (microAlgos)
	SellAmount int64 `json:"sellAmount,omitempty"`
	// RecipientUid of NFD sales
	Seller         string `json:"seller,omitempty"`
	SigNameAddress string `json:"sigNameAddress,omitempty"`
	State          string `json:"state,omitempty"`
	// Tags assigned to this NFD
	Tags          []string  `json:"tags,omitempty"`
	TimeChanged   time.Time `json:"timeChanged,omitempty"`
	TimeCreated   time.Time `json:"timeCreated,omitempty"`
	TimePurchased time.Time `json:"timePurchased,omitempty"`
	// Unverified (non-algo) Crypto addresses for this NFD
	UnverifiedCa map[string][]string `json:"unverifiedCa,omitempty"`
	// Unverified Algorand addresses for this NFD
	UnverifiedCaAlgo []string `json:"unverifiedCaAlgo,omitempty"`
}

NFD contains all known information about an NFD record

type NfdV2SearchRecords

type NfdV2SearchRecords struct {
	// Not returned, used in tagging for response to indicate if-none-match etag matched
	MatchCheck string       `json:"match-check,omitempty"`
	Nfds       *[]NfdRecord `json:"nfds"`
	// total number of results, with data containing paged amount based on offset/limit
	Total int64 `json:"total"`
}

type OfferRequestBody

type OfferRequestBody struct {
	// Amount in microAlgo to sell the NFD for.  1 ALGO is 1,000,000 microAlgo. 1 ALGO minimum, 100 million maximum.
	Offer int64 `json:"offer"`
	// Whether to pay the offer amount + fees to the account the NFD is reserved for.  Equivalent to 'gifting' the NFD
	PayReceiver bool   `json:"payReceiver,omitempty"`
	ReservedFor string `json:"reservedFor,omitempty"`
	// Sender of transaction - needs to be owner of NFD
	Sender string `json:"sender"`
}

type PostOfferToOwnerRequestBody

type PostOfferToOwnerRequestBody struct {
	// Note to pass along to the NFD owner.  Must be provided but can be blank
	Note string `json:"note"`
	// Amount in microAlgo being offered to the NFD owner
	Offer  int64  `json:"offer"`
	Sender string `json:"sender"`
}

type PurchaseRequestBody

type PurchaseRequestBody struct {
	Buyer string `json:"buyer"`
	// Amount in microAlgo to purchase/claim the NFD for
	Offer int64 `json:"offer"`
	// Whether to reject receiving the NFT into the purchasers account, leaving or returning it to the NFDs vault instead
	RejectNFT bool `json:"rejectNFT,omitempty"`
}

type RateLimited

type RateLimited struct {
	Limit         int64 `json:"limit"`
	SecsRemaining int64 `json:"secsRemaining"`
}

type RescindOfferRequestBody

type RescindOfferRequestBody struct {
	// Sender of transaction - needs to be owner of NFD
	Sender string `json:"sender"`
}

type SegmentLockRequestBody

type SegmentLockRequestBody struct {
	// Whether to lock (true), or unlock (false)
	Lock bool `json:"lock"`
	// amount users minting off the segment have to pay to mint in USD (in cents - ie: 300 = $3.00). Set to 0 if locking
	SellAmount int64 `json:"sellAmount"`
	// Sender of transaction - needs to be owner of NFD
	Sender string `json:"sender"`
}

type SegmentPriceResponseBody

type SegmentPriceResponseBody struct {
	// Price of ALGO in USD
	AlgoUsd float64 `json:"algoUsd"`
	// Algorand carry cost - amount required for MBR (Minimum Balance Requirement) of contracts, escrows, etc
	CarryCost int64 `json:"carryCost"`
	// Discount rate % that is applied for this segment name - 0 if discount point not reached - starting after 2500 NFDs
	DiscountRate float64 `json:"discountRate"`
	// Number of segments minted off of parent NFD
	ParentSegmentCount int64 `json:"parentSegmentCount"`
	// Total Price in microAlgo to mint including ALGO carry cost
	SellAmount int64 `json:"sellAmount"`
	// Price in USD for unlocked mint of this segment
	UnlockedSellPrice float64 `json:"unlockedSellPrice,omitempty"`
	// Minimum price in USD the segment has to be (not including ALGO carry cost).  If locked, the fixed price, or if unlocked, the platform price
	UsdMinCost float64 `json:"usdMinCost"`
}

Price breakdown on minting a segment off another NFD

type SendFromVaultRequestBody

type SendFromVaultRequestBody struct {
	// Base amount (in base units of specified asset - so decimals must be considered) of asset to send.   If multiple assets are specified, amount is should be 0 as ALL of each are sent and closed out
	Amount int64 `json:"amount"`
	// Algorand ASA IDs to transfer FROM vault - use asset 0 to send ALGO.  Specifying multiple assets means ALL of each are sent and amount is ignored. If receiver is a vault and needs to opt-in, then need MBR/opt-in pairs (5 pairs - 8  opt-ins each - 40 assets), then 6 send calls of 7 assets w/ 5 at end for total of 40.  If receiver is already opted-in, then 112 (7 per txn, 16 tnxs) is max.
	Assets []int64 `json:"assets"`
	// Optional note to include in asset send transaction
	Note string `json:"note,omitempty"`
	// Algorand account or NFD Name (if vault receiver) the asset(s) should be sent to
	Receiver string `json:"receiver"`
	// Specifies that the receiver account is something the caller can sign for. If specified, then opt-in transactions it signs may be included
	ReceiverCanSign bool `json:"receiverCanSign,omitempty"`
	// Account or NFD Vault the asset should be sent to (if allowed)
	ReceiverType string `json:"receiverType,omitempty"`
	// Sender of transaction, must be NFD owner
	Sender string `json:"sender"`
}

type SendToVaultRequestBody

type SendToVaultRequestBody struct {
	// Base amount (in base units of specified asset - so decimals must be considered) of asset to send.   If multiple assets specified, amount is ignored and ALL of each are sent
	Amount int64 `json:"amount"`
	// Algorand ASA IDs to transfer (and opt-in inside vault if necessary) - use asset 0 to send ALGO.  Specifying multiple assets means ALL of each are sent and amount is ignored. 13 is max assets that can be specified if they're being sent (2 for MBR payments, 2 for opt-in txns (8+4 asset opt-ins), 12 asset transfers).  If opt-in only then 64 is maximum (1 MBR per 8 assets, 8 assets per txn * 8 txns)
	Assets []int64 `json:"assets"`
	// Optional note to include in asset send transaction
	Note string `json:"note,omitempty"`
	// Whether to only opt-in to the asset, instead of including asset transfer txn
	OptInOnly bool   `json:"optInOnly"`
	Sender    string `json:"sender"`
}

type SetPrimaryAddressRequestBody

type SetPrimaryAddressRequestBody struct {
	// The address (already linked) to make primary - swapping into position if necessary
	Address string `json:"address"`
	// Address that will be signing the returned transactions.  Should be owner of NFD
	Sender string `json:"sender"`
}

type TotalsOkResponseBody

type TotalsOkResponseBody struct {
	ForSale int64 `json:"forSale"`
	// Not returned, used in tagging for response to indicate if-none-match etag matched
	MatchCheck    string                             `json:"match-check,omitempty"`
	MintedTotals  *TotalsOkResponseBodyMintedTotals  `json:"mintedTotals"`
	SegmentTotals *TotalsOkResponseBodySegmentTotals `json:"segmentTotals"`
	SoldTotals    *TotalsOkResponseBodySoldTotals    `json:"soldTotals"`
	Total         int64                              `json:"total"`
	TotalSegments int64                              `json:"totalSegments"`
	UniqueOwners  int64                              `json:"uniqueOwners"`
}

type TotalsOkResponseBodyMintedTotals

type TotalsOkResponseBodyMintedTotals struct {
	Day      int64 `json:"day,omitempty"`
	Lifetime int64 `json:"lifetime,omitempty"`
	Month    int64 `json:"month,omitempty"`
	Week     int64 `json:"week,omitempty"`
}

type TotalsOkResponseBodySegmentTotals

type TotalsOkResponseBodySegmentTotals struct {
	Day      int64 `json:"day,omitempty"`
	Lifetime int64 `json:"lifetime,omitempty"`
	Month    int64 `json:"month,omitempty"`
	Week     int64 `json:"week,omitempty"`
}

type TotalsOkResponseBodySoldTotals

type TotalsOkResponseBodySoldTotals struct {
	Day      int64 `json:"day,omitempty"`
	Lifetime int64 `json:"lifetime,omitempty"`
	Month    int64 `json:"month,omitempty"`
	Week     int64 `json:"week,omitempty"`
}

type TwitterRecord

type TwitterRecord struct {
	Followers     int64     `json:"followers"`
	Following     int64     `json:"following"`
	Nfd           *Nfd      `json:"nfd"`
	TimeChanged   time.Time `json:"timeChanged"`
	Tweets        int64     `json:"tweets"`
	TwitterHandle string    `json:"twitterHandle"`
}

TwitterRecord contains information about an NFD w/ Verified Twitter account and basic info on its twitter metrics

type UpdatePartialRequestBody

type UpdatePartialRequestBody struct {
	Properties *NfdProperties `json:"properties"`
	// Address that will be signing the returned transactions.  Should be owner of NFD
	Sender string `json:"sender"`
}

type VaultOptInLockRequestBody

type VaultOptInLockRequestBody struct {
	// Whether to lock (true), or unlock (false)
	Lock bool `json:"lock"`
	// If unlocking vault, specify a time to automatically re-lock the vault.  This allows an unlock that only lasts for a paticular amount of time.  The time specifies the moment the vault should re-lock.
	ReLockAt time.Time `json:"reLockAt,omitempty"`
	// Sender of transaction - needs to be owner of NFD
	Sender string `json:"sender"`
}

type VerifyConfirmRequestBody

type VerifyConfirmRequestBody struct {
	// Challenge value, optional depending on verification type
	Challenge string `json:"challenge,omitempty"`
}

type VerifyConfirmResponseBody

type VerifyConfirmResponseBody struct {
	Confirmed bool `json:"confirmed"`
}

Whether verification was successful

type VerifyRequestRequestBody

type VerifyRequestRequestBody struct {
	// User defined field name to verify
	FieldToVerify string `json:"fieldToVerify"`
	Name          string `json:"name"`
	// Sender of transaction - needs to be owner of NFD
	Sender string `json:"sender"`
}

type VerifyRequestResponseBody

type VerifyRequestResponseBody struct {
	// Challenge to be used as part of verification process, with use specific to each field
	Challenge string `json:"challenge"`
	// ID of challenge, must be used in subsequent confirmation call but may be blank
	Id string `json:"id"`
	// If set, no confirmation is required, the verify call was sufficient
	Validated bool `json:"validated,omitempty"`
}

Data to use as part of verification

type VersionResponseBody

type VersionResponseBody struct {
	AppVersion      string `json:"appVersion"`
	ContractVersion string `json:"contractVersion"`
}

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL