Skip to main content

Ed25519PublicKey

type Ed25519PublicKey

An ed25519 public key.

BCS

The BCS serialized form for this type is defined by the following ABNF:

```text ed25519-public-key = 32OCTET ```

type Ed25519PublicKey struct {
// contains filtered or unexported fields
}

func Ed25519PublicKeyFromBcs

func Ed25519PublicKeyFromBcs(bcs []byte) (*Ed25519PublicKey, error)

Create this type from BCS encoded bytes.

func Ed25519PublicKeyFromBytes

func Ed25519PublicKeyFromBytes(bytes []byte) (*Ed25519PublicKey, error)

func Ed25519PublicKeyFromJson

func Ed25519PublicKeyFromJson(json string) (*Ed25519PublicKey, error)

Create this type from JSON encoded string.

func Ed25519PublicKeyFromStr

func Ed25519PublicKeyFromStr(s string) (*Ed25519PublicKey, error)

func Ed25519PublicKeyRandom

func Ed25519PublicKeyRandom() *Ed25519PublicKey

func LiftFromExternalEd25519PublicKey

func LiftFromExternalEd25519PublicKey(handle uint64) *Ed25519PublicKey

func (*Ed25519PublicKey) DeriveAddress

func (_self *Ed25519PublicKey) DeriveAddress() *Address

Derive an `Address` from this Public Key

An `Address` can be derived from an `Ed25519PublicKey` by hashing the bytes of the public key with no prefix flag.

`hash(32-byte ed25519 public key)`

func (*Ed25519PublicKey) Destroy

func (object *Ed25519PublicKey) Destroy()

func (*Ed25519PublicKey) Eq

func (_self *Ed25519PublicKey) Eq(other *Ed25519PublicKey) bool

func (*Ed25519PublicKey) Hash

func (_self *Ed25519PublicKey) Hash() uint64

func (*Ed25519PublicKey) Ne

func (_self *Ed25519PublicKey) Ne(other *Ed25519PublicKey) bool

func (*Ed25519PublicKey) Scheme

func (_self *Ed25519PublicKey) Scheme() SignatureScheme

Returns the signature scheme for this public key.

func (*Ed25519PublicKey) ToBytes

func (_self *Ed25519PublicKey) ToBytes() []byte

func (*Ed25519PublicKey) ToFlaggedBytes

func (_self *Ed25519PublicKey) ToFlaggedBytes() []byte

Returns the bytes with signature scheme flag prepended.