-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpackage.json
More file actions
166 lines (166 loc) · 12.4 KB
/
Copy pathpackage.json
File metadata and controls
166 lines (166 loc) · 12.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
{
"name": "trustlink-pay",
"version": "1.0.0",
"description": "TrustLink Pay - Identity-first blockchain payments on Solana",
"keywords": [
"TrustLink Pay",
"Solana payments",
"stablecoin transfer",
"identity-first payments",
"TSN Transfer Settlement Network",
"Cranker settlement",
"TIP Transfer Identity Protocol",
"peer-to-peer payments",
"cross-border payments",
"remittance",
"privacy preserving"
],
"homepage": "https://trustlink-pay.vercel.app/",
"repository": {
"type": "git",
"url": "https://github.com/bigdreamsweb3/trustlink-pay"
},
"bugs": {
"url": "https://github.com/bigdreamsweb3/trustlink-pay/issues"
},
"license": "MIT",
"author": {
"name": "Agbaka Matthew Daniel aka Big Dreams Web3",
"url": "https://x.com/0xbigdream",
"country": "Nigeria"
},
"engines": {
"node": ">=18.0.0"
},
"scripts": {
"// === Core Development ===": "Start here. Daily local commands.",
"help": "echo \"Run components separately: rpc:gateway:dev, tsn:receiver:dev, tsn:node:dev, backend:dev, tsn:cranker:start, frontend:dev\"",
"restart:ubuntu": "bash scripts/restart-wsl-ubuntu.sh",
"// === Frontend ===": "TrustLink Pay user interface on port 3001.",
"frontend:dev": "npm --prefix frontend run dev",
"frontend:typecheck": "npm --prefix frontend run typecheck",
"frontend:install": "npm --prefix frontend install",
"frontend:clean": "node -e \"const fs=require('fs');fs.rmSync('frontend/.next',{recursive:true,force:true})\"",
"// === Backend ===": "TrustLink Pay API, user records, notifications, and payment history on port 3000.",
"backend:dev": "npm --prefix backend run dev",
"backend:typecheck": "npm --prefix backend run typecheck",
"backend:install": "npm --prefix backend install",
"backend:clean": "node -e \"const fs=require('fs');fs.rmSync('backend/.next',{recursive:true,force:true})\"",
"db:init": "npm --prefix backend run db:init",
"db:reset": "npm --prefix backend run db:reset",
"whatsapp:tunnel": "powershell.exe -NoProfile -ExecutionPolicy Bypass -File scripts/windows/start-whatsapp-tunnel.ps1",
"// === Mempool Stack ===": "TSN work queue, epoch coordinator, and mempool explorer.",
"tsn:node:dev": "cd tsn-protocol/services/tsn-node && ..\\..\\..\\.venv\\Scripts\\python.exe -u server.py",
"tsn:node:keys": "node scripts/tsn-node-key-setup.mjs",
"tsn:receiver:dev": "npm --prefix tsn-protocol/services/tsn-receiver run dev",
"tsn:receiver:test": "npm --prefix tsn-protocol/services/tsn-receiver test",
"tsn:receiver:build": "npm --prefix tsn-protocol/services/tsn-receiver run build",
"tsn:mempool-ui:dev": "cd tsn-protocol/services/tsn-mempool-ui && node ../../../frontend/node_modules/next/dist/bin/next dev -p 3002",
"mempool:install": "node scripts/install-tsn-mempool-python.mjs",
"// === TSN Program ===": "Transfer Settlement Network on-chain program and private settlement setup.",
"deploy:doctor": "node scripts/solana-deploy-doctor.mjs",
"deploy:lockfiles:stabilize": "node scripts/solana-lockfile-stabilize.mjs",
"tsn:program:id": "echo TSN31jddtsmUg4D5aEdhY31nwB1e53VJJg9X8NoRP8V",
"tsn:docs:pull": "node scripts/pull-tsn-docs.mjs",
"tsn:program:build": "npm run tsn:program:build:devnet",
"tsn:program:build:devnet": "node scripts/devnet-program-deploy.mjs build tsn",
"tsn:program:deploy:devnet": "TRUSTLINK_DEPLOY_TRANSPORT=quic TRUSTLINK_DEPLOY_RECOVERY_ROUNDS=1 node scripts/devnet-program-deploy.mjs deploy tsn",
"tcap:program:build:devnet": "node scripts/devnet-program-deploy.mjs build tcap",
"tcap:program:deploy:devnet": "TRUSTLINK_DEPLOY_TRANSPORT=quic TRUSTLINK_DEPLOY_RECOVERY_ROUNDS=1 node scripts/devnet-program-deploy.mjs deploy tcap",
"network:status": "node scripts/network/status.mjs",
"network:init-asset": "node scripts/network/init-asset.mjs",
"network:set-defaults": "node scripts/network/set-defaults.mjs",
"protocol-tests:ui": "node protocol-tests/ui/server.mjs --local",
"protocol-tests:ui:live": "node protocol-tests/ui/server.mjs",
"programs:devnet:deploy": "TRUSTLINK_DEPLOY_TRANSPORT=quic TRUSTLINK_DEPLOY_RECOVERY_ROUNDS=1 node scripts/devnet-program-deploy.mjs deploy all",
"tsn:program:test": "node scripts/run-anchor.mjs tsn-protocol/programs/tsn/protocol test",
"tsn:private:configure": "node scripts/tsn-private-settlement-config.mjs",
"tsn:security:keys": "node scripts/tsn-generate-cranker-encryption-key.mjs",
"tsn:security:test": "npm --prefix tsn-protocol/sdks/tsn-sdk test && node scripts/tsn-settlement-security-demo.mjs",
"// === TSN Treasury & Verifier ===": "Protocol PDAs used for account creation, sponsorship support, and treasury routing.",
"tsn:verifier:info": "node scripts/tsn-verifier-pda.mjs info",
"tsn:verifier:fund": "node scripts/tsn-verifier-pda.mjs fund",
"tsn:verifier:fund-cli": "node scripts/tsn-verifier-pda.mjs fund-cli",
"tsn:verifier:fund-lamports": "node scripts/tsn-verifier-pda.mjs fund-lamports",
"tsn:verifier:withdraw": "node scripts/tsn-verifier-pda.mjs withdraw",
"tsn:verifier:withdraw-lamports": "node scripts/tsn-verifier-pda.mjs withdraw-lamports",
"tsn:treasury:info": "node scripts/tsn-treasury-pda.mjs info",
"tsn:treasury:ata": "node scripts/tsn-treasury-pda.mjs init-ata",
"// === TIP Program ===": "Transfer Identity Protocol registry program and identity helpers.",
"tip:program:id": "echo TinseNnU588NkmRZBe4ADJbxqrqQma92678UFP6VuwT",
"tip:build": "cargo build-sbf --manifest-path tsn-protocol/programs/transfer-identity-protocol/tin-registrar/program/Cargo.toml",
"tip:deploy": "solana program deploy --program-id TinseNnU588NkmRZBe4ADJbxqrqQma92678UFP6VuwT --upgrade-authority ~/.config/solana/id.json tsn-protocol/programs/transfer-identity-protocol/tin-registrar/program/target/deploy/tins_program.so -u devnet",
"tin:init-global": "node scripts/tin-init-global.mjs",
"tin:lookup": "node scripts/tin-lookup.mjs",
"tin:identity:demo": "npm run tsn:sdk:build && node scripts/tin-identity-encryption-demo.mjs",
"// === Cranker Daemon ===": "Reference TSN settlement operator. Start after backend, mempool, and programs are ready.",
"tsn:mother:init": "npm --prefix tsn-protocol/services/tsn-cranker-op-daemon run mother:init",
"tsn:mother:migrate": "npm --prefix tsn-protocol/services/tsn-cranker-op-daemon run mother:migrate",
"tsn:cranker:register": "npm --prefix tsn-protocol/services/tsn-cranker-op-daemon run register",
"tsn:cranker:setup": "npm --prefix tsn-protocol/services/tsn-cranker-op-daemon run setup",
"tsn:cranker:start": "npm --prefix tsn-protocol/services/tsn-cranker-op-daemon run crank:start",
"test:real-integration": "npm --prefix tsn-protocol/services/tsn-crosschain run test:real-integration",
"tsn:cranker:help": "npm --prefix tsn-protocol/services/tsn-cranker-op-daemon run help",
"// === SDKs ===": "Build and refresh local SDKs after protocol or generated-code changes.",
"tsn:sdk:build": "npm --prefix tsn-protocol/sdks/tsn-sdk run build",
"tsn:sdk:test": "npm --prefix tsn-protocol/sdks/tsn-sdk test",
"pru:simulate": "npm --prefix tsn-protocol/sdks/tsn-sdk run simulate",
"tsn:cranker-sdk:build": "npm --prefix tsn-protocol/sdks/tsn-cranker-sdk run build",
"sdk:build:all": "npm run tsn:sdk:build && npm run tsn:cranker-sdk:build",
"sdk:install:all": "npm --prefix frontend install && npm --prefix backend install && npm --prefix tsn-protocol/sdks/tsn-cranker-sdk install && npm --prefix tsn-protocol/services/tsn-cranker-op-daemon install && npm --prefix tsn-protocol/services/tsn-mempool-ui install",
"sdk:refresh": "npm --prefix tsn-protocol/sdks/tsn-sdk install && npm run tsn:sdk:build && npm --prefix tsn-protocol/sdks/tsn-cranker-sdk install && npm run tsn:cranker-sdk:build && npm run sdk:install:all && npm run frontend:clean",
"sdk:clean-cache": "node -e \"const fs=require('fs');['frontend/.next','backend/.next'].forEach((p)=>{try{fs.rmSync(p,{recursive:true,force:true});}catch{}})\"",
"// === Utilities & Maintenance ===": "IDs, status sync, type checks, and full rebuild/deploy orchestration.",
"check:types": "npm run tsn:sdk:build && npm run backend:typecheck && npm run frontend:typecheck && cd tsn-protocol/services/tsn-cranker-op-daemon && npx tsc --noEmit --module NodeNext --moduleResolution NodeNext --target ES2022 --types node --allowImportingTsExtensions --skipLibCheck scripts/cranker.ts",
"rpc:inspect": "node scripts/rpc-inspect.mjs",
"rpc:gateway:dev": "npm --prefix tsn-protocol/services/tsn-rpc-gateway run dev",
"rpc:gateway:inspect": "npm --prefix tsn-protocol/services/tsn-rpc-gateway run inspect",
"tsn:id:update": "node tsn-protocol/programs/tsn/update-program-id-tsn.mjs TSN31jddtsmUg4D5aEdhY31nwB1e53VJJg9X8NoRP8V",
"tsn:status:sync": "node scripts/tsn-sync-status.mjs",
"tsn:rebuild:all": "npm run tsn:program:build && npm run sdk:refresh",
"sdk:sync:frontend": "node scripts/sync-frontend-local-sdks.mjs",
"frontend:dev:synced": "npm run sdk:sync:frontend && npm --prefix frontend run dev:turbo",
"setup:windows": "powershell.exe -NoProfile -ExecutionPolicy Bypass -File scripts/windows/setup.ps1",
"tsn:start": "powershell.exe -NoProfile -ExecutionPolicy Bypass -File scripts/tsn.ps1 start",
"tsn:stop": "powershell.exe -NoProfile -ExecutionPolicy Bypass -File scripts/tsn.ps1 stop",
"tsn:restart": "powershell.exe -NoProfile -ExecutionPolicy Bypass -File scripts/tsn.ps1 restart",
"tsn:status": "powershell.exe -NoProfile -ExecutionPolicy Bypass -File scripts/tsn.ps1 status",
"tsn:logs": "powershell.exe -NoProfile -ExecutionPolicy Bypass -File scripts/tsn.ps1 logs",
"tsn:doctor": "powershell.exe -NoProfile -ExecutionPolicy Bypass -File scripts/tsn.ps1 doctor",
"tsn:start:backend": "powershell.exe -NoProfile -ExecutionPolicy Bypass -File scripts/tsn.ps1 start backend",
"tsn:start:node": "powershell.exe -NoProfile -ExecutionPolicy Bypass -File scripts/tsn.ps1 start node",
"tsn:start:receiver": "powershell.exe -NoProfile -ExecutionPolicy Bypass -File scripts/tsn.ps1 start receiver",
"tsn:start:rpc": "powershell.exe -NoProfile -ExecutionPolicy Bypass -File scripts/tsn.ps1 start rpc-gateway",
"tsn:start:mempool": "powershell.exe -NoProfile -ExecutionPolicy Bypass -File scripts/tsn.ps1 start mempool",
"tsn:start:mempool-ui": "powershell.exe -NoProfile -ExecutionPolicy Bypass -File scripts/tsn.ps1 start mempool-ui",
"tsn:start:cranker": "powershell.exe -NoProfile -ExecutionPolicy Bypass -File scripts/tsn.ps1 start cranker",
"tsn:stop:backend": "powershell.exe -NoProfile -ExecutionPolicy Bypass -File scripts/tsn.ps1 stop backend",
"tsn:stop:node": "powershell.exe -NoProfile -ExecutionPolicy Bypass -File scripts/tsn.ps1 stop node",
"tsn:stop:rpc": "powershell.exe -NoProfile -ExecutionPolicy Bypass -File scripts/tsn.ps1 stop rpc-gateway",
"tsn:stop:mempool": "powershell.exe -NoProfile -ExecutionPolicy Bypass -File scripts/tsn.ps1 stop mempool",
"tsn:stop:mempool-ui": "powershell.exe -NoProfile -ExecutionPolicy Bypass -File scripts/tsn.ps1 stop mempool-ui",
"tsn:stop:cranker": "powershell.exe -NoProfile -ExecutionPolicy Bypass -File scripts/tsn.ps1 stop cranker",
"tsn:delete": "powershell.exe -NoProfile -ExecutionPolicy Bypass -File scripts/tsn.ps1 delete",
"tip:id:update": "node tsn-protocol/programs/transfer-identity-protocol/tin-registrar/update-program-id.mjs TinseNnU588NkmRZBe4ADJbxqrqQma92678UFP6VuwT",
"// === Git & Deployment ===": "Repository helpers. Review git status before committing or pushing.",
"git:status": "git status --short",
"git:hygiene": "node scripts/git-hygiene-check.mjs",
"git:hygiene:report": "node scripts/git-hygiene-check.mjs --write-report --warn-only",
"git:hygiene:fix": "node scripts/git-hygiene-check.mjs --fix",
"git:pull:all": "git pull --rebase origin main",
"git:pull:protocol": "git fetch tsn-protocol main",
"git:push:current": "git branch -M main && git push -u origin main",
"git:push:tsn-protocol": "git subtree push --prefix=tsn-protocol tsn-protocol main",
"git:commit:push:all": "git add -A && git diff --cached --quiet && echo No changes to commit || (git commit -m \"Something just got updated!\" && npm run git:push:current)"
},
"dependencies": {
"@solana/web3.js": "^1.98.4",
"bs58": "^6.0.0",
"tweetnacl": "^1.0.3"
},
"devDependencies": {
"@types/node": "^26.0.0",
"pm2": "^5.4.3",
"tsx": "^4.22.2"
}
}