swagger

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

README

Go API client for swagger

No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)

Overview

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

  • API version: 1.0.0
  • Package version: 1.0.0
  • Build package: io.swagger.codegen.v3.generators.go.GoClientCodegen

Installation

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

import "./swagger"

Documentation for API Endpoints

All URIs are relative to https://rest-canary.onflow.org/v1/

Class Method HTTP request Description
AccountsApi AccountsAddressGet Get /accounts/{address} Get an Account By Address
BlocksApi BlocksGet Get /blocks Gets Blocks by Height
BlocksApi BlocksIdGet Get /blocks/{id} Get Blocks by ID.
CollectionsApi CollectionsIdGet Get /collections/{id} Gets a Collection by ID
EventsApi EventsGet Get /events Get Events
ExecutionResultsApi ExecutionResultsGet Get /execution_results Get Execution Results by Block ID
ExecutionResultsApi ExecutionResultsIdGet Get /execution_results/{id} Get Execution Result by ID
NetworkApi NetworkParametersGet Get /network/parameters Get Network Parameters
ScriptsApi ScriptsPost Post /scripts Execute a Cadence Script
TransactionsApi TransactionResultsTransactionIdGet Get /transaction_results/{transaction_id} Get a Transaction Result by ID.
TransactionsApi TransactionsIdGet Get /transactions/{id} Get a Transaction by ID.
TransactionsApi TransactionsPost Post /transactions Submit a Transaction

Documentation For Models

Documentation For Authorization

Endpoints do not require authorization.

Author

Documentation

Overview

* Access API * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Access API * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Access API * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Access API * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Access API * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Access API * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Access API * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Access API * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Access API * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Access API * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Access API * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Access API * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Access API * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Access API * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Access API * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Access API * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Access API * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Access API * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Access API * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Access API * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Access API * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Access API * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Access API * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Access API * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Access API * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Access API * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Access API * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Access API * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Access API * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Access API * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Access API * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Access API * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Access API * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Access API * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Access API * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Access API * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Access API * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Access API * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Access API * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Access API * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Access API * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Access API * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Access API * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Access API * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

Index

Constants

This section is empty.

Variables

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

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

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

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

Functions

func CacheExpires

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

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

Types

type APIClient

type APIClient struct {
	AccountsApi *AccountsApiService

	BlocksApi *BlocksApiService

	CollectionsApi *CollectionsApiService

	EventsApi *EventsApiService

	ExecutionResultsApi *ExecutionResultsApiService

	NetworkApi *NetworkApiService

	ScriptsApi *ScriptsApiService

	TransactionsApi *TransactionsApiService
	// contains filtered or unexported fields
}

APIClient manages communication with the Access API API v1.0.0 In most cases there should be only one, shared, APIClient.

func NewAPIClient

func NewAPIClient(cfg *Configuration) *APIClient

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

func (*APIClient) ChangeBasePath

func (c *APIClient) ChangeBasePath(path string)

Change base path to allow switching to mocks

type APIKey

type APIKey struct {
	Key    string
	Prefix string
}

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

type APIResponse

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

func NewAPIResponse

func NewAPIResponse(r *http.Response) *APIResponse

func NewAPIResponseWithError

func NewAPIResponseWithError(errorMessage string) *APIResponse

type Account

type Account struct {
	Address string `json:"address"`
	// Flow balance of the account.
	Balance    string             `json:"balance"`
	Keys       []AccountPublicKey `json:"keys,omitempty"`
	Contracts  map[string]string  `json:"contracts,omitempty"`
	Expandable *AccountExpandable `json:"_expandable"`
	Links      *Links             `json:"_links,omitempty"`
}

type AccountExpandable

type AccountExpandable struct {
	Keys      string `json:"keys,omitempty"`
	Contracts string `json:"contracts,omitempty"`
}

type AccountPublicKey

