@chain-registry/interfaces 0.25.7 → 0.27.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.
@@ -1,4 +1,3 @@
1
- import { Pointer } from "./shared";
2
1
  export interface Asset {
3
2
  deprecated?: boolean;
4
3
  description?: string;
@@ -42,6 +41,10 @@ export interface DenomUnit {
42
41
  exponent: number;
43
42
  aliases?: string[];
44
43
  }
44
+ export interface Pointer {
45
+ chain_name: string;
46
+ base_denom?: string;
47
+ }
45
48
  export interface IbcTransition {
46
49
  type: "ibc";
47
50
  counterparty: {
package/chain.schema.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- import { Pointer } from "./shared";
2
1
  export interface Peer {
3
2
  id: string;
4
3
  address: string;
@@ -29,6 +28,10 @@ export interface FeeToken {
29
28
  export interface StakingToken {
30
29
  denom: string;
31
30
  }
31
+ export interface Pointer {
32
+ chain_name: string;
33
+ base_denom?: string;
34
+ }
32
35
  export interface Chain {
33
36
  $schema?: string;
34
37
  chain_name: string;
package/esm/index.js CHANGED
@@ -1,6 +1 @@
1
- export * from './assetlist.schema';
2
- export * from './chain.schema';
3
- export * from './ibc_data.schema';
4
- export * from './memo_keys.schema';
5
- export * from './shared';
6
- export * from './versions.schema';
1
+ export {};
package/index.d.ts CHANGED
@@ -1,6 +1,5 @@
1
- export * from './assetlist.schema';
2
- export * from './chain.schema';
3
- export * from './ibc_data.schema';
4
- export * from './memo_keys.schema';
5
- export * from './shared';
6
- export * from './versions.schema';
1
+ export { Asset, AssetList } from './assetlist.schema';
2
+ export { Chain } from './chain.schema';
3
+ export { IBCData } from './ibc_data.schema';
4
+ export { MemoKeys } from './memo_keys.schema';
5
+ export { Versions } from './versions.schema';
package/index.js CHANGED
@@ -1,22 +1,2 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
2
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./assetlist.schema"), exports);
18
- __exportStar(require("./chain.schema"), exports);
19
- __exportStar(require("./ibc_data.schema"), exports);
20
- __exportStar(require("./memo_keys.schema"), exports);
21
- __exportStar(require("./shared"), exports);
22
- __exportStar(require("./versions.schema"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chain-registry/interfaces",
3
- "version": "0.25.7",
3
+ "version": "0.27.0",
4
4
  "description": "Chain Registry interfaces",
5
5
  "author": "Dan Lynch <pyramation@gmail.com>",
6
6
  "homepage": "https://github.com/cosmology-tech/chain-registry",
@@ -23,14 +23,19 @@
23
23
  "copy": "copyfiles -f LICENSE README.md package.json dist",
24
24
  "clean": "del dist/**",
25
25
  "prepare": "npm run build",
26
+ "types": "chain-registry codegen --outputDir ./src/ --no-useCamelCase --registryDir ../../packages/chain-registry/chain-registry",
26
27
  "build": "npm run clean; tsc; tsc -p tsconfig.esm.json; npm run copy",
27
28
  "test": "jest",
28
29
  "test:watch": "jest --watch"
29
30
  },
31
+ "devDependencies": {
32
+ "@chain-registry/cli": "^1.28.0"
33
+ },
30
34
  "keywords": [
31
35
  "chain-registry",
32
36
  "web3",
33
37
  "cosmos",
34
38
  "interchain"
35
- ]
39
+ ],
40
+ "gitHead": "7478b00e390b053976e2a5f502d9b407e861c69d"
36
41
  }
package/dist/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2022 Dan Lynch <pyramation@gmail.com>
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
package/dist/README.md DELETED
@@ -1,74 +0,0 @@
1
- # @chain-registry/interfaces
2
-
3
- <p align="center" width="100%">
4
- <img height="90" src="https://user-images.githubusercontent.com/545047/190171475-b416f99e-2831-4786-9ba3-a7ff4d95b0d3.svg" />
5
- </p>
6
-
7
- <p align="center" width="100%">
8
- <a href="https://github.com/cosmology-tech/chain-registry/actions/workflows/run-tests.yml">
9
- <img height="20" src="https://github.com/cosmology-tech/chain-registry/actions/workflows/run-tests.yml/badge.svg" />
10
- </a>
11
- <a href="https://github.com/cosmology-tech/chain-registry/blob/main/LICENSE"><img height="20" src="https://img.shields.io/badge/license-MIT-blue.svg"></a>
12
- <a href="https://www.npmjs.com/package/@chain-registry/interfaces"><img height="20" src="https://img.shields.io/npm/dt/@chain-registry/interfaces"></a>
13
- <a href="https://www.npmjs.com/package/@chain-registry/interfaces"><img height="20" src="https://img.shields.io/github/package-json/v/cosmology-tech/chain-registry?filename=packages%2Ftypes%2Fpackage.json"></a>
14
- </p>
15
-
16
- The `@chain-registry/interfaces` module provides TypeScript interfaces that represent the structured data types as defined in the original JSON schema from the [`cosmos/chain-registry`](https://github.com/cosmos/chain-registry) repository. These interfaces are generated to facilitate type-safe development when interacting with chain registry data within TypeScript projects.
17
-
18
- ## Installation
19
-
20
- To install the `@chain-registry/interfaces` module, run the following command in your project directory:
21
-
22
- ```sh
23
- npm install @chain-registry/interfaces
24
- ```
25
-
26
- ## Usage
27
-
28
- Once installed, you can import the interfaces into your TypeScript project to ensure type safety and auto-completion within your IDE.
29
-
30
- Example of using an interface:
31
-
32
- ```js
33
- import { Chain } from '@chain-registry/interfaces';
34
-
35
- function displayChainInfo(chain: Chain) {
36
- console.log(`Chain Name: ${chain.chain_name}`);
37
- console.log(`Chain ID: ${chain.chain_id}`);
38
- // Add more fields as necessary
39
- }
40
-
41
- // Example usage with dummy data
42
- const cosmosHub: Chain = {
43
- chain_name: "Cosmos Hub",
44
- chain_id: "cosmoshub-4",
45
- bech32_prefix: "cosmos",
46
- // Assume other necessary fields are filled in
47
- };
48
-
49
- displayChainInfo(cosmosHub);
50
- ```
51
-
52
- ## Related
53
-
54
- Checkout these related projects:
55
-
56
- * [@cosmology/telescope](https://github.com/cosmology-tech/telescope) Your Frontend Companion for Building with TypeScript with Cosmos SDK Modules.
57
- * [@cosmwasm/ts-codegen](https://github.com/CosmWasm/ts-codegen) Convert your CosmWasm smart contracts into dev-friendly TypeScript classes.
58
- * [chain-registry](https://github.com/cosmology-tech/chain-registry) Everything from token symbols, logos, and IBC denominations for all assets you want to support in your application.
59
- * [cosmos-kit](https://github.com/cosmology-tech/cosmos-kit) Experience the convenience of connecting with a variety of web3 wallets through a single, streamlined interface.
60
- * [create-cosmos-app](https://github.com/cosmology-tech/create-cosmos-app) Set up a modern Cosmos app by running one command.
61
- * [interchain-ui](https://github.com/cosmology-tech/interchain-ui) The Interchain Design System, empowering developers with a flexible, easy-to-use UI kit.
62
- * [starship](https://github.com/cosmology-tech/starship) Unified Testing and Development for the Interchain.
63
-
64
- ## Credits
65
-
66
- 🛠 Built by Cosmology — if you like our tools, please consider delegating to [our validator ⚛️](https://cosmology.zone/validator)
67
-
68
-
69
- ## Disclaimer
70
-
71
- AS DESCRIBED IN THE LICENSES, THE SOFTWARE IS PROVIDED “AS IS”, AT YOUR OWN RISK, AND WITHOUT WARRANTIES OF ANY KIND.
72
-
73
- No developer or entity involved in creating this software will be liable for any claims or damages whatsoever associated with your use, inability to use, or your interaction with other users of the code, including any direct, indirect, incidental, special, exemplary, punitive or consequential damages, or loss of profits, cryptocurrencies, tokens, or anything else of value.
74
-
package/dist/package.json DELETED
@@ -1,36 +0,0 @@
1
- {
2
- "name": "@chain-registry/interfaces",
3
- "version": "0.25.7",
4
- "description": "Chain Registry interfaces",
5
- "author": "Dan Lynch <pyramation@gmail.com>",
6
- "homepage": "https://github.com/cosmology-tech/chain-registry",
7
- "license": "SEE LICENSE IN LICENSE",
8
- "main": "index.js",
9
- "module": "esm/index.js",
10
- "types": "index.d.ts",
11
- "publishConfig": {
12
- "access": "public",
13
- "directory": "dist"
14
- },
15
- "repository": {
16
- "type": "git",
17
- "url": "https://github.com/cosmology-tech/chain-registry"
18
- },
19
- "bugs": {
20
- "url": "https://github.com/cosmology-tech/chain-registry/issues"
21
- },
22
- "scripts": {
23
- "copy": "copyfiles -f LICENSE README.md package.json dist",
24
- "clean": "del dist/**",
25
- "prepare": "npm run build",
26
- "build": "npm run clean; tsc; tsc -p tsconfig.esm.json; npm run copy",
27
- "test": "jest",
28
- "test:watch": "jest --watch"
29
- },
30
- "keywords": [
31
- "chain-registry",
32
- "web3",
33
- "cosmos",
34
- "interchain"
35
- ]
36
- }
package/esm/shared.js DELETED
@@ -1 +0,0 @@
1
- export {};
package/shared.d.ts DELETED
@@ -1,4 +0,0 @@
1
- export interface Pointer {
2
- chain_name: string;
3
- base_denom?: string;
4
- }
package/shared.js DELETED
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });