@sip-protocol/sdk 0.7.1 → 0.7.3
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/browser.d.mts +1 -1
- package/dist/browser.d.ts +1 -1
- package/dist/browser.js +2926 -341
- package/dist/browser.mjs +48 -2
- package/dist/chunk-2XIVXWHA.mjs +1930 -0
- package/dist/chunk-3M3HNQCW.mjs +18253 -0
- package/dist/chunk-7RFRWDCW.mjs +1504 -0
- package/dist/chunk-F6F73W35.mjs +16166 -0
- package/dist/chunk-OFDBEIEK.mjs +16166 -0
- package/dist/chunk-SF7YSLF5.mjs +1515 -0
- package/dist/chunk-WWUSGOXE.mjs +17129 -0
- package/dist/index-8MQz13eJ.d.mts +13746 -0
- package/dist/index-B71aXVzk.d.ts +13264 -0
- package/dist/index-DIBZHOOQ.d.ts +13746 -0
- package/dist/index-pOIIuwfV.d.mts +13264 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2911 -326
- package/dist/index.mjs +48 -2
- package/dist/solana-4O4K45VU.mjs +46 -0
- package/dist/solana-NDABAZ6P.mjs +56 -0
- package/dist/solana-ZYO63LY5.mjs +46 -0
- package/package.json +3 -3
- package/src/chains/solana/index.ts +24 -0
- package/src/chains/solana/providers/generic.ts +160 -0
- package/src/chains/solana/providers/helius.ts +249 -0
- package/src/chains/solana/providers/index.ts +54 -0
- package/src/chains/solana/providers/interface.ts +178 -0
- package/src/chains/solana/providers/webhook.ts +519 -0
- package/src/chains/solana/scan.ts +88 -8
- package/src/chains/solana/types.ts +20 -1
- package/src/compliance/index.ts +14 -0
- package/src/compliance/range-sas.ts +591 -0
- package/src/index.ts +99 -0
- package/src/privacy-backends/index.ts +86 -0
- package/src/privacy-backends/interface.ts +263 -0
- package/src/privacy-backends/privacycash-types.ts +278 -0
- package/src/privacy-backends/privacycash.ts +460 -0
- package/src/privacy-backends/registry.ts +278 -0
- package/src/privacy-backends/router.ts +346 -0
- package/src/privacy-backends/sip-native.ts +253 -0
- package/src/proofs/noir.ts +1 -1
- package/src/surveillance/algorithms/address-reuse.ts +143 -0
- package/src/surveillance/algorithms/cluster.ts +247 -0
- package/src/surveillance/algorithms/exchange.ts +295 -0
- package/src/surveillance/algorithms/temporal.ts +337 -0
- package/src/surveillance/analyzer.ts +442 -0
- package/src/surveillance/index.ts +64 -0
- package/src/surveillance/scoring.ts +372 -0
- package/src/surveillance/types.ts +264 -0
package/dist/browser.mjs
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ATTESTATION_VERSION,
|
|
3
3
|
AptosStealthService,
|
|
4
|
+
AttestationGatedDisclosure,
|
|
5
|
+
AttestationSchema,
|
|
4
6
|
AuditorKeyDerivation,
|
|
5
7
|
AuditorType,
|
|
6
8
|
BaseWalletAdapter,
|
|
@@ -19,6 +21,7 @@ import {
|
|
|
19
21
|
HardwareWalletError,
|
|
20
22
|
IntentBuilder,
|
|
21
23
|
IntentStatus,
|
|
24
|
+
KNOWN_EXCHANGES,
|
|
22
25
|
LedgerWalletAdapter,
|
|
23
26
|
MockEthereumAdapter,
|
|
24
27
|
MockLedgerAdapter,
|
|
@@ -38,12 +41,14 @@ import {
|
|
|
38
41
|
OneClickSwapType,
|
|
39
42
|
PaymentBuilder,
|
|
40
43
|
PaymentStatus,
|
|
44
|
+
PrivacyBackendRegistry,
|
|
41
45
|
PrivacyLevel,
|
|
42
46
|
PrivateNFT,
|
|
43
47
|
PrivateVoting,
|
|
44
48
|
ProposalStatus,
|
|
45
49
|
ReportStatus,
|
|
46
50
|
SIP,
|
|
51
|
+
SIPNativeBackend,
|
|
47
52
|
SIP_VERSION,
|
|
48
53
|
STABLECOIN_ADDRESSES,
|
|
49
54
|
STABLECOIN_DECIMALS,
|
|
@@ -52,9 +57,11 @@ import {
|
|
|
52
57
|
SettlementRegistry,
|
|
53
58
|
SettlementRegistryError,
|
|
54
59
|
SmartRouter,
|
|
60
|
+
SmartRouter2,
|
|
55
61
|
SolanaSameChainExecutor,
|
|
56
62
|
SolanaWalletAdapter,
|
|
57
63
|
SuiStealthService,
|
|
64
|
+
SurveillanceAnalyzer,
|
|
58
65
|
SwapStatus,
|
|
59
66
|
ThresholdViewingKey,
|
|
60
67
|
Treasury,
|
|
@@ -70,10 +77,14 @@ import {
|
|
|
70
77
|
addBlindings,
|
|
71
78
|
addCommitments,
|
|
72
79
|
addOracle,
|
|
80
|
+
analyzeAddressReuse,
|
|
81
|
+
analyzeTemporalPatterns,
|
|
73
82
|
aptosAddressToAuthKey,
|
|
74
83
|
attachProofs,
|
|
75
84
|
base58ToHex,
|
|
76
85
|
bytesToHex,
|
|
86
|
+
calculatePrivacyScore,
|
|
87
|
+
calculateSIPComparison,
|
|
77
88
|
checkAptosStealthAddress,
|
|
78
89
|
checkMobileWASMCompatibility,
|
|
79
90
|
checkSuiStealthAddress,
|
|
@@ -85,6 +96,7 @@ import {
|
|
|
85
96
|
createEthereumAdapter,
|
|
86
97
|
createKeySpendOnlyOutput,
|
|
87
98
|
createLedgerAdapter,
|
|
99
|
+
createMockAttestation,
|
|
88
100
|
createMockEthereumAdapter,
|
|
89
101
|
createMockEthereumProvider,
|
|
90
102
|
createMockLedgerAdapter,
|
|
@@ -106,6 +118,7 @@ import {
|
|
|
106
118
|
createShieldedPayment,
|
|
107
119
|
createSmartRouter,
|
|
108
120
|
createSolanaAdapter,
|
|
121
|
+
createSurveillanceAnalyzer,
|
|
109
122
|
createTaprootOutput,
|
|
110
123
|
createTrezorAdapter,
|
|
111
124
|
createWalletFactory,
|
|
@@ -116,6 +129,7 @@ import {
|
|
|
116
129
|
decodeTaprootAddress,
|
|
117
130
|
decryptMemo,
|
|
118
131
|
decryptWithViewing,
|
|
132
|
+
defaultRegistry,
|
|
119
133
|
deriveAptosStealthPrivateKey,
|
|
120
134
|
deriveOracleId,
|
|
121
135
|
deriveSuiStealthPrivateKey,
|
|
@@ -123,7 +137,9 @@ import {
|
|
|
123
137
|
deserializeAttestationMessage,
|
|
124
138
|
deserializeIntent,
|
|
125
139
|
deserializePayment,
|
|
140
|
+
detectClusters,
|
|
126
141
|
detectEthereumWallets,
|
|
142
|
+
detectExchangeExposure,
|
|
127
143
|
detectMobileBrowser,
|
|
128
144
|
detectMobilePlatform,
|
|
129
145
|
detectSolanaWallets,
|
|
@@ -131,6 +147,7 @@ import {
|
|
|
131
147
|
ed25519PublicKeyToSuiAddress,
|
|
132
148
|
encryptForViewing,
|
|
133
149
|
featureNotSupportedError,
|
|
150
|
+
fetchAttestation,
|
|
134
151
|
formatStablecoinAmount,
|
|
135
152
|
fromHex,
|
|
136
153
|
fromStablecoinUnits,
|
|
@@ -220,12 +237,13 @@ import {
|
|
|
220
237
|
trackPayment,
|
|
221
238
|
updateOracleStatus,
|
|
222
239
|
verifyAttestation,
|
|
240
|
+
verifyAttestationSignature,
|
|
223
241
|
verifyCommitment,
|
|
224
242
|
verifyOpening,
|
|
225
243
|
verifyOracleSignature,
|
|
226
244
|
verifyOwnership,
|
|
227
245
|
walletRegistry
|
|
228
|
-
} from "./chunk-
|
|
246
|
+
} from "./chunk-3M3HNQCW.mjs";
|
|
229
247
|
import {
|
|
230
248
|
fulfillment_proof_default,
|
|
231
249
|
funding_proof_default,
|
|
@@ -235,10 +253,14 @@ import {
|
|
|
235
253
|
ProofGenerationError
|
|
236
254
|
} from "./chunk-HOR7PM3M.mjs";
|
|
237
255
|
import {
|
|
256
|
+
GenericProvider,
|
|
257
|
+
HeliusProvider,
|
|
238
258
|
checkEd25519StealthAddress,
|
|
239
259
|
checkStealthAddress,
|
|
240
260
|
claimStealthPayment,
|
|
241
261
|
createAnnouncementMemo,
|
|
262
|
+
createProvider,
|
|
263
|
+
createWebhookHandler,
|
|
242
264
|
decodeStealthMetaAddress,
|
|
243
265
|
deriveEd25519StealthPrivateKey,
|
|
244
266
|
deriveStealthPrivateKey,
|
|
@@ -271,6 +293,7 @@ import {
|
|
|
271
293
|
isValidStealthMetaAddress,
|
|
272
294
|
nearAddressToEd25519PublicKey,
|
|
273
295
|
parseAnnouncement,
|
|
296
|
+
processWebhookTransaction,
|
|
274
297
|
publicKeyToEthAddress,
|
|
275
298
|
scanForPayments,
|
|
276
299
|
secureWipe,
|
|
@@ -285,7 +308,7 @@ import {
|
|
|
285
308
|
validateViewingKey,
|
|
286
309
|
withSecureBuffer,
|
|
287
310
|
withSecureBufferSync
|
|
288
|
-
} from "./chunk-
|
|
311
|
+
} from "./chunk-2XIVXWHA.mjs";
|
|
289
312
|
import {
|
|
290
313
|
CryptoError,
|
|
291
314
|
EncryptionNotImplementedError,
|
|
@@ -1784,6 +1807,8 @@ var ProofWorker = class _ProofWorker {
|
|
|
1784
1807
|
export {
|
|
1785
1808
|
ATTESTATION_VERSION,
|
|
1786
1809
|
AptosStealthService,
|
|
1810
|
+
AttestationGatedDisclosure,
|
|
1811
|
+
AttestationSchema,
|
|
1787
1812
|
AuditorKeyDerivation,
|
|
1788
1813
|
AuditorType,
|
|
1789
1814
|
BaseWalletAdapter,
|
|
@@ -1802,11 +1827,14 @@ export {
|
|
|
1802
1827
|
ErrorCode,
|
|
1803
1828
|
EthereumChainId,
|
|
1804
1829
|
EthereumWalletAdapter,
|
|
1830
|
+
GenericProvider,
|
|
1805
1831
|
HardwareErrorCode,
|
|
1806
1832
|
HardwareWalletError,
|
|
1833
|
+
HeliusProvider,
|
|
1807
1834
|
IntentBuilder,
|
|
1808
1835
|
IntentError,
|
|
1809
1836
|
IntentStatus,
|
|
1837
|
+
KNOWN_EXCHANGES,
|
|
1810
1838
|
LedgerWalletAdapter,
|
|
1811
1839
|
MEMO_PROGRAM_ID,
|
|
1812
1840
|
MockEthereumAdapter,
|
|
@@ -1828,7 +1856,9 @@ export {
|
|
|
1828
1856
|
OneClickSwapType,
|
|
1829
1857
|
PaymentBuilder,
|
|
1830
1858
|
PaymentStatus,
|
|
1859
|
+
PrivacyBackendRegistry,
|
|
1831
1860
|
PrivacyLevel,
|
|
1861
|
+
SmartRouter2 as PrivacySmartRouter,
|
|
1832
1862
|
PrivateNFT,
|
|
1833
1863
|
PrivateVoting,
|
|
1834
1864
|
ProofError,
|
|
@@ -1839,6 +1869,7 @@ export {
|
|
|
1839
1869
|
ReportStatus,
|
|
1840
1870
|
SIP,
|
|
1841
1871
|
SIPError,
|
|
1872
|
+
SIPNativeBackend,
|
|
1842
1873
|
SIP_MEMO_PREFIX,
|
|
1843
1874
|
SIP_VERSION,
|
|
1844
1875
|
SOLANA_EXPLORER_URLS,
|
|
@@ -1855,6 +1886,7 @@ export {
|
|
|
1855
1886
|
SolanaSameChainExecutor,
|
|
1856
1887
|
SolanaWalletAdapter,
|
|
1857
1888
|
SuiStealthService,
|
|
1889
|
+
SurveillanceAnalyzer,
|
|
1858
1890
|
SwapStatus,
|
|
1859
1891
|
ThresholdViewingKey,
|
|
1860
1892
|
Treasury,
|
|
@@ -1871,11 +1903,15 @@ export {
|
|
|
1871
1903
|
addBlindings,
|
|
1872
1904
|
addCommitments,
|
|
1873
1905
|
addOracle,
|
|
1906
|
+
analyzeAddressReuse,
|
|
1907
|
+
analyzeTemporalPatterns,
|
|
1874
1908
|
aptosAddressToAuthKey,
|
|
1875
1909
|
attachProofs,
|
|
1876
1910
|
base58ToHex,
|
|
1877
1911
|
bytesToHex as browserBytesToHex,
|
|
1878
1912
|
hexToBytes as browserHexToBytes,
|
|
1913
|
+
calculatePrivacyScore,
|
|
1914
|
+
calculateSIPComparison,
|
|
1879
1915
|
checkAptosStealthAddress,
|
|
1880
1916
|
checkEd25519StealthAddress,
|
|
1881
1917
|
checkMobileWASMCompatibility,
|
|
@@ -1891,6 +1927,7 @@ export {
|
|
|
1891
1927
|
createEthereumAdapter,
|
|
1892
1928
|
createKeySpendOnlyOutput,
|
|
1893
1929
|
createLedgerAdapter,
|
|
1930
|
+
createMockAttestation,
|
|
1894
1931
|
createMockEthereumAdapter,
|
|
1895
1932
|
createMockEthereumProvider,
|
|
1896
1933
|
createMockLedgerAdapter,
|
|
@@ -1905,6 +1942,7 @@ export {
|
|
|
1905
1942
|
createPrivateOwnership,
|
|
1906
1943
|
createPrivateVoting,
|
|
1907
1944
|
createProductionSIP,
|
|
1945
|
+
createProvider,
|
|
1908
1946
|
createSIP,
|
|
1909
1947
|
createSameChainExecutor,
|
|
1910
1948
|
createSealedBidAuction,
|
|
@@ -1912,9 +1950,11 @@ export {
|
|
|
1912
1950
|
createShieldedPayment,
|
|
1913
1951
|
createSmartRouter,
|
|
1914
1952
|
createSolanaAdapter,
|
|
1953
|
+
createSurveillanceAnalyzer,
|
|
1915
1954
|
createTaprootOutput,
|
|
1916
1955
|
createTrezorAdapter,
|
|
1917
1956
|
createWalletFactory,
|
|
1957
|
+
createWebhookHandler,
|
|
1918
1958
|
createWorkerBlobURL,
|
|
1919
1959
|
createZcashClient,
|
|
1920
1960
|
createZcashNativeBackend,
|
|
@@ -1924,6 +1964,7 @@ export {
|
|
|
1924
1964
|
decodeTaprootAddress,
|
|
1925
1965
|
decryptMemo,
|
|
1926
1966
|
decryptWithViewing,
|
|
1967
|
+
defaultRegistry,
|
|
1927
1968
|
deriveAptosStealthPrivateKey,
|
|
1928
1969
|
deriveEd25519StealthPrivateKey,
|
|
1929
1970
|
deriveOracleId,
|
|
@@ -1933,7 +1974,9 @@ export {
|
|
|
1933
1974
|
deserializeAttestationMessage,
|
|
1934
1975
|
deserializeIntent,
|
|
1935
1976
|
deserializePayment,
|
|
1977
|
+
detectClusters,
|
|
1936
1978
|
detectEthereumWallets,
|
|
1979
|
+
detectExchangeExposure,
|
|
1937
1980
|
detectMobileBrowser,
|
|
1938
1981
|
detectMobilePlatform,
|
|
1939
1982
|
detectSolanaWallets,
|
|
@@ -1945,6 +1988,7 @@ export {
|
|
|
1945
1988
|
encryptForViewing,
|
|
1946
1989
|
estimatePrivateTransferFee,
|
|
1947
1990
|
featureNotSupportedError,
|
|
1991
|
+
fetchAttestation,
|
|
1948
1992
|
formatStablecoinAmount,
|
|
1949
1993
|
fromHex,
|
|
1950
1994
|
fromStablecoinUnits,
|
|
@@ -2033,6 +2077,7 @@ export {
|
|
|
2033
2077
|
normalizeSuiAddress,
|
|
2034
2078
|
notConnectedError,
|
|
2035
2079
|
parseAnnouncement,
|
|
2080
|
+
processWebhookTransaction,
|
|
2036
2081
|
proveOwnership,
|
|
2037
2082
|
publicKeyToEthAddress,
|
|
2038
2083
|
registerWallet,
|
|
@@ -2076,6 +2121,7 @@ export {
|
|
|
2076
2121
|
validateScalar,
|
|
2077
2122
|
validateViewingKey,
|
|
2078
2123
|
verifyAttestation,
|
|
2124
|
+
verifyAttestationSignature,
|
|
2079
2125
|
verifyCommitment,
|
|
2080
2126
|
verifyOpening,
|
|
2081
2127
|
verifyOracleSignature,
|