eoa

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2024 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Overview

Package eoa defines well-known (non-fireblocks) eoa private keys used in an omni network.

Index

Constants

View Source
const (
	ZeroXDead = "0x000000000000000000000000000000000000dead"
)

Variables

This section is empty.

Functions

func Address

func Address(network netconf.ID, role Role) (common.Address, bool)

Address returns the address for the EOA identified by the network and role.

func Admin added in v0.1.4

func Admin(network netconf.ID) (common.Address, error)

Admin returns the address of the admin for the given network. NOTE: this relies on the fact that we use the same admin account for all "admin" roles.

func Funder added in v0.1.4

func Funder() common.Address

Funder returns the address of the funder account.

func MustAddress

func MustAddress(network netconf.ID, role Role) common.Address

MustAddress returns the address for the EOA identified by the network and role.

func MustAddresses added in v0.1.4

func MustAddresses(network netconf.ID, roles ...Role) []common.Address

MustAddresses returns the addresses for the network and roles.

func PrivateKey

func PrivateKey(ctx context.Context, network netconf.ID, role Role) (*ecdsa.PrivateKey, error)

PrivateKey returns the private key for the EOA identified by the network and role.

Types

type Account added in v0.1.4

type Account struct {
	Type    Type
	Role    Role
	Address common.Address
	// contains filtered or unexported fields
}

Account defines a EOA account used within the Omni network.

func AccountForRole added in v0.1.4

func AccountForRole(network netconf.ID, role Role) (Account, bool)

AccountForRole returns the account for the network and role.

func AllAccounts added in v0.1.4

func AllAccounts(network netconf.ID) ([]Account, bool)

AllAccounts returns all accounts for the network.

type FundThresholds added in v0.1.4

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

func GetFundThresholds added in v0.1.4

func GetFundThresholds(network netconf.ID, role Role) (FundThresholds, bool)

func (FundThresholds) MinBalance added in v0.1.4

func (t FundThresholds) MinBalance() *big.Int

func (FundThresholds) TargetBalance added in v0.1.4

func (t FundThresholds) TargetBalance() *big.Int

type Role added in v0.1.4

type Role string
const (
	RoleRelayer         Role = "relayer"
	RoleMonitor         Role = "monitor"
	RoleCreate3Deployer Role = "create3-deployer"
	RoleDeployer        Role = "deployer"
	RoleProxyAdminOwner Role = "proxy-admin-owner"
	RolePortalAdmin     Role = "portal-admin"
	RoleAVSAdmin        Role = "avs-admin"
	RoleFbDev           Role = "fb-dev" // TODO(corver): fb-dev isn't a role...
)

func AllRoles added in v0.1.4

func AllRoles() []Role

func (Role) Verify added in v0.1.4

func (r Role) Verify() error

type Type

type Type string
const (
	TypeRemote    Type = "remote"     // stored in (fireblocks) accessible via API to sign
	TypeSecret    Type = "secret"     // stored in GCP can be downloaded to disk
	TypeWellKnown Type = "well-known" // well-known eoa private keys in the repo
)

Jump to

Keyboard shortcuts

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