api

package
v1.1.2-rc1 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2019 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewExplorerHashHandler added in v1.2.0

func NewExplorerHashHandler(explorer modules.Explorer, cs modules.ConsensusSet, tpool modules.TransactionPool, txdb *persist.TransactionDB) httprouter.Handle

NewExplorerHashHandler creates a handler to handle GET requests to /explorer/hash/:hash.

func NewTransactionDBGetActiveMintConditionHandler

func NewTransactionDBGetActiveMintConditionHandler(txdb *persist.TransactionDB) httprouter.Handle

NewTransactionDBGetActiveMintConditionHandler creates a handler to handle the API calls to /transactiondb/mintcondition.

func NewTransactionDBGetBotTransactionsHandler

func NewTransactionDBGetBotTransactionsHandler(txdb *persist.TransactionDB) httprouter.Handle

NewTransactionDBGetBotTransactionsHandler creates a handler to handle the API calls to /transactiondb/3bot/:id/transactions.

func NewTransactionDBGetERC20RelatedAddressHandler

func NewTransactionDBGetERC20RelatedAddressHandler(txdb *persist.TransactionDB) httprouter.Handle

NewTransactionDBGetERC20RelatedAddressHandler creates a handler to handle the API calls to /transactiondb/erc20/addresses/:address.

func NewTransactionDBGetERC20TransactionID

func NewTransactionDBGetERC20TransactionID(txdb *persist.TransactionDB) httprouter.Handle

NewTransactionDBGetERC20TransactionID creates a handler to handle the API calls to /transactiondb/erc20/transactions/:txid.

func NewTransactionDBGetMintConditionAtHandler

func NewTransactionDBGetMintConditionAtHandler(txdb *persist.TransactionDB) httprouter.Handle

NewTransactionDBGetMintConditionAtHandler creates a handler to handle the API calls to /transactiondb/mintcondition/:height.

func NewTransactionDBGetRecordForIDHandler

func NewTransactionDBGetRecordForIDHandler(txdb *persist.TransactionDB) httprouter.Handle

NewTransactionDBGetRecordForIDHandler creates a handler to handle the API calls to /transactiondb/3bot/:id.

func NewTransactionDBGetRecordForNameHandler

func NewTransactionDBGetRecordForNameHandler(txdb *persist.TransactionDB) httprouter.Handle

NewTransactionDBGetRecordForNameHandler creates a handler to handle the API calls to /transactiondb/whois/3bot/:name.

func NewWalletFundCoinsHandler

func NewWalletFundCoinsHandler(wallet modules.Wallet) httprouter.Handle

NewWalletFundCoinsHandler creates a handler to handle the API calls to /wallet/fund/coins?amount=.

func NewWalletGetPublicKeyHandler

func NewWalletGetPublicKeyHandler(wallet modules.Wallet) httprouter.Handle

NewWalletGetPublicKeyHandler creates a handler to handle API calls to /wallet/publickey.

func RegisterExplorerHTTPHandlers added in v1.2.0

func RegisterExplorerHTTPHandlers(router rapi.Router, cs modules.ConsensusSet, explorer modules.Explorer, tpool modules.TransactionPool, txdb *persist.TransactionDB)

RegisterExplorerHTTPHandlers registers the (tfchain-specific) handlers for all Explorer HTTP endpoints.

func RegisterTransactionDBHTTPHandlers

func RegisterTransactionDBHTTPHandlers(router api.Router, txdb *persist.TransactionDB)

RegisterTransactionDBHTTPHandlers registers the handlers for all TransactionDB HTTP endpoints.

func RegisterWalletHTTPHandlers

func RegisterWalletHTTPHandlers(router api.Router, wallet modules.Wallet, requiredPassword string)

RegisterWalletHTTPHandlers registers the (tfchain-specific) handlers for all Wallet HTTP endpoints.

Types

type ExplorerHashERC20Info added in v1.2.0

type ExplorerHashERC20Info struct {
	TFTAddress    rtypes.UnlockHash  `json:"tftaddress,omitempty"`
	ERC20Address  types.ERC20Address `json:"erc20address,omitempty"`
	Confirmations uint64             `json:"confirmations"`
}

ExplorerHashERC20Info contains all ERC20 related info as part of an UnlockHash-typed ExplorerHashGET request.

type ExplorerHashGET added in v1.2.0

type ExplorerHashGET struct {
	rapi.ExplorerHashGET
	ERC20Info *ExplorerHashERC20Info `json:"erc20info,omitempty"`
}

ExplorerHashGET wraps around the default rivine ExplorerHashGET type, as to add the optional ERC20 address to it, for UnlockHash requests, which have an ERC20 address attached to it.

type TransactionDBGetBotRecord

type TransactionDBGetBotRecord struct {
	Record tftypes.BotRecord `json:"record"`
}

TransactionDBGetBotRecord contains a requested bot record.

type TransactionDBGetBotTransactions

type TransactionDBGetBotTransactions struct {
	Identifiers []types.TransactionID `json:"ids"`
}

TransactionDBGetBotTransactions contains the requested identifiers of transactions for a specific bot.

type TransactionDBGetERC20RelatedAddress

type TransactionDBGetERC20RelatedAddress struct {
	TFTAddress   types.UnlockHash     `json:"tftaddress"`
	ERC20Address tftypes.ERC20Address `json:"erc20address"`
}

TransactionDBGetERC20RelatedAddress contains the requested ERC20-related addresses.

type TransactionDBGetERC20TransactionID

type TransactionDBGetERC20TransactionID struct {
	ERC20TransaxtionID   tftypes.ERC20Hash   `json:"er20txid"`
	TfchainTransactionID types.TransactionID `json:"tfttxid"`
}

TransactionDBGetERC20TransactionID contains the requested info found for the given ERC20 TransactionID.

type TransactionDBGetMintCondition

type TransactionDBGetMintCondition struct {
	MintCondition types.UnlockConditionProxy `json:"mintcondition"`
}

TransactionDBGetMintCondition contains a requested mint condition, either the current active one active for the given blockheight or lower.

type WalletFundCoins

type WalletFundCoins struct {
	CoinInputs       []types.CoinInput `json:"coininputs"`
	RefundCoinOutput *types.CoinOutput `json:"refund"`
}

WalletFundCoins is the resulting object that is returned, to be used by a client to fund a transaction of any type.

type WalletPublicKeyGET

type WalletPublicKeyGET struct {
	PublicKey types.PublicKey `json:"publickey"`
}

WalletPublicKeyGET contains a public key returned by a GET call to /wallet/publickey.

Jump to

Keyboard shortcuts

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