antelopeql 1.1.1 → 1.1.2

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,5 +1,5 @@
1
- import legacy_to_public_key from "eosio-ecc/legacy_to_public_key.mjs";
2
- import validate_public_key from "eosio-ecc/validate_public_key.mjs";
1
+ import legacy_to_public_key from "antelope-ecc/legacy_to_public_key.mjs";
2
+ import validate_public_key from "antelope-ecc/validate_public_key.mjs";
3
3
  import { GraphQLScalarType } from "graphql";
4
4
 
5
5
  const public_key_type = new GraphQLScalarType({
@@ -17,8 +17,12 @@ const public_key_type = new GraphQLScalarType({
17
17
  async parseValue(public_key) {
18
18
  if (public_key == "") return "";
19
19
 
20
- const { valid, message } = await validate_public_key(public_key);
21
- if (!valid) throw new RangeError(message);
20
+ try {
21
+ await validate_public_key(public_key);
22
+ } catch (err) {
23
+ throw new RangeError(err.message);
24
+ }
25
+
22
26
  return public_key;
23
27
  }
24
28
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "antelopeql",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "A GraphQL implementation for interacting with Antelope based blockchains.",
5
5
  "repository": "github:pur3miish/antelopeql",
6
6
  "bugs": "https://github.com/pur3miish/antelopeql/issues",
@@ -91,8 +91,8 @@
91
91
  "graphql": "^16.6.0"
92
92
  },
93
93
  "dependencies": {
94
+ "antelope-ecc": "^1.0.0",
94
95
  "base58-js": "^2.0.0",
95
- "eosio-ecc": "^1.0.1",
96
96
  "eosio-wasm-js": "^4.0.1",
97
97
  "ripemd160-js": "*"
98
98
  }
@@ -1,6 +1,6 @@
1
- import private_key_to_legacy from "eosio-ecc/private_key_to_legacy.mjs";
2
- import get_public_key from "eosio-ecc/public_key_from_private.mjs";
3
- import sign_packed_txn from "eosio-ecc/sign_packed_txn.mjs";
1
+ import private_key_to_legacy from "antelope-ecc/private_key_to_legacy.mjs";
2
+ import get_public_key from "antelope-ecc/public_key_from_private.mjs";
3
+ import sign_packed_txn from "antelope-ecc/sign_packed_txn.mjs";
4
4
  import { GraphQLError, GraphQLNonNull } from "graphql";
5
5
 
6
6
  import configuration_type from "./graphql_input_types/configuration.mjs";
package/readme.md CHANGED
@@ -36,7 +36,7 @@ For [Deno.js](https://deno.land), to install [`AntelopeQL`](https://deno.land/x/
36
36
  "isomorphic-secp256k1-js/": "https://deno.land/x/secp256k1js/",
37
37
  "ripemd160-js/": "https://deno.land/x/ripemd160js@v2.0.3/",
38
38
  "eosio-wasm-js/": "https://deno.land/x/eosio_wasm_js/",
39
- "eosio-ecc/": "https://deno.land/x/eosio_ecc/",
39
+ "antelope-ecc/": "https://deno.land/x/eosio_ecc/",
40
40
  "graphql": "https://cdn.skypack.dev/graphql"
41
41
  }
42
42
  }