@shapeshiftoss/caip 1.3.0 → 1.5.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.
@@ -26,7 +26,7 @@ const generatedCAIP19ToCoingeckoMap = Object.values(adapters).reduce((acc, cur)
26
26
  ...acc,
27
27
  ...cur
28
28
  }));
29
- const invert = (data) => Object.entries(data).reduce((acc, [k, v]) => ({ ...acc, [v]: k }), {});
29
+ const invert = (data) => Object.entries(data).reduce((acc, [k, v]) => ((acc[v] = k), acc), {});
30
30
  const generatedCoingeckoToCAIP19Map = invert(generatedCAIP19ToCoingeckoMap);
31
31
  const coingeckoToCAIP19 = (id) => {
32
32
  const generated = generatedCoingeckoToCAIP19Map[id];
@@ -1,4 +1,5 @@
1
1
  import { ChainTypes, ContractTypes, NetworkTypes } from '@shapeshiftoss/types';
2
+ export declare type CAIP19 = string;
2
3
  export declare enum AssetNamespace {
3
4
  ERC20 = "erc20",
4
5
  ERC721 = "erc721",
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
+ // https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-19.md
2
3
  Object.defineProperty(exports, "__esModule", { value: true });
3
4
  exports.fromCAIP19 = exports.toCAIP19 = exports.AssetReference = exports.AssetNamespace = void 0;
4
- // https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-19.md
5
5
  const types_1 = require("@shapeshiftoss/types");
6
6
  const caip2_1 = require("./../caip2/caip2");
7
7
  var AssetNamespace;
@@ -1,4 +1,5 @@
1
1
  import { ChainTypes, NetworkTypes } from '@shapeshiftoss/types';
2
+ export declare type CAIP2 = string;
2
3
  export declare enum ChainNamespace {
3
4
  Ethereum = "eip155",
4
5
  Bitcoin = "bip122"
package/dist/index.d.ts CHANGED
@@ -2,3 +2,5 @@ import * as adapters from './adapters/coingecko';
2
2
  import * as caip2 from './caip2/caip2';
3
3
  import * as caip19 from './caip19/caip19';
4
4
  export { adapters, caip2, caip19 };
5
+ export { CAIP2 } from './caip2/caip2';
6
+ export { CAIP19 } from './caip19/caip19';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shapeshiftoss/caip",
3
- "version": "1.3.0",
3
+ "version": "1.5.0",
4
4
  "description": "CAIP Implementation",
5
5
  "homepage": "",
6
6
  "license": "MIT",
@@ -24,10 +24,12 @@
24
24
  "test": "jest test",
25
25
  "type-check": "tsc --project ./tsconfig.json --noEmit"
26
26
  },
27
- "dependencies": {
28
- "@shapeshiftoss/types": "^1.11.3"
27
+ "dependencies": {},
28
+ "peerDependencies": {
29
+ "@shapeshiftoss/types": "^1.13.1"
29
30
  },
30
31
  "devDependencies": {
32
+ "@shapeshiftoss/types": "^1.13.1",
31
33
  "axios": "^0.24.0"
32
34
  }
33
35
  }