type AccountPublicKey struct {
	// Index of the public key.
	Index string `json:"index"`
	// Hex encoded public key.
	PublicKey        string            `json:"public_key"`
	SigningAlgorithm *SigningAlgorithm `json:"signing_algorithm"`
	HashingAlgorithm *HashingAlgorithm `json:"hashing_algorithm"`
	// Current account sequence number.
	SequenceNumber string `json:"sequence_number"`
	// Weight of the key.
	Weight string `json:"weight"`
	// Flag indicating whether the key is active or not.
	Revoked bool `json:"revoked"`
}

type AccountsApiAccountsAddressGetOpts

type AccountsApiAccountsAddressGetOpts struct {
	BlockHeight optional.Interface
	Expand      optional.Interface
	Select_     optional.Interface
}

type AccountsApiService

type AccountsApiService service

func (*AccountsApiService) AccountsAddressGet

func (a *AccountsApiService) AccountsAddressGet(ctx context.Context, address string, localVarOptionals *AccountsApiAccountsAddressGetOpts) (Account, *http.Response, error)

type AggregatedSignature

type AggregatedSignature struct {
	VerifierSignatures []string `json:"verifier_signatures"`
	SignerIds          []string `json:"signer_ids"`
}

type BasicAuth

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

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

type Block

type Block struct {
	Header          *BlockHeader     `json:"header"`
	Payload         *BlockPayload    `json:"payload,omitempty"`
	ExecutionResult *ExecutionResult `json:"execution_result,omitempty"`
	Expandable      *BlockExpandable `json:"_expandable"`
	Links           *Links           `json:"_links,omitempty"`
}

type BlockEvents

type BlockEvents struct {
	BlockId        string    `json:"block_id,omitempty"`
	BlockHeight    string    `json:"block_height,omitempty"`
	BlockTimestamp time.Time `json:"block_timestamp,omitempty"`
	Events         []Event   `json:"events,omitempty"`
	Links          *Links    `json:"_links,omitempty"`
}

type BlockExpandable

type BlockExpandable struct {
	Payload         string `json:"payload,omitempty"`
	ExecutionResult string `json:"execution_result,omitempty"`
}

type BlockHeader

type BlockHeader struct {
	Id                   string    `json:"id"`
	ParentId             string    `json:"parent_id"`
	Height               string    `json:"height"`
	Timestamp            time.Time `json:"timestamp"`
	ParentVoterSignature string    `json:"parent_voter_signature"`
}

type BlockHeight

type BlockHeight struct {
}

type BlockPayload

type BlockPayload struct {
	CollectionGuarantees []CollectionGuarantee `json:"collection_guarantees"`
	BlockSeals           []BlockSeal           `json:"block_seals"`
}

type BlockSeal

type BlockSeal struct {
	BlockId                      string                `json:"block_id"`
	ResultId                     string                `json:"result_id"`
	FinalState                   string                `json:"final_state"`
	AggregatedApprovalSignatures []AggregatedSignature `json:"aggregated_approval_signatures"`
}

type BlocksApiBlocksGetOpts

type BlocksApiBlocksGetOpts struct {
	Height      optional.Interface
	StartHeight optional.Interface
	EndHeight   optional.Interface
	Expand      optional.Interface
	Select_     optional.Interface
}

type BlocksApiBlocksIdGetOpts

type BlocksApiBlocksIdGetOpts struct {
	Expand  optional.Interface
	Select_ optional.Interface
}

type BlocksApiService

type BlocksApiService service

func (*BlocksApiService) BlocksGet

func (a *BlocksApiService) BlocksGet(ctx context.Context, localVarOptionals *BlocksApiBlocksGetOpts) ([]Block, *http.Response, error)

func (*BlocksApiService) BlocksIdGet

func (a *BlocksApiService) BlocksIdGet(ctx context.Context, id []string, localVarOptionals *BlocksApiBlocksIdGetOpts) ([]Block, *http.Response, error)

type Chunk

