Skip to content

Commit

Permalink
version registry
Browse files Browse the repository at this point in the history
  • Loading branch information
grod220 committed Oct 31, 2024
1 parent b02b4fa commit 10bc779
Show file tree
Hide file tree
Showing 10 changed files with 59 additions and 285 deletions.
13 changes: 11 additions & 2 deletions input/chains/penumbra-testnet-deimos-8-x6de97e39.json
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,16 @@
}
}
],
"canonicalNumeraires": ["wtest_usd", "transfer/channel-1/uusdc"],
"canonicalNumeraires": [
"wtest_usd",
"transfer/channel-1/uusdc"
],
"priorityScoresByBase": {},
"badgesByBase": {}
"badgesByBase": {
"wtest_usd": [
{
"png": "https://raw.githubusercontent.com/prax-wallet/registry/main/images/penumbra-favicon.png"
}
]
}
}
254 changes: 0 additions & 254 deletions input/chains/penumbra-testnet-deimos-8.json

This file was deleted.

6 changes: 6 additions & 0 deletions npm/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @penumbra-labs/registry

## 11.5.0

### Minor Changes

- Adding badge support for metadata

## 11.4.0

### Minor Changes
Expand Down
4 changes: 2 additions & 2 deletions npm/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@penumbra-labs/registry",
"version": "11.4.0",
"version": "11.5.0",
"description": "Chain and asset registry for Penumbra",
"main": "./dist/index.js",
"module": "./dist/index.mjs",
Expand All @@ -16,7 +16,7 @@
"test": "vitest run"
},
"devDependencies": {
"@bufbuild/protobuf": "^2.2.1",
"@bufbuild/protobuf": "^1.10.0",
"@changesets/cli": "^2.27.9",
"@eslint/eslintrc": "^3.1.0",
"@eslint/js": "^9.13.0",
Expand Down
16 changes: 8 additions & 8 deletions npm/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions npm/src/json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export interface JsonMetadata {
symbol: string;
penumbraAssetId: PenumbraAssetId;
images?: Image[];
badges?: Image[];
}

interface DenomUnit {
Expand Down
4 changes: 4 additions & 0 deletions npm/src/registry.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ describe('Registry', () => {
const usdcId = base64ToUint8Array('reum7wQmk/owgvGMWMZn/6RFPV24zIKq3W6In/WwZgg=');
const res = registry.getMetadata(new AssetId({ inner: usdcId }));
expect(res.base).toEqual('wtest_usd');
expect(res.badges.length).toEqual(1);
expect(res.badges[0]?.png).toEqual(
'https://raw.githubusercontent.com/prax-wallet/registry/main/images/penumbra-favicon.png',
);
});

it('throws when searching for metadata that does not exist', () => {
Expand Down
Loading

0 comments on commit 10bc779

Please sign in to comment.