Documentation
¶
Index ¶
- Variables
- func AcceptSign(raw string) (string, error)
- func BuildDcrmRawTx(nonce uint64, payload []byte, keyWrapper *keystore.Key) (string, error)
- func DoAcceptSign(keyID, agreeResult string, msgHash, msgContext []string) (string, error)
- func DoSign(signPubkey string, msgHash, msgContext []string) (rpcAddr, result string, err error)
- func DoSignOne(signPubkey, msgHash, msgContext string) (rpcAddr, result string, err error)
- func GetEnode(rpcAddr string) (string, error)
- func GetGroupID() string
- func GetSignNonce(dcrmUser, rpcAddr string) (uint64, error)
- func Init(dcrmConfig *params.DcrmConfig, isServer bool)
- func IsSwapServer() bool
- func Sign(raw, rpcAddr string) (string, error)
- type AcceptData
- type DataEnode
- type DataResult
- type DataResultResp
- type GetEnodeResp
- type GetGroupByIDResp
- type GroupInfo
- type NodeInfo
- type SignData
- type SignInfoData
- type SignInfoResp
- type SignReply
- type SignStatus
Constants ¶
This section is empty.
Variables ¶
var ( ErrGetSignStatusTimeout = errors.New("getSignStatus timeout") ErrGetSignStatusFailed = errors.New("getSignStatus failure") )
get dcrm sign status error
Functions ¶
func BuildDcrmRawTx ¶
BuildDcrmRawTx build dcrm raw tx
func DoAcceptSign ¶
DoAcceptSign accept sign
func GetSignNonce ¶
GetSignNonce call dcrm_getSignNonce
func IsSwapServer ¶
func IsSwapServer() bool
IsSwapServer returns if this dcrm user is the swap server
Types ¶
type AcceptData ¶
type AcceptData struct {
TxType string
Key string
Accept string
MsgHash []string
MsgContext []string
TimeStamp string
}
AcceptData accpet data
type DataResultResp ¶
type DataResultResp struct {
Status string
Tip string
Error string
Data *DataResult
}
DataResultResp result response
type GetEnodeResp ¶
GetEnodeResp enode response
type GetGroupByIDResp ¶
GetGroupByIDResp group response
type NodeInfo ¶ added in v0.3.0
type NodeInfo struct {
// contains filtered or unexported fields
}
NodeInfo dcrm node info
func GetAllInitiatorNodes ¶ added in v0.3.0
func GetAllInitiatorNodes() []*NodeInfo
GetAllInitiatorNodes get all initiator dcrm node info
func (*NodeInfo) GetDcrmRPCAddress ¶ added in v0.3.0
GetDcrmRPCAddress get dcrm node rpc address
func (*NodeInfo) GetDcrmUser ¶ added in v0.3.0
GetDcrmUser returns the dcrm user of specified keystore
func (*NodeInfo) GetSignGroups ¶ added in v0.3.0
GetSignGroups get sign subgroups
type SignData ¶
type SignData struct {
TxType string
PubKey string
MsgHash []string
MsgContext []string
Keytype string
GroupID string
ThresHold string
Mode string
TimeStamp string
}
SignData sign data
type SignInfoData ¶
type SignInfoData struct {
Account string
GroupID string
Key string
KeyType string
Mode string
MsgHash []string
MsgContext []string
Nonce string
PubKey string
ThresHold string
TimeStamp string
}
SignInfoData sign info
func GetCurNodeSignInfo ¶
func GetCurNodeSignInfo() ([]*SignInfoData, error)
GetCurNodeSignInfo call dcrm_getCurNodeSignInfo
type SignInfoResp ¶
type SignInfoResp struct {
Status string
Tip string
Error string
Data []*SignInfoData
}
SignInfoResp sign info response
type SignStatus ¶
type SignStatus struct {
Status string
Rsv []string
Tip string
Error string
AllReply []*SignReply
TimeStamp string
}
SignStatus sign status
func GetSignStatus ¶
func GetSignStatus(key, rpcAddr string) (*SignStatus, error)
GetSignStatus call dcrm_getSignStatus