@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,113 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Chain Registry - Multi-Chain Configuration System
|
|
3
|
+
*
|
|
4
|
+
* Central registry for all supported blockchain networks in Varity SDK
|
|
5
|
+
* Supports Varity L3, Arbitrum, Base, and other EVM chains
|
|
6
|
+
*/
|
|
7
|
+
import { type Chain } from 'thirdweb/chains';
|
|
8
|
+
/**
|
|
9
|
+
* Chain Selection Configuration
|
|
10
|
+
*/
|
|
11
|
+
export interface ChainSelection {
|
|
12
|
+
/**
|
|
13
|
+
* Optimization priority
|
|
14
|
+
*/
|
|
15
|
+
optimize: 'cost' | 'speed' | 'security';
|
|
16
|
+
/**
|
|
17
|
+
* Optional requirements for chain selection
|
|
18
|
+
*/
|
|
19
|
+
requirements?: {
|
|
20
|
+
/**
|
|
21
|
+
* Maximum acceptable gas price (in wei)
|
|
22
|
+
*/
|
|
23
|
+
maxGasPrice?: bigint;
|
|
24
|
+
/**
|
|
25
|
+
* Minimum transactions per second
|
|
26
|
+
*/
|
|
27
|
+
minTPS?: number;
|
|
28
|
+
/**
|
|
29
|
+
* Privacy level required
|
|
30
|
+
*/
|
|
31
|
+
privacy?: 'none' | 'lit' | 'fhe' | 'tee';
|
|
32
|
+
/**
|
|
33
|
+
* Require testnet
|
|
34
|
+
*/
|
|
35
|
+
testnet?: boolean;
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Chain metadata for selection
|
|
40
|
+
*/
|
|
41
|
+
export interface ChainMetadata {
|
|
42
|
+
chain: Chain;
|
|
43
|
+
averageGasPrice: bigint;
|
|
44
|
+
estimatedTPS: number;
|
|
45
|
+
privacyLevel: 'none' | 'lit' | 'fhe' | 'tee';
|
|
46
|
+
costRating: number;
|
|
47
|
+
speedRating: number;
|
|
48
|
+
securityRating: number;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Chain Registry Class
|
|
52
|
+
*
|
|
53
|
+
* Provides centralized access to all supported chains and intelligent
|
|
54
|
+
* chain selection based on application requirements
|
|
55
|
+
*/
|
|
56
|
+
export declare class ChainRegistry {
|
|
57
|
+
private static chains;
|
|
58
|
+
/**
|
|
59
|
+
* Initialize the registry with chain metadata
|
|
60
|
+
*/
|
|
61
|
+
static initialize(): void;
|
|
62
|
+
/**
|
|
63
|
+
* Get all supported chains
|
|
64
|
+
*/
|
|
65
|
+
static getAllChains(): Chain[];
|
|
66
|
+
/**
|
|
67
|
+
* Get chain by ID
|
|
68
|
+
*/
|
|
69
|
+
static getChain(chainId: number): Chain;
|
|
70
|
+
/**
|
|
71
|
+
* Get chain metadata
|
|
72
|
+
*/
|
|
73
|
+
static getChainMetadata(chainId: number): ChainMetadata;
|
|
74
|
+
/**
|
|
75
|
+
* Select optimal chain based on requirements
|
|
76
|
+
*/
|
|
77
|
+
static selectChain(config: ChainSelection): Chain;
|
|
78
|
+
/**
|
|
79
|
+
* Get testnet chains only
|
|
80
|
+
*/
|
|
81
|
+
static getTestnetChains(): Chain[];
|
|
82
|
+
/**
|
|
83
|
+
* Get mainnet chains only
|
|
84
|
+
*/
|
|
85
|
+
static getMainnetChains(): Chain[];
|
|
86
|
+
/**
|
|
87
|
+
* Check if chain is supported
|
|
88
|
+
*/
|
|
89
|
+
static isSupported(chainId: number): boolean;
|
|
90
|
+
/**
|
|
91
|
+
* Add custom chain to registry
|
|
92
|
+
*/
|
|
93
|
+
static addChain(chainId: number, metadata: ChainMetadata): void;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Convenience exports
|
|
97
|
+
*/
|
|
98
|
+
export declare const SUPPORTED_CHAINS: Readonly<import("thirdweb/chains").ChainOptions & {
|
|
99
|
+
rpc: string;
|
|
100
|
+
}>[];
|
|
101
|
+
export declare const TESTNET_CHAINS: Readonly<import("thirdweb/chains").ChainOptions & {
|
|
102
|
+
rpc: string;
|
|
103
|
+
}>[];
|
|
104
|
+
export declare const MAINNET_CHAINS: Readonly<import("thirdweb/chains").ChainOptions & {
|
|
105
|
+
rpc: string;
|
|
106
|
+
}>[];
|
|
107
|
+
/**
|
|
108
|
+
* Default chain (Varity L3 Testnet)
|
|
109
|
+
*/
|
|
110
|
+
export declare const DEFAULT_CHAIN: Readonly<import("thirdweb/chains").ChainOptions & {
|
|
111
|
+
rpc: string;
|
|
112
|
+
}>;
|
|
113
|
+
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/chains/registry.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAe,KAAK,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAK1D;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,QAAQ,EAAE,MAAM,GAAG,OAAO,GAAG,UAAU,CAAC;IAExC;;OAEG;IACH,YAAY,CAAC,EAAE;QACb;;WAEG;QACH,WAAW,CAAC,EAAE,MAAM,CAAC;QAErB;;WAEG;QACH,MAAM,CAAC,EAAE,MAAM,CAAC;QAEhB;;WAEG;QACH,OAAO,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;QAEzC;;WAEG;QACH,OAAO,CAAC,EAAE,OAAO,CAAC;KACnB,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,KAAK,CAAC;IACb,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;IAC7C,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;CACxB;AAED;;;;;GAKG;AACH,qBAAa,aAAa;IACxB,OAAO,CAAC,MAAM,CAAC,MAAM,CAAyC;IAE9D;;OAEG;IACH,MAAM,CAAC,UAAU,IAAI,IAAI;IAyDzB;;OAEG;IACH,MAAM,CAAC,YAAY,IAAI,KAAK,EAAE;IAO9B;;OAEG;IACH,MAAM,CAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,KAAK;IAavC;;OAEG;IACH,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,aAAa;IAavD;;OAEG;IACH,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,cAAc,GAAG,KAAK;IAgDjD;;OAEG;IACH,MAAM,CAAC,gBAAgB,IAAI,KAAK,EAAE;IAUlC;;OAEG;IACH,MAAM,CAAC,gBAAgB,IAAI,KAAK,EAAE;IAUlC;;OAEG;IACH,MAAM,CAAC,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO;IAO5C;;OAEG;IACH,MAAM,CAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,aAAa,GAAG,IAAI;CAMhE;AAKD;;GAEG;AACH,eAAO,MAAM,gBAAgB;;IAA+B,CAAC;AAC7D,eAAO,MAAM,cAAc;;IAAmC,CAAC;AAC/D,eAAO,MAAM,cAAc;;IAAmC,CAAC;AAE/D;;GAEG;AACH,eAAO,MAAM,aAAa;;EAAkB,CAAC"}
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Chain Registry - Multi-Chain Configuration System
|
|
3
|
+
*
|
|
4
|
+
* Central registry for all supported blockchain networks in Varity SDK
|
|
5
|
+
* Supports Varity L3, Arbitrum, Base, and other EVM chains
|
|
6
|
+
*/
|
|
7
|
+
import { varityL3Testnet } from './varityL3';
|
|
8
|
+
import { arbitrumSepolia, arbitrum } from './arbitrum';
|
|
9
|
+
import { baseSepolia, base } from './base';
|
|
10
|
+
/**
|
|
11
|
+
* Chain Registry Class
|
|
12
|
+
*
|
|
13
|
+
* Provides centralized access to all supported chains and intelligent
|
|
14
|
+
* chain selection based on application requirements
|
|
15
|
+
*/
|
|
16
|
+
export class ChainRegistry {
|
|
17
|
+
/**
|
|
18
|
+
* Initialize the registry with chain metadata
|
|
19
|
+
*/
|
|
20
|
+
static initialize() {
|
|
21
|
+
// Varity L3 Testnet
|
|
22
|
+
this.chains.set(33529, {
|
|
23
|
+
chain: varityL3Testnet,
|
|
24
|
+
averageGasPrice: BigInt(100000000), // 0.1 gwei (very low)
|
|
25
|
+
estimatedTPS: 500,
|
|
26
|
+
privacyLevel: 'none',
|
|
27
|
+
costRating: 1, // Cheapest
|
|
28
|
+
speedRating: 8,
|
|
29
|
+
securityRating: 7,
|
|
30
|
+
});
|
|
31
|
+
// Arbitrum Sepolia (testnet)
|
|
32
|
+
this.chains.set(421614, {
|
|
33
|
+
chain: arbitrumSepolia,
|
|
34
|
+
averageGasPrice: BigInt(100000000), // 0.1 gwei
|
|
35
|
+
estimatedTPS: 4000,
|
|
36
|
+
privacyLevel: 'none',
|
|
37
|
+
costRating: 2,
|
|
38
|
+
speedRating: 9,
|
|
39
|
+
securityRating: 8,
|
|
40
|
+
});
|
|
41
|
+
// Arbitrum One (mainnet)
|
|
42
|
+
this.chains.set(42161, {
|
|
43
|
+
chain: arbitrum,
|
|
44
|
+
averageGasPrice: BigInt(100000000), // 0.1 gwei
|
|
45
|
+
estimatedTPS: 4000,
|
|
46
|
+
privacyLevel: 'none',
|
|
47
|
+
costRating: 3,
|
|
48
|
+
speedRating: 9,
|
|
49
|
+
securityRating: 9,
|
|
50
|
+
});
|
|
51
|
+
// Base Sepolia (testnet)
|
|
52
|
+
this.chains.set(84532, {
|
|
53
|
+
chain: baseSepolia,
|
|
54
|
+
averageGasPrice: BigInt(100000000), // 0.1 gwei
|
|
55
|
+
estimatedTPS: 2000,
|
|
56
|
+
privacyLevel: 'none',
|
|
57
|
+
costRating: 2,
|
|
58
|
+
speedRating: 8,
|
|
59
|
+
securityRating: 8,
|
|
60
|
+
});
|
|
61
|
+
// Base (mainnet)
|
|
62
|
+
this.chains.set(8453, {
|
|
63
|
+
chain: base,
|
|
64
|
+
averageGasPrice: BigInt(100000000), // 0.1 gwei
|
|
65
|
+
estimatedTPS: 2000,
|
|
66
|
+
privacyLevel: 'none',
|
|
67
|
+
costRating: 3,
|
|
68
|
+
speedRating: 8,
|
|
69
|
+
securityRating: 9,
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Get all supported chains
|
|
74
|
+
*/
|
|
75
|
+
static getAllChains() {
|
|
76
|
+
if (this.chains.size === 0) {
|
|
77
|
+
this.initialize();
|
|
78
|
+
}
|
|
79
|
+
return Array.from(this.chains.values()).map(meta => meta.chain);
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Get chain by ID
|
|
83
|
+
*/
|
|
84
|
+
static getChain(chainId) {
|
|
85
|
+
if (this.chains.size === 0) {
|
|
86
|
+
this.initialize();
|
|
87
|
+
}
|
|
88
|
+
const metadata = this.chains.get(chainId);
|
|
89
|
+
if (!metadata) {
|
|
90
|
+
throw new Error(`Chain ${chainId} not found in registry`);
|
|
91
|
+
}
|
|
92
|
+
return metadata.chain;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Get chain metadata
|
|
96
|
+
*/
|
|
97
|
+
static getChainMetadata(chainId) {
|
|
98
|
+
if (this.chains.size === 0) {
|
|
99
|
+
this.initialize();
|
|
100
|
+
}
|
|
101
|
+
const metadata = this.chains.get(chainId);
|
|
102
|
+
if (!metadata) {
|
|
103
|
+
throw new Error(`Chain ${chainId} not found in registry`);
|
|
104
|
+
}
|
|
105
|
+
return metadata;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Select optimal chain based on requirements
|
|
109
|
+
*/
|
|
110
|
+
static selectChain(config) {
|
|
111
|
+
if (this.chains.size === 0) {
|
|
112
|
+
this.initialize();
|
|
113
|
+
}
|
|
114
|
+
let candidates = Array.from(this.chains.values());
|
|
115
|
+
// Filter by requirements
|
|
116
|
+
if (config.requirements) {
|
|
117
|
+
const { maxGasPrice, minTPS, privacy, testnet } = config.requirements;
|
|
118
|
+
if (maxGasPrice) {
|
|
119
|
+
candidates = candidates.filter(c => c.averageGasPrice <= maxGasPrice);
|
|
120
|
+
}
|
|
121
|
+
if (minTPS) {
|
|
122
|
+
candidates = candidates.filter(c => c.estimatedTPS >= minTPS);
|
|
123
|
+
}
|
|
124
|
+
if (privacy && privacy !== 'none') {
|
|
125
|
+
candidates = candidates.filter(c => c.privacyLevel === privacy);
|
|
126
|
+
}
|
|
127
|
+
if (testnet !== undefined) {
|
|
128
|
+
candidates = candidates.filter(c => c.chain.testnet === testnet);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
if (candidates.length === 0) {
|
|
132
|
+
throw new Error('No chains match the specified requirements');
|
|
133
|
+
}
|
|
134
|
+
// Sort by optimization priority
|
|
135
|
+
switch (config.optimize) {
|
|
136
|
+
case 'cost':
|
|
137
|
+
candidates.sort((a, b) => a.costRating - b.costRating);
|
|
138
|
+
break;
|
|
139
|
+
case 'speed':
|
|
140
|
+
candidates.sort((a, b) => b.speedRating - a.speedRating);
|
|
141
|
+
break;
|
|
142
|
+
case 'security':
|
|
143
|
+
candidates.sort((a, b) => b.securityRating - a.securityRating);
|
|
144
|
+
break;
|
|
145
|
+
}
|
|
146
|
+
return candidates[0].chain;
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Get testnet chains only
|
|
150
|
+
*/
|
|
151
|
+
static getTestnetChains() {
|
|
152
|
+
if (this.chains.size === 0) {
|
|
153
|
+
this.initialize();
|
|
154
|
+
}
|
|
155
|
+
return Array.from(this.chains.values())
|
|
156
|
+
.filter(meta => meta.chain.testnet === true)
|
|
157
|
+
.map(meta => meta.chain);
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Get mainnet chains only
|
|
161
|
+
*/
|
|
162
|
+
static getMainnetChains() {
|
|
163
|
+
if (this.chains.size === 0) {
|
|
164
|
+
this.initialize();
|
|
165
|
+
}
|
|
166
|
+
return Array.from(this.chains.values())
|
|
167
|
+
.filter(meta => meta.chain.testnet !== true)
|
|
168
|
+
.map(meta => meta.chain);
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Check if chain is supported
|
|
172
|
+
*/
|
|
173
|
+
static isSupported(chainId) {
|
|
174
|
+
if (this.chains.size === 0) {
|
|
175
|
+
this.initialize();
|
|
176
|
+
}
|
|
177
|
+
return this.chains.has(chainId);
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Add custom chain to registry
|
|
181
|
+
*/
|
|
182
|
+
static addChain(chainId, metadata) {
|
|
183
|
+
if (this.chains.size === 0) {
|
|
184
|
+
this.initialize();
|
|
185
|
+
}
|
|
186
|
+
this.chains.set(chainId, metadata);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
ChainRegistry.chains = new Map();
|
|
190
|
+
// Initialize on import
|
|
191
|
+
ChainRegistry.initialize();
|
|
192
|
+
/**
|
|
193
|
+
* Convenience exports
|
|
194
|
+
*/
|
|
195
|
+
export const SUPPORTED_CHAINS = ChainRegistry.getAllChains();
|
|
196
|
+
export const TESTNET_CHAINS = ChainRegistry.getTestnetChains();
|
|
197
|
+
export const MAINNET_CHAINS = ChainRegistry.getMainnetChains();
|
|
198
|
+
/**
|
|
199
|
+
* Default chain (Varity L3 Testnet)
|
|
200
|
+
*/
|
|
201
|
+
export const DEFAULT_CHAIN = varityL3Testnet;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Varity L3 Chain Configuration
|
|
3
|
+
*
|
|
4
|
+
* Varity L3 is an Arbitrum Orbit rollup deployed on Conduit
|
|
5
|
+
* Chain ID: 33529
|
|
6
|
+
* Native Token: Bridged USDC (6 decimals - NOT 18!)
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Varity L3 Testnet Configuration
|
|
10
|
+
*
|
|
11
|
+
* CRITICAL NOTES:
|
|
12
|
+
* - Native token is USDC with 6 decimals (not 18 like ETH)
|
|
13
|
+
* - All token amounts must account for 6 decimals: 1 USDC = 1_000_000 (not 10^18)
|
|
14
|
+
* - Chain ID 33529 is unique to Varity L3 testnet
|
|
15
|
+
* - RPC URL is Conduit-hosted (managed Arbitrum Orbit)
|
|
16
|
+
*/
|
|
17
|
+
export declare const varityL3Testnet: Readonly<import("thirdweb/chains").ChainOptions & {
|
|
18
|
+
rpc: string;
|
|
19
|
+
}>;
|
|
20
|
+
/**
|
|
21
|
+
* Alias for varityL3Testnet (for backwards compatibility)
|
|
22
|
+
*/
|
|
23
|
+
export declare const varityL3: Readonly<import("thirdweb/chains").ChainOptions & {
|
|
24
|
+
rpc: string;
|
|
25
|
+
}>;
|
|
26
|
+
/**
|
|
27
|
+
* USDC decimals constant
|
|
28
|
+
*/
|
|
29
|
+
export declare const USDC_DECIMALS = 6;
|
|
30
|
+
/**
|
|
31
|
+
* USDC Contract Address on Varity L3
|
|
32
|
+
* CRITICAL: This is bridged USDC with 6 decimals
|
|
33
|
+
*/
|
|
34
|
+
export declare const VARITY_USDC_ADDRESS = "0x6Fd8ee6B4C2193e9E2e0E2EC5D295689B607c0cE";
|
|
35
|
+
/**
|
|
36
|
+
* Format USDC amount (6 decimals)
|
|
37
|
+
*/
|
|
38
|
+
export declare function formatUSDC(amount: bigint | string | number, decimals?: number): string;
|
|
39
|
+
/**
|
|
40
|
+
* Parse USDC amount to bigint (6 decimals)
|
|
41
|
+
*/
|
|
42
|
+
export declare function parseUSDC(amount: string | number): bigint;
|
|
43
|
+
/**
|
|
44
|
+
* Block explorer URL builder
|
|
45
|
+
*/
|
|
46
|
+
export declare function getExplorerUrl(type: 'tx' | 'address' | 'block', hash: string): string;
|
|
47
|
+
/**
|
|
48
|
+
* Format address for display (0x1234...5678)
|
|
49
|
+
*/
|
|
50
|
+
export declare function formatAddress(address: string, startChars?: number, endChars?: number): string;
|
|
51
|
+
/**
|
|
52
|
+
* Wagmi-compatible chain configuration for Privy integration
|
|
53
|
+
* NOTE: nativeCurrency should NOT have an address field - that's non-standard
|
|
54
|
+
* and can cause issues with wallet_switchEthereumChain
|
|
55
|
+
*/
|
|
56
|
+
export declare const varityL3Wagmi: {
|
|
57
|
+
readonly id: 33529;
|
|
58
|
+
readonly name: "Varity L3 Testnet";
|
|
59
|
+
readonly network: "varity-testnet";
|
|
60
|
+
readonly nativeCurrency: {
|
|
61
|
+
readonly name: "USDC";
|
|
62
|
+
readonly symbol: "USDC";
|
|
63
|
+
readonly decimals: 6;
|
|
64
|
+
};
|
|
65
|
+
readonly rpcUrls: {
|
|
66
|
+
readonly default: {
|
|
67
|
+
readonly http: readonly ["https://rpc-varity-testnet-rroe52pwjp.t.conduit.xyz"];
|
|
68
|
+
};
|
|
69
|
+
readonly public: {
|
|
70
|
+
readonly http: readonly ["https://rpc-varity-testnet-rroe52pwjp.t.conduit.xyz"];
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
readonly blockExplorers: {
|
|
74
|
+
readonly default: {
|
|
75
|
+
readonly name: "Varity Explorer";
|
|
76
|
+
readonly url: "https://explorer-varity-testnet-rroe52pwjp.t.conduit.xyz";
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
readonly testnet: true;
|
|
80
|
+
};
|
|
81
|
+
//# sourceMappingURL=varityL3.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"varityL3.d.ts","sourceRoot":"","sources":["../../src/chains/varityL3.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe;;EAgB1B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,QAAQ;;EAAkB,CAAC;AAExC;;GAEG;AACH,eAAO,MAAM,aAAa,IAAI,CAAC;AAE/B;;;GAGG;AACH,eAAO,MAAM,mBAAmB,+CAA+C,CAAC;AAEhF;;GAEG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,QAAQ,SAAI,GAAG,MAAM,CAUjF;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAKzD;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,IAAI,GAAG,SAAS,GAAG,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAcrF;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,SAAI,EAAE,QAAQ,SAAI,GAAG,MAAM,CAKnF;AAED;;;;GAIG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;CAwBhB,CAAC"}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Varity L3 Chain Configuration
|
|
3
|
+
*
|
|
4
|
+
* Varity L3 is an Arbitrum Orbit rollup deployed on Conduit
|
|
5
|
+
* Chain ID: 33529
|
|
6
|
+
* Native Token: Bridged USDC (6 decimals - NOT 18!)
|
|
7
|
+
*/
|
|
8
|
+
import { defineChain } from 'thirdweb/chains';
|
|
9
|
+
/**
|
|
10
|
+
* Varity L3 Testnet Configuration
|
|
11
|
+
*
|
|
12
|
+
* CRITICAL NOTES:
|
|
13
|
+
* - Native token is USDC with 6 decimals (not 18 like ETH)
|
|
14
|
+
* - All token amounts must account for 6 decimals: 1 USDC = 1_000_000 (not 10^18)
|
|
15
|
+
* - Chain ID 33529 is unique to Varity L3 testnet
|
|
16
|
+
* - RPC URL is Conduit-hosted (managed Arbitrum Orbit)
|
|
17
|
+
*/
|
|
18
|
+
export const varityL3Testnet = defineChain({
|
|
19
|
+
id: 33529,
|
|
20
|
+
name: 'Varity L3 Testnet',
|
|
21
|
+
nativeCurrency: {
|
|
22
|
+
name: 'USDC',
|
|
23
|
+
symbol: 'USDC',
|
|
24
|
+
decimals: 6, // CRITICAL: 6 decimals, NOT 18!
|
|
25
|
+
},
|
|
26
|
+
rpc: 'https://rpc-varity-testnet-rroe52pwjp.t.conduit.xyz',
|
|
27
|
+
blockExplorers: [
|
|
28
|
+
{
|
|
29
|
+
name: 'Varity Explorer',
|
|
30
|
+
url: 'https://explorer-varity-testnet-rroe52pwjp.t.conduit.xyz',
|
|
31
|
+
},
|
|
32
|
+
],
|
|
33
|
+
testnet: true,
|
|
34
|
+
});
|
|
35
|
+
/**
|
|
36
|
+
* Alias for varityL3Testnet (for backwards compatibility)
|
|
37
|
+
*/
|
|
38
|
+
export const varityL3 = varityL3Testnet;
|
|
39
|
+
/**
|
|
40
|
+
* USDC decimals constant
|
|
41
|
+
*/
|
|
42
|
+
export const USDC_DECIMALS = 6;
|
|
43
|
+
/**
|
|
44
|
+
* USDC Contract Address on Varity L3
|
|
45
|
+
* CRITICAL: This is bridged USDC with 6 decimals
|
|
46
|
+
*/
|
|
47
|
+
export const VARITY_USDC_ADDRESS = '0x6Fd8ee6B4C2193e9E2e0E2EC5D295689B607c0cE';
|
|
48
|
+
/**
|
|
49
|
+
* Format USDC amount (6 decimals)
|
|
50
|
+
*/
|
|
51
|
+
export function formatUSDC(amount, decimals = 2) {
|
|
52
|
+
const amountBigInt = typeof amount === 'bigint' ? amount : BigInt(amount);
|
|
53
|
+
const divisor = BigInt(10 ** USDC_DECIMALS);
|
|
54
|
+
const wholePart = amountBigInt / divisor;
|
|
55
|
+
const fractionalPart = amountBigInt % divisor;
|
|
56
|
+
const fractionalStr = fractionalPart.toString().padStart(USDC_DECIMALS, '0');
|
|
57
|
+
const truncatedFractional = fractionalStr.slice(0, decimals);
|
|
58
|
+
return `${wholePart}.${truncatedFractional}`;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Parse USDC amount to bigint (6 decimals)
|
|
62
|
+
*/
|
|
63
|
+
export function parseUSDC(amount) {
|
|
64
|
+
const amountStr = typeof amount === 'number' ? amount.toString() : amount;
|
|
65
|
+
const [whole, fractional = ''] = amountStr.split('.');
|
|
66
|
+
const paddedFractional = fractional.padEnd(USDC_DECIMALS, '0').slice(0, USDC_DECIMALS);
|
|
67
|
+
return BigInt(whole + paddedFractional);
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Block explorer URL builder
|
|
71
|
+
*/
|
|
72
|
+
export function getExplorerUrl(type, hash) {
|
|
73
|
+
const baseUrl = varityL3Testnet.blockExplorers?.[0]?.url;
|
|
74
|
+
if (!baseUrl)
|
|
75
|
+
return '';
|
|
76
|
+
switch (type) {
|
|
77
|
+
case 'tx':
|
|
78
|
+
return `${baseUrl}/tx/${hash}`;
|
|
79
|
+
case 'address':
|
|
80
|
+
return `${baseUrl}/address/${hash}`;
|
|
81
|
+
case 'block':
|
|
82
|
+
return `${baseUrl}/block/${hash}`;
|
|
83
|
+
default:
|
|
84
|
+
return baseUrl;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Format address for display (0x1234...5678)
|
|
89
|
+
*/
|
|
90
|
+
export function formatAddress(address, startChars = 6, endChars = 4) {
|
|
91
|
+
if (!address || address.length < startChars + endChars) {
|
|
92
|
+
return address;
|
|
93
|
+
}
|
|
94
|
+
return `${address.slice(0, startChars)}...${address.slice(-endChars)}`;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Wagmi-compatible chain configuration for Privy integration
|
|
98
|
+
* NOTE: nativeCurrency should NOT have an address field - that's non-standard
|
|
99
|
+
* and can cause issues with wallet_switchEthereumChain
|
|
100
|
+
*/
|
|
101
|
+
export const varityL3Wagmi = {
|
|
102
|
+
id: 33529,
|
|
103
|
+
name: 'Varity L3 Testnet',
|
|
104
|
+
network: 'varity-testnet',
|
|
105
|
+
nativeCurrency: {
|
|
106
|
+
name: 'USDC',
|
|
107
|
+
symbol: 'USDC',
|
|
108
|
+
decimals: 6,
|
|
109
|
+
},
|
|
110
|
+
rpcUrls: {
|
|
111
|
+
default: {
|
|
112
|
+
http: ['https://rpc-varity-testnet-rroe52pwjp.t.conduit.xyz'],
|
|
113
|
+
},
|
|
114
|
+
public: {
|
|
115
|
+
http: ['https://rpc-varity-testnet-rroe52pwjp.t.conduit.xyz'],
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
blockExplorers: {
|
|
119
|
+
default: {
|
|
120
|
+
name: 'Varity Explorer',
|
|
121
|
+
url: 'https://explorer-varity-testnet-rroe52pwjp.t.conduit.xyz',
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
testnet: true,
|
|
125
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clone.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/clone.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAOnC,eAAO,MAAM,YAAY,SAqHrB,CAAA"}
|