lunesjs 1.5.16-web → 1.6.0

Sign up to get free protection for your applications and to get access to all the features.
package/README.md CHANGED
@@ -1,48 +1,22 @@
1
- <div align="center">
2
-
3
- <a href="https://lunes.io">
4
- <img alt="Lunes" src="static/img/jslogo.png" width="100" />
5
- </a>
6
-
7
1
  # LunesJS
8
2
 
9
- - Built from the WebAssembly Library for communication with nodes on the mainnet or testnet of the lunes-blockchain network Allows automation of asset submission, final issuance of token reissue, leasing, registration and creation of a new wallet.
3
+ 📦 Build based in the WebAssembly by Rust using [LunesRs](https://github.com/lunes-platform/lunesrs) for communication with nodes on the mainnet or testnet of the lunes-blockchain network Allows automation of asset submission, final issuance of token reissue, leasing, registration and creation of a new wallet.
10
4
 
11
5
  [![Deploy](https://github.com/lunes-platform/lunesjs/actions/workflows/deploy.yml/badge.svg?branch=main)](https://github.com/lunes-platform/lunesjs/actions/workflows/deploy.yml)
12
- [![Test](https://github.com/lunes-platform/lunesjs/actions/workflows/test.yml/badge.svg)](https://github.com/lunes-platform/lunesjs/actions/workflows/test.yml)
13
- [![Stars](https://img.shields.io/github/stars/lunes-platform/lunesjs?color=blueviolet)](https://github.com/lunes-platform/lunesjs/stargazers)
14
- [![Release](https://img.shields.io/github/v/release/lunes-platform/lunesjs)](https://github.com/lunes-platform/lunesjs/releases)
15
- [![License](https://img.shields.io/github/license/lunes-platform/lunesjs?color=blueviolet)](LICENSE)
16
-
17
- [![Issues](https://img.shields.io/github/issues/lunes-platform/lunesjs)](https://github.com/lunes-platform/lunesjs/issues)
18
- [![CommitActivity](https://img.shields.io/github/commit-activity/m/lunes-platform/lunesjs?color=blueviolet)](https://github.com/lunes-platform/lunesjs/pulse)
19
- [![Forks](https://img.shields.io/github/forks/lunes-platform/lunesjs?color=blueviolet)](https://github.com/lunes-platform/lunesjs/network/members)
20
- [![Contributors](https://flat.badgen.net/github/contributors/lunes-platform/lunesjs?color=purple)](https://github.com/lunes-platform/lunesjs/graphs/contributors)
21
- [![Branches](https://badgen.net/github/branches/lunes-platform/lunesjs?color=blueviolet)](https://github.com/lunes-platform/lunesjs/branches)
22
- [![Watchers](https://img.shields.io/github/watchers/lunes-platform/lunesjs.svg?color=blueviolet)](https://github.com/lunes-platform/lunesjs/watchers)
23
- [![Followers](https://img.shields.io/github/followers/lunes-platform.svg?style=social&label=Follow&maxAge=2592000?color=blueviolet)](https://github.com/lunes-platform?tab=followers)
24
- [![Website](https://img.shields.io/website?url=https%3A%2F%2Flunes.io%2F)](https://lunes.io)
25
- ![PullRequest](https://img.shields.io/github/issues-pr/lunes-platform/lunesjs?color=blueviolet)
26
- ![PullRequestClosed](https://img.shields.io/github/issues-pr-closed/lunes-platform/lunesjs?color=blueviolet)
27
- [![GitHub](https://badgen.net/badge/icon/github?icon=github&label&color=purple)](https://github.com/lunes-platform)
28
- ![ClosedIssue](https://flat.badgen.net/github/closed-issues/lunes-platform/lunesjs?color=red)
29
-
30
- <a href="https://twitter.com/LunesPlatform" target="_blank">
31
- <img alt="Twitter: Lunes Platform" src="https://badgen.net/twitter/follow/lunesplatform?icon=twitter&label=follow @LunesPlatform&color=blue" />
32
- </a>
33
- <a href="https://t.me/LunesPlatformPT" target="_blank">
34
- <img alt="Telegram" src="https://badgen.net/badge/icon/Lunes%20Platform?icon=telegram&label=Telegram&color=blue"/>
35
- </a>
36
-
37
- </div>
38
-
39
- ## Changelog
40
-
41
- The changelog process for this project is described [here](CHANGELOG.md).
6
+ [![Test](https://github.com/lunes-platform/lunesjs/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/lunes-platform/lunesjs/actions/workflows/test.yml)
7
+ [![Lint](https://github.com/lunes-platform/lunesjs/actions/workflows/lint.yml/badge.svg?branch=main)](https://github.com/lunes-platform/lunesjs/actions/workflows/lint.yml)
8
+ ![npm](https://img.shields.io/npm/v/lunesjs)
9
+
10
+ ![npm](https://img.shields.io/npm/dm/lunesjs)
11
+ ![GitHub last commit](https://img.shields.io/github/last-commit/lunes-platform/lunesjs)
12
+ ![GitHub commit activity](https://img.shields.io/github/commit-activity/m/lunes-platform/lunesjs)
13
+
14
+ ![NPM](https://img.shields.io/npm/l/lunesjs)
15
+ ![Discord](https://img.shields.io/discord/958424925453058158)
42
16
 
43
17
  ## Documentation
44
18
 
45
- The LunesJS documentations is hosted at [ Telescope ](https://blockchain.lunes.io/telescope/)
19
+ The `LunesJS` documentations is hosted at [ Telescope ](https://github.io/telescope/)
46
20
 
47
21
  ## Contributing
48
22
 
package/lib/index.d.ts CHANGED
@@ -1,15 +1,15 @@
1
- import { transferTokenFactory } from "./client/transactions/transfer/service.transfer";
2
- import { accountFactory } from "./client/wallet/service.account";
1
+ import { transferTokenFactory } from "./tx/transfer/service.transfer";
2
+ import { walletFactory } from "./wallet/wallet.service";
3
3
  declare const _default: {
4
4
  transferTokenFactory: typeof transferTokenFactory;
5
- accountFactory: typeof accountFactory;
5
+ walletFactory: typeof walletFactory;
6
6
  cryptoUtils: {
7
- fromExistingSeed: (seed: string, nonce: number, chain: import("./client/wallet/wallet.types").WalletTypes.Chain) => import("./client/wallet/wallet.types").IAccount;
8
- fromPrivateKey: (privateKey: string, chain: import("./client/wallet/wallet.types").WalletTypes.Chain) => import("./client/wallet/wallet.types").IAccount;
9
- fromPublicKey: (publicKey: string, chain: import("./client/wallet/wallet.types").WalletTypes.Chain) => import("./client/wallet/wallet.types").IAccount;
10
- fromAddress: (address: string, chain: import("./client/wallet/wallet.types").WalletTypes.Chain) => import("./client/wallet/wallet.types").IAccount;
11
- fromNewSeed: (nWords: number, nonce: number, chain: import("./client/wallet/wallet.types").WalletTypes.Chain) => import("./client/wallet/wallet.types").IAccount;
12
- validateAddress: (address: string, chain: import("./client/wallet/wallet.types").WalletTypes.Chain) => boolean;
7
+ fromExistingSeed: (seed: string, nonce: number, chain: import("./wallet/wallet.types").WalletTypes.Chain) => import("./wallet/wallet.types").IAccount;
8
+ fromPrivateKey: (privateKey: string, chain: import("./wallet/wallet.types").WalletTypes.Chain) => import("./wallet/wallet.types").IAccount;
9
+ fromPublicKey: (publicKey: string, chain: import("./wallet/wallet.types").WalletTypes.Chain) => import("./wallet/wallet.types").IAccount;
10
+ fromAddress: (address: string, chain: import("./wallet/wallet.types").WalletTypes.Chain) => import("./wallet/wallet.types").IAccount;
11
+ fromNewSeed: (nWords: number, nonce: number, chain: import("./wallet/wallet.types").WalletTypes.Chain) => import("./wallet/wallet.types").IAccount;
12
+ validateAddress: (address: string, chain: import("./wallet/wallet.types").WalletTypes.Chain) => boolean;
13
13
  validateSignature: (publicKey: string, message: string, signature: string) => boolean;
14
14
  fastSignature: (privateKey: string, message: string) => string;
15
15
  fullSignature: (privateKey: string, message: string) => string;
package/lib/index.js CHANGED
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const service_transfer_1 = require("./client/transactions/transfer/service.transfer");
4
- const service_account_1 = require("./client/wallet/service.account");
3
+ const service_transfer_1 = require("./tx/transfer/service.transfer");
4
+ const wallet_service_1 = require("./wallet/wallet.service");
5
5
  const crypto_1 = require("./utils/crypto");
6
6
  exports.default = {
7
7
  transferTokenFactory: service_transfer_1.transferTokenFactory,
8
- accountFactory: service_account_1.accountFactory,
8
+ walletFactory: wallet_service_1.walletFactory,
9
9
  cryptoUtils: crypto_1.cryptoUtils
10
10
  };
@@ -36,7 +36,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
36
36
  };
37
37
  Object.defineProperty(exports, "__esModule", { value: true });
38
38
  const transactions_types_1 = require("../transactions.types");
39
- const crypto_1 = require("../../../utils/crypto");
39
+ const crypto_1 = require("../../utils/crypto");
40
40
  const wasm = __importStar(require("lunesrs"));
41
41
  const axios_1 = __importDefault(require("axios"));
42
42
  const validator = {
@@ -1,4 +1,4 @@
1
- import { IAccount, WalletTypes } from "../client/wallet/wallet.types";
1
+ import { IAccount, WalletTypes } from "../wallet/wallet.types";
2
2
  export declare const cryptoUtils: {
3
3
  fromExistingSeed: (seed: string, nonce: number, chain: WalletTypes.Chain) => IAccount;
4
4
  fromPrivateKey: (privateKey: string, chain: WalletTypes.Chain) => IAccount;
@@ -27,7 +27,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.cryptoUtils = void 0;
30
- const constants_1 = __importDefault(require("../client/wallet/constants"));
30
+ const constants_1 = __importDefault(require("../wallet/constants"));
31
31
  const wasm = __importStar(require("lunesrs"));
32
32
  exports.cryptoUtils = {
33
33
  fromExistingSeed: (seed, nonce, chain) => {
File without changes
File without changes
@@ -8,7 +8,7 @@ declare class Account implements IAccount {
8
8
  seed: string;
9
9
  constructor(wallet: IAccount);
10
10
  }
11
- export declare function accountFactory({ privateKey, publicKey, address, nWords, chain, nonce, seed }?: {
11
+ export declare function walletFactory({ privateKey, publicKey, address, nWords, chain, nonce, seed }?: {
12
12
  privateKey?: string;
13
13
  publicKey?: string;
14
14
  address?: string;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.accountFactory = void 0;
4
- const crypto_1 = require("../../utils/crypto");
3
+ exports.walletFactory = void 0;
4
+ const crypto_1 = require("../utils/crypto");
5
5
  class Account {
6
6
  constructor(wallet) {
7
7
  this.privateKey = wallet.privateKey;
@@ -12,7 +12,7 @@ class Account {
12
12
  this.seed = wallet.seed;
13
13
  }
14
14
  }
15
- function accountFactory({ privateKey, publicKey, address, nWords, chain, nonce, seed } = {}) {
15
+ function walletFactory({ privateKey, publicKey, address, nWords, chain, nonce, seed } = {}) {
16
16
  if (seed != undefined) {
17
17
  return new Account(Object.assign({}, crypto_1.cryptoUtils.fromExistingSeed(seed, nonce != undefined ? nonce : 0, chain != undefined ? chain : 1)));
18
18
  }
@@ -29,4 +29,4 @@ function accountFactory({ privateKey, publicKey, address, nWords, chain, nonce,
29
29
  return new Account(Object.assign({}, crypto_1.cryptoUtils.fromNewSeed(nWords != undefined ? nWords : 12, nonce != undefined ? nonce : 0, chain != undefined ? chain : 1)));
30
30
  }
31
31
  }
32
- exports.accountFactory = accountFactory;
32
+ exports.walletFactory = walletFactory;
File without changes
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lunesjs",
3
- "version": "1.5.16-web",
3
+ "version": "1.6.0",
4
4
  "description": "Library for communication with nodes in mainnet or testnet of the lunes-blockchain network",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -23,7 +23,7 @@
23
23
  "fmt": "prettier -w .",
24
24
  "fmtc": "prettier -c",
25
25
  "t": "yarn jest",
26
- "build": "yarn install && tsc"
26
+ "build": "tsc"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@types/jest": "^27.0.3",
@@ -35,6 +35,6 @@
35
35
  },
36
36
  "dependencies": {
37
37
  "axios": "^0.26.1",
38
- "lunesrs": "^1.8.4-web"
38
+ "lunesrs": "^1.9.1"
39
39
  }
40
40
  }