qvtx-developer-kit 1.0.0 → 1.2.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.
Files changed (49) hide show
  1. package/.env.example +108 -0
  2. package/README.md +0 -0
  3. package/abis/QVTXBridge.json +273 -0
  4. package/abis/QVTXDirectPurchase.json +621 -0
  5. package/abis/QVTXGovernance.json +267 -0
  6. package/abis/QVTXNFT.json +370 -0
  7. package/abis/QVTXRewards.json +155 -0
  8. package/abis/QVTXToken.json +311 -0
  9. package/abis/QVTXVesting.json +216 -0
  10. package/abis/index.js +16 -0
  11. package/bin/qvtx-developer-cli.js +99 -0
  12. package/config/index.js +108 -0
  13. package/config/networks.js +247 -0
  14. package/examples/basic-usage.js +39 -0
  15. package/examples/bridge-example.js +123 -0
  16. package/examples/direct-purchase.js +300 -0
  17. package/examples/governance-example.js +140 -0
  18. package/examples/nft-example.js +141 -0
  19. package/examples/staking-example.js +96 -0
  20. package/index.js +145 -0
  21. package/languages/blockchain_ai_sdk.js +0 -0
  22. package/languages/node_sdk.js +0 -0
  23. package/languages/solana_sdk.js +383 -0
  24. package/package.json +30 -3
  25. package/purchase/index.js +567 -0
  26. package/rewards/index.js +71 -0
  27. package/smart-contracts/QVTXBridge.sol +305 -0
  28. package/smart-contracts/QVTXDirectPurchase.sol +543 -0
  29. package/smart-contracts/QVTXGovernance.sol +325 -0
  30. package/smart-contracts/QVTXNFT.sol +338 -0
  31. package/smart-contracts/QVTXRewards.sol +102 -0
  32. package/smart-contracts/QVTXToken.sol +227 -0
  33. package/smart-contracts/QVTXVesting.sol +411 -0
  34. package/smart-contracts/interfaces/IERC20.sol +14 -0
  35. package/smart-contracts/interfaces/IERC20Metadata.sol +8 -0
  36. package/smart-contracts/interfaces/IERC721.sol +18 -0
  37. package/smart-contracts/interfaces/IERC721Metadata.sol +8 -0
  38. package/smart-contracts/interfaces/IERC721Receiver.sol +11 -0
  39. package/storage/index.js +112 -0
  40. package/templates/contract/ERC20Token.sol +116 -0
  41. package/templates/dapp/index.html +93 -0
  42. package/test/index.js +182 -0
  43. package/tools/build-tool.js +63 -0
  44. package/tools/create-template.js +116 -0
  45. package/tools/deploy-tool.js +55 -0
  46. package/tools/generate-docs.js +149 -0
  47. package/tools/init-project.js +138 -0
  48. package/tools/run-tests.js +64 -0
  49. package/types/index.d.ts +386 -0
