Documentation
¶
Index ¶
- func ComposeAuthorizerRaw(msg InitiatorMessage) ([]byte, error)
- func MarshalStartMessage(params []byte) ([]byte, error)
- func MarshalTssMessage(tssMsg *TssMessage) ([]byte, error)
- func MarshalTssResharingMessage(msgBytes []byte, isToOldCommittee bool, isBroadcast bool, ...) ([]byte, error)
- type AuthorizerSignature
- type ECDHMessage
- type EventInitiatorKeyType
- type GenerateKeyMessage
- type InitiatorMessage
- type KeyType
- type ResharingMessage
- type SignTxMessage
- type StartMessage
- type TssMessage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComposeAuthorizerRaw ¶ added in v0.3.3
func ComposeAuthorizerRaw(msg InitiatorMessage) ([]byte, error)
ComposeAuthorizerRaw composes the raw data to be signed by an authorizer
func MarshalStartMessage ¶
func MarshalTssMessage ¶
func MarshalTssMessage(tssMsg *TssMessage) ([]byte, error)
Types ¶
type AuthorizerSignature ¶ added in v0.3.3
type AuthorizerSignature struct {
AuthorizerID string `json:"authorizer_id"`
Signature []byte `json:"signature"`
}
AuthorizerSignature represents a single authorizer signature attached to an initiator message.
type ECDHMessage ¶ added in v0.3.2
type ECDHMessage struct {
From string `json:"from"`
PublicKey []byte `json:"public_key"`
Timestamp time.Time `json:"timestamp"`
Signature []byte `json:"signature"`
}
func (*ECDHMessage) MarshalForSigning ¶ added in v0.3.2
func (msg *ECDHMessage) MarshalForSigning() ([]byte, error)
MarshalForSigning returns the deterministic JSON bytes for signing
type EventInitiatorKeyType ¶ added in v0.3.2
type EventInitiatorKeyType string
const ( EventInitiatorKeyTypeEd25519 EventInitiatorKeyType = "ed25519" EventInitiatorKeyTypeP256 EventInitiatorKeyType = "p256" )
type GenerateKeyMessage ¶
type GenerateKeyMessage struct {
WalletID string `json:"wallet_id"`
Signature []byte `json:"signature"`
AuthorizerSignatures []AuthorizerSignature `json:"authorizer_signatures,omitempty"`
}
func (*GenerateKeyMessage) GetAuthorizerSignatures ¶ added in v0.3.3
func (m *GenerateKeyMessage) GetAuthorizerSignatures() []AuthorizerSignature
func (*GenerateKeyMessage) InitiatorID ¶
func (m *GenerateKeyMessage) InitiatorID() string
func (*GenerateKeyMessage) Raw ¶
func (m *GenerateKeyMessage) Raw() ([]byte, error)
func (*GenerateKeyMessage) Sig ¶
func (m *GenerateKeyMessage) Sig() []byte
type InitiatorMessage ¶
type InitiatorMessage interface {
// Raw returns the canonical byte‐slice that was signed.
Raw() ([]byte, error)
// Sig returns the signature over Raw().
Sig() []byte
// InitiatorID returns the ID whose public key we have to look up.
InitiatorID() string
GetAuthorizerSignatures() []AuthorizerSignature
}
InitiatorMessage is anything that carries a payload to verify and its signature.
type ResharingMessage ¶ added in v0.3.0
type ResharingMessage struct {
SessionID string `json:"session_id"`
NodeIDs []string `json:"node_ids"` // new peer IDs
NewThreshold int `json:"new_threshold"`
KeyType KeyType `json:"key_type"`
WalletID string `json:"wallet_id"`
Signature []byte `json:"signature,omitempty"`
AuthorizerSignatures []AuthorizerSignature `json:"authorizer_signatures,omitempty"`
}
func (*ResharingMessage) GetAuthorizerSignatures ¶ added in v0.3.3
func (m *ResharingMessage) GetAuthorizerSignatures() []AuthorizerSignature
func (*ResharingMessage) InitiatorID ¶ added in v0.3.0
func (m *ResharingMessage) InitiatorID() string
func (*ResharingMessage) Raw ¶ added in v0.3.0
func (m *ResharingMessage) Raw() ([]byte, error)
func (*ResharingMessage) Sig ¶ added in v0.3.0
func (m *ResharingMessage) Sig() []byte
type SignTxMessage ¶
type SignTxMessage struct {
KeyType KeyType `json:"key_type"`
WalletID string `json:"wallet_id"`
NetworkInternalCode string `json:"network_internal_code"`
TxID string `json:"tx_id"`
Tx []byte `json:"tx"`
Signature []byte `json:"signature"`
AuthorizerSignatures []AuthorizerSignature `json:"authorizer_signatures,omitempty"`
}
func (*SignTxMessage) GetAuthorizerSignatures ¶ added in v0.3.3
func (m *SignTxMessage) GetAuthorizerSignatures() []AuthorizerSignature
func (*SignTxMessage) InitiatorID ¶
func (m *SignTxMessage) InitiatorID() string
func (*SignTxMessage) Raw ¶
func (m *SignTxMessage) Raw() ([]byte, error)
func (*SignTxMessage) Sig ¶
func (m *SignTxMessage) Sig() []byte
type StartMessage ¶
type StartMessage struct {
Params []byte `json:"params"`
}
func UnmarshalStartMessage ¶
func UnmarshalStartMessage(msgBytes []byte) (*StartMessage, error)
type TssMessage ¶
type TssMessage struct {
WalletID string `json:"sessionID"`
MsgBytes []byte `json:"msgBytes"`
IsBroadcast bool `json:"isBroadcast"`
From *tss.PartyID `json:"from"`
To []*tss.PartyID `json:"to"`
IsToOldCommittee bool `json:"isToOldCommittee"`
IsToOldAndNewCommittees bool `json:"isToOldAndNewCommittees"`
Signature []byte `json:"signature"`
}
func NewTssMessage ¶
func UnmarshalTssMessage ¶
func UnmarshalTssMessage(msgBytes []byte) (*TssMessage, error)
func (*TssMessage) MarshalForSigning ¶
func (msg *TssMessage) MarshalForSigning() ([]byte, error)
MarshalForSigning returns the deterministic JSON bytes for signing
Click to show internal directories.
Click to hide internal directories.