Documentation ¶
Index ¶
- Constants
- Variables
- type App
- func (t *App) DeauthorizeBaking() error
- func (t *App) GetHighWatermark() (uint32, error)
- func (t *App) GetHighWatermarks() (*HWM, error)
- func (t *App) GetPublicKey(derivation DerivationType, path BIP32, prompt bool) (pub crypt.PublicKey, err error)
- func (t *App) GetVersion() (*Version, error)
- func (t *App) SetHighWatermark(hwm uint32) error
- func (t *App) SetupBaking(hwm *HWM, derivation DerivationType, path BIP32) (pub crypt.PublicKey, err error)
- func (t *App) Sign(derivation DerivationType, path BIP32, data []byte) (sig crypt.Signature, err error)
- type BIP32
- type DerivationType
- type HWM
- type TezosError
- type Version
Constants ¶
View Source
const ( AppTezos = 0 AppTezBake = 1 )
Tezos application types
View Source
const BIP32H = (1 << 31)
BIP32H bit mask is set for so called hardened derivation
Variables ¶
View Source
var TezosBIP32Root = BIP32{44 | BIP32H, 1729 | BIP32H}
TezosBIP32Root is a Tezos BIP32 root key path i.e. 44'/1729'
Functions ¶
This section is empty.
Types ¶
type App ¶
App represents Tezos application client
func (*App) DeauthorizeBaking ¶
func (*App) GetHighWatermark ¶
func (*App) GetHighWatermarks ¶
func (*App) GetPublicKey ¶
func (t *App) GetPublicKey(derivation DerivationType, path BIP32, prompt bool) (pub crypt.PublicKey, err error)
GetPublicKey returns a public key for a newly derived pair
func (*App) GetVersion ¶
GetVersion returns Tezos app version
func (*App) SetHighWatermark ¶
func (*App) SetupBaking ¶
type BIP32 ¶
type BIP32 []uint32
BIP32 represents BIP32 path
func BIP32FromBytes ¶
BIP32FromBytes parses serialized BIP32 into a binary representation
func ParseBIP32 ¶
ParseBIP32 parses BIP32 string into a binary representation
type DerivationType ¶
type DerivationType uint8
DerivationType represents key derivation method and determines the curve to use
const ( DerivationED25519 DerivationType = iota // ED25519 DerivationSECP256K1 // SECP256K1 DerivationSECP256R1 // SECP256R1 aka P256 DerivationBIP32ED25519 // BIP32-ED25519 DerivationP256 = DerivationSECP256R1 // SECP256R1 aka P256 DerivationInvalid DerivationType = 0xff )
func DerivationTypeFromString ¶
func DerivationTypeFromString(str string) (DerivationType, error)
DerivationTypeFromString returns a derivation type id for specified name
func (DerivationType) String ¶
func (d DerivationType) String() string
type TezosError ¶
type TezosError uint16
TezosError represents the Tezos specific subset of APDU status codes
func (TezosError) Error ¶
func (l TezosError) Error() string
Click to show internal directories.
Click to hide internal directories.