Documentation
¶
Index ¶
- Constants
- Variables
- type Client
- type Params
- type ParamsGetAllNFTokens
- type ParamsGetBalance
- type ParamsGetBalances
- type ParamsGetNFBalance
- type ParamsGetNFToken
- type ParamsGetTransaction
- type ParamsGetTransactions
- type ParamsPagination
- type ParamsSendTransaction
- type ParamsToken
- type ResultGetBalances
- type ResultGetDaemonProperties
- type ResultGetIssuance
- type ResultGetNFToken
- type ResultGetStats
- type ResultGetSyncStatus
- type ResultGetTransaction
Constants ¶
const APIVersion = "1"
const (
FatdDefault = "http://localhost:8078"
)
Defaults for the factomd and factom-walletd endpoints.
Variables ¶
var ( ErrorTokenNotFound = jsonrpc2.NewError(-32800, "Token Not Found", "token may be invalid, or not yet issued or tracked") ErrorTransactionNotFound = jsonrpc2.NewError(-32803, "Transaction Not Found", "no matching tx-id was found") ErrorInvalidTransaction = jsonrpc2.NewError(-32804, "Invalid Transaction", nil) ErrorTokenSyncing = jsonrpc2.NewError(-32805, "Token Syncing", "token is in the process of syncing") ErrorNoEC = jsonrpc2.NewError(-32806, "No Entry Credits", "not configured with entry credits") ErrorPendingDisabled = jsonrpc2.NewError(-32807, "Pending Transactions Disabled", "fatd is not tracking pending transactions") )
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client makes RPC requests to fatd's APIs. Client embeds a jsonrpc2.Client, and thus also the http.Client. Use jsonrpc2.Client's BasicAuth settings to set up BasicAuth and http.Client's transport settings to configure TLS.
type ParamsGetAllNFTokens ¶
type ParamsGetAllNFTokens struct {
ParamsToken
ParamsPagination
}
func (*ParamsGetAllNFTokens) IsValid ¶
func (p *ParamsGetAllNFTokens) IsValid() error
type ParamsGetBalance ¶
type ParamsGetBalance struct {
ParamsToken
Address *factom.FAAddress `json:"address,omitempty"`
}
func (ParamsGetBalance) IsValid ¶
func (p ParamsGetBalance) IsValid() error
type ParamsGetBalances ¶
type ParamsGetBalances struct {
Address *factom.FAAddress `json:"address,omitempty"`
IncludePending bool `json:"includepending,omitempty"`
}
func (ParamsGetBalances) GetIncludePending ¶
func (p ParamsGetBalances) GetIncludePending() bool
func (ParamsGetBalances) IsValid ¶
func (p ParamsGetBalances) IsValid() error
func (ParamsGetBalances) ValidChainID ¶
func (p ParamsGetBalances) ValidChainID() *factom.Bytes32
type ParamsGetNFBalance ¶
type ParamsGetNFBalance struct {
ParamsToken
ParamsPagination
Address *factom.FAAddress `json:"address,omitempty"`
}
func (*ParamsGetNFBalance) IsValid ¶
func (p *ParamsGetNFBalance) IsValid() error
type ParamsGetNFToken ¶
type ParamsGetNFToken struct {
ParamsToken
NFTokenID *fat1.NFTokenID `json:"nftokenid"`
}
func (ParamsGetNFToken) IsValid ¶
func (p ParamsGetNFToken) IsValid() error
type ParamsGetTransaction ¶
type ParamsGetTransaction struct {
ParamsToken
Hash *factom.Bytes32 `json:"entryhash"`
}
ParamsGetTransaction is used to query for a single particular transaction with the given Entry Hash.
func (ParamsGetTransaction) IsValid ¶
func (p ParamsGetTransaction) IsValid() error
type ParamsGetTransactions ¶
type ParamsGetTransactions struct {
ParamsToken
ParamsPagination
// Transaction filters
NFTokenID *fat1.NFTokenID `json:"nftokenid,omitempty"`
Addresses []factom.FAAddress `json:"addresses,omitempty"`
StartHash *factom.Bytes32 `json:"entryhash,omitempty"`
ToFrom string `json:"tofrom,omitempty"`
}
func (*ParamsGetTransactions) IsValid ¶
func (p *ParamsGetTransactions) IsValid() error
type ParamsPagination ¶
type ParamsPagination struct {
Page *uint `json:"page,omitempty"`
Limit uint `json:"limit,omitempty"`
Order string `json:"order,omitempty"`
}
func (*ParamsPagination) IsValid ¶
func (p *ParamsPagination) IsValid() error
type ParamsSendTransaction ¶
type ParamsSendTransaction struct {
ParamsToken
ExtIDs []factom.Bytes `json:"extids,omitempty"`
Content factom.Bytes `json:"content,omitempty"`
Raw factom.Bytes `json:"raw,omitempty"`
DryRun bool `json:"dryrun,omitempty"`
// contains filtered or unexported fields
}
func (ParamsSendTransaction) Entry ¶
func (p ParamsSendTransaction) Entry() factom.Entry
func (*ParamsSendTransaction) IsValid ¶
func (p *ParamsSendTransaction) IsValid() error
type ParamsToken ¶
type ParamsToken struct {
ChainID *factom.Bytes32 `json:"chainid,omitempty"`
TokenID string `json:"tokenid,omitempty"`
IssuerChainID *factom.Bytes32 `json:"issuerid,omitempty"`
IncludePending bool `json:"includepending,omitempty"`
}
ParamsToken scopes a request down to a single FAT token using either the ChainID or both the TokenID and the IssuerChainID.
func (ParamsToken) GetIncludePending ¶
func (p ParamsToken) GetIncludePending() bool
func (ParamsToken) IsValid ¶
func (p ParamsToken) IsValid() error
func (ParamsToken) ValidChainID ¶
func (p ParamsToken) ValidChainID() *factom.Bytes32
type ResultGetBalances ¶
func (ResultGetBalances) MarshalJSON ¶
func (r ResultGetBalances) MarshalJSON() ([]byte, error)
func (*ResultGetBalances) UnmarshalJSON ¶
func (r *ResultGetBalances) UnmarshalJSON(data []byte) error
type ResultGetIssuance ¶
type ResultGetNFToken ¶
type ResultGetStats ¶
type ResultGetStats struct {
ParamsToken
Issuance *fat.Issuance
IssuanceHash *factom.Bytes32
CirculatingSupply uint64 `json:"circulating"`
Burned uint64 `json:"burned"`
Transactions int64 `json:"transactions"`
IssuanceTimestamp int64 `json:"issuancets"`
LastTransactionTimestamp int64 `json:"lasttxts,omitempty"`
NonZeroBalances int64 `json:"nonzerobalances, omitempty"`
}