From 117cd1eb67341cffc6af9a562153d557b89e08b3 Mon Sep 17 00:00:00 2001 From: dd <4daveid@gmail.com> Date: Tue, 22 Nov 2022 00:08:57 -0500 Subject: [PATCH 1/2] textDecode fix for react native --- .gitignore | 1 + package.json | 18 ++++++++++-------- src/bcs/deserializer.ts | 1 + 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index fcfb9b4..157f830 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ node_modules /logs coverage package-lock.json +/dist diff --git a/package.json b/package.json index 5aad4e9..e7a110a 100644 --- a/package.json +++ b/package.json @@ -39,6 +39,8 @@ "@types/tiny-secp256k1": "^2.0.1", "@typescript-eslint/eslint-plugin": "^5.25.0", "@typescript-eslint/parser": "^5.25.0", + "assert": "^2.0.0", + "dotenv": "16.0.2", "eslint": "^8.20.0", "eslint-config-airbnb-base": "^15.0.0", "eslint-config-airbnb-typescript": "^17.0.0", @@ -48,19 +50,20 @@ "jest": "^27.5.1", "lint-staged": "^13.0.3", "node-fetch": "^2.6.7", + "openapi-typescript-codegen": "https://github.com/aptos-labs/openapi-typescript-codegen/releases/download/v0.23.0-p4/openapi-typescript-codegen-v0.23.0-p4.tgz", "prettier": "^2.7.1", "ts-jest": "^27.1.5", "ts-loader": "^9.3.0", "ts-node": "^10.8.0", + "tsup": "6.2.3", "typedoc": "^0.23.9", "typedoc-plugin-markdown": "^3.13.4", - "typescript": "^4.6.4", - "dotenv": "16.0.2", - "openapi-typescript-codegen": "https://github.com/aptos-labs/openapi-typescript-codegen/releases/download/v0.23.0-p4/openapi-typescript-codegen-v0.23.0-p4.tgz", - "tsup": "6.2.3" + "typescript": "^4.6.4" }, "dependencies": { "@microsoft/eslint-formatter-sarif": "^2.1.7", + "@noble/hashes": "1.1.2", + "@polkadot/x-textdecoder": "^10.1.13", "@scure/bip32": "^1.0.1", "@scure/bip39": "^1.0.0", "axios": "^0.26.1", @@ -68,13 +71,12 @@ "buffer": "^6.0.3", "cross-fetch": "^3.1.5", "ed25519-hd-key": "^1.3.0", + "form-data": "4.0.0", "js-sha3": "^0.8.0", "node-cache": "^5.1.2", "pre-commit": "^1.2.2", "tweetnacl": "^1.0.3", - "typescript-memoize": "^1.1.0", - "@noble/hashes": "1.1.2", - "form-data": "4.0.0" + "typescript-memoize": "^1.1.0" }, - "version": "1.2.20" + "version": "1.2.21" } diff --git a/src/bcs/deserializer.ts b/src/bcs/deserializer.ts index 239d246..cccecd1 100644 --- a/src/bcs/deserializer.ts +++ b/src/bcs/deserializer.ts @@ -4,6 +4,7 @@ /* eslint-disable no-bitwise */ import { MAX_U32_NUMBER } from "./consts"; import { Bytes, Uint128, Uint16, Uint32, Uint64, Uint8 } from "./types"; +import {TextDecoder} from '@polkadot/x-textdecoder'; export class Deserializer { private buffer: ArrayBuffer; From 572859e975603c64bba288fb69c65fcdd91ae3ba Mon Sep 17 00:00:00 2001 From: dd <4daveid@gmail.com> Date: Tue, 22 Nov 2022 20:54:09 -0500 Subject: [PATCH 2/2] fixed readme --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b440185..65ebc7d 100644 --- a/README.md +++ b/README.md @@ -6,11 +6,17 @@ web3.js library for Aptos @martiandao/aptos-web3-bip44.js is an npm module which allows developers to communicate with the Aptos core code. This module is built on top of [Typescript SDK of Aptos](https://github.com/aptos-labs/aptos-core/tree/main/ecosystem/typescript/sdk). +⚠️ Note: This library is still under development # Import ``` -npm i @martiandao/aptos-web3-bip44.js.js +npm i @martiandao/aptos-web3-bip44.js ``` +or +``` +yarn add @martiandao/aptos-web3-bip44.js +``` + Checkout the [documents page](https://github.com/martian-dao/aptos-web3.js/blob/main/docs/classes/WalletClient.md) for the function definitions. # Usage Example Wallet