Namespace: weierstrass
ec.weierstrass
Interfaces​
Type Aliases​
AffinePoint​
Ƭ AffinePoint<T
>: { x
: T
; y
: T
} & { z?
: never
; t?
: never
}
Type parameters​
Name |
---|
T |
Defined in​
node_modules/@noble/curves/abstract/curve.d.ts:3
BasicWCurve​
Ƭ BasicWCurve<T
>: BasicCurve
<T
> & { a
: T
; b
: T
; allowedPrivateKeyLengths?
: readonly number
[] ; wrapPrivateKey?
: boolean
; endo?
: EndomorphismOpts
; isTorsionFree?
: (c
: ProjConstructor
<T
>, point
: ProjPointType
<T
>) => boolean
; clearCofactor?
: (c
: ProjConstructor
<T
>, point
: ProjPointType
<T
>) => ProjPointType
<T
> }
Type parameters​
Name |
---|
T |
Defined in​
node_modules/@noble/curves/abstract/weierstrass.d.ts:17
SignOpts​
Ƭ SignOpts: Object
Type declaration​
Name | Type |
---|---|
lowS? | boolean |
extraEntropy? | Entropy |
prehash? | boolean |
Defined in​
node_modules/@noble/curves/abstract/weierstrass.d.ts:27
VerOpts​
Ƭ VerOpts: Object
Type declaration​
Name | Type |
---|---|
lowS? | boolean |
prehash? | boolean |
Defined in​
node_modules/@noble/curves/abstract/weierstrass.d.ts:32
CurvePointsType​
Ƭ CurvePointsType<T
>: BasicWCurve
<T
> & { fromBytes?
: (bytes
: Uint8Array
) => AffinePoint
<T
> ; toBytes?
: (c
: ProjConstructor
<T
>, point
: ProjPointType
<T
>, isCompressed
: boolean
) => Uint8Array
}
Type parameters​
Name |
---|
T |
Defined in​
node_modules/@noble/curves/abstract/weierstrass.d.ts:82
CurvePointsRes​
Ƭ CurvePointsRes<T
>: Object
Type parameters​
Name |
---|
T |
Type declaration​
Name | Type |
---|---|
ProjectivePoint | ProjConstructor <T > |
normPrivateKeyToScalar | (key : PrivKey ) => bigint |
weierstrassEquation | (x : T ) => T |
isWithinCurveOrder | (num : bigint ) => boolean |
Defined in​
node_modules/@noble/curves/abstract/weierstrass.d.ts:86
SignatureConstructor​
Ƭ SignatureConstructor: Object
Call signature​
• new SignatureConstructor(r
, s
): SignatureType
Parameters​
Name | Type |
---|---|
r | bigint |
s | bigint |
Returns​
Type declaration​
Name | Type |
---|---|
fromCompact | (hex : Hex ) => SignatureType |
fromDER | (hex : Hex ) => SignatureType |
Defined in​
node_modules/@noble/curves/abstract/weierstrass.d.ts:154
PubKey​
Ƭ PubKey: Hex
| ProjPointType
<bigint
>
Defined in​
node_modules/@noble/curves/abstract/weierstrass.d.ts:163
CurveType​
Ƭ CurveType: BasicWCurve
<bigint
> & { hash
: CHash
; hmac
: HmacFnSync
; randomBytes
: (bytesLength?
: number
) => Uint8Array
; lowS?
: boolean
; bits2int?
: (bytes
: Uint8Array
) => bigint
; bits2int_modN?
: (bytes
: Uint8Array
) => bigint
}
Defined in​
node_modules/@noble/curves/abstract/weierstrass.d.ts:164
CurveFn​
Ƭ CurveFn: Object
Type declaration​
Name | Type |
---|---|
CURVE | ReturnType <typeof validateOpts > |
getPublicKey | (privateKey : PrivKey , isCompressed? : boolean ) => Uint8Array |
getSharedSecret | (privateA : PrivKey , publicB : Hex , isCompressed? : boolean ) => Uint8Array |
sign | (msgHash : Hex , privKey : PrivKey , opts? : SignOpts ) => SignatureType |
verify | (signature : Hex | SignatureLike , msgHash : Hex , publicKey : Hex , opts? : VerOpts ) => boolean |
ProjectivePoint | ProjConstructor <bigint > |
Signature | SignatureConstructor |
utils | { normPrivateKeyToScalar : (key : PrivKey ) => bigint ; randomPrivateKey : () => Uint8Array ; precompute : (windowSize? : number , point? : ProjPointType <bigint >) => ProjPointType <bigint > ; isValidPrivateKey : (privateKey : PrivKey ) => boolean } |
utils.normPrivateKeyToScalar | (key : PrivKey ) => bigint |
utils.randomPrivateKey | () => Uint8Array |
utils.precompute | (windowSize? : number , point? : ProjPointType <bigint >) => ProjPointType <bigint > |
utils.isValidPrivateKey | [object Object] |
Defined in​
node_modules/@noble/curves/abstract/weierstrass.d.ts:197
Variables​
DER​
• Const
DER: Object
Type declaration​
Name | Type |
---|---|
Err | (m? : string ) => { name : string ; message : string ; stack? : string } |
_parseInt | (data : Uint8Array ) => { d : bigint ; l : Uint8Array } |
toSig | (hex : string | Uint8Array ) => { r : bigint ; s : bigint } |
hexFromSig | (sig : { r : bigint ; s : bigint }) => string |
Defined in​
node_modules/@noble/curves/abstract/weierstrass.d.ts:92
Functions​
weierstrassPoints​
â–¸ weierstrassPoints<T
>(opts
): Object
Type parameters​
Name |
---|
T |
Parameters​
Name | Type |
---|---|
opts | CurvePointsType <T > |
Returns​
Object
Name | Type |
---|---|
CURVE | Readonly <{ nBitLength : number ; nByteLength : number ; Fp : mod.IField <T > ; n : bigint ; h : bigint ; hEff? : bigint ; Gx : T ; Gy : T ; allowInfinityPoint? : boolean ; a : T ; b : T ; allowedPrivateKeyLengths? : readonly number [] ; wrapPrivateKey? : boolean ; endo? : EndomorphismOpts ; isTorsionFree? : (c : ProjConstructor <T >, point : ProjPointType <T >) => boolean ; clearCofactor? : (c : ProjConstructor <T >, point : ProjPointType <T >) => ProjPointType <T > ; fromBytes? : (bytes : Uint8Array ) => AffinePoint <T > ; toBytes? : (c : ProjConstructor <T >, point : ProjPointType <T >, isCompressed : boolean ) => Uint8Array ; p : bigint }> |
ProjectivePoint | ProjConstructor <T > |
normPrivateKeyToScalar | (key : PrivKey ) => bigint |
weierstrassEquation | (x : T ) => T |
isWithinCurveOrder | (num : bigint ) => boolean |
Defined in​
node_modules/@noble/curves/abstract/weierstrass.d.ts:113
weierstrass​
â–¸ weierstrass(curveDef
): CurveFn
Parameters​
Name | Type |
---|---|
curveDef | CurveType |
Returns​
Defined in​
node_modules/@noble/curves/abstract/weierstrass.d.ts:212
SWUFpSqrtRatio​
â–¸ SWUFpSqrtRatio<T
>(Fp
, Z
): (u
: T
, v
: T
) => { isValid
: boolean
; value
: T
}
Type parameters​
Name |
---|
T |
Parameters​
Name | Type |
---|---|
Fp | IField <T > |
Z | T |
Returns​
fn
â–¸ (u
, v
): Object
Parameters​
Name | Type |
---|---|
u | T |
v | T |
Returns​
Object
Name | Type |
---|---|
isValid | boolean |
value | T |
Defined in​
node_modules/@noble/curves/abstract/weierstrass.d.ts:213
mapToCurveSimpleSWU​
â–¸ mapToCurveSimpleSWU<T
>(Fp
, opts
): (u
: T
) => { x
: T
; y
: T
}
Type parameters​
Name |
---|
T |
Parameters​
Name | Type |
---|---|
Fp | IField <T > |
opts | Object |
opts.A | T |
opts.B | T |
opts.Z | T |
Returns​
fn
â–¸ (u
): Object
Parameters​
Name | Type |
---|---|
u | T |
Returns​
Object
Name | Type |
---|---|
x | T |
y | T |
Defined in​
node_modules/@noble/curves/abstract/weierstrass.d.ts:217