Documentation ¶
Index ¶
- Constants
- func PointFromBytes(data []byte, factory interface{ ... }) (point kyber.Point, err error)
- func PointFromReader(rr *rwutil.Reader, factory interface{ ... }) (point kyber.Point)
- func PointToWriter(ww *rwutil.Writer, point kyber.Point)
- func ScalarFromBytes(data []byte, factory interface{ ... }) (scalar kyber.Scalar, err error)
- func ScalarFromReader(rr *rwutil.Reader, factory interface{ ... }) (scalar kyber.Scalar)
- func ScalarToWriter(ww *rwutil.Writer, scalar kyber.Scalar)
- func SignatureFromBytes(bytes []byte) (result [SignatureSize]byte, err error)
- type KeyPair
- func (k *KeyPair) Address() *iotago.Ed25519Address
- func (k *KeyPair) AddressKeysForEd25519Address(addr *iotago.Ed25519Address) iotago.AddressKeys
- func (k *KeyPair) AsAddressSigner() iotago.AddressSigner
- func (k *KeyPair) GetPrivateKey() *PrivateKey
- func (k *KeyPair) GetPublicKey() *PublicKey
- func (k *KeyPair) IsValid() bool
- func (k *KeyPair) Read(r io.Reader) error
- func (k *KeyPair) Sign(addr iotago.Address, payload []byte) (iotago.Signature, error)
- func (k *KeyPair) SignBytes(data []byte) []byte
- func (k *KeyPair) Verify(message, sig []byte) bool
- func (k *KeyPair) Write(w io.Writer) error
- 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) AsKyberKeyPair() (*key.Pair, error)
- func (pkT *PrivateKey) AsStdKey() ed25519.PrivateKey
- func (pkT *PrivateKey) Clone() *PrivateKey
- func (pkT *PrivateKey) Public() *PublicKey
- func (pkT *PrivateKey) Read(r io.Reader) error
- func (pkT *PrivateKey) Sign(message []byte) []byte
- func (pkT *PrivateKey) String() string
- func (pkT *PrivateKey) Write(w io.Writer) error
- type PublicKey
- func (pkT *PublicKey) AsBytes() []byte
- func (pkT *PublicKey) AsEd25519Address() *iotago.Ed25519Address
- func (pkT *PublicKey) AsKey() PublicKeyKey
- func (pkT *PublicKey) AsKyberPoint() (kyber.Point, error)
- func (pkT *PublicKey) Clone() *PublicKey
- func (pkT *PublicKey) Equals(other *PublicKey) bool
- func (pkT *PublicKey) Read(r io.Reader) error
- func (pkT *PublicKey) String() string
- func (pkT *PublicKey) Verify(message, sig []byte) bool
- func (pkT *PublicKey) Write(w io.Writer) error
- type PublicKeyKey
- type Seed
- type VariantKeyPair
Constants ¶
View Source
const IotaCoinType = uint32(4218)
/ IOTA coin type <https://github.com/satoshilabs/slips/blob/master/slip-0044.md>
View Source
const PrivateKeySize = ed25519.PrivateKeySize
View Source
const PublicKeySize = ed25519.PublicKeySize
View Source
const (
SeedSize = ed25519.SeedSize
)
---
View Source
const ShimmerCoinType = uint32(4219)
/ Shimmer coin type <https://github.com/satoshilabs/slips/blob/master/slip-0044.md>
View Source
const SignatureSize = ed25519.SignatureSize
View Source
const TestnetCoinType = uint32(1)
testnet/alphanet uses COIN_TYPE = 1
Variables ¶
This section is empty.
Functions ¶
func PointFromBytes ¶ added in v1.0.3
func PointFromReader ¶ added in v1.0.3
func PointToWriter ¶ added in v1.0.3
func ScalarFromBytes ¶ added in v1.0.3
func ScalarFromReader ¶ added in v1.0.3
func ScalarToWriter ¶ added in v1.0.3
func SignatureFromBytes ¶
func SignatureFromBytes(bytes []byte) (result [SignatureSize]byte, err error)
Types ¶
type KeyPair ¶
type KeyPair struct {
// contains filtered or unexported fields
}
func KeyPairFromPrivateKey ¶ added in v1.0.3
func KeyPairFromPrivateKey(privateKey *PrivateKey) *KeyPair
func KeyPairFromSeed ¶ added in v1.0.3
func NewKeyPair ¶
func NewKeyPair() *KeyPair
NewKeyPair creates a new key pair with a randomly generated seed
func (*KeyPair) Address ¶
func (k *KeyPair) Address() *iotago.Ed25519Address
func (*KeyPair) AddressKeysForEd25519Address ¶ added in v1.0.3
func (k *KeyPair) AddressKeysForEd25519Address(addr *iotago.Ed25519Address) iotago.AddressKeys
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 PrivateKeyFromBytes ¶ added in v1.0.3
func PrivateKeyFromBytes(privateKeyBytes []byte) (*PrivateKey, error)
func PrivateKeyFromSeed ¶ added in v1.0.3
func PrivateKeyFromSeed(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) AsKyberKeyPair ¶ added in v1.0.3
func (pkT *PrivateKey) AsKyberKeyPair() (*key.Pair, error)
func (*PrivateKey) AsStdKey ¶
func (pkT *PrivateKey) AsStdKey() ed25519.PrivateKey
func (*PrivateKey) Clone ¶ added in v1.0.3
func (pkT *PrivateKey) Clone() *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 PublicKeyFromBytes ¶ added in v1.0.3
func PublicKeyFromString ¶ added in v1.0.3
func (*PublicKey) AsEd25519Address ¶
func (pkT *PublicKey) AsEd25519Address() *iotago.Ed25519Address
func (*PublicKey) AsKey ¶
func (pkT *PublicKey) AsKey() PublicKeyKey
func (*PublicKey) AsKyberPoint ¶ added in v1.0.3
type PublicKeyKey ¶
type PublicKeyKey [PublicKeySize]byte
type Seed ¶
func SeedFromBytes ¶ added in v1.0.3
type VariantKeyPair ¶ added in v1.0.3
type VariantKeyPair interface { GetPublicKey() *PublicKey Address() *iotago.Ed25519Address AsAddressSigner() iotago.AddressSigner AddressKeysForEd25519Address(addr *iotago.Ed25519Address) iotago.AddressKeys SignBytes(data []byte) []byte Sign(addr iotago.Address, msg []byte) (signature iotago.Signature, err error) }
VariantKeyPair originates from cryptolib.KeyPair
Source Files ¶
Click to show internal directories.
Click to hide internal directories.