@permissionless-technologies/upp-sdk 0.5.7 → 0.6.0
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/dist/chunk-2GKW4UCQ.js +234 -0
- package/dist/chunk-2GKW4UCQ.js.map +1 -0
- package/dist/chunk-36LLQN63.js +83 -0
- package/dist/chunk-36LLQN63.js.map +1 -0
- package/dist/{chunk-C3HXJ5A6.cjs → chunk-47FETLYV.cjs} +17 -3
- package/dist/chunk-47FETLYV.cjs.map +1 -0
- package/dist/{chunk-2NKFTLPD.js → chunk-7GDDA5VR.js} +17 -3
- package/dist/chunk-7GDDA5VR.js.map +1 -0
- package/dist/chunk-CCWMVO3H.cjs +249 -0
- package/dist/chunk-CCWMVO3H.cjs.map +1 -0
- package/dist/{chunk-OG6TNEAT.js → chunk-D6C2OOOC.js} +2 -2
- package/dist/{chunk-OG6TNEAT.js.map → chunk-D6C2OOOC.js.map} +1 -1
- package/dist/{chunk-TKUOY2PQ.cjs → chunk-IETMGF5J.cjs} +2 -2
- package/dist/{chunk-TKUOY2PQ.cjs.map → chunk-IETMGF5J.cjs.map} +1 -1
- package/dist/{chunk-NGXEIUQ6.cjs → chunk-MZDCTYGM.cjs} +4 -4
- package/dist/{chunk-NGXEIUQ6.cjs.map → chunk-MZDCTYGM.cjs.map} +1 -1
- package/dist/{chunk-N2VHE47N.js → chunk-PJBEE2OI.js} +16 -16
- package/dist/{chunk-N2VHE47N.js.map → chunk-PJBEE2OI.js.map} +1 -1
- package/dist/chunk-PXCVNAWP.cjs +91 -0
- package/dist/chunk-PXCVNAWP.cjs.map +1 -0
- package/dist/{chunk-A6IYQ7UF.js → chunk-QYF2A5SO.js} +3 -3
- package/dist/{chunk-A6IYQ7UF.js.map → chunk-QYF2A5SO.js.map} +1 -1
- package/dist/{chunk-Y3VL3LOE.cjs → chunk-SEAXI5UO.cjs} +16 -16
- package/dist/{chunk-Y3VL3LOE.cjs.map → chunk-SEAXI5UO.cjs.map} +1 -1
- package/dist/core/index.cjs +60 -60
- package/dist/core/index.d.cts +2 -2
- package/dist/core/index.d.ts +2 -2
- package/dist/core/index.js +4 -4
- package/dist/{index-B31tBTbC.d.ts → index-B03HwFbO.d.ts} +15 -4
- package/dist/{index-CzmvOht6.d.cts → index-BSaHIJzn.d.cts} +15 -4
- package/dist/{index-a_f935pS.d.cts → index-BafRK5nW.d.cts} +10 -1
- package/dist/{index-2eL8ZLD0.d.ts → index-DndOuerz.d.ts} +10 -1
- package/dist/index.cjs +155 -126
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -4
- package/dist/index.d.ts +5 -4
- package/dist/index.js +8 -7
- package/dist/index.js.map +1 -1
- package/dist/indexer/index.cjs +11 -11
- package/dist/indexer/index.d.cts +6 -5
- package/dist/indexer/index.d.ts +6 -5
- package/dist/indexer/index.js +1 -1
- package/dist/keys/index.cjs +56 -27
- package/dist/keys/index.d.cts +33 -3
- package/dist/keys/index.d.ts +33 -3
- package/dist/keys/index.js +2 -1
- package/dist/passkey-Df4lrhN5.d.cts +77 -0
- package/dist/passkey-ZnoYRP-r.d.ts +77 -0
- package/dist/react/index.cjs +236 -65
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +18 -2
- package/dist/react/index.d.ts +18 -2
- package/dist/react/index.js +182 -26
- package/dist/react/index.js.map +1 -1
- package/dist/{transfer-27GZNGCI.js → transfer-7PPJAS3X.js} +3 -3
- package/dist/{transfer-27GZNGCI.js.map → transfer-7PPJAS3X.js.map} +1 -1
- package/dist/{transfer-TJNDCZF2.cjs → transfer-ZZ263JLF.cjs} +10 -10
- package/dist/{transfer-TJNDCZF2.cjs.map → transfer-ZZ263JLF.cjs.map} +1 -1
- package/dist/{types-CJSbxv4q.d.cts → types-9MmVALxO.d.cts} +1 -1
- package/dist/{types-mLybMxNR.d.ts → types-CI4nEY9S.d.ts} +1 -1
- package/dist/utils/index.cjs +21 -21
- package/dist/utils/index.js +1 -1
- package/package.json +1 -1
- package/src/deployments/31337.json +14 -14
- package/dist/chunk-2NKFTLPD.js.map +0 -1
- package/dist/chunk-C3HXJ5A6.cjs.map +0 -1
- package/dist/chunk-FTEXUSHR.js +0 -150
- package/dist/chunk-FTEXUSHR.js.map +0 -1
- package/dist/chunk-LKXC3OQT.cjs +0 -165
- package/dist/chunk-LKXC3OQT.cjs.map +0 -1
package/dist/indexer/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkIETMGF5J_cjs = require('../chunk-IETMGF5J.cjs');
|
|
4
4
|
var chunkPGIV2GDM_cjs = require('../chunk-PGIV2GDM.cjs');
|
|
5
5
|
var chunkARH2SJM3_cjs = require('../chunk-ARH2SJM3.cjs');
|
|
6
6
|
require('../chunk-BCSMUH4L.cjs');
|
|
@@ -11,43 +11,43 @@ require('../chunk-G7VZBCD6.cjs');
|
|
|
11
11
|
|
|
12
12
|
Object.defineProperty(exports, "computeSearchTag", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunkIETMGF5J_cjs.computeSearchTag; }
|
|
15
15
|
});
|
|
16
16
|
Object.defineProperty(exports, "createAutoAdapter", {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunkIETMGF5J_cjs.createAutoAdapter; }
|
|
19
19
|
});
|
|
20
20
|
Object.defineProperty(exports, "createLocalStorageAdapter", {
|
|
21
21
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
22
|
+
get: function () { return chunkIETMGF5J_cjs.createLocalStorageAdapter; }
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "createMemoryAdapter", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunkIETMGF5J_cjs.createMemoryAdapter; }
|
|
27
27
|
});
|
|
28
28
|
Object.defineProperty(exports, "localStorageAdapter", {
|
|
29
29
|
enumerable: true,
|
|
30
|
-
get: function () { return
|
|
30
|
+
get: function () { return chunkIETMGF5J_cjs.localStorageAdapter; }
|
|
31
31
|
});
|
|
32
32
|
Object.defineProperty(exports, "makeRpcIndexer", {
|
|
33
33
|
enumerable: true,
|
|
34
|
-
get: function () { return
|
|
34
|
+
get: function () { return chunkIETMGF5J_cjs.makeRpcIndexer; }
|
|
35
35
|
});
|
|
36
36
|
Object.defineProperty(exports, "matchesSearchTag", {
|
|
37
37
|
enumerable: true,
|
|
38
|
-
get: function () { return
|
|
38
|
+
get: function () { return chunkIETMGF5J_cjs.matchesSearchTag; }
|
|
39
39
|
});
|
|
40
40
|
Object.defineProperty(exports, "memoryAdapter", {
|
|
41
41
|
enumerable: true,
|
|
42
|
-
get: function () { return
|
|
42
|
+
get: function () { return chunkIETMGF5J_cjs.memoryAdapter; }
|
|
43
43
|
});
|
|
44
44
|
Object.defineProperty(exports, "tryDecryptNote", {
|
|
45
45
|
enumerable: true,
|
|
46
|
-
get: function () { return
|
|
46
|
+
get: function () { return chunkIETMGF5J_cjs.tryDecryptNote; }
|
|
47
47
|
});
|
|
48
48
|
Object.defineProperty(exports, "unpackNoteData", {
|
|
49
49
|
enumerable: true,
|
|
50
|
-
get: function () { return
|
|
50
|
+
get: function () { return chunkIETMGF5J_cjs.unpackNoteData; }
|
|
51
51
|
});
|
|
52
52
|
Object.defineProperty(exports, "COMMITMENT_INSERTED_EVENT", {
|
|
53
53
|
enumerable: true,
|
package/dist/indexer/index.d.cts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { e as INoteStore, j as StorageAdapter } from '../index-
|
|
2
|
-
export { a0 as CommitmentInsertedArgs, f as IndexedNote, I as Indexer, Z as IndexerState, Y as LiveSyncConfig, T as NoteFilters, Q as NoteStatus, a2 as NullifiedArgs, R as RpcIndexerConfig, $ as SerializedNote, a1 as StealthTransactArgs, X as SyncConfig, W as SyncProgress, k as SyncResult, _ as SyncState } from '../index-
|
|
3
|
-
import { _ as ___index_js } from '../index-
|
|
4
|
-
export { m as makeRpcIndexer } from '../index-
|
|
1
|
+
import { e as INoteStore, j as StorageAdapter } from '../index-BafRK5nW.cjs';
|
|
2
|
+
export { a0 as CommitmentInsertedArgs, f as IndexedNote, I as Indexer, Z as IndexerState, Y as LiveSyncConfig, T as NoteFilters, Q as NoteStatus, a2 as NullifiedArgs, R as RpcIndexerConfig, $ as SerializedNote, a1 as StealthTransactArgs, X as SyncConfig, W as SyncProgress, k as SyncResult, _ as SyncState } from '../index-BafRK5nW.cjs';
|
|
3
|
+
import { _ as ___index_js } from '../index-BSaHIJzn.cjs';
|
|
4
|
+
export { m as makeRpcIndexer } from '../index-BSaHIJzn.cjs';
|
|
5
5
|
import { Hex, Address } from 'viem';
|
|
6
6
|
import { P as Point } from '../merkle-mteVOlDf.cjs';
|
|
7
7
|
import { H as ShieldedNote } from '../transfer-_qaZXsv7.cjs';
|
|
8
|
-
import '../types-
|
|
8
|
+
import '../types-9MmVALxO.cjs';
|
|
9
9
|
import '../keccak-m31-B_AqBbRF.cjs';
|
|
10
10
|
import '../keys/index.cjs';
|
|
11
|
+
import '../passkey-Df4lrhN5.cjs';
|
|
11
12
|
import '../utils/index.cjs';
|
|
12
13
|
import '@permissionless-technologies/upc-sdk';
|
|
13
14
|
|
package/dist/indexer/index.d.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { e as INoteStore, j as StorageAdapter } from '../index-
|
|
2
|
-
export { a0 as CommitmentInsertedArgs, f as IndexedNote, I as Indexer, Z as IndexerState, Y as LiveSyncConfig, T as NoteFilters, Q as NoteStatus, a2 as NullifiedArgs, R as RpcIndexerConfig, $ as SerializedNote, a1 as StealthTransactArgs, X as SyncConfig, W as SyncProgress, k as SyncResult, _ as SyncState } from '../index-
|
|
3
|
-
import { _ as ___index_js } from '../index-
|
|
4
|
-
export { m as makeRpcIndexer } from '../index-
|
|
1
|
+
import { e as INoteStore, j as StorageAdapter } from '../index-DndOuerz.js';
|
|
2
|
+
export { a0 as CommitmentInsertedArgs, f as IndexedNote, I as Indexer, Z as IndexerState, Y as LiveSyncConfig, T as NoteFilters, Q as NoteStatus, a2 as NullifiedArgs, R as RpcIndexerConfig, $ as SerializedNote, a1 as StealthTransactArgs, X as SyncConfig, W as SyncProgress, k as SyncResult, _ as SyncState } from '../index-DndOuerz.js';
|
|
3
|
+
import { _ as ___index_js } from '../index-B03HwFbO.js';
|
|
4
|
+
export { m as makeRpcIndexer } from '../index-B03HwFbO.js';
|
|
5
5
|
import { Hex, Address } from 'viem';
|
|
6
6
|
import { P as Point } from '../merkle-mteVOlDf.js';
|
|
7
7
|
import { H as ShieldedNote } from '../transfer-x7UChjh7.js';
|
|
8
|
-
import '../types-
|
|
8
|
+
import '../types-CI4nEY9S.js';
|
|
9
9
|
import '../keccak-m31-B_AqBbRF.js';
|
|
10
10
|
import '../keys/index.js';
|
|
11
|
+
import '../passkey-ZnoYRP-r.js';
|
|
11
12
|
import '../utils/index.js';
|
|
12
13
|
import '@permissionless-technologies/upc-sdk';
|
|
13
14
|
|
package/dist/indexer/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { computeSearchTag, createAutoAdapter, createLocalStorageAdapter, createMemoryAdapter, localStorageAdapter, makeRpcIndexer, matchesSearchTag, memoryAdapter, tryDecryptNote, unpackNoteData } from '../chunk-
|
|
1
|
+
export { computeSearchTag, createAutoAdapter, createLocalStorageAdapter, createMemoryAdapter, localStorageAdapter, makeRpcIndexer, matchesSearchTag, memoryAdapter, tryDecryptNote, unpackNoteData } from '../chunk-D6C2OOOC.js';
|
|
2
2
|
export { COMMITMENT_INSERTED_EVENT, NULLIFIER_USED_ABI, SHIELDED_EVENT, SWAP_ORDER_CANCELLED_EVENT, SWAP_ORDER_CLAIMED_EVENT, SWAP_ORDER_FILLED_EVENT, TRANSFERRED_EVENT, createSyncEngine, decryptCandidates, deriveDecryptionKey, tryDecryptHashBased, verifyNullifiers } from '../chunk-FW2U6TKQ.js';
|
|
3
3
|
export { createIndexedDBAdapter, indexedDBAdapter } from '../chunk-ABVALIIG.js';
|
|
4
4
|
import '../chunk-4E23V3AT.js';
|
package/dist/keys/index.cjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkPXCVNAWP_cjs = require('../chunk-PXCVNAWP.cjs');
|
|
4
|
+
var chunkCCWMVO3H_cjs = require('../chunk-CCWMVO3H.cjs');
|
|
4
5
|
require('../chunk-XSJ5VVH4.cjs');
|
|
5
6
|
require('../chunk-BCSMUH4L.cjs');
|
|
6
7
|
require('../chunk-HEHXSV47.cjs');
|
|
@@ -8,61 +9,89 @@ require('../chunk-G7VZBCD6.cjs');
|
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
|
|
12
|
+
Object.defineProperty(exports, "derivePerNoteKey", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () { return chunkPXCVNAWP_cjs.derivePerNoteKey; }
|
|
15
|
+
});
|
|
16
|
+
Object.defineProperty(exports, "derivePerNoteKeyFromKeys", {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: function () { return chunkPXCVNAWP_cjs.derivePerNoteKeyFromKeys; }
|
|
19
|
+
});
|
|
20
|
+
Object.defineProperty(exports, "deriveStarkPerNoteKey", {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
get: function () { return chunkPXCVNAWP_cjs.deriveStarkPerNoteKey; }
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, "deriveStarkPerNoteKeyFromKeys", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () { return chunkPXCVNAWP_cjs.deriveStarkPerNoteKeyFromKeys; }
|
|
27
|
+
});
|
|
28
|
+
Object.defineProperty(exports, "exportViewingKeysForAudit", {
|
|
29
|
+
enumerable: true,
|
|
30
|
+
get: function () { return chunkPXCVNAWP_cjs.exportViewingKeysForAudit; }
|
|
31
|
+
});
|
|
32
|
+
Object.defineProperty(exports, "getViewingKeyFromExport", {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function () { return chunkPXCVNAWP_cjs.getViewingKeyFromExport; }
|
|
35
|
+
});
|
|
36
|
+
Object.defineProperty(exports, "validateAuditKeyExport", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function () { return chunkPXCVNAWP_cjs.validateAuditKeyExport; }
|
|
39
|
+
});
|
|
11
40
|
Object.defineProperty(exports, "DEFAULT_KEY_DERIVATION_CONFIG", {
|
|
12
41
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
42
|
+
get: function () { return chunkCCWMVO3H_cjs.DEFAULT_KEY_DERIVATION_CONFIG; }
|
|
14
43
|
});
|
|
15
|
-
Object.defineProperty(exports, "
|
|
44
|
+
Object.defineProperty(exports, "checkPRFSupport", {
|
|
16
45
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
46
|
+
get: function () { return chunkCCWMVO3H_cjs.checkPRFSupport; }
|
|
18
47
|
});
|
|
19
|
-
Object.defineProperty(exports, "
|
|
48
|
+
Object.defineProperty(exports, "createPasskeyWithPRF", {
|
|
20
49
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
50
|
+
get: function () { return chunkCCWMVO3H_cjs.createPasskeyWithPRF; }
|
|
22
51
|
});
|
|
23
|
-
Object.defineProperty(exports, "
|
|
52
|
+
Object.defineProperty(exports, "deriveDualKeysFromSeed", {
|
|
24
53
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
54
|
+
get: function () { return chunkCCWMVO3H_cjs.deriveDualKeysFromSeed; }
|
|
26
55
|
});
|
|
27
|
-
Object.defineProperty(exports, "
|
|
56
|
+
Object.defineProperty(exports, "deriveDualKeysFromSignature", {
|
|
28
57
|
enumerable: true,
|
|
29
|
-
get: function () { return
|
|
58
|
+
get: function () { return chunkCCWMVO3H_cjs.deriveDualKeysFromSignature; }
|
|
30
59
|
});
|
|
31
|
-
Object.defineProperty(exports, "
|
|
60
|
+
Object.defineProperty(exports, "deriveKeysFromPasskey", {
|
|
32
61
|
enumerable: true,
|
|
33
|
-
get: function () { return
|
|
62
|
+
get: function () { return chunkCCWMVO3H_cjs.deriveKeysFromPasskey; }
|
|
34
63
|
});
|
|
35
|
-
Object.defineProperty(exports, "
|
|
64
|
+
Object.defineProperty(exports, "deriveKeysFromSeed", {
|
|
36
65
|
enumerable: true,
|
|
37
|
-
get: function () { return
|
|
66
|
+
get: function () { return chunkCCWMVO3H_cjs.deriveKeysFromSeed; }
|
|
38
67
|
});
|
|
39
|
-
Object.defineProperty(exports, "
|
|
68
|
+
Object.defineProperty(exports, "deriveKeysFromSignature", {
|
|
40
69
|
enumerable: true,
|
|
41
|
-
get: function () { return
|
|
70
|
+
get: function () { return chunkCCWMVO3H_cjs.deriveKeysFromSignature; }
|
|
42
71
|
});
|
|
43
|
-
Object.defineProperty(exports, "
|
|
72
|
+
Object.defineProperty(exports, "deriveNullifierKey", {
|
|
44
73
|
enumerable: true,
|
|
45
|
-
get: function () { return
|
|
74
|
+
get: function () { return chunkCCWMVO3H_cjs.deriveNullifierKey; }
|
|
46
75
|
});
|
|
47
|
-
Object.defineProperty(exports, "
|
|
76
|
+
Object.defineProperty(exports, "deriveStarkKeysFromSeed", {
|
|
48
77
|
enumerable: true,
|
|
49
|
-
get: function () { return
|
|
78
|
+
get: function () { return chunkCCWMVO3H_cjs.deriveStarkKeysFromSeed; }
|
|
50
79
|
});
|
|
51
|
-
Object.defineProperty(exports, "
|
|
80
|
+
Object.defineProperty(exports, "deriveStarkKeysFromSignature", {
|
|
52
81
|
enumerable: true,
|
|
53
|
-
get: function () { return
|
|
82
|
+
get: function () { return chunkCCWMVO3H_cjs.deriveStarkKeysFromSignature; }
|
|
54
83
|
});
|
|
55
|
-
Object.defineProperty(exports, "
|
|
84
|
+
Object.defineProperty(exports, "getKeyDerivationMessage", {
|
|
56
85
|
enumerable: true,
|
|
57
|
-
get: function () { return
|
|
86
|
+
get: function () { return chunkCCWMVO3H_cjs.getKeyDerivationMessage; }
|
|
58
87
|
});
|
|
59
|
-
Object.defineProperty(exports, "
|
|
88
|
+
Object.defineProperty(exports, "getPasskeyPRFSecret", {
|
|
60
89
|
enumerable: true,
|
|
61
|
-
get: function () { return
|
|
90
|
+
get: function () { return chunkCCWMVO3H_cjs.getPasskeyPRFSecret; }
|
|
62
91
|
});
|
|
63
92
|
Object.defineProperty(exports, "verifyKeysMatchSignature", {
|
|
64
93
|
enumerable: true,
|
|
65
|
-
get: function () { return
|
|
94
|
+
get: function () { return chunkCCWMVO3H_cjs.verifyKeysMatchSignature; }
|
|
66
95
|
});
|
|
67
96
|
//# sourceMappingURL=index.cjs.map
|
|
68
97
|
//# sourceMappingURL=index.cjs.map
|
package/dist/keys/index.d.cts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { K as KeyDerivationConfig, M as MasterKeys, b as StarkMasterKeys,
|
|
2
|
-
export {
|
|
1
|
+
import { K as KeyDerivationConfig, M as MasterKeys, b as StarkMasterKeys, D as DualMasterKeys, A as AuditKeyExport } from '../types-9MmVALxO.cjs';
|
|
2
|
+
export { a as DEFAULT_KEY_DERIVATION_CONFIG, O as OneTimeKeys, P as ProvingSystem, S as SerializedKeys, c as StealthAddressComponents, T as TransactionViewingKey } from '../types-9MmVALxO.cjs';
|
|
3
3
|
import { Hex, Address } from 'viem';
|
|
4
|
+
export { P as PasskeyAuthResult, a as PasskeyCreateOptions, b as PasskeyCredential, c as checkPRFSupport, d as createPasskeyWithPRF, e as deriveKeysFromPasskey, g as getPasskeyPRFSecret } from '../passkey-Df4lrhN5.cjs';
|
|
4
5
|
import { M as M31Secret } from '../keccak-m31-B_AqBbRF.cjs';
|
|
5
6
|
|
|
6
7
|
/**
|
|
@@ -16,6 +17,18 @@ import { M as M31Secret } from '../keccak-m31-B_AqBbRF.cjs';
|
|
|
16
17
|
* - Ownership proven via hash preimage (Poseidon), not discrete log
|
|
17
18
|
*/
|
|
18
19
|
|
|
20
|
+
/**
|
|
21
|
+
* Derive master keys from a 32-byte seed (hash-based, post-quantum)
|
|
22
|
+
*
|
|
23
|
+
* This is the core derivation function used by both the wallet-signature
|
|
24
|
+
* and passkey paths. Takes a pre-hashed seed and derives spending/viewing
|
|
25
|
+
* keys via domain-separated keccak256 + Poseidon.
|
|
26
|
+
*
|
|
27
|
+
* @param seed - A 32-byte hex seed (e.g. keccak256 of a signature or PRF output)
|
|
28
|
+
* @param config - Optional key derivation configuration
|
|
29
|
+
* @returns Master keys for stealth operations
|
|
30
|
+
*/
|
|
31
|
+
declare function deriveKeysFromSeed(seed: Hex, config?: KeyDerivationConfig): Promise<MasterKeys>;
|
|
19
32
|
/**
|
|
20
33
|
* Derive master keys from a wallet signature (hash-based, post-quantum)
|
|
21
34
|
*
|
|
@@ -44,6 +57,23 @@ declare function getKeyDerivationMessage(config?: KeyDerivationConfig): string;
|
|
|
44
57
|
* Verify that keys match a given signature
|
|
45
58
|
*/
|
|
46
59
|
declare function verifyKeysMatchSignature(keys: MasterKeys, signature: Hex, config?: KeyDerivationConfig): Promise<boolean>;
|
|
60
|
+
/**
|
|
61
|
+
* Derive STARK master keys from a 32-byte seed (M31/Keccak, post-quantum)
|
|
62
|
+
*
|
|
63
|
+
* Core STARK derivation function used by both wallet-signature and passkey paths.
|
|
64
|
+
*
|
|
65
|
+
* @param seed - A 32-byte hex seed
|
|
66
|
+
* @param config - Optional key derivation configuration
|
|
67
|
+
* @returns STARK master keys for stealth operations
|
|
68
|
+
*/
|
|
69
|
+
declare function deriveStarkKeysFromSeed(seed: Hex, config?: KeyDerivationConfig): StarkMasterKeys;
|
|
70
|
+
/**
|
|
71
|
+
* Derive both SNARK and STARK keys from a 32-byte seed.
|
|
72
|
+
*
|
|
73
|
+
* @param seed - A 32-byte hex seed
|
|
74
|
+
* @param config - Optional key derivation configuration
|
|
75
|
+
*/
|
|
76
|
+
declare function deriveDualKeysFromSeed(seed: Hex, config?: KeyDerivationConfig): Promise<DualMasterKeys>;
|
|
47
77
|
/**
|
|
48
78
|
* Derive STARK master keys from a wallet signature (M31/Keccak, post-quantum)
|
|
49
79
|
*
|
|
@@ -155,4 +185,4 @@ declare function deriveStarkPerNoteKey(starkViewingSecret: M31Secret, nonce: big
|
|
|
155
185
|
*/
|
|
156
186
|
declare function deriveStarkPerNoteKeyFromKeys(keys: StarkMasterKeys, nonce: bigint): Hex;
|
|
157
187
|
|
|
158
|
-
export { AuditKeyExport, DualMasterKeys, KeyDerivationConfig, MasterKeys, type NoteReference, StarkMasterKeys, deriveDualKeysFromSignature, deriveKeysFromSignature, deriveNullifierKey, derivePerNoteKey, derivePerNoteKeyFromKeys, deriveStarkKeysFromSignature, deriveStarkPerNoteKey, deriveStarkPerNoteKeyFromKeys, exportViewingKeysForAudit, getKeyDerivationMessage, getViewingKeyFromExport, validateAuditKeyExport, verifyKeysMatchSignature };
|
|
188
|
+
export { AuditKeyExport, DualMasterKeys, KeyDerivationConfig, MasterKeys, type NoteReference, StarkMasterKeys, deriveDualKeysFromSeed, deriveDualKeysFromSignature, deriveKeysFromSeed, deriveKeysFromSignature, deriveNullifierKey, derivePerNoteKey, derivePerNoteKeyFromKeys, deriveStarkKeysFromSeed, deriveStarkKeysFromSignature, deriveStarkPerNoteKey, deriveStarkPerNoteKeyFromKeys, exportViewingKeysForAudit, getKeyDerivationMessage, getViewingKeyFromExport, validateAuditKeyExport, verifyKeysMatchSignature };
|
package/dist/keys/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { K as KeyDerivationConfig, M as MasterKeys, b as StarkMasterKeys,
|
|
2
|
-
export {
|
|
1
|
+
import { K as KeyDerivationConfig, M as MasterKeys, b as StarkMasterKeys, D as DualMasterKeys, A as AuditKeyExport } from '../types-CI4nEY9S.js';
|
|
2
|
+
export { a as DEFAULT_KEY_DERIVATION_CONFIG, O as OneTimeKeys, P as ProvingSystem, S as SerializedKeys, c as StealthAddressComponents, T as TransactionViewingKey } from '../types-CI4nEY9S.js';
|
|
3
3
|
import { Hex, Address } from 'viem';
|
|
4
|
+
export { P as PasskeyAuthResult, a as PasskeyCreateOptions, b as PasskeyCredential, c as checkPRFSupport, d as createPasskeyWithPRF, e as deriveKeysFromPasskey, g as getPasskeyPRFSecret } from '../passkey-ZnoYRP-r.js';
|
|
4
5
|
import { M as M31Secret } from '../keccak-m31-B_AqBbRF.js';
|
|
5
6
|
|
|
6
7
|
/**
|
|
@@ -16,6 +17,18 @@ import { M as M31Secret } from '../keccak-m31-B_AqBbRF.js';
|
|
|
16
17
|
* - Ownership proven via hash preimage (Poseidon), not discrete log
|
|
17
18
|
*/
|
|
18
19
|
|
|
20
|
+
/**
|
|
21
|
+
* Derive master keys from a 32-byte seed (hash-based, post-quantum)
|
|
22
|
+
*
|
|
23
|
+
* This is the core derivation function used by both the wallet-signature
|
|
24
|
+
* and passkey paths. Takes a pre-hashed seed and derives spending/viewing
|
|
25
|
+
* keys via domain-separated keccak256 + Poseidon.
|
|
26
|
+
*
|
|
27
|
+
* @param seed - A 32-byte hex seed (e.g. keccak256 of a signature or PRF output)
|
|
28
|
+
* @param config - Optional key derivation configuration
|
|
29
|
+
* @returns Master keys for stealth operations
|
|
30
|
+
*/
|
|
31
|
+
declare function deriveKeysFromSeed(seed: Hex, config?: KeyDerivationConfig): Promise<MasterKeys>;
|
|
19
32
|
/**
|
|
20
33
|
* Derive master keys from a wallet signature (hash-based, post-quantum)
|
|
21
34
|
*
|
|
@@ -44,6 +57,23 @@ declare function getKeyDerivationMessage(config?: KeyDerivationConfig): string;
|
|
|
44
57
|
* Verify that keys match a given signature
|
|
45
58
|
*/
|
|
46
59
|
declare function verifyKeysMatchSignature(keys: MasterKeys, signature: Hex, config?: KeyDerivationConfig): Promise<boolean>;
|
|
60
|
+
/**
|
|
61
|
+
* Derive STARK master keys from a 32-byte seed (M31/Keccak, post-quantum)
|
|
62
|
+
*
|
|
63
|
+
* Core STARK derivation function used by both wallet-signature and passkey paths.
|
|
64
|
+
*
|
|
65
|
+
* @param seed - A 32-byte hex seed
|
|
66
|
+
* @param config - Optional key derivation configuration
|
|
67
|
+
* @returns STARK master keys for stealth operations
|
|
68
|
+
*/
|
|
69
|
+
declare function deriveStarkKeysFromSeed(seed: Hex, config?: KeyDerivationConfig): StarkMasterKeys;
|
|
70
|
+
/**
|
|
71
|
+
* Derive both SNARK and STARK keys from a 32-byte seed.
|
|
72
|
+
*
|
|
73
|
+
* @param seed - A 32-byte hex seed
|
|
74
|
+
* @param config - Optional key derivation configuration
|
|
75
|
+
*/
|
|
76
|
+
declare function deriveDualKeysFromSeed(seed: Hex, config?: KeyDerivationConfig): Promise<DualMasterKeys>;
|
|
47
77
|
/**
|
|
48
78
|
* Derive STARK master keys from a wallet signature (M31/Keccak, post-quantum)
|
|
49
79
|
*
|
|
@@ -155,4 +185,4 @@ declare function deriveStarkPerNoteKey(starkViewingSecret: M31Secret, nonce: big
|
|
|
155
185
|
*/
|
|
156
186
|
declare function deriveStarkPerNoteKeyFromKeys(keys: StarkMasterKeys, nonce: bigint): Hex;
|
|
157
187
|
|
|
158
|
-
export { AuditKeyExport, DualMasterKeys, KeyDerivationConfig, MasterKeys, type NoteReference, StarkMasterKeys, deriveDualKeysFromSignature, deriveKeysFromSignature, deriveNullifierKey, derivePerNoteKey, derivePerNoteKeyFromKeys, deriveStarkKeysFromSignature, deriveStarkPerNoteKey, deriveStarkPerNoteKeyFromKeys, exportViewingKeysForAudit, getKeyDerivationMessage, getViewingKeyFromExport, validateAuditKeyExport, verifyKeysMatchSignature };
|
|
188
|
+
export { AuditKeyExport, DualMasterKeys, KeyDerivationConfig, MasterKeys, type NoteReference, StarkMasterKeys, deriveDualKeysFromSeed, deriveDualKeysFromSignature, deriveKeysFromSeed, deriveKeysFromSignature, deriveNullifierKey, derivePerNoteKey, derivePerNoteKeyFromKeys, deriveStarkKeysFromSeed, deriveStarkKeysFromSignature, deriveStarkPerNoteKey, deriveStarkPerNoteKeyFromKeys, exportViewingKeysForAudit, getKeyDerivationMessage, getViewingKeyFromExport, validateAuditKeyExport, verifyKeysMatchSignature };
|
package/dist/keys/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { derivePerNoteKey, derivePerNoteKeyFromKeys, deriveStarkPerNoteKey, deriveStarkPerNoteKeyFromKeys, exportViewingKeysForAudit, getViewingKeyFromExport, validateAuditKeyExport } from '../chunk-36LLQN63.js';
|
|
2
|
+
export { DEFAULT_KEY_DERIVATION_CONFIG, checkPRFSupport, createPasskeyWithPRF, deriveDualKeysFromSeed, deriveDualKeysFromSignature, deriveKeysFromPasskey, deriveKeysFromSeed, deriveKeysFromSignature, deriveNullifierKey, deriveStarkKeysFromSeed, deriveStarkKeysFromSignature, getKeyDerivationMessage, getPasskeyPRFSecret, verifyKeysMatchSignature } from '../chunk-2GKW4UCQ.js';
|
|
2
3
|
import '../chunk-H4NDMIPF.js';
|
|
3
4
|
import '../chunk-4E23V3AT.js';
|
|
4
5
|
import '../chunk-5QSSX3KR.js';
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { Hex } from 'viem';
|
|
2
|
+
import { D as DualMasterKeys } from './types-9MmVALxO.cjs';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Passkey (WebAuthn PRF) Key Derivation
|
|
6
|
+
*
|
|
7
|
+
* Uses the WebAuthn PRF extension (hmac-secret) to derive deterministic
|
|
8
|
+
* secrets from passkeys. Same passkey + same salt = same output, always.
|
|
9
|
+
*
|
|
10
|
+
* The PRF output feeds into the same seed-based derivation pipeline as
|
|
11
|
+
* wallet signatures — no circuit or contract changes needed.
|
|
12
|
+
*
|
|
13
|
+
* Browser support: Chrome 120+, Safari 18+, Edge 120+
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
interface PasskeyCreateOptions {
|
|
17
|
+
/** Relying party display name (default: "UPP Private Account") */
|
|
18
|
+
rpName?: string;
|
|
19
|
+
/** User display name for the credential (default: "UPP User") */
|
|
20
|
+
userName?: string;
|
|
21
|
+
/** Optional password mixed into PRF salt for account separation */
|
|
22
|
+
password?: string;
|
|
23
|
+
}
|
|
24
|
+
interface PasskeyCredential {
|
|
25
|
+
/** Base64url-encoded credential ID */
|
|
26
|
+
credentialId: string;
|
|
27
|
+
/** Derived keys from the passkey's PRF output */
|
|
28
|
+
dualKeys: DualMasterKeys;
|
|
29
|
+
}
|
|
30
|
+
interface PasskeyAuthResult {
|
|
31
|
+
/** Base64url-encoded credential ID */
|
|
32
|
+
credentialId: string;
|
|
33
|
+
/** 32-byte keccak256 seed derived from PRF output */
|
|
34
|
+
seed: Hex;
|
|
35
|
+
/** Derived dual keys */
|
|
36
|
+
dualKeys: DualMasterKeys;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Check whether the current browser supports WebAuthn with PRF extension.
|
|
40
|
+
*
|
|
41
|
+
* Returns false in non-browser environments (SSR, Node.js).
|
|
42
|
+
*/
|
|
43
|
+
declare function checkPRFSupport(): Promise<boolean>;
|
|
44
|
+
/**
|
|
45
|
+
* Create a new passkey with PRF extension enabled.
|
|
46
|
+
*
|
|
47
|
+
* This registers a discoverable credential (resident key) with the
|
|
48
|
+
* platform authenticator. The PRF output is used immediately to derive keys.
|
|
49
|
+
*
|
|
50
|
+
* @param options - Configuration for the credential
|
|
51
|
+
* @returns Credential ID + derived dual keys
|
|
52
|
+
* @throws If WebAuthn or PRF extension is not supported
|
|
53
|
+
*/
|
|
54
|
+
declare function createPasskeyWithPRF(options?: PasskeyCreateOptions): Promise<PasskeyCredential>;
|
|
55
|
+
/**
|
|
56
|
+
* Authenticate with an existing passkey and extract PRF secret.
|
|
57
|
+
*
|
|
58
|
+
* If credentialId is provided, the specific credential is requested.
|
|
59
|
+
* Otherwise, the browser shows a discoverable credential picker.
|
|
60
|
+
*
|
|
61
|
+
* @param credentialId - Optional base64url credential ID to request specifically
|
|
62
|
+
* @param password - Optional password (must match what was used during creation)
|
|
63
|
+
* @returns Seed + credential ID + derived dual keys
|
|
64
|
+
*/
|
|
65
|
+
declare function getPasskeyPRFSecret(credentialId?: string, password?: string): Promise<PasskeyAuthResult>;
|
|
66
|
+
/**
|
|
67
|
+
* Derive dual keys from raw PRF output bytes.
|
|
68
|
+
*
|
|
69
|
+
* Convenience function for custom WebAuthn flows that handle
|
|
70
|
+
* credential management externally.
|
|
71
|
+
*
|
|
72
|
+
* @param prfOutput - Raw PRF extension output (32 bytes)
|
|
73
|
+
* @returns Derived dual master keys
|
|
74
|
+
*/
|
|
75
|
+
declare function deriveKeysFromPasskey(prfOutput: Uint8Array): Promise<DualMasterKeys>;
|
|
76
|
+
|
|
77
|
+
export { type PasskeyAuthResult as P, type PasskeyCreateOptions as a, type PasskeyCredential as b, checkPRFSupport as c, createPasskeyWithPRF as d, deriveKeysFromPasskey as e, getPasskeyPRFSecret as g };
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { Hex } from 'viem';
|
|
2
|
+
import { D as DualMasterKeys } from './types-CI4nEY9S.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Passkey (WebAuthn PRF) Key Derivation
|
|
6
|
+
*
|
|
7
|
+
* Uses the WebAuthn PRF extension (hmac-secret) to derive deterministic
|
|
8
|
+
* secrets from passkeys. Same passkey + same salt = same output, always.
|
|
9
|
+
*
|
|
10
|
+
* The PRF output feeds into the same seed-based derivation pipeline as
|
|
11
|
+
* wallet signatures — no circuit or contract changes needed.
|
|
12
|
+
*
|
|
13
|
+
* Browser support: Chrome 120+, Safari 18+, Edge 120+
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
interface PasskeyCreateOptions {
|
|
17
|
+
/** Relying party display name (default: "UPP Private Account") */
|
|
18
|
+
rpName?: string;
|
|
19
|
+
/** User display name for the credential (default: "UPP User") */
|
|
20
|
+
userName?: string;
|
|
21
|
+
/** Optional password mixed into PRF salt for account separation */
|
|
22
|
+
password?: string;
|
|
23
|
+
}
|
|
24
|
+
interface PasskeyCredential {
|
|
25
|
+
/** Base64url-encoded credential ID */
|
|
26
|
+
credentialId: string;
|
|
27
|
+
/** Derived keys from the passkey's PRF output */
|
|
28
|
+
dualKeys: DualMasterKeys;
|
|
29
|
+
}
|
|
30
|
+
interface PasskeyAuthResult {
|
|
31
|
+
/** Base64url-encoded credential ID */
|
|
32
|
+
credentialId: string;
|
|
33
|
+
/** 32-byte keccak256 seed derived from PRF output */
|
|
34
|
+
seed: Hex;
|
|
35
|
+
/** Derived dual keys */
|
|
36
|
+
dualKeys: DualMasterKeys;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Check whether the current browser supports WebAuthn with PRF extension.
|
|
40
|
+
*
|
|
41
|
+
* Returns false in non-browser environments (SSR, Node.js).
|
|
42
|
+
*/
|
|
43
|
+
declare function checkPRFSupport(): Promise<boolean>;
|
|
44
|
+
/**
|
|
45
|
+
* Create a new passkey with PRF extension enabled.
|
|
46
|
+
*
|
|
47
|
+
* This registers a discoverable credential (resident key) with the
|
|
48
|
+
* platform authenticator. The PRF output is used immediately to derive keys.
|
|
49
|
+
*
|
|
50
|
+
* @param options - Configuration for the credential
|
|
51
|
+
* @returns Credential ID + derived dual keys
|
|
52
|
+
* @throws If WebAuthn or PRF extension is not supported
|
|
53
|
+
*/
|
|
54
|
+
declare function createPasskeyWithPRF(options?: PasskeyCreateOptions): Promise<PasskeyCredential>;
|
|
55
|
+
/**
|
|
56
|
+
* Authenticate with an existing passkey and extract PRF secret.
|
|
57
|
+
*
|
|
58
|
+
* If credentialId is provided, the specific credential is requested.
|
|
59
|
+
* Otherwise, the browser shows a discoverable credential picker.
|
|
60
|
+
*
|
|
61
|
+
* @param credentialId - Optional base64url credential ID to request specifically
|
|
62
|
+
* @param password - Optional password (must match what was used during creation)
|
|
63
|
+
* @returns Seed + credential ID + derived dual keys
|
|
64
|
+
*/
|
|
65
|
+
declare function getPasskeyPRFSecret(credentialId?: string, password?: string): Promise<PasskeyAuthResult>;
|
|
66
|
+
/**
|
|
67
|
+
* Derive dual keys from raw PRF output bytes.
|
|
68
|
+
*
|
|
69
|
+
* Convenience function for custom WebAuthn flows that handle
|
|
70
|
+
* credential management externally.
|
|
71
|
+
*
|
|
72
|
+
* @param prfOutput - Raw PRF extension output (32 bytes)
|
|
73
|
+
* @returns Derived dual master keys
|
|
74
|
+
*/
|
|
75
|
+
declare function deriveKeysFromPasskey(prfOutput: Uint8Array): Promise<DualMasterKeys>;
|
|
76
|
+
|
|
77
|
+
export { type PasskeyAuthResult as P, type PasskeyCreateOptions as a, type PasskeyCredential as b, checkPRFSupport as c, createPasskeyWithPRF as d, deriveKeysFromPasskey as e, getPasskeyPRFSecret as g };
|