Documentation ¶
Index ¶
- Constants
- func SignatureFromBytes(bytes []byte) (result [SignatureSize]byte, consumedBytes int, err error)
- type KeyPair
- type PrivateKey
- func (pkT *PrivateKey) AddressKeys(addr iotago.Address) iotago.AddressKeys
- func (pkT *PrivateKey) AddressKeysForEd25519Address(addr *iotago.Ed25519Address) iotago.AddressKeys
- func (pkT *PrivateKey) AsBytes() []byte
- func (pkT *PrivateKey) AsStdKey() ed25519.PrivateKey
- func (pkT *PrivateKey) Public() *PublicKey
- func (pkT *PrivateKey) Sign(message []byte) []byte
- func (pkT *PrivateKey) String() string
- type PublicKey
- type PublicKeyKey
- type Seed
Constants ¶
View Source
const PrivateKeySize = ed25519.PrivateKeySize
View Source
const PublicKeySize = ed25519.PublicKeySize
View Source
const (
SeedSize = ed25519.SeedSize
)
View Source
const (
SignatureSize = ed25519.SignatureSize
)
Variables ¶
This section is empty.
Functions ¶
func SignatureFromBytes ¶
func SignatureFromBytes(bytes []byte) (result [SignatureSize]byte, consumedBytes int, err error)
Types ¶
type KeyPair ¶
type KeyPair struct {
// contains filtered or unexported fields
}
func NewKeyPair ¶
func NewKeyPair() *KeyPair
NewKeyPair creates a new key pair with a randomly generated seed
func NewKeyPairFromPrivateKey ¶
func NewKeyPairFromPrivateKey(privateKey *PrivateKey) *KeyPair
func NewKeyPairFromSeed ¶
func (*KeyPair) Address ¶
func (k *KeyPair) Address() *iotago.Ed25519Address
func (*KeyPair) AsAddressSigner ¶
func (k *KeyPair) AsAddressSigner() iotago.AddressSigner
func (*KeyPair) GetPrivateKey ¶
func (k *KeyPair) GetPrivateKey() *PrivateKey
func (*KeyPair) GetPublicKey ¶
type PrivateKey ¶
type PrivateKey struct {
// contains filtered or unexported fields
}
func NewPrivateKey ¶
func NewPrivateKey() *PrivateKey
func NewPrivateKeyFromBytes ¶
func NewPrivateKeyFromBytes(privateKeyBytes []byte) (*PrivateKey, error)
func NewPrivateKeyFromSeed ¶
func NewPrivateKeyFromSeed(seed Seed) *PrivateKey
func (*PrivateKey) AddressKeys ¶
func (pkT *PrivateKey) AddressKeys(addr iotago.Address) iotago.AddressKeys
func (*PrivateKey) AddressKeysForEd25519Address ¶
func (pkT *PrivateKey) AddressKeysForEd25519Address(addr *iotago.Ed25519Address) iotago.AddressKeys
func (*PrivateKey) AsBytes ¶
func (pkT *PrivateKey) AsBytes() []byte
func (*PrivateKey) AsStdKey ¶
func (pkT *PrivateKey) AsStdKey() ed25519.PrivateKey
func (*PrivateKey) Public ¶
func (pkT *PrivateKey) Public() *PublicKey
func (*PrivateKey) Sign ¶
func (pkT *PrivateKey) Sign(message []byte) []byte
func (*PrivateKey) String ¶
func (pkT *PrivateKey) String() string
type PublicKey ¶
type PublicKey struct {
// contains filtered or unexported fields
}
func NewEmptyPublicKey ¶
func NewEmptyPublicKey() *PublicKey
func NewPublicKeyFromBase58String ¶
TODO this should be deprecated. just use Hex everywhere
func NewPublicKeyFromBytes ¶
func NewPublicKeyFromString ¶
func (*PublicKey) AsEd25519Address ¶
func (pkT *PublicKey) AsEd25519Address() *iotago.Ed25519Address
func (*PublicKey) AsKey ¶
func (pkT *PublicKey) AsKey() PublicKeyKey
type PublicKeyKey ¶
type PublicKeyKey [PublicKeySize]byte
Click to show internal directories.
Click to hide internal directories.