sigapp

package
v0.0.0-...-a7edd0a Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(args []string)

func SignCommand

func SignCommand(cCtx *cli.Context) error

func VerifyCommand

func VerifyCommand(cCtx *cli.Context) error

Types

type DocumentSignature

type DocumentSignature struct {
	Metadata  Metadata `json:"metadata"`
	FileHash  string   `json:"fileHash"`  // The keccak256 hash of the document
	Signature string   `json:"signature"` // ECDSA signature of the file hash
	Signer    string   `json:"signer"`    // Ethereum address of the signer
}

type Metadata

type Metadata struct {
	Name        string `json:"name"`        // File name
	Description string `json:"description"` // Description of the file
	Timestamp   string `json:"timestamp"`   // ISO 8601 timestamp
}

type SignModel

type SignModel struct {
	// contains filtered or unexported fields
}

func (SignModel) Init

func (m SignModel) Init() tea.Cmd

func (*SignModel) ToDocSignature

func (m *SignModel) ToDocSignature() []byte

func (SignModel) Update

func (m SignModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (SignModel) View

func (m SignModel) View() string

type SignState

type SignState int

type SubCommand

type SubCommand int
const (
	SUB_HELP SubCommand = iota
	SUB_SIGN
	SUB_RECOVER
)

type VerifyModel

type VerifyModel struct {
	// contains filtered or unexported fields
}

func (VerifyModel) Init

func (m VerifyModel) Init() tea.Cmd

func (VerifyModel) Update

func (m VerifyModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (VerifyModel) View

func (m VerifyModel) View() string

type VerifyState

type VerifyState int

Jump to

Keyboard shortcuts

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