Versions in this module Expand all Collapse all v1 v1.0.0 May 26, 2022 Changes in this version + const FAIL + const SUCCESS + var ErrBadAction = errors.New("bad action object") + var ErrBadActionConstruction = errors.New("bad action construction") + var ErrBadActionType = errors.New("bad action type") + var ErrDefault = errors.New("Bystack API Error") + var ErrNullContract = errors.New("contract is empty") + var ErrNullContractAlias = errors.New("contract alias is empty") + var ErrNullContractID = errors.New("contract id is empty") + func AuthHandler(handler http.Handler, accessTokens *accesstoken.CredentialStore, ...) http.Handler + func RedirectHandler(next http.Handler) http.Handler + type API struct + func NewAPI(sync NetSync, wallet *wallet.Wallet, ...) *API + func (a *API) GetChainStatus() (*ChainStatus, error) + func (a *API) IsMining() bool + func (a *API) ServeHTTP(rw http.ResponseWriter, req *http.Request) + func (a *API) StartServer(address string) + type AccountInfo struct + Info string + type AccountPubkey struct + PubKeyInfos []PubKeyInfo + RootXPub chainkd.XPub + type BlockReq struct + BlockHash chainjson.HexBytes + BlockHeight uint64 + type BlockTx struct + ID bc.Hash + Inputs []*query.AnnotatedInput + MuxID bc.Hash + Outputs []*query.AnnotatedOutput + Size uint64 + TimeRange uint64 + Version uint64 + type BuildRequest struct + Actions []map[string]interface{} + TTL json.Duration + TimeRange uint64 + Tx *types.TxData + type ChainStatus struct + CurrentHash string + CurrentHeight uint64 + FinalizedHash string + FinalizedHeight uint64 + JustifiedHash string + JustifiedHeight uint64 + type CheckPasswordResp struct + CheckResult bool + type ContractInstance struct + Status contract.Status + TxHash *bc.Hash + UTXOs []*contract.UTXO + Unconfirmed []*contract.TreeNode + type DecodeProgResp struct + Instructions string + type GetBlockHeaderResp struct + BlockHeader *types.BlockHeader + type GetBlockResp struct + Hash *bc.Hash + Height uint64 + PreviousBlockHash *bc.Hash + Size uint64 + Timestamp uint64 + Transactions []*BlockTx + TransactionsMerkleRoot *bc.Hash + Validator string + Version uint64 + type GetMerkleBlockResp struct + BlockHeader types.BlockHeader + Flags []uint32 + MatchedTxIDs []*bc.Hash + TxHashes []*bc.Hash + type GetRawBlockResp struct + RawBlock *types.Block + Validator string + type MerkleBlockReq struct + BlockHash chainjson.HexBytes + TxIDs []chainjson.HexBytes + type NetInfo struct + HighestHeight uint64 + Listening bool + Mining bool + NetWorkID string + NodeXPub string + PeerCount int + Syncing bool + Version *VersionInfo + type NetSync interface + BestPeer func() *peers.PeerInfo + DialPeerWithAddress func(addr *p2p.NetAddress) error + GetNetwork func() string + GetPeerInfos func() []*peers.PeerInfo + IsCaughtUp func() bool + IsListening func() bool + PeerCount func() int + StopPeer func(peerID string) error + type PubKeyInfo struct + Path []chainjson.HexBytes + Pubkey string + type RawTx struct + Fee uint64 + ID bc.Hash + Inputs []*query.AnnotatedInput + Outputs []*query.AnnotatedOutput + Size uint64 + TimeRange uint64 + Version uint64 + type ResetPasswordResp struct + Changed bool + type Response struct + Code string + Data interface{} + ErrorDetail string + Msg string + Status string + func FormatErrResp(err error) (response Response) + func NewErrorResponse(err error) Response + func NewSuccessResponse(data interface{}) Response + type SignMsgResp struct + DerivedXPub chainkd.XPub + Signature string + type SortByIndex []addressResp + func (a SortByIndex) Len() int + func (a SortByIndex) Less(i, j int) bool + func (a SortByIndex) Swap(i, j int) + type VerifyMsgResp struct + VerifyResult bool + type VersionInfo struct + NewVer string + Update uint16 + Version string + type VoteInfo struct + Vote string + VoteNum uint64 + type WalletImage struct + AccountImage *account.Image + AssetImage *asset.Image + KeyImages *pseudohsm.KeyImage + type WalletInfo struct + BestBlockHeight uint64 + WalletHeight uint64