Alias for the sign_message function, specifically for signing deploy hashes.
This function calls sign_message to sign the provided deploy hash with the
given or active public key.
deploy_hash - The deploy hash string to be signed.public_key - An optional public key string. If None, the active public key is used.Ok(String) - The signature string.Err(JsError) - An error if the signing process fails.Optionalpublic_key: stringSigns a message with the provided or active public key.
This function requests a connection to the wallet, retrieves the public key (either provided or active), signs the message, and returns the signature.
message - The message string to be signed.public_key - An optional public key string. If None, the active public key is used.Ok(String) - The signature string.Err(JsError) - An error if the connection fails, the public key retrieval fails,
the signing fails, or if the signing is cancelled.This function returns a JsError if:
Optionalpublic_key: stringOptionalpublic_key: stringAlias for the sign_message function, specifically for signing transaction hashes.
This function calls sign_message to sign the provided transaction hash with the
given or active public key.
transaction_hash - The transaction hash string to be signed.public_key - An optional public key string. If None, the active public key is used.Ok(String) - The signature string.Err(JsError) - An error if the signing process fails.Optionalpublic_key: string
Signs a deploy with the provided or active public key.
This function requests a connection to the wallet, retrieves the public key (either provided or active), serializes the deploy, signs it, and returns the signed deploy.
Arguments
deploy- The deploy object to be signed.public_key- An optional public key string. IfNone, the active public key is used.Returns
Ok(Deploy)- The signed deploy object.Err(JsError)- An error if the connection fails, the public key retrieval fails, the serialization fails, the signing fails, or if the signing is cancelled.Errors
This function returns a
JsErrorif: