@gala-chain/launchpad-sdk 8.0.2 → 9.0.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +362 -0
- package/EXAMPLES.md +95 -681
- package/MIGRATING-TO-9.0.md +301 -0
- package/README.md +46 -17
- package/dist/LaunchpadSDK.d.ts +150 -419
- package/dist/LaunchpadSDK.d.ts.map +1 -1
- package/dist/api/LaunchpadAPI.d.ts +37 -43
- package/dist/api/LaunchpadAPI.d.ts.map +1 -1
- package/dist/auth/SessionAuthService.d.ts.map +1 -1
- package/dist/auth/SignatureAuth.d.ts +2 -2
- package/dist/auth/SignatureAuth.d.ts.map +1 -1
- package/dist/auth/types.d.ts +1 -1
- package/dist/auth/types.d.ts.map +1 -1
- package/dist/config/environments.d.ts +7 -2
- package/dist/config/environments.d.ts.map +1 -1
- package/dist/constants/decimals.d.ts +0 -23
- package/dist/constants/decimals.d.ts.map +1 -1
- package/dist/constants/endpoints.d.ts +0 -7
- package/dist/constants/endpoints.d.ts.map +1 -1
- package/dist/constants/version.generated.d.ts +1 -1
- package/dist/constants/version.generated.d.ts.map +1 -1
- package/dist/helpers/sdk.d.ts.map +1 -1
- package/dist/index.browser.d.ts +11 -23
- package/dist/index.browser.d.ts.map +1 -1
- package/dist/index.browser.esm.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1 -1
- package/dist/index.node.d.ts +4 -5
- package/dist/index.node.d.ts.map +1 -1
- package/dist/launchpad/bundle-submission.d.ts +1 -9
- package/dist/launchpad/bundle-submission.d.ts.map +1 -1
- package/dist/launchpad/sell-fee-ceiling.d.ts +66 -0
- package/dist/launchpad/sell-fee-ceiling.d.ts.map +1 -0
- package/dist/launchpad/transport.d.ts +2 -1
- package/dist/launchpad/transport.d.ts.map +1 -1
- package/dist/launchpad/writes.d.ts +30 -2
- package/dist/launchpad/writes.d.ts.map +1 -1
- package/dist/native.cjs +1 -1
- package/dist/native.d.ts +3 -4
- package/dist/native.d.ts.map +1 -1
- package/dist/native.esm.js +1 -1
- package/dist/schemas/launchpad.d.ts +4 -4
- package/dist/schemas/launchpad.d.ts.map +1 -1
- package/dist/schemas/user.d.ts +0 -15
- package/dist/schemas/user.d.ts.map +1 -1
- package/dist/services/AbstractCacheService.d.ts +2 -2
- package/dist/services/BundleService.d.ts +9 -1
- package/dist/services/BundleService.d.ts.map +1 -1
- package/dist/services/GalaChainBalanceService.d.ts +17 -89
- package/dist/services/GalaChainBalanceService.d.ts.map +1 -1
- package/dist/services/GalaChainLockService.d.ts +19 -20
- package/dist/services/GalaChainLockService.d.ts.map +1 -1
- package/dist/services/GalaChainService.d.ts +28 -64
- package/dist/services/GalaChainService.d.ts.map +1 -1
- package/dist/services/GalaChainTokenService.d.ts +25 -53
- package/dist/services/GalaChainTokenService.d.ts.map +1 -1
- package/dist/services/GalaChainTransferService.d.ts +42 -41
- package/dist/services/GalaChainTransferService.d.ts.map +1 -1
- package/dist/services/LaunchpadPriceService.d.ts +66 -0
- package/dist/services/LaunchpadPriceService.d.ts.map +1 -0
- package/dist/services/NftCollectionService.d.ts +22 -6
- package/dist/services/NftCollectionService.d.ts.map +1 -1
- package/dist/services/TokenResolverService.d.ts +5 -5
- package/dist/services/TokenResolverService.d.ts.map +1 -1
- package/dist/services/TradingQuotesService.d.ts +3 -5
- package/dist/services/TradingQuotesService.d.ts.map +1 -1
- package/dist/services/gateway-transport.d.ts +32 -0
- package/dist/services/gateway-transport.d.ts.map +1 -0
- package/dist/services/gateway-writes.d.ts +83 -0
- package/dist/services/gateway-writes.d.ts.map +1 -0
- package/dist/signing/index.d.ts +2 -3
- package/dist/signing/index.d.ts.map +1 -1
- package/dist/signing/signers.d.ts +23 -11
- package/dist/signing/signers.d.ts.map +1 -1
- package/dist/signing/types.d.ts +7 -10
- package/dist/signing/types.d.ts.map +1 -1
- package/dist/types/burn.dto.d.ts +4 -2
- package/dist/types/burn.dto.d.ts.map +1 -1
- package/dist/types/common.d.ts +2 -23
- package/dist/types/common.d.ts.map +1 -1
- package/dist/types/dto.d.ts +0 -5
- package/dist/types/dto.d.ts.map +1 -1
- package/dist/types/launchpad.dto.d.ts +0 -269
- package/dist/types/launchpad.dto.d.ts.map +1 -1
- package/dist/types/lock.dto.d.ts +12 -7
- package/dist/types/lock.dto.d.ts.map +1 -1
- package/dist/types/options.dto.d.ts +8 -34
- package/dist/types/options.dto.d.ts.map +1 -1
- package/dist/types/session-auth.dto.d.ts +2 -4
- package/dist/types/session-auth.dto.d.ts.map +1 -1
- package/dist/types/user.dto.d.ts +7 -62
- package/dist/types/user.dto.d.ts.map +1 -1
- package/dist/utils/address-formatter.d.ts +10 -2
- package/dist/utils/address-formatter.d.ts.map +1 -1
- package/dist/utils/agent-config.d.ts +9 -4
- package/dist/utils/agent-config.d.ts.map +1 -1
- package/dist/utils/auto-pagination.d.ts +6 -239
- package/dist/utils/auto-pagination.d.ts.map +1 -1
- package/dist/utils/bignumber-helpers.d.ts +3 -2
- package/dist/utils/bignumber-helpers.d.ts.map +1 -1
- package/dist/utils/delimiter-parser.d.ts +0 -13
- package/dist/utils/delimiter-parser.d.ts.map +1 -1
- package/dist/utils/error-patterns.d.ts +0 -47
- package/dist/utils/error-patterns.d.ts.map +1 -1
- package/dist/utils/error-wrapper.d.ts +5 -5
- package/dist/utils/errors.d.ts +0 -308
- package/dist/utils/errors.d.ts.map +1 -1
- package/dist/utils/http.d.ts +15 -3
- package/dist/utils/http.d.ts.map +1 -1
- package/dist/utils/token-format-converter.d.ts +1 -1
- package/dist/utils/token-parser.d.ts +6 -127
- package/dist/utils/token-parser.d.ts.map +1 -1
- package/dist/utils/token-stringification.d.ts +7 -7
- package/dist/utils/token-stringification.d.ts.map +1 -1
- package/dist/utils/tokenNameNormalizer.d.ts +2 -2
- package/dist/utils/tokenNormalizer.d.ts +5 -29
- package/dist/utils/tokenNormalizer.d.ts.map +1 -1
- package/dist/utils/trade-quote.d.ts +32 -0
- package/dist/utils/trade-quote.d.ts.map +1 -0
- package/dist/utils/unique-key-generator.d.ts +7 -134
- package/dist/utils/unique-key-generator.d.ts.map +1 -1
- package/dist/utils/validation-helpers.d.ts +3 -5
- package/dist/utils/validation-helpers.d.ts.map +1 -1
- package/package.json +47 -87
- package/dist/api/dto/BurnTokensDto.d.ts +0 -77
- package/dist/api/dto/BurnTokensDto.d.ts.map +0 -1
- package/dist/api/dto/LockTokenDto.d.ts +0 -85
- package/dist/api/dto/LockTokenDto.d.ts.map +0 -1
- package/dist/api/dto/TransferTokenDto.d.ts +0 -64
- package/dist/api/dto/TransferTokenDto.d.ts.map +0 -1
- package/dist/api/dto/UnlockTokenDto.d.ts +0 -74
- package/dist/api/dto/UnlockTokenDto.d.ts.map +0 -1
- package/dist/bridge/BridgeService.d.ts +0 -484
- package/dist/bridge/BridgeService.d.ts.map +0 -1
- package/dist/bridge/GalaConnectClient.d.ts +0 -170
- package/dist/bridge/GalaConnectClient.d.ts.map +0 -1
- package/dist/bridge/constants/index.d.ts +0 -7
- package/dist/bridge/constants/index.d.ts.map +0 -1
- package/dist/bridge/constants/tokens.d.ts +0 -212
- package/dist/bridge/constants/tokens.d.ts.map +0 -1
- package/dist/bridge/index.d.ts +0 -24
- package/dist/bridge/index.d.ts.map +0 -1
- package/dist/bridge/public-types.d.ts +0 -2
- package/dist/bridge/public-types.d.ts.map +0 -1
- package/dist/bridge/strategies/BridgeStrategy.d.ts +0 -204
- package/dist/bridge/strategies/BridgeStrategy.d.ts.map +0 -1
- package/dist/bridge/strategies/EthereumBridgeStrategy.d.ts +0 -178
- package/dist/bridge/strategies/EthereumBridgeStrategy.d.ts.map +0 -1
- package/dist/bridge/strategies/SolanaBridgeStrategy.d.ts +0 -236
- package/dist/bridge/strategies/SolanaBridgeStrategy.d.ts.map +0 -1
- package/dist/bridge/types/bridge.dto.d.ts +0 -772
- package/dist/bridge/types/bridge.dto.d.ts.map +0 -1
- package/dist/bridge/types/bridgeable-token.dto.d.ts +0 -209
- package/dist/bridge/types/bridgeable-token.dto.d.ts.map +0 -1
- package/dist/bridge/types/eip712.d.ts +0 -66
- package/dist/bridge/types/eip712.d.ts.map +0 -1
- package/dist/bridge/types/index.d.ts +0 -8
- package/dist/bridge/types/index.d.ts.map +0 -1
- package/dist/bridge/utils/RateLimiter.d.ts +0 -34
- package/dist/bridge/utils/RateLimiter.d.ts.map +0 -1
- package/dist/bridge/utils/address-formatter.d.ts +0 -25
- package/dist/bridge/utils/address-formatter.d.ts.map +0 -1
- package/dist/bridge/utils/addressValidation.d.ts +0 -200
- package/dist/bridge/utils/addressValidation.d.ts.map +0 -1
- package/dist/bridge/utils/balanceHelpers.d.ts +0 -215
- package/dist/bridge/utils/balanceHelpers.d.ts.map +0 -1
- package/dist/bridge/utils/bridgeErrors.d.ts +0 -98
- package/dist/bridge/utils/bridgeErrors.d.ts.map +0 -1
- package/dist/bridge/utils/bridgeOutHelpers.d.ts +0 -68
- package/dist/bridge/utils/bridgeOutHelpers.d.ts.map +0 -1
- package/dist/bridge/utils/bridgePayload.d.ts +0 -98
- package/dist/bridge/utils/bridgePayload.d.ts.map +0 -1
- package/dist/bridge/utils/bridgeStatusParser.d.ts +0 -76
- package/dist/bridge/utils/bridgeStatusParser.d.ts.map +0 -1
- package/dist/bridge/utils/eip712Helpers.d.ts +0 -66
- package/dist/bridge/utils/eip712Helpers.d.ts.map +0 -1
- package/dist/bridge/utils/index.d.ts +0 -19
- package/dist/bridge/utils/index.d.ts.map +0 -1
- package/dist/bridge/utils/retry.d.ts +0 -112
- package/dist/bridge/utils/retry.d.ts.map +0 -1
- package/dist/bridge/utils/strategyDelegation.d.ts +0 -126
- package/dist/bridge/utils/strategyDelegation.d.ts.map +0 -1
- package/dist/bridge/utils/tokenIdUtils.d.ts +0 -86
- package/dist/bridge/utils/tokenIdUtils.d.ts.map +0 -1
- package/dist/bridge/utils/tokenMath.d.ts +0 -39
- package/dist/bridge/utils/tokenMath.d.ts.map +0 -1
- package/dist/bridge/utils/tokenMetadataResolver.d.ts +0 -97
- package/dist/bridge/utils/tokenMetadataResolver.d.ts.map +0 -1
- package/dist/helpers/wallet.d.ts +0 -151
- package/dist/helpers/wallet.d.ts.map +0 -1
- package/dist/react/WalletContext.d.ts +0 -60
- package/dist/react/WalletContext.d.ts.map +0 -1
- package/dist/react/index.d.ts +0 -65
- package/dist/react/index.d.ts.map +0 -1
- package/dist/react/types.d.ts +0 -76
- package/dist/react/types.d.ts.map +0 -1
- package/dist/react/useWallet.d.ts +0 -123
- package/dist/react/useWallet.d.ts.map +0 -1
- package/dist/react/useWalletConnection.d.ts +0 -89
- package/dist/react/useWalletConnection.d.ts.map +0 -1
- package/dist/react/useWalletDetection.d.ts +0 -81
- package/dist/react/useWalletDetection.d.ts.map +0 -1
- package/dist/react.cjs +0 -1
- package/dist/react.esm.js +0 -1
- package/dist/services/AbstractTokenFetchService.d.ts +0 -150
- package/dist/services/AbstractTokenFetchService.d.ts.map +0 -1
- package/dist/services/BatchedCacheService.d.ts +0 -133
- package/dist/services/BatchedCacheService.d.ts.map +0 -1
- package/dist/services/BridgeableTokenCache.d.ts +0 -120
- package/dist/services/BridgeableTokenCache.d.ts.map +0 -1
- package/dist/services/BridgeableTokenService.d.ts +0 -218
- package/dist/services/BridgeableTokenService.d.ts.map +0 -1
- package/dist/services/DexService.d.ts +0 -440
- package/dist/services/DexService.d.ts.map +0 -1
- package/dist/services/NetworkKeyedCacheService.d.ts +0 -185
- package/dist/services/NetworkKeyedCacheService.d.ts.map +0 -1
- package/dist/services/PriceHistoryService.d.ts +0 -209
- package/dist/services/PriceHistoryService.d.ts.map +0 -1
- package/dist/services/WrapService.d.ts +0 -171
- package/dist/services/WrapService.d.ts.map +0 -1
- package/dist/services/WrappableTokenCache.d.ts +0 -100
- package/dist/services/WrappableTokenCache.d.ts.map +0 -1
- package/dist/services/WrappableTokenService.d.ts +0 -130
- package/dist/services/WrappableTokenService.d.ts.map +0 -1
- package/dist/setup.d.ts +0 -8
- package/dist/setup.d.ts.map +0 -1
- package/dist/signing/eip712.d.ts +0 -13
- package/dist/signing/eip712.d.ts.map +0 -1
- package/dist/tokens/transfers.d.ts +0 -95
- package/dist/tokens/transfers.d.ts.map +0 -1
- package/dist/types/galachain-api.types.d.ts +0 -297
- package/dist/types/galachain-api.types.d.ts.map +0 -1
- package/dist/types/priceHistory.dto.d.ts +0 -134
- package/dist/types/priceHistory.dto.d.ts.map +0 -1
- package/dist/types/token.types.d.ts +0 -359
- package/dist/types/token.types.d.ts.map +0 -1
- package/dist/types/wrappable-token.dto.d.ts +0 -305
- package/dist/types/wrappable-token.dto.d.ts.map +0 -1
- package/dist/utils/crypto-compat.d.ts +0 -40
- package/dist/utils/crypto-compat.d.ts.map +0 -1
- package/dist/utils/load-env.d.ts +0 -31
- package/dist/utils/load-env.d.ts.map +0 -1
- package/dist/utils/token-instance-key.d.ts +0 -57
- package/dist/utils/token-instance-key.d.ts.map +0 -1
- package/dist/utils/wallet.d.ts +0 -166
- package/dist/utils/wallet.d.ts.map +0 -1
- package/dist/wallet/ExternalWalletProvider.d.ts +0 -90
- package/dist/wallet/ExternalWalletProvider.d.ts.map +0 -1
- package/dist/wallet/GalaWalletProvider.d.ts +0 -122
- package/dist/wallet/GalaWalletProvider.d.ts.map +0 -1
- package/dist/wallet/PrivateKeyProvider.d.ts +0 -90
- package/dist/wallet/PrivateKeyProvider.d.ts.map +0 -1
- package/dist/wallet/detection.d.ts +0 -107
- package/dist/wallet/detection.d.ts.map +0 -1
- package/dist/wallet/event-handlers.d.ts +0 -50
- package/dist/wallet/event-handlers.d.ts.map +0 -1
- package/dist/wallet/index.d.ts +0 -51
- package/dist/wallet/index.d.ts.map +0 -1
- package/dist/wallet/signing-operation.d.ts +0 -19
- package/dist/wallet/signing-operation.d.ts.map +0 -1
- package/dist/wallet/typed-data-helpers.d.ts +0 -68
- package/dist/wallet/typed-data-helpers.d.ts.map +0 -1
- package/dist/wallet/types.d.ts +0 -267
- package/dist/wallet/types.d.ts.map +0 -1
- package/dist/wallet/utils.d.ts +0 -117
- package/dist/wallet/utils.d.ts.map +0 -1
- package/dist/wallet.cjs +0 -1
- package/dist/wallet.esm.js +0 -1
|
@@ -1,212 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Bridge Token Constants
|
|
3
|
-
*
|
|
4
|
-
* Static token configurations and chain IDs for bridging.
|
|
5
|
-
*/
|
|
6
|
-
import type { BridgeTokenDescriptor, BridgeTokenMetadata, EthereumTokenConfig, SolanaTokenConfig } from '../types/bridge.dto.js';
|
|
7
|
-
/**
|
|
8
|
-
* Chain IDs used by the external bridge system (Ethereum/Solana)
|
|
9
|
-
*/
|
|
10
|
-
export declare const CHAIN_IDS: {
|
|
11
|
-
readonly GALA_CHAIN: 1;
|
|
12
|
-
readonly ETHEREUM: 2;
|
|
13
|
-
readonly SOLANA: 1002;
|
|
14
|
-
};
|
|
15
|
-
/**
|
|
16
|
-
* Internal GalaChain Channel IDs (for wrap/unwrap operations)
|
|
17
|
-
*
|
|
18
|
-
* Different from external CHAIN_IDS used for Ethereum/Solana bridges.
|
|
19
|
-
* These represent internal GalaChain channels for cross-channel token transfers.
|
|
20
|
-
*
|
|
21
|
-
* @example
|
|
22
|
-
* ```typescript
|
|
23
|
-
* // Wrap: MUSIC (music channel) → GMUSIC (asset channel)
|
|
24
|
-
* destinationChainId: GALACHAIN_CHANNELS.ASSET
|
|
25
|
-
*
|
|
26
|
-
* // Unwrap: GMUSIC (asset channel) → MUSIC (music channel)
|
|
27
|
-
* destinationChainId: GALACHAIN_CHANNELS.MUSIC
|
|
28
|
-
* ```
|
|
29
|
-
*/
|
|
30
|
-
export declare const GALACHAIN_CHANNELS: {
|
|
31
|
-
/** Asset channel - where wrapped tokens (GMUSIC, GWETH, GALA, etc.) live */
|
|
32
|
-
readonly ASSET: 1;
|
|
33
|
-
/** Music channel - where native MUSIC token lives (legacy) */
|
|
34
|
-
readonly MUSIC: 3;
|
|
35
|
-
};
|
|
36
|
-
/** Type for internal GalaChain channel IDs */
|
|
37
|
-
export type GalaChainChannel = (typeof GALACHAIN_CHANNELS)[keyof typeof GALACHAIN_CHANNELS];
|
|
38
|
-
/**
|
|
39
|
-
* Check if a number is a valid GalaChain channel ID
|
|
40
|
-
*
|
|
41
|
-
* @param channel - Channel ID to validate
|
|
42
|
-
* @returns True if valid GalaChain channel
|
|
43
|
-
*/
|
|
44
|
-
export declare function isValidGalaChainChannel(channel: number): channel is GalaChainChannel;
|
|
45
|
-
/**
|
|
46
|
-
* Rate limit for GalaConnect API (requests per second)
|
|
47
|
-
*/
|
|
48
|
-
export declare const DEFAULT_RATE_LIMIT_RPS = 12;
|
|
49
|
-
/**
|
|
50
|
-
* Default polling interval for bridge status (15 seconds)
|
|
51
|
-
*/
|
|
52
|
-
export declare const DEFAULT_POLL_INTERVAL_MS = 15000;
|
|
53
|
-
/**
|
|
54
|
-
* Default polling timeout (45 minutes)
|
|
55
|
-
*/
|
|
56
|
-
export declare const DEFAULT_POLL_TIMEOUT_MS: number;
|
|
57
|
-
/**
|
|
58
|
-
* Delay before registering inbound bridge transactions (30 seconds)
|
|
59
|
-
*/
|
|
60
|
-
export declare const REGISTRATION_DELAY_MS = 30000;
|
|
61
|
-
/**
|
|
62
|
-
* Solana compute budget settings
|
|
63
|
-
*/
|
|
64
|
-
export declare const SOLANA_COMPUTE: {
|
|
65
|
-
readonly UNIT_LIMIT: 200000;
|
|
66
|
-
readonly UNIT_PRICE_MICROLAMPORTS: 375000;
|
|
67
|
-
};
|
|
68
|
-
/**
|
|
69
|
-
* Default Ethereum RPC URL (public endpoint)
|
|
70
|
-
*
|
|
71
|
-
* **WARNING: Public RPC Endpoint Limitations**
|
|
72
|
-
*
|
|
73
|
-
* This is a free public endpoint with the following limitations:
|
|
74
|
-
* - **Rate Limits**: Typically 10-25 requests/second (varies by provider load)
|
|
75
|
-
* - **Reliability**: No SLA, may experience downtime during high network activity
|
|
76
|
-
* - **Privacy**: Requests may be logged by the provider
|
|
77
|
-
* - **Features**: May not support all RPC methods (e.g., trace_* calls)
|
|
78
|
-
* - **Monitoring**: No error tracking, request analytics, or debugging tools available
|
|
79
|
-
*
|
|
80
|
-
* **For Production Use**, provide your own RPC URL from:
|
|
81
|
-
* - Infura: https://infura.io (free tier: 100k requests/day)
|
|
82
|
-
* - Alchemy: https://alchemy.com (free tier: 300M compute units/month)
|
|
83
|
-
* - QuickNode: https://quicknode.com
|
|
84
|
-
* - Your own Ethereum node
|
|
85
|
-
*
|
|
86
|
-
* @example
|
|
87
|
-
* ```typescript
|
|
88
|
-
* const bridgeService = new BridgeService({
|
|
89
|
-
* ethereumRpcUrl: 'https://mainnet.infura.io/v3/YOUR_API_KEY',
|
|
90
|
-
* // ... other config
|
|
91
|
-
* });
|
|
92
|
-
* ```
|
|
93
|
-
*/
|
|
94
|
-
export declare const DEFAULT_ETHEREUM_RPC_URL = "https://ethereum.publicnode.com";
|
|
95
|
-
/**
|
|
96
|
-
* Default Solana RPC URL (public endpoint)
|
|
97
|
-
*
|
|
98
|
-
* **WARNING: Public RPC Endpoint Limitations**
|
|
99
|
-
*
|
|
100
|
-
* This is the official Solana public RPC with the following limitations:
|
|
101
|
-
* - **Rate Limits**: Aggressive rate limiting (may return 429 errors under load)
|
|
102
|
-
* - **Reliability**: Best-effort availability, no SLA
|
|
103
|
-
* - **Performance**: Higher latency than dedicated endpoints
|
|
104
|
-
* - **Features**: Some methods may be disabled or limited
|
|
105
|
-
* - **Monitoring**: No error tracking, request analytics, or debugging tools available
|
|
106
|
-
*
|
|
107
|
-
* **For Production Use**, provide your own RPC URL from:
|
|
108
|
-
* - Helius: https://helius.dev (free tier: 500k credits/month)
|
|
109
|
-
* - QuickNode: https://quicknode.com
|
|
110
|
-
* - Triton: https://triton.one
|
|
111
|
-
* - Your own Solana validator
|
|
112
|
-
*
|
|
113
|
-
* @example
|
|
114
|
-
* ```typescript
|
|
115
|
-
* const bridgeService = new BridgeService({
|
|
116
|
-
* solanaRpcUrl: 'https://mainnet.helius-rpc.com/?api-key=YOUR_API_KEY',
|
|
117
|
-
* // ... other config
|
|
118
|
-
* });
|
|
119
|
-
* ```
|
|
120
|
-
*/
|
|
121
|
-
export declare const DEFAULT_SOLANA_RPC_URL = "https://api.mainnet-beta.solana.com";
|
|
122
|
-
/**
|
|
123
|
-
* Default Ethereum bridge contract address (mainnet)
|
|
124
|
-
*/
|
|
125
|
-
export declare const DEFAULT_ETHEREUM_BRIDGE_CONTRACT = "0x9f452b7cC24e6e6FA690fe77CF5dD2ba3DbF1ED9";
|
|
126
|
-
/**
|
|
127
|
-
* Ethereum bridge contract address for Sepolia testnet
|
|
128
|
-
*/
|
|
129
|
-
export declare const ETHEREUM_BRIDGE_CONTRACT_SEPOLIA = "0x6a1734E09f3099a3675645D214ce547080ea67e0";
|
|
130
|
-
/**
|
|
131
|
-
* Default Solana bridge program ID (mainnet)
|
|
132
|
-
*/
|
|
133
|
-
export declare const DEFAULT_SOLANA_BRIDGE_PROGRAM = "AaE4dTnL75XqgUJpdxBKg6vS9sTJgBPJwBQRVhD29WwS";
|
|
134
|
-
/**
|
|
135
|
-
* GalaConnect production base URL (DEX API platform)
|
|
136
|
-
*/
|
|
137
|
-
export declare const GALACONNECT_PRODUCTION_URL = "https://dex-api-platform-dex-prod-gala.gala.com";
|
|
138
|
-
/**
|
|
139
|
-
* Ethereum tokens for bridging - Production (Mainnet)
|
|
140
|
-
*/
|
|
141
|
-
export declare const ETHEREUM_TOKENS_PROD: EthereumTokenConfig[];
|
|
142
|
-
/**
|
|
143
|
-
* Ethereum tokens for bridging - Stage (Sepolia testnet)
|
|
144
|
-
*
|
|
145
|
-
* Note: GWTRX is not available on Sepolia
|
|
146
|
-
*/
|
|
147
|
-
export declare const ETHEREUM_TOKENS_STAGE: EthereumTokenConfig[];
|
|
148
|
-
/** Bridge environment type for token selection */
|
|
149
|
-
export type BridgeEnvironment = 'prod' | 'stage';
|
|
150
|
-
/**
|
|
151
|
-
* Get Ethereum tokens by environment
|
|
152
|
-
*
|
|
153
|
-
* @param environment - Target environment (PROD or STAGE)
|
|
154
|
-
* @returns Token configurations for the specified environment
|
|
155
|
-
*/
|
|
156
|
-
export declare function getEthereumTokensByEnvironment(environment: BridgeEnvironment): EthereumTokenConfig[];
|
|
157
|
-
/**
|
|
158
|
-
* Get Ethereum bridge contract address by environment
|
|
159
|
-
*
|
|
160
|
-
* @param environment - Target environment (PROD or STAGE)
|
|
161
|
-
* @returns Bridge contract address for the specified environment
|
|
162
|
-
*/
|
|
163
|
-
export declare function getEthereumBridgeContractByEnvironment(environment: BridgeEnvironment): string;
|
|
164
|
-
/**
|
|
165
|
-
* Default supported Ethereum tokens for bridging (Production/Mainnet)
|
|
166
|
-
*
|
|
167
|
-
* @deprecated Use `getEthereumTokensByEnvironment()` for environment-aware token selection
|
|
168
|
-
*/
|
|
169
|
-
export declare const DEFAULT_ETHEREUM_TOKENS: EthereumTokenConfig[];
|
|
170
|
-
/**
|
|
171
|
-
* Default supported Solana tokens for bridging
|
|
172
|
-
*/
|
|
173
|
-
export declare const DEFAULT_SOLANA_TOKENS: SolanaTokenConfig[];
|
|
174
|
-
/**
|
|
175
|
-
* Static token metadata for common bridge tokens
|
|
176
|
-
*
|
|
177
|
-
* This avoids API calls for well-known tokens.
|
|
178
|
-
*/
|
|
179
|
-
export declare const STATIC_TOKEN_METADATA: Record<string, BridgeTokenMetadata>;
|
|
180
|
-
/**
|
|
181
|
-
* Ethereum ERC-20 ABI for bridge operations
|
|
182
|
-
*/
|
|
183
|
-
export declare const ERC20_ABI: readonly ["function decimals() view returns (uint8)", "function balanceOf(address owner) view returns (uint256)", "function approve(address spender, uint256 value) returns (bool)", "function allowance(address owner, address spender) view returns (uint256)", "function transfer(address to, uint256 value) returns (bool)", "function name() view returns (string)", "function nonces(address owner) view returns (uint256)", "function permit(address owner,address spender,uint256 value,uint256 deadline,uint8 v,bytes32 r,bytes32 s)"];
|
|
184
|
-
/**
|
|
185
|
-
* Ethereum bridge contract ABI
|
|
186
|
-
*/
|
|
187
|
-
export declare const BRIDGE_CONTRACT_ABI: readonly ["function bridgeOut(address token,uint256 amount,uint256 tokenId,uint16 destinationChainId,bytes recipient) external", "function bridgeOutWithPermit(address token,uint256 amount,uint16 destinationChainId,bytes recipient,uint256 deadline,uint8 v,bytes32 r,bytes32 s) external"];
|
|
188
|
-
/**
|
|
189
|
-
* Solana bridge instruction discriminators
|
|
190
|
-
*/
|
|
191
|
-
export declare const SOLANA_DISCRIMINATORS: {
|
|
192
|
-
readonly BRIDGE_OUT: Buffer<ArrayBuffer>;
|
|
193
|
-
readonly BRIDGE_OUT_NATIVE: Buffer<ArrayBuffer>;
|
|
194
|
-
};
|
|
195
|
-
/**
|
|
196
|
-
* Get token metadata by symbol
|
|
197
|
-
*/
|
|
198
|
-
export declare function getStaticTokenMetadata(symbol: string): BridgeTokenMetadata | undefined;
|
|
199
|
-
/**
|
|
200
|
-
* Get Ethereum token config by symbol
|
|
201
|
-
*/
|
|
202
|
-
export declare function getEthereumTokenConfig(symbol: string): EthereumTokenConfig | undefined;
|
|
203
|
-
/**
|
|
204
|
-
* Get Solana token config by symbol
|
|
205
|
-
*/
|
|
206
|
-
export declare function getSolanaTokenConfig(symbol: string): SolanaTokenConfig | undefined;
|
|
207
|
-
/**
|
|
208
|
-
* Format a BridgeTokenDescriptor as a pipe-separated string
|
|
209
|
-
* Uses centralized stringification from token-stringification.ts
|
|
210
|
-
*/
|
|
211
|
-
export declare function formatTokenDescriptor(descriptor: BridgeTokenDescriptor): string;
|
|
212
|
-
//# sourceMappingURL=tokens.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../../src/bridge/constants/tokens.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EACV,qBAAqB,EACrB,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EAClB,MAAM,wBAAwB,CAAC;AAEhC;;GAEG;AACH,eAAO,MAAM,SAAS;;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E,iBAAiB,GAC7B,mBAAmB,EAAE,CAEvB;AAED;;;;;GAKG;AACH,wBAAgB,sCAAsC,CACpD,WAAW,EAAE,iBAAiB,GAC7B,MAAM,CAIR;AAED;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,EAAE,mBAAmB,EAAyB,CAAC;AAEnF;;GAEG;AACH,eAAO,MAAM,qBAAqB,EAAE,iBAAiB,EAepD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAoCrE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,SAAS,ihBASZ,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,mBAAmB,gSAGtB,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,qBAAqB;;;CAGxB,CAAC;AAEX;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,GAAG,mBAAmB,GAAG,SAAS,CAKtF;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,GAAG,mBAAmB,GAAG,SAAS,CAGtF;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,iBAAiB,GAAG,SAAS,CAGlF;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,qBAAqB,GAAG,MAAM,CAE/E"}
|
package/dist/bridge/index.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Bridge Module
|
|
3
|
-
*
|
|
4
|
-
* Cross-chain bridging capabilities for GalaChain.
|
|
5
|
-
* Supports bridging between:
|
|
6
|
-
* - GalaChain ↔ Ethereum (6 tokens)
|
|
7
|
-
* - GalaChain ↔ Solana (2 tokens)
|
|
8
|
-
*
|
|
9
|
-
* @module bridge
|
|
10
|
-
*/
|
|
11
|
-
export { type BridgeEnvironment, BridgeService, type BridgeServiceConfig } from './BridgeService.js';
|
|
12
|
-
export { GalaConnectClient, GalaConnectHttpError } from './GalaConnectClient.js';
|
|
13
|
-
export { BaseBridgeStrategy, type BridgeStrategy, type WaitOptions, } from './strategies/BridgeStrategy.js';
|
|
14
|
-
export { type EthereumBridgeConfig, EthereumBridgeStrategy, } from './strategies/EthereumBridgeStrategy.js';
|
|
15
|
-
export { type SolanaBridgeConfig, SolanaBridgeStrategy, } from './strategies/SolanaBridgeStrategy.js';
|
|
16
|
-
export type * from './public-types.js';
|
|
17
|
-
export { BridgeStatusCode } from './types/index.js';
|
|
18
|
-
export { CROSS_RATE_TYPED_DATA_TYPES, GALA_BRIDGE_TYPED_DATA_DOMAIN, getGalaBridgeTypedDataTypes, LEGACY_TYPED_DATA_TYPES, } from './types/eip712.js';
|
|
19
|
-
export { BRIDGE_CONTRACT_ABI, CHAIN_IDS, DEFAULT_ETHEREUM_BRIDGE_CONTRACT, DEFAULT_ETHEREUM_RPC_URL, DEFAULT_ETHEREUM_TOKENS, DEFAULT_POLL_INTERVAL_MS, DEFAULT_POLL_TIMEOUT_MS, DEFAULT_RATE_LIMIT_RPS, DEFAULT_SOLANA_BRIDGE_PROGRAM, DEFAULT_SOLANA_RPC_URL, DEFAULT_SOLANA_TOKENS, ERC20_ABI, ETHEREUM_BRIDGE_CONTRACT_SEPOLIA, ETHEREUM_TOKENS_PROD, ETHEREUM_TOKENS_STAGE, formatTokenDescriptor, GALACONNECT_PRODUCTION_URL, getEthereumBridgeContractByEnvironment, getEthereumTokenConfig, getEthereumTokensByEnvironment, getSolanaTokenConfig, getStaticTokenMetadata, SOLANA_COMPUTE, SOLANA_DISCRIMINATORS, STATIC_TOKEN_METADATA, } from './constants/index.js';
|
|
20
|
-
export { stripHexPrefix } from './utils/address-formatter.js';
|
|
21
|
-
export { RateLimiter } from './utils/RateLimiter.js';
|
|
22
|
-
export { isTokenClassKey, type ParsedTokenId, parseTokenId, parseTokenString, stringifyTokenClassKey, } from './utils/tokenIdUtils.js';
|
|
23
|
-
export { compareAmounts, formatTokenAmount, fromBaseUnits, toBaseUnits, } from './utils/tokenMath.js';
|
|
24
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/bridge/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,EAAE,KAAK,iBAAiB,EAAC,aAAa,EAAE,KAAK,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAGpG,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAGjF,OAAO,EACL,kBAAkB,EAClB,KAAK,cAAc,EACnB,KAAK,WAAW,GACjB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,KAAK,oBAAoB,EACzB,sBAAsB,GACvB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACL,KAAK,kBAAkB,EACvB,oBAAoB,GACrB,MAAM,sCAAsC,CAAC;AAG9C,mBAAmB,mBAAmB,CAAC;AACvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAGpD,OAAO,EACL,2BAA2B,EAC3B,6BAA6B,EAC7B,2BAA2B,EAC3B,uBAAuB,GACxB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EACL,mBAAmB,EACnB,SAAS,EACT,gCAAgC,EAChC,wBAAwB,EACxB,uBAAuB,EACvB,wBAAwB,EACxB,uBAAuB,EACvB,sBAAsB,EACtB,6BAA6B,EAC7B,sBAAsB,EACtB,qBAAqB,EACrB,SAAS,EACT,gCAAgC,EAEhC,oBAAoB,EACpB,qBAAqB,EACrB,qBAAqB,EACrB,0BAA0B,EAC1B,sCAAsC,EACtC,sBAAsB,EACtB,8BAA8B,EAC9B,oBAAoB,EACpB,sBAAsB,EACtB,cAAc,EACd,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EACL,eAAe,EACf,KAAK,aAAa,EAClB,YAAY,EACZ,gBAAgB,EAChB,sBAAsB,GACvB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,aAAa,EACb,WAAW,GACZ,MAAM,sBAAsB,CAAC"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export type { BaseTokenCrossRate, BridgeConfig, BridgeConfigurationToken, BridgeFeeEstimate, BridgeFeeResponse, BridgeInParams, BridgeLegResult, BridgeOutParams, BridgeRequestDto, BridgeStatus, BridgeStatusResponse, BridgeToken, BridgeTokenDescriptor, BridgeTokenInstance, BridgeTokenOutResponse, BridgeTransaction, BridgeTransactionRegistrationResponse, DestinationChainTxFee, EstimateBridgeFeeParams, EthereumTokenConfig, EthereumTransactionStatus, EthereumWalletBalanceResult, ExternalChainBalance, ExternalNetwork, ExternalTokenInfo, FetchBalancesResponse, GalaConnectConfig, GalaExchangeCrossRate, GalaExchangeRate, QuoteTokenCrossRate, RequestBridgeOutResponse, SolanaTokenConfig, SolanaTransactionStatus, SolanaWalletBalanceResult, TokenBalanceEntry, TokenRoundTripResult, WaitForBridgeOptions, } from './types/index.js';
|
|
2
|
-
//# sourceMappingURL=public-types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"public-types.d.ts","sourceRoot":"","sources":["../../src/bridge/public-types.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,kBAAkB,EAClB,YAAY,EACZ,wBAAwB,EACxB,iBAAiB,EACjB,iBAAiB,EACjB,cAAc,EACd,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,YAAY,EACZ,oBAAoB,EACpB,WAAW,EACX,qBAAqB,EACrB,mBAAmB,EACnB,sBAAsB,EACtB,iBAAiB,EACjB,qCAAqC,EACrC,qBAAqB,EACrB,uBAAuB,EACvB,mBAAmB,EACnB,yBAAyB,EACzB,2BAA2B,EAC3B,oBAAoB,EACpB,eAAe,EACf,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,EACjB,qBAAqB,EACrB,gBAAgB,EAChB,mBAAmB,EACnB,wBAAwB,EACxB,iBAAiB,EACjB,uBAAuB,EACvB,yBAAyB,EACzB,iBAAiB,EACjB,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,kBAAkB,CAAC"}
|
|
@@ -1,204 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Bridge Strategy Interface
|
|
3
|
-
*
|
|
4
|
-
* Defines the contract for chain-specific bridge implementations.
|
|
5
|
-
* Each external chain (Ethereum, Solana) implements this interface
|
|
6
|
-
* to handle its unique signing, transaction, and status tracking logic.
|
|
7
|
-
*/
|
|
8
|
-
import type { GalaConnectClient } from '../GalaConnectClient.js';
|
|
9
|
-
import { type BridgeFeeEstimate, type BridgeInParams, type BridgeOutParams, type BridgeStatus, type BridgeTransaction, type ExternalNetwork } from '../types/index.js';
|
|
10
|
-
/**
|
|
11
|
-
* Strategy interface for chain-specific bridge operations.
|
|
12
|
-
*
|
|
13
|
-
* The Bridge SDK uses the Strategy pattern to abstract chain-specific logic:
|
|
14
|
-
* - EthereumBridgeStrategy: Handles ERC-20 approvals, ethers.js signing
|
|
15
|
-
* - SolanaBridgeStrategy: Handles SPL token accounts, @solana/web3.js signing
|
|
16
|
-
*
|
|
17
|
-
* Each strategy encapsulates:
|
|
18
|
-
* - Fee estimation for the target chain
|
|
19
|
-
* - Outbound transfers (GalaChain → External)
|
|
20
|
-
* - Inbound transfers (External → GalaChain)
|
|
21
|
-
* - Status polling and transaction tracking
|
|
22
|
-
*
|
|
23
|
-
* @example
|
|
24
|
-
* ```typescript
|
|
25
|
-
* class EthereumBridgeStrategy implements BridgeStrategy {
|
|
26
|
-
* readonly network: ExternalNetwork = 'Ethereum';
|
|
27
|
-
*
|
|
28
|
-
* async estimateFee(tokenSymbol: string, amount: string): Promise<BridgeFeeEstimate> {
|
|
29
|
-
* // Ethereum-specific fee calculation
|
|
30
|
-
* }
|
|
31
|
-
* }
|
|
32
|
-
* ```
|
|
33
|
-
*/
|
|
34
|
-
export interface BridgeStrategy {
|
|
35
|
-
/**
|
|
36
|
-
* The external network this strategy handles.
|
|
37
|
-
*/
|
|
38
|
-
readonly network: ExternalNetwork;
|
|
39
|
-
/**
|
|
40
|
-
* Estimate bridge fees for a transfer.
|
|
41
|
-
*
|
|
42
|
-
* Calculates the total cost including:
|
|
43
|
-
* - Bridge protocol fee (paid to GalaChain)
|
|
44
|
-
* - Network gas fee (estimated)
|
|
45
|
-
* - Any chain-specific fees
|
|
46
|
-
*
|
|
47
|
-
* @param tokenSymbol - Token symbol (e.g., 'GALA', 'GUSDC')
|
|
48
|
-
* @param amount - Amount in decimal format (e.g., '100.5')
|
|
49
|
-
* @returns Fee estimate with breakdown
|
|
50
|
-
*/
|
|
51
|
-
estimateFee(tokenSymbol: string, amount: string): Promise<BridgeFeeEstimate>;
|
|
52
|
-
/**
|
|
53
|
-
* Bridge tokens OUT from GalaChain to external chain.
|
|
54
|
-
*
|
|
55
|
-
* Flow:
|
|
56
|
-
* 1. Lock tokens on GalaChain (via GalaConnect)
|
|
57
|
-
* 2. Wait for bridge confirmation
|
|
58
|
-
* 3. Receive wrapped tokens on external chain
|
|
59
|
-
*
|
|
60
|
-
* @param params - Bridge out parameters
|
|
61
|
-
* @returns Transaction details with tracking info
|
|
62
|
-
*/
|
|
63
|
-
bridgeOut(params: BridgeOutParams): Promise<BridgeTransaction>;
|
|
64
|
-
/**
|
|
65
|
-
* Bridge tokens IN from external chain to GalaChain.
|
|
66
|
-
*
|
|
67
|
-
* Flow:
|
|
68
|
-
* 1. Approve bridge contract (if needed)
|
|
69
|
-
* 2. Deposit tokens to bridge contract
|
|
70
|
-
* 3. Wait for GalaChain confirmation
|
|
71
|
-
* 4. Receive native tokens on GalaChain
|
|
72
|
-
*
|
|
73
|
-
* @param params - Bridge in parameters
|
|
74
|
-
* @returns Transaction details with tracking info
|
|
75
|
-
*/
|
|
76
|
-
bridgeIn(params: BridgeInParams): Promise<BridgeTransaction>;
|
|
77
|
-
/**
|
|
78
|
-
* Get the current status of a bridge transaction.
|
|
79
|
-
*
|
|
80
|
-
* Polls both the source and destination chains to determine
|
|
81
|
-
* the transaction's progress through the bridge.
|
|
82
|
-
*
|
|
83
|
-
* @param transactionHash - The bridge transaction hash
|
|
84
|
-
* @returns Current status with details
|
|
85
|
-
*/
|
|
86
|
-
getStatus(transactionHash: string): Promise<BridgeStatus>;
|
|
87
|
-
/**
|
|
88
|
-
* Wait for a bridge transaction to complete.
|
|
89
|
-
*
|
|
90
|
-
* Polls the transaction status until it reaches a terminal state
|
|
91
|
-
* (completed or failed) or the timeout is reached.
|
|
92
|
-
*
|
|
93
|
-
* @param transactionHash - The bridge transaction hash
|
|
94
|
-
* @param options - Polling options
|
|
95
|
-
* @returns Final status when complete
|
|
96
|
-
* @throws Error if timeout reached or transaction fails
|
|
97
|
-
*/
|
|
98
|
-
waitForCompletion(transactionHash: string, options?: WaitOptions): Promise<BridgeStatus>;
|
|
99
|
-
/**
|
|
100
|
-
* Get the list of supported tokens for this chain.
|
|
101
|
-
*
|
|
102
|
-
* @returns Array of token symbols supported by this bridge
|
|
103
|
-
*/
|
|
104
|
-
getSupportedTokens(): string[];
|
|
105
|
-
/**
|
|
106
|
-
* Check if a specific token is supported for bridging.
|
|
107
|
-
*
|
|
108
|
-
* @param tokenSymbol - Token symbol to check
|
|
109
|
-
* @returns True if token can be bridged
|
|
110
|
-
*/
|
|
111
|
-
isTokenSupported(tokenSymbol: string): boolean;
|
|
112
|
-
/**
|
|
113
|
-
* Validate a recipient address for the external chain.
|
|
114
|
-
*
|
|
115
|
-
* @param address - Address to validate
|
|
116
|
-
* @returns True if address is valid for this chain
|
|
117
|
-
*/
|
|
118
|
-
isValidAddress(address: string): boolean;
|
|
119
|
-
}
|
|
120
|
-
/**
|
|
121
|
-
* Options for waiting on bridge completion.
|
|
122
|
-
*/
|
|
123
|
-
export interface WaitOptions {
|
|
124
|
-
/**
|
|
125
|
-
* Polling interval in milliseconds.
|
|
126
|
-
* @default 15000 (15 seconds)
|
|
127
|
-
*/
|
|
128
|
-
pollInterval?: number;
|
|
129
|
-
/**
|
|
130
|
-
* Maximum time to wait in milliseconds.
|
|
131
|
-
* @default 2700000 (45 minutes)
|
|
132
|
-
*/
|
|
133
|
-
timeout?: number;
|
|
134
|
-
/**
|
|
135
|
-
* Callback for status updates during polling.
|
|
136
|
-
*/
|
|
137
|
-
onStatusUpdate?: (status: BridgeStatus) => void;
|
|
138
|
-
}
|
|
139
|
-
/**
|
|
140
|
-
* Base class providing common functionality for bridge strategies.
|
|
141
|
-
*
|
|
142
|
-
* Concrete strategies extend this class and implement chain-specific logic.
|
|
143
|
-
*/
|
|
144
|
-
export declare abstract class BaseBridgeStrategy implements BridgeStrategy {
|
|
145
|
-
abstract readonly network: ExternalNetwork;
|
|
146
|
-
abstract estimateFee(tokenSymbol: string, amount: string): Promise<BridgeFeeEstimate>;
|
|
147
|
-
abstract bridgeOut(params: BridgeOutParams): Promise<BridgeTransaction>;
|
|
148
|
-
abstract bridgeIn(params: BridgeInParams): Promise<BridgeTransaction>;
|
|
149
|
-
abstract getStatus(transactionHash: string): Promise<BridgeStatus>;
|
|
150
|
-
abstract getSupportedTokens(): string[];
|
|
151
|
-
abstract isTokenSupported(tokenSymbol: string): boolean;
|
|
152
|
-
abstract isValidAddress(address: string): boolean;
|
|
153
|
-
/**
|
|
154
|
-
* Default implementation of waitForCompletion with polling.
|
|
155
|
-
*
|
|
156
|
-
* Strategies can override this if they have chain-specific
|
|
157
|
-
* event subscription capabilities.
|
|
158
|
-
*/
|
|
159
|
-
waitForCompletion(transactionHash: string, options?: WaitOptions): Promise<BridgeStatus>;
|
|
160
|
-
}
|
|
161
|
-
/**
|
|
162
|
-
* Base implementation for strategies backed by a configured token map.
|
|
163
|
-
*
|
|
164
|
-
* @typeParam TTokenConfig - Chain-specific token configuration type.
|
|
165
|
-
*
|
|
166
|
-
* @example
|
|
167
|
-
* ```typescript
|
|
168
|
-
* class ExampleStrategy extends ConfiguredBridgeStrategy<object> {
|
|
169
|
-
* readonly network = 'Ethereum' as const;
|
|
170
|
-
* }
|
|
171
|
-
* ```
|
|
172
|
-
*/
|
|
173
|
-
export declare abstract class ConfiguredBridgeStrategy<TTokenConfig> extends BaseBridgeStrategy {
|
|
174
|
-
protected readonly galaConnectClient: GalaConnectClient;
|
|
175
|
-
protected readonly tokenConfigs: Map<string, TTokenConfig>;
|
|
176
|
-
/**
|
|
177
|
-
* Create a configured strategy base.
|
|
178
|
-
*
|
|
179
|
-
* @param galaConnectClient - Client used for bridge requests.
|
|
180
|
-
* @param tokenConfigs - Normalized token configuration map.
|
|
181
|
-
*/
|
|
182
|
-
protected constructor(galaConnectClient: GalaConnectClient, tokenConfigs: Map<string, TTokenConfig>);
|
|
183
|
-
/**
|
|
184
|
-
* Get the current status of a bridge transaction.
|
|
185
|
-
*
|
|
186
|
-
* @param transactionHash - Transaction hash to check.
|
|
187
|
-
* @returns Current bridge status.
|
|
188
|
-
*/
|
|
189
|
-
getStatus(transactionHash: string): Promise<BridgeStatus>;
|
|
190
|
-
/**
|
|
191
|
-
* Get the configured symbols supported by this strategy.
|
|
192
|
-
*
|
|
193
|
-
* @returns Supported token symbols.
|
|
194
|
-
*/
|
|
195
|
-
getSupportedTokens(): string[];
|
|
196
|
-
/**
|
|
197
|
-
* Check whether a token symbol is configured for this strategy.
|
|
198
|
-
*
|
|
199
|
-
* @param tokenSymbol - Token symbol to check.
|
|
200
|
-
* @returns True when the token is configured.
|
|
201
|
-
*/
|
|
202
|
-
isTokenSupported(tokenSymbol: string): boolean;
|
|
203
|
-
}
|
|
204
|
-
//# sourceMappingURL=BridgeStrategy.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BridgeStrategy.d.ts","sourceRoot":"","sources":["../../../src/bridge/strategies/BridgeStrategy.ts"],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,OAAO,CAAC,YAAY,CAAC;IAI/D;;;;OAIG;IACH,kBAAkB,IAAI,MAAM,EAAE;IAI9B;;;;;OAKG;IACH,gBAAgB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO;CAG/C"}
|
|
@@ -1,178 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Ethereum Bridge Strategy
|
|
3
|
-
*
|
|
4
|
-
* Implements bridging between GalaChain and Ethereum networks.
|
|
5
|
-
* Handles ERC-20 approvals, EIP-712 signing, and bridge contract interactions.
|
|
6
|
-
*/
|
|
7
|
-
import type { GalaConnectClient } from '../GalaConnectClient.js';
|
|
8
|
-
import type { BridgeFeeEstimate, BridgeInParams, BridgeOutParams, BridgeTransaction, EthereumTokenConfig, EthereumTransactionStatus, ExternalNetwork } from '../types/index.js';
|
|
9
|
-
import { ConfiguredBridgeStrategy } from './BridgeStrategy.js';
|
|
10
|
-
/**
|
|
11
|
-
* Configuration for Ethereum bridge strategy.
|
|
12
|
-
*/
|
|
13
|
-
export interface EthereumBridgeConfig {
|
|
14
|
-
/** GalaConnect API client */
|
|
15
|
-
galaConnectClient: GalaConnectClient;
|
|
16
|
-
/** GalaChain wallet address (eth|0x...) */
|
|
17
|
-
galaChainWalletAddress: string;
|
|
18
|
-
/** Ethereum private key for signing */
|
|
19
|
-
ethereumPrivateKey: string;
|
|
20
|
-
/** Ethereum RPC URL */
|
|
21
|
-
ethereumRpcUrl?: string;
|
|
22
|
-
/** Ethereum bridge contract address */
|
|
23
|
-
ethereumBridgeContract?: string;
|
|
24
|
-
/** Ethereum wallet address (derived from private key if not provided) */
|
|
25
|
-
ethereumWalletAddress?: string;
|
|
26
|
-
/** Token configurations */
|
|
27
|
-
tokenConfigs?: EthereumTokenConfig[];
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Bridge strategy for GalaChain ↔ Ethereum transfers.
|
|
31
|
-
*
|
|
32
|
-
* Supports 6 tokens: GALA, GWETH, GUSDC, GUSDT, GWTRX, GWBTC
|
|
33
|
-
*
|
|
34
|
-
* @example
|
|
35
|
-
* ```typescript
|
|
36
|
-
* const strategy = new EthereumBridgeStrategy({
|
|
37
|
-
* galaConnectClient,
|
|
38
|
-
* galaChainWalletAddress: 'eth|0x1234...',
|
|
39
|
-
* ethereumPrivateKey: '0xabcd...',
|
|
40
|
-
* });
|
|
41
|
-
*
|
|
42
|
-
* // Bridge out (GalaChain → Ethereum)
|
|
43
|
-
* const tx = await strategy.bridgeOut({
|
|
44
|
-
* tokenSymbol: 'GALA',
|
|
45
|
-
* amount: '100',
|
|
46
|
-
* destinationChain: 'Ethereum',
|
|
47
|
-
* recipientAddress: '0x5678...',
|
|
48
|
-
* });
|
|
49
|
-
* ```
|
|
50
|
-
*/
|
|
51
|
-
export declare class EthereumBridgeStrategy extends ConfiguredBridgeStrategy<EthereumTokenConfig> {
|
|
52
|
-
readonly network: ExternalNetwork;
|
|
53
|
-
/**
|
|
54
|
-
* Ethereum finality threshold (number of confirmations).
|
|
55
|
-
* 12+ confirmations is the practical finality threshold for Ethereum mainnet.
|
|
56
|
-
*/
|
|
57
|
-
static readonly ETHEREUM_FINALITY_THRESHOLD = 12;
|
|
58
|
-
private readonly galaChainWalletAddress;
|
|
59
|
-
private readonly ethereumProvider;
|
|
60
|
-
private readonly ethereumWallet;
|
|
61
|
-
private readonly ethereumBridgeContract;
|
|
62
|
-
private readonly ethereumWalletAddress;
|
|
63
|
-
private readonly tokenMetadataResolver;
|
|
64
|
-
/**
|
|
65
|
-
* Creates a new Ethereum bridge strategy.
|
|
66
|
-
*
|
|
67
|
-
* @param config - Strategy configuration
|
|
68
|
-
* @throws Error if ethereumPrivateKey is invalid format
|
|
69
|
-
*/
|
|
70
|
-
constructor(config: EthereumBridgeConfig);
|
|
71
|
-
/**
|
|
72
|
-
* Estimate bridge fees for a transfer to Ethereum.
|
|
73
|
-
*
|
|
74
|
-
* @param tokenSymbol - Token symbol (e.g., 'GALA', 'GWETH')
|
|
75
|
-
* @param amount - Amount in decimal format
|
|
76
|
-
* @returns Fee estimate with breakdown
|
|
77
|
-
*/
|
|
78
|
-
estimateFee(tokenSymbol: string, amount: string): Promise<BridgeFeeEstimate>;
|
|
79
|
-
/**
|
|
80
|
-
* Bridge tokens from GalaChain to Ethereum.
|
|
81
|
-
*
|
|
82
|
-
* @param params - Bridge out parameters
|
|
83
|
-
* @returns Transaction details
|
|
84
|
-
*/
|
|
85
|
-
bridgeOut(params: BridgeOutParams): Promise<BridgeTransaction>;
|
|
86
|
-
/**
|
|
87
|
-
* Bridge tokens from Ethereum to GalaChain.
|
|
88
|
-
*
|
|
89
|
-
* @param params - Bridge in parameters
|
|
90
|
-
* @returns Transaction details
|
|
91
|
-
*/
|
|
92
|
-
bridgeIn(params: BridgeInParams): Promise<BridgeTransaction>;
|
|
93
|
-
/**
|
|
94
|
-
* Validate an Ethereum address.
|
|
95
|
-
*
|
|
96
|
-
* @param address - Address to validate
|
|
97
|
-
* @returns True if valid Ethereum address
|
|
98
|
-
*/
|
|
99
|
-
isValidAddress(address: string): boolean;
|
|
100
|
-
/**
|
|
101
|
-
* Get the configured Ethereum wallet address.
|
|
102
|
-
*
|
|
103
|
-
* @returns Ethereum wallet address (0x format)
|
|
104
|
-
*
|
|
105
|
-
* @example
|
|
106
|
-
* ```typescript
|
|
107
|
-
* const address = strategy.getWalletAddress();
|
|
108
|
-
* console.log(`Wallet: ${address}`);
|
|
109
|
-
* ```
|
|
110
|
-
*/
|
|
111
|
-
getWalletAddress(): string;
|
|
112
|
-
/**
|
|
113
|
-
* Get ERC-20 token balance for an Ethereum address.
|
|
114
|
-
*
|
|
115
|
-
* @param tokenSymbol - Token symbol (e.g., 'GALA', 'GWETH', 'GUSDC')
|
|
116
|
-
* @param address - Optional Ethereum address (defaults to configured wallet)
|
|
117
|
-
* @returns Token balance as decimal string (e.g., "123.45678901")
|
|
118
|
-
* @throws Error if token not supported or address invalid
|
|
119
|
-
*
|
|
120
|
-
* @example
|
|
121
|
-
* ```typescript
|
|
122
|
-
* const balance = await strategy.getEthereumTokenBalance('GALA');
|
|
123
|
-
* console.log(`Balance: ${balance} GALA`);
|
|
124
|
-
*
|
|
125
|
-
* // Check another address
|
|
126
|
-
* const otherBalance = await strategy.getEthereumTokenBalance('GUSDC', '0x1234...');
|
|
127
|
-
* ```
|
|
128
|
-
*/
|
|
129
|
-
getEthereumTokenBalance(tokenSymbol: string, address?: string): Promise<string>;
|
|
130
|
-
/**
|
|
131
|
-
* Get native ETH balance for an Ethereum address.
|
|
132
|
-
*
|
|
133
|
-
* @param address - Optional Ethereum address (defaults to configured wallet)
|
|
134
|
-
* @returns ETH balance as decimal string (18 decimals)
|
|
135
|
-
* @throws Error if address invalid
|
|
136
|
-
*
|
|
137
|
-
* @example
|
|
138
|
-
* ```typescript
|
|
139
|
-
* const ethBalance = await strategy.getEthereumNativeBalance();
|
|
140
|
-
* console.log(`ETH Balance: ${ethBalance} ETH`);
|
|
141
|
-
* ```
|
|
142
|
-
*/
|
|
143
|
-
getEthereumNativeBalance(address?: string): Promise<string>;
|
|
144
|
-
/**
|
|
145
|
-
* Get the status of an Ethereum transaction by hash.
|
|
146
|
-
*
|
|
147
|
-
* Queries Ethereum RPC directly using `getTransactionReceipt()` and `getTransaction()`.
|
|
148
|
-
* Use this to verify if a bridge or any Ethereum transaction succeeded after submission.
|
|
149
|
-
*
|
|
150
|
-
* @param transactionHash - Ethereum transaction hash (0x-prefixed, 64 hex characters)
|
|
151
|
-
* @returns Transaction status with confirmation details
|
|
152
|
-
* @throws Error if hash format is invalid
|
|
153
|
-
*
|
|
154
|
-
* @example
|
|
155
|
-
* ```typescript
|
|
156
|
-
* const status = await strategy.getEthereumTransactionStatus('0x1234...');
|
|
157
|
-
* console.log(`Status: ${status.status}`);
|
|
158
|
-
* console.log(`Confirmations: ${status.confirmations}`);
|
|
159
|
-
* if (status.status === 'finalized') {
|
|
160
|
-
* console.log('Transaction is final (12+ confirmations)');
|
|
161
|
-
* }
|
|
162
|
-
* ```
|
|
163
|
-
*/
|
|
164
|
-
getEthereumTransactionStatus(transactionHash: string): Promise<EthereumTransactionStatus>;
|
|
165
|
-
/**
|
|
166
|
-
* Execute bridge deposit on Ethereum.
|
|
167
|
-
*/
|
|
168
|
-
private executeBridgeDeposit;
|
|
169
|
-
/**
|
|
170
|
-
* Bridge using ERC-20 Permit for gas-less approval.
|
|
171
|
-
*/
|
|
172
|
-
private bridgeWithPermit;
|
|
173
|
-
/**
|
|
174
|
-
* Bridge using traditional ERC-20 approval.
|
|
175
|
-
*/
|
|
176
|
-
private bridgeWithApproval;
|
|
177
|
-
}
|
|
178
|
-
//# sourceMappingURL=EthereumBridgeStrategy.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EthereumBridgeStrategy.d.ts","sourceRoot":"","sources":["../../../src/bridge/strategies/EthereumBridgeStrategy.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAuBH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,KAAK,EACV,iBAAiB,EACjB,cAAc,EACd,eAAe,EAEf,iBAAiB,EACjB,mBAAmB,EACnB,yBAAyB,EACzB,eAAe,EAChB,MAAM,mBAAmB,CAAC;AAiC3B,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAE/D;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,6BAA6B;IAC7B,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,2CAA2C;IAC3C,sBAAsB,EAAE,MAAM,CAAC;IAC/B,uCAAuC;IACvC,kBAAkB,EAAE,MAAM,CAAC;IAC3B,uBAAuB;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,uCAAuC;IACvC,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,yEAAyE;IACzE,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,2BAA2B;IAC3B,YAAY,CAAC,EAAE,mBAAmB,EAAE,CAAC;CACtC;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