You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* docs: Update 01-go-client.md comments broadcasting a transaction
to create a post and store the response in txResp
* docs: Update 01-go-client.md
Adding description on running the client app from a remote/diff machine and also a small intro to test keyring
* docs: Update 01-go-client.md
adding the test keyring backend and define the path
* docs:Update 01-go-client.md update
documentation changes, changed the dependency to the latest cli stable version,
new section creating a client for the blog from a remote location (node and client not on the same system)
* docs:Update 01-go-client.md
documentation update of the client creation including new section for remote client require from github.com/user/blog and keyring backend example with test
* docs: Update 01-go-client.md
changed the word node to repository
* Update docs/versioned_docs/version-v0.27.2/03-clients/01-go-client.md
Co-authored-by: Danny <[email protected]>
* Apply suggestions from code review
Co-authored-by: Danny <[email protected]>
---------
Co-authored-by: Danilo Pantani <[email protected]>
Co-authored-by: Danny <[email protected]>
Co-authored-by: Danny <[email protected]>
Copy file name to clipboardexpand all lines: docs/versioned_docs/version-v0.27.2/03-clients/01-go-client.md
+66-3
Original file line number
Diff line number
Diff line change
@@ -77,11 +77,11 @@ To import dependencies for your package, you can add the following code to the
77
77
```text title="blogclient/go.mod"
78
78
module blogclient
79
79
80
-
go 1.19
80
+
go 1.20
81
81
82
82
require (
83
83
blog v0.0.0-00010101000000-000000000000
84
-
github.com/ignite/cli v0.25.2
84
+
github.com/ignite/cli v0.27.2
85
85
)
86
86
87
87
replace blog => ../blog
@@ -94,7 +94,7 @@ Your package will import two dependencies:
94
94
*`ignite` for the `cosmosclient` package
95
95
96
96
The `replace` directive uses the package from the local `blog` directory and is
97
-
specified as a relative path to the `blogclient` directory.
97
+
specified as a relative path to the `blogclient` directory.
98
98
99
99
Cosmos SDK uses a custom version of the `protobuf` package, so use the `replace`
100
100
directive to specify the correct dependency.
@@ -211,6 +211,69 @@ package documentation for
211
211
This documentation provides information on how to use the `Client` type with
212
212
`Options` and `KeyringBackend`.
213
213
214
+
## Blockchain and Client App Are on Different Machines
215
+
216
+
If the blockchain and the client app are not on the same machine, replace ../blog with the github
217
+
repository pointing to your blog GitHub repository:
218
+
219
+
dependencies for your package
220
+
221
+
`go.mod` file:
222
+
223
+
```text title="blogclient/go.mod"
224
+
...
225
+
replace blog => github.com/<github-user-name>/blog v0.0.0-00010101000000-000000000000
226
+
...
227
+
```
228
+
229
+
and `main.go` file:
230
+
231
+
```go title="blogclient/main.go"
232
+
// Importing the types package of your blog blockchain
233
+
"github.com/<github-user-name>/blog/x/blog/types"
234
+
```
235
+
236
+
Then, update the dependencies again:
237
+
238
+
```bash
239
+
go mod tidy
240
+
```
241
+
242
+
## Using the Test Keyring Backend
243
+
244
+
***Only for testing***
245
+
246
+
Create a new directory inside the blog client named 'keyring-test'. Next, export the blockchain account keys from the user you want to be sign and broadcast the transaction too. After exporting, import the keys
247
+
to the 'keyring-test' directory you just created in root directory of your client app. You can use the following `ignite account import` command:
248
+
249
+
```bash
250
+
ignite account import alice --keyring-dir /path/to/client/blogclient/keyring-test
0 commit comments