Skip to main content
Version: Next

Namespace: starkCurve

ec.starkCurve

Namespaces​

Type Aliases​

ProjectivePoint​

Ζ¬ ProjectivePoint: ProjPointType<bigint>

Defined in​

node_modules/@scure/starknet/lib/index.d.ts:6

node_modules/@scure/starknet/lib/index.d.ts:45


PoseidonOpts​

Ζ¬ PoseidonOpts: Object

Type declaration​

NameType
FpIField<bigint>
ratenumber
capacitynumber
roundsFullnumber
roundsPartialnumber

Defined in​

node_modules/@scure/starknet/lib/index.d.ts:62


PoseidonFn​

Ζ¬ PoseidonFn: ReturnType<typeof poseidon> & { m: number ; rate: number ; capacity: number }

Defined in​

node_modules/@scure/starknet/lib/index.d.ts:69

Variables​

MAX_VALUE​

β€’ Const MAX_VALUE: bigint

Defined in​

node_modules/@scure/starknet/lib/index.d.ts:7


_starkCurve​

β€’ Const _starkCurve: weierstrass

Defined in​

node_modules/@scure/starknet/lib/index.d.ts:8


CURVE​

β€’ Const CURVE: Readonly<{ nBitLength: number ; nByteLength: number ; Fp: IField<bigint> ; n: bigint ; h: bigint ; hEff?: bigint ; Gx: bigint ; Gy: bigint ; allowInfinityPoint?: boolean ; a: bigint ; b: bigint ; allowedPrivateKeyLengths?: readonly number[] ; wrapPrivateKey?: boolean ; endo?: { beta: bigint ; splitScalar: (k: bigint) => { k1neg: boolean ; k1: bigint ; k2neg: boolean ; k2: bigint } } ; isTorsionFree?: (c: weierstrass, point: ProjPointType<bigint>) => boolean ; clearCofactor?: (c: weierstrass, point: ProjPointType<bigint>) => ProjPointType<bigint> ; hash: u.CHash ; hmac: (key: Uint8Array, ...messages: Uint8Array[]) => Uint8Array ; randomBytes: (bytesLength?: number) => Uint8Array ; lowS: boolean ; bits2int?: (bytes: Uint8Array) => bigint ; bits2int_modN?: (bytes: Uint8Array) => bigint ; p: bigint }>

Defined in​

node_modules/@scure/starknet/lib/index.d.ts:13


ProjectivePoint​

β€’ ProjectivePoint: ProjConstructor<bigint>

Defined in​

node_modules/@scure/starknet/lib/index.d.ts:6

node_modules/@scure/starknet/lib/index.d.ts:45


Signature​

β€’ Const Signature: weierstrass

Defined in​

node_modules/@scure/starknet/lib/index.d.ts:45


utils​

β€’ Const utils: Object

Type declaration​

NameType
normPrivateKeyToScalar(key: u.PrivKey) => bigint
randomPrivateKey() => Uint8Array
precompute(windowSize?: number, point?: ProjPointType<bigint>) => ProjPointType<bigint>
isValidPrivateKey(privateKey: PrivKey) => boolean

Defined in​

node_modules/@scure/starknet/lib/index.d.ts:45


Fp251​

β€’ Const Fp251: Readonly<IField<bigint> & Required<Pick<IField<bigint>, "isOdd">>>

Defined in​

node_modules/@scure/starknet/lib/index.d.ts:60

Functions​

getPublicKey​

β–Έ getPublicKey(privKey, isCompressed?): Uint8Array

Parameters​

NameType
privKeyHex
isCompressed?boolean

Returns​

Uint8Array

Defined in​

node_modules/@scure/starknet/lib/index.d.ts:9


getSharedSecret​

β–Έ getSharedSecret(privKeyA, pubKeyB): Uint8Array

Parameters​

NameType
privKeyAHex
pubKeyBHex

Returns​

Uint8Array

Defined in​

node_modules/@scure/starknet/lib/index.d.ts:10


sign​

β–Έ sign(msgHash, privKey, opts?): SignatureType

Parameters​

NameType
msgHashHex
privKeyHex
opts?any

Returns​

SignatureType

