starknet 11.9.0 → 11.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/falcon/index.d.ts +50 -0
- package/dist/falcon/index.js.map +1 -1
- package/dist/falcon/index.mjs.map +1 -1
- package/dist/index.d.ts +102 -47
- package/dist/index.global.js +130 -67
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +130 -67
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +130 -67
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
## [11.9.1](https://github.com/starknet-io/starknet.js/compare/v11.9.0...v11.9.1) (2026-11-24)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
- **calldata:** refuse a Secp256k1Point that is not on the secp256k1 curve ([e13cbee](https://github.com/starknet-io/starknet.js/commit/e13cbee3ba27d06e4a38433ab0f2a6e123bdc792))
|
|
6
|
+
|
|
1
7
|
# [11.9.0](https://github.com/starknet-io/starknet.js/compare/v11.8.0...v11.9.0) (2026-11-23)
|
|
2
8
|
|
|
3
9
|
### Features
|
package/dist/falcon/index.d.ts
CHANGED
|
@@ -438,6 +438,25 @@ declare function importFalconRsSecretKey(secretKey: Uint8Array | string): Uint8A
|
|
|
438
438
|
*/
|
|
439
439
|
declare function exportFalconRsSecretKey(secretKey: Uint8Array | string): Uint8Array;
|
|
440
440
|
|
|
441
|
+
/**
|
|
442
|
+
* Functions for the keys and the signatures of Falcon-512: create a key pair, get its public key
|
|
443
|
+
* (NIST format, or packed in 29 felts), import or export a falcon-rs key, and verify a signature or
|
|
444
|
+
* a SNIP-12 message off-chain. To sign, use `Falcon512Signer`.
|
|
445
|
+
*
|
|
446
|
+
* ```typescript
|
|
447
|
+
* const { secretKey, publicKey } = falcon512.generateKeyPair();
|
|
448
|
+
* const signer = new Falcon512Signer(secretKey, { accountType: 'oz-hint' });
|
|
449
|
+
* const signature = await signer.signMessage(myTypedData, accountAddress);
|
|
450
|
+
* const options = { accountType: 'oz-hint' } as const;
|
|
451
|
+
* const isValid = falcon512.verifyMessage(myTypedData, signature, publicKey, accountAddress, options);
|
|
452
|
+
* // isValid = true
|
|
453
|
+
* ```
|
|
454
|
+
*
|
|
455
|
+
* Choice of the account, deployment and key change are in the
|
|
456
|
+
* [guide](https://starknet-js.com/docs/guides/account/postQuantum).
|
|
457
|
+
* @module
|
|
458
|
+
*/
|
|
459
|
+
|
|
441
460
|
declare const falcon512_exportFalconRsSecretKey: typeof exportFalconRsSecretKey;
|
|
442
461
|
declare const falcon512_generateKeyPair: typeof generateKeyPair;
|
|
443
462
|
declare const falcon512_getPackedPublicKey: typeof getPackedPublicKey;
|
|
@@ -588,6 +607,37 @@ declare function encapsulate(provider: starknet.ProviderInterface, signedKey: Ml
|
|
|
588
607
|
*/
|
|
589
608
|
declare function decapsulate(provider: starknet.ProviderInterface, signedCapsule: MlKemSignedCapsule, keyOwnerAddress: starknet.BigNumberish, seed: Uint8Array): Promise<Uint8Array>;
|
|
590
609
|
|
|
610
|
+
/**
|
|
611
|
+
* A post-quantum key exchange between two Falcon-512 accounts of OpenZeppelin, with ML-KEM-768
|
|
612
|
+
* (FIPS 203). Alice and Bob get the same secret of 32 bytes, for example the key of an encrypted
|
|
613
|
+
* message. The secret itself is never sent.
|
|
614
|
+
*
|
|
615
|
+
* 1. Alice calls `createKey`. She keeps the seed secret, signs the message with her account, and
|
|
616
|
+
* sends her public key with the signature (`MlKemSignedKey`).
|
|
617
|
+
* 2. Bob calls `encapsulate`. It first checks the signature of Alice, then gives Bob the secret and
|
|
618
|
+
* a capsule. Bob signs the message with his account, and sends the capsule with the signature
|
|
619
|
+
* (`MlKemSignedCapsule`).
|
|
620
|
+
* 3. Alice calls `decapsulate`. It first checks the signature of Bob, then opens the capsule: Alice
|
|
621
|
+
* gets the same secret.
|
|
622
|
+
*
|
|
623
|
+
* Each signature is checked with the Falcon key that the account stores (`get_public_key`): any
|
|
624
|
+
* other account is refused. A wallet only signs the two messages, with `signMessage`.
|
|
625
|
+
*
|
|
626
|
+
* ```typescript
|
|
627
|
+
* // 1. Alice
|
|
628
|
+
* const aliceKey = mlkem.createKey(await myProvider.getChainId(), validUntil);
|
|
629
|
+
* // 2. Bob, with the key signed by Alice
|
|
630
|
+
* const bobSide = await mlkem.encapsulate(myProvider, signedKey, bobAccount.address);
|
|
631
|
+
* // 3. Alice, with the capsule signed by Bob
|
|
632
|
+
* const secret = await mlkem.decapsulate(myProvider, signedCapsule, aliceAccount.address, aliceKey.seed);
|
|
633
|
+
* // secret = bobSide.sharedSecret
|
|
634
|
+
* ```
|
|
635
|
+
*
|
|
636
|
+
* The diagram of the exchange, a complete example and the limits are in the
|
|
637
|
+
* [guide](https://starknet-js.com/docs/guides/account/postQuantum#share-a-secret-between-two-falcon-accounts).
|
|
638
|
+
* @module
|
|
639
|
+
*/
|
|
640
|
+
|
|
591
641
|
declare const index_createKey: typeof createKey;
|
|
592
642
|
declare const index_decapsulate: typeof decapsulate;
|
|
593
643
|
declare const index_encapsulate: typeof encapsulate;
|