privateKey
.
Parameter | Type |
---|---|
privateKey | BytesLike |
SigningKey
0x02
or 0x03
and be 68 characters long (the 0x
prefix and 33
hexadecimal nibbles)
string
string
0x04
and be 132 characters long (the 0x
prefix and 130 hexadecimal
nibbles).
string
other
key.
The other
key may be any type of key, a raw public key, a compressed/uncompressed pubic key or aprivate key.
Best practice is usually to use a cryptographic hash on the returned value before using it as a symetric secret.
Parameter | Type | Description |
---|---|---|
other | BytesLike | The other key to compute the shared secret with. |
string
The shared secret.
digest
.
Parameter | Type | Description |
---|---|---|
digest | BytesLike | The data to sign. |
Signature
The signature of the data.
p0
and p1
.
This is not a common function most developers should require, but can be useful for certain privacy-specific
techniques.
For example, it is used by QuaiHDWallet to compute child addresses from parent
public keys and chain codes.
Parameter | Type | Description |
---|---|---|
p0 | BytesLike | The first point to add. |
p1 | BytesLike | The second point to add. |
compressed ? | boolean | Whether to return the compressed public key. |
string
The sum of the points.
key
, optionally compressed
.
The key
may be any type of key, a raw public key, a compressed/uncompressed public key or private key.
Parameter | Type | Description |
---|---|---|
key | BytesLike | The key to compute the public key for. |
compressed ? | boolean | Whether to return the compressed public key. |
string
The public key.
signature
for the given digest
.
Parameter | Type | Description |
---|---|---|
digest | BytesLike | The data that was signed. |
signature | SignatureLike | The signature of the data. |
string
The public key.