Documentation ¶
Index ¶
- Constants
- func AddressToAccountId(address string) (result xdr.AccountId, err error)
- func GenerateKeyFromRawSeed(rawSeed RawSeed) (publicKey PublicKey, privateKey PrivateKey, err error)
- func GenerateKeyFromSeed(seed string) (publicKey PublicKey, privateKey PrivateKey, err error)
- func GenerateRandomKey() (publicKey PublicKey, privateKey PrivateKey, err error)
- func Hash(message []byte) [32]byte
- type PrivateKey
- func (privateKey *PrivateKey) Address() string
- func (privateKey *PrivateKey) Hint() [4]byte
- func (privateKey *PrivateKey) KeyData() [ed25519.PrivateKeySize]byte
- func (privateKey *PrivateKey) PublicKey() PublicKey
- func (privateKey *PrivateKey) Seed() string
- func (privateKey *PrivateKey) Sign(message []byte) Signature
- type PublicKey
- type RawSeed
- type Signature
- type Signer
- type Verifier
Constants ¶
const One = 10000000
One is the value of one whole unit of currency. Stellar uses 7 fixed digits for fractional values, thus One is 10 million (10^7)
const RawSeedSize = 32
RawSeedSize is 32 bytes, the size of a raw (i.e. not encoded as a strkey) ed25519 seed
Variables ¶
This section is empty.
Functions ¶
func AddressToAccountId ¶
AddressToAccountId converts the provided address into a xdr.AccountId
func GenerateKeyFromRawSeed ¶
func GenerateKeyFromRawSeed(rawSeed RawSeed) (publicKey PublicKey, privateKey PrivateKey, err error)
func GenerateKeyFromSeed ¶
func GenerateKeyFromSeed(seed string) (publicKey PublicKey, privateKey PrivateKey, err error)
func GenerateRandomKey ¶
func GenerateRandomKey() (publicKey PublicKey, privateKey PrivateKey, err error)
Types ¶
type PrivateKey ¶
type PrivateKey struct {
// contains filtered or unexported fields
}
PrivateKey is the type representing an ed25519 private key, as used by the stellar network
func (*PrivateKey) Address ¶
func (privateKey *PrivateKey) Address() string
Address returns the StrKey encoded form of the PublicKey associated with this PrivateKey.
func (*PrivateKey) Hint ¶
func (privateKey *PrivateKey) Hint() [4]byte
func (*PrivateKey) KeyData ¶
func (privateKey *PrivateKey) KeyData() [ed25519.PrivateKeySize]byte
KeyData returns the raw key data
func (*PrivateKey) PublicKey ¶
func (privateKey *PrivateKey) PublicKey() PublicKey
PublicKey returns the raw ed25519 public key for this PrivateKey
func (*PrivateKey) Seed ¶
func (privateKey *PrivateKey) Seed() string
Seed returns the strkey encoded Seed for this PrivateKey
func (*PrivateKey) Sign ¶
func (privateKey *PrivateKey) Sign(message []byte) Signature
type PublicKey ¶
type PublicKey struct {
// contains filtered or unexported fields
}
PublicKey is the type representing an ed25519 privpublicate key, as used by the stellar network
type RawSeed ¶
type RawSeed [RawSeedSize]byte
RawSeed is a ed25519 seed value
func NewRawSeed ¶
NewRawSeed convertes the provided byte slice into a RawSeed, after confirming it is compatible.
Directories ¶
Path | Synopsis |
---|---|
Package amount provides utilities for converting numbers to/from the format used internally to stellar-core.
|
Package amount provides utilities for converting numbers to/from the format used internally to stellar-core. |
Package build provides a builder system for constructing various xdr structures used by the stellar network.
|
Package build provides a builder system for constructing various xdr structures used by the stellar network. |
cmd
|
|
stellar-sign
stellar-sign is a small interactive utility to help you contribute a signature to a transaction envelope.
|
stellar-sign is a small interactive utility to help you contribute a signature to a transaction envelope. |
Package crc16 is implementation according to CCITT standards.
|
Package crc16 is implementation according to CCITT standards. |
Package strkey is an implementation of StrKey, the address scheme for the StellarNetwork.
|
Package strkey is an implementation of StrKey, the address scheme for the StellarNetwork. |
Package xdr contains the generated code for parsing the xdr structures used for stellar.
|
Package xdr contains the generated code for parsing the xdr structures used for stellar. |