juno-network 0.1.6 → 0.1.9
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.
- package/README.md +51 -16
- package/main/index.js +5 -1
- package/module/index.js +9 -1
- package/package.json +2 -2
package/README.md
CHANGED
@@ -33,8 +33,59 @@ const main = async () => {
|
|
33
33
|
|
34
34
|
### JunoSwap contracts
|
35
35
|
|
36
|
+
## clients
|
37
|
+
|
36
38
|
```js
|
37
39
|
import { contracts } from 'juno-network';
|
40
|
+
const {
|
41
|
+
JunoSwap: {
|
42
|
+
JunoSwapClient,
|
43
|
+
JunoSwapQueryClient
|
44
|
+
}
|
45
|
+
} = contracts;
|
46
|
+
```
|
47
|
+
|
48
|
+
## Queries
|
49
|
+
|
50
|
+
```js
|
51
|
+
const queries = new JunoSwapQueryClient(
|
52
|
+
cosmwasmClient,
|
53
|
+
contractAddress
|
54
|
+
);
|
55
|
+
const amount = await queries.token1ForToken2Price({
|
56
|
+
token1Amount
|
57
|
+
});
|
58
|
+
```
|
59
|
+
## Mutations
|
60
|
+
|
61
|
+
```js
|
62
|
+
const client = new JunoSwapClient(
|
63
|
+
signingClient,
|
64
|
+
sender,
|
65
|
+
contractAddress
|
66
|
+
);
|
67
|
+
|
68
|
+
await client.addLiquidity({
|
69
|
+
maxToken2,
|
70
|
+
minLiquidity,
|
71
|
+
token1Amount,
|
72
|
+
expiration
|
73
|
+
});
|
74
|
+
```
|
75
|
+
|
76
|
+
### CosmWasm Messages
|
77
|
+
|
78
|
+
```js
|
79
|
+
import { cosmwasm } from "juno-network";
|
80
|
+
|
81
|
+
const {
|
82
|
+
clearAdmin,
|
83
|
+
executeContract,
|
84
|
+
instantiateContract,
|
85
|
+
migrateContract,
|
86
|
+
storeCode,
|
87
|
+
updateAdmin
|
88
|
+
} = cosmwasm.wasm.v1.MessageComposer.withTypeUrl;
|
38
89
|
```
|
39
90
|
|
40
91
|
### IBC Messages
|
@@ -79,22 +130,6 @@ const {
|
|
79
130
|
voteWeighted
|
80
131
|
} = cosmos.gov.v1beta1.MessageComposer.fromPartial;
|
81
132
|
```
|
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
|
-
|
98
133
|
## Credits
|
99
134
|
|
100
135
|
Code built with the help of these related projects:
|
package/main/index.js
CHANGED
@@ -15,4 +15,8 @@ Object.keys(_codegen).forEach(function (key) {
|
|
15
15
|
return _codegen[key];
|
16
16
|
}
|
17
17
|
});
|
18
|
-
});
|
18
|
+
});
|
19
|
+
// contracts.JunoSwap.JunoSwapClient
|
20
|
+
var _contracts$JunoSwap = _codegen.contracts.JunoSwap,
|
21
|
+
JunoSwapClient = _contracts$JunoSwap.JunoSwapClient,
|
22
|
+
JunoSwapQueryClient = _contracts$JunoSwap.JunoSwapQueryClient;
|
package/module/index.js
CHANGED
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "juno-network",
|
3
|
-
"version": "0.1.
|
3
|
+
"version": "0.1.9",
|
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": "
|
93
|
+
"gitHead": "8d8248828646c2e6109eb5c429d9b037dc8a1d1d"
|
94
94
|
}
|