models

package
v0.48.0 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2026 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

* Flow Experimental API * * Experimental API endpoints for the Flow Access Node. These endpoints are subject to change without notice. Endpoints may be moved to a permanent API once they are stable. * * API version: 0.1.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Flow Experimental API * * Experimental API endpoints for the Flow Access Node. These endpoints are subject to change without notice. Endpoints may be moved to a permanent API once they are stable. * * API version: 0.1.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Flow Experimental API * * Experimental API endpoints for the Flow Access Node. These endpoints are subject to change without notice. Endpoints may be moved to a permanent API once they are stable. * * API version: 0.1.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Flow Experimental API * * Experimental API endpoints for the Flow Access Node. These endpoints are subject to change without notice. Endpoints may be moved to a permanent API once they are stable. * * API version: 0.1.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Flow Experimental API * * Experimental API endpoints for the Flow Access Node. These endpoints are subject to change without notice. Endpoints may be moved to a permanent API once they are stable. * * API version: 0.1.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Flow Experimental API * * Experimental API endpoints for the Flow Access Node. These endpoints are subject to change without notice. Endpoints may be moved to a permanent API once they are stable. * * API version: 0.1.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Flow Experimental API * * Experimental API endpoints for the Flow Access Node. These endpoints are subject to change without notice. Endpoints may be moved to a permanent API once they are stable. * * API version: 0.1.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Flow Experimental API * * Experimental API endpoints for the Flow Access Node. These endpoints are subject to change without notice. Endpoints may be moved to a permanent API once they are stable. * * API version: 0.1.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Flow Experimental API * * Experimental API endpoints for the Flow Access Node. These endpoints are subject to change without notice. Endpoints may be moved to a permanent API once they are stable. * * API version: 0.1.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Flow Experimental API * * Experimental API endpoints for the Flow Access Node. These endpoints are subject to change without notice. Endpoints may be moved to a permanent API once they are stable. * * API version: 0.1.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Flow Experimental API * * Experimental API endpoints for the Flow Access Node. These endpoints are subject to change without notice. Endpoints may be moved to a permanent API once they are stable. * * API version: 0.1.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Flow Experimental API * * Experimental API endpoints for the Flow Access Node. These endpoints are subject to change without notice. Endpoints may be moved to a permanent API once they are stable. * * API version: 0.1.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Flow Experimental API * * Experimental API endpoints for the Flow Access Node. These endpoints are subject to change without notice. Endpoints may be moved to a permanent API once they are stable. * * API version: 0.1.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Flow Experimental API * * Experimental API endpoints for the Flow Access Node. These endpoints are subject to change without notice. Endpoints may be moved to a permanent API once they are stable. * * API version: 0.1.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Flow Experimental API * * Experimental API endpoints for the Flow Access Node. These endpoints are subject to change without notice. Endpoints may be moved to a permanent API once they are stable. * * API version: 0.1.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Flow Experimental API * * Experimental API endpoints for the Flow Access Node. These endpoints are subject to change without notice. Endpoints may be moved to a permanent API once they are stable. * * API version: 0.1.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountFungibleTransfersResponse

type AccountFungibleTransfersResponse struct {
	Transfers  []FungibleTokenTransfer `json:"transfers"`
	NextCursor string                  `json:"next_cursor,omitempty"`
}

type AccountNonFungibleTransfersResponse

type AccountNonFungibleTransfersResponse struct {
	Transfers  []NonFungibleTokenTransfer `json:"transfers"`
	NextCursor string                     `json:"next_cursor,omitempty"`
}

type AccountTransaction