type Chunk struct {
	BlockId              string `json:"block_id"`
	CollectionIndex      string `json:"collection_index"`
	StartState           string `json:"start_state"`
	EndState             string `json:"end_state"`
	EventCollection      string `json:"event_collection"`
	Index                string `json:"index"`
	NumberOfTransactions string `json:"number_of_transactions"`
	TotalComputationUsed string `json:"total_computation_used"`
}

type Collection

type Collection struct {
	Id           string                `json:"id"`
	Transactions []Transaction         `json:"transactions,omitempty"`
	Expandable   *CollectionExpandable `json:"_expandable"`
	Links        *Links                `json:"_links,omitempty"`
}

type CollectionExpandable

type CollectionExpandable struct {
	Transactions []string `json:"transactions,omitempty"`
}

type CollectionGuarantee

type CollectionGuarantee struct {
	CollectionId string   `json:"collection_id"`
	SignerIds    []string `json:"signer_ids"`
	Signature    string   `json:"signature"`
}

type CollectionsApiCollectionsIdGetOpts

type CollectionsApiCollectionsIdGetOpts struct {
	Expand  optional.Interface
	Select_ optional.Interface
}

type CollectionsApiService

type CollectionsApiService service

func (*CollectionsApiService) CollectionsIdGet

func (a *CollectionsApiService) CollectionsIdGet(ctx context.Context, id string, localVarOptionals *CollectionsApiCollectionsIdGetOpts) (Collection, *http.Response, error)

type Configuration

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

func NewConfiguration

func NewConfiguration() *Configuration

func (*Configuration) AddDefaultHeader

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

type Event

type Event struct {
	Type_            string `json:"type"`
	TransactionId    string `json:"transaction_id"`
	TransactionIndex string `json:"transaction_index"`
	EventIndex       string `json:"event_index"`
	Payload          string `json:"payload"`
}

type EventsApiEventsGetOpts

type EventsApiEventsGetOpts struct {
	StartHeight optional.Interface
	EndHeight   optional.Interface
	BlockIds    optional.Interface
	Select_     optional.Interface
}

type EventsApiService

type EventsApiService service

func (*EventsApiService) EventsGet

func (a *EventsApiService) EventsGet(ctx context.Context, type_ string, localVarOptionals *EventsApiEventsGetOpts) (BlockEvents, *http.Response, error)

type ExecutionResult

type ExecutionResult struct {
	Id               string  `json:"id"`
	BlockId          string  `json:"block_id"`
	Events           []Event `json:"events"`
	Chunks           []Chunk `json:"chunks,omitempty"`
	PreviousResultId string  `json:"previous_result_id"`
	Links            *Links  `json:"_links,omitempty"`
}

type ExecutionResultsApiExecutionResultsGetOpts

type ExecutionResultsApiExecutionResultsGetOpts struct {
	Select_ optional.Interface
}

type ExecutionResultsApiExecutionResultsIdGetOpts

type ExecutionResultsApiExecutionResultsIdGetOpts struct {
	Select_ optional.Interface
}

type ExecutionResultsApiService

type ExecutionResultsApiService service

func (*ExecutionResultsApiService) ExecutionResultsGet

func (a *ExecutionResultsApiService) ExecutionResultsGet(ctx context.Context, blockId []string, localVarOptionals *ExecutionResultsApiExecutionResultsGetOpts) ([]ExecutionResult, *http.Response, error)

func (*ExecutionResultsApiService) ExecutionResultsIdGet

type GenericSwaggerError

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

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

func (GenericSwaggerError) Body

func (e GenericSwaggerError) Body() []byte

Body returns the raw bytes of the response

func (GenericSwaggerError) Error

func (e GenericSwaggerError) Error() string

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

func (GenericSwaggerError) Model

func (e GenericSwaggerError) Model() interface{}

Model returns the unpacked model of the error

type HashingAlgorithm

