@helium/currency-utils 0.11.16 → 0.12.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,15 +1,13 @@
1
- import { Cluster, Connection, PublicKey } from "@solana/web3.js";
1
+ import { Connection, PublicKey } from "@solana/web3.js";
2
2
  import BN from "bn.js";
3
3
  export declare const getBalance: ({ pubKey, mint, connection, }: {
4
4
  connection: Connection;
5
5
  pubKey: PublicKey;
6
6
  mint: PublicKey;
7
7
  }) => Promise<bigint>;
8
- export declare const PYTH_HERMES_URL = "https://hermes.pyth.network/";
9
- export declare const getOraclePrice: ({ tokenType }: {
10
- tokenType?: "HNT" | undefined;
11
- cluster?: Cluster | undefined;
12
- connection?: Connection | undefined;
8
+ export declare const getOraclePrice: ({ tokenType, connection, }: {
9
+ tokenType?: "HNT";
10
+ connection: Connection;
13
11
  }) => Promise<{
14
12
  priceMessage: {
15
13
  feedId: string;
@@ -17,9 +15,9 @@ export declare const getOraclePrice: ({ tokenType }: {
17
15
  emaPrice: BN;
18
16
  conf: BN;
19
17
  emaConf: BN;
20
- exponent: number;
21
- publishTime: number;
22
- prevPublishTime: unknown;
18
+ exponent: any;
19
+ publishTime: any;
20
+ prevPublishTime: any;
23
21
  };
24
22
  }>;
25
23
  //# sourceMappingURL=currencyUtils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"currencyUtils.d.ts","sourceRoot":"","sources":["../../../src/currencyUtils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAGjE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEvB,eAAO,MAAM,UAAU;gBAKT,UAAU;YACd,SAAS;UACX,SAAS;qBAUhB,CAAC;AAEF,eAAO,MAAM,eAAe,iCAAiC,CAAA;AAiB7D,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;EAgC1B,CAAC"}
1
+ {"version":3,"file":"currencyUtils.d.ts","sourceRoot":"","sources":["../../../src/currencyUtils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAGxD,OAAO,EAAE,MAAM,OAAO,CAAC;AAEvB,eAAO,MAAM,UAAU,GAAU,+BAI9B;IACD,UAAU,EAAE,UAAU,CAAC;IACvB,MAAM,EAAE,SAAS,CAAC;IAClB,IAAI,EAAE,SAAS,CAAC;CACjB,oBASA,CAAC;AAYF,eAAO,MAAM,cAAc,GAAU,4BAGlC;IACD,SAAS,CAAC,EAAE,KAAK,CAAC;IAClB,UAAU,EAAE,UAAU,CAAC;CACxB;;;;;;;;;;;EAsCA,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@helium/currency-utils",
3
- "version": "0.11.16",
3
+ "version": "0.12.0",
4
4
  "description": "Currency utilities",
5
5
  "homepage": "https://github.com/helium/helium-program-library#readme",
6
6
  "publishConfig": {
@@ -24,18 +24,19 @@
24
24
  "require": "./lib/cjs/index.js",
25
25
  "types": "./lib/types/src/index.d.ts"
26
26
  },
27
+ "dependencies": {
28
+ "@pythnetwork/pyth-solana-receiver": "^0.10.2",
29
+ "@solana/spl-token": "^0.3.8",
30
+ "@solana/web3.js": "^1.91.1",
31
+ "@helium/spl-utils": "^0.13.0"
32
+ },
33
+ "gitHead": "fc5dab2875863281ec468cf4a5a416c9696d102f",
27
34
  "scripts": {
28
35
  "format": "prettier --write \"src/**/*.{ts,tsx}\"",
29
36
  "precommit": "npx git-format-staged -f 'prettier --ignore-unknown --stdin --stdin-filepath \"{}\"' .",
30
37
  "clean": "npx shx mkdir -p lib && npx shx rm -rf lib",
31
38
  "package": "npx shx mkdir -p lib/cjs lib/esm",
32
- "prebuild": "npm run clean && npm run package"
33
- },
34
- "dependencies": {
35
- "@helium/spl-utils": "^0.11.16",
36
- "@pythnetwork/hermes-client": "^2.0.0",
37
- "@solana/spl-token": "^0.3.8",
38
- "@solana/web3.js": "^1.91.1"
39
- },
40
- "gitHead": "fc5dab2875863281ec468cf4a5a416c9696d102f"
41
- }
39
+ "prebuild": "npm run clean && npm run package",
40
+ "build": "tsc -b tsconfig.json"
41
+ }
42
+ }