@penumbrafi/registry 13.0.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 +366 -0
- package/dist/index.d.ts +152 -0
- package/dist/index.js +5 -0
- package/dist/index.mjs +12846 -0
- package/package.json +48 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,366 @@
|
|
|
1
|
+
# @penumbrafi/registry
|
|
2
|
+
|
|
3
|
+
## 13.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- a72f006: Republish under the `@penumbrafi` scope and read the registry data from
|
|
8
|
+
`raw.githubusercontent.com/penumbrafi/registry/main/registry`.
|
|
9
|
+
|
|
10
|
+
The package was previously published as `@penumbra-labs/registry` and fetched
|
|
11
|
+
from `prax-wallet/registry`; both of those are unmaintained. Consumers should
|
|
12
|
+
change their dependency to `@penumbrafi/registry` — the API is unchanged.
|
|
13
|
+
|
|
14
|
+
### Minor Changes
|
|
15
|
+
|
|
16
|
+
- ecce49f: Add an optional `status` field to IBC connections. `Chain.status` is
|
|
17
|
+
`'active' | 'expired' | undefined` and records whether a connection can
|
|
18
|
+
currently carry a transfer; `'expired'` normally means the counterparty light
|
|
19
|
+
client has expired. Clients can use it to hide or disable a channel instead of
|
|
20
|
+
offering a withdrawal that will never arrive. The field is optional and purely
|
|
21
|
+
additive, so consumers that ignore it are unaffected.
|
|
22
|
+
|
|
23
|
+
> Published as `@penumbra-labs/registry` up to and including 12.8.0.
|
|
24
|
+
|
|
25
|
+
## 12.8.0
|
|
26
|
+
|
|
27
|
+
### Minor Changes
|
|
28
|
+
|
|
29
|
+
- Add an option to improve caching in NextJS environments.
|
|
30
|
+
|
|
31
|
+
## 12.7.2
|
|
32
|
+
|
|
33
|
+
### Patch Changes
|
|
34
|
+
|
|
35
|
+
- Remove Simply Staking RPC for downtime
|
|
36
|
+
|
|
37
|
+
## 12.7.1
|
|
38
|
+
|
|
39
|
+
### Patch Changes
|
|
40
|
+
|
|
41
|
+
- update channels for phobos-3 testnet
|
|
42
|
+
|
|
43
|
+
## 12.7.0
|
|
44
|
+
|
|
45
|
+
### Minor Changes
|
|
46
|
+
|
|
47
|
+
- rpc: add radiant commons to registry
|
|
48
|
+
|
|
49
|
+
## 12.6.1
|
|
50
|
+
|
|
51
|
+
### Patch Changes
|
|
52
|
+
|
|
53
|
+
- rename allETH, add dydx and injective
|
|
54
|
+
|
|
55
|
+
## 12.6.0
|
|
56
|
+
|
|
57
|
+
### Minor Changes
|
|
58
|
+
|
|
59
|
+
- a4e903b: Add Phobos3 bundled registry
|
|
60
|
+
|
|
61
|
+
## 12.5.1
|
|
62
|
+
|
|
63
|
+
### Patch Changes
|
|
64
|
+
|
|
65
|
+
- 0ca7bc4: Fix querying metadata by denom – should use `base` field instead of `denom`
|
|
66
|
+
|
|
67
|
+
## 12.5.0
|
|
68
|
+
|
|
69
|
+
### Minor Changes
|
|
70
|
+
|
|
71
|
+
- dfad8cd: Allow querying metadata by asset's denom
|
|
72
|
+
|
|
73
|
+
## 12.4.0
|
|
74
|
+
|
|
75
|
+
### Minor Changes
|
|
76
|
+
|
|
77
|
+
- bump registry and consume downstream deps
|
|
78
|
+
|
|
79
|
+
## 12.3.0
|
|
80
|
+
|
|
81
|
+
### Minor Changes
|
|
82
|
+
|
|
83
|
+
- f1feced: update testnet channels and rpc providers list
|
|
84
|
+
|
|
85
|
+
## 12.2.0
|
|
86
|
+
|
|
87
|
+
### Minor Changes
|
|
88
|
+
|
|
89
|
+
- 47cae42: update testnet channels and rpc providers list
|
|
90
|
+
|
|
91
|
+
## 12.1.3
|
|
92
|
+
|
|
93
|
+
### Patch Changes
|
|
94
|
+
|
|
95
|
+
- 40cd591: rpc: remove binary builders from registry
|
|
96
|
+
|
|
97
|
+
## 12.1.2
|
|
98
|
+
|
|
99
|
+
### Patch Changes
|
|
100
|
+
|
|
101
|
+
- fix protobuf pkg version
|
|
102
|
+
|
|
103
|
+
## 12.1.1
|
|
104
|
+
|
|
105
|
+
### Patch Changes
|
|
106
|
+
|
|
107
|
+
- adds coingecko ids to assets
|
|
108
|
+
|
|
109
|
+
## 12.1.0
|
|
110
|
+
|
|
111
|
+
### Minor Changes
|
|
112
|
+
|
|
113
|
+
- Add fallible tryGetMetadata method to registry
|
|
114
|
+
- 4a563c9: Add priority scores
|
|
115
|
+
|
|
116
|
+
## 12.0.1
|
|
117
|
+
|
|
118
|
+
### Patch Changes
|
|
119
|
+
|
|
120
|
+
- fb2bff8: add primary colors to all assets, add script for auto coloring
|
|
121
|
+
- 6bcb0a9: add primary hex colors for all assets on all chains
|
|
122
|
+
- a174c49: Add name and description fields to native Penumbra token in the registry
|
|
123
|
+
- adb6ee2: add rc to registry's frontend list
|
|
124
|
+
- a2db6c4: Updates the channels for penumbra testnet
|
|
125
|
+
|
|
126
|
+
## 12.0.0
|
|
127
|
+
|
|
128
|
+
### Major Changes
|
|
129
|
+
|
|
130
|
+
- Forward compatible Metadata deserialization
|
|
131
|
+
|
|
132
|
+
## 11.5.0
|
|
133
|
+
|
|
134
|
+
### Minor Changes
|
|
135
|
+
|
|
136
|
+
- Adding badge support for metadata
|
|
137
|
+
|
|
138
|
+
## 11.3.1
|
|
139
|
+
|
|
140
|
+
### Patch Changes
|
|
141
|
+
|
|
142
|
+
- bundle phobos-2 registry, missing from v11.3.0
|
|
143
|
+
|
|
144
|
+
## 11.3.0
|
|
145
|
+
|
|
146
|
+
### Minor Changes
|
|
147
|
+
|
|
148
|
+
- Bundling new phobos registries
|
|
149
|
+
|
|
150
|
+
## 11.2.0
|
|
151
|
+
|
|
152
|
+
### Minor Changes
|
|
153
|
+
|
|
154
|
+
- c9bf54c: Updating testnet chain id fallback logic
|
|
155
|
+
|
|
156
|
+
## 11.1.0
|
|
157
|
+
|
|
158
|
+
### Minor Changes
|
|
159
|
+
|
|
160
|
+
- Update to latest bundle
|
|
161
|
+
|
|
162
|
+
## 11.0.0
|
|
163
|
+
|
|
164
|
+
### Major Changes
|
|
165
|
+
|
|
166
|
+
- 2a74e30: New frontends data structure w/ images
|
|
167
|
+
|
|
168
|
+
### Patch Changes
|
|
169
|
+
|
|
170
|
+
- b195bd3: Add support for local devnet chain IDs
|
|
171
|
+
|
|
172
|
+
## 10.1.0
|
|
173
|
+
|
|
174
|
+
### Minor Changes
|
|
175
|
+
|
|
176
|
+
- add osmosis channel
|
|
177
|
+
|
|
178
|
+
## 10.0.0
|
|
179
|
+
|
|
180
|
+
### Major Changes
|
|
181
|
+
|
|
182
|
+
- Expose remote fetching methods
|
|
183
|
+
|
|
184
|
+
## 9.4.0
|
|
185
|
+
|
|
186
|
+
### Minor Changes
|
|
187
|
+
|
|
188
|
+
- Add penumbra-1 to registry list
|
|
189
|
+
|
|
190
|
+
### Patch Changes
|
|
191
|
+
|
|
192
|
+
- 779e2bc: Change validator name for Starling Cybernetics to "Starling Cybernetics"
|
|
193
|
+
|
|
194
|
+
## 9.3.0
|
|
195
|
+
|
|
196
|
+
### Minor Changes
|
|
197
|
+
|
|
198
|
+
- Clear out rpcs & frontends
|
|
199
|
+
|
|
200
|
+
## 9.2.0
|
|
201
|
+
|
|
202
|
+
### Minor Changes
|
|
203
|
+
|
|
204
|
+
- Save stakingAssetId as proto-compatible type
|
|
205
|
+
|
|
206
|
+
## 9.1.1
|
|
207
|
+
|
|
208
|
+
### Patch Changes
|
|
209
|
+
|
|
210
|
+
- Fix testnet-preview parsing
|
|
211
|
+
|
|
212
|
+
## 9.1.0
|
|
213
|
+
|
|
214
|
+
### Minor Changes
|
|
215
|
+
|
|
216
|
+
- b5726c2: Changed stakingAssetId type
|
|
217
|
+
|
|
218
|
+
## 9.0.0
|
|
219
|
+
|
|
220
|
+
### Major Changes
|
|
221
|
+
|
|
222
|
+
- Add stakingAssetId to globals
|
|
223
|
+
|
|
224
|
+
## 8.0.1
|
|
225
|
+
|
|
226
|
+
### Patch Changes
|
|
227
|
+
|
|
228
|
+
- Update testnet to new noble/osmosis ibc channels
|
|
229
|
+
|
|
230
|
+
## 8.0.0
|
|
231
|
+
|
|
232
|
+
### Major Changes
|
|
233
|
+
|
|
234
|
+
- New API for global rpcs & frontends
|
|
235
|
+
|
|
236
|
+
## 7.7.0
|
|
237
|
+
|
|
238
|
+
### Minor Changes
|
|
239
|
+
|
|
240
|
+
- Add frontends to registry
|
|
241
|
+
|
|
242
|
+
## 7.6.0
|
|
243
|
+
|
|
244
|
+
### Minor Changes
|
|
245
|
+
|
|
246
|
+
- Add wtest_eth, test_sat, utest_atom, utest_osmo
|
|
247
|
+
|
|
248
|
+
## 7.5.1
|
|
249
|
+
|
|
250
|
+
### Patch Changes
|
|
251
|
+
|
|
252
|
+
- Update noble/osmosis testnet channels
|
|
253
|
+
|
|
254
|
+
## 7.5.0
|
|
255
|
+
|
|
256
|
+
### Minor Changes
|
|
257
|
+
|
|
258
|
+
- New gm/gn icons
|
|
259
|
+
|
|
260
|
+
## 7.4.1
|
|
261
|
+
|
|
262
|
+
### Patch Changes
|
|
263
|
+
|
|
264
|
+
- Fix Penumbra Labs testnet validator denoms
|
|
265
|
+
|
|
266
|
+
## 7.4.0
|
|
267
|
+
|
|
268
|
+
### Minor Changes
|
|
269
|
+
|
|
270
|
+
- Add Starling Staking delegation token metadata
|
|
271
|
+
|
|
272
|
+
## 7.3.0
|
|
273
|
+
|
|
274
|
+
### Minor Changes
|
|
275
|
+
|
|
276
|
+
- Update noble channels
|
|
277
|
+
|
|
278
|
+
## 7.2.2
|
|
279
|
+
|
|
280
|
+
### Patch Changes
|
|
281
|
+
|
|
282
|
+
- update osmosis channel for deimos-8
|
|
283
|
+
|
|
284
|
+
## 7.2.1
|
|
285
|
+
|
|
286
|
+
### Patch Changes
|
|
287
|
+
|
|
288
|
+
- Update noble channelids
|
|
289
|
+
|
|
290
|
+
## 7.2.0
|
|
291
|
+
|
|
292
|
+
### Minor Changes
|
|
293
|
+
|
|
294
|
+
- Fix deimos-8 exports
|
|
295
|
+
|
|
296
|
+
## 7.1.0
|
|
297
|
+
|
|
298
|
+
### Minor Changes
|
|
299
|
+
|
|
300
|
+
- Support for deimos-8
|
|
301
|
+
|
|
302
|
+
## 7.0.0
|
|
303
|
+
|
|
304
|
+
### Major Changes
|
|
305
|
+
|
|
306
|
+
- Bundle registry in dist
|
|
307
|
+
|
|
308
|
+
## 6.0.0
|
|
309
|
+
|
|
310
|
+
### Major Changes
|
|
311
|
+
|
|
312
|
+
- Counterparty chain id added + renamed ibcChannel to channelId
|
|
313
|
+
|
|
314
|
+
## 5.2.0
|
|
315
|
+
|
|
316
|
+
### Minor Changes
|
|
317
|
+
|
|
318
|
+
- Update to latest ibc channels
|
|
319
|
+
|
|
320
|
+
## 5.1.0
|
|
321
|
+
|
|
322
|
+
### Minor Changes
|
|
323
|
+
|
|
324
|
+
- Get all assets
|
|
325
|
+
|
|
326
|
+
## 5.0.0
|
|
327
|
+
|
|
328
|
+
### Major Changes
|
|
329
|
+
|
|
330
|
+
- New registry class
|
|
331
|
+
|
|
332
|
+
## 4.1.0
|
|
333
|
+
|
|
334
|
+
### Minor Changes
|
|
335
|
+
|
|
336
|
+
- Added registry for testnet-preview
|
|
337
|
+
|
|
338
|
+
## 4.0.0
|
|
339
|
+
|
|
340
|
+
### Major Changes
|
|
341
|
+
|
|
342
|
+
- Added stakingAssetId and numeraires
|
|
343
|
+
|
|
344
|
+
## 3.0.0
|
|
345
|
+
|
|
346
|
+
### Major Changes
|
|
347
|
+
|
|
348
|
+
- Augmented and adapted ibc connections
|
|
349
|
+
|
|
350
|
+
## 2.0.0
|
|
351
|
+
|
|
352
|
+
### Major Changes
|
|
353
|
+
|
|
354
|
+
- Expose more interfaces + change method name
|
|
355
|
+
|
|
356
|
+
## 1.1.0
|
|
357
|
+
|
|
358
|
+
### Minor Changes
|
|
359
|
+
|
|
360
|
+
- Simplify registry to one fetch
|
|
361
|
+
|
|
362
|
+
## 1.0.0
|
|
363
|
+
|
|
364
|
+
### Major Changes
|
|
365
|
+
|
|
366
|
+
- Initial publish
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import { AssetId } from '@penumbra-zone/protobuf/penumbra/core/asset/v1/asset_pb';
|
|
2
|
+
import { Denom } from '@penumbra-zone/protobuf/penumbra/core/asset/v1/asset_pb';
|
|
3
|
+
import { Metadata } from '@penumbra-zone/protobuf/penumbra/core/asset/v1/asset_pb';
|
|
4
|
+
|
|
5
|
+
export declare type Base64AssetId = Stringified<AssetId['inner']>;
|
|
6
|
+
|
|
7
|
+
declare class BundledClient {
|
|
8
|
+
get(chainId: string): Registry;
|
|
9
|
+
globals(): RegistryGlobals;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export declare interface Chain {
|
|
13
|
+
addressPrefix: string;
|
|
14
|
+
chainId: string;
|
|
15
|
+
channelId: string;
|
|
16
|
+
counterpartyChannelId: string;
|
|
17
|
+
images: Image_2[];
|
|
18
|
+
displayName: string;
|
|
19
|
+
/**
|
|
20
|
+
* Liveness of the connection as last observed on chain. `'expired'` means the
|
|
21
|
+
* channel cannot currently carry a transfer, usually because the counterparty
|
|
22
|
+
* light client has expired, and clients should hide or disable it. Absent when
|
|
23
|
+
* the connection has not been classified.
|
|
24
|
+
*/
|
|
25
|
+
status?: ConnectionStatus;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export declare class ChainRegistryClient {
|
|
29
|
+
readonly bundled: BundledClient;
|
|
30
|
+
readonly remote: RemoteClient;
|
|
31
|
+
constructor(options?: RegistryOptions);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export declare type ConnectionStatus = 'active' | 'expired';
|
|
35
|
+
|
|
36
|
+
declare interface DenomUnit {
|
|
37
|
+
denom: string;
|
|
38
|
+
exponent?: number;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export declare interface EntityMetadata {
|
|
42
|
+
name: string;
|
|
43
|
+
url: string;
|
|
44
|
+
images: Image_2[];
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
declare interface Image_2 {
|
|
48
|
+
png?: string;
|
|
49
|
+
svg?: string;
|
|
50
|
+
}
|
|
51
|
+
export { Image_2 as Image }
|
|
52
|
+
|
|
53
|
+
declare interface Image_3 {
|
|
54
|
+
png?: string;
|
|
55
|
+
svg?: string;
|
|
56
|
+
theme?: {
|
|
57
|
+
primaryColorHex?: string;
|
|
58
|
+
circle?: boolean;
|
|
59
|
+
darkMode?: boolean;
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export declare const isDenom: (value?: Denom | AssetId) => value is Denom;
|
|
64
|
+
|
|
65
|
+
declare interface JsonGlobals {
|
|
66
|
+
rpcs: EntityMetadata[];
|
|
67
|
+
/** @deprecated use `frontendsV2` instead */
|
|
68
|
+
frontends: string[];
|
|
69
|
+
frontendsV2: EntityMetadata[];
|
|
70
|
+
stakingAssetId: {
|
|
71
|
+
inner: string;
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
declare interface JsonMetadata {
|
|
76
|
+
description?: string;
|
|
77
|
+
denomUnits: DenomUnit[];
|
|
78
|
+
base: string;
|
|
79
|
+
display: string;
|
|
80
|
+
name?: string;
|
|
81
|
+
symbol: string;
|
|
82
|
+
penumbraAssetId: PenumbraAssetId;
|
|
83
|
+
images?: Image_3[];
|
|
84
|
+
badges?: Image_3[];
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
declare interface JsonRegistry {
|
|
88
|
+
chainId: string;
|
|
89
|
+
ibcConnections: Chain[];
|
|
90
|
+
assetById: Record<Base64AssetId, JsonMetadata>;
|
|
91
|
+
numeraires: Base64AssetId[];
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
declare interface PenumbraAssetId {
|
|
95
|
+
inner: string;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export declare class Registry {
|
|
99
|
+
readonly chainId: string;
|
|
100
|
+
readonly ibcConnections: Chain[];
|
|
101
|
+
readonly numeraires: AssetId[];
|
|
102
|
+
private readonly assetById;
|
|
103
|
+
private readonly assetByDenom;
|
|
104
|
+
constructor(r: JsonRegistry);
|
|
105
|
+
private _resolveMetadata;
|
|
106
|
+
getMetadata(id: AssetId | Denom): Metadata;
|
|
107
|
+
tryGetMetadata(id: AssetId | Denom): Metadata | undefined;
|
|
108
|
+
getAllAssets(): Metadata[];
|
|
109
|
+
version(): Promise<string>;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
declare class RegistryGlobals {
|
|
113
|
+
readonly stakingAssetId: AssetId;
|
|
114
|
+
readonly rpcs: EntityMetadata[];
|
|
115
|
+
readonly frontends: EntityMetadata[];
|
|
116
|
+
constructor(json: JsonGlobals);
|
|
117
|
+
version(): Promise<string>;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/** Options to configure the registry.
|
|
121
|
+
*
|
|
122
|
+
* In the browser, no tinkering should be needed.
|
|
123
|
+
*
|
|
124
|
+
* If you're using NextJS, you should consider adding the `nextjsServerSide` flag,
|
|
125
|
+
* when on the server.
|
|
126
|
+
*/
|
|
127
|
+
declare interface RegistryOptions {
|
|
128
|
+
/** If set, this code is running on the server side of a NextJS app.
|
|
129
|
+
*
|
|
130
|
+
* This information is useful, because NextJS overrides the behavior of the
|
|
131
|
+
* `fetch` API, which the registry uses to get an up-to-date remote registry.
|
|
132
|
+
*
|
|
133
|
+
* We want to cache these results, which `fetch` will do just fine in the browser.
|
|
134
|
+
* But, by default, NextJS will not cache anything, ever.
|
|
135
|
+
* By informing the registry that it's running in this environment, it can amend
|
|
136
|
+
* its fetching behavior accordingly.
|
|
137
|
+
*/
|
|
138
|
+
nextjsServerSide?: boolean;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
declare class RemoteClient {
|
|
142
|
+
private readonly bundled;
|
|
143
|
+
private readonly github;
|
|
144
|
+
constructor(bundled: BundledClient, options?: RegistryOptions);
|
|
145
|
+
get(chainId: string): Promise<Registry>;
|
|
146
|
+
getWithBundledBackup(chainId: string): Promise<Registry>;
|
|
147
|
+
globals(): Promise<RegistryGlobals>;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
declare type Stringified<T> = string;
|
|
151
|
+
|
|
152
|
+
export { }
|