accumulate

package
v0.0.0-...-c4aa525 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ADI

type ADI struct {
	Type        string `json:"type" validate:"required,eq=identity"`
	Authorities []*URL `json:"authorities" validate:"required"`
	URL         string `json:"url" validate:"required"`
}

type AccumulateClient

type AccumulateClient struct {
	API      string
	Client   jsonrpc.RPCClient
	Validate *validator.Validate
}

func NewAccumulateClient

func NewAccumulateClient(apiURL string, timeout time.Duration) *AccumulateClient

NewAccumulateClient constructs the Accumulate client

func (*AccumulateClient) QueryADI

func (c *AccumulateClient) QueryADI(adi *Params) (*QueryADIResponse, error)

QueryADI gets ADI info

func (*AccumulateClient) QueryDataEntry

func (c *AccumulateClient) QueryDataEntry(dataAccount *Params) (*QueryDataResponse, error)

QueryLatestDataEntry gets latest data entry from data account

func (*AccumulateClient) QueryDataSet

func (c *AccumulateClient) QueryDataSet(dataAccount *Params) (*QueryDataSetResponse, error)

QueryDataSet gets data entries from data account

func (*AccumulateClient) QueryKeyPage

func (c *AccumulateClient) QueryKeyPage(page *Params) (*QueryKeyPageResponse, error)

QueryKeyPage gets Key page info

func (*AccumulateClient) QueryLatestDataEntry

func (c *AccumulateClient) QueryLatestDataEntry(dataAccount *Params) (*QueryDataResponse, error)

QueryLatestDataEntry gets latest data entry from data account

func (*AccumulateClient) QueryToken

func (c *AccumulateClient) QueryToken(token *Params) (*QueryTokenResponse, error)

QueryToken gets Token info

func (*AccumulateClient) QueryTokenAccount

func (c *AccumulateClient) QueryTokenAccount(account *Params) (*QueryTokenAccountResponse, error)

QueryTokenAccount gets Token Account info

func (*AccumulateClient) QueryTokenTx

func (c *AccumulateClient) QueryTokenTx(tx *Params) (*QueryTokenTxResponse, error)

QueryTokenTx gets token tx by url

func (*AccumulateClient) QueryTxHistory

func (c *AccumulateClient) QueryTxHistory(account *Params) (*QueryTxHistoryResponse, error)

QueryTxHistory gets tx history of account

type DataEntry

type DataEntry struct {
	EntryHash string `json:"entryHash" validate:"required"`
	Entry     struct {
		Type string   `json:"type" validate:"required"`
		Data []string `json:"data" validate:"gt=0"`
	}
}

type Key

type Key struct {
	PublicKeyHash string `json:"publicKeyHash"`
}

type KeyPage

type KeyPage struct {
	Type            string `json:"type" validate:"required,eq=keyPage"`
	KeyBook         string `json:"keyBook" validate:"required"`
	URL             string `json:"url" validate:"required"`
	CreditBalance   int64  `json:"creditBalance"`
	AcceptThreshold int64  `json:"acceptThreshold"`
	Threshold       int64  `json:"threshold"`
	Version         uint64 `json:"version"`
	Keys            []*Key `json:"keys"`
}

type Params

type Params struct {
	URL      string             `json:"url"`
	Count    int64              `json:"count"`
	Start    int64              `json:"start"`
	Expand   bool               `json:"expand"`
	Envelope *protocol.Envelope `json:"envelope"`
}

type QueryADIResponse

type QueryADIResponse struct {
	Data *ADI `json:"data"`
}

type QueryDataResponse

type QueryDataResponse struct {
	Data *DataEntry `json:"data"`
}

type QueryDataSetResponse

type QueryDataSetResponse struct {
	Items []*DataEntry `json:"items"`
}

type QueryKeyPageResponse

type QueryKeyPageResponse struct {
	Data *KeyPage `json:"data"`
}

type QueryPendingChainResponse

type QueryPendingChainResponse struct {
	Items []string `json:"items"`
}

type QueryTokenAccountResponse

type QueryTokenAccountResponse struct {
	Data *TokenAccount `json:"data"`
}

type QueryTokenResponse

type QueryTokenResponse struct {
	Data *Token `json:"data"`
}

type QueryTokenTxResponse

type QueryTokenTxResponse struct {
	Type        string   `json:"type" validate:"required"`
	TxHash      string   `json:"transactionHash"`
	TxID        string   `json:"txid"`
	Data        *TokenTx `json:"data"`
	Transaction struct {
		Header struct {
			Memo string `json:"memo"`
		}
	}
}

type QueryTxHistoryResponse

type QueryTxHistoryResponse struct {
	Items []*QueryTokenTxResponse `json:"items"`
}

type Token

type Token struct {
	Type        string `json:"type" validate:"required,eq=tokenIssuer"`
	Authorities []*URL `json:"authorities" validate:"required"`
	URL         string `json:"url" validate:"required"`
	Symbol      string `json:"symbol" validate:"required"`
	Precision   int64  `json:"precision"`
	Issued      string `json:"issued"`
	SupplyLimit string `json:"supplyLimit"`
}

type TokenAccount

type TokenAccount struct {
	Type        string `json:"type" validate:"required,oneof=tokenAccount liteTokenAccount"`
	Authorities []*URL `json:"authorities"`
	URL         string `json:"url" validate:"required"`
	TokenURL    string `json:"tokenUrl" validate:"required"`
	Balance     string `json:"balance" validate:"required"`
}

type TokenTx

type TokenTx struct {
	From     string       `json:"from"`
	To       []*TokenTxTo `json:"to"`
	Cause    string       `json:"cause"`
	Source   string       `json:"source"`
	Token    string       `json:"token"`
	Amount   string       `json:"amount"`
	IsRefund bool         `json:"isRefund"`
}

type TokenTxTo

type TokenTxTo struct {
	URL    string `json:"url" validate:"required"`
	Amount string `json:"amount" validate:"required"`
}

type URL

type URL struct {
	URL string `json:"url" validate:"required"`
}

Jump to

Keyboard shortcuts

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