api

package
v0.0.0-...-dba23ac Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2023 License: ISC Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CookieName = "bitmark-webgui"
)

Variables

This section is empty.

Functions

func Bitcoind

func Bitcoind(w http.ResponseWriter, req *http.Request, log *logger.L)

POST /api/bitcoind

func BitmarkCliExec

func BitmarkCliExec(w http.ResponseWriter, req *http.Request, log *logger.L, command string, webguiFilePath string, configuration *configuration.Configuration)

POST /api/bitmarkCli/*

func BitmarkPay

func BitmarkPay(w http.ResponseWriter, req *http.Request, log *logger.L, command string)

POST /api/bitmarkPay/info, pay, encrypt, status, result for info, pay, encrypt. They are calling bitmark-pay, will return a job hash, use status to know if the job is still running, when the status shows success, fail, stopped, use the job hash and result api to get the result if the result is nil, it means the async job failed.

func BitmarkPayJobHash

func BitmarkPayJobHash(w http.ResponseWriter, req *http.Request, log *logger.L)

Get /api/bitmarkPay

func BitmarkPayKill

func BitmarkPayKill(w http.ResponseWriter, req *http.Request, log *logger.L)

DELETE /api/bitmarkPay

func Bitmarkd

func Bitmarkd(w http.ResponseWriter, req *http.Request, webguiFilePath string, webguiConfig *configuration.Configuration, log *logger.L)

POST /api/bitmarkd

func GetAndCheckCookie

func GetAndCheckCookie(w http.ResponseWriter, req *http.Request, log *logger.L) error

func ListConfig

func ListConfig(w http.ResponseWriter, req *http.Request, bitmarkConfigFile, prooferdConfigFile string, log *logger.L)

Get /api/config

func LoginBitmarkWebgui

func LoginBitmarkWebgui(w http.ResponseWriter, req *http.Request, configuration *configuration.Configuration, log *logger.L)

POST /api/login

func LoginStatus

func LoginStatus(w http.ResponseWriter, configuration *configuration.Configuration, log *logger.L)

GET /api/login

func LogoutBitmarkWebgui

func LogoutBitmarkWebgui(w http.ResponseWriter, req *http.Request, filePath string, webguiConfiguration *configuration.Configuration, log *logger.L)

POST /api/logout

func LogoutBitmarkWebguiOnestep

func LogoutBitmarkWebguiOnestep(w http.ResponseWriter, req *http.Request, filePath string, webguiConfiguration *configuration.Configuration, log *logger.L)

POST /api/logoutOnestep

func OnestepExec

func OnestepExec(w http.ResponseWriter, req *http.Request, log *logger.L, command string, webguiFilePath string, configuration *configuration.Configuration)

POST /api/onestep/status, setup, issue, transfer

func Prooferd

func Prooferd(w http.ResponseWriter, req *http.Request, webguiFilePath string, webguiConfig *configuration.Configuration, log *logger.L)

POST /api/bitmarkd

func Register

func Register(service interface{})

func SetBitmarkWebguiPassword

func SetBitmarkWebguiPassword(w http.ResponseWriter, req *http.Request, bitmarkWebguiConfigFile string, configs *configuration.Configuration, log *logger.L)

POST /api/password

func SetCORSHeader

func SetCORSHeader(w http.ResponseWriter, req *http.Request)

func UpdateConfig

func UpdateConfig(w http.ResponseWriter, req *http.Request, chain, bitmarkConfigFile, prooferdConfigFile string, log *logger.L)

Post /api/config

func WriteGlobalErrorResponse

func WriteGlobalErrorResponse(w http.ResponseWriter, err error, log *logger.L) error

Types

type BitmarkCliGenerateResponse

type BitmarkCliGenerateResponse struct {
	PublicKey  string `json:"public_key"`
	PrivateKey string `json:"private_key"`
}

type BitmarkCliInfoResponse

type BitmarkCliInfoResponse struct {
	Default_identity string                `json:"default_identity"`
	Network          string                `json:"network"`
	Connect          string                `json:"connect"`
	Identities       []BitmarkIdentityType `json:"identities"`
}

type BitmarkCliIssueResponse

type BitmarkCliIssueResponse struct {
	AssetId        string                  `json:"assetId"`
	IssueIds       []string                `json:"issueIds"`
	PaymentAddress []BitmarkPaymentAddress `json:"paymentAddress"`
}

type BitmarkCliTransferResponse

type BitmarkCliTransferResponse struct {
	TransferId     string                  `json:"transferId"`
	PaymentAddress []BitmarkPaymentAddress `json:"paymentAddress"`
}

type BitmarkIdentityType

type BitmarkIdentityType struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	Public_key  string `json:"public_key"`
}

type BitmarkPayInfoResponse

type BitmarkPayInfoResponse struct {
	Address          string  `json:"address"`
	EstimatedBalance float64 `json:"estimated_balance"`
	AvailableBalance float64 `json:"available_balance"`
}

type BitmarkPaymentAddress

type BitmarkPaymentAddress struct {
	Currency string `json:"currency"`
	Address  string `json:"address"`
}

type OnestepIssueFailResponse

type OnestepIssueFailResponse struct {
	CliResult BitmarkCliIssueResponse `json:"cli_result"`
	FailStart int                     `json:"fail_start"`
}

type OnestepIssueRequest

type OnestepIssueRequest struct {
	Network     string `json:"network"`
	PayConfig   string `json:"pay_config"`
	Identity    string `json:"identity"`
	Asset       string `json:"asset"`
	Description string `json:"description"`
	Fingerprint string `json:"fingerprint"`
	Quantity    int    `json:"quantity"`
	Password    string `json:"password"`
}

type OnestepIssueResponse

type OnestepIssueResponse struct {
	CliResult BitmarkCliIssueResponse `json:"cli_result"`
	JobHash   string                  `json:"job_hash"`
}

type OnestepSetupRequest

type OnestepSetupRequest struct {
	Network     string `json:"network"`
	CliConfig   string `json:"cli_config"`
	PayConfig   string `json:"pay_config"`
	Connect     string `json:"connect"`
	Identity    string `json:"identity"`
	Description string `json:"description"`
	CliPassword string `json:"cli_password"`
	PayPassword string `json:"pay_password"`
}

type OnestepStatusRequest

type OnestepStatusRequest struct {
	Network   string `json:"network"`
	PayConfig string `json:"pay_config"`
}

type OnestepStatusResponse

type OnestepStatusResponse struct {
	CliResult BitmarkCliInfoResponse `json:"cli_result"`
	JobHash   string                 `json:"job_hash"`
}

type OnestepTransferFailResponse

type OnestepTransferFailResponse struct {
	CliResult BitmarkCliTransferResponse `json:"cli_result"`
}

type OnestepTransferRequest

type OnestepTransferRequest struct {
	Network   string `json:"network"`
	PayConfig string `json:"pay_config"`
	Identity  string `json:"identity"`
	Txid      string `json:"txid"`
	Receiver  string `json:"receiver"`
	Password  string `json:"password"`
}

type OnestepTransferResponse

type OnestepTransferResponse struct {
	CliResult BitmarkCliTransferResponse `json:"cli_result"`
	JobHash   string                     `json:"job_hash"`
}

type Response

type Response struct {
	Ok     bool        `json:"ok"`
	Result interface{} `json:"result"`
}

Jump to

Keyboard shortcuts

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