Skip to content

Commit 2cbdef9

Browse files
author
Gil Amran
committed
Fixed types issues
1 parent 0ccec49 commit 2cbdef9

File tree

6 files changed

+6
-4
lines changed

6 files changed

+6
-4
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "orbs-client-sdk",
3-
"version": "1.3.1",
3+
"version": "1.3.2",
44
"description": "orbs-client-sdk",
55
"main": "dist/orbs-client-sdk.js",
66
"browser": "dist/orbs-client-sdk-web.js",

src/crypto/Keys.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
*/
88

99
import elliptic from "elliptic";
10+
import getRandomValues from "get-random-values";
1011

1112
export const ED25519_PUBLIC_KEY_SIZE_BYTES = 32;
1213
export const ED25519_PRIVATE_KEY_SIZE_BYTES = 64;
@@ -18,7 +19,6 @@ export interface Ed25519KeyPair {
1819

1920
export function generateEd25519Key(): Ed25519KeyPair {
2021
// generate secure random
21-
const getRandomValues = require("get-random-values");
2222
const secureRandom = new Uint8Array(ED25519_PRIVATE_KEY_SIZE_BYTES - ED25519_PUBLIC_KEY_SIZE_BYTES);
2323
getRandomValues(secureRandom);
2424

src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* The above notice should be included in all copies or substantial portions of the software.
77
*/
88

9-
export { createAccount, addressToBytes, bytesToAddress, Account } from "./orbs/Account";
9+
export { createAccount, addressToBytes, bytesToAddress } from "./orbs/Account";
1010
export { ExecutionResult } from "./codec/ExecutionResult";
1111
export { RequestStatus } from "./codec/RequestStatus";
1212
export { Client, PROCESSOR_TYPE_NATIVE, PROCESSOR_TYPE_JAVASCRIPT } from "./orbs/Client";

src/lib.ts

+1
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@
88

99
export * from "./index";
1010
export { Argument, ArgUint32, ArgUint64, ArgString, ArgBytes } from "./codec/Arguments";
11+
export { Account } from "./orbs/Account";

src/types/get-random-values.d.ts

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
declare module 'get-random-values';

tsconfig-for-types.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"downlevelIteration": true,
1212
"emitDeclarationOnly": true,
1313
"lib": ["esnext"],
14-
"types": ["node", "jest"]
14+
"types": []
1515
},
1616
"include": ["src/lib.ts", "src/types/**/*.ts"]
1717
}

0 commit comments

Comments
 (0)