v1

package
Version: v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2021 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetHandler

func GetHandler(config *config.Config) http.Handler

func GetWellKnownBsvAliasResponse

func GetWellKnownBsvAliasResponse(config *config.Config) ([]byte, error)

Types

type BsvAliasCapabilities

type BsvAliasCapabilities struct {
	Pki                string `json:"pki"`
	PaymentDestination string `json:"paymentDestination"`
	VerifyPublicKey    string `json:"a9f510c16bde,omitempty"`
}

type PaymentDestinationRequest

type PaymentDestinationRequest struct {
	SenderName   string `json:"senderName"`
	SenderHandle string `json:"senderHandle"`
	Dt           string `json:"dt"`
	Amount       int64  `json:"amount"`
	Purpose      string `json:"purpose"`
	Signature    string `json:"signature"`
}

type PaymentDestinationResponse

type PaymentDestinationResponse struct {
	// P2PKH output script
	Output string `json:"output"`
}

type PkiResponse

type PkiResponse struct {
	Version string `json:"bsvalias"`
	Handle  string `json:"handle"`
	PubKey  string `json:"pubkey"`
}

type V1Handler

type V1Handler struct {
	// contains filtered or unexported fields
}

func (*V1Handler) PaymentDestination

func (v1 *V1Handler) PaymentDestination(w http.ResponseWriter, r *http.Request)

//bsvalias/v1/address/{alias}

func (*V1Handler) Pki

func (v1 *V1Handler) Pki(w http.ResponseWriter, r *http.Request)

/bsvalias/v1/pki/{alias}

func (*V1Handler) VerifyPublicKeyOwner

func (v1 *V1Handler) VerifyPublicKeyOwner(w http.ResponseWriter, r *http.Request)

/bsvalias/v1/verifypubkey/{alias}/{pubkey}

type VerifyPublicKeyOwnerResponse

type VerifyPublicKeyOwnerResponse struct {
	Handle string `json:"handle"`
	PubKey string `json:"pubkey"`
	Match  bool   `json:"match"`
}

type WellKnownBsvAliasResponse

type WellKnownBsvAliasResponse struct {
	Version      string               `json:"bsvalias"`
	Capabilities BsvAliasCapabilities `json:"capabilities"`
}

Source Files

Jump to

Keyboard shortcuts

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