Documentation ¶
Index ¶
- Constants
- func AvailableCommands(cmd string) bool
- func BIP32PathForIndex(index uint32) string
- func WithAccountStatesFile(fileName string) options.Option[Manager]
- func WithClientURL(url string) options.Option[Manager]
- func WithFaucetAccountParams(params *GenesisAccountParams) options.Option[Manager]
- func WithFaucetURL(url string) options.Option[Manager]
- func WithSilence() options.Option[Manager]
- type AccountOperation
- type AccountState
- type AccountSubcommands
- type AllotAccountParams
- type ClaimAccountParams
- type ConvertAccountParams
- type CreateAccountParams
- type DelegateAccountParams
- type Delegation
- type DestroyAccountParams
- type GenesisAccountParams
- type Manager
- func (m *Manager) AddAccount(alias string, data *models.AccountData)
- func (m *Manager) AddWallet(alias string, wallet *Wallet)
- func (m *Manager) AllotToAccount(ctx context.Context, params *AllotAccountParams) error
- func (m *Manager) Claim(ctx context.Context, params *ClaimAccountParams) error
- func (m *Manager) CreateAccount(ctx context.Context, params *CreateAccountParams) (iotago.AccountID, error)
- func (m *Manager) CreateBlock(clt models.Client, payload iotago.Payload, issuer wallet.Account, ...) (*iotago.Block, error)
- func (m *Manager) DelegateToAccount(ctx context.Context, params *DelegateAccountParams) error
- func (m *Manager) Delegators() []string
- func (m *Manager) DestroyAccount(ctx context.Context, params *DestroyAccountParams) error
- func (m *Manager) FaucetRequestsAccount() wallet.Account
- func (m *Manager) GenesisAccount() wallet.Account
- func (m *Manager) GetAccount(alias string) (*models.AccountData, error)
- func (m *Manager) GetDelegations(alias string) ([]*Delegation, error)
- func (m *Manager) GetReadyAccount(ctx context.Context, clt models.Client, alias string) (*models.AccountData, error)
- func (m *Manager) GetWallet(alias string) (*Wallet, error)
- func (m *Manager) ListAccount() error
- func (m *Manager) LoadStateFromFile() (loaded bool, err error)
- func (m *Manager) PostWithBlock(ctx context.Context, clt models.Client, payload iotago.Payload, ...) (iotago.BlockID, error)
- func (m *Manager) RequestBlockIssuanceData(ctx context.Context, clt models.Client, account wallet.Account) (*api.CongestionResponse, *api.IssuanceBlockHeaderResponse, iotago.Version, ...)
- func (m *Manager) RequestFaucetFunds(ctx context.Context, clt models.Client, receiveAddr iotago.Address) (iotago.OutputID, iotago.Output, error)
- func (m *Manager) RequestManaAndFundsFromTheFaucet(ctx context.Context, w *Wallet, minManaAmount iotago.Mana, ...) ([]*models.OutputData, error)
- func (m *Manager) SaveStateToFile() error
- type ManagerState
- type NoAccountParams
- type StakeAccountParams
- type UpdateAccountParams
- type Wallet
Constants ¶
View Source
const ( GenesisAccountAlias = "genesis-account" FaucetRequestsAlias = "faucet-requests" )
View Source
const (
MaxFaucetRequestsForOneOperation = 10
)
Variables ¶
This section is empty.
Functions ¶
func AvailableCommands ¶
func BIP32PathForIndex ¶
func WithClientURL ¶
WithClientURL sets the client bind address.
func WithFaucetAccountParams ¶
func WithFaucetAccountParams(params *GenesisAccountParams) options.Option[Manager]
func WithSilence ¶
Types ¶
type AccountOperation ¶
type AccountOperation string
const ( OperationCreateAccount AccountOperation = "create" OperationConvertAccount AccountOperation = "convert" OperationDestroyAccount AccountOperation = "destroy" OperationAllotAccount AccountOperation = "allot" OperationDelegate AccountOperation = "delegate" OperationStakeAccount AccountOperation = "stake" OperationClaim AccountOperation = "claim" OperationUpdateAccount AccountOperation = "update" )
func (AccountOperation) String ¶
func (a AccountOperation) String() string
type AccountState ¶
type AccountState struct { Alias string `serix:"Alias,lenPrefix=uint8"` AccountID iotago.AccountID `serix:"AccountID"` PrivateKey ed25519.PrivateKey `serix:",lenPrefix=uint8"` OutputID iotago.OutputID `serix:"OutputID"` Index uint32 `serix:"Index"` }
func AccountStateFromAccountData ¶
func AccountStateFromAccountData(acc *models.AccountData) *AccountState
func (*AccountState) ToAccountData ¶
func (a *AccountState) ToAccountData() *models.AccountData
type AccountSubcommands ¶
type AccountSubcommands interface {
Type() AccountOperation
}
type AllotAccountParams ¶
func (*AllotAccountParams) Type ¶
func (a *AllotAccountParams) Type() AccountOperation
type ClaimAccountParams ¶
type ClaimAccountParams struct {
Alias string
}
func (*ClaimAccountParams) Type ¶
func (a *ClaimAccountParams) Type() AccountOperation
type ConvertAccountParams ¶
type ConvertAccountParams struct {
AccountAlias string
}
func (*ConvertAccountParams) Type ¶
func (d *ConvertAccountParams) Type() AccountOperation
type CreateAccountParams ¶
func (*CreateAccountParams) Type ¶
func (c *CreateAccountParams) Type() AccountOperation
type DelegateAccountParams ¶
type DelegateAccountParams struct { Amount iotago.BaseToken ToAddress string FromAlias string CheckPool bool }
func (*DelegateAccountParams) Type ¶
func (a *DelegateAccountParams) Type() AccountOperation
type Delegation ¶
type DestroyAccountParams ¶
func (*DestroyAccountParams) Type ¶
func (d *DestroyAccountParams) Type() AccountOperation
type GenesisAccountParams ¶
type GenesisAccountParams struct { GenesisPrivateKey string GenesisAccountID string FaucetPrivateKey string FaucetAccountID string }
func NewGenesisAccountParams ¶
func NewGenesisAccountParams(params *models.ParametersTool) *GenesisAccountParams
type Manager ¶
type Manager struct { RequestTokenAmount iotago.BaseToken RequestManaAmount iotago.Mana Client *models.WebClient API iotago.API sync.RWMutex log.Logger // contains filtered or unexported fields }
func RunManager ¶
func (*Manager) AddAccount ¶
func (m *Manager) AddAccount(alias string, data *models.AccountData)
func (*Manager) AllotToAccount ¶
func (m *Manager) AllotToAccount(ctx context.Context, params *AllotAccountParams) error
func (*Manager) Claim ¶
func (m *Manager) Claim(ctx context.Context, params *ClaimAccountParams) error
func (*Manager) CreateAccount ¶
func (m *Manager) CreateAccount(ctx context.Context, params *CreateAccountParams) (iotago.AccountID, error)
CreateAccount creates an implicit account and immediately transition it to a regular account.
func (*Manager) CreateBlock ¶
func (*Manager) DelegateToAccount ¶
func (m *Manager) DelegateToAccount(ctx context.Context, params *DelegateAccountParams) error
func (*Manager) Delegators ¶
func (*Manager) DestroyAccount ¶
func (m *Manager) DestroyAccount(ctx context.Context, params *DestroyAccountParams) error
func (*Manager) FaucetRequestsAccount ¶
func (*Manager) GenesisAccount ¶
func (*Manager) GetAccount ¶
func (m *Manager) GetAccount(alias string) (*models.AccountData, error)
func (*Manager) GetDelegations ¶
func (m *Manager) GetDelegations(alias string) ([]*Delegation, error)
func (*Manager) GetReadyAccount ¶
func (*Manager) ListAccount ¶
func (*Manager) LoadStateFromFile ¶
func (*Manager) PostWithBlock ¶
func (*Manager) RequestBlockIssuanceData ¶
func (*Manager) RequestFaucetFunds ¶
func (*Manager) RequestManaAndFundsFromTheFaucet ¶
func (*Manager) SaveStateToFile ¶
type ManagerState ¶
type ManagerState struct { AccountState []*AccountState `serix:"accounts,lenPrefix=uint8"` Wallets []*Wallet `serix:"wallets,lenPrefix=uint8"` Delegation []*Delegation `serix:"delegations,lenPrefix=uint8"` RequestTokenAmount iotago.BaseToken `serix:"RequestTokenAmount"` RequestManaAmount iotago.Mana `serix:"RequestManaAmount"` }
type NoAccountParams ¶
type NoAccountParams struct {
Operation AccountOperation
}
func (*NoAccountParams) Type ¶
func (a *NoAccountParams) Type() AccountOperation
type StakeAccountParams ¶
type StakeAccountParams struct { Alias string Amount uint64 FixedCost uint64 StartEpoch uint64 EndEpoch uint64 }
func (*StakeAccountParams) Type ¶
func (a *StakeAccountParams) Type() AccountOperation
type UpdateAccountParams ¶
type UpdateAccountParams struct { Alias string BlockIssuerKey string Mana uint64 Amount uint64 ExpirySlot uint64 }
func (*UpdateAccountParams) Type ¶
func (a *UpdateAccountParams) Type() AccountOperation
type Wallet ¶
type Wallet struct { Alias string `serix:"alias,lenPrefix=uint8"` Seed [32]byte `serix:"seed"` LatestUsedIndex uint32 `serix:"LatestUsedIndex"` }
func (*Wallet) GetAddrSignerForIndexes ¶
func (w *Wallet) GetAddrSignerForIndexes(outputs ...*models.OutputData) (iotago.AddressSigner, error)
Click to show internal directories.
Click to hide internal directories.