type AccountTransaction struct {
	// Block height where the transaction was included.
	BlockHeight string `json:"block_height"`
	// Block timestamp where the transaction was included, in RFC3339Nano format.
	Timestamp     string `json:"timestamp"`
	TransactionId string `json:"transaction_id"`
	// Index of the transaction within the block.
	TransactionIndex string                          `json:"transaction_index"`
	Roles            []string                        `json:"roles"`
	Transaction      *commonmodels.Transaction       `json:"transaction,omitempty"`
	Result           *commonmodels.TransactionResult `json:"result,omitempty"`
	Expandable       *AccountTransactionExpandable   `json:"_expandable"`
	Links            *commonmodels.Links             `json:"_links,omitempty"`
}

func (*AccountTransaction) Build

Build populates the AccountTransaction from a domain model.

type AccountTransactionExpandable

type AccountTransactionExpandable struct {
	// Link to fetch the full transaction body.
	Transaction string `json:"transaction,omitempty"`
	// Link to fetch the transaction result.
	Result string `json:"result,omitempty"`
}

Contains URI links for fields not included in the response. When a field is expanded via the `expand` query parameter, it appears inline and is removed from `_expandable`.

type AccountTransactionsResponse

type AccountTransactionsResponse struct {
	Transactions []AccountTransaction `json:"transactions"`
	NextCursor   string               `json:"next_cursor,omitempty"`
}

type ContractDeployment

type ContractDeployment struct {
	ContractId string `json:"contract_id"`
	Address    string `json:"address"`
	// Block height at which this deployment was applied.
	BlockHeight   string `json:"block_height,omitempty"`
	TransactionId string `json:"transaction_id,omitempty"`
	// Position of the deploying transaction within its block.
	TxIndex string `json:"tx_index,omitempty"`
	// Position of the contract event within its transaction.
	EventIndex string `json:"event_index,omitempty"`
	// Base64-encoded Cadence source code of the contract deployed.
	Code string `json:"code,omitempty"`
	// Hex-encoded SHA3-256 hash of the contract code.
	CodeHash string `json:"code_hash"`
	// True if the deployment was created during bootstrapping based on the current chain state, not based on a protocol event. When true, block_height, transaction_id, tx_index, and event_index are absent.
	IsPlaceholder bool                            `json:"is_placeholder,omitempty"`
	Transaction   *commonmodels.Transaction       `json:"transaction,omitempty"`
	Result        *commonmodels.TransactionResult `json:"result,omitempty"`
	Expandable    *ContractDeploymentExpandable   `json:"_expandable"`
	Links         *commonmodels.Links             `json:"_links,omitempty"`
}

func (*ContractDeployment) Build

Build populates the REST model from the domain model.

type ContractDeploymentExpandable

type ContractDeploymentExpandable struct {
	// Link to fetch the Cadence source code of this deployment.
	Code string `json:"code,omitempty"`
	// Link to fetch the full transaction that applied this deployment.
	Transaction string `json:"transaction,omitempty"`
	// Link to fetch the transaction result.
	Result string `json:"result,omitempty"`
}

Contains URI links for fields not included in the response. When a field is expanded via the `expand` query parameter, it appears inline and is removed from `_expandable`.

type ContractDeploymentsResponse

type ContractDeploymentsResponse struct {
	Deployments []ContractDeployment `json:"deployments"`
	NextCursor  string               `json:"next_cursor,omitempty"`
}

type ContractsResponse

type ContractsResponse struct {
	Contracts  []ContractDeployment `json:"contracts"`
	NextCursor string               `json:"next_cursor,omitempty"`
}

type FungibleTokenTransfer

type FungibleTokenTransfer struct {
	TransactionId string `json:"transaction_id"`
	// Block height where the transfer was included.
	BlockHeight string `json:"block_height"`
	// Block timestamp where the transfer was included, in RFC3339Nano format.
	BlockTimestamp string `json:"timestamp"`
	// Index of the transaction within the block.
	TransactionIndex string `json:"transaction_index"`
	// Indices of the events within the transaction that represent this transfer.
	EventIndices []string `json:"event_indices"`
	// Fully qualified token type identifier (e.g. `A.1654653399040a61.FlowToken`).
	TokenType string `json:"token_type"`
	// Amount of tokens transferred, as a decimal string.
	Amount           string                          `json:"amount"`
	SourceAddress    string                          `json:"source_address"`
	RecipientAddress string                          `json:"recipient_address"`
	Transaction      *commonmodels.Transaction       `json:"transaction,omitempty"`
	Result           *commonmodels.TransactionResult `json:"result,omitempty"`
	Events           []commonmodels.Event            `json:"events,omitempty"`
	Expandable       *AccountTransactionExpandable   `json:"_expandable"`
	Links            *commonmodels.Links             `json:"_links,omitempty"`
}

