accounts

package
v0.3.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCosmosAccount

func GetCosmosAccount(root wallet.Account, cosmos wallet.Account, client rosetta.Client) wallet.CosmosAccount

GetCosmosAccount returns a cosmos account.

func Load

Load loads an account from a *crypto.AccountConfig.

func LoadFromBytes

func LoadFromBytes(b []byte) (wallet.Account, error)

LoadFromBytes loads an account from a byte slice.

func New

func New(opts ...Option) (wallet.Account, error)

New creates a new account with the given options.

Types

type Option

type Option func(*config)

Option is a function that configures an account.

func WithCoinType

func WithCoinType(coinType crypto.CoinType) Option

WithCoinType sets the coin type of the account.

func WithName

func WithName(name string) Option

WithName sets the name of the account.

func WithPeers

func WithPeers(peers ...string) Option

WithPeers sets the list of all parties that can sign transactions.

func WithSelfID

func WithSelfID(selfID string) Option

WithSelfID sets the ID of the account that is used to sign transactions.

func WithThreshold

func WithThreshold(threshold int) Option

WithThreshold sets the number of required signatures to authorize a transaction.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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