rest

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	QueryParamKeyRole = "key_role"
	QueryParamKeyID   = "key_id"
)

query parameters

View Source
const (
	TxLink                        = "link"
	TxConfirmTx                   = "confirm"
	TxCreatePendingTransfersTx    = "create-pending-transfers-tx"
	TxCreateMasterConsolidationTx = "create-master-consolidation-tx"
	TxCreateRescueTx              = "create-rescue-tx"
	TxSignTx                      = "sign-tx"
	TxSubmitExternalSignature     = "submit-external-signature"

	QueryDepositAddresses     = "deposit-addresses"
	QueryDepositStatus        = "deposit-status"
	QueryConsolidationAddress = "consolidation-address"
	QueryMinOutputAmount      = "min-output-amount"
	QueryNextKeyID            = "next-key-id"
	QueryLatestTx             = "latest-tx"
	QuerySignedTx             = "signed-tx"
)

rest routes

Variables

This section is empty.

Functions

func QueryHandlerConsolidationAddress

func QueryHandlerConsolidationAddress(cliCtx client.Context) http.HandlerFunc

QueryHandlerConsolidationAddress returns a handler to query the consolidation address

func QueryHandlerDepositAddresses added in v0.9.0

func QueryHandlerDepositAddresses(cliCtx client.Context) http.HandlerFunc

QueryHandlerDepositAddresses returns a handler to query the deposit address for a recipient address on another blockchain

func QueryHandlerDepositStatus

func QueryHandlerDepositStatus(cliCtx client.Context) http.HandlerFunc

QueryHandlerDepositStatus returns a handler to query the deposit status for a given outpoint

func QueryHandlerLatestTx

func QueryHandlerLatestTx(cliCtx client.Context) http.HandlerFunc

QueryHandlerLatestTx returns a handler to query the latest consolidation transaction of the given tx type

func QueryHandlerMinOutputAmount

func QueryHandlerMinOutputAmount(cliCtx client.Context) http.HandlerFunc

QueryHandlerMinOutputAmount returns a handler to query the minimum amount allowed for any transaction output in satoshi

func QueryHandlerNextKeyID

func QueryHandlerNextKeyID(cliCtx client.Context) http.HandlerFunc

QueryHandlerNextKeyID returns a query handler to get the next assigned key ID

func QueryHandlerSignedTx

func QueryHandlerSignedTx(cliCtx client.Context) http.HandlerFunc

QueryHandlerSignedTx returns a handler to query the signed consolidation transaction of the given transaction hash

func RegisterRoutes

func RegisterRoutes(cliCtx client.Context, r *mux.Router)

RegisterRoutes registers this module's REST routes with the given router

func TxHandlerConfirmTx

func TxHandlerConfirmTx(cliCtx client.Context) http.HandlerFunc

TxHandlerConfirmTx returns the handler to confirm a tx outpoint

func TxHandlerCreateMasterConsolidationTx

func TxHandlerCreateMasterConsolidationTx(cliCtx client.Context) http.HandlerFunc

TxHandlerCreateMasterConsolidationTx returns the handler to create a master key consolidation transaction

func TxHandlerCreatePendingTransfersTx

func TxHandlerCreatePendingTransfersTx(cliCtx client.Context) http.HandlerFunc

TxHandlerCreatePendingTransfersTx returns the handler to create a secondary key consolidation transaction handling all pending transfers

func TxHandlerCreateRescueTx

func TxHandlerCreateRescueTx(cliCtx client.Context) http.HandlerFunc

TxHandlerCreateRescueTx returns the handler to create a rescue transaction

func TxHandlerLink(cliCtx client.Context) http.HandlerFunc

TxHandlerLink returns the handler to link a Bitcoin address to a cross-chain address

func TxHandlerSignTx

func TxHandlerSignTx(cliCtx client.Context) http.HandlerFunc

TxHandlerSignTx returns the handler to sign a consolidation transaction

func TxHandlerSubmitExternalSignature

func TxHandlerSubmitExternalSignature(cliCtx client.Context) http.HandlerFunc

TxHandlerSubmitExternalSignature returns the handler to submit a signature from an external key

Types

type ReqConfirmOutPoint

type ReqConfirmOutPoint struct {
	BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"`
	TxInfo  string       `json:"tx_info" yaml:"tx_info"`
}

ReqConfirmOutPoint represents a request to confirm a Bitcoin outpoint

type ReqCreateMasterConsolidationTx

type ReqCreateMasterConsolidationTx struct {
	BaseReq            rest.BaseReq `json:"base_req" yaml:"base_req"`
	KeyID              string       `json:"key_id" yaml:"key_id"`
	SecondaryKeyAmount string       `json:"secondary_key_amount" yaml:"secondary_key_amount"`
}

ReqCreateMasterConsolidationTx represents a request to create a master key consolidation transaction

type ReqCreatePendingTransfersTx

type ReqCreatePendingTransfersTx struct {
	BaseReq         rest.BaseReq `json:"base_req" yaml:"base_req"`
	KeyID           string       `json:"key_id" yaml:"key_id"`
	MasterKeyAmount string       `json:"master_key_amount" yaml:"master_key_amount"`
}

ReqCreatePendingTransfersTx represents a request to create a secondary key consolidation transaction handling all pending transfers

type ReqCreateRescueTx

type ReqCreateRescueTx struct {
	BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"`
}

ReqCreateRescueTx represents a request to create a rescue transaction

type ReqLink struct {
	BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"`
	Address string       `json:"address" yaml:"address"`
}

ReqLink represents a request to link a cross-chain address to a Bitcoin address

type ReqSignTx

type ReqSignTx struct {
	BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"`
	TxType  string       `json:"tx_type" yaml:"tx_type"`
}

ReqSignTx represents a request to sign a consolidation transaction

type ReqSubmitExternalSignature

type ReqSubmitExternalSignature struct {
	BaseReq   rest.BaseReq `json:"base_req" yaml:"base_req"`
	KeyID     string       `json:"key_id" yaml:"key_id"`
	Signature string       `json:"signature" yaml:"signature"`
	SigHash   string       `json:"sig_hash" yaml:"sig_hash"`
}

ReqSubmitExternalSignature represents a request to submit a signature from an external key

Jump to

Keyboard shortcuts

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