Documentation
¶
Overview ¶
Package console provides an HTTP client for the Akash Console API at https://console-api.akash.network (managed wallets, deployments, and the public marketplace/catalog endpoints).
Authenticated endpoints require an API key sent via the x-api-key header. Public endpoints work without a key; the key is still sent when configured.
Wire conventions: most write bodies are wrapped in a {"data": ...} envelope and most responses arrive as {"data": ...}. Exceptions (top-level arrays or objects) are noted on the individual methods.
Index ¶
- Constants
- Variables
- func LoadManifest(root, ctxName, dseq string) (string, error)
- func ManifestPath(root, ctxName, dseq string) (string, error)
- func SaveManifest(root, ctxName, dseq, manifest string) error
- type APIKey
- type Attribute
- type Auditor
- type Balances
- type Bid
- type BidScreeningRequest
- type BidScreeningRequirements
- type Client
- func (c *Client) CloseDeployment(ctx context.Context, dseq string) error
- func (c *Client) CreateAPIKey(ctx context.Context, name, expiresAt string) (*CreatedAPIKey, error)
- func (c *Client) CreateDeployment(ctx context.Context, sdl string, depositUSD float64) (*CreateDeploymentResult, error)
- func (c *Client) CreateJWTToken(ctx context.Context, ttl int, scope []string) (string, error)
- func (c *Client) CreateLease(ctx context.Context, manifest string, leases []LeaseRequest) (*DeploymentDetail, error)
- func (c *Client) DeleteAPIKey(ctx context.Context, id string) error
- func (c *Client) Deposit(ctx context.Context, dseq string, amountUSD float64) error
- func (c *Client) FetchBids(ctx context.Context, dseq string) ([]Bid, error)
- func (c *Client) GetBalances(ctx context.Context) (*Balances, error)
- func (c *Client) GetDeployment(ctx context.Context, dseq string) (*DeploymentDetail, error)
- func (c *Client) GetDeploymentSettings(ctx context.Context, dseq string) (*DeploymentSettings, error)
- func (c *Client) GetGPUPrices(ctx context.Context) (*GPUPrices, error)
- func (c *Client) GetProvider(ctx context.Context, address string) (*ProviderDetail, error)
- func (c *Client) GetTemplate(ctx context.Context, id string) (*Template, error)
- func (c *Client) GetUsageHistory(ctx context.Context, address, startDate, endDate string) ([]UsagePoint, error)
- func (c *Client) GetUser(ctx context.Context) (*User, error)
- func (c *Client) GetWalletSettings(ctx context.Context) (*WalletSettings, error)
- func (c *Client) GetWeeklyCost(ctx context.Context) (float64, error)
- func (c *Client) ListAPIKeys(ctx context.Context) ([]APIKey, error)
- func (c *Client) ListAuditors(ctx context.Context) ([]Auditor, error)
- func (c *Client) ListDeployments(ctx context.Context, skip, limit int) (*DeploymentList, error)
- func (c *Client) ListProviderRegions(ctx context.Context) ([]ProviderRegion, error)
- func (c *Client) ListProviders(ctx context.Context, scope string, addresses []string) ([]Provider, error)
- func (c *Client) ListTemplates(ctx context.Context) (json.RawMessage, error)
- func (c *Client) ListWallets(ctx context.Context, userID string) ([]Wallet, error)
- func (c *Client) ScreenBids(ctx context.Context, req *BidScreeningRequest) ([]ScreenedProvider, error)
- func (c *Client) SetDeploymentAutoTopUp(ctx context.Context, dseq string, enabled bool) (*DeploymentSettings, error)
- func (c *Client) UpdateDeployment(ctx context.Context, dseq, sdl string) (*DeploymentDetail, error)
- func (c *Client) UpdateWalletSettings(ctx context.Context, autoReloadEnabled bool) (*WalletSettings, error)
- func (c *Client) WithActionLog(l *actionlog.Logger) *Client
- type CreateDeploymentResult
- type CreatedAPIKey
- type Deployment
- type DeploymentDetail
- type DeploymentID
- type DeploymentList
- type DeploymentListItem
- type DeploymentSettings
- type FlexString
- type GPUAvailability
- type GPUModel
- type GPUPriceRange
- type GPUPrices
- type HTTPError
- type Lease
- type LeaseID
- type LeaseRequest
- type LeaseStatus
- type Pagination
- type Price
- type Provider
- type ProviderDetail
- type ProviderRegion
- type ScreenedProvider
- type SignTx
- type SignedBy
- type Template
- type UsagePoint
- type User
- type Wallet
- type WalletSettings
Constants ¶
const DefaultBaseURL = "https://console-api.akash.network"
DefaultBaseURL is the production Console API endpoint.
const MinDepositUSD = 0.5
MinDepositUSD is the minimum deployment deposit the Console API accepts. It lives here — the leaf package every Console caller already imports — so the CLI, the workflow transport, and the client itself cannot drift apart on the limit they enforce.
Variables ¶
var ( // (HTTP 401). ErrUnauthorized = errors.New("console: invalid or expired API key") // ErrInsufficientFunds indicates the managed wallet cannot cover the // operation (HTTP 402). ErrInsufficientFunds = errors.New("console: insufficient funds") // ErrNotFound indicates the requested resource does not exist (HTTP 404). ErrNotFound = errors.New("console: resource not found") // ErrAlreadyClosed is returned by CloseDeployment when the deployment is // already closed (the API answers 404, or 400 with an already-closed // message). Callers that want idempotent close semantics should treat it // as success: // // if err := c.CloseDeployment(ctx, dseq); err != nil && !errors.Is(err, console.ErrAlreadyClosed) { ... } ErrAlreadyClosed = errors.New("console: deployment already closed") )
Sentinel errors returned by the client. Match with errors.Is.
Functions ¶
func LoadManifest ¶
LoadManifest reads a previously cached manifest. The dseq is validated as a plain numeric sequence so user-supplied values cannot read arbitrary files. The returned error wraps fs.ErrNotExist when no manifest has been cached for the dseq.
func ManifestPath ¶
ManifestPath returns the cache path for a deployment's manifest: <root>/contexts/<ctxName>/manifests/<dseq>.json. The dseq must be a plain numeric sequence; anything else (e.g. a path-traversal attempt) is an error.
func SaveManifest ¶
SaveManifest caches a deployment manifest under the context's manifests directory with mode 0600 (manifests can reference private registries or env values). The dseq is validated as a plain numeric sequence first: it comes from the Console API response, and a hostile value must not steer the write outside the config root.
Types ¶
type APIKey ¶
type APIKey struct {
ID string `json:"id"`
Name string `json:"name"`
ExpiresAt string `json:"expiresAt,omitempty"`
CreatedAt string `json:"createdAt,omitempty"`
LastUsedAt string `json:"lastUsedAt,omitempty"`
KeyFormat string `json:"keyFormat,omitempty"`
}
APIKey describes an existing API key (GET /v1/api-keys). The secret is never returned after creation.
type Auditor ¶
type Auditor struct {
ID string `json:"id"`
Name string `json:"name"`
Address string `json:"address"`
Website string `json:"website,omitempty"`
}
Auditor is one entry of GET /v1/auditors.
type Balances ¶
type Balances struct {
Balance int64 `json:"balance"`
Deployments int64 `json:"deployments"`
Total int64 `json:"total"`
}
Balances reports managed-wallet balances in µACT integer units (GET /v1/balances). ACT is pegged 1:1 to USD, so USD = value / 1e6.
func (Balances) BalanceUSD ¶
BalanceUSD returns the free balance in USD.
func (Balances) DeploymentsUSD ¶
DeploymentsUSD returns the funds locked in deployment escrow in USD.
type Bid ¶
type Bid struct {
ID LeaseID `json:"id"`
State string `json:"state"`
Price *Price `json:"price,omitempty"`
}
Bid is a provider bid on an open order (GET /v1/bids?dseq=).
type BidScreeningRequest ¶
type BidScreeningRequest struct {
Requirements BidScreeningRequirements `json:"requirements"`
Resources json.RawMessage `json:"resources,omitempty"`
Timezone string `json:"timezone,omitempty"`
ReclamationWindow json.RawMessage `json:"reclamationWindow,omitempty"`
}
BidScreeningRequest is the body of POST /v1/bid-screening (not data-enveloped). Resources and ReclamationWindow are passed through raw so callers can supply whatever shape the SDL produced.
The API requires Resources and Timezone; ScreenBids rejects requests missing either before hitting the network. Timezone must be an IANA zone name (e.g. "America/Chicago").
type BidScreeningRequirements ¶
type BidScreeningRequirements struct {
SignedBy SignedBy `json:"signedBy"`
Attributes []Attribute `json:"attributes,omitempty"`
}
BidScreeningRequirements narrows the provider set for bid screening. An empty Attributes list is omitted on the wire (the API schema types it as a non-nullable array, so JSON null is rejected).
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client interacts with the Akash Console API.
func New ¶
New creates a Console API client. An empty baseURL selects DefaultBaseURL. The apiKey may be empty when only public endpoints are used.
func (*Client) CloseDeployment ¶
CloseDeployment closes a deployment. If the deployment is already closed (the API answers 404, or 400 with an already-closed message) it returns ErrAlreadyClosed, which callers may treat as success for idempotent behavior. Any other 400 is a genuine failure and is returned as-is.
Wire: DELETE /v1/deployments/{dseq}.
func (*Client) CreateAPIKey ¶
CreateAPIKey creates a new API key. expiresAt is optional (RFC 3339; empty means no expiry). The returned CreatedAPIKey.APIKey secret is shown exactly once — persist it immediately.
Wire: POST /v1/api-keys, body {"data":{"name":..., "expiresAt"?:...}}, data-enveloped response.
func (*Client) CreateDeployment ¶
func (c *Client) CreateDeployment(ctx context.Context, sdl string, depositUSD float64) (*CreateDeploymentResult, error)
CreateDeployment creates a deployment via the managed wallet. Deposit is in USD. The returned manifest should be cached (see SaveManifest) so that CreateLease can send it after bid selection.
Wire: POST /v1/deployments, body {"data":{"sdl":..., "deposit":...}}.
func (*Client) CreateJWTToken ¶
CreateJWTToken mints a short-lived JWT scoped to the given lease permissions, for direct provider access. ttl is in seconds.
Wire: POST /v1/create-jwt-token, body {"data":{"ttl":..., "leases":{"access":"scoped","scope":[...]}}}, response {"data":{"token":...}}.
func (*Client) CreateLease ¶
func (c *Client) CreateLease(ctx context.Context, manifest string, leases []LeaseRequest) (*DeploymentDetail, error)
CreateLease accepts one or more bids and sends the deployment manifest to the winning providers.
Wire: POST /v1/leases. NOTE: unlike other writes, the request body is NOT data-enveloped: {"manifest":..., "leases":[{dseq,gseq,oseq,provider}]}. The response is data-enveloped.
func (*Client) DeleteAPIKey ¶
DeleteAPIKey deletes an API key by ID. A missing key (404) is treated as a no-op and returns nil.
Wire: DELETE /v1/api-keys/{id} → 204.
func (*Client) Deposit ¶
Deposit adds funds to a deployment's escrow. Amount is in USD.
Wire: POST /v1/deposit-deployment, body {"data":{"dseq":..., "deposit":...}}.
func (*Client) FetchBids ¶
FetchBids fetches bids for a deployment's open orders.
Wire: GET /v1/bids?dseq=, response {"data":[{"bid":{...}}]}.
func (*Client) GetBalances ¶
GetBalances fetches managed-wallet balances in µACT integer units. Use the *USD helpers on Balances for display values.
Wire: GET /v1/balances, data-enveloped response.
func (*Client) GetDeployment ¶
GetDeployment fetches a single deployment with its leases and escrow account.
Wire: GET /v1/deployments/{dseq}, data-enveloped response.
func (*Client) GetDeploymentSettings ¶
func (c *Client) GetDeploymentSettings(ctx context.Context, dseq string) (*DeploymentSettings, error)
GetDeploymentSettings fetches auto-top-up settings for a deployment. Returns an error matching ErrNotFound when no settings exist yet.
Wire: GET /v2/deployment-settings/{dseq}, data-enveloped response.
func (*Client) GetGPUPrices ¶
GetGPUPrices fetches the network-wide GPU availability and price catalog.
Wire: GET /v1/gpu-prices, top-level object (not data-enveloped).
func (*Client) GetProvider ¶
GetProvider fetches detailed information (including stats and hostUri) for one provider. Common fields are typed; the full document is preserved in ProviderDetail.Raw.
Wire: GET /v1/providers/{address}, top-level object.
func (*Client) GetTemplate ¶
GetTemplate fetches one deployment template by ID.
Wire: GET /v1/templates/{id}, data-enveloped response.
func (*Client) GetUsageHistory ¶
func (c *Client) GetUsageHistory(ctx context.Context, address, startDate, endDate string) ([]UsagePoint, error)
GetUsageHistory fetches daily spend history for an address between startDate and endDate (YYYY-MM-DD). Empty dates are omitted — the API then defaults endDate to today and startDate to 30 days before endDate; sending an empty string fails the API's format=date validation.
Wire: GET /v1/usage/history?address=&startDate=&endDate=. NOTE: the response is a TOP-LEVEL array, not data-enveloped.
func (*Client) GetUser ¶
GetUser fetches the authenticated Console user. The returned User.ID is the internal UUID needed by ListWallets.
Wire: GET /v1/user/me, data-enveloped response.
func (*Client) GetWalletSettings ¶
func (c *Client) GetWalletSettings(ctx context.Context) (*WalletSettings, error)
GetWalletSettings fetches account-level wallet settings.
Wire: GET /v1/wallet-settings, data-enveloped response.
func (*Client) GetWeeklyCost ¶
GetWeeklyCost fetches the trailing weekly spend in USD.
Wire: GET /v1/weekly-cost, response {"data":{"weeklyCost":...}}.
func (*Client) ListAPIKeys ¶
ListAPIKeys lists the account's API keys. Secrets are never included.
Wire: GET /v1/api-keys, response {"data":[...]}.
func (*Client) ListAuditors ¶
ListAuditors lists known auditors.
Wire: GET /v1/auditors, TOP-LEVEL array.
func (*Client) ListDeployments ¶
ListDeployments lists deployments with pagination. Out-of-range values are omitted from the query instead of being sent — the API requires skip >= 0 and limit >= 1, so a negative skip falls back to 0 and a non-positive limit falls back to the server default page size.
Wire: GET /v1/deployments?skip=&limit=, data-enveloped response.
func (*Client) ListProviderRegions ¶
func (c *Client) ListProviderRegions(ctx context.Context) ([]ProviderRegion, error)
ListProviderRegions lists the regions providers advertise.
Wire: GET /v1/provider-regions, TOP-LEVEL array.
func (*Client) ListProviders ¶
func (c *Client) ListProviders(ctx context.Context, scope string, addresses []string) ([]Provider, error)
ListProviders lists providers. scope is optional (e.g. "trial"); addresses optionally restricts the result to specific provider addresses.
Wire: GET /v1/providers?scope=&addresses=. NOTE: the response is a TOP-LEVEL array, not data-enveloped.
func (*Client) ListTemplates ¶
ListTemplates fetches the template catalog. The category/template tree is loosely specified upstream, so the enveloped payload is returned raw.
Wire: GET /v1/templates-list, data-enveloped response.
func (*Client) ListWallets ¶
ListWallets lists managed wallets for a user. userID is the internal UUID from GetUser().ID, not the userId field.
Wire: GET /v1/wallets?userId=, response {"data":[...]}.
func (*Client) ScreenBids ¶
func (c *Client) ScreenBids(ctx context.Context, req *BidScreeningRequest) ([]ScreenedProvider, error)
ScreenBids asks the Console API which providers can satisfy the given requirements/resources before a deployment is created. The API contract requires both Resources and Timezone (an IANA zone name); requests missing either are rejected locally instead of triggering an HTTP 400.
Wire: POST /v1/bid-screening (request and response are NOT data-enveloped; the response is {"providers":[...]}).
func (*Client) SetDeploymentAutoTopUp ¶
func (c *Client) SetDeploymentAutoTopUp(ctx context.Context, dseq string, enabled bool) (*DeploymentSettings, error)
SetDeploymentAutoTopUp enables or disables auto-top-up for a deployment. It PATCHes existing settings and transparently falls back to creating them (POST) when none exist yet.
Wire: PATCH /v2/deployment-settings/{dseq}, body {"data":{"autoTopUpEnabled":...}}; on 404, POST /v2/deployment-settings, body {"data":{"dseq":..., "autoTopUpEnabled":...}}.
func (*Client) UpdateDeployment ¶
UpdateDeployment updates a deployment's SDL.
Wire: PUT /v1/deployments/{dseq}, body {"data":{"sdl":...}}, data-enveloped response.
func (*Client) UpdateWalletSettings ¶
func (c *Client) UpdateWalletSettings(ctx context.Context, autoReloadEnabled bool) (*WalletSettings, error)
UpdateWalletSettings enables or disables wallet auto-reload and returns the stored settings.
Wire: PUT /v1/wallet-settings, body {"data":{"autoReloadEnabled":...}}; on 404, POST the same body to create the record. Data-enveloped response.
An account that has never configured auto-reload has no settings record at all, and PUT reports that as 404 — so the update would fail on exactly the accounts that have never set it, which is most of them. The API exposes POST for creation; falling back to it mirrors SetDeploymentAutoTopUp.
type CreateDeploymentResult ¶
type CreateDeploymentResult struct {
DSeq FlexString `json:"dseq"`
Manifest string `json:"manifest"`
SignTx *SignTx `json:"signTx,omitempty"`
}
CreateDeploymentResult is the payload of POST /v1/deployments.
type CreatedAPIKey ¶
type CreatedAPIKey struct {
ID string `json:"id"`
Name string `json:"name"`
APIKey string `json:"apiKey"`
}
CreatedAPIKey is the payload of POST /v1/api-keys. APIKey holds the secret, which is shown exactly once at creation time.
type Deployment ¶
type Deployment struct {
ID DeploymentID `json:"id"`
State string `json:"state"`
CreatedAt json.RawMessage `json:"created_at,omitempty"`
}
Deployment is the chain-side deployment record embedded in Console responses.
type DeploymentDetail ¶
type DeploymentDetail struct {
Deployment Deployment `json:"deployment"`
Leases []Lease `json:"leases"`
EscrowAccount json.RawMessage `json:"escrow_account,omitempty"`
}
DeploymentDetail is the payload of GET /v1/deployments/{dseq} (and of the update/lease-creation responses). EscrowAccount is kept raw; its state carries funds/transferred details.
type DeploymentID ¶
type DeploymentID struct {
Owner string `json:"owner"`
DSeq FlexString `json:"dseq"`
}
DeploymentID identifies a deployment on chain.
type DeploymentList ¶
type DeploymentList struct {
Deployments []DeploymentListItem `json:"deployments"`
Pagination Pagination `json:"pagination"`
}
DeploymentList is the payload of GET /v1/deployments.
type DeploymentListItem ¶
type DeploymentListItem struct {
Deployment Deployment `json:"deployment"`
Leases []Lease `json:"leases"`
}
DeploymentListItem is one entry of GET /v1/deployments.
type DeploymentSettings ¶
type DeploymentSettings struct {
DSeq FlexString `json:"dseq"`
AutoTopUpEnabled bool `json:"autoTopUpEnabled"`
EstimatedTopUpAmount float64 `json:"estimatedTopUpAmount"`
TopUpFrequencyMs int64 `json:"topUpFrequencyMs"`
}
DeploymentSettings holds per-deployment automation settings (GET/PATCH /v2/deployment-settings/{dseq}).
type FlexString ¶
type FlexString string
FlexString unmarshals from either a JSON string or a JSON number, since the Console API is inconsistent about numeric identifiers (dseq, amounts). It always marshals as a JSON string.
func (FlexString) String ¶
func (s FlexString) String() string
String returns the underlying string value.
func (*FlexString) UnmarshalJSON ¶
func (s *FlexString) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type GPUAvailability ¶
GPUAvailability summarizes network-wide GPU counts.
type GPUModel ¶
type GPUModel struct {
Vendor string `json:"vendor"`
Model string `json:"model"`
RAM string `json:"ram"`
Price GPUPriceRange `json:"price"`
}
GPUModel is one entry of the GPU price catalog.
type GPUPriceRange ¶
type GPUPriceRange struct {
Min float64 `json:"min"`
Max float64 `json:"max"`
Avg float64 `json:"avg"`
}
GPUPriceRange is the observed price spread for a GPU model, USD per month.
type GPUPrices ¶
type GPUPrices struct {
Availability GPUAvailability `json:"availability"`
Models []GPUModel `json:"models"`
}
GPUPrices is the payload of GET /v1/gpu-prices (not data-enveloped).
type Lease ¶
type Lease struct {
ID LeaseID `json:"id"`
State string `json:"state"`
Price *Price `json:"price,omitempty"`
Status *LeaseStatus `json:"status,omitempty"`
}
Lease describes a lease attached to a deployment.
type LeaseID ¶
type LeaseID struct {
Owner string `json:"owner"`
DSeq FlexString `json:"dseq"`
GSeq uint32 `json:"gseq"`
OSeq uint32 `json:"oseq"`
Provider string `json:"provider"`
}
LeaseID identifies a lease (and doubles as a bid ID).
type LeaseRequest ¶
type LeaseRequest struct {
DSeq string `json:"dseq"`
GSeq uint32 `json:"gseq"`
OSeq uint32 `json:"oseq"`
Provider string `json:"provider"`
}
LeaseRequest identifies a specific bid to accept (POST /v1/leases).
type LeaseStatus ¶
type LeaseStatus struct {
Services json.RawMessage `json:"services,omitempty"`
ForwardedPorts json.RawMessage `json:"forwarded_ports,omitempty"`
IPs json.RawMessage `json:"ips,omitempty"`
}
LeaseStatus carries provider-reported runtime status. The deep structures are provider-defined, so they are kept raw.
type Pagination ¶
type Pagination struct {
Total int `json:"total"`
Skip int `json:"skip"`
Limit int `json:"limit"`
HasMore bool `json:"hasMore"`
}
Pagination describes list paging metadata.
type Price ¶
type Price struct {
Denom string `json:"denom"`
Amount FlexString `json:"amount"`
}
Price is a denominated amount as reported by the chain.
type Provider ¶
type Provider struct {
Owner string `json:"owner"`
Name string `json:"name,omitempty"`
HostURI string `json:"hostUri,omitempty"`
IsOnline bool `json:"isOnline,omitempty"`
IsAudited bool `json:"isAudited,omitempty"`
Uptime1D float64 `json:"uptime1d,omitempty"`
Uptime7D float64 `json:"uptime7d,omitempty"`
Uptime30D float64 `json:"uptime30d,omitempty"`
GPUModels json.RawMessage `json:"gpuModels,omitempty"`
IPRegion json.RawMessage `json:"ipRegion,omitempty"`
}
Provider is a provider summary (GET /v1/providers). GPUModels and IPRegion are kept raw: their shapes vary between deployments of the API.
type ProviderDetail ¶
type ProviderDetail struct {
Provider
// Raw is the complete response body for callers that need fields not
// modeled on Provider.
Raw json.RawMessage `json:"-"`
}
ProviderDetail is the payload of GET /v1/providers/{address}: the typed summary fields plus the full raw document (stats etc.) in Raw.
type ProviderRegion ¶
type ProviderRegion struct {
Key string `json:"key"`
Description string `json:"description"`
Providers []string `json:"providers"`
}
ProviderRegion is one entry of GET /v1/provider-regions.
type ScreenedProvider ¶
type ScreenedProvider struct {
Owner string `json:"owner"`
HostURI string `json:"hostUri,omitempty"`
IsAudited bool `json:"isAudited,omitempty"`
Location json.RawMessage `json:"location,omitempty"`
Organization string `json:"organization,omitempty"`
}
ScreenedProvider is one provider returned by bid screening. Location is kept raw (object or string depending on API version).
type SignTx ¶
type SignTx struct {
Code int `json:"code"`
TransactionHash string `json:"transactionHash"`
RawLog string `json:"rawLog"`
}
SignTx reports the broadcast result of a managed-wallet transaction.
type SignedBy ¶
type SignedBy struct {
AnyOf []string `json:"anyOf,omitempty"`
AllOf []string `json:"allOf,omitempty"`
}
SignedBy expresses auditor requirements for bid screening. Empty lists are omitted on the wire: the API schema types anyOf/allOf as (non-nullable) string arrays, so serializing nil slices as JSON null violates the contract.
type Template ¶
type Template struct {
ID string `json:"id"`
Name string `json:"name"`
Summary string `json:"summary,omitempty"`
Deploy string `json:"deploy,omitempty"`
Readme string `json:"readme,omitempty"`
}
Template is the payload of GET /v1/templates/{id}. Extra fields beyond the common ones are intentionally not modeled.
type UsagePoint ¶
type UsagePoint struct {
Date string `json:"date"`
ActiveDeployments int `json:"activeDeployments"`
DailyUsdcSpent float64 `json:"dailyUsdcSpent"`
TotalUsdcSpent float64 `json:"totalUsdcSpent"`
}
UsagePoint is one day of spend history (GET /v1/usage/history).
type User ¶
type User struct {
ID string `json:"id"`
UserID string `json:"userId"`
Username string `json:"username"`
Email string `json:"email"`
EmailVerified bool `json:"emailVerified"`
}
User describes the authenticated Console user (GET /v1/user/me). ID is the internal UUID required by ListWallets.
type Wallet ¶
type Wallet struct {
Address string `json:"address"`
CreditAmount float64 `json:"creditAmount"`
IsTrialing bool `json:"isTrialing"`
Denom string `json:"denom"`
}
Wallet describes a managed wallet (GET /v1/wallets?userId=).
type WalletSettings ¶
type WalletSettings struct {
AutoReloadEnabled bool `json:"autoReloadEnabled"`
}
WalletSettings holds account-level wallet settings (GET/PUT /v1/wallet-settings).