models

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2026 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EncryptedKeyRing

type EncryptedKeyRing struct {
	UpdatedAt     time.Time
	EncryptedKeys []byte
}

func (EncryptedKeyRing) Decrypt

func (ekr EncryptedKeyRing) Decrypt(password string) (*KeyRing, error)

type KeyRing

type KeyRing struct {
	CSA          map[string]csakey.KeyV2
	Eth          map[string]ethkey.KeyV2
	OCR          map[string]ocrkey.KeyV2
	OCR2         map[string]ocr2key.KeyBundle
	P2P          map[string]p2pkey.KeyV2
	Cosmos       map[string]cosmoskey.Key
	Solana       map[string]solkey.Key
	StarkNet     map[string]starkkey.Key
	Sui          map[string]suikey.Key
	Aptos        map[string]aptoskey.Key
	Tron         map[string]tronkey.Key
	TON          map[string]tonkey.Key
	VRF          map[string]vrfkey.KeyV2
	Workflow     map[string]workflowkey.Key
	DKGRecipient map[string]dkgrecipientkey.Key
	LegacyKeys   LegacyKeyStorage
}

func NewKeyRing

func NewKeyRing() *KeyRing

func (*KeyRing) Encrypt

func (kr *KeyRing) Encrypt(password string, scryptParams keystore.ScryptParams) (ekr EncryptedKeyRing, err error)

type KeyStates

type KeyStates struct {
	// Key ID => chain ID => state
	KeyIDChainID map[string]map[string]*ethkey.State
	// Chain ID => Key ID => state
	ChainIDKeyID map[string]map[string]*ethkey.State
	All          []*ethkey.State
}

func NewKeyStates

func NewKeyStates() *KeyStates

func (*KeyStates) Add

func (ks *KeyStates) Add(state *ethkey.State)

warning: not thread-safe! caller must sync adds or replaces a state

func (*KeyStates) Delete

func (ks *KeyStates) Delete(addr common.Address)

warning: not thread-safe! caller must sync

func (*KeyStates) Disable

func (ks *KeyStates) Disable(addr common.Address, chainID *big.Int, updatedAt time.Time)

warning: not thread-safe! caller must sync

func (*KeyStates) Enable

func (ks *KeyStates) Enable(addr common.Address, chainID *big.Int, updatedAt time.Time)

warning: not thread-safe! caller must sync

func (*KeyStates) Get

func (ks *KeyStates) Get(addr common.Address, chainID *big.Int) *ethkey.State

warning: not thread-safe! caller must sync

type LegacyKeyStorage

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

func (*LegacyKeyStorage) StoreUnsupported

func (k *LegacyKeyStorage) StoreUnsupported(allRawKeysJSON []byte, keyRing *KeyRing) error

StoreUnsupported will store the raw keys that no longer have support in the node it will check if raw json contains keys that have not been added to the key ring and stores them internally

func (*LegacyKeyStorage) UnloadUnsupported

func (k *LegacyKeyStorage) UnloadUnsupported(supportedRawKeyRingJson []byte) ([]byte, error)

UnloadUnsupported will inject the unsupported keys into the raw key ring json

Jump to

Keyboard shortcuts

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