Defined in​

node_modules/@scure/starknet/lib/index.d.ts:11


verify​

β–Έ verify(signature, msgHash, pubKey): boolean

Parameters​

NameType
signatureHex | SignatureType
msgHashHex
pubKeyHex

Returns​

boolean

Defined in​

node_modules/@scure/starknet/lib/index.d.ts:12


grindKey​

β–Έ grindKey(seed): string

Parameters​

NameType
seedHex

Returns​

string

Defined in​

node_modules/@scure/starknet/lib/index.d.ts:52


getStarkKey​

β–Έ getStarkKey(privateKey): string

Parameters​

NameType
privateKeyHex

Returns​

string

Defined in​

node_modules/@scure/starknet/lib/index.d.ts:53


ethSigToPrivate​

β–Έ ethSigToPrivate(signature): string

Parameters​

NameType
signaturestring

Returns​

string

Defined in​

node_modules/@scure/starknet/lib/index.d.ts:54


getAccountPath​

β–Έ getAccountPath(layer, application, ethereumAddress, index): string

Parameters​

NameType
layerstring
applicationstring
ethereumAddressstring
indexnumber

Returns​

string

Defined in​

node_modules/@scure/starknet/lib/index.d.ts:55


pedersen​

β–Έ pedersen(x, y): string

Parameters​

NameType
xPedersenArg
yPedersenArg

Returns​

string

Defined in​

node_modules/@scure/starknet/lib/index.d.ts:57


_poseidonMDS​

β–Έ _poseidonMDS(Fp, name, m, attempt?): bigint[][]

Parameters​

NameType
FpIField<bigint>
namestring
mnumber
attempt?number

Returns​

bigint[][]

Defined in​

node_modules/@scure/starknet/lib/index.d.ts:61


poseidonBasic​

β–Έ poseidonBasic(opts, mds): PoseidonFn

Parameters​

NameType
optsPoseidonOpts
mdsbigint[][]

Returns​

PoseidonFn

Defined in​

node_modules/@scure/starknet/lib/index.d.ts:74


poseidonCreate​

β–Έ poseidonCreate(opts, mdsAttempt?): PoseidonFn

Parameters​

NameType
optsPoseidonOpts
mdsAttempt?number

Returns​

PoseidonFn

Defined in​

node_modules/@scure/starknet/lib/index.d.ts:75


poseidonHash​

β–Έ poseidonHash(x, y, fn?): bigint

Parameters​

NameType
xbigint
ybigint
fn?PoseidonFn

Returns​

bigint

Defined in​

node_modules/@scure/starknet/lib/index.d.ts:77


poseidonHashFunc​

β–Έ poseidonHashFunc(x, y, fn?): Uint8Array

Parameters​

NameType
xUint8Array
yUint8Array
fn?PoseidonFn

Returns​

Uint8Array

Defined in​

node_modules/@scure/starknet/lib/index.d.ts:78


poseidonHashSingle​

β–Έ poseidonHashSingle(x, fn?): bigint

Parameters​

NameType
xbigint
fn?PoseidonFn

Returns​

bigint

Defined in​

node_modules/@scure/starknet/lib/index.d.ts:79


poseidonHashMany​

β–Έ poseidonHashMany(values, fn?): bigint

Parameters​

NameType
valuesbigint[]
fn?PoseidonFn

Returns​

bigint

Defined in​

node_modules/@scure/starknet/lib/index.d.ts:80


computeHashOnElements​

β–Έ computeHashOnElements(data, fn?): PedersenArg

Parameters​

NameType
dataPedersenArg[]
fn?(x: PedersenArg, y: PedersenArg) => string

Returns​

PedersenArg

Defined in​

node_modules/@scure/starknet/lib/index.d.ts:58


keccak​

β–Έ keccak(data): bigint

Parameters​

NameType
dataUint8Array

Returns​

bigint

Defined in​

node_modules/@scure/starknet/lib/index.d.ts:59


poseidonSmall​

β–Έ poseidonSmall(values): bigint[]

Parameters​

NameType
valuesbigint[]

Returns​

bigint[]

Defined in​

node_modules/@noble/curves/abstract/poseidon.d.ts:27