package/.env.example ADDED
@@ -0,0 +1,108 @@
1
+ # QVTX Developer Kit - Environment Configuration
2
+ # Copy this file to .env and fill in your values
3
+
4
+ # ===========================================
5
+ # WALLET & AUTHENTICATION
6
+ # ===========================================
7
+
8
+ # Your wallet private key (NEVER commit this!)
9
+ PRIVATE_KEY=your-private-key-here
10
+
11
+ # Your wallet mnemonic (alternative to private key)
12
+ MNEMONIC=your twelve word mnemonic phrase here
13
+
14
+ # ===========================================
15
+ # ETHEREUM & EVM CHAINS
16
+ # ===========================================
17
+
18
+ # Infura API Key (https://infura.io)
19
+ INFURA_API_KEY=your-infura-api-key
20
+
21
+ # Alchemy API Key (https://alchemy.com)
22
+ ALCHEMY_API_KEY=your-alchemy-api-key
23
+
24
+ # Custom RPC URLs (optional - overrides API keys)
25
+ ETHEREUM_RPC=https://mainnet.infura.io/v3/YOUR_KEY
26
+ GOERLI_RPC=https://goerli.infura.io/v3/YOUR_KEY
27
+ SEPOLIA_RPC=https://sepolia.infura.io/v3/YOUR_KEY
28
+ BSC_RPC=https://bsc-dataseed.binance.org/
29
+ POLYGON_RPC=https://polygon-rpc.com/
30
+ ARBITRUM_RPC=https://arb1.arbitrum.io/rpc
31
+ AVALANCHE_RPC=https://api.avax.network/ext/bc/C/rpc
32
+ OPTIMISM_RPC=https://mainnet.optimism.io
33
+
34
+ # ===========================================
35
+ # SOLANA
36
+ # ===========================================
37
+
38
+ # Solana Network (mainnet-beta, devnet, testnet)
39
+ SOLANA_NETWORK=devnet
40
+
41
+ # Custom Solana RPC (optional)
42
+ SOLANA_RPC=https://api.devnet.solana.com
43
+
44
+ # ===========================================
45
+ # QVTX CONTRACT ADDRESSES
46
+ # ===========================================
47
+
48
+ # Ethereum Mainnet
49
+ QVTX_TOKEN_ETH=0x...
50
+ QVTX_GOVERNANCE_ETH=0x...
51
+ QVTX_BRIDGE_ETH=0x...
52
+ QVTX_STAKING_ETH=0x...
53
+ QVTX_NFT_ETH=0x...
54
+
55
+ # BSC Mainnet
56
+ QVTX_TOKEN_BSC=0x...
57
+ QVTX_BRIDGE_BSC=0x...
58
+
59
+ # Polygon Mainnet
60
+ QVTX_TOKEN_POLYGON=0x...
61
+ QVTX_BRIDGE_POLYGON=0x...
62
+
63
+ # Solana
64
+ QVTX_TOKEN_SOLANA=...
65
+
66
+ # ===========================================
67
+ # API KEYS & SERVICES
68
+ # ===========================================
69
+
70
+ # Etherscan API Key (for contract verification)
71
+ ETHERSCAN_API_KEY=your-etherscan-api-key
72
+
73
+ # BSCScan API Key
74
+ BSCSCAN_API_KEY=your-bscscan-api-key
75
+
76
+ # PolygonScan API Key
77
+ POLYGONSCAN_API_KEY=your-polygonscan-api-key
78
+
79
+ # Pinata IPFS (for NFT metadata)
80
+ PINATA_API_KEY=your-pinata-api-key
81
+ PINATA_SECRET_KEY=your-pinata-secret-key
82
+
83
+ # NFT.Storage (alternative IPFS)
84
+ NFT_STORAGE_API_KEY=your-nft-storage-api-key
85
+
86
+ # ===========================================
87
+ # DEVELOPMENT & TESTING
88
+ # ===========================================
89
+
90
+ # Local Hardhat/Ganache
91
+ LOCAL_RPC=http://127.0.0.1:8545
92
+
93
+ # Test accounts (for local development only)
94
+ TEST_ACCOUNT_1=0x...
95
+ TEST_ACCOUNT_2=0x...
96
+
97
+ # ===========================================
98
+ # QVTX SPECIFIC
99
+ # ===========================================
100
+
101
+ # QVTX API Key (for premium features)
102
+ QVTX_API_KEY=your-qvtx-api-key
103
+
104
+ # QVTX Neural Storage endpoint
105
+ QVTX_NEURAL_STORAGE=https://storage.quantvestrix.com
106
+
107
+ # Enable debug logging
108
+ DEBUG=false
package/README.md CHANGED
File without changes
@@ -0,0 +1,273 @@
1
+ {
2
+ "contractName": "QVTXBridge",
3
+ "abi": [
4
+ {
5
+ "inputs": [
6
+ {"internalType": "address", "name": "_qvtxToken", "type": "address"},
7
+ {"internalType": "uint256", "name": "_chainId", "type": "uint256"}
8
+ ],
9
+ "stateMutability": "nonpayable",
10
+ "type": "constructor"
11
+ },
12
+ {
13
+ "anonymous": false,
14
+ "inputs": [
15
+ {"indexed": true, "internalType": "uint256", "name": "requestId", "type": "uint256"},
16
+ {"indexed": true, "internalType": "address", "name": "recipient", "type": "address"},
17
+ {"indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256"},
18
+ {"indexed": false, "internalType": "uint256", "name": "sourceChain", "type": "uint256"},
19
+ {"indexed": false, "internalType": "bytes32", "name": "sourceTxHash", "type": "bytes32"}
20
+ ],
21
+ "name": "BridgeCompleted",
22
+ "type": "event"
23
+ },
24
+ {
25
+ "anonymous": false,
26
+ "inputs": [
27
+ {"indexed": true, "internalType": "uint256", "name": "requestId", "type": "uint256"},
28
+ {"indexed": true, "internalType": "address", "name": "sender", "type": "address"},
29
+ {"indexed": true, "internalType": "address", "name": "recipient", "type": "address"},
30
+ {"indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256"},
31
+ {"indexed": false, "internalType": "uint256", "name": "sourceChain", "type": "uint256"},
32
+ {"indexed": false, "internalType": "uint256", "name": "targetChain", "type": "uint256"}
33
+ ],
34
+ "name": "BridgeInitiated",
35
+ "type": "event"
36
+ },
37
+ {
38
+ "anonymous": false,
39
+ "inputs": [
40
+ {"indexed": true, "internalType": "uint256", "name": "requestId", "type": "uint256"},
41
+ {"indexed": true, "internalType": "address", "name": "sender", "type": "address"},
42
+ {"indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256"}
43
+ ],
44
+ "name": "BridgeRefunded",
45
+ "type": "event"
46
+ },
47
+ {
48
+ "anonymous": false,
49
+ "inputs": [
50
+ {"indexed": true, "internalType": "uint256", "name": "chainId", "type": "uint256"},
51
+ {"indexed": false, "internalType": "address", "name": "bridgeContract", "type": "address"}
52
+ ],
53
+ "name": "ChainAdded",
54
+ "type": "event"
55
+ },
56
+ {
57
+ "anonymous": false,
58
+ "inputs": [{"indexed": true, "internalType": "uint256", "name": "chainId", "type": "uint256"}],
59
+ "name": "ChainRemoved",
60
+ "type": "event"
61
+ },
62
+ {
63
+ "anonymous": false,
64
+ "inputs": [
65
+ {"indexed": true, "internalType": "address", "name": "to", "type": "address"},
66
+ {"indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256"}
67
+ ],
68
+ "name": "FeesWithdrawn",
69
+ "type": "event"
70
+ },
71
+ {
72
+ "anonymous": false,
73
+ "inputs": [{"indexed": false, "internalType": "bool", "name": "status", "type": "bool"}],
74
+ "name": "Paused",
75
+ "type": "event"
76
+ },
77
+ {
78
+ "anonymous": false,
79
+ "inputs": [{"indexed": true, "internalType": "address", "name": "newValidator", "type": "address"}],
80
+ "name": "ValidatorUpdated",
81
+ "type": "event"
82
+ },
83
+ {
84
+ "inputs": [
85
+ {"internalType": "uint256", "name": "chainId", "type": "uint256"},
86
+ {"internalType": "address", "name": "bridgeContract", "type": "address"}
87
+ ],
88
+ "name": "addChain",
89
+ "outputs": [],
90
+ "stateMutability": "nonpayable",
91
+ "type": "function"
92
+ },
93
+ {
94
+ "inputs": [
95
+ {"internalType": "address", "name": "recipient", "type": "address"},
96
+ {"internalType": "uint256", "name": "amount", "type": "uint256"},
97
+ {"internalType": "uint256", "name": "targetChain", "type": "uint256"}
98
+ ],
99
+ "name": "bridge",
100
+ "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}],
101
+ "stateMutability": "payable",
102
+ "type": "function"
103
+ },
104
+ {
105
+ "inputs": [],
106
+ "name": "bridgeFee",
107
+ "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}],
108
+ "stateMutability": "view",
109
+ "type": "function"
110
+ },
111
+ {
112
+ "inputs": [
113
+ {"internalType": "address", "name": "recipient", "type": "address"},
114
+ {"internalType": "uint256", "name": "amount", "type": "uint256"},
115
+ {"internalType": "uint256", "name": "sourceChain", "type": "uint256"},
116
+ {"internalType": "bytes32", "name": "sourceTxHash", "type": "bytes32"},
117
+ {"internalType": "bytes", "name": "signature", "type": "bytes"}
118
+ ],
119
+ "name": "completeBridge",
120
+ "outputs": [],
121
+ "stateMutability": "nonpayable",
122
+ "type": "function"
123
+ },
124
+ {
125
+ "inputs": [],
126
+ "name": "currentChainId",
127
+ "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}],
128
+ "stateMutability": "view",
129
+ "type": "function"
130
+ },
131
+ {
132
+ "inputs": [],
133
+ "name": "dailyLimit",
134
+ "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}],
135
+ "stateMutability": "view",
136
+ "type": "function"
137
+ },
138
+ {
139
+ "inputs": [{"internalType": "uint256", "name": "requestId", "type": "uint256"}],
140
+ "name": "getBridgeRequest",
141
+ "outputs": [
142
+ {
143
+ "components": [
144
+ {"internalType": "uint256", "name": "id", "type": "uint256"},
145
+ {"internalType": "address", "name": "sender", "type": "address"},
146
+ {"internalType": "address", "name": "recipient", "type": "address"},
147
+ {"internalType": "uint256", "name": "amount", "type": "uint256"},
148
+ {"internalType": "uint256", "name": "sourceChain", "type": "uint256"},
149
+ {"internalType": "uint256", "name": "targetChain", "type": "uint256"},
150
+ {"internalType": "uint256", "name": "timestamp", "type": "uint256"},
151
+ {"internalType": "bytes32", "name": "txHash", "type": "bytes32"},
152
+ {"internalType": "uint8", "name": "status", "type": "uint8"}
153
+ ],
154
+ "internalType": "struct QVTXBridge.BridgeRequest",
155
+ "name": "",
156
+ "type": "tuple"
157
+ }
158
+ ],
159
+ "stateMutability": "view",
160
+ "type": "function"
161
+ },
162
+ {
163
+ "inputs": [{"internalType": "address", "name": "user", "type": "address"}],
164
+ "name": "getUserBridgeRequests",
165
+ "outputs": [{"internalType": "uint256[]", "name": "", "type": "uint256[]"}],
166
+ "stateMutability": "view",
167
+ "type": "function"
168
+ },
169
+ {
170
+ "inputs": [{"internalType": "uint256", "name": "chainId", "type": "uint256"}],
171
+ "name": "isChainSupported",
172
+ "outputs": [{"internalType": "bool", "name": "", "type": "bool"}],
173
+ "stateMutability": "view",
174
+ "type": "function"
175
+ },
176
+ {
177
+ "inputs": [],
178
+ "name": "maxBridgeAmount",
179
+ "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}],
180
+ "stateMutability": "view",
181
+ "type": "function"
182
+ },
183
+ {
184
+ "inputs": [],
185
+ "name": "minBridgeAmount",
186
+ "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}],
187
+ "stateMutability": "view",
188
+ "type": "function"
189
+ },
190
+ {
191
+ "inputs": [],
192
+ "name": "owner",
193
+ "outputs": [{"internalType": "address", "name": "", "type": "address"}],
194
+ "stateMutability": "view",
195
+ "type": "function"
196
+ },
197
+ {
198
+ "inputs": [],
199
+ "name": "paused",
200
+ "outputs": [{"internalType": "bool", "name": "", "type": "bool"}],
201
+ "stateMutability": "view",
202
+ "type": "function"
203
+ },
204
+ {
205
+ "inputs": [{"internalType": "uint256", "name": "requestId", "type": "uint256"}],
206
+ "name": "refund",
207
+ "outputs": [],
208
+ "stateMutability": "nonpayable",
209
+ "type": "function"
210
+ },
211
+ {
212
+ "inputs": [{"internalType": "uint256", "name": "chainId", "type": "uint256"}],
213
+ "name": "removeChain",
214
+ "outputs": [],
215
+ "stateMutability": "nonpayable",
216
+ "type": "function"
217
+ },
218
+ {
219
+ "inputs": [{"internalType": "uint256", "name": "_fee", "type": "uint256"}],
220
+ "name": "setBridgeFee",
221
+ "outputs": [],
222
+ "stateMutability": "nonpayable",
223
+ "type": "function"
224
+ },
225
+ {
226
+ "inputs": [
227
+ {"internalType": "uint256", "name": "_min", "type": "uint256"},
228
+ {"internalType": "uint256", "name": "_max", "type": "uint256"},
229
+ {"internalType": "uint256", "name": "_daily", "type": "uint256"}
230
+ ],
231
+ "name": "setLimits",
232
+ "outputs": [],
233
+ "stateMutability": "nonpayable",
234
+ "type": "function"
235
+ },
236
+ {
237
+ "inputs": [{"internalType": "bool", "name": "_paused", "type": "bool"}],
238
+ "name": "setPaused",
239
+ "outputs": [],
240
+ "stateMutability": "nonpayable",
241
+ "type": "function"
242
+ },
243
+ {
244
+ "inputs": [{"internalType": "address", "name": "_validator", "type": "address"}],
245
+ "name": "setValidator",
246
+ "outputs": [],
247
+ "stateMutability": "nonpayable",
248
+ "type": "function"
249
+ },
250
+ {
251
+ "inputs": [{"internalType": "address", "name": "newOwner", "type": "address"}],
252
+ "name": "transferOwnership",
253
+ "outputs": [],
254
+ "stateMutability": "nonpayable",
255
+ "type": "function"
256
+ },
257
+ {
258
+ "inputs": [],
259
+ "name": "validator",
260
+ "outputs": [{"internalType": "address", "name": "", "type": "address"}],
261
+ "stateMutability": "view",
262
+ "type": "function"
263
+ },
264
+ {
265
+ "inputs": [{"internalType": "address payable", "name": "to", "type": "address"}],
266
+ "name": "withdrawFees",
267
+ "outputs": [],
268
+ "stateMutability": "nonpayable",
269
+ "type": "function"
270
+ },
271
+ {"stateMutability": "payable", "type": "receive"}
272
+ ]
273
+ }