v1

package
v0.0.0-...-270a13f Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AccountPath                 = "GET@accounts/{address}"
	AccountResourcePath         = "GET@accounts/{address}/resources"
	AccountModulePath           = "GET@accounts/{address}/modules"
	AccountModuleWithNamePath   = "GET@accounts/{address}/module/{module_name}"
	AccountResourceWithTypePath = "GET@accounts/{address}/resource/{resource_type}"
)
View Source
const (
	BlockByHeightPath  = "GET@blocks/by_height/{height}"
	BlockByVersionPath = "GET@blocks/by_version/{version}"
)
View Source
const (
	EventByCreationNumberPath = "GET@accounts/{address}/events/{creation_number}"
	EventByEventHandlerPath   = "GET@accounts/{address}/events/{event_handle}/{field_name}"
)
View Source
const (
	HealthyPath = "GET@-/healthy"
	LedgerPath  = "GET@"
)
View Source
const (
	TransactionPath          = "GET@transactions"
	TransactionByHashPath    = "GET@transactions/by_hash/{txn_hash}"
	TransactionByVersionPath = "GET@transactions/by_version/{txn_version}"
	TransactionOfAccountPath = "GET@accounts/{address}/transactions"
	TransactionEncodingPath  = "POST@transactions/encode_submission"
	TransactionSimulatePath  = "POST@transactions/simulate"
	TransactionSubmitPath    = "POST@transactions"
	EstimateGasPricePath     = "GET@estimate_gas_price"
)

Variables

This section is empty.

Functions

func Path

func Path(ant MethodType) (rawpath string, method string)

Types

type ABIInfo

type ABIInfo struct {
	Address          string            `json:"address"`
	Name             string            `json:"name"`
	Friends          []string          `json:"friends"`
	ExposedFunctions []ExposedFunction `json:"exposed_functions"`
	Structs          []ModuleStruct    `json:"structs"`
}

type AccountInfo

type AccountInfo struct {
	SequenceNumber    string `json:"sequence_number"`
	AuthenticationKey string `json:"authentication_key"`
}

type AccountModuleInfo

type AccountModuleInfo struct {
	Bytecode string  `json:"bytecode"`
	Abi      ABIInfo `json:"abi"`
}

type AccountModuleReq

type AccountModuleReq struct {
	LedgerVersion uint64 `param:"ledger_version,omitempty" `
	Address       string `path:"address"`
	Start         int64  `param:"start,omitempty" `
	Limit         int64  `param:"limit,omitempty" `
}

type AccountModuleWithNameReq

type AccountModuleWithNameReq struct {
	LedgerVersion uint64 `param:"ledger_version,omitempty" `
	Address       string `path:"address"`
	Name          string `path:"module_name"`
}

type AccountReq

type AccountReq struct {
	LedgerVersion uint64 `param:"ledger_version,omitempty" `
	Address       string `path:"address"`
}

type AccountResourceInfo

type AccountResourceInfo struct {
	Type string          `json:"type"`
	Data json.RawMessage `json:"data"`
}

type AccountResourceReq

type AccountResourceReq struct {
	LedgerVersion uint64 `param:"ledger_version,omitempty" `
	Address       string `path:"address"`
	Start         int64  `param:"start,omitempty" `
	Limit         int64  `param:"limit,omitempty" `
}

type AccountResourceWithTypeReq

type AccountResourceWithTypeReq struct {
	LedgerVersion uint64 `param:"ledger_version,omitempty" `
	Address       string `path:"address"`
	Type          string `path:"resource_type"`
}

type BlockByHeightReq

type BlockByHeightReq struct {
	WithTransactions bool   `param:"with_transactions,omitempty"`
	Height           uint64 `path:"height"`
}

type BlockByVersionReq

type BlockByVersionReq struct {
	WithTransactions bool   `param:"with_transactions,omitempty"`
	Version          uint64 `path:"version"`
}

type BlockInfo

type BlockInfo struct {
	BlockHeight    string            `json:"block_height"`
	BlockHash      string            `json:"block_hash"`
	BlockTimestamp string            `json:"block_timestamp"`
	FirstVersion   string            `json:"first_version"`
	LastVersion    string            `json:"last_version"`
	Transactions   []TransactionInfo `json:"transactions"`
}

