juno-network 0.1.1 → 0.1.6

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 +80 -4
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -5,20 +5,96 @@
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
+ ### Cosmos SDK clients
22
+
23
+ ```js
24
+ import { juno } from 'juno-network';
25
+
26
+ const main = async () => {
27
+ const client = await juno.ClientFactory.createLCDClient({ restEndpoint: REST_ENDPOINT });
28
+
29
+ // now you can query the modules
30
+ const balance = await client.cosmos.bank.v1beta1.allBalances({ address: 'juno1addresshere' });
31
+ };
32
+ ```
33
+
34
+ ### JunoSwap contracts
35
+
36
+ ```js
37
+ import { contracts } from 'juno-network';
38
+ ```
39
+
40
+ ### IBC Messages
41
+
42
+ ```js
43
+ import { ibc } from 'juno-network';
44
+
45
+ const {
46
+ transfer
47
+ } = ibc.applications.transfer.v1.MessageComposer.withTypeUrl
48
+ ```
49
+
50
+ ### Cosmos Messages
51
+
52
+ ```js
53
+ import { cosmos } from 'juno-network';
54
+
55
+ const {
56
+ fundCommunityPool,
57
+ setWithdrawAddress,
58
+ withdrawDelegatorReward,
59
+ withdrawValidatorCommission
60
+ } = cosmos.distribution.v1beta1.MessageComposer.fromPartial;
61
+
62
+ const {
63
+ multiSend,
64
+ send
65
+ } = cosmos.bank.v1beta1.MessageComposer.fromPartial;
66
+
67
+ const {
68
+ beginRedelegate,
69
+ createValidator,
70
+ delegate,
71
+ editValidator,
72
+ undelegate
73
+ } = cosmos.staking.v1beta1.MessageComposer.fromPartial;
74
+
75
+ const {
76
+ deposit,
77
+ submitProposal,
78
+ vote,
79
+ voteWeighted
80
+ } = cosmos.gov.v1beta1.MessageComposer.fromPartial;
81
+ ```
82
+
83
+ ### CosmWasm Messages
84
+
85
+ ```js
86
+ import { cosmwasm } from "osmojs";
87
+
88
+ const {
89
+ clearAdmin,
90
+ executeContract,
91
+ instantiateContract,
92
+ migrateContract,
93
+ storeCode,
94
+ updateAdmin
95
+ } = cosmwasm.wasm.v1.MessageComposer.withTypeUrl;
96
+ ```
97
+
22
98
  ## Credits
23
99
 
24
100
  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.6",
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": "639aa01122cc9a603f28c8cb76e014e2c1405dbf"
94
94
  }