Documentation ¶
Index ¶
- Constants
- Variables
- type ChainEntry
- type ChainIdQuery
- type ChainQueryResponse
- type DataEntryQuery
- func (v *DataEntryQuery) Copy() *DataEntryQuery
- func (v *DataEntryQuery) CopyAsInterface() interface{}
- func (v *DataEntryQuery) Equal(u *DataEntryQuery) bool
- func (v *DataEntryQuery) IsValid() error
- func (v *DataEntryQuery) MarshalBinary() ([]byte, error)
- func (v *DataEntryQuery) MarshalJSON() ([]byte, error)
- func (v *DataEntryQuery) UnmarshalBinary(data []byte) error
- func (v *DataEntryQuery) UnmarshalBinaryFrom(rd io.Reader) error
- func (v *DataEntryQuery) UnmarshalJSON(data []byte) error
- type DataEntryQueryResponse
- func (v *DataEntryQueryResponse) Copy() *DataEntryQueryResponse
- func (v *DataEntryQueryResponse) CopyAsInterface() interface{}
- func (v *DataEntryQueryResponse) Equal(u *DataEntryQueryResponse) bool
- func (v *DataEntryQueryResponse) IsValid() error
- func (v *DataEntryQueryResponse) MarshalBinary() ([]byte, error)
- func (v *DataEntryQueryResponse) MarshalJSON() ([]byte, error)
- func (v *DataEntryQueryResponse) UnmarshalBinary(data []byte) error
- func (v *DataEntryQueryResponse) UnmarshalBinaryFrom(rd io.Reader) error
- func (v *DataEntryQueryResponse) UnmarshalJSON(data []byte) error
- type DataEntrySetQuery
- type DescriptionResponse
- type DirectoryQuery
- type ExecuteRequest
- type GeneralQuery
- type JrpcMethods
- func (m *JrpcMethods) Describe(_ context.Context, params json.RawMessage) interface{}
- func (m *JrpcMethods) EnableDebug()
- func (m *JrpcMethods) Execute(ctx context.Context, params json.RawMessage) interface{}
- func (m *JrpcMethods) ExecuteAddCredits(ctx context.Context, params json.RawMessage) interface{}
- func (m *JrpcMethods) ExecuteAddValidator(ctx context.Context, params json.RawMessage) interface{}
- func (m *JrpcMethods) ExecuteBurnTokens(ctx context.Context, params json.RawMessage) interface{}
- func (m *JrpcMethods) ExecuteCreateAdi(ctx context.Context, params json.RawMessage) interface{}
- func (m *JrpcMethods) ExecuteCreateDataAccount(ctx context.Context, params json.RawMessage) interface{}
- func (m *JrpcMethods) ExecuteCreateIdentity(ctx context.Context, params json.RawMessage) interface{}
- func (m *JrpcMethods) ExecuteCreateKeyBook(ctx context.Context, params json.RawMessage) interface{}
- func (m *JrpcMethods) ExecuteCreateKeyPage(ctx context.Context, params json.RawMessage) interface{}
- func (m *JrpcMethods) ExecuteCreateToken(ctx context.Context, params json.RawMessage) interface{}
- func (m *JrpcMethods) ExecuteCreateTokenAccount(ctx context.Context, params json.RawMessage) interface{}
- func (m *JrpcMethods) ExecuteDirect(ctx context.Context, params json.RawMessage) interface{}
- func (m *JrpcMethods) ExecuteIssueTokens(ctx context.Context, params json.RawMessage) interface{}
- func (m *JrpcMethods) ExecuteRemoveValidator(ctx context.Context, params json.RawMessage) interface{}
- func (m *JrpcMethods) ExecuteSendTokens(ctx context.Context, params json.RawMessage) interface{}
- func (m *JrpcMethods) ExecuteUpdateAccountAuth(ctx context.Context, params json.RawMessage) interface{}
- func (m *JrpcMethods) ExecuteUpdateKey(ctx context.Context, params json.RawMessage) interface{}
- func (m *JrpcMethods) ExecuteUpdateKeyPage(ctx context.Context, params json.RawMessage) interface{}
- func (m *JrpcMethods) ExecuteUpdateValidatorKey(ctx context.Context, params json.RawMessage) interface{}
- func (m *JrpcMethods) ExecuteWriteData(ctx context.Context, params json.RawMessage) interface{}
- func (m *JrpcMethods) ExecuteWriteDataTo(ctx context.Context, params json.RawMessage) interface{}
- func (m *JrpcMethods) Faucet(ctx context.Context, params json.RawMessage) interface{}
- func (m *JrpcMethods) Metrics(_ context.Context, params json.RawMessage) interface{}
- func (m *JrpcMethods) NewMux() *http.ServeMux
- func (m *JrpcMethods) Querier_TESTONLY() Querier
- func (m *JrpcMethods) Query(_ context.Context, params json.RawMessage) interface{}
- func (m *JrpcMethods) QueryChain(_ context.Context, params json.RawMessage) interface{}
- func (m *JrpcMethods) QueryData(_ context.Context, params json.RawMessage) interface{}
- func (m *JrpcMethods) QueryDataSet(_ context.Context, params json.RawMessage) interface{}
- func (m *JrpcMethods) QueryDirectory(_ context.Context, params json.RawMessage) interface{}
- func (m *JrpcMethods) QueryKeyPageIndex(_ context.Context, params json.RawMessage) interface{}
- func (m *JrpcMethods) QueryMinorBlocks(_ context.Context, params json.RawMessage) interface{}
- func (m *JrpcMethods) QuerySynth(_ context.Context, params json.RawMessage) interface{}
- func (m *JrpcMethods) QueryTx(_ context.Context, params json.RawMessage) interface{}
- func (m *JrpcMethods) QueryTxHistory(_ context.Context, params json.RawMessage) interface{}
- func (m *JrpcMethods) Status(_ context.Context, params json.RawMessage) interface{}
- func (m *JrpcMethods) Version(_ context.Context, params json.RawMessage) interface{}
- type KeyPage
- type KeyPageIndexQuery
- type MerkleState
- type MetricsQuery
- type MetricsResponse
- type MinorBlocksQuery
- type MinorQueryResponse
- type MultiResponse
- type Options
- type Querier
- type QueryOptions
- type QueryPagination
- type SignatureBook
- type SignaturePage
- type Signer
- type SignerMetadata
- type StatusResponse
- type SyntheticTransactionRequest
- type TokenDeposit
- type TokenSend
- type TransactionQueryResponse
- type TxHistoryQuery
- type TxRequest
- type TxResponse
- type TxnQuery
- type UrlQuery
- type VersionResponse
Constants ¶
const ( ErrCodeInternal = -32800 - iota ErrCodeDispatch ErrCodeValidation ErrCodeSubmission ErrCodeAccumulate ErrCodeNotLiteAccount ErrCodeNotAcmeAccount ErrCodeNotFound ErrCodeCanceled )
General Errors
const ( ErrCodeMetricsQuery = -32900 - iota ErrCodeMetricsNotAVector ErrCodeMetricsVectorEmpty )
Metrics errors
const (
ErrCodeProtocolBase = -33000 - iota
)
Custom errors
const QueryMinorBlocksMaxCount = 1000 // Hardcoded ceiling for now
Variables ¶
var ( ErrInternal = jsonrpc2.NewError(ErrCodeInternal, "Internal Error", "An internal error occured") ErrCanceled = jsonrpc2.NewError(ErrCodeCanceled, "Canceled", "The request was canceled") ErrMetricsNotAVector = jsonrpc2.NewError(ErrCodeMetricsNotAVector, "Metrics Query Error", "response is not a vector") ErrMetricsVectorEmpty = jsonrpc2.NewError(ErrCodeMetricsVectorEmpty, "Metrics Query Error", "response vector is empty") )
var ErrInvalidUrl = errors.New("invalid URL")
Functions ¶
This section is empty.
Types ¶
type ChainEntry ¶ added in v0.5.1
type ChainEntry struct { Height int64 `json:"height" form:"height" query:"height" validate:"required"` Entry []byte `json:"entry,omitempty" form:"entry" query:"entry" validate:"required"` State [][]byte `json:"state,omitempty" form:"state" query:"state" validate:"required"` Value interface{} `json:"value,omitempty" form:"value" query:"value" validate:"required"` // contains filtered or unexported fields }
func (*ChainEntry) MarshalJSON ¶ added in v0.5.1
func (v *ChainEntry) MarshalJSON() ([]byte, error)
func (*ChainEntry) UnmarshalJSON ¶ added in v0.5.1
func (v *ChainEntry) UnmarshalJSON(data []byte) error
type ChainIdQuery ¶
type ChainIdQuery struct { ChainId []byte `json:"chainId,omitempty" form:"chainId" query:"chainId" validate:"required"` // contains filtered or unexported fields }
func (*ChainIdQuery) MarshalJSON ¶
func (v *ChainIdQuery) MarshalJSON() ([]byte, error)
func (*ChainIdQuery) UnmarshalJSON ¶
func (v *ChainIdQuery) UnmarshalJSON(data []byte) error
type ChainQueryResponse ¶
type ChainQueryResponse struct { Type string `json:"type,omitempty" form:"type" query:"type" validate:"required"` MainChain *MerkleState `json:"mainChain,omitempty" form:"mainChain" query:"mainChain" validate:"required"` Chains []query.ChainState `json:"chains,omitempty" form:"chains" query:"chains" validate:"required"` Data interface{} `json:"data,omitempty" form:"data" query:"data" validate:"required"` ChainId []byte `json:"chainId,omitempty" form:"chainId" query:"chainId" validate:"required"` Receipt *query.GeneralReceipt `json:"receipt,omitempty" form:"receipt" query:"receipt" validate:"required"` // contains filtered or unexported fields }
func (*ChainQueryResponse) MarshalJSON ¶
func (v *ChainQueryResponse) MarshalJSON() ([]byte, error)
func (*ChainQueryResponse) UnmarshalJSON ¶
func (v *ChainQueryResponse) UnmarshalJSON(data []byte) error
type DataEntryQuery ¶
type DataEntryQuery struct { Url *url.URL `json:"url,omitempty" form:"url" query:"url" validate:"required"` EntryHash [32]byte `json:"entryHash,omitempty" form:"entryHash" query:"entryHash"` // contains filtered or unexported fields }
func (*DataEntryQuery) Copy ¶ added in v0.5.1
func (v *DataEntryQuery) Copy() *DataEntryQuery
func (*DataEntryQuery) CopyAsInterface ¶ added in v0.5.1
func (v *DataEntryQuery) CopyAsInterface() interface{}
func (*DataEntryQuery) Equal ¶
func (v *DataEntryQuery) Equal(u *DataEntryQuery) bool
func (*DataEntryQuery) IsValid ¶
func (v *DataEntryQuery) IsValid() error
func (*DataEntryQuery) MarshalBinary ¶
func (v *DataEntryQuery) MarshalBinary() ([]byte, error)
func (*DataEntryQuery) MarshalJSON ¶
func (v *DataEntryQuery) MarshalJSON() ([]byte, error)
func (*DataEntryQuery) UnmarshalBinary ¶
func (v *DataEntryQuery) UnmarshalBinary(data []byte) error
func (*DataEntryQuery) UnmarshalBinaryFrom ¶
func (v *DataEntryQuery) UnmarshalBinaryFrom(rd io.Reader) error
func (*DataEntryQuery) UnmarshalJSON ¶
func (v *DataEntryQuery) UnmarshalJSON(data []byte) error
type DataEntryQueryResponse ¶
type DataEntryQueryResponse struct { EntryHash [32]byte `json:"entryHash,omitempty" form:"entryHash" query:"entryHash" validate:"required"` Entry protocol.DataEntry `json:"entry,omitempty" form:"entry" query:"entry" validate:"required"` // contains filtered or unexported fields }
func (*DataEntryQueryResponse) Copy ¶ added in v0.5.1
func (v *DataEntryQueryResponse) Copy() *DataEntryQueryResponse
func (*DataEntryQueryResponse) CopyAsInterface ¶ added in v0.5.1
func (v *DataEntryQueryResponse) CopyAsInterface() interface{}
func (*DataEntryQueryResponse) Equal ¶
func (v *DataEntryQueryResponse) Equal(u *DataEntryQueryResponse) bool
func (*DataEntryQueryResponse) IsValid ¶
func (v *DataEntryQueryResponse) IsValid() error
func (*DataEntryQueryResponse) MarshalBinary ¶
func (v *DataEntryQueryResponse) MarshalBinary() ([]byte, error)
func (*DataEntryQueryResponse) MarshalJSON ¶
func (v *DataEntryQueryResponse) MarshalJSON() ([]byte, error)
func (*DataEntryQueryResponse) UnmarshalBinary ¶
func (v *DataEntryQueryResponse) UnmarshalBinary(data []byte) error
func (*DataEntryQueryResponse) UnmarshalBinaryFrom ¶
func (v *DataEntryQueryResponse) UnmarshalBinaryFrom(rd io.Reader) error
func (*DataEntryQueryResponse) UnmarshalJSON ¶
func (v *DataEntryQueryResponse) UnmarshalJSON(data []byte) error
type DataEntrySetQuery ¶
type DataEntrySetQuery struct { UrlQuery QueryPagination QueryOptions // contains filtered or unexported fields }
func (*DataEntrySetQuery) MarshalJSON ¶
func (v *DataEntrySetQuery) MarshalJSON() ([]byte, error)
func (*DataEntrySetQuery) UnmarshalJSON ¶
func (v *DataEntrySetQuery) UnmarshalJSON(data []byte) error
type DescriptionResponse ¶
type DirectoryQuery ¶
type DirectoryQuery struct { UrlQuery QueryPagination QueryOptions // contains filtered or unexported fields }
func (*DirectoryQuery) MarshalJSON ¶
func (v *DirectoryQuery) MarshalJSON() ([]byte, error)
func (*DirectoryQuery) UnmarshalJSON ¶
func (v *DirectoryQuery) UnmarshalJSON(data []byte) error
type ExecuteRequest ¶ added in v1.0.0
type GeneralQuery ¶
type GeneralQuery struct { UrlQuery QueryOptions // contains filtered or unexported fields }
func (*GeneralQuery) MarshalJSON ¶
func (v *GeneralQuery) MarshalJSON() ([]byte, error)
func (*GeneralQuery) UnmarshalJSON ¶
func (v *GeneralQuery) UnmarshalJSON(data []byte) error
type JrpcMethods ¶
type JrpcMethods struct { Options // contains filtered or unexported fields }
func NewJrpc ¶
func NewJrpc(opts Options) (*JrpcMethods, error)
func (*JrpcMethods) Describe ¶
func (m *JrpcMethods) Describe(_ context.Context, params json.RawMessage) interface{}
func (*JrpcMethods) EnableDebug ¶
func (m *JrpcMethods) EnableDebug()
func (*JrpcMethods) Execute ¶
func (m *JrpcMethods) Execute(ctx context.Context, params json.RawMessage) interface{}
func (*JrpcMethods) ExecuteAddCredits ¶
func (m *JrpcMethods) ExecuteAddCredits(ctx context.Context, params json.RawMessage) interface{}
ExecuteAddCredits submits an AddCredits transaction.
func (*JrpcMethods) ExecuteAddValidator ¶ added in v0.5.1
func (m *JrpcMethods) ExecuteAddValidator(ctx context.Context, params json.RawMessage) interface{}
ExecuteAddValidator submits an AddValidator transaction.
func (*JrpcMethods) ExecuteBurnTokens ¶
func (m *JrpcMethods) ExecuteBurnTokens(ctx context.Context, params json.RawMessage) interface{}
ExecuteBurnTokens submits a BurnTokens transaction.
func (*JrpcMethods) ExecuteCreateAdi ¶
func (m *JrpcMethods) ExecuteCreateAdi(ctx context.Context, params json.RawMessage) interface{}
ExecuteCreateAdi submits a CreateIdentity transaction.
func (*JrpcMethods) ExecuteCreateDataAccount ¶
func (m *JrpcMethods) ExecuteCreateDataAccount(ctx context.Context, params json.RawMessage) interface{}
ExecuteCreateDataAccount submits a CreateDataAccount transaction.
func (*JrpcMethods) ExecuteCreateIdentity ¶
func (m *JrpcMethods) ExecuteCreateIdentity(ctx context.Context, params json.RawMessage) interface{}
ExecuteCreateIdentity submits a CreateIdentity transaction.
func (*JrpcMethods) ExecuteCreateKeyBook ¶
func (m *JrpcMethods) ExecuteCreateKeyBook(ctx context.Context, params json.RawMessage) interface{}
ExecuteCreateKeyBook submits a CreateKeyBook transaction.
func (*JrpcMethods) ExecuteCreateKeyPage ¶
func (m *JrpcMethods) ExecuteCreateKeyPage(ctx context.Context, params json.RawMessage) interface{}
ExecuteCreateKeyPage submits a CreateKeyPage transaction.
func (*JrpcMethods) ExecuteCreateToken ¶
func (m *JrpcMethods) ExecuteCreateToken(ctx context.Context, params json.RawMessage) interface{}
ExecuteCreateToken submits a CreateToken transaction.
func (*JrpcMethods) ExecuteCreateTokenAccount ¶
func (m *JrpcMethods) ExecuteCreateTokenAccount(ctx context.Context, params json.RawMessage) interface{}
ExecuteCreateTokenAccount submits a CreateTokenAccount transaction.
func (*JrpcMethods) ExecuteDirect ¶ added in v1.0.0
func (m *JrpcMethods) ExecuteDirect(ctx context.Context, params json.RawMessage) interface{}
func (*JrpcMethods) ExecuteIssueTokens ¶
func (m *JrpcMethods) ExecuteIssueTokens(ctx context.Context, params json.RawMessage) interface{}
ExecuteIssueTokens submits an IssueTokens transaction.
func (*JrpcMethods) ExecuteRemoveValidator ¶ added in v0.5.1
func (m *JrpcMethods) ExecuteRemoveValidator(ctx context.Context, params json.RawMessage) interface{}
ExecuteRemoveValidator submits a RemoveValidator transaction.
func (*JrpcMethods) ExecuteSendTokens ¶
func (m *JrpcMethods) ExecuteSendTokens(ctx context.Context, params json.RawMessage) interface{}
ExecuteSendTokens submits a SendTokens transaction.
func (*JrpcMethods) ExecuteUpdateAccountAuth ¶ added in v0.6.0
func (m *JrpcMethods) ExecuteUpdateAccountAuth(ctx context.Context, params json.RawMessage) interface{}
ExecuteUpdateAccountAuth submits an UpdateAccountAuth transaction.
func (*JrpcMethods) ExecuteUpdateKey ¶ added in v0.6.0
func (m *JrpcMethods) ExecuteUpdateKey(ctx context.Context, params json.RawMessage) interface{}
ExecuteUpdateKey submits an UpdateKey transaction.
func (*JrpcMethods) ExecuteUpdateKeyPage ¶
func (m *JrpcMethods) ExecuteUpdateKeyPage(ctx context.Context, params json.RawMessage) interface{}
ExecuteUpdateKeyPage submits an UpdateKeyPage transaction.
func (*JrpcMethods) ExecuteUpdateValidatorKey ¶ added in v0.5.1
func (m *JrpcMethods) ExecuteUpdateValidatorKey(ctx context.Context, params json.RawMessage) interface{}
ExecuteUpdateValidatorKey submits an UpdateValidatorKey transaction.
func (*JrpcMethods) ExecuteWriteData ¶
func (m *JrpcMethods) ExecuteWriteData(ctx context.Context, params json.RawMessage) interface{}
ExecuteWriteData submits a WriteData transaction.
func (*JrpcMethods) ExecuteWriteDataTo ¶
func (m *JrpcMethods) ExecuteWriteDataTo(ctx context.Context, params json.RawMessage) interface{}
ExecuteWriteDataTo submits a WriteDataTo transaction.
func (*JrpcMethods) Faucet ¶
func (m *JrpcMethods) Faucet(ctx context.Context, params json.RawMessage) interface{}
func (*JrpcMethods) Metrics ¶
func (m *JrpcMethods) Metrics(_ context.Context, params json.RawMessage) interface{}
Metrics returns Metrics for explorer (tps, etc.)
func (*JrpcMethods) NewMux ¶
func (m *JrpcMethods) NewMux() *http.ServeMux
func (*JrpcMethods) Querier_TESTONLY ¶
func (m *JrpcMethods) Querier_TESTONLY() Querier
func (*JrpcMethods) Query ¶
func (m *JrpcMethods) Query(_ context.Context, params json.RawMessage) interface{}
Query queries an account or account chain by URL.
func (*JrpcMethods) QueryChain ¶
func (m *JrpcMethods) QueryChain(_ context.Context, params json.RawMessage) interface{}
QueryChain queries an account by ID.
func (*JrpcMethods) QueryData ¶
func (m *JrpcMethods) QueryData(_ context.Context, params json.RawMessage) interface{}
QueryData queries an entry on an account's data chain.
func (*JrpcMethods) QueryDataSet ¶
func (m *JrpcMethods) QueryDataSet(_ context.Context, params json.RawMessage) interface{}
QueryDataSet queries a range of entries on an account's data chain.
func (*JrpcMethods) QueryDirectory ¶
func (m *JrpcMethods) QueryDirectory(_ context.Context, params json.RawMessage) interface{}
QueryDirectory queries the directory entries of an account.
func (*JrpcMethods) QueryKeyPageIndex ¶
func (m *JrpcMethods) QueryKeyPageIndex(_ context.Context, params json.RawMessage) interface{}
QueryKeyPageIndex queries the location of a key within an account's key book(s).
func (*JrpcMethods) QueryMinorBlocks ¶ added in v0.6.0
func (m *JrpcMethods) QueryMinorBlocks(_ context.Context, params json.RawMessage) interface{}
QueryMinorBlocks queries an account's minor blocks.
WARNING: EXPERIMENTAL!
func (*JrpcMethods) QuerySynth ¶ added in v1.0.0
func (m *JrpcMethods) QuerySynth(_ context.Context, params json.RawMessage) interface{}
WARNING: EXPERIMENTAL!
func (*JrpcMethods) QueryTx ¶
func (m *JrpcMethods) QueryTx(_ context.Context, params json.RawMessage) interface{}
QueryTx queries a transaction by ID.
func (*JrpcMethods) QueryTxHistory ¶
func (m *JrpcMethods) QueryTxHistory(_ context.Context, params json.RawMessage) interface{}
QueryTxHistory queries an account's transaction history.
func (*JrpcMethods) Status ¶
func (m *JrpcMethods) Status(_ context.Context, params json.RawMessage) interface{}
func (*JrpcMethods) Version ¶
func (m *JrpcMethods) Version(_ context.Context, params json.RawMessage) interface{}
type KeyPage ¶
type KeyPage struct { Version uint64 `json:"version,omitempty" form:"version" query:"version"` // contains filtered or unexported fields }
func (*KeyPage) MarshalJSON ¶ added in v0.5.1
func (*KeyPage) UnmarshalJSON ¶ added in v0.5.1
type KeyPageIndexQuery ¶
type KeyPageIndexQuery struct { UrlQuery Key []byte `json:"key,omitempty" form:"key" query:"key" validate:"required"` // contains filtered or unexported fields }
func (*KeyPageIndexQuery) MarshalJSON ¶
func (v *KeyPageIndexQuery) MarshalJSON() ([]byte, error)
func (*KeyPageIndexQuery) UnmarshalJSON ¶
func (v *KeyPageIndexQuery) UnmarshalJSON(data []byte) error
type MerkleState ¶
type MerkleState struct { Height uint64 `json:"height,omitempty" form:"height" query:"height" validate:"required"` Roots [][]byte `json:"roots,omitempty" form:"roots" query:"roots" validate:"required"` // contains filtered or unexported fields }
func (*MerkleState) MarshalJSON ¶
func (v *MerkleState) MarshalJSON() ([]byte, error)
func (*MerkleState) UnmarshalJSON ¶
func (v *MerkleState) UnmarshalJSON(data []byte) error
type MetricsQuery ¶
type MetricsQuery struct { Metric string `json:"metric,omitempty" form:"metric" query:"metric" validate:"required"` Duration time.Duration `json:"duration,omitempty" form:"duration" query:"duration" validate:"required"` // contains filtered or unexported fields }
func (*MetricsQuery) MarshalJSON ¶
func (v *MetricsQuery) MarshalJSON() ([]byte, error)
func (*MetricsQuery) UnmarshalJSON ¶
func (v *MetricsQuery) UnmarshalJSON(data []byte) error
type MetricsResponse ¶
type MetricsResponse struct { Value interface{} `json:"value,omitempty" form:"value" query:"value" validate:"required"` // contains filtered or unexported fields }
func (*MetricsResponse) MarshalJSON ¶
func (v *MetricsResponse) MarshalJSON() ([]byte, error)
func (*MetricsResponse) UnmarshalJSON ¶
func (v *MetricsResponse) UnmarshalJSON(data []byte) error
type MinorBlocksQuery ¶ added in v0.6.0
type MinorBlocksQuery struct { UrlQuery QueryPagination TxFetchMode query.TxFetchMode `json:"txFetchMode,omitempty" form:"txFetchMode" query:"txFetchMode"` BlockFilterMode query.BlockFilterMode `json:"blockFilterMode,omitempty" form:"blockFilterMode" query:"blockFilterMode"` // contains filtered or unexported fields }
func (*MinorBlocksQuery) MarshalJSON ¶ added in v0.6.0
func (v *MinorBlocksQuery) MarshalJSON() ([]byte, error)
func (*MinorBlocksQuery) UnmarshalJSON ¶ added in v0.6.0
func (v *MinorBlocksQuery) UnmarshalJSON(data []byte) error
type MinorQueryResponse ¶ added in v0.6.0
type MinorQueryResponse struct { // BlockIndex is the index of the block. Only include when indexing the root anchor chain. BlockIndex uint64 `json:"blockIndex,omitempty" form:"blockIndex" query:"blockIndex" validate:"required"` // BlockTime is the start time of the block.. BlockTime *time.Time `json:"blockTime,omitempty" form:"blockTime" query:"blockTime" validate:"required"` // TxCount shows how many transactions this block contains. TxCount uint64 `json:"txCount,omitempty" form:"txCount" query:"txCount" validate:"required"` TxIds [][]byte `json:"txIds,omitempty" form:"txIds" query:"txIds" validate:"required"` Transactions []*TransactionQueryResponse `json:"transactions,omitempty" form:"transactions" query:"transactions" validate:"required"` // contains filtered or unexported fields }
func (*MinorQueryResponse) MarshalJSON ¶ added in v0.6.0
func (v *MinorQueryResponse) MarshalJSON() ([]byte, error)
func (*MinorQueryResponse) UnmarshalJSON ¶ added in v0.6.0
func (v *MinorQueryResponse) UnmarshalJSON(data []byte) error
type MultiResponse ¶
type MultiResponse struct { Type string `json:"type,omitempty" form:"type" query:"type" validate:"required"` Items []interface{} `json:"items,omitempty" form:"items" query:"items" validate:"required"` Start uint64 `json:"start" form:"start" query:"start" validate:"required"` Count uint64 `json:"count" form:"count" query:"count" validate:"required"` Total uint64 `json:"total" form:"total" query:"total" validate:"required"` OtherItems []interface{} `json:"otherItems,omitempty" form:"otherItems" query:"otherItems" validate:"required"` // contains filtered or unexported fields }
func (*MultiResponse) MarshalJSON ¶
func (v *MultiResponse) MarshalJSON() ([]byte, error)
func (*MultiResponse) UnmarshalJSON ¶
func (v *MultiResponse) UnmarshalJSON(data []byte) error
type Querier ¶
type Querier interface { QueryUrl(url *url.URL, opts QueryOptions) (interface{}, error) QueryDirectory(url *url.URL, pagination QueryPagination, opts QueryOptions) (*MultiResponse, error) QueryChain(id []byte) (*ChainQueryResponse, error) QueryTx(id []byte, wait time.Duration, ignorePending bool, opts QueryOptions) (*TransactionQueryResponse, error) QueryTxHistory(url *url.URL, pagination QueryPagination) (*MultiResponse, error) QueryData(url *url.URL, entryHash [32]byte) (*ChainQueryResponse, error) QueryDataSet(url *url.URL, pagination QueryPagination, opts QueryOptions) (*MultiResponse, error) QueryKeyPageIndex(url *url.URL, key []byte) (*ChainQueryResponse, error) QuerySynth(source, destination *url.URL, number uint64) (*TransactionQueryResponse, error) }
func NewQueryDirect ¶
func NewQueryDispatch ¶
type QueryOptions ¶
type QueryOptions struct { Expand bool `json:"expand,omitempty" form:"expand" query:"expand"` Height uint64 `json:"height,omitempty" form:"height" query:"height"` Prove bool `json:"prove,omitempty" form:"prove" query:"prove"` // contains filtered or unexported fields }
func (*QueryOptions) MarshalJSON ¶
func (v *QueryOptions) MarshalJSON() ([]byte, error)
func (*QueryOptions) UnmarshalJSON ¶
func (v *QueryOptions) UnmarshalJSON(data []byte) error
type QueryPagination ¶
type SignatureBook ¶ added in v0.5.1
type SignatureBook struct { Authority *url.URL `json:"authority,omitempty" form:"authority" query:"authority" validate:"required"` Pages []*SignaturePage `json:"pages,omitempty" form:"pages" query:"pages" validate:"required"` // contains filtered or unexported fields }
func (*SignatureBook) MarshalJSON ¶ added in v0.6.0
func (v *SignatureBook) MarshalJSON() ([]byte, error)
func (*SignatureBook) UnmarshalJSON ¶ added in v0.6.0
func (v *SignatureBook) UnmarshalJSON(data []byte) error
type SignaturePage ¶ added in v0.5.1
type SignaturePage struct { Signer SignerMetadata `json:"signer,omitempty" form:"signer" query:"signer" validate:"required"` Signatures []protocol.Signature `json:"signatures,omitempty" form:"signatures" query:"signatures" validate:"required"` // contains filtered or unexported fields }
func (*SignaturePage) MarshalJSON ¶ added in v0.5.1
func (v *SignaturePage) MarshalJSON() ([]byte, error)
func (*SignaturePage) UnmarshalJSON ¶ added in v0.5.1
func (v *SignaturePage) UnmarshalJSON(data []byte) error
type Signer ¶
type Signer struct { PublicKey []byte `json:"publicKey,omitempty" form:"publicKey" query:"publicKey" validate:"required"` Timestamp uint64 `json:"timestamp,omitempty" form:"timestamp" query:"timestamp" validate:"required"` Url *url.URL `json:"url,omitempty" form:"url" query:"url" validate:"required"` Version uint64 `json:"version,omitempty" form:"version" query:"version"` SignatureType protocol.SignatureType `json:"signatureType,omitempty" form:"signatureType" query:"signatureType"` // UseSimpleHash tells the API to use the signature's simple metadata hash as the initiator hash instead of its Merkle hash. UseSimpleHash bool `json:"useSimpleHash,omitempty" form:"useSimpleHash" query:"useSimpleHash"` // contains filtered or unexported fields }
func (*Signer) MarshalJSON ¶
func (*Signer) UnmarshalJSON ¶
type SignerMetadata ¶ added in v0.5.1
type SignerMetadata struct { Type protocol.AccountType `json:"type,omitempty" form:"type" query:"type" validate:"required"` Url *url.URL `json:"url,omitempty" form:"url" query:"url" validate:"required"` AcceptThreshold uint64 `json:"acceptThreshold,omitempty" form:"acceptThreshold" query:"acceptThreshold" validate:"required"` // contains filtered or unexported fields }
type StatusResponse ¶
type StatusResponse struct { Ok bool `json:"ok,omitempty" form:"ok" query:"ok" validate:"required"` // contains filtered or unexported fields }
type SyntheticTransactionRequest ¶ added in v1.0.0
type SyntheticTransactionRequest struct { Source *url.URL `json:"source,omitempty" form:"source" query:"source" validate:"required"` Destination *url.URL `json:"destination,omitempty" form:"destination" query:"destination" validate:"required"` SequenceNumber uint64 `json:"sequenceNumber,omitempty" form:"sequenceNumber" query:"sequenceNumber" validate:"required"` // contains filtered or unexported fields }
type TokenDeposit ¶
type TokenDeposit struct { Url *url.URL `json:"url,omitempty" form:"url" query:"url" validate:"required"` Amount big.Int `json:"amount,omitempty" form:"amount" query:"amount" validate:"required"` Txid []byte `json:"txid,omitempty" form:"txid" query:"txid" validate:"required"` // contains filtered or unexported fields }
func (*TokenDeposit) MarshalJSON ¶
func (v *TokenDeposit) MarshalJSON() ([]byte, error)
func (*TokenDeposit) UnmarshalJSON ¶
func (v *TokenDeposit) UnmarshalJSON(data []byte) error
type TokenSend ¶
type TokenSend struct { From *url.URL `json:"from,omitempty" form:"from" query:"from" validate:"required"` To []TokenDeposit `json:"to,omitempty" form:"to" query:"to" validate:"required"` // contains filtered or unexported fields }
func (*TokenSend) MarshalJSON ¶ added in v0.6.0
func (*TokenSend) UnmarshalJSON ¶ added in v0.6.0
type TransactionQueryResponse ¶
type TransactionQueryResponse struct { Type string `json:"type,omitempty" form:"type" query:"type" validate:"required"` MainChain *MerkleState `json:"mainChain,omitempty" form:"mainChain" query:"mainChain" validate:"required"` Data interface{} `json:"data,omitempty" form:"data" query:"data" validate:"required"` Origin *url.URL `json:"origin,omitempty" form:"origin" query:"origin" validate:"required"` TransactionHash []byte `json:"transactionHash,omitempty" form:"transactionHash" query:"transactionHash" validate:"required"` Transaction *protocol.Transaction `json:"transaction,omitempty" form:"transaction" query:"transaction" validate:"required"` Signatures []protocol.Signature `json:"signatures,omitempty" form:"signatures" query:"signatures" validate:"required"` Status *protocol.TransactionStatus `json:"status,omitempty" form:"status" query:"status" validate:"required"` SyntheticTxids [][32]byte `json:"syntheticTxids,omitempty" form:"syntheticTxids" query:"syntheticTxids" validate:"required"` Receipts []*query.TxReceipt `json:"receipts,omitempty" form:"receipts" query:"receipts" validate:"required"` SignatureBooks []*SignatureBook `json:"signatureBooks,omitempty" form:"signatureBooks" query:"signatureBooks" validate:"required"` // contains filtered or unexported fields }
func (*TransactionQueryResponse) MarshalJSON ¶
func (v *TransactionQueryResponse) MarshalJSON() ([]byte, error)
func (*TransactionQueryResponse) UnmarshalJSON ¶
func (v *TransactionQueryResponse) UnmarshalJSON(data []byte) error
type TxHistoryQuery ¶
type TxHistoryQuery struct { UrlQuery QueryPagination // contains filtered or unexported fields }
func (*TxHistoryQuery) MarshalJSON ¶
func (v *TxHistoryQuery) MarshalJSON() ([]byte, error)
func (*TxHistoryQuery) UnmarshalJSON ¶
func (v *TxHistoryQuery) UnmarshalJSON(data []byte) error
type TxRequest ¶
type TxRequest struct { CheckOnly bool `json:"checkOnly,omitempty" form:"checkOnly" query:"checkOnly"` IsEnvelope bool `json:"isEnvelope,omitempty" form:"isEnvelope" query:"isEnvelope"` Origin *url.URL `json:"origin,omitempty" form:"origin" query:"origin" validate:"required"` Signer Signer `json:"signer,omitempty" form:"signer" query:"signer" validate:"required"` Signature []byte `json:"signature,omitempty" form:"signature" query:"signature" validate:"required"` // KeyPage is deprecated. KeyPage KeyPage `json:"keyPage,omitempty" form:"keyPage" query:"keyPage" validate:"required"` TxHash []byte `json:"txHash,omitempty" form:"txHash" query:"txHash"` Payload interface{} `json:"payload,omitempty" form:"payload" query:"payload" validate:"required"` Memo string `json:"memo,omitempty" form:"memo" query:"memo"` Metadata []byte `json:"metadata,omitempty" form:"metadata" query:"metadata"` // contains filtered or unexported fields }
func (*TxRequest) MarshalJSON ¶
func (*TxRequest) UnmarshalJSON ¶
type TxResponse ¶
type TxResponse struct { TransactionHash []byte `json:"transactionHash,omitempty" form:"transactionHash" query:"transactionHash" validate:"required"` SignatureHashes [][]byte `json:"signatureHashes,omitempty" form:"signatureHashes" query:"signatureHashes" validate:"required"` SimpleHash []byte `json:"simpleHash,omitempty" form:"simpleHash" query:"simpleHash" validate:"required"` Code uint64 `json:"code,omitempty" form:"code" query:"code" validate:"required"` Message string `json:"message,omitempty" form:"message" query:"message" validate:"required"` Delivered bool `json:"delivered,omitempty" form:"delivered" query:"delivered" validate:"required"` Result interface{} `json:"result,omitempty" form:"result" query:"result" validate:"required"` // contains filtered or unexported fields }
func (*TxResponse) MarshalJSON ¶
func (v *TxResponse) MarshalJSON() ([]byte, error)
func (*TxResponse) UnmarshalJSON ¶
func (v *TxResponse) UnmarshalJSON(data []byte) error
type TxnQuery ¶
type TxnQuery struct { QueryOptions Txid []byte `json:"txid,omitempty" form:"txid" query:"txid" validate:"required"` Wait time.Duration `json:"wait,omitempty" form:"wait" query:"wait"` // IgnorePending tells QueryTx to ignore pending transactions. IgnorePending bool `json:"ignorePending,omitempty" form:"ignorePending" query:"ignorePending"` // contains filtered or unexported fields }
func (*TxnQuery) MarshalJSON ¶
func (*TxnQuery) UnmarshalJSON ¶
type VersionResponse ¶
type VersionResponse struct { Version string `json:"version,omitempty" form:"version" query:"version" validate:"required"` Commit string `json:"commit,omitempty" form:"commit" query:"commit" validate:"required"` VersionIsKnown bool `json:"versionIsKnown,omitempty" form:"versionIsKnown" query:"versionIsKnown" validate:"required"` IsTestNet bool `json:"isTestNet,omitempty" form:"isTestNet" query:"isTestNet" validate:"required"` // contains filtered or unexported fields }