package ledgerwallet-tezos

  1. Overview
  2. Docs
Ledger wallet library for OCaml: Tezos app

Install

Dune Dependency

Authors

Maintainers

Sources

0.4.1.tar.gz
sha256=d147a3a94679e4d95cc7f98cdf696eda435dcec36ccf7a9759eeb9bdfb9e6b9d
sha512=cc81784f5bea5af3608ab1cc0b38e4ebc9cb35d01077e844e7d7022ca84b7f5c294c00c84e4ddad1b08c7cdaf0aa1b76bebde59045ed88d6fdf7b9868d884bc4

doc/ledgerwallet-tezos/Ledgerwallet_tezos/index.html

Module Ledgerwallet_tezosSource

Sourcemodule Version : sig ... end
Sourcetype curve =
  1. | Ed25519
  2. | Secp256k1
  3. | Secp256r1
  4. | Bip32_ed25519
Sourceval curve_of_string : string -> curve option
Sourceval pp_curve : Format.formatter -> curve -> unit
Sourceval pp_curve_short : Format.formatter -> curve -> unit

get_version ?pp ?buf ledger is the version information of the Ledger app running at ledger.

Sourceval get_git_commit : ?pp:Format.formatter -> ?buf:Cstruct.t -> Ledgerwallet.Transport.t -> (string, Ledgerwallet.Transport.error) result Lwt.t

get_git_commit ?pp ?buf ledger is the git commit information of the Ledger app running at ledger.

Sourceval get_authorized_key : ?pp:Format.formatter -> ?buf:Cstruct.t -> Ledgerwallet.Transport.t -> (int32 list, Ledgerwallet.Transport.error) result Lwt.t

get_authorized_key ?pp ?buf ledger is the BIP32 path of the key authorized to bake on the Ledger app running at ledger.

Sourceval get_authorized_path_and_curve : ?pp:Format.formatter -> ?buf:Cstruct.t -> Ledgerwallet.Transport.t -> (int32 list * curve, Ledgerwallet.Transport.error) result Lwt.t

get_authorized_path_and_curve ?pp ?buf ledger is the BIP32 path and the curve code of the key authorized to bake on the Ledger app running at ledger.

Sourceval get_public_key : ?prompt:bool -> ?pp:Format.formatter -> ?buf:Cstruct.t -> Ledgerwallet.Transport.t -> curve -> int32 list -> (Cstruct.t, Ledgerwallet.Transport.error) result Lwt.t

get_public_key ?pp ?buf ?prompt ledger curve path is 0x02 || pk from ledger at path for curve curve. If prompt is true (the default), then a prompt on Ledger screen will ask user confirmation.

Sourceval authorize_baking : ?pp:Format.formatter -> ?buf:Cstruct.t -> Ledgerwallet.Transport.t -> curve -> int32 list -> (Cstruct.t, Ledgerwallet.Transport.error) result Lwt.t

authorize_baking ?pp ?buf ?prompt ledger curve path is like get_public_key with prompt = true, but only works with the baking Ledger application and serves to indicate that the key from curve at path is allowed to bake.

This is deprecated as it ignores test-chains, see setup_baking.

Sourceval setup_baking : ?pp:Format.formatter -> ?buf:Cstruct.t -> Ledgerwallet.Transport.t -> main_chain_id:string -> main_hwm:int32 -> test_hwm:int32 -> curve -> int32 list -> (Cstruct.t, Ledgerwallet.Transport.error) result Lwt.t

setup_baking ?pp ?buf ?prompt ledger ~main_chain_id ~main_hwm ~test_hwm curve path sets up the Ledger's Baking application: it informs the device of the ID of the main chain (should be of length 4), sets the high watermarks for the main and test chains, and indicates that the key at the given curve/path is authorized for baking.

Sourceval deauthorize_baking : ?pp:Format.formatter -> ?buf:Cstruct.t -> Ledgerwallet.Transport.t -> (unit, Ledgerwallet.Transport.error) result Lwt.t

deauthorize_baking ?pp ?buf ledger deauthorizes the Ledger's Baking application from baking for any address.

Sourceval get_high_watermark : ?pp:Format.formatter -> ?buf:Cstruct.t -> Ledgerwallet.Transport.t -> (int32 * int32 option, Ledgerwallet.Transport.error) result Lwt.t

get_high_watermark ?pp ?buf ledger is the current value of the high water mark for the main-chain on ledger. This works with the baking app only. See get_all_high_watermarks for a more complete query.

Sourceval get_all_high_watermarks : ?pp:Format.formatter -> ?buf:Cstruct.t -> Ledgerwallet.Transport.t -> ([ `Main_hwm of int32 * int32 option ] * [ `Test_hwm of int32 * int32 option ] * [ `Chain_id of string ], Ledgerwallet.Transport.error) result Lwt.t

Query the high water marks for the main and test chains, as well as the ID of the main-chain (string of length 4) recorded by the Ledger Baking app.

Sourceval set_high_watermark : ?pp:Format.formatter -> ?buf:Cstruct.t -> Ledgerwallet.Transport.t -> int32 -> (unit, Ledgerwallet.Transport.error) result Lwt.t

set_high_watermark ?pp ?buf ledger hwm reset the high water mark on ledger to hwm for the main-chain. This works with the baking app only. Use setup_baking to be able to also reset all the test-chain water mark.

Sourceval sign : ?pp:Format.formatter -> ?buf:Cstruct.t -> ?hash_on_ledger:bool -> Ledgerwallet.Transport.t -> curve -> int32 list -> Cstruct.t -> (Cstruct.t, Ledgerwallet.Transport.error) result Lwt.t

sign ?pp ?buf ?hash_on_ledger h curve path payload is the signature of payload (or its hash if hash_on_ledger is true, the default), signed on ledger with key from curve curve at path.

Sourceval get_deterministic_nonce : ?pp:Format.formatter -> ?buf:Cstruct.t -> Ledgerwallet.Transport.t -> curve -> int32 list -> Cstruct.t -> (Cstruct.t, Ledgerwallet.Transport.error) result Lwt.t

get_deterministic_nonce ?pp ?buf h curve path payload asks the ledger for a deterministic nonce from a some given bytes (using HMAC).

Sourceval sign_and_hash : ?pp:Format.formatter -> ?buf:Cstruct.t -> Ledgerwallet.Transport.t -> curve -> int32 list -> Cstruct.t -> (Cstruct.t * Cstruct.t, Ledgerwallet.Transport.error) result Lwt.t

sign ?pp ?buf ?hash_on_ledger h curve path payload is the signature of payload (or its hash if hash_on_ledger is true, the default), signed on ledger with key from curve curve at path.

OCaml

Innovation. Community. Security.