Skip to main content
Version: 5.24.3

Namespace: starkCurve

ec.starkCurve

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