func (*FungibleTokenTransfer) Build

Build populates the FungibleTokenTransfer from a domain model.

type LinkGenerator

type LinkGenerator interface {
	commonmodels.LinkGenerator

	ContractLink(identifier string) (string, error)
	ContractCodeLink(identifier string) (string, error)
}

LinkGenerator generates the expandable value for the known endpoints e.g. "/v1/blocks/c5e935bc75163db82e4a6cf9dc3b54656709d3e21c87385138300abd479c33b7"

type LinkGeneratorImpl

type LinkGeneratorImpl struct {
	commonmodels.LinkGenerator
	// contains filtered or unexported fields
}

func NewLinkGeneratorImpl

func NewLinkGeneratorImpl(router *mux.Router, baseGenerator commonmodels.LinkGenerator) *LinkGeneratorImpl
func (generator *LinkGeneratorImpl) ContractCodeLink(identifier string) (string, error)
func (generator *LinkGeneratorImpl) ContractLink(identifier string) (string, error)

type NonFungibleTokenTransfer

type NonFungibleTokenTransfer struct {
	TransactionId string `json:"transaction_id"`
	// Block height where the transfer was included.
	BlockHeight string `json:"block_height"`
	// Block timestamp where the transfer was included, in RFC3339Nano format.
	BlockTimestamp string `json:"timestamp"`
	// Index of the transaction within the block.
	TransactionIndex string `json:"transaction_index"`
	// Indices of the events within the transaction that represent this transfer.
	EventIndices []string `json:"event_indices"`
	// Fully qualified NFT collection type (e.g. `A.1654653399040a61.MyNFT`).
	TokenType string `json:"token_type"`
	// Unique identifier of the NFT within its collection.
	NftId            string                          `json:"nft_id"`
	SourceAddress    string                          `json:"source_address"`
	RecipientAddress string                          `json:"recipient_address"`
	Transaction      *commonmodels.Transaction       `json:"transaction,omitempty"`
	Result           *commonmodels.TransactionResult `json:"result,omitempty"`
	Events           []commonmodels.Event            `json:"events,omitempty"`
	Expandable       *AccountTransactionExpandable   `json:"_expandable"`
	Links            *commonmodels.Links             `json:"_links,omitempty"`
}

func (*NonFungibleTokenTransfer) Build

Build populates the NonFungibleTokenTransfer from a domain model.

type ScheduledTransaction

