Documentation ¶
Index ¶
- Constants
- Variables
- func AcceptSign(raw string) (string, error)
- func BuildDcrmRawTx(nonce uint64, payload []byte) (string, error)
- func DoAcceptSign(keyID, agreeResult string, msgHash, msgContext []string) (string, error)
- func DoSign(msgHash, msgContext []string) (string, error)
- func DoSignOne(msgHash, msgContext string) (string, error)
- func GetDcrmUser() common.Address
- func GetEnode() (string, error)
- func GetGroupID() string
- func GetSignGroups() []string
- func GetSignNonce() (uint64, error)
- func IsSwapServer() bool
- func LoadKeyStore(keyfile, passfile string) error
- func SetDcrmGroup(group, thresh, mod string)
- func SetDcrmRPCAddress(url string)
- func SetSignGroups(groups []string)
- func SetSignPubkey(pubkey string)
- func Sign(raw string) (string, error)
- type AcceptData
- type DataEnode
- type DataResult
- type DataResultResp
- type GetEnodeResp
- type GetGroupByIDResp
- type GroupInfo
- type SignData
- type SignInfoData
- type SignInfoResp
- type SignReply
- type SignStatus
Constants ¶
View Source
const ( // DcrmToAddress used in dcrm sign and accept DcrmToAddress = "0x00000000000000000000000000000000000000dc" // DcrmWalletServiceID to make dcrm signer DcrmWalletServiceID = 30400 )
Variables ¶
View Source
var ( ErrGetSignStatusTimeout = errors.New("getSignStatus timeout") ErrGetSignStatusFailed = errors.New("getSignStatus failure") )
get dcrm sign status error
View Source
var ( // ServerDcrmUser dcrm initiator for sign ServerDcrmUser common.Address )
Functions ¶
func BuildDcrmRawTx ¶
BuildDcrmRawTx build dcrm raw tx
func DoAcceptSign ¶
DoAcceptSign accept sign
func GetDcrmUser ¶
GetDcrmUser returns the dcrm user of specified keystore
func IsSwapServer ¶
func IsSwapServer() bool
IsSwapServer returns if this dcrm user is the swap server
func SetDcrmRPCAddress ¶
func SetDcrmRPCAddress(url string)
SetDcrmRPCAddress set dcrm node rpc address
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 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 string) (*SignStatus, error)
GetSignStatus call dcrm_getSignStatus
Click to show internal directories.
Click to hide internal directories.