Function
| Static Public Summary | ||
| public |
ECSignature(r: *, s: *) |
|
| public |
HmacSHA256(buffer: *, secret: *): * |
|
| public |
calcPubKeyRecoveryParam(curve: *, e: *, signature: *, Q: *): * Calculate pubkey extraction parameter. |
|
| public |
convert(type: *): * |
|
| public |
deterministicGenerateK(curve: *, hash: *, d: *, checkSig: *, nonce: *): * |
|
| public |
emitter(): * |
|
| public |
enforce(type: *, value: *) |
|
| public |
get(state: *): * |
|
| public |
normalize(brainKey: *): * |
|
| public |
recoverPubKey(curve: *, e: *, signature: *, i: *): * Recover a public key from a signature. |
|
| public |
ripemd160(data: *): * |
|
| public |
set(state: *): * |
|
| public |
|
|
| public |
|
|
| public |
|
|
| public |
sign(curve: *, hash: *, d: *, nonce: *): * |
|
| public |
template(op: *) Console print any transaction object with zero default values. |
|
| public |
verify(curve: *, hash: *, signature: *, Q: *): * |
|
| public |
verifyRaw(curve: *, e: *, signature: *, Q: *): * |
|
Static Public
public ECSignature(r: *, s: *) source
import ECSignature from '@decentrawise/graphenejs/lib/ecc/src/ecsignature.js'Params:
| Name | Type | Attribute | Description |
| r | * | ||
| s | * |
public HmacSHA256(buffer: *, secret: *): * source
import {HmacSHA256} from '@decentrawise/graphenejs/lib/ecc/src/hash.js'Params:
| Name | Type | Attribute | Description |
| buffer | * | ||
| secret | * |
Return:
| * |
public calcPubKeyRecoveryParam(curve: *, e: *, signature: *, Q: *): * source
import {calcPubKeyRecoveryParam} from '@decentrawise/graphenejs/lib/ecc/src/ecdsa.js'Calculate pubkey extraction parameter.
When extracting a pubkey from a signature, we have to distinguish four different cases. Rather than putting this burden on the verifier, Bitcoin includes a 2-bit value with the signature.
This function simply tries all four cases and returns the value that resulted in a successful pubkey recovery.
Params:
| Name | Type | Attribute | Description |
| curve | * | ||
| e | * | ||
| signature | * | ||
| Q | * |
Return:
| * |
public convert(type: *): * source
import convert from '@decentrawise/graphenejs/lib/serializer/src/convert.js'Params:
| Name | Type | Attribute | Description |
| type | * |
Return:
| * |
public deterministicGenerateK(curve: *, hash: *, d: *, checkSig: *, nonce: *): * source
import {deterministicGenerateK} from '@decentrawise/graphenejs/lib/ecc/src/ecdsa.js'Params:
| Name | Type | Attribute | Description |
| curve | * | ||
| hash | * | ||
| d | * | ||
| checkSig | * | ||
| nonce | * |
Return:
| * |
public emitter(): * source
import emitter from '@decentrawise/graphenejs/lib/chain/src/EmitterInstance.js'Return:
| * |
public enforce(type: *, value: *) source
import enforce from '@decentrawise/graphenejs/lib/ecc/src/enforce_types.js'Params:
| Name | Type | Attribute | Description |
| type | * | ||
| value | * |
public get(state: *): * source
import {get} from '@decentrawise/graphenejs/lib/chain/src/state.js'Params:
| Name | Type | Attribute | Description |
| state | * |
Return:
| * |
public normalize(brainKey: *): * source
import normalize from '@decentrawise/graphenejs/lib/ecc/src/BrainKey.js'Params:
| Name | Type | Attribute | Description |
| brainKey | * |
Return:
| * |
public recoverPubKey(curve: *, e: *, signature: *, i: *): * source
import {recoverPubKey} from '@decentrawise/graphenejs/lib/ecc/src/ecdsa.js'Recover a public key from a signature.
See SEC 1: Elliptic Curve Cryptography, section 4.1.6, "Public Key Recovery Operation".
Params:
| Name | Type | Attribute | Description |
| curve | * | ||
| e | * | ||
| signature | * | ||
| i | * |
Return:
| * |
public ripemd160(data: *): * source
import {ripemd160} from '@decentrawise/graphenejs/lib/ecc/src/hash.js'Params:
| Name | Type | Attribute | Description |
| data | * |
Return:
| * |
public set(state: *): * source
import {set} from '@decentrawise/graphenejs/lib/chain/src/state.js'Params:
| Name | Type | Attribute | Description |
| state | * |
Return:
| * |
public sha1(data: *, encoding: *): string | Buffer source
import {sha1} from '@decentrawise/graphenejs/lib/ecc/src/hash.js'Params:
| Name | Type | Attribute | Description |
| data | * | ||
| encoding | * |
public sha256(data: *, encoding: *): string | Buffer source
import {sha256} from '@decentrawise/graphenejs/lib/ecc/src/hash.js'Params:
| Name | Type | Attribute | Description |
| data | * | ||
| encoding | * |
public sha512(data: *, encoding: *): string | Buffer source
import {sha512} from '@decentrawise/graphenejs/lib/ecc/src/hash.js'Params:
| Name | Type | Attribute | Description |
| data | * | ||
| encoding | * |
public sign(curve: *, hash: *, d: *, nonce: *): * source
import {sign} from '@decentrawise/graphenejs/lib/ecc/src/ecdsa.js'Params:
| Name | Type | Attribute | Description |
| curve | * | ||
| hash | * | ||
| d | * | ||
| nonce | * |
Return:
| * |
public template(op: *) source
import template from '@decentrawise/graphenejs/lib/serializer/src/template.js'Console print any transaction object with zero default values.
Params:
| Name | Type | Attribute | Description |
| op | * |
public verify(curve: *, hash: *, signature: *, Q: *): * source
import {verify} from '@decentrawise/graphenejs/lib/ecc/src/ecdsa.js'Params:
| Name | Type | Attribute | Description |
| curve | * | ||
| hash | * | ||
| signature | * | ||
| Q | * |
Return:
| * |
public verifyRaw(curve: *, e: *, signature: *, Q: *): * source
import {verifyRaw} from '@decentrawise/graphenejs/lib/ecc/src/ecdsa.js'Params:
| Name | Type | Attribute | Description |
| curve | * | ||
| e | * | ||
| signature | * | ||
| Q | * |
Return:
| * |
