@gala-chain/launchpad-sdk 9.0.0-rc.3 → 9.0.0-rc.4
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 +20 -0
- package/EXAMPLES.md +3 -3
- package/MIGRATING-TO-9.0.md +1 -1
- package/dist/LaunchpadSDK.d.ts +15 -15
- package/dist/constants/version.generated.d.ts +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/native.cjs +1 -1
- package/dist/native.esm.js +1 -1
- package/dist/schemas/pagination.d.ts.map +1 -1
- package/dist/schemas/primitives.d.ts.map +1 -1
- package/dist/services/GalaChainLockService.d.ts +2 -2
- package/dist/services/GalaChainService.d.ts +1 -1
- package/dist/services/HolderService.d.ts +3 -3
- package/dist/services/MessagesService.d.ts +1 -1
- package/dist/services/OEmbedService.d.ts +3 -3
- package/dist/services/OverseerService.d.ts +1 -1
- package/dist/services/TradeService.d.ts +1 -1
- package/dist/services/WebSocketAdminService.d.ts +12 -12
- package/dist/services/WeeklyChallengeService.d.ts +2 -2
- package/dist/signing/signers.d.ts +1 -1
- package/dist/signing/signers.d.ts.map +1 -1
- package/dist/types/constraints.d.ts +1 -1
- package/dist/types/constraints.d.ts.map +1 -1
- package/dist/types/messages.dto.d.ts +1 -1
- package/dist/types/overseer.dto.d.ts +1 -1
- package/dist/types/session-auth.dto.d.ts +1 -1
- package/dist/types/session-auth.dto.d.ts.map +1 -1
- package/dist/types/trade.dto.d.ts +1 -1
- package/dist/types/trade.dto.d.ts.map +1 -1
- package/dist/types/user.dto.d.ts +1 -1
- package/dist/utils/address-formatter.d.ts +14 -2
- package/dist/utils/address-formatter.d.ts.map +1 -1
- package/dist/utils/string-patterns.d.ts +4 -4
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 9.0.0-rc.4
|
|
4
|
+
|
|
5
|
+
Since 9.0.0-rc.3 (published). Core peer floor is now `>=1.0.0-rc.7 <2`.
|
|
6
|
+
|
|
7
|
+
- **`eth|0x<hex>` is refused everywhere, with one message, and core agrees.** This SDK already
|
|
8
|
+
refused it (rc.3); the text now is gala-core-sdk's own (`INVALID_ETH_USER_REF_PREFIX`):
|
|
9
|
+
`Invalid <field>: "<value>" is not a GalaChain user reference. An eth| reference takes the 40 hex
|
|
10
|
+
digits of the account with no 0x prefix; write it as "eth|<EIP-55 digits>".` It is the message
|
|
11
|
+
of `userRef` / `backendUserRef` (`ValidationError`, `code: 'INVALID_FORMAT'`), `AddressFormatter`
|
|
12
|
+
(`assertValid`, `toEthereumFormat`), `assertBackendUserAddress`, the `walletAddress` validator,
|
|
13
|
+
`flexibleAddressSchema`, the trade-filter `userAddress` schema and the signers'
|
|
14
|
+
`INVALID_SIGNER_OPTIONS`. Core rc.7 itself no longer converts `eth|0x...`, so a signer, a bridge
|
|
15
|
+
recipient or a gateway write handed one is refused the same way before anything is signed or sent.
|
|
16
|
+
- Two places still ACCEPTED `eth|0x...` and no longer do: `vaultAddressSchema`
|
|
17
|
+
(`/^eth\|(0x)?[0-9a-fA-F]{40}$/`) and `VAULT_ADDRESS_CONSTRAINT.ETH_PATTERN` / `isValidVaultAddress`
|
|
18
|
+
(`/^eth\|0x[0-9a-fA-F]{40}$/`, which refused the real `eth|<40 hex>`): both are `eth|<40 hex>`
|
|
19
|
+
now.
|
|
20
|
+
- Docs, doc comments and examples no longer show `eth|0x...` as an address (it was written in
|
|
21
|
+
about a hundred places).
|
|
22
|
+
|
|
3
23
|
## 9.0.0-rc.3
|
|
4
24
|
|
|
5
25
|
Since 9.0.0-rc.2 (published). Core peer floor stays `>=1.0.0-rc.6 <2`.
|
package/EXAMPLES.md
CHANGED
|
@@ -330,7 +330,7 @@ const unsubscribe = sdk.onLaunchpadTokenCreation(
|
|
|
330
330
|
console.log(` Created: ${new Date(token.createdAt).toISOString()}`);
|
|
331
331
|
},
|
|
332
332
|
{
|
|
333
|
-
creatorAddress: 'eth
|
|
333
|
+
creatorAddress: 'eth|...', // Optional: watch specific creator
|
|
334
334
|
intervalMs: 30000 // Poll every 30 seconds
|
|
335
335
|
}
|
|
336
336
|
);
|
|
@@ -473,12 +473,12 @@ await sdk.connectStreamWebSocket({
|
|
|
473
473
|
const sdk = createLaunchpadSDK({ env: 'prod' });
|
|
474
474
|
|
|
475
475
|
// GALA balance
|
|
476
|
-
const galaBalance = await sdk.fetchGalaBalance('eth
|
|
476
|
+
const galaBalance = await sdk.fetchGalaBalance('eth|...');
|
|
477
477
|
console.log(`GALA: ${galaBalance?.balance}`);
|
|
478
478
|
|
|
479
479
|
// Tokens you hold
|
|
480
480
|
const held = await sdk.fetchTokensHeld({
|
|
481
|
-
address: 'eth
|
|
481
|
+
address: 'eth|...',
|
|
482
482
|
search: 'dragon' // Optional: filter by search
|
|
483
483
|
});
|
|
484
484
|
|
package/MIGRATING-TO-9.0.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Migrating from launchpad-sdk 8.1.0 to 9.0.0-rc.
|
|
1
|
+
# Migrating from launchpad-sdk 8.1.0 to 9.0.0-rc.4
|
|
2
2
|
|
|
3
3
|
Generated by `scripts/generate-migration-doc.ts` from the built declarations of the published
|
|
4
4
|
`@gala-chain/launchpad-sdk@8.1.0` tarball and of this build (do not edit by hand).
|
package/dist/LaunchpadSDK.d.ts
CHANGED
|
@@ -1013,7 +1013,7 @@ export declare class LaunchpadSDK {
|
|
|
1013
1013
|
*
|
|
1014
1014
|
* @example
|
|
1015
1015
|
* ```typescript
|
|
1016
|
-
* const rank = await sdk.getHolderRank('anime', 'eth|
|
|
1016
|
+
* const rank = await sdk.getHolderRank('anime', 'eth|1234...');
|
|
1017
1017
|
* if (rank) {
|
|
1018
1018
|
* console.log(`Rank #${rank.rank} of ${rank.holderCount} holders, balance: ${rank.balance}`);
|
|
1019
1019
|
* }
|
|
@@ -1069,7 +1069,7 @@ export declare class LaunchpadSDK {
|
|
|
1069
1069
|
*
|
|
1070
1070
|
* @example
|
|
1071
1071
|
* ```typescript
|
|
1072
|
-
* const history = await sdk.getHolderHistory('anime', 'eth|
|
|
1072
|
+
* const history = await sdk.getHolderHistory('anime', 'eth|1234...', 10);
|
|
1073
1073
|
* history.trades.forEach(t => console.log(`${t.txnType}: ${t.inputAmount} → ${t.outputAmount}`));
|
|
1074
1074
|
* ```
|
|
1075
1075
|
*/
|
|
@@ -3505,7 +3505,7 @@ export declare class LaunchpadSDK {
|
|
|
3505
3505
|
* @example Permanent global ban
|
|
3506
3506
|
* ```typescript
|
|
3507
3507
|
* const result = await sdk.createGlobalBan({
|
|
3508
|
-
* userAddress: 'eth|
|
|
3508
|
+
* userAddress: 'eth|123...',
|
|
3509
3509
|
* reason: 'Serious platform violation'
|
|
3510
3510
|
* });
|
|
3511
3511
|
* console.log('User globally banned:', result.ban.userAddress);
|
|
@@ -3514,7 +3514,7 @@ export declare class LaunchpadSDK {
|
|
|
3514
3514
|
* @example Temporary global ban (7 days)
|
|
3515
3515
|
* ```typescript
|
|
3516
3516
|
* const result = await sdk.createGlobalBan({
|
|
3517
|
-
* userAddress: 'eth|
|
|
3517
|
+
* userAddress: 'eth|123...',
|
|
3518
3518
|
* reason: 'Spam across multiple streams',
|
|
3519
3519
|
* durationSeconds: 604800 // 7 days
|
|
3520
3520
|
* });
|
|
@@ -3539,7 +3539,7 @@ export declare class LaunchpadSDK {
|
|
|
3539
3539
|
* @example
|
|
3540
3540
|
* ```typescript
|
|
3541
3541
|
* const result = await sdk.removeGlobalBan({
|
|
3542
|
-
* userAddress: 'eth|
|
|
3542
|
+
* userAddress: 'eth|123...'
|
|
3543
3543
|
* });
|
|
3544
3544
|
* console.log('Global ban removed:', result.removed);
|
|
3545
3545
|
* ```
|
|
@@ -3575,7 +3575,7 @@ export declare class LaunchpadSDK {
|
|
|
3575
3575
|
* @example Search for banned user
|
|
3576
3576
|
* ```typescript
|
|
3577
3577
|
* const result = await sdk.listGlobalBans({
|
|
3578
|
-
* userAddress: 'eth|
|
|
3578
|
+
* userAddress: 'eth|123...',
|
|
3579
3579
|
* pageSize: 10
|
|
3580
3580
|
* });
|
|
3581
3581
|
* ```
|
|
@@ -3597,7 +3597,7 @@ export declare class LaunchpadSDK {
|
|
|
3597
3597
|
* @example
|
|
3598
3598
|
* ```typescript
|
|
3599
3599
|
* const status = await sdk.getGlobalBan({
|
|
3600
|
-
* userAddress: 'eth|
|
|
3600
|
+
* userAddress: 'eth|123...'
|
|
3601
3601
|
* });
|
|
3602
3602
|
* if (status.banned) {
|
|
3603
3603
|
* console.log('User is globally banned');
|
|
@@ -4310,7 +4310,7 @@ export declare class LaunchpadSDK {
|
|
|
4310
4310
|
* @example Promote a user to overseer
|
|
4311
4311
|
* ```typescript
|
|
4312
4312
|
* const result = await sdk.createOverseerDirect({
|
|
4313
|
-
* userAddress: 'eth|
|
|
4313
|
+
* userAddress: 'eth|1234567890abcdef1234567890abcdef12345678',
|
|
4314
4314
|
* description: 'Platform team - John'
|
|
4315
4315
|
* });
|
|
4316
4316
|
* console.log('Overseer created:', result.overseer.userAddress);
|
|
@@ -5149,7 +5149,7 @@ export declare class LaunchpadSDK {
|
|
|
5149
5149
|
* @example Get token weekly history
|
|
5150
5150
|
* ```typescript
|
|
5151
5151
|
* const { snapshots } = await sdk.getTokenWeeklyHistory({
|
|
5152
|
-
* vaultAddress: 'eth|
|
|
5152
|
+
* vaultAddress: 'eth|abc123...'
|
|
5153
5153
|
* });
|
|
5154
5154
|
*
|
|
5155
5155
|
* for (const snap of snapshots) {
|
|
@@ -5228,7 +5228,7 @@ export declare class LaunchpadSDK {
|
|
|
5228
5228
|
*
|
|
5229
5229
|
* @example Get profile oEmbed
|
|
5230
5230
|
* ```typescript
|
|
5231
|
-
* const { oembed } = await sdk.getProfileOEmbed({ address: 'eth|
|
|
5231
|
+
* const { oembed } = await sdk.getProfileOEmbed({ address: 'eth|123...' });
|
|
5232
5232
|
* console.log('User:', oembed.displayName);
|
|
5233
5233
|
* console.log('Tokens created:', oembed.tokensCreated);
|
|
5234
5234
|
* console.log('Volume:', oembed.totalVolumeGala);
|
|
@@ -5571,7 +5571,7 @@ export declare class LaunchpadSDK {
|
|
|
5571
5571
|
* @example Get comments by a user
|
|
5572
5572
|
* ```typescript
|
|
5573
5573
|
* const result = await sdk.getComments({
|
|
5574
|
-
* userAddress: 'eth|
|
|
5574
|
+
* userAddress: 'eth|123...',
|
|
5575
5575
|
* pageSize: 20
|
|
5576
5576
|
* });
|
|
5577
5577
|
* ```
|
|
@@ -5669,7 +5669,7 @@ export declare class LaunchpadSDK {
|
|
|
5669
5669
|
* @example Get chat messages by a user
|
|
5670
5670
|
* ```typescript
|
|
5671
5671
|
* const result = await sdk.getChatMessages({
|
|
5672
|
-
* userAddress: 'eth|
|
|
5672
|
+
* userAddress: 'eth|123...',
|
|
5673
5673
|
* pageSize: 50
|
|
5674
5674
|
* });
|
|
5675
5675
|
* ```
|
|
@@ -5776,7 +5776,7 @@ export declare class LaunchpadSDK {
|
|
|
5776
5776
|
* @example Get all messages from a user with pagination
|
|
5777
5777
|
* ```typescript
|
|
5778
5778
|
* const result = await sdk.fetchMessages({
|
|
5779
|
-
* userAddress: 'eth|
|
|
5779
|
+
* userAddress: 'eth|123...',
|
|
5780
5780
|
* pageSize: 20,
|
|
5781
5781
|
* cursor: 'next_cursor'
|
|
5782
5782
|
* });
|
|
@@ -8695,7 +8695,7 @@ export declare class LaunchpadSDK {
|
|
|
8695
8695
|
* ```typescript
|
|
8696
8696
|
* const result = await sdk.lockTokens({
|
|
8697
8697
|
* tokens: [
|
|
8698
|
-
* { tokenName: 'anime', amount: '500', lockAuthority: 'eth|
|
|
8698
|
+
* { tokenName: 'anime', amount: '500', lockAuthority: 'eth|1234...' },
|
|
8699
8699
|
* { tokenName: 'dragon', amount: '250', expires: Date.now() + 86400000, name: 'vesting-lock' }
|
|
8700
8700
|
* ]
|
|
8701
8701
|
* });
|
|
@@ -9056,7 +9056,7 @@ export declare class LaunchpadSDK {
|
|
|
9056
9056
|
* ```typescript
|
|
9057
9057
|
* const unsubscribe = sdk.onLaunchpadTokenCreation(
|
|
9058
9058
|
* (token) => console.log(`${token.name} created!`),
|
|
9059
|
-
* { creatorAddress: 'eth|
|
|
9059
|
+
* { creatorAddress: 'eth|1234...' }
|
|
9060
9060
|
* );
|
|
9061
9061
|
* ```
|
|
9062
9062
|
*/
|