diff --git a/daemon/algod/api/server/v2/generated/private/routes.go b/daemon/algod/api/server/v2/generated/private/routes.go deleted file mode 100644 index fb64b800d8..0000000000 --- a/daemon/algod/api/server/v2/generated/private/routes.go +++ /dev/null @@ -1,558 +0,0 @@ -// Package private provides primitives to interact with the openapi HTTP API. -// -// Code generated by github.com/algorand/oapi-codegen DO NOT EDIT. -package private - -import ( - "bytes" - "compress/gzip" - "encoding/base64" - "fmt" - "net/http" - "net/url" - "path" - "strings" - - "github.com/algorand/oapi-codegen/pkg/runtime" - "github.com/getkin/kin-openapi/openapi3" - "github.com/labstack/echo/v4" -) - -// ServerInterface represents all server handlers. -type ServerInterface interface { - // Aborts a catchpoint catchup. - // (DELETE /v2/catchup/{catchpoint}) - AbortCatchup(ctx echo.Context, catchpoint string) error - // Starts a catchpoint catchup. - // (POST /v2/catchup/{catchpoint}) - StartCatchup(ctx echo.Context, catchpoint string) error - // Get a RoundStateDelta object for a given round - // (GET /v2/deltas/{round}) - GetRoundStateDelta(ctx echo.Context, round uint64) error - // Removes minimum sync round restriction from the ledger. - // (DELETE /v2/ledger/sync) - UnsetSyncRound(ctx echo.Context) error - // Returns the minimum sync round the ledger is keeping in cache. - // (GET /v2/ledger/sync) - GetSyncRound(ctx echo.Context) error - // Given a round, tells the ledger to keep that round in its cache. - // (POST /v2/ledger/sync/{round}) - SetSyncRound(ctx echo.Context, round uint64) error - // Return a list of participation keys - // (GET /v2/participation) - GetParticipationKeys(ctx echo.Context) error - // Add a participation key to the node - // (POST /v2/participation) - AddParticipationKey(ctx echo.Context) error - // Delete a given participation key by ID - // (DELETE /v2/participation/{participation-id}) - DeleteParticipationKeyByID(ctx echo.Context, participationId string) error - // Get participation key info given a participation ID - // (GET /v2/participation/{participation-id}) - GetParticipationKeyByID(ctx echo.Context, participationId string) error - // Append state proof keys to a participation key - // (POST /v2/participation/{participation-id}) - AppendKeys(ctx echo.Context, participationId string) error - - // (POST /v2/shutdown) - ShutdownNode(ctx echo.Context, params ShutdownNodeParams) error -} - -// ServerInterfaceWrapper converts echo contexts to parameters. -type ServerInterfaceWrapper struct { - Handler ServerInterface -} - -// AbortCatchup converts echo context to params. -func (w *ServerInterfaceWrapper) AbortCatchup(ctx echo.Context) error { - var err error - // ------------- Path parameter "catchpoint" ------------- - var catchpoint string - - err = runtime.BindStyledParameterWithLocation("simple", false, "catchpoint", runtime.ParamLocationPath, ctx.Param("catchpoint"), &catchpoint) - if err != nil { - return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter catchpoint: %s", err)) - } - - ctx.Set(Api_keyScopes, []string{""}) - - // Invoke the callback with all the unmarshalled arguments - err = w.Handler.AbortCatchup(ctx, catchpoint) - return err -} - -// StartCatchup converts echo context to params. -func (w *ServerInterfaceWrapper) StartCatchup(ctx echo.Context) error { - var err error - // ------------- Path parameter "catchpoint" ------------- - var catchpoint string - - err = runtime.BindStyledParameterWithLocation("simple", false, "catchpoint", runtime.ParamLocationPath, ctx.Param("catchpoint"), &catchpoint) - if err != nil { - return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter catchpoint: %s", err)) - } - - ctx.Set(Api_keyScopes, []string{""}) - - // Invoke the callback with all the unmarshalled arguments - err = w.Handler.StartCatchup(ctx, catchpoint) - return err -} - -// GetRoundStateDelta converts echo context to params. -func (w *ServerInterfaceWrapper) GetRoundStateDelta(ctx echo.Context) error { - var err error - // ------------- Path parameter "round" ------------- - var round uint64 - - err = runtime.BindStyledParameterWithLocation("simple", false, "round", runtime.ParamLocationPath, ctx.Param("round"), &round) - if err != nil { - return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter round: %s", err)) - } - - ctx.Set(Api_keyScopes, []string{""}) - - // Invoke the callback with all the unmarshalled arguments - err = w.Handler.GetRoundStateDelta(ctx, round) - return err -} - -// UnsetSyncRound converts echo context to params. -func (w *ServerInterfaceWrapper) UnsetSyncRound(ctx echo.Context) error { - var err error - - ctx.Set(Api_keyScopes, []string{""}) - - // Invoke the callback with all the unmarshalled arguments - err = w.Handler.UnsetSyncRound(ctx) - return err -} - -// GetSyncRound converts echo context to params. -func (w *ServerInterfaceWrapper) GetSyncRound(ctx echo.Context) error { - var err error - - ctx.Set(Api_keyScopes, []string{""}) - - // Invoke the callback with all the unmarshalled arguments - err = w.Handler.GetSyncRound(ctx) - return err -} - -// SetSyncRound converts echo context to params. -func (w *ServerInterfaceWrapper) SetSyncRound(ctx echo.Context) error { - var err error - // ------------- Path parameter "round" ------------- - var round uint64 - - err = runtime.BindStyledParameterWithLocation("simple", false, "round", runtime.ParamLocationPath, ctx.Param("round"), &round) - if err != nil { - return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter round: %s", err)) - } - - ctx.Set(Api_keyScopes, []string{""}) - - // Invoke the callback with all the unmarshalled arguments - err = w.Handler.SetSyncRound(ctx, round) - return err -} - -// GetParticipationKeys converts echo context to params. -func (w *ServerInterfaceWrapper) GetParticipationKeys(ctx echo.Context) error { - var err error - - ctx.Set(Api_keyScopes, []string{""}) - - // Invoke the callback with all the unmarshalled arguments - err = w.Handler.GetParticipationKeys(ctx) - return err -} - -// AddParticipationKey converts echo context to params. -func (w *ServerInterfaceWrapper) AddParticipationKey(ctx echo.Context) error { - var err error - - ctx.Set(Api_keyScopes, []string{""}) - - // Invoke the callback with all the unmarshalled arguments - err = w.Handler.AddParticipationKey(ctx) - return err -} - -// DeleteParticipationKeyByID converts echo context to params. -func (w *ServerInterfaceWrapper) DeleteParticipationKeyByID(ctx echo.Context) error { - var err error - // ------------- Path parameter "participation-id" ------------- - var participationId string - - err = runtime.BindStyledParameterWithLocation("simple", false, "participation-id", runtime.ParamLocationPath, ctx.Param("participation-id"), &participationId) - if err != nil { - return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter participation-id: %s", err)) - } - - ctx.Set(Api_keyScopes, []string{""}) - - // Invoke the callback with all the unmarshalled arguments - err = w.Handler.DeleteParticipationKeyByID(ctx, participationId) - return err -} - -// GetParticipationKeyByID converts echo context to params. -func (w *ServerInterfaceWrapper) GetParticipationKeyByID(ctx echo.Context) error { - var err error - // ------------- Path parameter "participation-id" ------------- - var participationId string - - err = runtime.BindStyledParameterWithLocation("simple", false, "participation-id", runtime.ParamLocationPath, ctx.Param("participation-id"), &participationId) - if err != nil { - return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter participation-id: %s", err)) - } - - ctx.Set(Api_keyScopes, []string{""}) - - // Invoke the callback with all the unmarshalled arguments - err = w.Handler.GetParticipationKeyByID(ctx, participationId) - return err -} - -// AppendKeys converts echo context to params. -func (w *ServerInterfaceWrapper) AppendKeys(ctx echo.Context) error { - var err error - // ------------- Path parameter "participation-id" ------------- - var participationId string - - err = runtime.BindStyledParameterWithLocation("simple", false, "participation-id", runtime.ParamLocationPath, ctx.Param("participation-id"), &participationId) - if err != nil { - return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter participation-id: %s", err)) - } - - ctx.Set(Api_keyScopes, []string{""}) - - // Invoke the callback with all the unmarshalled arguments - err = w.Handler.AppendKeys(ctx, participationId) - return err -} - -// ShutdownNode converts echo context to params. -func (w *ServerInterfaceWrapper) ShutdownNode(ctx echo.Context) error { - var err error - - ctx.Set(Api_keyScopes, []string{""}) - - // Parameter object where we will unmarshal all parameters from the context - var params ShutdownNodeParams - // ------------- Optional query parameter "timeout" ------------- - - err = runtime.BindQueryParameter("form", true, false, "timeout", ctx.QueryParams(), ¶ms.Timeout) - if err != nil { - return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter timeout: %s", err)) - } - - // Invoke the callback with all the unmarshalled arguments - err = w.Handler.ShutdownNode(ctx, params) - return err -} - -// This is a simple interface which specifies echo.Route addition functions which -// are present on both echo.Echo and echo.Group, since we want to allow using -// either of them for path registration -type EchoRouter interface { - CONNECT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route - DELETE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route - GET(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route - HEAD(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route - OPTIONS(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route - PATCH(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route - POST(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route - PUT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route - TRACE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route -} - -// RegisterHandlers adds each server route to the EchoRouter. -func RegisterHandlers(router EchoRouter, si ServerInterface, m ...echo.MiddlewareFunc) { - RegisterHandlersWithBaseURL(router, si, "", m...) -} - -// Registers handlers, and prepends BaseURL to the paths, so that the paths -// can be served under a prefix. -func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL string, m ...echo.MiddlewareFunc) { - - wrapper := ServerInterfaceWrapper{ - Handler: si, - } - - router.DELETE(baseURL+"/v2/catchup/:catchpoint", wrapper.AbortCatchup, m...) - router.POST(baseURL+"/v2/catchup/:catchpoint", wrapper.StartCatchup, m...) - router.GET(baseURL+"/v2/deltas/:round", wrapper.GetRoundStateDelta, m...) - router.DELETE(baseURL+"/v2/ledger/sync", wrapper.UnsetSyncRound, m...) - router.GET(baseURL+"/v2/ledger/sync", wrapper.GetSyncRound, m...) - router.POST(baseURL+"/v2/ledger/sync/:round", wrapper.SetSyncRound, m...) - router.GET(baseURL+"/v2/participation", wrapper.GetParticipationKeys, m...) - router.POST(baseURL+"/v2/participation", wrapper.AddParticipationKey, m...) - router.DELETE(baseURL+"/v2/participation/:participation-id", wrapper.DeleteParticipationKeyByID, m...) - router.GET(baseURL+"/v2/participation/:participation-id", wrapper.GetParticipationKeyByID, m...) - router.POST(baseURL+"/v2/participation/:participation-id", wrapper.AppendKeys, m...) - router.POST(baseURL+"/v2/shutdown", wrapper.ShutdownNode, m...) - -} - -// Base64 encoded, gzipped, json marshaled Swagger object -var swaggerSpec = []string{ - - "H4sIAAAAAAAC/+x9+3PcNtLgv4Ka/aqc+IYj+ZVdq2rrO8V2vLo4XpelZO8+25dgyJ4ZrEiAC4DSTHz6", - "36/QAEiQBDnUY5XNfv7J1hCPRqPR6Dc+z1JRlIID12p29HlWUkkL0CDxL5qmouI6YZn5KwOVSlZqJvjs", - "yH8jSkvG17P5jJlfS6o3s/mM0wKaNqb/fCbhHxWTkM2OtKxgPlPpBgpqBta70rSuR9oma5G4IY7tECcv", - "Z1cjH2iWSVCqD+Vfeb4jjKd5lQHRknJFU/NJkUumN0RvmCKuM2GcCA5ErIjetBqTFYM8Uwu/yH9UIHfB", - "Kt3kw0u6akBMpMihD+cLUSwZBw8V1EDVG0K0IBmssNGGamJmMLD6hloQBVSmG7IScg+oFogQXuBVMTv6", - "MFPAM5C4WymwC/zvSgL8Commcg169mkeW9xKg0w0KyJLO3HYl6CqXCuCbXGNa3YBnJheC/JDpTRZAqGc", - "vP/uBXny5Mlzs5CCag2ZI7LBVTWzh2uy3WdHs4xq8J/7tEbztZCUZ0nd/v13L3D+U7fAqa2oUhA/LMfm", - "Czl5ObQA3zFCQoxrWOM+tKjf9IgciubnJayEhIl7Yhvf6aaE8/+mu5JSnW5KwbiO7AvBr8R+jvKwoPsY", - "D6sBaLUvDaakGfTDYfL80+dH80eHV3/4cJz8l/vz2ZOrict/UY+7BwPRhmklJfB0l6wlUDwtG8r7+Hjv", - "6EFtRJVnZEMvcPNpgaze9SWmr2WdFzSvDJ2wVIrjfC0UoY6MMljRKtfET0wqnhs2ZUZz1E6YIqUUFyyD", - "bG647+WGpRuSUmWHwHbkkuW5ocFKQTZEa/HVjRymqxAlBq4b4QMX9K+LjGZdezABW+QGSZoLBYkWe64n", - "f+NQnpHwQmnuKnW9y4qcbYDg5OaDvWwRd9zQdJ7viMZ9zQhVhBJ/Nc0JW5GdqM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4PQM0KH3fD", - "8Sl3x79+Y+7x7PDJ/U1/CvKCpUDOoCiFpJLlO/Ijr2vL3JibGXZDSef4uAot/eMxxt9sDaYDrLu5azRY", - "//OOp2OK649cgTcX21pOO54O8T5sfLrj6fuaI/X4yn3frac1vHiUMLb1yx37b3JK3kMhLkARd78FxGnk", - "Qi2ZDRTEoLGGhoe0q6F73wU89OfwwR7NsD1ZYM9pmI7/tpA8ErM8Cc49SQZ2+JhoPO95/5z43Ul3tVM9", - "iG3N7AsL+MIC7pAF6ErywSMa3FyYeAOlq/Sb0nQDiykX546noXYQt8GcjrAJVytuiEuctrnE71BXuO8D", - "/YJyf5Jbe21jvKnMGch6/ynvl+/7cv7/fQRlZ/yU9rkYDXmuwlOvBZ56qzb5mhY2fnQvByi7785HJQTL", - "gTC13gYL99/rjkkG3fRbdVsJYVoyTzfpt++Q73tex1b2395Wdq82gdb2ke9hR94KTb7zYtXv0W437fiM", - "eUM63tEs6xG5ve9A6W9FthvBUKHWpastGPFNLBk3IPctzD3UnNkHrjr58jar02fvcJFB7yK+ulMtwYAQ", - "K5ODcetGDvIRtS1Qo8nf3eweO/IUDeFdZ3A/qaqWBVM+tukLD/nCQ/59hJLjLItWzGgf/R5Pm8+2SSoy", - "WANPHMNKliLb+dcZWwOeg42e6wkqB59bf7pImkEL30v8vbYn9oFe7sjJy54EY7t1Oe23O2za0WEiekgX", - "xFGVpMuLBjwWY2RuFrIWui7+Yhf1hfF8YTy3El4mH57p9kanz3Tv5Ll/IiH2mBPV/amn6By/6XG9k43u", - "6zMx/cVWFoGMBB9sObQumr+whC8s4XYs4TVEDiOeWsckIkR3k2ivPoPAIgpZK+URnws1eodrXuVUotls", - "mpniGEd0xon74BL3raRFcZXVpsQtswmskQ27W73tC4v7wuJ+R5Gr+xlNWxC5tqZzDruClrV+ozaVzsQl", - "H/G/lJAymrunkjG5tk4W0YL4AZpaheSvrhR4vsOMYpYZMU6zAoxIVfM609lXoGlS58wIRG1cUvGacZwA", - "WQXOYt8Ep0EVMAWp4JmKeH8cZG+tThhjsv+oADmaw42DcTZvBVy6bfxnBHj14yOvRozmSBW2DEA/YcN8", - "rFT374NLynSyEtJVCET09TtroPmBe2Gn82tTLb73BUvgBz8GyR3xXw/q9ymjH7tZM7GvLmvEN2rS4sI0", - "M9zgOsHswyezT/jgsdv7Jmvq6OAAy2pthNIHs6v5505GVfjxU701n+tr2W3R1aer/x8AAP//4FjTqrnq", - "AAA=", -} - -// GetSwagger returns the content of the embedded swagger specification file -// or error if failed to decode -func decodeSpec() ([]byte, error) { - zipped, err := base64.StdEncoding.DecodeString(strings.Join(swaggerSpec, "")) - if err != nil { - return nil, fmt.Errorf("error base64 decoding spec: %s", err) - } - zr, err := gzip.NewReader(bytes.NewReader(zipped)) - if err != nil { - return nil, fmt.Errorf("error decompressing spec: %s", err) - } - var buf bytes.Buffer - _, err = buf.ReadFrom(zr) - if err != nil { - return nil, fmt.Errorf("error decompressing spec: %s", err) - } - - return buf.Bytes(), nil -} - -var rawSpec = decodeSpecCached() - -// a naive cached of a decoded swagger spec -func decodeSpecCached() func() ([]byte, error) { - data, err := decodeSpec() - return func() ([]byte, error) { - return data, err - } -} - -// Constructs a synthetic filesystem for resolving external references when loading openapi specifications. -func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error) { - var res = make(map[string]func() ([]byte, error)) - if len(pathToFile) > 0 { - res[pathToFile] = rawSpec - } - - return res -} - -// GetSwagger returns the Swagger specification corresponding to the generated code -// in this file. The external references of Swagger specification are resolved. -// The logic of resolving external references is tightly connected to "import-mapping" feature. -// Externally referenced files must be embedded in the corresponding golang packages. -// Urls can be supported but this task was out of the scope. -func GetSwagger() (swagger *openapi3.T, err error) { - var resolvePath = PathToRawSpec("") - - loader := openapi3.NewLoader() - loader.IsExternalRefsAllowed = true - loader.ReadFromURIFunc = func(loader *openapi3.Loader, url *url.URL) ([]byte, error) { - var pathToFile = url.String() - pathToFile = path.Clean(pathToFile) - getSpec, ok := resolvePath[pathToFile] - if !ok { - err1 := fmt.Errorf("path not found: %s", pathToFile) - return nil, err1 - } - return getSpec() - } - var specData []byte - specData, err = rawSpec() - if err != nil { - return - } - swagger, err = loader.LoadFromData(specData) - if err != nil { - return - } - return -} diff --git a/daemon/algod/api/server/v2/generated/private/types.go b/daemon/algod/api/server/v2/generated/private/types.go deleted file mode 100644 index 4ad320d9e4..0000000000 --- a/daemon/algod/api/server/v2/generated/private/types.go +++ /dev/null @@ -1,1094 +0,0 @@ -// Package private provides primitives to interact with the openapi HTTP API. -// -// Code generated by github.com/algorand/oapi-codegen DO NOT EDIT. -package private - -import ( - "encoding/json" - "time" -) - -const ( - Api_keyScopes = "api_key.Scopes" -) - -// Defines values for AccountSigType. -const ( - AccountSigTypeLsig AccountSigType = "lsig" - AccountSigTypeMsig AccountSigType = "msig" - AccountSigTypeSig AccountSigType = "sig" -) - -// Defines values for ModifiedCreatableCreatableType. -const ( - ModifiedCreatableCreatableTypeApp ModifiedCreatableCreatableType = "app" - ModifiedCreatableCreatableTypeAsset ModifiedCreatableCreatableType = "asset" -) - -// Defines values for AddressRole. -const ( - FreezeTarget AddressRole = "freeze-target" - Receiver AddressRole = "receiver" - Sender AddressRole = "sender" -) - -// Defines values for Format. -const ( - Json Format = "json" - Msgpack Format = "msgpack" -) - -// Defines values for SigType. -const ( - SigTypeLsig SigType = "lsig" - SigTypeMsig SigType = "msig" - SigTypeSig SigType = "sig" -) - -// Defines values for TxType. -const ( - Acfg TxType = "acfg" - Afrz TxType = "afrz" - Appl TxType = "appl" - Axfer TxType = "axfer" - Keyreg TxType = "keyreg" - Pay TxType = "pay" - Stpf TxType = "stpf" -) - -// Defines values for TransactionProofResponseHashtype. -const ( - Sha256 TransactionProofResponseHashtype = "sha256" - Sha512256 TransactionProofResponseHashtype = "sha512_256" -) - -// Account Account information at a given round. -// -// Definition: -// data/basics/userBalance.go : AccountData -type Account struct { - // Address the account public key - Address string `json:"address"` - - // Amount \[algo\] total number of MicroAlgos in the account - Amount uint64 `json:"amount"` - - // AmountWithoutPendingRewards specifies the amount of MicroAlgos in the account, without the pending rewards. - AmountWithoutPendingRewards uint64 `json:"amount-without-pending-rewards"` - - // AppsLocalState \[appl\] applications local data stored in this account. - // - // Note the raw object uses `map[int] -> AppLocalState` for this type. - AppsLocalState *[]ApplicationLocalState `json:"apps-local-state,omitempty"` - - // AppsTotalExtraPages \[teap\] the sum of all extra application program pages for this account. - AppsTotalExtraPages *uint64 `json:"apps-total-extra-pages,omitempty"` - - // AppsTotalSchema Specifies maximums on the number of each type that may be stored. - AppsTotalSchema *ApplicationStateSchema `json:"apps-total-schema,omitempty"` - - // Assets \[asset\] assets held by this account. - // - // Note the raw object uses `map[int] -> AssetHolding` for this type. - Assets *[]AssetHolding `json:"assets,omitempty"` - - // AuthAddr \[spend\] the address against which signing should be checked. If empty, the address of the current account is used. This field can be updated in any transaction by setting the RekeyTo field. - AuthAddr *string `json:"auth-addr,omitempty"` - - // CreatedApps \[appp\] parameters of applications created by this account including app global data. - // - // Note: the raw account uses `map[int] -> AppParams` for this type. - CreatedApps *[]Application `json:"created-apps,omitempty"` - - // CreatedAssets \[apar\] parameters of assets created by this account. - // - // Note: the raw account uses `map[int] -> Asset` for this type. - CreatedAssets *[]Asset `json:"created-assets,omitempty"` - - // MinBalance MicroAlgo balance required by the account. - // - // The requirement grows based on asset and application usage. - MinBalance uint64 `json:"min-balance"` - - // Participation AccountParticipation describes the parameters used by this account in consensus protocol. - Participation *AccountParticipation `json:"participation,omitempty"` - - // PendingRewards amount of MicroAlgos of pending rewards in this account. - PendingRewards uint64 `json:"pending-rewards"` - - // RewardBase \[ebase\] used as part of the rewards computation. Only applicable to accounts which are participating. - RewardBase *uint64 `json:"reward-base,omitempty"` - - // Rewards \[ern\] total rewards of MicroAlgos the account has received, including pending rewards. - Rewards uint64 `json:"rewards"` - - // Round The round for which this information is relevant. - Round uint64 `json:"round"` - - // SigType Indicates what type of signature is used by this account, must be one of: - // * sig - // * msig - // * lsig - SigType *AccountSigType `json:"sig-type,omitempty"` - - // Status \[onl\] delegation status of the account's MicroAlgos - // * Offline - indicates that the associated account is delegated. - // * Online - indicates that the associated account used as part of the delegation pool. - // * NotParticipating - indicates that the associated account is neither a delegator nor a delegate. - Status string `json:"status"` - - // TotalAppsOptedIn The count of all applications that have been opted in, equivalent to the count of application local data (AppLocalState objects) stored in this account. - TotalAppsOptedIn uint64 `json:"total-apps-opted-in"` - - // TotalAssetsOptedIn The count of all assets that have been opted in, equivalent to the count of AssetHolding objects held by this account. - TotalAssetsOptedIn uint64 `json:"total-assets-opted-in"` - - // TotalBoxBytes \[tbxb\] The total number of bytes used by this account's app's box keys and values. - TotalBoxBytes *uint64 `json:"total-box-bytes,omitempty"` - - // TotalBoxes \[tbx\] The number of existing boxes created by this account's app. - TotalBoxes *uint64 `json:"total-boxes,omitempty"` - - // TotalCreatedApps The count of all apps (AppParams objects) created by this account. - TotalCreatedApps uint64 `json:"total-created-apps"` - - // TotalCreatedAssets The count of all assets (AssetParams objects) created by this account. - TotalCreatedAssets uint64 `json:"total-created-assets"` -} - -// AccountSigType Indicates what type of signature is used by this account, must be one of: -// * sig -// * msig -// * lsig -type AccountSigType string - -// AccountBalanceRecord Account and its address -type AccountBalanceRecord struct { - // AccountData Account information at a given round. - // - // Definition: - // data/basics/userBalance.go : AccountData - AccountData Account `json:"account-data"` - - // Address Address of the updated account. - Address string `json:"address"` -} - -// AccountDeltas Exposes deltas for account based resources in a single round -type AccountDeltas struct { - // Accounts Array of Account updates for the round - Accounts *[]AccountBalanceRecord `json:"accounts,omitempty"` - - // Apps Array of App updates for the round. - Apps *[]AppResourceRecord `json:"apps,omitempty"` - - // Assets Array of Asset updates for the round. - Assets *[]AssetResourceRecord `json:"assets,omitempty"` -} - -// AccountParticipation AccountParticipation describes the parameters used by this account in consensus protocol. -type AccountParticipation struct { - // SelectionParticipationKey \[sel\] Selection public key (if any) currently registered for this round. - SelectionParticipationKey []byte `json:"selection-participation-key"` - - // StateProofKey \[stprf\] Root of the state proof key (if any) - StateProofKey *[]byte `json:"state-proof-key,omitempty"` - - // VoteFirstValid \[voteFst\] First round for which this participation is valid. - VoteFirstValid uint64 `json:"vote-first-valid"` - - // VoteKeyDilution \[voteKD\] Number of subkeys in each batch of participation keys. - VoteKeyDilution uint64 `json:"vote-key-dilution"` - - // VoteLastValid \[voteLst\] Last round for which this participation is valid. - VoteLastValid uint64 `json:"vote-last-valid"` - - // VoteParticipationKey \[vote\] root participation public key (if any) currently registered for this round. - VoteParticipationKey []byte `json:"vote-participation-key"` -} - -// AccountStateDelta Application state delta. -type AccountStateDelta struct { - Address string `json:"address"` - - // Delta Application state delta. - Delta StateDelta `json:"delta"` -} - -// AccountTotals Total Algos in the system grouped by account status -type AccountTotals struct { - // NotParticipating Amount of stake in non-participating accounts - NotParticipating uint64 `json:"not-participating"` - - // Offline Amount of stake in offline accounts - Offline uint64 `json:"offline"` - - // Online Amount of stake in online accounts - Online uint64 `json:"online"` - - // RewardsLevel Total number of algos received per reward unit since genesis - RewardsLevel uint64 `json:"rewards-level"` -} - -// AppResourceRecord Represents AppParams and AppLocalStateDelta in deltas -type AppResourceRecord struct { - // Address App account address - Address string `json:"address"` - - // AppIndex App index - AppIndex uint64 `json:"app-index"` - - // AppLocalState Stores local state associated with an application. - AppLocalState *ApplicationLocalState `json:"app-local-state,omitempty"` - - // AppLocalStateDeleted Whether the app local state was deleted - AppLocalStateDeleted bool `json:"app-local-state-deleted"` - - // AppParams Stores the global information associated with an application. - AppParams *ApplicationParams `json:"app-params,omitempty"` - - // AppParamsDeleted Whether the app params were deleted - AppParamsDeleted bool `json:"app-params-deleted"` -} - -// Application Application index and its parameters -type Application struct { - // Id \[appidx\] application index. - Id uint64 `json:"id"` - - // Params Stores the global information associated with an application. - Params ApplicationParams `json:"params"` -} - -// ApplicationLocalState Stores local state associated with an application. -type ApplicationLocalState struct { - // Id The application which this local state is for. - Id uint64 `json:"id"` - - // KeyValue Represents a key-value store for use in an application. - KeyValue *TealKeyValueStore `json:"key-value,omitempty"` - - // Schema Specifies maximums on the number of each type that may be stored. - Schema ApplicationStateSchema `json:"schema"` -} - -// ApplicationParams Stores the global information associated with an application. -type ApplicationParams struct { - // ApprovalProgram \[approv\] approval program. - ApprovalProgram []byte `json:"approval-program"` - - // ClearStateProgram \[clearp\] approval program. - ClearStateProgram []byte `json:"clear-state-program"` - - // Creator The address that created this application. This is the address where the parameters and global state for this application can be found. - Creator string `json:"creator"` - - // ExtraProgramPages \[epp\] the amount of extra program pages available to this app. - ExtraProgramPages *uint64 `json:"extra-program-pages,omitempty"` - - // GlobalState Represents a key-value store for use in an application. - GlobalState *TealKeyValueStore `json:"global-state,omitempty"` - - // GlobalStateSchema Specifies maximums on the number of each type that may be stored. - GlobalStateSchema *ApplicationStateSchema `json:"global-state-schema,omitempty"` - - // LocalStateSchema Specifies maximums on the number of each type that may be stored. - LocalStateSchema *ApplicationStateSchema `json:"local-state-schema,omitempty"` -} - -// ApplicationStateSchema Specifies maximums on the number of each type that may be stored. -type ApplicationStateSchema struct { - // NumByteSlice \[nbs\] num of byte slices. - NumByteSlice uint64 `json:"num-byte-slice"` - - // NumUint \[nui\] num of uints. - NumUint uint64 `json:"num-uint"` -} - -// Asset Specifies both the unique identifier and the parameters for an asset -type Asset struct { - // Index unique asset identifier - Index uint64 `json:"index"` - - // Params AssetParams specifies the parameters for an asset. - // - // \[apar\] when part of an AssetConfig transaction. - // - // Definition: - // data/transactions/asset.go : AssetParams - Params AssetParams `json:"params"` -} - -// AssetHolding Describes an asset held by an account. -// -// Definition: -// data/basics/userBalance.go : AssetHolding -type AssetHolding struct { - // Amount \[a\] number of units held. - Amount uint64 `json:"amount"` - - // AssetId Asset ID of the holding. - AssetID uint64 `json:"asset-id"` - - // IsFrozen \[f\] whether or not the holding is frozen. - IsFrozen bool `json:"is-frozen"` -} - -// AssetParams AssetParams specifies the parameters for an asset. -// -// \[apar\] when part of an AssetConfig transaction. -// -// Definition: -// data/transactions/asset.go : AssetParams -type AssetParams struct { - // Clawback \[c\] Address of account used to clawback holdings of this asset. If empty, clawback is not permitted. - Clawback *string `json:"clawback,omitempty"` - - // Creator The address that created this asset. This is the address where the parameters for this asset can be found, and also the address where unwanted asset units can be sent in the worst case. - Creator string `json:"creator"` - - // Decimals \[dc\] The number of digits to use after the decimal point when displaying this asset. If 0, the asset is not divisible. If 1, the base unit of the asset is in tenths. If 2, the base unit of the asset is in hundredths, and so on. This value must be between 0 and 19 (inclusive). - Decimals uint64 `json:"decimals"` - - // DefaultFrozen \[df\] Whether holdings of this asset are frozen by default. - DefaultFrozen *bool `json:"default-frozen,omitempty"` - - // Freeze \[f\] Address of account used to freeze holdings of this asset. If empty, freezing is not permitted. - Freeze *string `json:"freeze,omitempty"` - - // Manager \[m\] Address of account used to manage the keys of this asset and to destroy it. - Manager *string `json:"manager,omitempty"` - - // MetadataHash \[am\] A commitment to some unspecified asset metadata. The format of this metadata is up to the application. - MetadataHash *[]byte `json:"metadata-hash,omitempty"` - - // Name \[an\] Name of this asset, as supplied by the creator. Included only when the asset name is composed of printable utf-8 characters. - Name *string `json:"name,omitempty"` - - // NameB64 Base64 encoded name of this asset, as supplied by the creator. - NameB64 *[]byte `json:"name-b64,omitempty"` - - // Reserve \[r\] Address of account holding reserve (non-minted) units of this asset. - Reserve *string `json:"reserve,omitempty"` - - // Total \[t\] The total number of units of this asset. - Total uint64 `json:"total"` - - // UnitName \[un\] Name of a unit of this asset, as supplied by the creator. Included only when the name of a unit of this asset is composed of printable utf-8 characters. - UnitName *string `json:"unit-name,omitempty"` - - // UnitNameB64 Base64 encoded name of a unit of this asset, as supplied by the creator. - UnitNameB64 *[]byte `json:"unit-name-b64,omitempty"` - - // Url \[au\] URL where more information about the asset can be retrieved. Included only when the URL is composed of printable utf-8 characters. - Url *string `json:"url,omitempty"` - - // UrlB64 Base64 encoded URL where more information about the asset can be retrieved. - UrlB64 *[]byte `json:"url-b64,omitempty"` -} - -// AssetResourceRecord Represents AssetParams and AssetHolding in deltas -type AssetResourceRecord struct { - // Address Account address of the asset - Address string `json:"address"` - - // AssetHolding Describes an asset held by an account. - // - // Definition: - // data/basics/userBalance.go : AssetHolding - AssetHolding *AssetHolding `json:"asset-holding,omitempty"` - - // AssetHoldingDeleted Whether the asset holding was deleted - AssetHoldingDeleted bool `json:"asset-holding-deleted"` - - // AssetIndex Index of the asset - AssetIndex uint64 `json:"asset-index"` - - // AssetParams AssetParams specifies the parameters for an asset. - // - // \[apar\] when part of an AssetConfig transaction. - // - // Definition: - // data/transactions/asset.go : AssetParams - AssetParams *AssetParams `json:"asset-params,omitempty"` - - // AssetParamsDeleted Whether the asset params were deleted - AssetParamsDeleted bool `json:"asset-params-deleted"` -} - -// Box Box name and its content. -type Box struct { - // Name \[name\] box name, base64 encoded - Name []byte `json:"name"` - - // Value \[value\] box value, base64 encoded. - Value []byte `json:"value"` -} - -// BoxDescriptor Box descriptor describes a Box. -type BoxDescriptor struct { - // Name Base64 encoded box name - Name []byte `json:"name"` -} - -// BuildVersion defines model for BuildVersion. -type BuildVersion struct { - Branch string `json:"branch"` - BuildNumber uint64 `json:"build_number"` - Channel string `json:"channel"` - CommitHash string `json:"commit_hash"` - Major uint64 `json:"major"` - Minor uint64 `json:"minor"` -} - -// DryrunRequest Request data type for dryrun endpoint. Given the Transactions and simulated ledger state upload, run TEAL scripts and return debugging information. -type DryrunRequest struct { - Accounts []Account `json:"accounts"` - Apps []Application `json:"apps"` - - // LatestTimestamp LatestTimestamp is available to some TEAL scripts. Defaults to the latest confirmed timestamp this algod is attached to. - LatestTimestamp uint64 `json:"latest-timestamp"` - - // ProtocolVersion ProtocolVersion specifies a specific version string to operate under, otherwise whatever the current protocol of the network this algod is running in. - ProtocolVersion string `json:"protocol-version"` - - // Round Round is available to some TEAL scripts. Defaults to the current round on the network this algod is attached to. - Round uint64 `json:"round"` - Sources []DryrunSource `json:"sources"` - Txns []json.RawMessage `json:"txns"` -} - -// DryrunSource DryrunSource is TEAL source text that gets uploaded, compiled, and inserted into transactions or application state. -type DryrunSource struct { - AppIndex uint64 `json:"app-index"` - - // FieldName FieldName is what kind of sources this is. If lsig then it goes into the transactions[this.TxnIndex].LogicSig. If approv or clearp it goes into the Approval Program or Clear State Program of application[this.AppIndex]. - FieldName string `json:"field-name"` - Source string `json:"source"` - TxnIndex uint64 `json:"txn-index"` -} - -// DryrunState Stores the TEAL eval step data -type DryrunState struct { - // Error Evaluation error if any - Error *string `json:"error,omitempty"` - - // Line Line number - Line uint64 `json:"line"` - - // Pc Program counter - Pc uint64 `json:"pc"` - Scratch *[]TealValue `json:"scratch,omitempty"` - Stack []TealValue `json:"stack"` -} - -// DryrunTxnResult DryrunTxnResult contains any LogicSig or ApplicationCall program debug information and state updates from a dryrun. -type DryrunTxnResult struct { - AppCallMessages *[]string `json:"app-call-messages,omitempty"` - AppCallTrace *[]DryrunState `json:"app-call-trace,omitempty"` - - // BudgetAdded Budget added during execution of app call transaction. - BudgetAdded *uint64 `json:"budget-added,omitempty"` - - // BudgetConsumed Budget consumed during execution of app call transaction. - BudgetConsumed *uint64 `json:"budget-consumed,omitempty"` - - // Cost Net cost of app execution. Field is DEPRECATED and is subject for removal. Instead, use `budget-added` and `budget-consumed. - Cost *uint64 `json:"cost,omitempty"` - - // Disassembly Disassembled program line by line. - Disassembly []string `json:"disassembly"` - - // GlobalDelta Application state delta. - GlobalDelta *StateDelta `json:"global-delta,omitempty"` - LocalDeltas *[]AccountStateDelta `json:"local-deltas,omitempty"` - - // LogicSigDisassembly Disassembled lsig program line by line. - LogicSigDisassembly *[]string `json:"logic-sig-disassembly,omitempty"` - LogicSigMessages *[]string `json:"logic-sig-messages,omitempty"` - LogicSigTrace *[]DryrunState `json:"logic-sig-trace,omitempty"` - Logs *[][]byte `json:"logs,omitempty"` -} - -// ErrorResponse An error response with optional data field. -type ErrorResponse struct { - Data *map[string]interface{} `json:"data,omitempty"` - Message string `json:"message"` -} - -// EvalDelta Represents a TEAL value delta. -type EvalDelta struct { - // Action \[at\] delta action. - Action uint64 `json:"action"` - - // Bytes \[bs\] bytes value. - Bytes *string `json:"bytes,omitempty"` - - // Uint \[ui\] uint value. - Uint *uint64 `json:"uint,omitempty"` -} - -// EvalDeltaKeyValue Key-value pairs for StateDelta. -type EvalDeltaKeyValue struct { - Key string `json:"key"` - - // Value Represents a TEAL value delta. - Value EvalDelta `json:"value"` -} - -// IncludedTransaction Location information for a transaction included in a block -type IncludedTransaction struct { - // Intra Intra round index of the transaction in the block. - Intra uint64 `json:"intra"` - - // LastValid Last valid round of the included transaction. - LastValid uint64 `json:"lastValid"` - - // TxId ID of the transaction. - TxId string `json:"txId"` -} - -// KvDelta A single Delta containing the key, the previous value and the current value for a single round. -type KvDelta struct { - Key *[]byte `json:"key,omitempty"` - - // PrevValue The previous value of the KV store entry. - PrevValue *[]byte `json:"prev-value,omitempty"` - - // Value The new value of the KV store entry. - Value *[]byte `json:"value,omitempty"` -} - -// LightBlockHeaderProof Proof of membership and position of a light block header. -type LightBlockHeaderProof struct { - // Index The index of the light block header in the vector commitment tree - Index uint64 `json:"index"` - - // Proof The encoded proof. - Proof []byte `json:"proof"` - - // Treedepth Represents the depth of the tree that is being proven, i.e. the number of edges from a leaf to the root. - Treedepth uint64 `json:"treedepth"` -} - -// ModifiedCreatable Creatable which was created or deleted during the round. -type ModifiedCreatable struct { - // CreatableType Type of creatable - CreatableType ModifiedCreatableCreatableType `json:"creatable-type"` - - // Created Created during this round if true, deleted if false - Created bool `json:"created"` - - // Creator Address of the creator of the Creatable. - Creator string `json:"creator"` - - // Index Index of the Creatable - Index uint64 `json:"index"` -} - -// ModifiedCreatableCreatableType Type of creatable -type ModifiedCreatableCreatableType string - -// ParticipationKey Represents a participation key used by the node. -type ParticipationKey struct { - // Address Address the key was generated for. - Address string `json:"address"` - - // EffectiveFirstValid When registered, this is the first round it may be used. - EffectiveFirstValid *uint64 `json:"effective-first-valid,omitempty"` - - // EffectiveLastValid When registered, this is the last round it may be used. - EffectiveLastValid *uint64 `json:"effective-last-valid,omitempty"` - - // Id The key's ParticipationID. - Id string `json:"id"` - - // Key AccountParticipation describes the parameters used by this account in consensus protocol. - Key AccountParticipation `json:"key"` - - // LastBlockProposal Round when this key was last used to propose a block. - LastBlockProposal *uint64 `json:"last-block-proposal,omitempty"` - - // LastStateProof Round when this key was last used to generate a state proof. - LastStateProof *uint64 `json:"last-state-proof,omitempty"` - - // LastVote Round when this key was last used to vote. - LastVote *uint64 `json:"last-vote,omitempty"` -} - -// PendingTransactionResponse Details about a pending transaction. If the transaction was recently confirmed, includes confirmation details like the round and reward details. -type PendingTransactionResponse struct { - // ApplicationIndex The application index if the transaction was found and it created an application. - ApplicationIndex *uint64 `json:"application-index,omitempty"` - - // AssetClosingAmount The number of the asset's unit that were transferred to the close-to address. - AssetClosingAmount *uint64 `json:"asset-closing-amount,omitempty"` - - // AssetIndex The asset index if the transaction was found and it created an asset. - AssetIndex *uint64 `json:"asset-index,omitempty"` - - // CloseRewards Rewards in microalgos applied to the close remainder to account. - CloseRewards *uint64 `json:"close-rewards,omitempty"` - - // ClosingAmount Closing amount for the transaction. - ClosingAmount *uint64 `json:"closing-amount,omitempty"` - - // ConfirmedRound The round where this transaction was confirmed, if present. - ConfirmedRound *uint64 `json:"confirmed-round,omitempty"` - - // GlobalStateDelta Application state delta. - GlobalStateDelta *StateDelta `json:"global-state-delta,omitempty"` - - // InnerTxns Inner transactions produced by application execution. - InnerTxns *[]PendingTransactionResponse `json:"inner-txns,omitempty"` - - // LocalStateDelta \[ld\] Local state key/value changes for the application being executed by this transaction. - LocalStateDelta *[]AccountStateDelta `json:"local-state-delta,omitempty"` - - // Logs \[lg\] Logs for the application being executed by this transaction. - Logs *[][]byte `json:"logs,omitempty"` - - // PoolError Indicates that the transaction was kicked out of this node's transaction pool (and specifies why that happened). An empty string indicates the transaction wasn't kicked out of this node's txpool due to an error. - PoolError string `json:"pool-error"` - - // ReceiverRewards Rewards in microalgos applied to the receiver account. - ReceiverRewards *uint64 `json:"receiver-rewards,omitempty"` - - // SenderRewards Rewards in microalgos applied to the sender account. - SenderRewards *uint64 `json:"sender-rewards,omitempty"` - - // Txn The raw signed transaction. - Txn map[string]interface{} `json:"txn"` -} - -// RoundStateDelta Contains updates from a given round. -type RoundStateDelta struct { - // Accts Exposes deltas for account based resources in a single round - Accts *AccountDeltas `json:"accts,omitempty"` - - // Creatables List of modified Creatables for the given round. - Creatables *[]ModifiedCreatable `json:"creatables,omitempty"` - - // KvMods Array of KV Deltas for the round. - KvMods *[]KvDelta `json:"kv-mods,omitempty"` - - // PrevTimestamp Previous block timestamp - PrevTimestamp *uint64 `json:"prev-timestamp,omitempty"` - - // StateProofNext Next round for which we expect a state proof - StateProofNext *uint64 `json:"state-proof-next,omitempty"` - - // Totals Total Algos in the system grouped by account status - Totals *AccountTotals `json:"totals,omitempty"` - - // TxIds List of included transactions for a given round. - TxIds *[]IncludedTransaction `json:"tx-ids,omitempty"` - TxLeases *[]TxLease `json:"tx-leases,omitempty"` -} - -// StateDelta Application state delta. -type StateDelta = []EvalDeltaKeyValue - -// StateProof Represents a state proof and its corresponding message -type StateProof struct { - // Message Represents the message that the state proofs are attesting to. - Message StateProofMessage `json:"Message"` - - // StateProof The encoded StateProof for the message. - StateProof []byte `json:"StateProof"` -} - -// StateProofMessage Represents the message that the state proofs are attesting to. -type StateProofMessage struct { - // BlockHeadersCommitment The vector commitment root on all light block headers within a state proof interval. - BlockHeadersCommitment []byte `json:"BlockHeadersCommitment"` - - // FirstAttestedRound The first round the message attests to. - FirstAttestedRound uint64 `json:"FirstAttestedRound"` - - // LastAttestedRound The last round the message attests to. - LastAttestedRound uint64 `json:"LastAttestedRound"` - - // LnProvenWeight An integer value representing the natural log of the proven weight with 16 bits of precision. This value would be used to verify the next state proof. - LnProvenWeight uint64 `json:"LnProvenWeight"` - - // VotersCommitment The vector commitment root of the top N accounts to sign the next StateProof. - VotersCommitment []byte `json:"VotersCommitment"` -} - -// TealKeyValue Represents a key-value pair in an application store. -type TealKeyValue struct { - Key string `json:"key"` - - // Value Represents a TEAL value. - Value TealValue `json:"value"` -} - -// TealKeyValueStore Represents a key-value store for use in an application. -type TealKeyValueStore = []TealKeyValue - -// TealValue Represents a TEAL value. -type TealValue struct { - // Bytes \[tb\] bytes value. - Bytes string `json:"bytes"` - - // Type \[tt\] value type. Value `1` refers to **bytes**, value `2` refers to **uint** - Type uint64 `json:"type"` - - // Uint \[ui\] uint value. - Uint uint64 `json:"uint"` -} - -// TxLease defines model for TxLease. -type TxLease struct { - // Expiration Round that the lease expires - Expiration uint64 `json:"expiration"` - - // Lease Lease data - Lease []byte `json:"lease"` - - // Sender Address of the lease sender - Sender string `json:"sender"` -} - -// Version algod version information. -type Version struct { - Build BuildVersion `json:"build"` - GenesisHashB64 []byte `json:"genesis_hash_b64"` - GenesisId string `json:"genesis_id"` - Versions []string `json:"versions"` -} - -// AccountID defines model for account-id. -type AccountID = string - -// Address defines model for address. -type Address = string - -// AddressRole defines model for address-role. -type AddressRole string - -// AfterTime defines model for after-time. -type AfterTime = time.Time - -// AssetID defines model for asset-id. -type AssetID uint64 - -// BeforeTime defines model for before-time. -type BeforeTime = time.Time - -// Catchpoint defines model for catchpoint. -type Catchpoint = string - -// CurrencyGreaterThan defines model for currency-greater-than. -type CurrencyGreaterThan uint64 - -// CurrencyLessThan defines model for currency-less-than. -type CurrencyLessThan uint64 - -// ExcludeCloseTo defines model for exclude-close-to. -type ExcludeCloseTo = bool - -// Format defines model for format. -type Format string - -// Limit defines model for limit. -type Limit uint64 - -// Max defines model for max. -type Max uint64 - -// MaxRound defines model for max-round. -type MaxRound uint64 - -// MinRound defines model for min-round. -type MinRound uint64 - -// Next defines model for next. -type Next = string - -// NotePrefix defines model for note-prefix. -type NotePrefix = string - -// Round defines model for round. -type Round uint64 - -// RoundNumber defines model for round-number. -type RoundNumber uint64 - -// SigType defines model for sig-type. -type SigType string - -// TxID defines model for tx-id. -type TxID = string - -// TxType defines model for tx-type. -type TxType string - -// AccountApplicationResponse defines model for AccountApplicationResponse. -type AccountApplicationResponse struct { - // AppLocalState Stores local state associated with an application. - AppLocalState *ApplicationLocalState `json:"app-local-state,omitempty"` - - // CreatedApp Stores the global information associated with an application. - CreatedApp *ApplicationParams `json:"created-app,omitempty"` - - // Round The round for which this information is relevant. - Round uint64 `json:"round"` -} - -// AccountAssetResponse defines model for AccountAssetResponse. -type AccountAssetResponse struct { - // AssetHolding Describes an asset held by an account. - // - // Definition: - // data/basics/userBalance.go : AssetHolding - AssetHolding *AssetHolding `json:"asset-holding,omitempty"` - - // CreatedAsset AssetParams specifies the parameters for an asset. - // - // \[apar\] when part of an AssetConfig transaction. - // - // Definition: - // data/transactions/asset.go : AssetParams - CreatedAsset *AssetParams `json:"created-asset,omitempty"` - - // Round The round for which this information is relevant. - Round uint64 `json:"round"` -} - -// AccountResponse Account information at a given round. -// -// Definition: -// data/basics/userBalance.go : AccountData -type AccountResponse = Account - -// ApplicationResponse Application index and its parameters -type ApplicationResponse = Application - -// AssetResponse Specifies both the unique identifier and the parameters for an asset -type AssetResponse = Asset - -// BlockHashResponse defines model for BlockHashResponse. -type BlockHashResponse struct { - // BlockHash Block header hash. - BlockHash string `json:"blockHash"` -} - -// BlockResponse defines model for BlockResponse. -type BlockResponse struct { - // Block Block header data. - Block map[string]interface{} `json:"block"` - - // Cert Optional certificate object. This is only included when the format is set to message pack. - Cert *map[string]interface{} `json:"cert,omitempty"` -} - -// BoxResponse Box name and its content. -type BoxResponse = Box - -// BoxesResponse defines model for BoxesResponse. -type BoxesResponse struct { - Boxes []BoxDescriptor `json:"boxes"` -} - -// CatchpointAbortResponse An catchpoint abort response. -type CatchpointAbortResponse struct { - // CatchupMessage Catchup abort response string - CatchupMessage string `json:"catchup-message"` -} - -// CatchpointStartResponse An catchpoint start response. -type CatchpointStartResponse struct { - // CatchupMessage Catchup start response string - CatchupMessage string `json:"catchup-message"` -} - -// CompileResponse defines model for CompileResponse. -type CompileResponse struct { - // Hash base32 SHA512_256 of program bytes (Address style) - Hash string `json:"hash"` - - // Result base64 encoded program bytes - Result string `json:"result"` - - // Sourcemap JSON of the source map - Sourcemap *map[string]interface{} `json:"sourcemap,omitempty"` -} - -// DisassembleResponse defines model for DisassembleResponse. -type DisassembleResponse struct { - // Result disassembled Teal code - Result string `json:"result"` -} - -// DryrunResponse defines model for DryrunResponse. -type DryrunResponse struct { - Error string `json:"error"` - - // ProtocolVersion Protocol version is the protocol version Dryrun was operated under. - ProtocolVersion string `json:"protocol-version"` - Txns []DryrunTxnResult `json:"txns"` -} - -// GetSyncRoundResponse defines model for GetSyncRoundResponse. -type GetSyncRoundResponse struct { - // Round The minimum sync round for the ledger. - Round uint64 `json:"round"` -} - -// LightBlockHeaderProofResponse Proof of membership and position of a light block header. -type LightBlockHeaderProofResponse = LightBlockHeaderProof - -// NodeStatusResponse NodeStatus contains the information about a node status -type NodeStatusResponse struct { - // Catchpoint The current catchpoint that is being caught up to - Catchpoint *string `json:"catchpoint,omitempty"` - - // CatchpointAcquiredBlocks The number of blocks that have already been obtained by the node as part of the catchup - CatchpointAcquiredBlocks *uint64 `json:"catchpoint-acquired-blocks,omitempty"` - - // CatchpointProcessedAccounts The number of accounts from the current catchpoint that have been processed so far as part of the catchup - CatchpointProcessedAccounts *uint64 `json:"catchpoint-processed-accounts,omitempty"` - - // CatchpointTotalAccounts The total number of accounts included in the current catchpoint - CatchpointTotalAccounts *uint64 `json:"catchpoint-total-accounts,omitempty"` - - // CatchpointTotalBlocks The total number of blocks that are required to complete the current catchpoint catchup - CatchpointTotalBlocks *uint64 `json:"catchpoint-total-blocks,omitempty"` - - // CatchpointVerifiedAccounts The number of accounts from the current catchpoint that have been verified so far as part of the catchup - CatchpointVerifiedAccounts *uint64 `json:"catchpoint-verified-accounts,omitempty"` - - // CatchupTime CatchupTime in nanoseconds - CatchupTime uint64 `json:"catchup-time"` - - // LastCatchpoint The last catchpoint seen by the node - LastCatchpoint *string `json:"last-catchpoint,omitempty"` - - // LastRound LastRound indicates the last round seen - LastRound uint64 `json:"last-round"` - - // LastVersion LastVersion indicates the last consensus version supported - LastVersion string `json:"last-version"` - - // NextVersion NextVersion of consensus protocol to use - NextVersion string `json:"next-version"` - - // NextVersionRound NextVersionRound is the round at which the next consensus version will apply - NextVersionRound uint64 `json:"next-version-round"` - - // NextVersionSupported NextVersionSupported indicates whether the next consensus version is supported by this node - NextVersionSupported bool `json:"next-version-supported"` - - // StoppedAtUnsupportedRound StoppedAtUnsupportedRound indicates that the node does not support the new rounds and has stopped making progress - StoppedAtUnsupportedRound bool `json:"stopped-at-unsupported-round"` - - // TimeSinceLastRound TimeSinceLastRound in nanoseconds - TimeSinceLastRound uint64 `json:"time-since-last-round"` -} - -// ParticipationKeyResponse Represents a participation key used by the node. -type ParticipationKeyResponse = ParticipationKey - -// ParticipationKeysResponse defines model for ParticipationKeysResponse. -type ParticipationKeysResponse = []ParticipationKey - -// PendingTransactionsResponse PendingTransactions is an array of signed transactions exactly as they were submitted. -type PendingTransactionsResponse struct { - // TopTransactions An array of signed transaction objects. - TopTransactions []map[string]interface{} `json:"top-transactions"` - - // TotalTransactions Total number of transactions in the pool. - TotalTransactions uint64 `json:"total-transactions"` -} - -// PostParticipationResponse defines model for PostParticipationResponse. -type PostParticipationResponse struct { - // PartId encoding of the participation ID. - PartId string `json:"partId"` -} - -// PostTransactionsResponse defines model for PostTransactionsResponse. -type PostTransactionsResponse struct { - // TxId encoding of the transaction hash. - TxId string `json:"txId"` -} - -// RoundStateDeltaResponse Contains updates from a given round. -type RoundStateDeltaResponse = RoundStateDelta - -// StateProofResponse Represents a state proof and its corresponding message -type StateProofResponse = StateProof - -// SupplyResponse Supply represents the current supply of MicroAlgos in the system -type SupplyResponse struct { - // CurrentRound Round - CurrentRound uint64 `json:"current_round"` - - // OnlineMoney OnlineMoney - OnlineMoney uint64 `json:"online-money"` - - // TotalMoney TotalMoney - TotalMoney uint64 `json:"total-money"` -} - -// TransactionParametersResponse TransactionParams contains the parameters that help a client construct -// a new transaction. -type TransactionParametersResponse struct { - // ConsensusVersion ConsensusVersion indicates the consensus protocol version - // as of LastRound. - ConsensusVersion string `json:"consensus-version"` - - // Fee Fee is the suggested transaction fee - // Fee is in units of micro-Algos per byte. - // Fee may fall to zero but transactions must still have a fee of - // at least MinTxnFee for the current network protocol. - Fee uint64 `json:"fee"` - - // GenesisHash GenesisHash is the hash of the genesis block. - GenesisHash []byte `json:"genesis-hash"` - - // GenesisId GenesisID is an ID listed in the genesis block. - GenesisId string `json:"genesis-id"` - - // LastRound LastRound indicates the last round seen - LastRound uint64 `json:"last-round"` - - // MinFee The minimum transaction fee (not per byte) required for the - // txn to validate for the current network protocol. - MinFee uint64 `json:"min-fee"` -} - -// TransactionProofResponse defines model for TransactionProofResponse. -type TransactionProofResponse struct { - // Hashtype The type of hash function used to create the proof, must be one of: - // * sha512_256 - // * sha256 - Hashtype TransactionProofResponseHashtype `json:"hashtype"` - - // Idx Index of the transaction in the block's payset. - Idx uint64 `json:"idx"` - - // Proof Proof of transaction membership. - Proof []byte `json:"proof"` - - // Stibhash Hash of SignedTxnInBlock for verifying proof. - Stibhash []byte `json:"stibhash"` - - // Treedepth Represents the depth of the tree that is being proven, i.e. the number of edges from a leaf to the root. - Treedepth uint64 `json:"treedepth"` -} - -// TransactionProofResponseHashtype The type of hash function used to create the proof, must be one of: -// * sha512_256 -// * sha256 -type TransactionProofResponseHashtype string - -// VersionsResponse algod version information. -type VersionsResponse = Version - -// ShutdownNodeParams defines parameters for ShutdownNode. -type ShutdownNodeParams struct { - Timeout *uint64 `form:"timeout,omitempty" json:"timeout,omitempty"` -}