type HashingAlgorithm string
const (
	SHA2_256_HashingAlgorithm HashingAlgorithm = "SHA2_256"
	SHA2_384_HashingAlgorithm HashingAlgorithm = "SHA2_384"
	SHA3_256_HashingAlgorithm HashingAlgorithm = "SHA3_256"
	SHA3_384_HashingAlgorithm HashingAlgorithm = "SHA3_384"
	KMAC128_HashingAlgorithm  HashingAlgorithm = "KMAC128"
)

List of HashingAlgorithm

type InlineResponse200

type InlineResponse200 struct {
	Value string `json:"value,omitempty"`
}
type Links struct {
	Self string `json:"_self,omitempty"`
}

type ModelError

type ModelError struct {
	Code    int32  `json:"code,omitempty"`
	Message string `json:"message,omitempty"`
}

type NetworkApiService

type NetworkApiService service

func (*NetworkApiService) NetworkParametersGet

func (a *NetworkApiService) NetworkParametersGet(ctx context.Context) (NetworkParameters, *http.Response, error)

NetworkApiService Get Network Parameters Get network-wide parameters of the blockchain

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

@return NetworkParameters

type NetworkParameters

type NetworkParameters struct {
	ChainId string `json:"chain_id"`
}

type OneOfBlockHeight

type OneOfBlockHeight struct {
}

type ProposalKey

type ProposalKey struct {
	Address        string `json:"address"`
	KeyIndex       string `json:"key_index"`
	SequenceNumber string `json:"sequence_number"`
}

type ScriptsApiScriptsPostOpts

type ScriptsApiScriptsPostOpts struct {
	BlockId     optional.Interface
	BlockHeight optional.Interface
}

type ScriptsApiService

type ScriptsApiService service

func (*ScriptsApiService) ScriptsPost

func (a *ScriptsApiService) ScriptsPost(ctx context.Context, body ScriptsBody, localVarOptionals *ScriptsApiScriptsPostOpts) (InlineResponse200, *http.Response, error)

type ScriptsBody

type ScriptsBody struct {
	// Base64 encoded content of the Cadence script.
	Script string `json:"script,omitempty"`
	// An list of arguments each encoded as Base64 passed in the [JSON-Cadence interchange format](https://docs.onflow.org/cadence/json-cadence-spec/).
	Arguments []string `json:"arguments,omitempty"`
}

type SigningAlgorithm

type SigningAlgorithm string
const (
	BLSBLS12381_SigningAlgorithm     SigningAlgorithm = "BLSBLS12381"
	ECDSAP256_SigningAlgorithm       SigningAlgorithm = "ECDSAP256"
	ECDSA_SECP256K1_SigningAlgorithm SigningAlgorithm = "ECDSASecp256k1"
)

List of SigningAlgorithm

type Transaction

type Transaction struct {
	Id string `json:"id"`
	// Base64 encoded Cadence script.
	Script string `json:"script"`
	// Array of Base64 encoded arguments with in [JSON-Cadence interchange format](https://docs.onflow.org/cadence/json-cadence-spec/).
	Arguments        []string `json:"arguments"`
	ReferenceBlockId string   `json:"reference_block_id"`
	// The limit on the amount of computation a transaction is allowed to preform.
	GasLimit           string                 `json:"gas_limit"`
	Payer              string                 `json:"payer"`
	ProposalKey        *ProposalKey           `json:"proposal_key"`
	Authorizers        []string               `json:"authorizers"`
	PayloadSignatures  []TransactionSignature `json:"payload_signatures"`
	EnvelopeSignatures []TransactionSignature `json:"envelope_signatures"`
	Result             *TransactionResult     `json:"result,omitempty"`
	Expandable         *TransactionExpandable `json:"_expandable"`
	Links              *Links                 `json:"_links,omitempty"`
}

type TransactionExecution

type TransactionExecution string

