Skip to content

Commit 39c277f

Browse files
feat(registry)!: remove legacy registry data (#329)
* feat(registry)!: remove legacy registry data Align the package with IBC deprecation and the latest upstream chain registry metadata. Co-authored-by: Cursor <cursoragent@cursor.com> * feat(registry)!: remove gas metadata Stop exporting and bundling obsolete chain gas information from the registry package. Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 96d9e1c commit 39c277f

17 files changed

Lines changed: 112 additions & 208 deletions

File tree

.changeset/remove-registry-ibc.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
'@sei-js/registry': major
3+
---
4+
5+
Remove IBC and gas data from the registry package. `IBC_INFO`, `ChannelInfo`, `GAS_INFO`, `ChainGasInfo`, and `ModuleAdjustments` are no longer exported, and `TOKEN_LIST` no longer contains IBC or ICS-20 assets.
6+
7+
Refresh the bundled chain registry data with current network endpoints, explorers, and wallets. `WALLETS` is now available from the package root.
8+
9+
Align token metadata types with the community asset list: `Token.type_asset` replaces the non-runtime `Token.type_token` field, and `DenomUnit.aliases` is optional.

packages/registry/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ bun add @sei-js/registry
88

99
## Usage
1010
```typescript
11-
import { TOKEN_LIST, NETWORKS, IBC_INFO, GAS_INFO } from '@sei-js/registry'
11+
import { TOKEN_LIST, NETWORKS, WALLETS } from '@sei-js/registry'
1212

13-
const uAtom = TOKEN_LIST.find(asset => asset.denom === 'uatom')
13+
const sei = TOKEN_LIST['pacific-1'].find(asset => asset.base === 'usei')
14+
const keplr = WALLETS.find(wallet => wallet.identifier === 'keplr')
1415
```

packages/registry/src/chain-info/__tests__/index.spec.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,8 @@ describe('ChainInfo Tests', () => {
1616
it("includes 'secp256k1' in key_algos", () => {
1717
expect(CHAIN_INFO.key_algos).toContain('secp256k1');
1818
});
19+
20+
it('contains the current supported wallets', () => {
21+
expect(CHAIN_INFO.supported_wallets).toEqual(['keplr', 'coin98']);
22+
});
1923
});

packages/registry/src/gas/__tests__/index.spec.ts

Lines changed: 0 additions & 37 deletions
This file was deleted.

packages/registry/src/gas/index.ts

Lines changed: 0 additions & 53 deletions
This file was deleted.

packages/registry/src/ibc/__tests__/index.spec.ts

Lines changed: 0 additions & 36 deletions
This file was deleted.

packages/registry/src/ibc/index.ts

Lines changed: 0 additions & 53 deletions
This file was deleted.

packages/registry/src/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
export * from './chain-info';
2-
export * from './gas';
3-
export * from './ibc';
42
export * from './networks';
53
export type { Network } from './supported-networks';
64
export { CHAIN_IDS } from './supported-networks';
75
export * from './tokens';
6+
export * from './wallets';

packages/registry/src/networks/__tests__/index.spec.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,18 @@ describe('Networks configuration', () => {
2626
}
2727
}
2828
});
29+
30+
it('contains the current RPC, EVM, and explorer metadata', () => {
31+
const mainnet = NETWORKS['pacific-1'];
32+
expect(mainnet.rpc.some(({ provider, url }) => provider === 'Rhino' && url === 'https://rpc.sei-apis.com')).toBeTrue();
33+
expect(mainnet.evm_rpc?.some(({ provider, url }) => provider === 'dRPC' && url === 'https://sei.drpc.org')).toBeTrue();
34+
expect(mainnet.evm_ws?.some(({ provider, url }) => provider === 'dRPC' && url === 'wss://sei.drpc.org')).toBeTrue();
35+
expect(mainnet.explorers?.some(({ name }) => name === 'Seistream')).toBeTrue();
36+
37+
const testnet = NETWORKS['atlantic-2'];
38+
expect(testnet.rpc.some(({ provider, url }) => provider === 'Sei' && url === 'https://rpc.atlantic-2.seinetwork.io')).toBeTrue();
39+
expect(testnet.evm_rpc?.some(({ provider, url }) => provider === 'dRPC' && url === 'https://sei-testnet.drpc.org')).toBeTrue();
40+
expect(testnet.evm_ws?.some(({ provider, url }) => provider === 'dRPC' && url === 'wss://sei-testnet.drpc.org')).toBeTrue();
41+
expect(testnet.explorers?.some(({ name }) => name === 'Seiscan')).toBeTrue();
42+
});
2943
});

0 commit comments

Comments
 (0)