Tezt_mavryk.Account
This type is used to construct values for secret keys.
Note: The tests only use unencrypted keys for the moment, please add new constructors for other keys here, as needed.
Keys associated to an account. For example:
{
alias = "bootstrap1";
public_key_hash = "mv18Cw7psUrAAPBpXYd9CtCpHg9EgjHP9KTe";
public_key = "edpkuBknW28nW72KG6RoHtYW7p12T6GKc7nAbwYX5m8Wd9sDVC9yav";
secret_key =
Unencrypted "edsk3gUfUPyBSfrS9CCgmCiQsTCHGkviBDusMxDJstFtojtc1zcpsh";
}
val key_typ : key Tezt_wrapper.Check.typ
A Check.typ
for key
type aggregate_key = {
aggregate_alias : string;
aggregate_public_key_hash : string;
aggregate_public_key : string;
aggregate_secret_key : secret_key;
}
Keys associated to an aggregatable account. For example:
{
aggregate_alias = "bls_account";
aggregate_public_key_hash = "mv4RwHB4ZpuqBcozs7wprFS9gzk2Hr6oVfz3";
aggregate_public_key =
"BLpk1yUiLJ7RezbyViD5ZvWTfQndM3TRRYmvYWkUfH2EJqsLFnzzvpJss6pbuz3U1DDMpk8v16nV";
aggregate_secret_key =
Unencrypted "BLsk1hKAHyGqY9qRbgoSVnjiSmDWpKGjFF3WNQ7BaiaMUA6RMA6Pfq";
}
val sign_bytes :
watermark:Mavryk_crypto.Signature.watermark ->
signer:key ->
bytes ->
Mavryk_crypto.Signature.t
sign_bytes ~watermark ~signer message
signs the bytes message
with signer
's secret key. Returns the corresponding Mavryk signature. This function can be used to sign transactions, blocks, etc. depending on the given watermark
.
Used for regular accounts.
val require_unencrypted_secret_key : __LOC__:string -> secret_key -> string
require_unencrypted_secret_key ~__LOC__ key
returns sk
if key
is Unencrypted sk
, or fails.
val uri_of_secret_key : secret_key -> string
uri_of_secret_key secret_key
returns secret_key
as an URI.
The URI of a secret key is its contents prefixed unencrypted:
respectively encrypted:
if it is unencrypted respetively encrypted.
val secret_key_typ : secret_key Tezt_wrapper.Check.typ
A Check.typ
for secret_key
val write : key list -> base_dir:string -> unit
write keys ~base_dir
writes the keys into the mavkit-client
's data directory base_dir
. This function has the same effect as importing all the keys manually via mavkit-client
but is faster.
module Bootstrap : sig ... end
val parse_client_output : alias:string -> client_output:string -> key
parse_client_output ~alias ~client_output
extracts keys from clients output that yields result of the form
Hash: mv18Cw7psUrAAPBpXYd9CtCpHg9EgjHP9KTe Public Key: edpkuBknW28nW72KG6RoHtYW7p12T6GKc7nAbwYX5m8Wd9sDVC9yav Secret Key: unencrypted:edsk3gUfUPyBSfrS9CCgmCiQsTCHGkviBDusMxDJstFtojtc1zcpsh
and returns the corresponding key.
val parse_client_output_aggregate :
alias:string ->
client_output:string ->
aggregate_key
parse_client_output_aggregate ~alias ~client_output
extracts keys from clients output that yields result of the form
Hash: mv4RwHB4ZpuqBcozs7wprFS9gzk2Hr6oVfz3 Public Key: BLpk1yUiLJ7RezbyViD5ZvWTfQndM3TRRYmvYWkUfH2EJqsLFnzzvpJss6pbuz3U1DDMpk8v16nV Secret Key: aggregate_unencrypted:BLsk1hKAHyGqY9qRbgoSVnjiSmDWpKGjFF3WNQ7BaiaMUA6RMA6Pfq
and returns the corresponding key.