diff --git a/www/docs/API/interfaces/ec.weierstrass.SignatureType.md b/www/docs/API/interfaces/ec.weierstrass.SignatureType.md index 951cdbe5e..92a4d82b7 100644 --- a/www/docs/API/interfaces/ec.weierstrass.SignatureType.md +++ b/www/docs/API/interfaces/ec.weierstrass.SignatureType.md @@ -55,7 +55,7 @@ node_modules/@noble/curves/abstract/weierstrass.d.ts:144 ### addRecoveryBit -▸ **addRecoveryBit**(`recovery`): [`SignatureType`](ec.weierstrass.SignatureType.md) +▸ **addRecoveryBit**(`recovery`): [`RecoveredSignatureType`](../namespaces/ec.weierstrass.md#recoveredsignaturetype) #### Parameters @@ -65,7 +65,7 @@ node_modules/@noble/curves/abstract/weierstrass.d.ts:144 #### Returns -[`SignatureType`](ec.weierstrass.SignatureType.md) +[`RecoveredSignatureType`](../namespaces/ec.weierstrass.md#recoveredsignaturetype) #### Defined in diff --git a/www/docs/API/modules.md b/www/docs/API/modules.md index 58cab9b6c..aba28cfd4 100644 --- a/www/docs/API/modules.md +++ b/www/docs/API/modules.md @@ -1,6 +1,6 @@ --- id: 'modules' -title: 'Starknet.js API - v5.19.2' +title: 'Starknet.js API - v5.19.3' sidebar_label: 'Exports' sidebar_position: 0.5 custom_edit_url: null diff --git a/www/docs/API/namespaces/ec.starkCurve.md b/www/docs/API/namespaces/ec.starkCurve.md index e8271b0a7..d890906f2 100644 --- a/www/docs/API/namespaces/ec.starkCurve.md +++ b/www/docs/API/namespaces/ec.starkCurve.md @@ -15,9 +15,9 @@ custom_edit_url: null #### Defined in -node_modules/micro-starknet/lib/index.d.ts:6 +node_modules/@scure/starknet/lib/index.d.ts:6 -node_modules/micro-starknet/lib/index.d.ts:44 +node_modules/@scure/starknet/lib/index.d.ts:45 --- @@ -37,7 +37,7 @@ node_modules/micro-starknet/lib/index.d.ts:44 #### Defined in -node_modules/micro-starknet/lib/index.d.ts:63 +node_modules/@scure/starknet/lib/index.d.ts:62 --- @@ -47,17 +47,27 @@ node_modules/micro-starknet/lib/index.d.ts:63 #### Defined in -node_modules/micro-starknet/lib/index.d.ts:70 +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`](ec.weierstrass.md) #### Defined in -node_modules/micro-starknet/lib/index.d.ts:7 +node_modules/@scure/starknet/lib/index.d.ts:8 --- @@ -67,7 +77,7 @@ node_modules/micro-starknet/lib/index.d.ts:7 #### Defined in -node_modules/micro-starknet/lib/index.d.ts:12 +node_modules/@scure/starknet/lib/index.d.ts:13 --- @@ -77,9 +87,9 @@ node_modules/micro-starknet/lib/index.d.ts:12 #### Defined in -node_modules/micro-starknet/lib/index.d.ts:6 +node_modules/@scure/starknet/lib/index.d.ts:6 -node_modules/micro-starknet/lib/index.d.ts:44 +node_modules/@scure/starknet/lib/index.d.ts:45 --- @@ -89,7 +99,7 @@ node_modules/micro-starknet/lib/index.d.ts:44 #### Defined in -node_modules/micro-starknet/lib/index.d.ts:44 +node_modules/@scure/starknet/lib/index.d.ts:45 --- @@ -108,17 +118,7 @@ node_modules/micro-starknet/lib/index.d.ts:44 #### Defined in -node_modules/micro-starknet/lib/index.d.ts:44 - ---- - -### Fp253 - -• `Const` **Fp253**: `Readonly`<`IField`<`bigint`\> & `Required`<`Pick`<`IField`<`bigint`\>, `"isOdd"`\>\>\> - -#### Defined in - -node_modules/micro-starknet/lib/index.d.ts:60 +node_modules/@scure/starknet/lib/index.d.ts:45 --- @@ -128,7 +128,7 @@ node_modules/micro-starknet/lib/index.d.ts:60 #### Defined in -node_modules/micro-starknet/lib/index.d.ts:61 +node_modules/@scure/starknet/lib/index.d.ts:60 ## Functions @@ -149,7 +149,7 @@ node_modules/micro-starknet/lib/index.d.ts:61 #### Defined in -node_modules/micro-starknet/lib/index.d.ts:8 +node_modules/@scure/starknet/lib/index.d.ts:9 --- @@ -170,7 +170,7 @@ node_modules/micro-starknet/lib/index.d.ts:8 #### Defined in -node_modules/micro-starknet/lib/index.d.ts:9 +node_modules/@scure/starknet/lib/index.d.ts:10 --- @@ -192,7 +192,7 @@ node_modules/micro-starknet/lib/index.d.ts:9 #### Defined in -node_modules/micro-starknet/lib/index.d.ts:10 +node_modules/@scure/starknet/lib/index.d.ts:11 --- @@ -214,7 +214,7 @@ node_modules/micro-starknet/lib/index.d.ts:10 #### Defined in -node_modules/micro-starknet/lib/index.d.ts:11 +node_modules/@scure/starknet/lib/index.d.ts:12 --- @@ -234,7 +234,7 @@ node_modules/micro-starknet/lib/index.d.ts:11 #### Defined in -node_modules/micro-starknet/lib/index.d.ts:51 +node_modules/@scure/starknet/lib/index.d.ts:52 --- @@ -254,7 +254,7 @@ node_modules/micro-starknet/lib/index.d.ts:51 #### Defined in -node_modules/micro-starknet/lib/index.d.ts:52 +node_modules/@scure/starknet/lib/index.d.ts:53 --- @@ -274,7 +274,7 @@ node_modules/micro-starknet/lib/index.d.ts:52 #### Defined in -node_modules/micro-starknet/lib/index.d.ts:53 +node_modules/@scure/starknet/lib/index.d.ts:54 --- @@ -297,7 +297,7 @@ node_modules/micro-starknet/lib/index.d.ts:53 #### Defined in -node_modules/micro-starknet/lib/index.d.ts:54 +node_modules/@scure/starknet/lib/index.d.ts:55 --- @@ -318,28 +318,7 @@ node_modules/micro-starknet/lib/index.d.ts:54 #### Defined in -node_modules/micro-starknet/lib/index.d.ts:56 - ---- - -### hashChain - -▸ **hashChain**(`data`, `fn?`): `PedersenArg` - -#### Parameters - -| Name | Type | -| :----- | :--------------------------------------------------- | -| `data` | `PedersenArg`[] | -| `fn?` | (`x`: `PedersenArg`, `y`: `PedersenArg`) => `string` | - -#### Returns - -`PedersenArg` - -#### Defined in - -node_modules/micro-starknet/lib/index.d.ts:57 +node_modules/@scure/starknet/lib/index.d.ts:57 --- @@ -362,7 +341,7 @@ node_modules/micro-starknet/lib/index.d.ts:57 #### Defined in -node_modules/micro-starknet/lib/index.d.ts:62 +node_modules/@scure/starknet/lib/index.d.ts:61 --- @@ -383,7 +362,7 @@ node_modules/micro-starknet/lib/index.d.ts:62 #### Defined in -node_modules/micro-starknet/lib/index.d.ts:75 +node_modules/@scure/starknet/lib/index.d.ts:74 --- @@ -404,7 +383,7 @@ node_modules/micro-starknet/lib/index.d.ts:75 #### Defined in -node_modules/micro-starknet/lib/index.d.ts:76 +node_modules/@scure/starknet/lib/index.d.ts:75 --- @@ -426,7 +405,7 @@ node_modules/micro-starknet/lib/index.d.ts:76 #### Defined in -node_modules/micro-starknet/lib/index.d.ts:78 +node_modules/@scure/starknet/lib/index.d.ts:77 --- @@ -448,7 +427,7 @@ node_modules/micro-starknet/lib/index.d.ts:78 #### Defined in -node_modules/micro-starknet/lib/index.d.ts:79 +node_modules/@scure/starknet/lib/index.d.ts:78 --- @@ -469,7 +448,7 @@ node_modules/micro-starknet/lib/index.d.ts:79 #### Defined in -node_modules/micro-starknet/lib/index.d.ts:80 +node_modules/@scure/starknet/lib/index.d.ts:79 --- @@ -490,7 +469,7 @@ node_modules/micro-starknet/lib/index.d.ts:80 #### Defined in -node_modules/micro-starknet/lib/index.d.ts:81 +node_modules/@scure/starknet/lib/index.d.ts:80 --- @@ -511,7 +490,7 @@ node_modules/micro-starknet/lib/index.d.ts:81 #### Defined in -node_modules/micro-starknet/lib/index.d.ts:58 +node_modules/@scure/starknet/lib/index.d.ts:58 --- @@ -531,7 +510,7 @@ node_modules/micro-starknet/lib/index.d.ts:58 #### Defined in -node_modules/micro-starknet/lib/index.d.ts:59 +node_modules/@scure/starknet/lib/index.d.ts:59 --- diff --git a/www/docs/API/namespaces/ec.weierstrass.md b/www/docs/API/namespaces/ec.weierstrass.md index 1b9e59ed1..010cd04ef 100644 --- a/www/docs/API/namespaces/ec.weierstrass.md +++ b/www/docs/API/namespaces/ec.weierstrass.md @@ -123,6 +123,16 @@ node_modules/@noble/curves/abstract/weierstrass.d.ts:86 --- +### RecoveredSignatureType + +Ƭ **RecoveredSignatureType**: [`SignatureType`](../interfaces/ec.weierstrass.SignatureType.md) & { `recovery`: `number` } + +#### Defined in + +node_modules/@noble/curves/abstract/weierstrass.d.ts:154 + +--- + ### SignatureConstructor Ƭ **SignatureConstructor**: `Object` @@ -151,7 +161,7 @@ node_modules/@noble/curves/abstract/weierstrass.d.ts:86 #### Defined in -node_modules/@noble/curves/abstract/weierstrass.d.ts:154 +node_modules/@noble/curves/abstract/weierstrass.d.ts:157 --- @@ -161,7 +171,7 @@ node_modules/@noble/curves/abstract/weierstrass.d.ts:154 #### Defined in -node_modules/@noble/curves/abstract/weierstrass.d.ts:163 +node_modules/@noble/curves/abstract/weierstrass.d.ts:166 --- @@ -171,7 +181,7 @@ node_modules/@noble/curves/abstract/weierstrass.d.ts:163 #### Defined in -node_modules/@noble/curves/abstract/weierstrass.d.ts:164 +node_modules/@noble/curves/abstract/weierstrass.d.ts:167 --- @@ -186,7 +196,7 @@ node_modules/@noble/curves/abstract/weierstrass.d.ts:164 | `CURVE` | `ReturnType` | | `getPublicKey` | (`privateKey`: `PrivKey`, `isCompressed?`: `boolean`) => `Uint8Array` | | `getSharedSecret` | (`privateA`: `PrivKey`, `publicB`: `Hex`, `isCompressed?`: `boolean`) => `Uint8Array` | -| `sign` | (`msgHash`: `Hex`, `privKey`: `PrivKey`, `opts?`: [`SignOpts`](ec.weierstrass.md#signopts)) => [`SignatureType`](../interfaces/ec.weierstrass.SignatureType.md) | +| `sign` | (`msgHash`: `Hex`, `privKey`: `PrivKey`, `opts?`: [`SignOpts`](ec.weierstrass.md#signopts)) => [`RecoveredSignatureType`](ec.weierstrass.md#recoveredsignaturetype) | | `verify` | (`signature`: `Hex` \| `SignatureLike`, `msgHash`: `Hex`, `publicKey`: `Hex`, `opts?`: [`VerOpts`](ec.weierstrass.md#veropts)) => `boolean` | | `ProjectivePoint` | [`ProjConstructor`](../interfaces/ec.weierstrass.ProjConstructor.md)<`bigint`\> | | `Signature` | [`SignatureConstructor`](ec.weierstrass.md#signatureconstructor) | @@ -198,7 +208,7 @@ node_modules/@noble/curves/abstract/weierstrass.d.ts:164 #### Defined in -node_modules/@noble/curves/abstract/weierstrass.d.ts:197 +node_modules/@noble/curves/abstract/weierstrass.d.ts:200 ## Variables @@ -271,7 +281,7 @@ node_modules/@noble/curves/abstract/weierstrass.d.ts:113 #### Defined in -node_modules/@noble/curves/abstract/weierstrass.d.ts:212 +node_modules/@noble/curves/abstract/weierstrass.d.ts:215 --- @@ -279,6 +289,11 @@ node_modules/@noble/curves/abstract/weierstrass.d.ts:212 ▸ **SWUFpSqrtRatio**<`T`\>(`Fp`, `Z`): (`u`: `T`, `v`: `T`) => { `isValid`: `boolean` ; `value`: `T` } +Implementation of the Shallue and van de Woestijne method for any weierstrass curve. +TODO: check if there is a way to merge this with uvRatio in Edwards; move to modular. +b = True and y = sqrt(u / v) if (u / v) is square in F, and +b = False and y = sqrt(Z \* (u / v)) otherwise. + #### Type parameters | Name | @@ -316,7 +331,7 @@ node_modules/@noble/curves/abstract/weierstrass.d.ts:212 #### Defined in -node_modules/@noble/curves/abstract/weierstrass.d.ts:213 +node_modules/@noble/curves/abstract/weierstrass.d.ts:225 --- @@ -324,6 +339,9 @@ node_modules/@noble/curves/abstract/weierstrass.d.ts:213 ▸ **mapToCurveSimpleSWU**<`T`\>(`Fp`, `opts`): (`u`: `T`) => { `x`: `T` ; `y`: `T` } +Simplified Shallue-van de Woestijne-Ulas Method +https://www.rfc-editor.org/rfc/rfc9380#section-6.6.2 + #### Type parameters | Name | @@ -363,4 +381,4 @@ node_modules/@noble/curves/abstract/weierstrass.d.ts:213 #### Defined in -node_modules/@noble/curves/abstract/weierstrass.d.ts:217 +node_modules/@noble/curves/abstract/weierstrass.d.ts:233