new HpAdminKeypair(hc_public_key_string, email, password) → {HpAdminKeypair}
Create an Ed25519 keypair for API signing calls to HPOS
Parameters:
Name | Type | Description |
---|---|---|
hc_public_key_string |
string | |
email |
string | |
password |
string |
- Source:
Returns:
- Type
- HpAdminKeypair
Example
myKeys = new HpAdminKeypair( hc_public_key_string, email, password );
Classes
Methods
sign(payload) → {string}
Sign payload and return base64 encoded signature. Requires properly formatted payload (see example)
Parameters:
Name | Type | Description |
---|---|---|
payload |
any |
- Source:
Returns:
- Type
- string
Example
myKeys = new HpAdminKeypair( hc_public_key_string, email, password );
const payload = {
method: \"get\", // String
request: \"/someuri\", // String
body: \"/somebody\" // String || undefined
}
myKeys.sign( payload );