coreum-js 2.5.4 → 2.5.5

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.
Files changed (2) hide show
  1. package/README.md +7 -7
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -28,12 +28,12 @@ npm i coreum-js
28
28
  ## Usage
29
29
 
30
30
  ```typescript
31
- import Client from "coreum-js";
31
+ import { Client } from "coreum-js";
32
32
 
33
33
  // Choose the network to connect. The library will use default nodes for this.
34
34
  const network = "mainnet" | "testnet" | "devnet";
35
35
 
36
- const mantle: Client = new Client({ network: network });
36
+ const coreum: Client = new Client({ network: network });
37
37
 
38
38
  const connectOptions = {
39
39
  withWS: true | false, // optional
@@ -41,7 +41,7 @@ const connectOptions = {
41
41
  // connect() will only connect for querying purposes, it won't sign any transaction.
42
42
  // In order to sign transactions, you need to connect with connectWithExtension (currently only working with Keplr)
43
43
  // Or with connectWithMnemonic, if choose connectWithMnemonic, DO NOT USE ON CLIENT SIDE.
44
- await mantle.connect(connectOptions); // connectWithExtension || connectWithMnemonic
44
+ await coreum.connect(connectOptions); // connectWithExtension || connectWithMnemonic
45
45
  // If withWS is true, the client will also create and connect to the Coreum Websocket.
46
46
 
47
47
  // Client exposes different QueryClients to query the Coreum Blockchain with ease.
@@ -58,20 +58,20 @@ const {
58
58
  feegrant,
59
59
  nftbeta,
60
60
  tx,
61
- } = mantle.queryClients;
61
+ } = coreum.queryClients;
62
62
 
63
63
  // Documentation for each query client can be found here
64
64
  // https://docs.coreum.dev/api/api.html
65
65
 
66
66
  // You can get the TX Fee for any transactions with getTxFee
67
67
  const msgs: readonly EncodeObject[];
68
- const txFee = await mantle.getTxFee(msgs);
68
+ const txFee = await coreum.getTxFee(msgs);
69
69
 
70
70
  // Sign and broadcast the Transaction
71
- const response = await mantle.sendTx(msgs);
71
+ const response = await coreum.sendTx(msgs);
72
72
 
73
73
  // Subscribe to Blockchain events
74
- const subscription = await mantle.subscribeToEvent($EVENT);
74
+ const subscription = await coreum.subscribeToEvent($EVENT);
75
75
 
76
76
  // Event
77
77
  subscription.events.on($EVENT, ({ events, data }) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "coreum-js",
3
- "version": "2.5.4",
3
+ "version": "2.5.5",
4
4
  "description": "JS/TS Library to to easily make use of the Coreum Blockchain",
5
5
  "main": "dist/main/index.js",
6
6
  "module": "dist/module/index.js",