juno-network 0.1.1 → 0.1.4

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 +72 -4
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -5,20 +5,88 @@
5
5
  </p>
6
6
 
7
7
  <p align="center" width="100%">
8
- <a href="https://github.com/CosmosContracts/typescript/actions/workflows/run-tests.yml">
8
+ <!-- <a href="https://github.com/CosmosContracts/typescript/actions/workflows/run-tests.yml">
9
9
  <img height="20" src="https://github.com/CosmosContracts/typescript/actions/workflows/run-tests.yml/badge.svg" />
10
- </a>
10
+ </a> -->
11
11
  <a href="https://github.com/CosmosContracts/typescript/blob/main/LICENSE"><img height="20" src="https://img.shields.io/badge/license-MIT-blue.svg"></a>
12
12
  <a href="https://www.npmjs.com/package/juno-network"><img height="20" src="https://img.shields.io/github/package-json/v/CosmosContracts/typescript?filename=packages%2Fjuno-network%2Fpackage.json"></a>
13
13
  </p>
14
14
 
15
- JunoSwap smart contract bindings
16
-
15
+ TS library with Cosmos SDK and JunoSwap smart contracts.
17
16
 
18
17
  ```
19
18
  npm install juno-network
20
19
  ```
21
20
 
21
+ ```js
22
+ import { juno } from 'juno-network';
23
+
24
+ const main = async () => {
25
+ const client = await juno.ClientFactory.createLCDClient({ restEndpoint: REST_ENDPOINT });
26
+
27
+ // now you can query the modules
28
+ const balance = await client.cosmos.bank.v1beta1.allBalances({ address: 'juno1addresshere' });
29
+ };
30
+ ```
31
+
32
+ ### IBC Messages
33
+
34
+ ```js
35
+ import { ibc } from 'juno-network';
36
+
37
+ const {
38
+ transfer
39
+ } = ibc.applications.transfer.v1.MessageComposer.withTypeUrl
40
+ ```
41
+
42
+ ### Cosmos Messages
43
+
44
+ ```js
45
+ import { cosmos } from 'juno-network';
46
+
47
+ const {
48
+ fundCommunityPool,
49
+ setWithdrawAddress,
50
+ withdrawDelegatorReward,
51
+ withdrawValidatorCommission
52
+ } = cosmos.distribution.v1beta1.MessageComposer.fromPartial;
53
+
54
+ const {
55
+ multiSend,
56
+ send
57
+ } = cosmos.bank.v1beta1.MessageComposer.fromPartial;
58
+
59
+ const {
60
+ beginRedelegate,
61
+ createValidator,
62
+ delegate,
63
+ editValidator,
64
+ undelegate
65
+ } = cosmos.staking.v1beta1.MessageComposer.fromPartial;
66
+
67
+ const {
68
+ deposit,
69
+ submitProposal,
70
+ vote,
71
+ voteWeighted
72
+ } = cosmos.gov.v1beta1.MessageComposer.fromPartial;
73
+ ```
74
+
75
+ ### CosmWasm Messages
76
+
77
+ ```js
78
+ import { cosmwasm } from "osmojs";
79
+
80
+ const {
81
+ clearAdmin,
82
+ executeContract,
83
+ instantiateContract,
84
+ migrateContract,
85
+ storeCode,
86
+ updateAdmin
87
+ } = cosmwasm.wasm.v1.MessageComposer.withTypeUrl;
88
+ ```
89
+
22
90
  ## Credits
23
91
 
24
92
  Code built with the help of these related projects:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "juno-network",
3
- "version": "0.1.1",
3
+ "version": "0.1.4",
4
4
  "description": "juno",
5
5
  "author": "Dan Lynch <pyramation@gmail.com>",
6
6
  "homepage": "https://github.com/CosmosContracts/typescript#readme",
@@ -90,5 +90,5 @@
90
90
  "@tanstack/react-query": "^4.1.3",
91
91
  "protobufjs": "^6.11.2"
92
92
  },
93
- "gitHead": "0350293760f440721ee2fe97e9351422e9192f39"
93
+ "gitHead": "7e61827e9a0d0160139b08c6c0cf4d8402de5861"
94
94
  }