@sip-protocol/react 0.1.0 → 0.1.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/README.md +54 -14
- package/dist/index.d.mts +1224 -6
- package/dist/index.d.ts +1224 -6
- package/dist/index.js +5783 -10
- package/dist/index.mjs +5777 -9
- package/package.json +9 -8
- package/src/components/ethereum/index.ts +55 -0
- package/src/components/ethereum/privacy-toggle.tsx +822 -0
- package/src/components/ethereum/stealth-address-display.tsx +1050 -0
- package/src/components/ethereum/transaction-history.tsx +1187 -0
- package/src/components/ethereum/transaction-tracker.tsx +302 -0
- package/src/components/ethereum/viewing-key-manager.tsx +228 -0
- package/src/components/index.ts +107 -0
- package/src/components/privacy-toggle.tsx +548 -0
- package/src/components/stealth-address-display.tsx +770 -0
- package/src/components/transaction-history.tsx +651 -0
- package/src/components/transaction-tracker.tsx +1079 -0
- package/src/components/viewing-key-manager.tsx +1576 -0
- package/src/hooks/index.ts +61 -0
- package/src/hooks/use-privacy-advisor.ts +371 -0
- package/src/hooks/use-private-swap.ts +5 -5
- package/src/hooks/use-proof-composition.ts +654 -0
- package/src/hooks/use-scan-payments.ts +504 -0
- package/src/hooks/use-stealth-address.ts +23 -7
- package/src/hooks/use-stealth-transfer.ts +284 -0
- package/src/hooks/use-transaction-history.ts +435 -0
- package/src/index.ts +75 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sip-protocol/react",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "React hooks for Shielded Intents Protocol",
|
|
5
5
|
"author": "SIP Protocol <hello@sip-protocol.org>",
|
|
6
6
|
"homepage": "https://sip-protocol.org",
|
|
@@ -27,22 +27,23 @@
|
|
|
27
27
|
"src"
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@sip-protocol/sdk": "
|
|
31
|
-
"@sip-protocol/types": "
|
|
30
|
+
"@sip-protocol/sdk": "0.11.0",
|
|
31
|
+
"@sip-protocol/types": "0.2.2"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
34
|
"react": "^18.0.0",
|
|
35
35
|
"react-dom": "^18.0.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@testing-library/
|
|
38
|
+
"@testing-library/jest-dom": "^6.9.1",
|
|
39
|
+
"@testing-library/react": "^16.3.2",
|
|
39
40
|
"@testing-library/react-hooks": "^8.0.1",
|
|
40
|
-
"@types/react": "^
|
|
41
|
-
"@types/react-dom": "^
|
|
42
|
-
"jsdom": "^27.
|
|
41
|
+
"@types/react": "^19.2.8",
|
|
42
|
+
"@types/react-dom": "^19.2.3",
|
|
43
|
+
"jsdom": "^27.4.0",
|
|
43
44
|
"tsup": "^8.0.0",
|
|
44
45
|
"typescript": "^5.3.0",
|
|
45
|
-
"vitest": "^
|
|
46
|
+
"vitest": "^4.1.0"
|
|
46
47
|
},
|
|
47
48
|
"keywords": [
|
|
48
49
|
"sip",
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ethereum-specific React Components
|
|
3
|
+
*
|
|
4
|
+
* Presets and utilities for using SIP Protocol components with Ethereum.
|
|
5
|
+
*
|
|
6
|
+
* @module components/ethereum
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
export {
|
|
10
|
+
EthereumPrivacyToggle,
|
|
11
|
+
useEthereumPrivacyToggle,
|
|
12
|
+
type EthereumPrivacyToggleProps,
|
|
13
|
+
type EthereumPrivacyLevel,
|
|
14
|
+
type EthereumNetworkId,
|
|
15
|
+
type EthereumGasEstimate,
|
|
16
|
+
type NetworkGasConfig,
|
|
17
|
+
type EthereumPrivacyLevelInfo,
|
|
18
|
+
} from './privacy-toggle'
|
|
19
|
+
|
|
20
|
+
export {
|
|
21
|
+
EthereumTransactionTracker,
|
|
22
|
+
useEthereumTransactionTracker,
|
|
23
|
+
ETHEREUM_NETWORKS,
|
|
24
|
+
type EthereumTransactionTrackerProps,
|
|
25
|
+
type EthereumNetwork,
|
|
26
|
+
} from './transaction-tracker'
|
|
27
|
+
|
|
28
|
+
export {
|
|
29
|
+
EthereumViewingKeyManager,
|
|
30
|
+
useEthereumViewingKey,
|
|
31
|
+
type EthereumViewingKeyManagerProps,
|
|
32
|
+
} from './viewing-key-manager'
|
|
33
|
+
|
|
34
|
+
export {
|
|
35
|
+
TransactionHistory,
|
|
36
|
+
useTransactionHistory,
|
|
37
|
+
type TransactionHistoryProps,
|
|
38
|
+
type PrivacyTransactionHistoryItem,
|
|
39
|
+
type TransactionHistoryFilter,
|
|
40
|
+
type TransactionHistorySort,
|
|
41
|
+
} from './transaction-history'
|
|
42
|
+
|
|
43
|
+
export {
|
|
44
|
+
EthereumStealthAddressDisplay,
|
|
45
|
+
useEthereumStealthAddressDisplay,
|
|
46
|
+
ETHEREUM_STEALTH_NETWORKS,
|
|
47
|
+
isValidEthereumAddress,
|
|
48
|
+
isValidEthereumStealthAddress,
|
|
49
|
+
isValidEphemeralPublicKey,
|
|
50
|
+
truncateEthereumAddress,
|
|
51
|
+
type EthereumStealthAddressDisplayProps,
|
|
52
|
+
type EthereumOwnershipStatus,
|
|
53
|
+
type EthereumStealthNetworkId,
|
|
54
|
+
type EthereumStealthNetworkConfig,
|
|
55
|
+
} from './stealth-address-display'
|