External module: "eosjs-ecc-migration"
Index
Object literals
Object literals
Const
ecc
▪ ecc: object
initialize
▸ initialize(): void
Returns: void
isValidPrivate
▸ isValidPrivate(wif
: string): boolean
Parameters:
Name | Type |
---|---|
wif |
string |
Returns: boolean
isValidPublic
▸ isValidPublic(pubkey
: string, pubkey_prefix?
: string): boolean
Parameters:
Name | Type |
---|---|
pubkey |
string |
pubkey_prefix? |
string |
Returns: boolean
privateToPublic
▸ privateToPublic(key
: string, pubkey_prefix?
: string): string
Parameters:
Name | Type |
---|---|
key |
string |
pubkey_prefix? |
string |
Returns: string
randomKey
▸ randomKey(cpuEntropyBits?
: number, options
: object): Promise‹string›
Parameters:
Name | Type | Default |
---|---|---|
cpuEntropyBits? |
number | - |
options |
object | {} |
Returns: Promise‹string›
recover
▸ recover(signature
: string, data
: string, encoding
: BufferEncoding): string
Parameters:
Name | Type | Default |
---|---|---|
signature |
string | - |
data |
string | - |
encoding |
BufferEncoding | "utf8" |
Returns: string
recoverHash
▸ recoverHash(signature
: string, dataSha256
: string | Buffer, encoding
: BufferEncoding): string
Parameters:
Name | Type | Default |
---|---|---|
signature |
string | - |
dataSha256 |
string | Buffer | - |
encoding |
BufferEncoding | "hex" |
Returns: string
seedPrivate
▸ seedPrivate(): void
Returns: void
sha256
▸ sha256(data
: string | Buffer, resultEncoding?
: string, encoding?
: string): string | Buffer
Parameters:
Name | Type |
---|---|
data |
string | Buffer |
resultEncoding? |
string |
encoding? |
string |
Returns: string | Buffer
sign
▸ sign(data
: string | Buffer, privateKey
: string | PrivateKey, encoding
: BufferEncoding): string
Parameters:
Name | Type | Default |
---|---|---|
data |
string | Buffer | - |
privateKey |
string | PrivateKey | - |
encoding |
BufferEncoding | "utf8" |
Returns: string
signHash
▸ signHash(dataSha256
: string | Buffer, privateKey
: string | PrivateKey, encoding
: BufferEncoding): string
Parameters:
Name | Type | Default |
---|---|---|
dataSha256 |
string | Buffer | - |
privateKey |
string | PrivateKey | - |
encoding |
BufferEncoding | "hex" |
Returns: string
unsafeRandomKey
▸ unsafeRandomKey(): void
Returns: void
verify
▸ verify(signature
: string, data
: string, pubKey
: string | PublicKey, encoding
: BufferEncoding, hashData
: boolean): boolean
Parameters:
Name | Type | Default |
---|---|---|
signature |
string | - |
data |
string | - |
pubKey |
string | PublicKey | - |
encoding |
BufferEncoding | "utf8" |
hashData |
boolean | true |
Returns: boolean