solvoid 1.0.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/LICENSE +21 -0
- package/README.md +123 -0
- package/SECURITY.md +174 -0
- package/bin/solvoid-scan +2 -0
- package/dist/cli/privacy-scan.d.ts +11 -0
- package/dist/cli/privacy-scan.d.ts.map +1 -0
- package/dist/cli/privacy-scan.js +112 -0
- package/dist/cli/privacy-scan.js.map +1 -0
- package/dist/cli/solvoid-scan.d.ts +13 -0
- package/dist/cli/solvoid-scan.d.ts.map +1 -0
- package/dist/cli/solvoid-scan.js +174 -0
- package/dist/cli/solvoid-scan.js.map +1 -0
- package/dist/cli/test-forensics.d.ts +2 -0
- package/dist/cli/test-forensics.d.ts.map +1 -0
- package/dist/cli/test-forensics.js +90 -0
- package/dist/cli/test-forensics.js.map +1 -0
- package/dist/cli/test-scenarios.d.ts +2 -0
- package/dist/cli/test-scenarios.d.ts.map +1 -0
- package/dist/cli/test-scenarios.js +96 -0
- package/dist/cli/test-scenarios.js.map +1 -0
- package/dist/examples/enterprise-demo.js +65 -0
- package/dist/sdk/client.d.ts +77 -0
- package/dist/sdk/client.d.ts.map +1 -0
- package/dist/sdk/client.js +180 -0
- package/dist/sdk/client.js.map +1 -0
- package/dist/sdk/compliance/identity.d.ts +34 -0
- package/dist/sdk/compliance/identity.d.ts.map +1 -0
- package/dist/sdk/compliance/identity.js +55 -0
- package/dist/sdk/compliance/identity.js.map +1 -0
- package/dist/sdk/compliance/threat-model.d.ts +14 -0
- package/dist/sdk/compliance/threat-model.d.ts.map +1 -0
- package/dist/sdk/compliance/threat-model.js +101 -0
- package/dist/sdk/compliance/threat-model.js.map +1 -0
- package/dist/sdk/forensics/mev.js +50 -0
- package/dist/sdk/forensics/order-flow.d.ts +20 -0
- package/dist/sdk/forensics/order-flow.d.ts.map +1 -0
- package/dist/sdk/forensics/order-flow.js +104 -0
- package/dist/sdk/forensics/order-flow.js.map +1 -0
- package/dist/sdk/forensics/simulation.d.ts +14 -0
- package/dist/sdk/forensics/simulation.d.ts.map +1 -0
- package/dist/sdk/forensics/simulation.js +45 -0
- package/dist/sdk/forensics/simulation.js.map +1 -0
- package/dist/sdk/index.d.ts +10 -0
- package/dist/sdk/index.d.ts.map +1 -0
- package/dist/sdk/index.js +43 -0
- package/dist/sdk/index.js.map +1 -0
- package/dist/sdk/network/shadow-rpc.d.ts +18 -0
- package/dist/sdk/network/shadow-rpc.d.ts.map +1 -0
- package/dist/sdk/network/shadow-rpc.js +32 -0
- package/dist/sdk/network/shadow-rpc.js.map +1 -0
- package/dist/sdk/obfuscator.d.ts +36 -0
- package/dist/sdk/obfuscator.d.ts.map +1 -0
- package/dist/sdk/obfuscator.js +77 -0
- package/dist/sdk/obfuscator.js.map +1 -0
- package/dist/sdk/passport/manager.d.ts +36 -0
- package/dist/sdk/passport/manager.d.ts.map +1 -0
- package/dist/sdk/passport/manager.js +107 -0
- package/dist/sdk/passport/manager.js.map +1 -0
- package/dist/sdk/pipeline.d.ts +34 -0
- package/dist/sdk/pipeline.d.ts.map +1 -0
- package/dist/sdk/pipeline.js +81 -0
- package/dist/sdk/pipeline.js.map +1 -0
- package/dist/sdk/privacy/confidential-transfer.d.ts +81 -0
- package/dist/sdk/privacy/confidential-transfer.d.ts.map +1 -0
- package/dist/sdk/privacy/confidential-transfer.js +158 -0
- package/dist/sdk/privacy/confidential-transfer.js.map +1 -0
- package/dist/sdk/privacy/history.d.ts +11 -0
- package/dist/sdk/privacy/history.d.ts.map +1 -0
- package/dist/sdk/privacy/history.js +110 -0
- package/dist/sdk/privacy/history.js.map +1 -0
- package/dist/sdk/privacy/light-protocol.d.ts +42 -0
- package/dist/sdk/privacy/light-protocol.d.ts.map +1 -0
- package/dist/sdk/privacy/light-protocol.js +83 -0
- package/dist/sdk/privacy/light-protocol.js.map +1 -0
- package/dist/sdk/privacy/relayer.d.ts +12 -0
- package/dist/sdk/privacy/relayer.d.ts.map +1 -0
- package/dist/sdk/privacy/relayer.js +55 -0
- package/dist/sdk/privacy/relayer.js.map +1 -0
- package/dist/sdk/privacy/safe-obfuscator.d.ts +38 -0
- package/dist/sdk/privacy/safe-obfuscator.d.ts.map +1 -0
- package/dist/sdk/privacy/safe-obfuscator.js +101 -0
- package/dist/sdk/privacy/safe-obfuscator.js.map +1 -0
- package/dist/sdk/privacy/shield.d.ts +34 -0
- package/dist/sdk/privacy/shield.d.ts.map +1 -0
- package/dist/sdk/privacy/shield.js +174 -0
- package/dist/sdk/privacy/shield.js.map +1 -0
- package/dist/sdk/privacy/zk.js +43 -0
- package/dist/sdk/privacy-engine.d.ts +11 -0
- package/dist/sdk/privacy-engine.d.ts.map +1 -0
- package/dist/sdk/privacy-engine.js +165 -0
- package/dist/sdk/privacy-engine.js.map +1 -0
- package/dist/sdk/registry/idl-fetcher.d.ts +17 -0
- package/dist/sdk/registry/idl-fetcher.d.ts.map +1 -0
- package/dist/sdk/registry/idl-fetcher.js +98 -0
- package/dist/sdk/registry/idl-fetcher.js.map +1 -0
- package/dist/sdk/registry/programs.d.ts +18 -0
- package/dist/sdk/registry/programs.d.ts.map +1 -0
- package/dist/sdk/registry/programs.js +45 -0
- package/dist/sdk/registry/programs.js.map +1 -0
- package/dist/sdk/rescue/analyzer.d.ts +22 -0
- package/dist/sdk/rescue/analyzer.d.ts.map +1 -0
- package/dist/sdk/rescue/analyzer.js +46 -0
- package/dist/sdk/rescue/analyzer.js.map +1 -0
- package/dist/sdk/rescue/builder.d.ts +16 -0
- package/dist/sdk/rescue/builder.d.ts.map +1 -0
- package/dist/sdk/rescue/builder.js +33 -0
- package/dist/sdk/rescue/builder.js.map +1 -0
- package/dist/sdk/semantics/analyzer.d.ts +1 -0
- package/dist/sdk/semantics/analyzer.d.ts.map +1 -0
- package/dist/sdk/semantics/analyzer.js +2 -0
- package/dist/sdk/semantics/analyzer.js.map +1 -0
- package/dist/sdk/semantics/decoder.d.ts +7 -0
- package/dist/sdk/semantics/decoder.d.ts.map +1 -0
- package/dist/sdk/semantics/decoder.js +30 -0
- package/dist/sdk/semantics/decoder.js.map +1 -0
- package/dist/sdk/semantics/graph.d.ts +1 -0
- package/dist/sdk/semantics/graph.d.ts.map +1 -0
- package/dist/sdk/semantics/graph.js +2 -0
- package/dist/sdk/semantics/graph.js.map +1 -0
- package/dist/sdk/semantics/idl-registry.d.ts +7 -0
- package/dist/sdk/semantics/idl-registry.d.ts.map +1 -0
- package/dist/sdk/semantics/idl-registry.js +95 -0
- package/dist/sdk/semantics/idl-registry.js.map +1 -0
- package/dist/sdk/semantics/types.d.ts +44 -0
- package/dist/sdk/semantics/types.d.ts.map +1 -0
- package/dist/sdk/semantics/types.js +3 -0
- package/dist/sdk/semantics/types.js.map +1 -0
- package/dist/sdk/simulator.d.ts +15 -0
- package/dist/sdk/simulator.d.ts.map +1 -0
- package/dist/sdk/simulator.js +133 -0
- package/dist/sdk/simulator.js.map +1 -0
- package/dist/sdk/types.d.ts +53 -0
- package/dist/sdk/types.d.ts.map +1 -0
- package/dist/sdk/types.js +3 -0
- package/dist/sdk/types.js.map +1 -0
- package/dist/sdk/utils/config.d.ts +15 -0
- package/dist/sdk/utils/config.d.ts.map +1 -0
- package/dist/sdk/utils/config.js +40 -0
- package/dist/sdk/utils/config.js.map +1 -0
- package/dist/sdk/utils/logger.d.ts +3 -0
- package/dist/sdk/utils/logger.d.ts.map +1 -0
- package/dist/sdk/utils/logger.js +17 -0
- package/dist/sdk/utils/logger.js.map +1 -0
- package/dist/tests/unit/idl-registry.test.d.ts +2 -0
- package/dist/tests/unit/idl-registry.test.d.ts.map +1 -0
- package/dist/tests/unit/idl-registry.test.js +35 -0
- package/dist/tests/unit/idl-registry.test.js.map +1 -0
- package/dist/tools/exploit_demonstration.js +99 -0
- package/dist/tools/gen-tx.js +29 -0
- package/dist/tools/get-recent-tx.js +18 -0
- package/package.json +95 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const web3_js_1 = require("@solana/web3.js");
|
|
4
|
+
// Mock Transaction Construction
|
|
5
|
+
const user = "5ZwJqpwa5u43t4i88888888888888888888888888888"; // Needs to be 32 bytes valid key? No, VersionedTransaction uses whatever.
|
|
6
|
+
// But web3.js needs valid keys to serialize.
|
|
7
|
+
// I'll just output the same base64 I'd expect if I could serialize it easily,
|
|
8
|
+
// OR I'll just use a valid mock transaction buffer.
|
|
9
|
+
// Let's use a dummy valid transaction base64 from a real network or just a valid structure.
|
|
10
|
+
// Actually, `privacy-scan` in `--fix` mode calls `VersionedTransaction.deserialize`.
|
|
11
|
+
// It needs to be a valid serializable transaction.
|
|
12
|
+
// Minimal approach: Use the sample-swap.json and pretend we passed it as base64?
|
|
13
|
+
// No, the tool expects raw base64 arg if not file.
|
|
14
|
+
// Let's create a script that outputs a valid base64 string for a dummy transaction
|
|
15
|
+
const fromKey = web3_js_1.Keypair.generate();
|
|
16
|
+
const toKey = web3_js_1.Keypair.generate();
|
|
17
|
+
const recentBlockhash = web3_js_1.Keypair.generate().publicKey.toBase58(); // Mock blockhash
|
|
18
|
+
const tx = new web3_js_1.Transaction({
|
|
19
|
+
feePayer: fromKey.publicKey,
|
|
20
|
+
recentBlockhash: recentBlockhash
|
|
21
|
+
});
|
|
22
|
+
tx.add(web3_js_1.SystemProgram.transfer({
|
|
23
|
+
fromPubkey: fromKey.publicKey,
|
|
24
|
+
toPubkey: toKey.publicKey,
|
|
25
|
+
lamports: 1000
|
|
26
|
+
}));
|
|
27
|
+
// We need to sign it to serialize? Or `serialize({ requireAllSignatures: false })`
|
|
28
|
+
const serialized = tx.serialize({ requireAllSignatures: false });
|
|
29
|
+
console.log(serialized.toString('base64'));
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const web3_js_1 = require("@solana/web3.js");
|
|
4
|
+
async function main() {
|
|
5
|
+
const programId = new web3_js_1.PublicKey(process.argv[2]);
|
|
6
|
+
const connection = new web3_js_1.Connection("https://api.mainnet-beta.solana.com");
|
|
7
|
+
// Get recent signatures for this address
|
|
8
|
+
const signatures = await connection.getSignaturesForAddress(programId, { limit: 1 });
|
|
9
|
+
if (signatures.length === 0) {
|
|
10
|
+
console.error("No transactions found for this address.");
|
|
11
|
+
process.exit(1);
|
|
12
|
+
}
|
|
13
|
+
console.log(signatures[0].signature);
|
|
14
|
+
}
|
|
15
|
+
main().catch(e => {
|
|
16
|
+
console.error(e);
|
|
17
|
+
process.exit(1);
|
|
18
|
+
});
|
package/package.json
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "solvoid",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Cryptographically enforced privacy protocol for Solana",
|
|
5
|
+
"main": "dist/sdk/index.js",
|
|
6
|
+
"types": "dist/sdk/index.d.ts",
|
|
7
|
+
"bin": {
|
|
8
|
+
"solvoid-scan": "./bin/solvoid-scan"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"dist/**/*",
|
|
12
|
+
"bin/**/*",
|
|
13
|
+
"README.md",
|
|
14
|
+
"LICENSE",
|
|
15
|
+
"SECURITY.md"
|
|
16
|
+
],
|
|
17
|
+
"scripts": {
|
|
18
|
+
"build": "tsc",
|
|
19
|
+
"test": "jest --coverage",
|
|
20
|
+
"test:unit": "jest --testPathPattern=tests/unit",
|
|
21
|
+
"test:integration": "jest --testPathPattern=tests/integration",
|
|
22
|
+
"lint": "eslint sdk cli --ext .ts",
|
|
23
|
+
"prepublishOnly": "npm test && npm run build",
|
|
24
|
+
"preversion": "npm test",
|
|
25
|
+
"version": "npm run build && git add -A",
|
|
26
|
+
"postversion": "git push && git push --tags",
|
|
27
|
+
"docs": "typedoc --out docs sdk/"
|
|
28
|
+
},
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"@coral-xyz/anchor": "^0.30.1",
|
|
31
|
+
"@coral-xyz/borsh": "^0.32.1",
|
|
32
|
+
"@lightprotocol/stateless.js": "^0.22.0",
|
|
33
|
+
"@solana/spl-token": "^0.1.8",
|
|
34
|
+
"@solana/web3.js": "^1.98.0",
|
|
35
|
+
"arg": "^5.0.2",
|
|
36
|
+
"bs58": "^5.0.0",
|
|
37
|
+
"circomlib": "^2.0.5",
|
|
38
|
+
"circomlibjs": "^0.1.7",
|
|
39
|
+
"cross-fetch": "^4.1.0",
|
|
40
|
+
"dotenv": "^16.4.5",
|
|
41
|
+
"express": "^4.19.0",
|
|
42
|
+
"p-retry": "^7.1.1",
|
|
43
|
+
"pako": "^2.1.0",
|
|
44
|
+
"snarkjs": "^0.7.4",
|
|
45
|
+
"winston": "^3.19.0"
|
|
46
|
+
},
|
|
47
|
+
"devDependencies": {
|
|
48
|
+
"@types/dotenv": "^8.2.3",
|
|
49
|
+
"@types/express": "^5.0.6",
|
|
50
|
+
"@types/jest": "^29.5.12",
|
|
51
|
+
"@types/node": "^22.0.0",
|
|
52
|
+
"@types/pako": "^2.0.4",
|
|
53
|
+
"@typescript-eslint/eslint-plugin": "^7.0.0",
|
|
54
|
+
"@typescript-eslint/parser": "^7.0.0",
|
|
55
|
+
"eslint": "^8.57.0",
|
|
56
|
+
"jest": "^29.7.0",
|
|
57
|
+
"ts-jest": "^29.1.2",
|
|
58
|
+
"ts-node": "^10.9.2",
|
|
59
|
+
"typedoc": "^0.28.16",
|
|
60
|
+
"typescript": "^5.4.0"
|
|
61
|
+
},
|
|
62
|
+
"peerDependencies": {
|
|
63
|
+
"@jito-foundation/jito-ts": ">=3.0.0"
|
|
64
|
+
},
|
|
65
|
+
"peerDependenciesMeta": {
|
|
66
|
+
"@jito-foundation/jito-ts": {
|
|
67
|
+
"optional": true
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"engines": {
|
|
71
|
+
"node": ">=16.0.0"
|
|
72
|
+
},
|
|
73
|
+
"keywords": [
|
|
74
|
+
"solana",
|
|
75
|
+
"privacy",
|
|
76
|
+
"security",
|
|
77
|
+
"scanner",
|
|
78
|
+
"leak-detection",
|
|
79
|
+
"opsec",
|
|
80
|
+
"audit",
|
|
81
|
+
"blockchain",
|
|
82
|
+
"mev",
|
|
83
|
+
"compliance"
|
|
84
|
+
],
|
|
85
|
+
"author": "SolVoid Contributors",
|
|
86
|
+
"license": "MIT",
|
|
87
|
+
"repository": {
|
|
88
|
+
"type": "git",
|
|
89
|
+
"url": "https://github.com/solvoid/solvoid"
|
|
90
|
+
},
|
|
91
|
+
"bugs": {
|
|
92
|
+
"url": "https://github.com/solvoid/solvoid/issues"
|
|
93
|
+
},
|
|
94
|
+
"homepage": "https://github.com/solvoid/solvoid#readme"
|
|
95
|
+
}
|