-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs(client): working on new doc #1861
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
3 Ignored Deployments
|
02d4965
to
6a679e8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly minor changes or nit picky things.
Stopped at line 1231.
I had a few questions in there and a little bit of creative license.
If you're okay with committing the changes. I'd be fine with pulling this into the docs this week and iterating further as a follow-on task
packages/libs/client/NEW_README.md
Outdated
with smart contracts and the Kadena network. The library includes modules in | ||
three categories: creating commands, signing transactions, and interacting with | ||
the network. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with smart contracts and the Kadena network. The library includes modules in | |
three categories: creating commands, signing transactions, and interacting with | |
the network. | |
with smart contracts and Chainweb nodes on the Kadena network. | |
The library includes modules to help you with three types of common tasks: | |
- Create commands | |
- Sign transactions | |
- Interact with the network |
packages/libs/client/NEW_README.md
Outdated
Do you only need to interact with the `coin` contract? Then check out | ||
["@kadena/client-utils/coin"](../client-utils/README.md) for a simpler API. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you only need to interact with the `coin` contract? Then check out | |
["@kadena/client-utils/coin"](../client-utils/README.md) for a simpler API. | |
If you only need to interact with the `coin` contract, see ["@kadena/client-utils/coin"](../client-utils/README.md) for a simpler API. |
packages/libs/client/NEW_README.md
Outdated
In a nutshell, this library helps you create the command object with the | ||
following structure and also send it to the network and listen for the result of | ||
that. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In a nutshell, this library helps you create the command object with the | |
following structure and also send it to the network and listen for the result of | |
that. | |
In a nutshell, the Kadena client library helps you create **command** objects with the following structure that you can send to the network, then listen for the results returned: |
packages/libs/client/NEW_README.md
Outdated
Do you prefer to learn from code? Then check out | ||
[client-examples](../client-examples/). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you prefer to learn from code? Then check out | |
[client-examples](../client-examples/). | |
If you prefer to learn from code, check out the | |
[client-examples](../client-examples/). |
packages/libs/client/NEW_README.md
Outdated
fetch the result of the request. | ||
|
||
#### Client: send | ||
|
||
`send` is a deprecated alias for the `submit` function with the same interface. | ||
|
||
#### Client: submitOne |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fetch the result of the request. | |
#### Client: send | |
`send` is a deprecated alias for the `submit` function with the same interface. | |
#### Client: submitOne |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean removing these lines? then don't we need documentation for Client: send and Client: submitOne
packages/libs/client/NEW_README.md
Outdated
|
||
#### Client: submitOne | ||
|
||
`submitOne` is an alias for the first overload of the `submit` function: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
`submitOne` is an alias for the first overload of the `submit` function: | |
The `submitOne` function is the same as submitting one transaction using the `submit` function. | |
For example: |
packages/libs/client/NEW_README.md
Outdated
|
||
| Parameter | Type | Description | | ||
| --------- | -------- | ---------------------------------- | | ||
| tx | ICommand | The command object ready to submit | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| tx | ICommand | The command object ready to submit | | |
| tx | ICommand | The command object ready to submit | |
| tx | ICommand | The command object ready to submit | | |
| tx | ICommand | The command object ready to submit. | |
packages/libs/client/NEW_README.md
Outdated
No matter which function you use, the result of a transaction follows the | ||
`ICommandResult` interface. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No matter which function you use, the result of a transaction follows the | |
`ICommandResult` interface. | |
These functions all return the result of a transaction with the following `ICommandResult` interface: |
packages/libs/client/NEW_README.md
Outdated
After you submit a transaction, you need to query for the result of the | ||
transaction. You can do it by calling the `/listen` or `/poll` endpoint. There | ||
are some differences between the two endpoints. `/listen` is a blocking request | ||
that only accepts one request key and returns the results when it's ready. This | ||
request keeps the HTTP request open for a while. On the other hand, `/poll` | ||
accepts a list and responds immediately with the current status of the request | ||
key. | ||
|
||
The library exposes the following function which uses one of the endpoints and | ||
designed for different scenarios: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After you submit a transaction, you need to query for the result of the | |
transaction. You can do it by calling the `/listen` or `/poll` endpoint. There | |
are some differences between the two endpoints. `/listen` is a blocking request | |
that only accepts one request key and returns the results when it's ready. This | |
request keeps the HTTP request open for a while. On the other hand, `/poll` | |
accepts a list and responds immediately with the current status of the request | |
key. | |
The library exposes the following function which uses one of the endpoints and | |
designed for different scenarios: | |
After you submit a transaction, you need to query for the result using a request key. | |
You can query transaction results by calling the `/listen` or `/poll` endpoint. | |
- The `/listen` endpoint is a blocking request. It only accepts one request key and returns the results when the transaction result is ready. If you use this endpoint, the HTTP request remains open for a while. | |
- The`/poll` endpoint accepts a list of request keys and responds immediately with the current status of the request key. | |
The Kadena client library exposes the following functions to use the /listen or /poll endpoint in different scenarios: | |
Changes from Lisa
This PR is stale because it is open for 60 days with no activity |
No description provided.