@talismn/token-rates 0.1.1
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 +20 -0
- package/README.md +1 -0
- package/dist/TokenRates.d.ts +31 -0
- package/dist/TokenRates.js +11 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/package.json +50 -0
package/CHANGELOG.md
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
# @talismn/token-rates
|
2
|
+
|
3
|
+
## 0.1.1
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- Fixed publish config
|
8
|
+
- Updated dependencies
|
9
|
+
- @talismn/chaindata-provider@0.1.1
|
10
|
+
|
11
|
+
## 0.1.0
|
12
|
+
|
13
|
+
### Minor Changes
|
14
|
+
|
15
|
+
- 43c1a3a: Initial release
|
16
|
+
|
17
|
+
### Patch Changes
|
18
|
+
|
19
|
+
- Updated dependencies [43c1a3a]
|
20
|
+
- @talismn/chaindata-provider@0.1.0
|
package/README.md
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
# @talismn/token-rates
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import { TokenId } from "@talismn/chaindata-provider";
|
2
|
+
export declare type TokenRatesList = Record<TokenId, TokenRates>;
|
3
|
+
export declare type TokenRateCurrency = keyof TokenRates;
|
4
|
+
export declare type TokenRates = {
|
5
|
+
/** us dollar rate */
|
6
|
+
usd: number | null;
|
7
|
+
/** australian dollar rate */
|
8
|
+
aud: number | null;
|
9
|
+
/** new zealand dollar rate */
|
10
|
+
nzd: number | null;
|
11
|
+
/** canadian dollar rate */
|
12
|
+
cud: number | null;
|
13
|
+
/** hong kong dollar rate */
|
14
|
+
hkd: number | null;
|
15
|
+
/** euro rate */
|
16
|
+
eur: number | null;
|
17
|
+
/** british pound sterling rate */
|
18
|
+
gbp: number | null;
|
19
|
+
/** japanese yen rate */
|
20
|
+
jpy: number | null;
|
21
|
+
/** south korean won rate */
|
22
|
+
krw: number | null;
|
23
|
+
/** chinese yuan rate */
|
24
|
+
cny: number | null;
|
25
|
+
/** btc rate */
|
26
|
+
btc: number | null;
|
27
|
+
/** eth rate */
|
28
|
+
eth: number | null;
|
29
|
+
/** dot rate */
|
30
|
+
dot: number | null;
|
31
|
+
};
|
@@ -0,0 +1,11 @@
|
|
1
|
+
const coingeckoApiUrl = "https://api.coingecko.com/api/v3";
|
2
|
+
export {};
|
3
|
+
// // Some handy types from https://www.typescriptlang.org/docs/handbook/advanced-types.html#distributive-conditional-types
|
4
|
+
// export type FunctionPropertyNames<T> = {
|
5
|
+
// [K in keyof T]: T[K] extends Function ? K : never
|
6
|
+
// }[keyof T]
|
7
|
+
// export type FunctionProperties<T> = Pick<T, FunctionPropertyNames<T>>
|
8
|
+
// export type NonFunctionPropertyNames<T> = {
|
9
|
+
// [K in keyof T]: T[K] extends Function ? never : K
|
10
|
+
// }[keyof T]
|
11
|
+
// export type NonFunctionProperties<T> = Pick<T, NonFunctionPropertyNames<T>>
|
package/dist/index.d.ts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
export * from "./TokenRates";
|
package/dist/index.js
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
export * from "./TokenRates";
|
package/package.json
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
{
|
2
|
+
"name": "@talismn/token-rates",
|
3
|
+
"version": "0.1.1",
|
4
|
+
"author": "Talisman",
|
5
|
+
"homepage": "https://talisman.xyz",
|
6
|
+
"license": "UNLICENSED",
|
7
|
+
"publishConfig": {
|
8
|
+
"access": "public"
|
9
|
+
},
|
10
|
+
"repository": {
|
11
|
+
"directory": "packages/token-rates",
|
12
|
+
"type": "git",
|
13
|
+
"url": "https://github.com/talismansociety/talisman.git"
|
14
|
+
},
|
15
|
+
"main": "dist/index.js",
|
16
|
+
"types": "dist/index.d.ts",
|
17
|
+
"files": [
|
18
|
+
"/dist"
|
19
|
+
],
|
20
|
+
"engines": {
|
21
|
+
"node": ">=14"
|
22
|
+
},
|
23
|
+
"scripts": {
|
24
|
+
"dev": "tsc --watch --declarationMap",
|
25
|
+
"build": "tsc --declarationMap",
|
26
|
+
"build:packages:prod": "rm -rf dist && tsc",
|
27
|
+
"prepack": "yarn build:packages:prod",
|
28
|
+
"test": "jest",
|
29
|
+
"lint": "eslint . --max-warnings 0",
|
30
|
+
"clean": "rm -rf dist && rm -rf .turbo rm -rf node_modules"
|
31
|
+
},
|
32
|
+
"dependencies": {
|
33
|
+
"@talismn/chaindata-provider": "^0.1.1"
|
34
|
+
},
|
35
|
+
"devDependencies": {
|
36
|
+
"@talismn/eslint-config": "^0.0.0",
|
37
|
+
"@talismn/tsconfig": "^0.0.0",
|
38
|
+
"@types/jest": "^27.5.1",
|
39
|
+
"eslint": "^8.4.0",
|
40
|
+
"jest": "^28.1.0",
|
41
|
+
"ts-jest": "^28.0.2",
|
42
|
+
"typescript": "^4.6.4"
|
43
|
+
},
|
44
|
+
"eslintConfig": {
|
45
|
+
"root": true,
|
46
|
+
"extends": [
|
47
|
+
"@talismn/eslint-config"
|
48
|
+
]
|
49
|
+
}
|
50
|
+
}
|