type ErrorMsg

type ErrorMsg struct {
	Message            string `json:"message"`
	ErrorCode          string `json:"error_code"`
	AptosLedgerVersion string `json:"aptos_ledger_version"`
}

func (ErrorMsg) Error

func (err ErrorMsg) Error() string

type EstimateGasPrice

type EstimateGasPrice struct {
	DeprioritizedGasEstimate int `json:"deprioritized_gas_estimate"`
	GasEstimate              int `json:"gas_estimate"`
	PrioritizedGasEstimate   int `json:"prioritized_gas_estimate"`
}

type EventByCreationNumberReq

type EventByCreationNumberReq struct {
	Limit          uint16 `param:"limit,omitempty"`
	Start          uint64 `param:"start,omitempty"`
	Address        string `path:"address"`
	CreationNumber string `path:"creation_number"`
}

type EventByEventHandlerReq

type EventByEventHandlerReq struct {
	Address string `path:"address"`
	Handler string `path:"event_handle"`
	Filed   string `path:"field_name"`

	Limit uint16 `param:"limit,omitempty"`
	Start uint64 `param:"start,omitempty"`
}

type EventInfo

type EventInfo struct {
	Version        string          `json:"version"`
	GUID           GUIDInfo        `json:"guid"`
	SequenceNumber string          `json:"sequence_number"`
	Type           string          `json:"type"`
	Data           json.RawMessage `json:"data"`
}

type ExposedFunction

type ExposedFunction struct {
	Name              string             `json:"name"`
	Visibility        string             `json:"visibility"`
	IsEntry           bool               `json:"is_entry"`
	GenericTypeParams []GenericTypeParam `json:"generic_type_params"`
	Params            []string           `json:"params"`
	Return            []string           `json:"return"`
}

type GUIDInfo

type GUIDInfo struct {
	AccountAddress string `path:"account_address"`
	CreationNumber string `path:"creation_number"`
}

type GenericTypeParam

type GenericTypeParam struct {
	Constraints []string `json:"constraints"`
}

type HealthyReq

type HealthyReq struct {
	Duration uint32 `param:"duration_secs,omitempty"`
}

type HealthyRsp

type HealthyRsp struct {
	Message string `json:"message"`
}

type LedgerInfo

type LedgerInfo struct {
	ChainID             int    `json:"chain_id"`
	Epoch               string `json:"epoch"`
	LedgerVersion       string `json:"ledger_version"`
	OldestLedgerVersion string `json:"oldest_ledger_version"`
	LedgerTimestamp     string `json:"ledger_timestamp"`
	NodeRole            string `json:"node_role"`
	OldestBlockHeight   string `json:"oldest_block_height"`
	BlockHeight         string `json:"block_height"`
	GitHash             string `json:"git_hash"`
}

type LedgerRsp

type LedgerRsp struct {
	LedgerInfo
}

type MethodType

type MethodType uint16
const (
	MTHealthy                 MethodType = 0x1
	MTLedger                  MethodType = 0x2
	MTAccount                 MethodType = 0x3
	MTAccountResource         MethodType = 0x4
	MTAccountModule           MethodType = 0x5
	MTAccountResourceWithType MethodType = 0x6
	MTAccountModuleWithName   MethodType = 0x7
	MTTransaction             MethodType = 0xb
	MTTransactionByHash       MethodType = 0xc
	MTTransactionByVersion    MethodType = 0xd
	MTTransactionOfAccount    MethodType = 0xe

	MTTransactionEncoding   MethodType = 0x11
	MTTransactionSimulate   MethodType = 0x12
	MTTransactionSubmit     MethodType = 0x13
	MTBlockByHeight         MethodType = 0x14
	MTBlockByVersion        MethodType = 0x15
	MTEventByCreationNumber MethodType = 0x16
	MTEventByEventHandler   MethodType = 0x17
	MTEstimateGasPrice      MethodType = 0x18
)

type ModuleStruct

type ModuleStruct struct {
	Name              string              `json:"name"`
	IsNative          bool                `json:"is_native"`
	Abilities         []string            `json:"abilities"`
	GenericTypeParams []GenericTypeParam  `json:"generic_type_params"`
	Fields            []ModuleStructField `json:"fields"`
}