type ScheduledTransaction struct {
	// Scheduler-assigned uint64 identifier.
	Id       string                        `json:"id"`
	Status   *ScheduledTransactionStatus   `json:"status"`
	Priority *ScheduledTransactionPriority `json:"priority"`
	// Scheduled execution timestamp as a UFix64 decimal string.
	Timestamp string `json:"timestamp"`
	// Execution effort estimate as a UFix64 decimal string.
	ExecutionEffort string `json:"execution_effort"`
	// Scheduled fee as a UFix64 decimal string.
	Fees                    string `json:"fees"`
	TransactionHandlerOwner string `json:"transaction_handler_owner"`
	// Fully qualified Cadence type identifier of the transaction handler (e.g. `A.1654653399040a61.MyScheduler.Handler`).
	TransactionHandlerTypeIdentifier string `json:"transaction_handler_type_identifier"`
	// Resource UUID of the transaction handler.
	TransactionHandlerUuid string `json:"transaction_handler_uuid"`
	// Public path of the transaction handler, if set.
	TransactionHandlerPublicPath string `json:"transaction_handler_public_path,omitempty"`
	// Fees returned on cancellation, as a UFix64 decimal string.
	FeesReturned string `json:"fees_returned,omitempty"`
	// Fees deducted on cancellation, as a UFix64 decimal string.
	FeesDeducted           string `json:"fees_deducted,omitempty"`
	CreatedTransactionId   string `json:"created_transaction_id"`
	ExecutedTransactionId  string `json:"executed_transaction_id,omitempty"`
	CancelledTransactionId string `json:"cancelled_transaction_id,omitempty"`
	// RFC3339Nano timestamp of the block in which the scheduled transaction was created. Absent for placeholder transactions.
	CreatedAt string `json:"created_at,omitempty"`
	// RFC3339Nano timestamp of the block in which the scheduled transaction was executed or cancelled. Absent when still scheduled.
	CompletedAt string `json:"completed_at,omitempty"`
	// True if the scheduled transaction was created during bootstrapping based on the current chain state, not based on a protocol event. When true, block_height, transaction_id, tx_index, and event_index are absent.
	IsPlaceholder   bool                            `json:"is_placeholder,omitempty"`
	Transaction     *commonmodels.Transaction       `json:"transaction,omitempty"`
	Result          *commonmodels.TransactionResult `json:"result,omitempty"`
	HandlerContract *ContractDeployment             `json:"handler_contract,omitempty"`
	Expandable      *ScheduledTransactionExpandable `json:"_expandable"`
	Links           *commonmodels.Links             `json:"_links,omitempty"`
}

func (*ScheduledTransaction) Build

Build populates a ScheduledTransaction from a domain model.

type ScheduledTransactionExpandable

type ScheduledTransactionExpandable struct {
	// Link to fetch the full transaction body.
	Transaction string `json:"transaction,omitempty"`
	// Link to fetch the transaction result.
	Result string `json:"result,omitempty"`
	// Link to fetch the Cadence contract that implements the transaction handler.
	HandlerContract string `json:"handler_contract,omitempty"`
}

Contains URI links for fields not included in the response. When a field is expanded via the `expand` query parameter, it appears inline and is removed from `_expandable`.

type ScheduledTransactionPriority

type ScheduledTransactionPriority string

ScheduledTransactionPriority : The execution priority of a scheduled transaction.

const (
	LOW_ScheduledTransactionPriority    ScheduledTransactionPriority = "low"
	MEDIUM_ScheduledTransactionPriority ScheduledTransactionPriority = "medium"
	HIGH_ScheduledTransactionPriority   ScheduledTransactionPriority = "high"
)

List of ScheduledTransactionPriority

func (*ScheduledTransactionPriority) Build

Build sets the ScheduledTransactionPriority from a domain priority value. The contract encodes priority as: 0 = high, 1 = medium, 2 = low.

type ScheduledTransactionStatus

type ScheduledTransactionStatus string

ScheduledTransactionStatus : The current lifecycle status of a scheduled transaction.

const (
	SCHEDULED_ScheduledTransactionStatus ScheduledTransactionStatus = "scheduled"
	EXECUTED_ScheduledTransactionStatus  ScheduledTransactionStatus = "executed"
	CANCELLED_ScheduledTransactionStatus ScheduledTransactionStatus = "cancelled"
	FAILED_ScheduledTransactionStatus    ScheduledTransactionStatus = "failed"
)

List of ScheduledTransactionStatus

func (*ScheduledTransactionStatus) Build

Build sets the ScheduledTransactionStatus from a domain status value.

type ScheduledTransactionsResponse

type ScheduledTransactionsResponse struct {
	ScheduledTransactions []ScheduledTransaction `json:"scheduled_transactions"`
	NextCursor            string                 `json:"next_cursor,omitempty"`
}

Jump to

Keyboard shortcuts

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