@varity-labs/sdk 2.0.0-alpha.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/LICENSE +31 -0
- package/README.md +253 -0
- package/dist/analytics/index.d.ts +7 -0
- package/dist/analytics/index.d.ts.map +1 -0
- package/dist/analytics/index.js +6 -0
- package/dist/analytics/tracker.d.ts +128 -0
- package/dist/analytics/tracker.d.ts.map +1 -0
- package/dist/analytics/tracker.js +203 -0
- package/dist/blockchain/BlockchainService.d.ts +100 -0
- package/dist/blockchain/BlockchainService.d.ts.map +1 -0
- package/dist/blockchain/BlockchainService.js +188 -0
- package/dist/blockchain/NFTLicensingService.d.ts +69 -0
- package/dist/blockchain/NFTLicensingService.d.ts.map +1 -0
- package/dist/blockchain/NFTLicensingService.js +136 -0
- package/dist/blockchain/RevenueSplitService.d.ts +71 -0
- package/dist/blockchain/RevenueSplitService.d.ts.map +1 -0
- package/dist/blockchain/RevenueSplitService.js +111 -0
- package/dist/blockchain/index.d.ts +48 -0
- package/dist/blockchain/index.d.ts.map +1 -0
- package/dist/blockchain/index.js +46 -0
- package/dist/blockchain/types.d.ts +63 -0
- package/dist/blockchain/types.d.ts.map +1 -0
- package/dist/blockchain/types.js +6 -0
- package/dist/chains/arbitrum.d.ts +89 -0
- package/dist/chains/arbitrum.d.ts.map +1 -0
- package/dist/chains/arbitrum.js +134 -0
- package/dist/chains/base.d.ts +84 -0
- package/dist/chains/base.d.ts.map +1 -0
- package/dist/chains/base.js +131 -0
- package/dist/chains/index.d.ts +36 -0
- package/dist/chains/index.d.ts.map +1 -0
- package/dist/chains/index.js +32 -0
- package/dist/chains/registry.d.ts +113 -0
- package/dist/chains/registry.d.ts.map +1 -0
- package/dist/chains/registry.js +201 -0
- package/dist/chains/varityL3.d.ts +81 -0
- package/dist/chains/varityL3.d.ts.map +1 -0
- package/dist/chains/varityL3.js +125 -0
- package/dist/cli/commands/clone.d.ts +8 -0
- package/dist/cli/commands/clone.d.ts.map +1 -0
- package/dist/cli/commands/clone.js +391 -0
- package/dist/cli/commands/dev.d.ts +8 -0
- package/dist/cli/commands/dev.d.ts.map +1 -0
- package/dist/cli/commands/dev.js +40 -0
- package/dist/cli/commands/generate.d.ts +8 -0
- package/dist/cli/commands/generate.d.ts.map +1 -0
- package/dist/cli/commands/generate.js +303 -0
- package/dist/cli/commands/init.d.ts +8 -0
- package/dist/cli/commands/init.d.ts.map +1 -0
- package/dist/cli/commands/init.js +317 -0
- package/dist/cli/commands/validate.d.ts +8 -0
- package/dist/cli/commands/validate.d.ts.map +1 -0
- package/dist/cli/commands/validate.js +69 -0
- package/dist/cli/index.d.ts +8 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +33 -0
- package/dist/cli/utils/logger.d.ts +17 -0
- package/dist/cli/utils/logger.d.ts.map +1 -0
- package/dist/cli/utils/logger.js +35 -0
- package/dist/cli/utils/prompts.d.ts +21 -0
- package/dist/cli/utils/prompts.d.ts.map +1 -0
- package/dist/cli/utils/prompts.js +103 -0
- package/dist/contracts/abis/iso/AccessControlRegistry.json +1468 -0
- package/dist/contracts/abis/iso/DataProofRegistry.json +797 -0
- package/dist/contracts/abis/iso/MerchantRegistry.json +1237 -0
- package/dist/contracts/abis/iso/RepPerformance.json +1351 -0
- package/dist/contracts/abis/iso/ResidualCalculator.json +1118 -0
- package/dist/contracts/abis/iso/TransactionVault.json +1588 -0
- package/dist/contracts/abis/iso/VarityWalletFactory.json +475 -0
- package/dist/contracts/addresses.d.ts +88 -0
- package/dist/contracts/addresses.d.ts.map +1 -0
- package/dist/contracts/addresses.js +94 -0
- package/dist/contracts/index.d.ts +7 -0
- package/dist/contracts/index.d.ts.map +1 -0
- package/dist/contracts/index.js +6 -0
- package/dist/core/VaritySDK.d.ts +177 -0
- package/dist/core/VaritySDK.d.ts.map +1 -0
- package/dist/core/VaritySDK.js +325 -0
- package/dist/core/config.d.ts +120 -0
- package/dist/core/config.d.ts.map +1 -0
- package/dist/core/config.js +187 -0
- package/dist/core/credentials-proxy.d.ts +157 -0
- package/dist/core/credentials-proxy.d.ts.map +1 -0
- package/dist/core/credentials-proxy.js +345 -0
- package/dist/core/credentials.d.ts +219 -0
- package/dist/core/credentials.d.ts.map +1 -0
- package/dist/core/credentials.js +345 -0
- package/dist/core/template-loader.d.ts +15 -0
- package/dist/core/template-loader.d.ts.map +1 -0
- package/dist/core/template-loader.js +380 -0
- package/dist/core/template.d.ts +321 -0
- package/dist/core/template.d.ts.map +1 -0
- package/dist/core/template.js +189 -0
- package/dist/core/types.d.ts +572 -0
- package/dist/core/types.d.ts.map +1 -0
- package/dist/core/types.js +52 -0
- package/dist/dev/dev-server.d.ts +16 -0
- package/dist/dev/dev-server.d.ts.map +1 -0
- package/dist/dev/dev-server.js +119 -0
- package/dist/generators/contracts/generator.d.ts +21 -0
- package/dist/generators/contracts/generator.d.ts.map +1 -0
- package/dist/generators/contracts/generator.js +252 -0
- package/dist/generators/tests/generator.d.ts +20 -0
- package/dist/generators/tests/generator.d.ts.map +1 -0
- package/dist/generators/tests/generator.js +375 -0
- package/dist/generators/types/generator.d.ts +19 -0
- package/dist/generators/types/generator.d.ts.map +1 -0
- package/dist/generators/types/generator.js +165 -0
- package/dist/generators/ui/component-generator.d.ts +20 -0
- package/dist/generators/ui/component-generator.d.ts.map +1 -0
- package/dist/generators/ui/component-generator.js +749 -0
- package/dist/generators/ui/dashboard-generator.d.ts +20 -0
- package/dist/generators/ui/dashboard-generator.d.ts.map +1 -0
- package/dist/generators/ui/dashboard-generator.js +349 -0
- package/dist/index.d.ts +61 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +74 -0
- package/dist/modules/analytics/AnalyticsModule.d.ts +349 -0
- package/dist/modules/analytics/AnalyticsModule.d.ts.map +1 -0
- package/dist/modules/analytics/AnalyticsModule.js +274 -0
- package/dist/modules/analytics/index.d.ts +3 -0
- package/dist/modules/analytics/index.d.ts.map +1 -0
- package/dist/modules/analytics/index.js +1 -0
- package/dist/modules/auth/AccessKeyModule.d.ts +189 -0
- package/dist/modules/auth/AccessKeyModule.d.ts.map +1 -0
- package/dist/modules/auth/AccessKeyModule.js +322 -0
- package/dist/modules/auth/AuthModule.d.ts +133 -0
- package/dist/modules/auth/AuthModule.d.ts.map +1 -0
- package/dist/modules/auth/AuthModule.js +214 -0
- package/dist/modules/auth/index.d.ts +8 -0
- package/dist/modules/auth/index.d.ts.map +1 -0
- package/dist/modules/auth/index.js +6 -0
- package/dist/modules/cache/CacheModule.d.ts +279 -0
- package/dist/modules/cache/CacheModule.d.ts.map +1 -0
- package/dist/modules/cache/CacheModule.js +493 -0
- package/dist/modules/cache/index.d.ts +3 -0
- package/dist/modules/cache/index.d.ts.map +1 -0
- package/dist/modules/cache/index.js +1 -0
- package/dist/modules/compute/ComputeModule.d.ts +226 -0
- package/dist/modules/compute/ComputeModule.d.ts.map +1 -0
- package/dist/modules/compute/ComputeModule.js +379 -0
- package/dist/modules/compute/index.d.ts +6 -0
- package/dist/modules/compute/index.d.ts.map +1 -0
- package/dist/modules/compute/index.js +4 -0
- package/dist/modules/contracts/ContractsModule.d.ts +164 -0
- package/dist/modules/contracts/ContractsModule.d.ts.map +1 -0
- package/dist/modules/contracts/ContractsModule.js +242 -0
- package/dist/modules/contracts/index.d.ts +6 -0
- package/dist/modules/contracts/index.d.ts.map +1 -0
- package/dist/modules/contracts/index.js +4 -0
- package/dist/modules/export/ExportModule.d.ts +346 -0
- package/dist/modules/export/ExportModule.d.ts.map +1 -0
- package/dist/modules/export/ExportModule.js +432 -0
- package/dist/modules/export/index.d.ts +3 -0
- package/dist/modules/export/index.d.ts.map +1 -0
- package/dist/modules/export/index.js +1 -0
- package/dist/modules/forecasting/ForecastingModule.d.ts +579 -0
- package/dist/modules/forecasting/ForecastingModule.d.ts.map +1 -0
- package/dist/modules/forecasting/ForecastingModule.js +310 -0
- package/dist/modules/forecasting/index.d.ts +3 -0
- package/dist/modules/forecasting/index.d.ts.map +1 -0
- package/dist/modules/forecasting/index.js +1 -0
- package/dist/modules/monitoring/MonitoringModule.d.ts +359 -0
- package/dist/modules/monitoring/MonitoringModule.d.ts.map +1 -0
- package/dist/modules/monitoring/MonitoringModule.js +483 -0
- package/dist/modules/monitoring/index.d.ts +3 -0
- package/dist/modules/monitoring/index.d.ts.map +1 -0
- package/dist/modules/monitoring/index.js +1 -0
- package/dist/modules/notifications/NotificationsModule.d.ts +336 -0
- package/dist/modules/notifications/NotificationsModule.d.ts.map +1 -0
- package/dist/modules/notifications/NotificationsModule.js +418 -0
- package/dist/modules/notifications/index.d.ts +3 -0
- package/dist/modules/notifications/index.d.ts.map +1 -0
- package/dist/modules/notifications/index.js +1 -0
- package/dist/modules/oracle/OracleModule.d.ts +110 -0
- package/dist/modules/oracle/OracleModule.d.ts.map +1 -0
- package/dist/modules/oracle/OracleModule.js +151 -0
- package/dist/modules/oracle/index.d.ts +6 -0
- package/dist/modules/oracle/index.d.ts.map +1 -0
- package/dist/modules/oracle/index.js +4 -0
- package/dist/modules/storage/S3Module.d.ts +377 -0
- package/dist/modules/storage/S3Module.d.ts.map +1 -0
- package/dist/modules/storage/S3Module.js +680 -0
- package/dist/modules/storage/StorageModule.d.ts +157 -0
- package/dist/modules/storage/StorageModule.d.ts.map +1 -0
- package/dist/modules/storage/StorageModule.js +302 -0
- package/dist/modules/storage/adapters/AdapterFactory.d.ts +100 -0
- package/dist/modules/storage/adapters/AdapterFactory.d.ts.map +1 -0
- package/dist/modules/storage/adapters/AdapterFactory.js +209 -0
- package/dist/modules/storage/adapters/FilecoinAdapter.d.ts +94 -0
- package/dist/modules/storage/adapters/FilecoinAdapter.d.ts.map +1 -0
- package/dist/modules/storage/adapters/FilecoinAdapter.js +263 -0
- package/dist/modules/storage/adapters/IStorageAdapter.d.ts +287 -0
- package/dist/modules/storage/adapters/IStorageAdapter.d.ts.map +1 -0
- package/dist/modules/storage/adapters/IStorageAdapter.js +81 -0
- package/dist/modules/storage/adapters/MultiTierAdapter.d.ts +187 -0
- package/dist/modules/storage/adapters/MultiTierAdapter.d.ts.map +1 -0
- package/dist/modules/storage/adapters/MultiTierAdapter.js +430 -0
- package/dist/modules/storage/adapters/index.d.ts +12 -0
- package/dist/modules/storage/adapters/index.d.ts.map +1 -0
- package/dist/modules/storage/adapters/index.js +12 -0
- package/dist/modules/storage/index.d.ts +16 -0
- package/dist/modules/storage/index.d.ts.map +1 -0
- package/dist/modules/storage/index.js +15 -0
- package/dist/modules/storage/tiering/AccessAnalyzer.d.ts +227 -0
- package/dist/modules/storage/tiering/AccessAnalyzer.d.ts.map +1 -0
- package/dist/modules/storage/tiering/AccessAnalyzer.js +367 -0
- package/dist/modules/storage/tiering/CostOptimizer.d.ts +248 -0
- package/dist/modules/storage/tiering/CostOptimizer.d.ts.map +1 -0
- package/dist/modules/storage/tiering/CostOptimizer.js +356 -0
- package/dist/modules/storage/tiering/MetadataStore.d.ts +287 -0
- package/dist/modules/storage/tiering/MetadataStore.d.ts.map +1 -0
- package/dist/modules/storage/tiering/MetadataStore.js +535 -0
- package/dist/modules/storage/tiering/TieringEngine.d.ts +237 -0
- package/dist/modules/storage/tiering/TieringEngine.d.ts.map +1 -0
- package/dist/modules/storage/tiering/TieringEngine.js +419 -0
- package/dist/modules/storage/tiering/example.d.ts +8 -0
- package/dist/modules/storage/tiering/example.d.ts.map +1 -0
- package/dist/modules/storage/tiering/example.js +250 -0
- package/dist/modules/storage/tiering/index.d.ts +17 -0
- package/dist/modules/storage/tiering/index.d.ts.map +1 -0
- package/dist/modules/storage/tiering/index.js +13 -0
- package/dist/modules/webhooks/WebhooksModule.d.ts +476 -0
- package/dist/modules/webhooks/WebhooksModule.d.ts.map +1 -0
- package/dist/modules/webhooks/WebhooksModule.js +359 -0
- package/dist/modules/webhooks/index.d.ts +3 -0
- package/dist/modules/webhooks/index.d.ts.map +1 -0
- package/dist/modules/webhooks/index.js +1 -0
- package/dist/modules/zk/ZKModule.d.ts +153 -0
- package/dist/modules/zk/ZKModule.d.ts.map +1 -0
- package/dist/modules/zk/ZKModule.js +262 -0
- package/dist/modules/zk/index.d.ts +7 -0
- package/dist/modules/zk/index.d.ts.map +1 -0
- package/dist/modules/zk/index.js +4 -0
- package/dist/thirdweb/BridgeClient.d.ts +228 -0
- package/dist/thirdweb/BridgeClient.d.ts.map +1 -0
- package/dist/thirdweb/BridgeClient.js +160 -0
- package/dist/thirdweb/EngineClient.d.ts +396 -0
- package/dist/thirdweb/EngineClient.d.ts.map +1 -0
- package/dist/thirdweb/EngineClient.js +386 -0
- package/dist/thirdweb/GatewayClient.d.ts +190 -0
- package/dist/thirdweb/GatewayClient.d.ts.map +1 -0
- package/dist/thirdweb/GatewayClient.js +257 -0
- package/dist/thirdweb/NebulaClient.d.ts +292 -0
- package/dist/thirdweb/NebulaClient.d.ts.map +1 -0
- package/dist/thirdweb/NebulaClient.js +180 -0
- package/dist/thirdweb/StorageClient.d.ts +445 -0
- package/dist/thirdweb/StorageClient.d.ts.map +1 -0
- package/dist/thirdweb/StorageClient.js +405 -0
- package/dist/thirdweb/ThirdwebWrapper.d.ts +236 -0
- package/dist/thirdweb/ThirdwebWrapper.d.ts.map +1 -0
- package/dist/thirdweb/ThirdwebWrapper.js +332 -0
- package/dist/thirdweb/index.d.ts +21 -0
- package/dist/thirdweb/index.d.ts.map +1 -0
- package/dist/thirdweb/index.js +28 -0
- package/dist/thirdweb/varity-chain.d.ts +48 -0
- package/dist/thirdweb/varity-chain.d.ts.map +1 -0
- package/dist/thirdweb/varity-chain.js +64 -0
- package/dist/thirdweb/x402Client.d.ts +319 -0
- package/dist/thirdweb/x402Client.d.ts.map +1 -0
- package/dist/thirdweb/x402Client.js +223 -0
- package/dist/tracking/gasTracker.d.ts +158 -0
- package/dist/tracking/gasTracker.d.ts.map +1 -0
- package/dist/tracking/gasTracker.js +227 -0
- package/dist/tracking/index.d.ts +10 -0
- package/dist/tracking/index.d.ts.map +1 -0
- package/dist/tracking/index.js +8 -0
- package/dist/tracking/types.d.ts +327 -0
- package/dist/tracking/types.d.ts.map +1 -0
- package/dist/tracking/types.js +8 -0
- package/dist/ui/components/ChartWidget.d.ts +36 -0
- package/dist/ui/components/ChartWidget.d.ts.map +1 -0
- package/dist/ui/components/ChartWidget.js +82 -0
- package/dist/ui/components/DashboardLayout.d.ts +41 -0
- package/dist/ui/components/DashboardLayout.d.ts.map +1 -0
- package/dist/ui/components/DashboardLayout.js +102 -0
- package/dist/ui/components/DataTable.d.ts +49 -0
- package/dist/ui/components/DataTable.d.ts.map +1 -0
- package/dist/ui/components/DataTable.js +96 -0
- package/dist/ui/components/EntityForm.d.ts +60 -0
- package/dist/ui/components/EntityForm.d.ts.map +1 -0
- package/dist/ui/components/EntityForm.js +182 -0
- package/dist/ui/components/KPICard.d.ts +29 -0
- package/dist/ui/components/KPICard.d.ts.map +1 -0
- package/dist/ui/components/KPICard.js +61 -0
- package/dist/ui/components/Modal.d.ts +34 -0
- package/dist/ui/components/Modal.d.ts.map +1 -0
- package/dist/ui/components/Modal.js +30 -0
- package/dist/ui/components/index.d.ts +18 -0
- package/dist/ui/components/index.d.ts.map +1 -0
- package/dist/ui/components/index.js +11 -0
- package/dist/validation/template-validator.d.ts +25 -0
- package/dist/validation/template-validator.d.ts.map +1 -0
- package/dist/validation/template-validator.js +305 -0
- package/package.json +102 -0
|
@@ -0,0 +1,386 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* thirdweb Engine Client
|
|
3
|
+
*
|
|
4
|
+
* Production-grade transaction management infrastructure
|
|
5
|
+
* Replaces custom transaction queues with thirdweb's managed service
|
|
6
|
+
*
|
|
7
|
+
* Features:
|
|
8
|
+
* - Automatic transaction queueing and execution
|
|
9
|
+
* - Gas price optimization
|
|
10
|
+
* - Automatic retry with exponential backoff
|
|
11
|
+
* - Webhook notifications for transaction events
|
|
12
|
+
* - Multi-chain support
|
|
13
|
+
* - Production-ready scalability
|
|
14
|
+
*/
|
|
15
|
+
/**
|
|
16
|
+
* thirdweb Engine Client
|
|
17
|
+
*
|
|
18
|
+
* Manages blockchain transactions through thirdweb's production infrastructure
|
|
19
|
+
*/
|
|
20
|
+
export class EngineClient {
|
|
21
|
+
constructor(config) {
|
|
22
|
+
this.url = config.url.replace(/\/$/, ''); // Remove trailing slash
|
|
23
|
+
this.accessToken = config.accessToken;
|
|
24
|
+
this.backendWalletAddress = config.backendWalletAddress;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Send a transaction through Engine
|
|
28
|
+
*
|
|
29
|
+
* Automatically queues, optimizes gas, and retries failed transactions.
|
|
30
|
+
*
|
|
31
|
+
* @param params - Transaction parameters
|
|
32
|
+
* @returns Transaction result with queue ID
|
|
33
|
+
*
|
|
34
|
+
* @example Basic transaction
|
|
35
|
+
* ```typescript
|
|
36
|
+
* import { EngineClient, varityL3Testnet } from '@varity-labs/sdk';
|
|
37
|
+
* import { prepareContractCall } from 'thirdweb';
|
|
38
|
+
*
|
|
39
|
+
* const engine = new EngineClient({
|
|
40
|
+
* url: 'https://engine.varity.so',
|
|
41
|
+
* accessToken: process.env.ENGINE_ACCESS_TOKEN,
|
|
42
|
+
* backendWalletAddress: '0x...'
|
|
43
|
+
* });
|
|
44
|
+
*
|
|
45
|
+
* // Prepare transaction
|
|
46
|
+
* const tx = prepareContractCall({
|
|
47
|
+
* contract,
|
|
48
|
+
* method: 'function transfer(address to, uint256 amount)',
|
|
49
|
+
* params: [recipientAddress, amount]
|
|
50
|
+
* });
|
|
51
|
+
*
|
|
52
|
+
* // Send through Engine
|
|
53
|
+
* const result = await engine.sendTransaction({
|
|
54
|
+
* chain: varityL3Testnet,
|
|
55
|
+
* to: contract.address,
|
|
56
|
+
* data: tx.data,
|
|
57
|
+
* value: '0'
|
|
58
|
+
* });
|
|
59
|
+
*
|
|
60
|
+
* console.log('Queue ID:', result.queueId);
|
|
61
|
+
* ```
|
|
62
|
+
*
|
|
63
|
+
* @example With webhook notifications
|
|
64
|
+
* ```typescript
|
|
65
|
+
* const result = await engine.sendTransaction({
|
|
66
|
+
* chain: varityL3Testnet,
|
|
67
|
+
* to: contractAddress,
|
|
68
|
+
* data: encodedData,
|
|
69
|
+
* webhookUrl: 'https://myapp.com/api/webhook/engine'
|
|
70
|
+
* });
|
|
71
|
+
*
|
|
72
|
+
* // Your webhook will receive status updates:
|
|
73
|
+
* // { queueId, status: 'mined', transactionHash, blockNumber }
|
|
74
|
+
* ```
|
|
75
|
+
*
|
|
76
|
+
* @example With gas limit
|
|
77
|
+
* ```typescript
|
|
78
|
+
* const result = await engine.sendTransaction({
|
|
79
|
+
* chain: varityL3Testnet,
|
|
80
|
+
* to: contractAddress,
|
|
81
|
+
* data: encodedData,
|
|
82
|
+
* gasLimit: '500000' // Override estimated gas
|
|
83
|
+
* });
|
|
84
|
+
* ```
|
|
85
|
+
*/
|
|
86
|
+
async sendTransaction(params) {
|
|
87
|
+
const response = await this.request('/transaction/write', {
|
|
88
|
+
method: 'POST',
|
|
89
|
+
body: JSON.stringify({
|
|
90
|
+
chainId: params.chain.id,
|
|
91
|
+
toAddress: params.to,
|
|
92
|
+
data: params.data,
|
|
93
|
+
value: params.value || '0',
|
|
94
|
+
gasLimit: params.gasLimit,
|
|
95
|
+
backendWalletAddress: this.backendWalletAddress,
|
|
96
|
+
webhookUrl: params.webhookUrl,
|
|
97
|
+
}),
|
|
98
|
+
});
|
|
99
|
+
return {
|
|
100
|
+
queueId: response.result.queueId,
|
|
101
|
+
status: 'queued',
|
|
102
|
+
timestamp: new Date(),
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Deploy a contract through Engine
|
|
107
|
+
*
|
|
108
|
+
* Deploys smart contracts with automatic gas optimization and retry logic.
|
|
109
|
+
*
|
|
110
|
+
* @param params - Deployment parameters
|
|
111
|
+
* @returns Deployment result with queue ID
|
|
112
|
+
*
|
|
113
|
+
* @example Deploy ERC-721 NFT contract
|
|
114
|
+
* ```typescript
|
|
115
|
+
* import { EngineClient, varityL3Testnet } from '@varity-labs/sdk';
|
|
116
|
+
* import NFTContractABI from './abis/NFTContract.json';
|
|
117
|
+
* import NFTContractBytecode from './bytecode/NFTContract.json';
|
|
118
|
+
*
|
|
119
|
+
* const engine = new EngineClient({
|
|
120
|
+
* url: 'https://engine.varity.so',
|
|
121
|
+
* accessToken: process.env.ENGINE_ACCESS_TOKEN
|
|
122
|
+
* });
|
|
123
|
+
*
|
|
124
|
+
* const result = await engine.deployContract({
|
|
125
|
+
* chain: varityL3Testnet,
|
|
126
|
+
* abi: NFTContractABI,
|
|
127
|
+
* bytecode: NFTContractBytecode.bytecode,
|
|
128
|
+
* constructorArgs: [
|
|
129
|
+
* 'My NFT Collection', // name
|
|
130
|
+
* 'MNFT', // symbol
|
|
131
|
+
* '0x...' // owner address
|
|
132
|
+
* ]
|
|
133
|
+
* });
|
|
134
|
+
*
|
|
135
|
+
* console.log('Deploying contract, Queue ID:', result.queueId);
|
|
136
|
+
* ```
|
|
137
|
+
*
|
|
138
|
+
* @example Deploy ERC-20 token
|
|
139
|
+
* ```typescript
|
|
140
|
+
* const result = await engine.deployContract({
|
|
141
|
+
* chain: varityL3Testnet,
|
|
142
|
+
* abi: ERC20ABI,
|
|
143
|
+
* bytecode: ERC20Bytecode.bytecode,
|
|
144
|
+
* constructorArgs: [
|
|
145
|
+
* 'My Token', // name
|
|
146
|
+
* 'MTK', // symbol
|
|
147
|
+
* ethers.utils.parseEther('1000000') // initial supply
|
|
148
|
+
* ],
|
|
149
|
+
* webhookUrl: 'https://myapp.com/api/webhook/deployment'
|
|
150
|
+
* });
|
|
151
|
+
* ```
|
|
152
|
+
*
|
|
153
|
+
* @example Deploy and wait for completion
|
|
154
|
+
* ```typescript
|
|
155
|
+
* const deployment = await engine.deployContract({
|
|
156
|
+
* chain: varityL3Testnet,
|
|
157
|
+
* abi: ContractABI,
|
|
158
|
+
* bytecode: ContractBytecode.bytecode,
|
|
159
|
+
* constructorArgs: []
|
|
160
|
+
* });
|
|
161
|
+
*
|
|
162
|
+
* // Wait for deployment to complete
|
|
163
|
+
* const completed = await engine.waitForTransaction(deployment.queueId);
|
|
164
|
+
* console.log('Contract deployed at:', completed.transactionHash);
|
|
165
|
+
* ```
|
|
166
|
+
*/
|
|
167
|
+
async deployContract(params) {
|
|
168
|
+
const response = await this.request('/contract/deploy', {
|
|
169
|
+
method: 'POST',
|
|
170
|
+
body: JSON.stringify({
|
|
171
|
+
chainId: params.chain.id,
|
|
172
|
+
abi: params.abi,
|
|
173
|
+
bytecode: params.bytecode,
|
|
174
|
+
constructorArgs: params.constructorArgs || [],
|
|
175
|
+
backendWalletAddress: this.backendWalletAddress,
|
|
176
|
+
webhookUrl: params.webhookUrl,
|
|
177
|
+
}),
|
|
178
|
+
});
|
|
179
|
+
return {
|
|
180
|
+
queueId: response.result.queueId,
|
|
181
|
+
status: 'queued',
|
|
182
|
+
timestamp: new Date(),
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Get transaction status
|
|
187
|
+
*/
|
|
188
|
+
async getTransactionStatus(queueId) {
|
|
189
|
+
const response = await this.request(`/transaction/status/${queueId}`);
|
|
190
|
+
return {
|
|
191
|
+
queueId,
|
|
192
|
+
transactionHash: response.result.transactionHash,
|
|
193
|
+
status: response.result.status,
|
|
194
|
+
blockNumber: response.result.blockNumber,
|
|
195
|
+
errorMessage: response.result.errorMessage,
|
|
196
|
+
timestamp: new Date(response.result.timestamp),
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Wait for transaction to be mined
|
|
201
|
+
*
|
|
202
|
+
* Polls Engine API until transaction is confirmed or fails.
|
|
203
|
+
*
|
|
204
|
+
* @param queueId - Engine queue ID from sendTransaction or deployContract
|
|
205
|
+
* @param options - Optional polling configuration
|
|
206
|
+
* @returns Completed transaction result
|
|
207
|
+
*
|
|
208
|
+
* @example Basic usage
|
|
209
|
+
* ```typescript
|
|
210
|
+
* import { EngineClient } from '@varity-labs/sdk';
|
|
211
|
+
*
|
|
212
|
+
* const engine = new EngineClient({ url, accessToken });
|
|
213
|
+
*
|
|
214
|
+
* // Send transaction
|
|
215
|
+
* const tx = await engine.sendTransaction({ ... });
|
|
216
|
+
*
|
|
217
|
+
* // Wait for confirmation (default: poll every 2s, timeout 5min)
|
|
218
|
+
* const result = await engine.waitForTransaction(tx.queueId);
|
|
219
|
+
* console.log('Transaction mined:', result.transactionHash);
|
|
220
|
+
* console.log('Block number:', result.blockNumber);
|
|
221
|
+
* ```
|
|
222
|
+
*
|
|
223
|
+
* @example With custom polling interval
|
|
224
|
+
* ```typescript
|
|
225
|
+
* // Poll every 5 seconds instead of default 2 seconds
|
|
226
|
+
* const result = await engine.waitForTransaction(queueId, {
|
|
227
|
+
* pollInterval: 5000, // 5 seconds
|
|
228
|
+
* timeout: 600000 // 10 minutes
|
|
229
|
+
* });
|
|
230
|
+
* ```
|
|
231
|
+
*
|
|
232
|
+
* @example With error handling
|
|
233
|
+
* ```typescript
|
|
234
|
+
* try {
|
|
235
|
+
* const result = await engine.waitForTransaction(queueId);
|
|
236
|
+
* console.log('Success:', result.transactionHash);
|
|
237
|
+
* } catch (error) {
|
|
238
|
+
* if (error.message.includes('timed out')) {
|
|
239
|
+
* console.error('Transaction took too long');
|
|
240
|
+
* } else if (error.message.includes('errored')) {
|
|
241
|
+
* console.error('Transaction failed:', error.message);
|
|
242
|
+
* }
|
|
243
|
+
* }
|
|
244
|
+
* ```
|
|
245
|
+
*/
|
|
246
|
+
async waitForTransaction(queueId, options) {
|
|
247
|
+
const pollInterval = options?.pollInterval || 2000;
|
|
248
|
+
const timeout = options?.timeout || 300000;
|
|
249
|
+
const startTime = Date.now();
|
|
250
|
+
while (Date.now() - startTime < timeout) {
|
|
251
|
+
const status = await this.getTransactionStatus(queueId);
|
|
252
|
+
if (status.status === 'mined') {
|
|
253
|
+
return status;
|
|
254
|
+
}
|
|
255
|
+
if (status.status === 'errored' || status.status === 'cancelled') {
|
|
256
|
+
throw new Error(`Transaction ${queueId} ${status.status}: ${status.errorMessage || 'Unknown error'}`);
|
|
257
|
+
}
|
|
258
|
+
// Wait before polling again
|
|
259
|
+
await new Promise(resolve => setTimeout(resolve, pollInterval));
|
|
260
|
+
}
|
|
261
|
+
throw new Error(`Transaction ${queueId} timed out after ${timeout}ms`);
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* Cancel a queued transaction
|
|
265
|
+
*/
|
|
266
|
+
async cancelTransaction(queueId) {
|
|
267
|
+
await this.request(`/transaction/cancel/${queueId}`, {
|
|
268
|
+
method: 'POST',
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* Get backend wallet balance
|
|
273
|
+
*/
|
|
274
|
+
async getWalletBalance(chainId, walletAddress) {
|
|
275
|
+
const address = walletAddress || this.backendWalletAddress;
|
|
276
|
+
if (!address) {
|
|
277
|
+
throw new Error('Wallet address required');
|
|
278
|
+
}
|
|
279
|
+
const response = await this.request(`/backend-wallet/${chainId}/get-balance?walletAddress=${address}`);
|
|
280
|
+
return response.result.balance;
|
|
281
|
+
}
|
|
282
|
+
/**
|
|
283
|
+
* Get all backend wallets
|
|
284
|
+
*/
|
|
285
|
+
async getBackendWallets() {
|
|
286
|
+
const response = await this.request('/backend-wallet/get-all');
|
|
287
|
+
return response.result.wallets;
|
|
288
|
+
}
|
|
289
|
+
/**
|
|
290
|
+
* Get transaction nonce for a wallet
|
|
291
|
+
*/
|
|
292
|
+
async getNonce(chainId, walletAddress) {
|
|
293
|
+
const address = walletAddress || this.backendWalletAddress;
|
|
294
|
+
if (!address) {
|
|
295
|
+
throw new Error('Wallet address required');
|
|
296
|
+
}
|
|
297
|
+
const response = await this.request(`/backend-wallet/${chainId}/get-nonce?walletAddress=${address}`);
|
|
298
|
+
return response.result.nonce;
|
|
299
|
+
}
|
|
300
|
+
/**
|
|
301
|
+
* Make HTTP request to Engine API
|
|
302
|
+
*/
|
|
303
|
+
async request(endpoint, options) {
|
|
304
|
+
const url = `${this.url}${endpoint}`;
|
|
305
|
+
const response = await fetch(url, {
|
|
306
|
+
...options,
|
|
307
|
+
headers: {
|
|
308
|
+
'Content-Type': 'application/json',
|
|
309
|
+
Authorization: `Bearer ${this.accessToken}`,
|
|
310
|
+
...options?.headers,
|
|
311
|
+
},
|
|
312
|
+
});
|
|
313
|
+
if (!response.ok) {
|
|
314
|
+
const error = await response.json().catch(() => ({ error: response.statusText }));
|
|
315
|
+
throw new Error(`Engine request failed: ${error.error || error.message || 'Unknown error'}`);
|
|
316
|
+
}
|
|
317
|
+
return response.json();
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
/**
|
|
321
|
+
* Create Engine client instance
|
|
322
|
+
*
|
|
323
|
+
* Factory function for creating EngineClient instances.
|
|
324
|
+
*
|
|
325
|
+
* @param config - Engine configuration
|
|
326
|
+
* @returns Configured Engine client
|
|
327
|
+
*
|
|
328
|
+
* @example Basic setup
|
|
329
|
+
* ```typescript
|
|
330
|
+
* import { createEngineClient } from '@varity-labs/sdk';
|
|
331
|
+
*
|
|
332
|
+
* const engine = createEngineClient({
|
|
333
|
+
* url: 'https://engine.varity.so',
|
|
334
|
+
* accessToken: process.env.ENGINE_ACCESS_TOKEN
|
|
335
|
+
* });
|
|
336
|
+
*
|
|
337
|
+
* // Now use engine client
|
|
338
|
+
* const result = await engine.sendTransaction({ ... });
|
|
339
|
+
* ```
|
|
340
|
+
*
|
|
341
|
+
* @example With backend wallet
|
|
342
|
+
* ```typescript
|
|
343
|
+
* const engine = createEngineClient({
|
|
344
|
+
* url: 'https://engine.varity.so',
|
|
345
|
+
* accessToken: process.env.ENGINE_ACCESS_TOKEN,
|
|
346
|
+
* backendWalletAddress: '0x...' // Default wallet for all transactions
|
|
347
|
+
* });
|
|
348
|
+
* ```
|
|
349
|
+
*
|
|
350
|
+
* @example Self-hosted Engine
|
|
351
|
+
* ```typescript
|
|
352
|
+
* const engine = createEngineClient({
|
|
353
|
+
* url: 'https://my-engine.example.com',
|
|
354
|
+
* accessToken: process.env.MY_ENGINE_TOKEN
|
|
355
|
+
* });
|
|
356
|
+
* ```
|
|
357
|
+
*/
|
|
358
|
+
export function createEngineClient(config) {
|
|
359
|
+
return new EngineClient(config);
|
|
360
|
+
}
|
|
361
|
+
/**
|
|
362
|
+
* Webhook handler helper
|
|
363
|
+
*
|
|
364
|
+
* Use this to handle Engine webhook notifications in your backend
|
|
365
|
+
*/
|
|
366
|
+
export function parseEngineWebhook(payload) {
|
|
367
|
+
return {
|
|
368
|
+
queueId: payload.queueId,
|
|
369
|
+
status: payload.status,
|
|
370
|
+
transactionHash: payload.transactionHash,
|
|
371
|
+
blockNumber: payload.blockNumber,
|
|
372
|
+
errorMessage: payload.errorMessage,
|
|
373
|
+
timestamp: payload.timestamp,
|
|
374
|
+
};
|
|
375
|
+
}
|
|
376
|
+
/**
|
|
377
|
+
* Verify Engine webhook signature (if configured)
|
|
378
|
+
*/
|
|
379
|
+
export function verifyEngineWebhook(payload, signature, secret) {
|
|
380
|
+
// Implement HMAC verification
|
|
381
|
+
// This is a placeholder - actual implementation would use crypto.subtle or similar
|
|
382
|
+
// to verify HMAC-SHA256 signature
|
|
383
|
+
// For now, return true (webhook verification can be implemented based on Engine's spec)
|
|
384
|
+
console.warn('Engine webhook verification not implemented - please implement HMAC verification');
|
|
385
|
+
return true;
|
|
386
|
+
}
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* thirdweb Gateway Client
|
|
3
|
+
*
|
|
4
|
+
* Production-grade RPC infrastructure powered by thirdweb
|
|
5
|
+
* Provides reliable, fast, and scalable blockchain node access
|
|
6
|
+
*
|
|
7
|
+
* Features:
|
|
8
|
+
* - High-performance RPC endpoints
|
|
9
|
+
* - Automatic failover and load balancing
|
|
10
|
+
* - Request rate limiting and throttling
|
|
11
|
+
* - Chain-specific optimizations
|
|
12
|
+
* - Analytics and monitoring
|
|
13
|
+
* - WebSocket support for real-time data
|
|
14
|
+
*/
|
|
15
|
+
import type { Chain } from 'thirdweb';
|
|
16
|
+
/**
|
|
17
|
+
* Gateway configuration
|
|
18
|
+
*/
|
|
19
|
+
export interface GatewayConfig {
|
|
20
|
+
/**
|
|
21
|
+
* API key for authenticated requests (optional)
|
|
22
|
+
*/
|
|
23
|
+
apiKey?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Custom gateway URL (optional)
|
|
26
|
+
*/
|
|
27
|
+
gatewayUrl?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Request timeout in milliseconds
|
|
30
|
+
*/
|
|
31
|
+
timeout?: number;
|
|
32
|
+
/**
|
|
33
|
+
* Enable request retries
|
|
34
|
+
*/
|
|
35
|
+
enableRetries?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Maximum number of retries
|
|
38
|
+
*/
|
|
39
|
+
maxRetries?: number;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* RPC request options
|
|
43
|
+
*/
|
|
44
|
+
export interface RPCRequestOptions {
|
|
45
|
+
/**
|
|
46
|
+
* RPC method
|
|
47
|
+
*/
|
|
48
|
+
method: string;
|
|
49
|
+
/**
|
|
50
|
+
* Method parameters
|
|
51
|
+
*/
|
|
52
|
+
params?: any[];
|
|
53
|
+
/**
|
|
54
|
+
* Request timeout (overrides global setting)
|
|
55
|
+
*/
|
|
56
|
+
timeout?: number;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* RPC response
|
|
60
|
+
*/
|
|
61
|
+
export interface RPCResponse<T = any> {
|
|
62
|
+
/**
|
|
63
|
+
* Result data
|
|
64
|
+
*/
|
|
65
|
+
result: T;
|
|
66
|
+
/**
|
|
67
|
+
* Request ID
|
|
68
|
+
*/
|
|
69
|
+
id: number;
|
|
70
|
+
/**
|
|
71
|
+
* JSON-RPC version
|
|
72
|
+
*/
|
|
73
|
+
jsonrpc: string;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Gateway statistics
|
|
77
|
+
*/
|
|
78
|
+
export interface GatewayStats {
|
|
79
|
+
/**
|
|
80
|
+
* Total requests made
|
|
81
|
+
*/
|
|
82
|
+
totalRequests: number;
|
|
83
|
+
/**
|
|
84
|
+
* Successful requests
|
|
85
|
+
*/
|
|
86
|
+
successfulRequests: number;
|
|
87
|
+
/**
|
|
88
|
+
* Failed requests
|
|
89
|
+
*/
|
|
90
|
+
failedRequests: number;
|
|
91
|
+
/**
|
|
92
|
+
* Average response time (ms)
|
|
93
|
+
*/
|
|
94
|
+
averageResponseTime: number;
|
|
95
|
+
/**
|
|
96
|
+
* Requests per minute
|
|
97
|
+
*/
|
|
98
|
+
requestsPerMinute: number;
|
|
99
|
+
/**
|
|
100
|
+
* Error rate (percentage)
|
|
101
|
+
*/
|
|
102
|
+
errorRate: number;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* WebSocket connection options
|
|
106
|
+
*/
|
|
107
|
+
export interface WebSocketOptions {
|
|
108
|
+
/**
|
|
109
|
+
* Chain to connect to
|
|
110
|
+
*/
|
|
111
|
+
chain: Chain;
|
|
112
|
+
/**
|
|
113
|
+
* Event handlers
|
|
114
|
+
*/
|
|
115
|
+
onMessage?: (data: any) => void;
|
|
116
|
+
onError?: (error: Error) => void;
|
|
117
|
+
onConnect?: () => void;
|
|
118
|
+
onDisconnect?: () => void;
|
|
119
|
+
/**
|
|
120
|
+
* Auto-reconnect on disconnect
|
|
121
|
+
*/
|
|
122
|
+
autoReconnect?: boolean;
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* thirdweb Gateway Client
|
|
126
|
+
*
|
|
127
|
+
* Production RPC infrastructure for blockchain applications
|
|
128
|
+
*/
|
|
129
|
+
export declare class GatewayClient {
|
|
130
|
+
private apiKey?;
|
|
131
|
+
private gatewayUrl;
|
|
132
|
+
private timeout;
|
|
133
|
+
private enableRetries;
|
|
134
|
+
private maxRetries;
|
|
135
|
+
private stats;
|
|
136
|
+
private requestId;
|
|
137
|
+
constructor(config?: GatewayConfig);
|
|
138
|
+
/**
|
|
139
|
+
* Get RPC URL for a specific chain
|
|
140
|
+
*/
|
|
141
|
+
getRpcUrl(chain: Chain | number): string;
|
|
142
|
+
/**
|
|
143
|
+
* Get WebSocket URL for a specific chain
|
|
144
|
+
*/
|
|
145
|
+
getWebSocketUrl(chain: Chain | number): string;
|
|
146
|
+
/**
|
|
147
|
+
* Make an RPC request
|
|
148
|
+
*/
|
|
149
|
+
request<T = any>(chain: Chain | number, options: RPCRequestOptions): Promise<RPCResponse<T>>;
|
|
150
|
+
/**
|
|
151
|
+
* Batch multiple RPC requests
|
|
152
|
+
*/
|
|
153
|
+
batchRequest<T = any>(chain: Chain | number, requests: RPCRequestOptions[]): Promise<RPCResponse<T>[]>;
|
|
154
|
+
/**
|
|
155
|
+
* Create a WebSocket connection
|
|
156
|
+
*/
|
|
157
|
+
connectWebSocket(options: WebSocketOptions): WebSocket;
|
|
158
|
+
/**
|
|
159
|
+
* Subscribe to new blocks
|
|
160
|
+
*/
|
|
161
|
+
subscribeToBlocks(chain: Chain | number, callback: (block: any) => void): Promise<() => void>;
|
|
162
|
+
/**
|
|
163
|
+
* Subscribe to contract events
|
|
164
|
+
*/
|
|
165
|
+
subscribeToLogs(chain: Chain | number, filter: {
|
|
166
|
+
address?: string;
|
|
167
|
+
topics?: string[];
|
|
168
|
+
}, callback: (log: any) => void): Promise<() => void>;
|
|
169
|
+
/**
|
|
170
|
+
* Get gateway statistics
|
|
171
|
+
*/
|
|
172
|
+
getStats(): GatewayStats;
|
|
173
|
+
/**
|
|
174
|
+
* Reset statistics
|
|
175
|
+
*/
|
|
176
|
+
resetStats(): void;
|
|
177
|
+
/**
|
|
178
|
+
* Make HTTP request with retry logic
|
|
179
|
+
*/
|
|
180
|
+
private makeRequest;
|
|
181
|
+
/**
|
|
182
|
+
* Update statistics
|
|
183
|
+
*/
|
|
184
|
+
private updateStats;
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Create Gateway client instance
|
|
188
|
+
*/
|
|
189
|
+
export declare function createGatewayClient(config?: GatewayConfig): GatewayClient;
|
|
190
|
+
//# sourceMappingURL=GatewayClient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GatewayClient.d.ts","sourceRoot":"","sources":["../../src/thirdweb/GatewayClient.ts"],"names":[],"mappings":"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"}
|