TransactionExecution : This value indicates whether the transaction execution succeded or not, this value should be checked when determining transaction success.

const (
	PENDING_TransactionExecution TransactionExecution = "Pending"
	SUCCESS_TransactionExecution TransactionExecution = "Success"
	FAILURE_TransactionExecution TransactionExecution = "Failure"
)

List of TransactionExecution

type TransactionExpandable

type TransactionExpandable struct {
	Result string `json:"result,omitempty"`
}

type TransactionResult

type TransactionResult struct {
	BlockId    string                `json:"block_id"`
	Execution  *TransactionExecution `json:"execution,omitempty"`
	Status     *TransactionStatus    `json:"status"`
	StatusCode int32                 `json:"status_code"`
	// Provided transaction error in case the transaction wasn't successful.
	ErrorMessage    string  `json:"error_message"`
	ComputationUsed string  `json:"computation_used"`
	Events          []Event `json:"events"`
	Links           *Links  `json:"_links,omitempty"`
}

type TransactionSignature

type TransactionSignature struct {
	Address   string `json:"address"`
	KeyIndex  string `json:"key_index"`
	Signature string `json:"signature"`
}

Base64 encoded signature.

type TransactionStatus

type TransactionStatus string

TransactionStatus : This value indicates the state of the transaction execution. Only sealed and expired are final and immutable states.

const (
	PENDING_TransactionStatus   TransactionStatus = "Pending"
	FINALIZED_TransactionStatus TransactionStatus = "Finalized"
	EXECUTED_TransactionStatus  TransactionStatus = "Executed"
	SEALED_TransactionStatus    TransactionStatus = "Sealed"
	EXPIRED_TransactionStatus   TransactionStatus = "Expired"
)

List of TransactionStatus

type TransactionsApiService

type TransactionsApiService service

func (*TransactionsApiService) TransactionResultsTransactionIdGet

func (a *TransactionsApiService) TransactionResultsTransactionIdGet(ctx context.Context, transactionId string, localVarOptionals *TransactionsApiTransactionResultsTransactionIdGetOpts) (TransactionResult, *http.Response, error)

func (*TransactionsApiService) TransactionsIdGet

func (a *TransactionsApiService) TransactionsIdGet(ctx context.Context, id string, localVarOptionals *TransactionsApiTransactionsIdGetOpts) (Transaction, *http.Response, error)

func (*TransactionsApiService) TransactionsPost

TransactionsApiService Submit a Transaction Send a new signed transaction payload to the network with [required transaction fields](https://docs.onflow.org/flow-go-sdk/#transactions).

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

@return Transaction

type TransactionsApiTransactionResultsTransactionIdGetOpts

type TransactionsApiTransactionResultsTransactionIdGetOpts struct {
	Expand  optional.Interface
	Select_ optional.Interface
}

type TransactionsApiTransactionsIdGetOpts

type TransactionsApiTransactionsIdGetOpts struct {
	Expand  optional.Interface
	Select_ optional.Interface
}

type TransactionsBody

type TransactionsBody struct {
	// Base64 encoded content of the Cadence script.
	Script string `json:"script"`
	// A list of arguments each encoded as Base64 passed in the [JSON-Cadence interchange format](https://docs.onflow.org/cadence/json-cadence-spec/).
	Arguments        []string `json:"arguments"`
	ReferenceBlockId string   `json:"reference_block_id"`
	// The limit on the amount of computation a transaction is allowed to preform.
	GasLimit    string       `json:"gas_limit"`
	Payer       string       `json:"payer"`
	ProposalKey *ProposalKey `json:"proposal_key"`
	Authorizers []string     `json:"authorizers"`
	// A list of Base64 encoded signatures.
	PayloadSignatures []TransactionSignature `json:"payload_signatures"`
	// A list of Base64 encoded signatures.
	EnvelopeSignatures []TransactionSignature `json:"envelope_signatures"`
}

Jump to

Keyboard shortcuts

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