type ModuleStructField

type ModuleStructField struct {
	Name string `json:"name"`
	Type string `json:"type"`
}

type TransactionByHashReq

type TransactionByHashReq struct {
	Hash string `path:"txn_hash"`
}

type TransactionByVersionReq

type TransactionByVersionReq struct {
	Version uint64 `path:"txn_version"`
}

type TransactionChangeData

type TransactionChangeData struct {
	Address      string                    `json:"address"`
	StateKeyHash string                    `json:"state_key_hash"`
	Type         string                    `json:"type"`
	Data         TransactionChangeDataInfo `json:"data"`
}

type TransactionChangeDataEvent

type TransactionChangeDataEvent struct {
	Counter string          `json:"counter"`
	GUID    TransactionGUID `json:"guid"`
}

type TransactionChangeDataInfo

type TransactionChangeDataInfo struct {
	EpochInterval  string                     `json:"epoch_interval"`
	Height         string                     `json:"height"`
	NewBlockEvents TransactionChangeDataEvent `json:"new_block_events"`
}

type TransactionChangeInfo

type TransactionChangeInfo struct {
	Address      string                `json:"address"`
	StateKeyHash string                `json:"state_key_hash"`
	Data         TransactionChangeData `json:"data"`
	Type         string                `json:"type"`
}

type TransactionGUID

type TransactionGUID struct {
	ID TransactionID `json:"id"`
}

type TransactionID

type TransactionID struct {
	Addr        string `json:"addr"`
	CreationNum string `json:"creation_num"`
}

type TransactionInfo

type TransactionInfo struct {
	Version                  string               `json:"version"`
	Hash                     string               `json:"hash"`
	StateChangeHash          string               `json:"state_change_hash"`
	EventRootHash            string               `json:"event_root_hash"`
	StateCheckpointHash      string               `json:"state_checkpoint_hash"`
	GasUsed                  string               `json:"gas_used"`
	Success                  bool                 `json:"success"`
	VMStatus                 string               `json:"vm_status"`
	AccumulatorRootHash      string               `json:"accumulator_root_hash"`
	Changes                  []json.RawMessage    `json:"changes"`
	ID                       string               `json:"id,omitempty"`
	Epoch                    string               `json:"epoch,omitempty"`
	Round                    string               `json:"round,omitempty"`
	Events                   []EventInfo          `json:"events,omitempty"`
	PreviousBlockVotesBitvec []bool               `json:"previous_block_votes_bitvec,omitempty"`
	Proposer                 string               `json:"proposer,omitempty"`
	FailedProposerIndices    []json.RawMessage    `json:"failed_proposer_indices,omitempty"`
	Timestamp                string               `json:"timestamp"`
	Type                     string               `json:"type"`
	Sender                   string               `json:"sender,omitempty"`
	SequenceNumber           string               `json:"sequence_number,omitempty"`
	MaxGasAmount             string               `json:"max_gas_amount,omitempty"`
	GasUnitPrice             string               `json:"gas_unit_price,omitempty"`
	ExpirationTimestampSecs  string               `json:"expiration_timestamp_secs,omitempty"`
	Payload                  TransactionPayload   `json:"payload,omitempty"`
	Signature                TransactionSignature `json:"signature,omitempty"`
}

type TransactionOfAccountReq

type TransactionOfAccountReq struct {
	Address string `path:"address"`
	Limit   uint16 `param:"limit,omitempty"`
	Start   uint64 `param:"start,omitempty"`
}

type TransactionPayload

type TransactionPayload struct {
	Function      string            `json:"function"`
	TypeArguments []string          `json:"type_arguments"`
	Arguments     []json.RawMessage `json:"arguments"`
	Type          string            `json:"type"`
}

type TransactionReq

type TransactionReq struct {
	Limit uint16 `param:"limit,omitempty"`
	Start uint64 `param:"start,omitempty"`
}

type TransactionSignature

type TransactionSignature struct {
	PublicKey string `json:"public_key"`
	Signature string `json:"signature"`
	Type      string `json:"type"`
}

Jump to

Keyboard shortcuts

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