Skip to main content
Version: 5.19.5

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