Documentation ¶
Index ¶
- type Account
- func (acc *Account) AccountNumber() uint64
- func (acc *Account) Address() string
- func (acc *Account) ChainID() string
- func (acc *Account) IncrementSequence()
- func (acc *Account) LegacyAddress() string
- func (acc *Account) PubKey() cryptoTypes.PubKey
- func (acc *Account) SdkAddress() sdk.AccAddress
- func (acc *Account) Sequence() uint64
- func (acc *Account) Sign(bytesToSign []byte) ([]byte, error)
- func (acc *Account) WithAccountNumber(accountNumber uint64) *Account
- func (acc *Account) WithChainID(chainID string) *Account
- func (acc *Account) WithSequence(sequence uint64) *Account
- type Mnemonic
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct {
// contains filtered or unexported fields
}
Account contains private key of the account that allows to sign transactions to broadcast to the blockchain.
func NewAccount ¶
NewAccount creates new account with random mnemonic.
func NewAccountFromMnemonicWords ¶
NewAccountFromMnemonicWords creates account from mnemonic presented as set of words.
func (*Account) AccountNumber ¶
AccountNumber returns accounts's number.
func (*Account) IncrementSequence ¶
func (acc *Account) IncrementSequence()
func (*Account) LegacyAddress ¶
Address returns accounts's address in bech32 format.
func (*Account) PubKey ¶
func (acc *Account) PubKey() cryptoTypes.PubKey
Sequence returns accounts's sequence (last used nonce).
func (*Account) SdkAddress ¶
func (acc *Account) SdkAddress() sdk.AccAddress
SdkAddress returns accounts's cosmos AccAddress ([]byte)
func (*Account) WithAccountNumber ¶
WithAccountNumber sets accounts's number.
func (*Account) WithChainID ¶
WithChainID sets chain ID of network.
func (*Account) WithSequence ¶
WithSequence sets accounts's sequence (last used nonce).
type Mnemonic ¶
type Mnemonic struct {
// contains filtered or unexported fields
}
Mnemonic contains entropy, seed and mnemonic words array which can be used for hierarchical deterministic extended keys.
func NewMnemonic ¶
NewMnemonic creates a new random (crypto safe) Mnemonic. Use 128 bits for a 12 words code or 256 bits for a 24 words.
func NewMnemonicFromEntropy ¶
NewMnemonicFromEntropy creates a Mnemonic based on a known entropy.
func NewMnemonicFromWords ¶
NewMnemonicFromWords creates a Mnemonic based on a known list of words.