requests

package
v0.0.0-...-ee95d54 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2023 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DKGProposalCommitConfirmationRequest

type DKGProposalCommitConfirmationRequest struct {
	ParticipantId int
	Commit        []byte
	CreatedAt     time.Time
}

States: "state_dkg_commits_sending_await_confirmations" Events: "event_dkg_commit_confirm_received"

func (*DKGProposalCommitConfirmationRequest) Validate

type DKGProposalConfirmationErrorRequest

type DKGProposalConfirmationErrorRequest struct {
	ParticipantId int
	Error         *FSMError
	CreatedAt     time.Time
}

States: "state_dkg_pub_keys_await_confirmations"

"state_dkg_commits_sending_await_confirmations"
"state_dkg_deals_await_confirmations"
"state_dkg_responses_await_confirmations"
"state_dkg_master_key_await_confirmations"

Events: "event_dkg_pub_key_confirm_canceled_by_error",

"event_dkg_commit_confirm_canceled_by_error"
"event_dkg_deal_confirm_canceled_by_error"
"event_dkg_response_confirm_canceled_by_error"
"event_dkg_master_key_confirm_canceled_by_error"

func (*DKGProposalConfirmationErrorRequest) Validate

type DKGProposalDealConfirmationRequest

type DKGProposalDealConfirmationRequest struct {
	ParticipantId int
	Deal          []byte
	CreatedAt     time.Time
}

States: "state_dkg_deals_await_confirmations" Events: "event_dkg_deal_confirm_received"

func (*DKGProposalDealConfirmationRequest) Validate

type DKGProposalMasterKeyConfirmationRequest

type DKGProposalMasterKeyConfirmationRequest struct {
	ParticipantId int
	MasterKey     []byte
	CreatedAt     time.Time
	PubPolyBz     []byte
}

States: "state_dkg_master_key_await_confirmations" Events: "event_dkg_master_key_confirm_received"

func (*DKGProposalMasterKeyConfirmationRequest) Validate

type DKGProposalResponseConfirmationRequest

type DKGProposalResponseConfirmationRequest struct {
	ParticipantId int
	Response      []byte
	CreatedAt     time.Time
}

States: "state_dkg_responses_await_confirmations" Events: "event_dkg_response_confirm_received"

func (*DKGProposalResponseConfirmationRequest) Validate

type DefaultRequest

type DefaultRequest struct {
	CreatedAt time.Time
}

func (*DefaultRequest) Validate

func (r *DefaultRequest) Validate() error

type FSMError

type FSMError struct {
	ErrorMsg string
}

func NewFSMError

func NewFSMError(err error) *FSMError

func (FSMError) Error

func (re FSMError) Error() string

func (FSMError) MarshalJSON

func (re FSMError) MarshalJSON() ([]byte, error)

func (*FSMError) UnmarshalJSON

func (re *FSMError) UnmarshalJSON(data []byte) error

type MessageToSign

type MessageToSign struct {
	MessageID string
	File      string
	Payload   []byte
	// BakedDataPayload if set true, the messages was generated from baked payload
	BakedDataPayload bool
}

MessageToSign is a message to sign on airgapped machine. It can either contains a contant as Payload or a range of baked into airgapped messages

func ReconstructBakedMessage

func ReconstructBakedMessage(id int) (MessageToSign, error)

func TasksToMessages

func TasksToMessages(msgs []SigningTask) ([]MessageToSign, error)

func (*MessageToSign) Validate

func (m *MessageToSign) Validate() error

type PartialSign

type PartialSign struct {
	MessageID string
	Sign      []byte
}

func (*PartialSign) Validate

func (s *PartialSign) Validate() error

type SignatureProposalConfirmationErrorRequest

type SignatureProposalConfirmationErrorRequest struct {
	ParticipantId int
	Error         *FSMError
	CreatedAt     time.Time
}

func (*SignatureProposalConfirmationErrorRequest) Validate

type SignatureProposalParticipantRequest

type SignatureProposalParticipantRequest struct {
	ParticipantId int
	CreatedAt     time.Time
}

States: "__idle" Events: "event_sig_proposal_confirm_by_participant"

"event_sig_proposal_decline_by_participant"

func (*SignatureProposalParticipantRequest) Validate

type SignatureProposalParticipantsEntry

type SignatureProposalParticipantsEntry struct {
	Username  string
	PubKey    []byte
	DkgPubKey []byte
}

type SignatureProposalParticipantsListRequest

type SignatureProposalParticipantsListRequest struct {
	Participants     []*SignatureProposalParticipantsEntry
	SigningThreshold int
	CreatedAt        time.Time
}

States: "__idle" Events: "event_sig_proposal_init"

func (*SignatureProposalParticipantsListRequest) Validate

type SigningBatchProposalStartRequest

type SigningBatchProposalStartRequest struct {
	BatchID       string
	ParticipantId int
	CreatedAt     time.Time
	SigningTasks  []SigningTask
}

States: "stage_signing_idle" Events: "event_signing_start_batch"

func (*SigningBatchProposalStartRequest) Validate

type SigningProposalBatchPartialSignRequests

type SigningProposalBatchPartialSignRequests struct {
	BatchID       string
	ParticipantId int
	PartialSigns  []PartialSign
	CreatedAt     time.Time
}

States: "state_signing_await_partial_signs" Events: "event_signing_partial_sign_received"

func (*SigningProposalBatchPartialSignRequests) Validate

type SigningTask

type SigningTask struct {
	MessageID  string
	File       string
	Payload    []byte
	RangeStart int
	RangeEnd   int
}

func (*SigningTask) Validate

func (m *SigningTask) Validate() error

Jump to

Keyboard shortcuts

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