@gala-chain/launchpad-sdk 8.1.0 → 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 +138 -413
- package/dist/LaunchpadSDK.d.ts.map +1 -1
- package/dist/api/LaunchpadAPI.d.ts +5 -37
- package/dist/api/LaunchpadAPI.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 +8 -22
- 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/transport.d.ts +2 -1
- package/dist/launchpad/transport.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/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/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 -15
- 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/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 +7 -8
- 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 -257
- 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/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/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/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
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @category Utilities
|
|
5
5
|
* @since 6.6.0
|
|
6
6
|
*/
|
|
7
|
-
import type {
|
|
7
|
+
import type { GalaChainTokenClassKey, GalaChainTokenInstanceKey } from '@gala-chain/gala-core-sdk';
|
|
8
8
|
/**
|
|
9
9
|
* Convert a TokenClassKey to pipe-delimited string format
|
|
10
10
|
*
|
|
@@ -37,7 +37,7 @@ import type { TokenClassKey, TokenInstanceKey } from '../types/common';
|
|
|
37
37
|
*
|
|
38
38
|
* @since 6.6.0
|
|
39
39
|
*/
|
|
40
|
-
export declare function stringifyTokenClassKey(token:
|
|
40
|
+
export declare function stringifyTokenClassKey(token: GalaChainTokenClassKey): string;
|
|
41
41
|
/**
|
|
42
42
|
* Convert a TokenInstanceKey to pipe-delimited string format (with instance)
|
|
43
43
|
*
|
|
@@ -63,7 +63,7 @@ export declare function stringifyTokenClassKey(token: TokenClassKey): string;
|
|
|
63
63
|
*
|
|
64
64
|
* @since 6.6.0
|
|
65
65
|
*/
|
|
66
|
-
export declare function stringifyTokenInstanceKey(token:
|
|
66
|
+
export declare function stringifyTokenInstanceKey(token: GalaChainTokenInstanceKey): string;
|
|
67
67
|
/**
|
|
68
68
|
* Convert either TokenClassKey or TokenInstanceKey to string
|
|
69
69
|
*
|
|
@@ -88,7 +88,7 @@ export declare function stringifyTokenInstanceKey(token: TokenInstanceKey): stri
|
|
|
88
88
|
*
|
|
89
89
|
* @since 6.6.0
|
|
90
90
|
*/
|
|
91
|
-
export declare function stringifyToken(token:
|
|
91
|
+
export declare function stringifyToken(token: GalaChainTokenClassKey | GalaChainTokenInstanceKey): string;
|
|
92
92
|
/**
|
|
93
93
|
* Convert TokenClassKey to dollar-delimited string format
|
|
94
94
|
*
|
|
@@ -113,7 +113,7 @@ export declare function stringifyToken(token: TokenClassKey | TokenInstanceKey):
|
|
|
113
113
|
*
|
|
114
114
|
* @since 6.7.0
|
|
115
115
|
*/
|
|
116
|
-
export declare function stringifyTokenClassKeyDollar(token:
|
|
116
|
+
export declare function stringifyTokenClassKeyDollar(token: GalaChainTokenClassKey): string;
|
|
117
117
|
/**
|
|
118
118
|
* Convert TokenInstanceKey to dollar-delimited string format (with instance)
|
|
119
119
|
*
|
|
@@ -139,7 +139,7 @@ export declare function stringifyTokenClassKeyDollar(token: TokenClassKey): stri
|
|
|
139
139
|
*
|
|
140
140
|
* @since 6.7.0
|
|
141
141
|
*/
|
|
142
|
-
export declare function stringifyTokenInstanceKeyDollar(token:
|
|
142
|
+
export declare function stringifyTokenInstanceKeyDollar(token: GalaChainTokenInstanceKey): string;
|
|
143
143
|
/**
|
|
144
144
|
* Convert TokenClassKey to dollar-delimited string format with prefix
|
|
145
145
|
*
|
|
@@ -163,5 +163,5 @@ export declare function stringifyTokenInstanceKeyDollar(token: TokenInstanceKey)
|
|
|
163
163
|
*
|
|
164
164
|
* @since 6.7.0
|
|
165
165
|
*/
|
|
166
|
-
export declare function stringifyTokenClassKeyDollarPrefixed(token:
|
|
166
|
+
export declare function stringifyTokenClassKeyDollarPrefixed(token: GalaChainTokenClassKey): string;
|
|
167
167
|
//# sourceMappingURL=token-stringification.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"token-stringification.d.ts","sourceRoot":"","sources":["../../src/utils/token-stringification.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"token-stringification.d.ts","sourceRoot":"","sources":["../../src/utils/token-stringification.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,sBAAsB,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAEnG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,sBAAsB,GAAG,MAAM,CAE5E;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,yBAAyB,GAAG,MAAM,CAElF;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,sBAAsB,GAAG,yBAAyB,GAAG,MAAM,CAKhG;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,sBAAsB,GAAG,MAAM,CAElF;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,+BAA+B,CAAC,KAAK,EAAE,yBAAyB,GAAG,MAAM,CAExF;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,oCAAoC,CAAC,KAAK,EAAE,sBAAsB,GAAG,MAAM,CAE1F"}
|
|
@@ -35,8 +35,8 @@ export declare function normalizeTokenName(tokenName: string): string;
|
|
|
35
35
|
/**
|
|
36
36
|
* Normalizes a token identifier for consistent cache keys.
|
|
37
37
|
*
|
|
38
|
-
* Used by cache services (
|
|
39
|
-
*
|
|
38
|
+
* Used by the cache services (AbstractCacheService) for case-insensitive lookups of token
|
|
39
|
+
* symbols and tokenIds.
|
|
40
40
|
*
|
|
41
41
|
* Current normalizations:
|
|
42
42
|
* - `.trim()` - Remove leading/trailing whitespace
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* This module provides utilities for normalizing different token identifier formats
|
|
5
5
|
* into a consistent TokenInstanceKey format that can be used with GalaChain APIs.
|
|
6
6
|
*/
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
7
|
+
import { type GalaChainTokenClassKey, type GalaChainTokenInstanceKey } from '@gala-chain/gala-core-sdk';
|
|
8
|
+
import type { TokenId } from '../types/common';
|
|
9
9
|
/**
|
|
10
10
|
* Normalizes any token identifier format to TokenInstanceKey
|
|
11
11
|
*
|
|
@@ -39,31 +39,7 @@ import { isTokenClassKey as isTokenClassKeyStrict } from './token-parser';
|
|
|
39
39
|
* // → Same object returned
|
|
40
40
|
* ```
|
|
41
41
|
*/
|
|
42
|
-
export declare function normalizeToTokenInstanceKey(tokenId: TokenId):
|
|
43
|
-
/**
|
|
44
|
-
* Type guard to check if a TokenId is a TokenInstanceKey object
|
|
45
|
-
*
|
|
46
|
-
* @param tokenId Token identifier to check
|
|
47
|
-
* @returns True if tokenId is a TokenInstanceKey object
|
|
48
|
-
*/
|
|
49
|
-
export declare function isTokenInstanceKey(tokenId: TokenId): tokenId is TokenInstanceKey;
|
|
50
|
-
/**
|
|
51
|
-
* Strict type guard that validates all TokenClassKey fields are non-empty strings.
|
|
52
|
-
*
|
|
53
|
-
* Re-export of `isTokenClassKey` from `./token-parser` for convenience.
|
|
54
|
-
* This is the recommended function for validating TokenClassKey objects.
|
|
55
|
-
*
|
|
56
|
-
* @see isTokenClassKey from './token-parser' for the canonical implementation
|
|
57
|
-
* @since 6.6.1
|
|
58
|
-
*/
|
|
59
|
-
export { isTokenClassKeyStrict };
|
|
60
|
-
/**
|
|
61
|
-
* Type guard to check if a TokenId is a string
|
|
62
|
-
*
|
|
63
|
-
* @param tokenId Token identifier to check
|
|
64
|
-
* @returns True if tokenId is a string
|
|
65
|
-
*/
|
|
66
|
-
export declare function isTokenIdString(tokenId: TokenId): tokenId is string;
|
|
42
|
+
export declare function normalizeToTokenInstanceKey(tokenId: TokenId): GalaChainTokenInstanceKey;
|
|
67
43
|
/**
|
|
68
44
|
* Validates that a TokenId has all required fields
|
|
69
45
|
*
|
|
@@ -94,7 +70,7 @@ export declare function validateTokenId(tokenId: TokenId): void;
|
|
|
94
70
|
*
|
|
95
71
|
* @since 3.32.0
|
|
96
72
|
*/
|
|
97
|
-
export declare function parseVaultAddressToTokenClassKey(vaultAddress: string):
|
|
73
|
+
export declare function parseVaultAddressToTokenClassKey(vaultAddress: string): GalaChainTokenClassKey;
|
|
98
74
|
/**
|
|
99
75
|
* Parses a vault address into a TokenInstanceKey
|
|
100
76
|
*
|
|
@@ -115,7 +91,7 @@ export declare function parseVaultAddressToTokenClassKey(vaultAddress: string):
|
|
|
115
91
|
*
|
|
116
92
|
* @since 3.32.0
|
|
117
93
|
*/
|
|
118
|
-
export declare function parseVaultAddressToTokenInstance(vaultAddress: string):
|
|
94
|
+
export declare function parseVaultAddressToTokenInstance(vaultAddress: string): GalaChainTokenInstanceKey;
|
|
119
95
|
/**
|
|
120
96
|
* Extracts the launchpad token symbol (carried in `type` of the shared `Token` collection) from a
|
|
121
97
|
* launchpad vault address. Throws for any other collection: a symbol cannot be derived from a class key.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokenNormalizer.d.ts","sourceRoot":"","sources":["../../src/utils/tokenNormalizer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"tokenNormalizer.d.ts","sourceRoot":"","sources":["../../src/utils/tokenNormalizer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAEL,KAAK,sBAAsB,EAC3B,KAAK,yBAAyB,EAC/B,MAAM,2BAA2B,CAAC;AAEnC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAO/C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,OAAO,GAAG,yBAAyB,CAsEvF;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CActD;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,gCAAgC,CAAC,YAAY,EAAE,MAAM,GAAG,sBAAsB,CAG7F;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,gCAAgC,CAAC,YAAY,EAAE,MAAM,GAAG,yBAAyB,CAMhG;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,2BAA2B,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAYxE;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAMjE"}
|
|
@@ -1,147 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* The uniqueKey of a launchpad bundle trade (BundleService buy/sell).
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* transfer and lock/unlock operations.
|
|
4
|
+
* A generic GalaChain uniqueKey is gala-core-sdk's `createUniqueKey(prefix)` (CSPRNG,
|
|
5
|
+
* `<prefix><uuid v4>`); launchpad-sdk 9.0 removed its own `generateUniqueKey`, which duplicated it.
|
|
7
6
|
*
|
|
8
7
|
* @category Utilities
|
|
9
8
|
* @since 6.14.0
|
|
10
9
|
*/
|
|
11
10
|
/**
|
|
12
|
-
* Generate a unique operation key for
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* - Cryptographically random suffix (derived from a UUID v4, ~104 bits of entropy)
|
|
17
|
-
*
|
|
18
|
-
* Format: `galaconnect-operation-{timestamp}_{randomSuffix}`
|
|
19
|
-
*
|
|
20
|
-
* Used for idempotency across:
|
|
21
|
-
* - Token transfers (uniqueKey parameter)
|
|
22
|
-
* - Token locks/unlocks (uniqueKey parameter)
|
|
23
|
-
* - Token burns (uniqueKey parameter)
|
|
24
|
-
* - Any operation requiring request deduplication
|
|
25
|
-
*
|
|
26
|
-
* @returns Unique operation key in format `galaconnect-operation-{timestamp}_{randomSuffix}`
|
|
27
|
-
*
|
|
28
|
-
* @example Basic usage
|
|
29
|
-
* ```typescript
|
|
30
|
-
* import { generateUniqueKey } from '@gala-chain/launchpad-sdk';
|
|
31
|
-
*
|
|
32
|
-
* const key = generateUniqueKey();
|
|
33
|
-
* console.log(key); // 'galaconnect-operation-1735857234567_abc123'
|
|
34
|
-
*
|
|
35
|
-
* // Use in transfer operation
|
|
36
|
-
* await sdk.transferGala({
|
|
37
|
-
* recipientAddress: 'eth|0x...',
|
|
38
|
-
* amount: '100',
|
|
39
|
-
* uniqueKey: generateUniqueKey()
|
|
40
|
-
* });
|
|
41
|
-
* ```
|
|
42
|
-
*
|
|
43
|
-
* @example With explicit key
|
|
44
|
-
* ```typescript
|
|
45
|
-
* // For operations where you control the idempotency key
|
|
46
|
-
* const operationKey = `my-operation-${Date.now()}`;
|
|
47
|
-
* await sdk.transferToken({
|
|
48
|
-
* to: 'eth|0x...',
|
|
49
|
-
* tokenName: 'anime',
|
|
50
|
-
* amount: '1000',
|
|
51
|
-
* uniqueKey: operationKey
|
|
52
|
-
* });
|
|
53
|
-
* ```
|
|
54
|
-
*
|
|
55
|
-
* @see {@link https://docs.galachain.com/idempotency GalaChain Idempotency}
|
|
56
|
-
*/
|
|
57
|
-
export declare function generateUniqueKey(): string;
|
|
58
|
-
/**
|
|
59
|
-
* Generate a unique operation key for GalaSwap bundle (buy/sell) transactions.
|
|
60
|
-
*
|
|
61
|
-
* Same shape and entropy guarantees as {@link generateUniqueKey}, but uses the
|
|
62
|
-
* `galaswap-operation-` prefix GalaSwap trade operations are identified by
|
|
63
|
-
* (`UNIQUE_KEY_CONSTRAINT.PATTERN` accepts either prefix).
|
|
11
|
+
* Generate a unique operation key for GalaSwap bundle (buy/sell) transactions:
|
|
12
|
+
* `galaswap-operation-{timestamp}_{randomSuffix}`, the suffix 26 hex digits of a UUID v4
|
|
13
|
+
* (~104 bits; never `Math.random()`: a collision would let GalaChain treat two different trades as
|
|
14
|
+
* retries of one), within `UNIQUE_KEY_CONSTRAINT.MAX_LENGTH` (64) and its `PATTERN`.
|
|
64
15
|
*
|
|
65
16
|
* @returns Unique operation key in format `galaswap-operation-{timestamp}_{randomSuffix}`
|
|
66
17
|
* @since 6.14.0
|
|
67
18
|
*/
|
|
68
19
|
export declare function generateSwapOperationKey(): string;
|
|
69
|
-
/**
|
|
70
|
-
* Generate unique operation key with UUID, timestamp, and wallet address
|
|
71
|
-
*
|
|
72
|
-
* Creates a unique identifier for GalaSwap operations combining:
|
|
73
|
-
* - Prefix (customizable, defaults to 'galaswap-operation')
|
|
74
|
-
* - UUID v4 for global uniqueness
|
|
75
|
-
* - Timestamp (millisecond precision)
|
|
76
|
-
* - Wallet address for context
|
|
77
|
-
*
|
|
78
|
-
* Format: `{prefix}-${uuid}-${timestamp}-${walletAddress}`
|
|
79
|
-
*
|
|
80
|
-
* Used for idempotent GalaSwap operations including:
|
|
81
|
-
* - Liquidity additions (add/remove)
|
|
82
|
-
* - Swap executions
|
|
83
|
-
* - Fee collections
|
|
84
|
-
* - Bundle transactions
|
|
85
|
-
*
|
|
86
|
-
* @param walletAddress The wallet address associated with the operation (required)
|
|
87
|
-
* @param prefix Optional custom prefix (defaults to 'galaswap-operation')
|
|
88
|
-
* @returns Unique operation key combining UUID, timestamp, and wallet address
|
|
89
|
-
*
|
|
90
|
-
* @example Basic usage with default prefix
|
|
91
|
-
* ```typescript
|
|
92
|
-
* import { generateOperationKey } from '@gala-chain/launchpad-sdk';
|
|
93
|
-
*
|
|
94
|
-
* const operationKey = generateOperationKey('eth|0x1234567890abcdef...');
|
|
95
|
-
* console.log(operationKey);
|
|
96
|
-
* // 'galaswap-operation-550e8400-e29b-41d4-a716-446655440000-1735857234567-eth|0x1234...'
|
|
97
|
-
* ```
|
|
98
|
-
*
|
|
99
|
-
* @example With custom prefix
|
|
100
|
-
* ```typescript
|
|
101
|
-
* import { generateOperationKey } from '@gala-chain/launchpad-sdk';
|
|
102
|
-
*
|
|
103
|
-
* const operationKey = generateOperationKey(
|
|
104
|
-
* 'eth|0x1234567890abcdef...',
|
|
105
|
-
* 'custom-swap'
|
|
106
|
-
* );
|
|
107
|
-
* console.log(operationKey);
|
|
108
|
-
* // 'custom-swap-550e8400-e29b-41d4-a716-446655440000-1735857234567-eth|0x1234...'
|
|
109
|
-
* ```
|
|
110
|
-
*
|
|
111
|
-
* @example With an operation that accepts a caller-supplied uniqueKey
|
|
112
|
-
* ```typescript
|
|
113
|
-
* import { generateOperationKey } from '@gala-chain/launchpad-sdk';
|
|
114
|
-
*
|
|
115
|
-
* // transferGala/transferToken/lockToken/unlockToken accept an optional
|
|
116
|
-
* // uniqueKey for idempotency (sdk.dex.* writes generate their own internally).
|
|
117
|
-
* const result = await sdk.transferGala({
|
|
118
|
-
* recipientAddress,
|
|
119
|
-
* amount: '100',
|
|
120
|
-
* uniqueKey: generateOperationKey(walletAddress),
|
|
121
|
-
* });
|
|
122
|
-
* ```
|
|
123
|
-
*
|
|
124
|
-
* @example Handling operation idempotency
|
|
125
|
-
* ```typescript
|
|
126
|
-
* // sdk.dex.swaps.swap() generates its own durable uniqueKey and returns it on the
|
|
127
|
-
* // SubmittedTransaction, so recovering an in-flight swap replays confirmation instead
|
|
128
|
-
* // of resubmitting with a caller-supplied key:
|
|
129
|
-
* let submitted;
|
|
130
|
-
* try {
|
|
131
|
-
* submitted = await sdk.dex.swaps.swap('GALA', 'GUSDC', 3000, {
|
|
132
|
-
* exactIn: '100',
|
|
133
|
-
* amountOutMinimum: '95',
|
|
134
|
-
* });
|
|
135
|
-
* await submitted.confirm();
|
|
136
|
-
* } catch (error) {
|
|
137
|
-
* if (submitted) {
|
|
138
|
-
* // Recover by uniqueKey - does not resubmit, avoids duplicate execution
|
|
139
|
-
* await sdk.dex.swaps.confirmSwap(submitted.uniqueKey);
|
|
140
|
-
* }
|
|
141
|
-
* }
|
|
142
|
-
* ```
|
|
143
|
-
*
|
|
144
|
-
* @since 3.50.0
|
|
145
|
-
*/
|
|
146
|
-
export declare function generateOperationKey(walletAddress: string, prefix?: string): string;
|
|
147
20
|
//# sourceMappingURL=unique-key-generator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unique-key-generator.d.ts","sourceRoot":"","sources":["../../src/utils/unique-key-generator.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"unique-key-generator.d.ts","sourceRoot":"","sources":["../../src/utils/unique-key-generator.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH;;;;;;;;GAQG;AACH,wBAAgB,wBAAwB,IAAI,MAAM,CAIjD"}
|
|
@@ -275,10 +275,8 @@ export interface MutualExclusivityResult {
|
|
|
275
275
|
/**
|
|
276
276
|
* Validates that exactly one of two parameters is provided (mutual exclusivity)
|
|
277
277
|
*
|
|
278
|
-
* Consolidates
|
|
279
|
-
*
|
|
280
|
-
* - DexService: Similar patterns with token identification
|
|
281
|
-
* - Other services: Scattered mutual exclusivity validation
|
|
278
|
+
* Consolidates the mutual-exclusivity checks the services used to repeat (e.g. tokenName XOR
|
|
279
|
+
* tokenId for a token identification).
|
|
282
280
|
*
|
|
283
281
|
* ## Use Cases
|
|
284
282
|
*
|
|
@@ -322,7 +320,7 @@ export interface MutualExclusivityResult {
|
|
|
322
320
|
*
|
|
323
321
|
* @example Token identifier validation
|
|
324
322
|
* ```typescript
|
|
325
|
-
* //
|
|
323
|
+
* // a method that takes a token by name or by id, never both
|
|
326
324
|
* const { hasA } = validateMutualExclusive(options, 'tokenName', 'tokenId', {
|
|
327
325
|
* description: 'token identifier'
|
|
328
326
|
* });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation-helpers.d.ts","sourceRoot":"","sources":["../../src/utils/validation-helpers.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,sBAAsB,CAAC;AAW9B,OAAO,EAAiD,YAAY,IAAI,qBAAqB,EAAE,gBAAgB,IAAI,yBAAyB,EAAE,SAAS,IAAI,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAIpM;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;;;;GAKG;AACH,MAAM,WAAW,qBAAqB;IACpC,UAAU,EAAE,gBAAgB,CAAC;CAC9B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,EACb,WAAW,EAAE,qBAAqB,GACjC,IAAI,CAYN;AAGD,eAAO,MAAM,gBAAgB;;;;CAA6B,CAAC;AAC3D,eAAO,MAAM,gBAAgB,kCAA4B,CAAC;AAC1D,eAAO,MAAM,YAAY,8BAAwB,CAAC;AAClD,eAAO,MAAM,SAAS,2BAAqB,CAAC;AAI5C;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,yBAAyB,CACvC,MAAM,CAAC,EAAE,MAAM,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;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,SAAS;;;;CAIZ,CAAC;AAEX;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,GAAE,MAAkB,GAAG,IAAI,CAE/E;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAK9D;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAUlE;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,EAAE,CAYnE"}
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@gala-chain/launchpad-sdk",
|
|
4
|
-
"version": "
|
|
5
|
-
"description": "TypeScript SDK for Gala Launchpad
|
|
4
|
+
"version": "9.0.0-rc.0",
|
|
5
|
+
"description": "TypeScript SDK for the Gala Launchpad backend: launchpad tokens, pools, bonding-curve trades and quotes, token creation, holders, charts, users, API keys, bans, moderation, overseers, flags, reactions, messages, notifications, streaming and stream chat, WebSocket events, the bundler write transport and auth. Optional wallet (read-only and full-access modes). Gateway-generic GalaChain pieces are @gala-chain/gala-core-sdk's (a peer); the DEX is @gala-chain/gswap-sdk's. Multi-format output (ESM, CJS, UMD).",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.esm.js",
|
|
8
8
|
"types": "dist/index.d.ts",
|
|
@@ -15,12 +15,13 @@
|
|
|
15
15
|
"!dist/**/*.test.*",
|
|
16
16
|
"!dist/**/tests/**",
|
|
17
17
|
"!dist/**/fixtures/**",
|
|
18
|
+
"!dist/setup.d.ts",
|
|
19
|
+
"!dist/setup.d.ts.map",
|
|
18
20
|
"package.json",
|
|
19
21
|
"README.md",
|
|
20
|
-
"API.md",
|
|
21
22
|
"EXAMPLES.md",
|
|
22
|
-
"TESTING.md",
|
|
23
23
|
"CHANGELOG.md",
|
|
24
|
+
"MIGRATING-TO-9.0.md",
|
|
24
25
|
"LICENSE"
|
|
25
26
|
],
|
|
26
27
|
"exports": {
|
|
@@ -39,18 +40,6 @@
|
|
|
39
40
|
"import": "./dist/native.esm.js",
|
|
40
41
|
"require": "./dist/native.cjs",
|
|
41
42
|
"default": "./dist/native.esm.js"
|
|
42
|
-
},
|
|
43
|
-
"./wallet": {
|
|
44
|
-
"types": "./dist/wallet/index.d.ts",
|
|
45
|
-
"import": "./dist/wallet.esm.js",
|
|
46
|
-
"require": "./dist/wallet.cjs",
|
|
47
|
-
"default": "./dist/wallet.esm.js"
|
|
48
|
-
},
|
|
49
|
-
"./react": {
|
|
50
|
-
"types": "./dist/react/index.d.ts",
|
|
51
|
-
"import": "./dist/react.esm.js",
|
|
52
|
-
"require": "./dist/react.cjs",
|
|
53
|
-
"default": "./dist/react.esm.js"
|
|
54
43
|
}
|
|
55
44
|
},
|
|
56
45
|
"sideEffects": false,
|
|
@@ -109,17 +98,12 @@
|
|
|
109
98
|
},
|
|
110
99
|
"peerDependencies": {
|
|
111
100
|
"@gala-chain/api": "^3.3.0",
|
|
101
|
+
"@gala-chain/gala-core-sdk": ">=1.0.0-rc.4 <2",
|
|
112
102
|
"axios": "^1.20.0",
|
|
113
103
|
"bignumber.js": "^11.1.5",
|
|
114
104
|
"ethers": "^6.16.0",
|
|
115
|
-
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
116
105
|
"socket.io-client": "^4.8.3",
|
|
117
|
-
"zod": "^3.
|
|
118
|
-
},
|
|
119
|
-
"peerDependenciesMeta": {
|
|
120
|
-
"react": {
|
|
121
|
-
"optional": true
|
|
122
|
-
}
|
|
106
|
+
"zod": "^4.3.6"
|
|
123
107
|
},
|
|
124
108
|
"browserslist": [
|
|
125
109
|
"> 1%",
|
|
@@ -129,20 +113,12 @@
|
|
|
129
113
|
],
|
|
130
114
|
"dependencies": {
|
|
131
115
|
"@gala-chain/api": "^3.3.0",
|
|
132
|
-
"@gala-chain/gswap-sdk": "^1.2.0",
|
|
133
|
-
"@modelcontextprotocol/sdk": "^1.30.1",
|
|
134
|
-
"@solana/spl-token": "^0.4.15",
|
|
135
|
-
"@solana/web3.js": "^1.99.0",
|
|
136
116
|
"axios": "^1.20.0",
|
|
137
117
|
"bignumber.js": "^11.1.5",
|
|
138
|
-
"bs58": "^6.0.0",
|
|
139
|
-
"dotenv": "^18.0.3",
|
|
140
118
|
"ethers": "^6.16.0",
|
|
141
|
-
"json-stringify-deterministic": "^1.0.16",
|
|
142
119
|
"socket.io-client": "^4.8.3",
|
|
143
120
|
"uuid": "^14.0.2",
|
|
144
|
-
"web-file-polyfill": "^1.0.4"
|
|
145
|
-
"zod": "^4.3.6"
|
|
121
|
+
"web-file-polyfill": "^1.0.4"
|
|
146
122
|
},
|
|
147
123
|
"size-limit": [
|
|
148
124
|
{
|
|
@@ -192,31 +168,52 @@
|
|
|
192
168
|
}
|
|
193
169
|
],
|
|
194
170
|
"devDependencies": {
|
|
195
|
-
"@
|
|
196
|
-
"@
|
|
197
|
-
"@
|
|
171
|
+
"@microsoft/api-documenter": "^7.30.16",
|
|
172
|
+
"@microsoft/api-extractor": "^7.59.2",
|
|
173
|
+
"@modelcontextprotocol/sdk": "^1.30.1",
|
|
174
|
+
"@rollup/plugin-commonjs": "^29.0.3",
|
|
175
|
+
"@rollup/plugin-json": "^6.1.0",
|
|
176
|
+
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
177
|
+
"@rollup/plugin-terser": "^1.0.0",
|
|
178
|
+
"@rollup/plugin-typescript": "^12.3.0",
|
|
179
|
+
"@size-limit/preset-small-lib": "^14.0.0",
|
|
180
|
+
"@solana/spl-token": "^0.4.15",
|
|
181
|
+
"@solana/web3.js": "^1.99.0",
|
|
182
|
+
"@types/node": "^26.6.2",
|
|
198
183
|
"@typescript-eslint/eslint-plugin": "^8.70.1",
|
|
199
184
|
"@typescript-eslint/parser": "^8.70.1",
|
|
200
185
|
"@typescript/native": "npm:typescript@^7.0.2",
|
|
201
186
|
"@vitest/coverage-v8": "^5.0.1",
|
|
187
|
+
"bs58": "^6.0.0",
|
|
188
|
+
"concurrently": "^10.0.5",
|
|
189
|
+
"dotenv": "^18.0.3",
|
|
202
190
|
"eslint": "^10.11.0",
|
|
203
191
|
"eslint-config-prettier": "^10.1.8",
|
|
204
|
-
"eslint-plugin-prettier": "^5.5.6",
|
|
205
192
|
"eslint-plugin-unused-imports": "^4.4.1",
|
|
193
|
+
"http-server": "^14.1.1",
|
|
194
|
+
"jiti": "^2.7.0",
|
|
206
195
|
"jscpd": "^5.1.2",
|
|
207
|
-
"
|
|
208
|
-
"
|
|
196
|
+
"jsdom": "^27.4.0",
|
|
197
|
+
"prettier": "^3.9.9",
|
|
198
|
+
"rimraf": "^6.1.2",
|
|
199
|
+
"rollup": "^4.63.4",
|
|
200
|
+
"rollup-plugin-analyzer": "^4.0.0",
|
|
201
|
+
"rollup-plugin-bundle-size": "^1.0.3",
|
|
202
|
+
"size-limit": "^14.0.0",
|
|
209
203
|
"tsx": "^4.21.0",
|
|
204
|
+
"typedoc": "^0.28.20",
|
|
205
|
+
"typedoc-plugin-markdown": "^4.13.1",
|
|
210
206
|
"typescript": "npm:@typescript/typescript6@^6.0.2",
|
|
211
207
|
"vite": "^8.3.0",
|
|
212
|
-
"vitest": "^5.0.1"
|
|
208
|
+
"vitest": "^5.0.1",
|
|
209
|
+
"zod": "^4.3.6",
|
|
210
|
+
"@gala-chain/gala-core-sdk": "^1.0.0-rc.4"
|
|
213
211
|
},
|
|
214
212
|
"scripts": {
|
|
215
213
|
"build": "pnpm run build:version && pnpm run clean && pnpm run build:types && pnpm run build:bundle",
|
|
216
214
|
"build:version": "tsx scripts/inject-version.ts",
|
|
217
215
|
"build:types": "tsc --declaration --emitDeclarationOnly --outDir dist",
|
|
218
216
|
"build:bundle": "rollup -c rollup.config.ts",
|
|
219
|
-
"build:declarations": "tsx scripts/finalize-declarations.ts",
|
|
220
217
|
"build:watch": "rollup -c rollup.config.ts --watch",
|
|
221
218
|
"clean": "rimraf dist coverage .nyc_output",
|
|
222
219
|
"test": "vitest run",
|
|
@@ -227,9 +224,10 @@
|
|
|
227
224
|
"test:ci": "vitest run --coverage --reporter=verbose --maxWorkers=6",
|
|
228
225
|
"coverage:goal": "tsx scripts/check-coverage-threshold.ts",
|
|
229
226
|
"check:coverage:goal": "pnpm run test:cov && pnpm run coverage:goal",
|
|
230
|
-
"check:clones": "jscpd --min-lines 12 --min-tokens 70 --threshold 0 src tests",
|
|
231
|
-
"check:strict": "pnpm run typecheck && pnpm run typecheck:tests && pnpm run lint && pnpm run check:clones",
|
|
232
|
-
"check:all": "pnpm run check:strict && pnpm run check:coverage:goal && pnpm run build",
|
|
227
|
+
"check:clones": "jscpd --min-lines 12 --min-tokens 70 --threshold 0 src tests --ignore \"tests/golden/*.golden.json\"",
|
|
228
|
+
"check:strict": "pnpm run typecheck && pnpm run typecheck:tests && pnpm run typecheck:examples && pnpm run lint && pnpm run check:clones",
|
|
229
|
+
"check:all": "pnpm run check:strict && pnpm run check:coverage:goal && pnpm run build && pnpm run check:pack",
|
|
230
|
+
"check:pack": "tsx scripts/packed-smoke.ts",
|
|
233
231
|
"test:integration": "vitest run --config vitest.integration.config.ts",
|
|
234
232
|
"test:integration:trading": "vitest run --config vitest.integration.config.ts tests/integration/trading",
|
|
235
233
|
"test:integration:dex": "vitest run --config vitest.integration.config.ts tests/integration/dex",
|
|
@@ -276,20 +274,9 @@
|
|
|
276
274
|
"demo:bonding:volume-trading": "tsx examples/bonding-curve/volume-trading.ts",
|
|
277
275
|
"demo:bonding:pagination-variants": "tsx examples/bonding-curve/pagination-variants.ts",
|
|
278
276
|
"demo:bonding:pool-creator-filtering": "tsx examples/bonding-curve/pool-creator-filtering.ts",
|
|
279
|
-
"demo:liquidity": "tsx examples/liquidity/positions-cli.ts",
|
|
280
|
-
"demo:liquidity:detailed": "tsx examples/liquidity/detailed.ts",
|
|
281
|
-
"demo:liquidity:ticks": "tsx examples/liquidity/ticks.ts",
|
|
282
|
-
"demo:liquidity:portfolio": "tsx examples/liquidity/multi-position.ts",
|
|
283
|
-
"demo:liquidity:apr": "tsx examples/liquidity/apr-calculator.ts",
|
|
284
|
-
"demo:liquidity:errors": "tsx examples/liquidity/errors.ts",
|
|
285
|
-
"demo:liquidity:fetch-all": "tsx examples/liquidity/demo-fetch-all-positions.ts",
|
|
286
|
-
"demo:liquidity:positions-with-prices": "tsx examples/liquidity/demo-positions-with-chunked-pricing.ts",
|
|
287
|
-
"demo:liquidity:fee-collection": "tsx examples/liquidity/fee-collection.ts",
|
|
288
277
|
"demo:cache": "tsx examples/utilities/demo-cache.ts",
|
|
289
278
|
"demo:utilities:balance": "tsx examples/utilities/balance.ts",
|
|
290
|
-
"demo:utilities:balances": "tsx examples/utilities/balances.ts",
|
|
291
279
|
"demo:utilities:key-derivation": "tsx examples/utilities/key-derivation.ts",
|
|
292
|
-
"demo:utilities:price-history": "tsx examples/utilities/price-history.ts",
|
|
293
280
|
"demo:utilities:wrappable-tokens": "tsx examples/utilities/wrappable-tokens.ts",
|
|
294
281
|
"demo:utilities:referrals": "tsx examples/utilities/referrals.ts",
|
|
295
282
|
"demo:utilities:account": "tsx examples/utilities/account.ts",
|
|
@@ -297,51 +284,23 @@
|
|
|
297
284
|
"demo:utilities:transfers": "tsx examples/utilities/transfers.ts",
|
|
298
285
|
"demo:utilities:multi-token-portfolio": "tsx examples/utilities/multi-token-portfolio.ts",
|
|
299
286
|
"demo:utilities:discovery": "tsx examples/utilities/token-discovery.ts",
|
|
300
|
-
"demo:utilities:pool-discovery-advanced": "tsx examples/utilities/pool-discovery-advanced.ts",
|
|
301
287
|
"demo:utilities:token-metadata-advanced": "tsx examples/utilities/token-metadata-advanced.ts",
|
|
302
|
-
"demo:utilities:pool-pair-analysis": "tsx examples/utilities/pool-pair-analysis.ts",
|
|
303
288
|
"demo:utilities:token-classification": "tsx examples/utilities/token-classification.ts",
|
|
304
289
|
"demo:queries:complex-filtering": "tsx examples/queries/complex-filtering.ts",
|
|
305
290
|
"demo:queries:advanced-sorting": "tsx examples/queries/advanced-sorting.ts",
|
|
306
291
|
"derive-public-key-from-private-key": "tsx scripts/derive-public-key-from-private-key.ts",
|
|
307
|
-
"verify:stage-dex-reads": "tsx scripts/stage-verify-dex-reads.ts",
|
|
308
|
-
"demo:dex": "tsx examples/dex/swap-workflow.ts",
|
|
309
|
-
"demo:dex:pools": "tsx examples/dex/pool-discovery.ts",
|
|
310
|
-
"demo:dex:pricing": "tsx examples/dex/pools-with-pricing.ts",
|
|
311
|
-
"demo:dex:quotes": "tsx examples/dex/quote-comparison.ts",
|
|
312
|
-
"demo:dex:roundtrip": "tsx examples/dex/demo-roundtrip-liquidity.ts",
|
|
313
|
-
"demo:dex:leaderboard": "tsx examples/dex/leaderboard.ts",
|
|
314
|
-
"demo:dex:volume-summary": "tsx examples/dex/volume-summary.ts",
|
|
315
|
-
"demo:dex:token-discovery": "tsx examples/dex/token-discovery.ts",
|
|
316
|
-
"demo:dex:liquidity-management-advanced": "tsx examples/dex/dex-liquidity-management-advanced.ts",
|
|
317
|
-
"demo:dex:slippage-protection": "tsx examples/dex/dex-slippage-protection.ts",
|
|
318
|
-
"demo:dex:impermanent-loss-analysis": "tsx examples/dex/dex-impermanent-loss-analysis.ts",
|
|
319
|
-
"demo:dex:multi-hop-swaps": "tsx examples/dex/dex-multi-hop-swaps.ts",
|
|
320
292
|
"demo:socials": "tsx examples/launchpad/demo-socials.ts",
|
|
321
293
|
"demo:monitoring:stream-events": "tsx examples/monitoring/demo-stream-events.ts",
|
|
322
294
|
"demo:monitoring:websocket-events": "tsx examples/monitoring/websocket-event-handlers.ts",
|
|
323
|
-
"demo:watch": "tsx examples/monitoring/demo-watch-pools.ts",
|
|
324
295
|
"demo:watch:tokens": "tsx examples/monitoring/demo-watch-tokens.ts",
|
|
325
296
|
"demo:watch:integration": "tsx examples/monitoring/token-creation-integration.ts",
|
|
326
297
|
"demo:subscribe": "tsx examples/monitoring/token-creation-integration.ts",
|
|
327
|
-
"demo:fees": "tsx examples/fees/demo-fee-generation-and-collection.ts",
|
|
328
|
-
"demo:fees:high-volume": "tsx examples/fees/demo-fees-high-volume.ts",
|
|
329
|
-
"demo:fees:test": "tsx examples/fees/complete-fee-test.ts",
|
|
330
|
-
"demo:fees:trade-collect": "tsx examples/fees/trade-and-collect-fees.ts",
|
|
331
|
-
"demo:fees:multi-wallet": "tsx examples/fees/demo-multi-wallet-fee-generation.ts",
|
|
332
|
-
"demo:liquidity:bundler-test": "tsx examples/liquidity/demo-bundler-operations.ts",
|
|
333
|
-
"demo:liquidity:roundtrip-remove": "tsx examples/liquidity/demo-roundtrip-remove.ts",
|
|
334
|
-
"demo:liquidity:direct": "tsx examples/liquidity/demo-position-direct.ts",
|
|
335
298
|
"demo:token-supply": "tsx examples/utilities/demo-token-supply.ts",
|
|
336
299
|
"demo:token-info:token-name-resolution": "tsx examples/token-info/token-name-resolution.ts",
|
|
337
300
|
"debug:websocket:stage": "ENVIRONMENT=stage tsx examples/debug/websocket-monitor.ts",
|
|
338
301
|
"debug:websocket:prod": "ENVIRONMENT=prod tsx examples/debug/websocket-monitor.ts",
|
|
339
302
|
"debug:websocket:discovery": "ENVIRONMENT=stage tsx examples/debug/websocket-event-discovery.ts",
|
|
340
303
|
"demo:subscribe:tokens": "ENVIRONMENT=stage tsx examples/monitoring/subscribe-token-creations.ts",
|
|
341
|
-
"demo:subscribe:pools:integration": "ENVIRONMENT=stage tsx examples/monitoring/pool-creation-integration.ts",
|
|
342
|
-
"demo:watch:liquidity:e2e": "tsx examples/monitoring/liquidity-e2e-test.ts",
|
|
343
|
-
"demo:watch:fees:e2e": "tsx examples/monitoring/fees-collection-e2e.ts",
|
|
344
|
-
"demo:watch:fees:guaranteed": "tsx examples/monitoring/fees-collection-guaranteed.ts",
|
|
345
304
|
"demo:bridge:tokens": "tsx examples/bridge/supported-tokens.ts",
|
|
346
305
|
"demo:bridge:fee": "tsx examples/bridge/fee-estimation.ts",
|
|
347
306
|
"demo:bridge:status": "tsx examples/bridge/status-tracking.ts",
|
|
@@ -420,12 +379,10 @@
|
|
|
420
379
|
"demo:persistence:local-storage": "tsx examples/persistence/local-storage-patterns.ts",
|
|
421
380
|
"demo:persistence:backup-recovery": "tsx examples/persistence/data-backup-recovery.ts",
|
|
422
381
|
"test:demos:core": "npm run demo && npm run demo:read-only && npm run demo:authenticated && npm run demo:privatekey-override",
|
|
423
|
-
"test:demos:dex": "npm run demo:dex:pools && npm run demo:dex:pricing && npm run demo:dex:quotes && npm run demo:dex && npm run demo:dex:roundtrip",
|
|
424
|
-
"test:demos:fees": "npm run demo:fees && npm run demo:fees:high-volume && npm run demo:fees:test && npm run demo:fees:trade-collect && npm run demo:fees:multi-wallet",
|
|
425
382
|
"test:demos:utilities": "npm run demo:cache && npm run demo:token-supply",
|
|
426
383
|
"test:demos:bonding": "npm run demo:trades",
|
|
427
384
|
"test:demos:quick": "npm run demo:cache && npm run demo:read-only",
|
|
428
|
-
"test:demos:all": "npm run test:demos:core && npm run test:demos:bonding && npm run test:demos:
|
|
385
|
+
"test:demos:all": "npm run test:demos:core && npm run test:demos:bonding && npm run test:demos:utilities",
|
|
429
386
|
"test:env:check": "npm run validate:env && echo '✅ Environment validation passed'",
|
|
430
387
|
"test:system": "npm run test:env:check && echo '' && echo '📋 Starting comprehensive system tests...' && npm run test:demos:all && echo '' && echo '✅ All system tests passed!'",
|
|
431
388
|
"demo:list": "tsx examples/demo-librarian.ts list",
|
|
@@ -437,6 +394,8 @@
|
|
|
437
394
|
"demo:tasks:small": "tsx examples/orchestrator-tasks.ts --batch-size=10",
|
|
438
395
|
"demo:tasks:large": "tsx examples/orchestrator-tasks.ts --batch-size=30",
|
|
439
396
|
"demo:run": "tsx examples/demo-runner.ts",
|
|
397
|
+
"demo:run:method": "tsx examples/demo-runner.ts --by-method",
|
|
398
|
+
"demo:run:endpoint": "tsx examples/demo-runner.ts --by-endpoint",
|
|
440
399
|
"demo:registry:generate": "tsx scripts/generate-demo-registry.ts",
|
|
441
400
|
"demo:registry:validate": "tsx scripts/validate-demo-registry.ts",
|
|
442
401
|
"test:demos": "tsx examples/testing/index.ts",
|
|
@@ -452,6 +411,7 @@
|
|
|
452
411
|
"lint:strict": "pnpm run lint",
|
|
453
412
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
454
413
|
"typecheck:tests": "tsc -p tsconfig.tests.json --noEmit",
|
|
414
|
+
"typecheck:examples": "tsc -p tsconfig.examples.json --noEmit",
|
|
455
415
|
"typecheck:watch": "tsc --noEmit --watch",
|
|
456
416
|
"format": "prettier --write \"src/**/*.{ts,tsx,json,md}\"",
|
|
457
417
|
"format:check": "prettier --check \"src/**/*.{ts,tsx,json,md}\"",
|
|
@@ -465,10 +425,10 @@
|
|
|
465
425
|
"docs:extract:markdown": "api-documenter markdown -i temp -o docs/api-markdown",
|
|
466
426
|
"docs:typedoc": "typedoc --options typedoc-html.json",
|
|
467
427
|
"docs:typedoc:markdown": "typedoc --plugin typedoc-plugin-markdown --out docs/markdown",
|
|
468
|
-
"docs:validate": "tsx scripts/validate-examples.ts",
|
|
469
428
|
"docs:generate": "pnpm run docs:prebuild && pnpm run docs:extract && pnpm run docs:typedoc",
|
|
470
429
|
"docs:serve": "http-server docs/api -p 8080",
|
|
430
|
+
"docs:migration": "tsx scripts/generate-migration-doc.ts",
|
|
471
431
|
"size": "size-limit",
|
|
472
|
-
"analyze": "rollup -c rollup.config.
|
|
432
|
+
"analyze": "BUNDLE_ANALYZER=true rollup -c rollup.config.ts"
|
|
473
433
|
}
|
|
474
434
|
}
|