-
Notifications
You must be signed in to change notification settings - Fork 33
chore: adds docs for integrating exchanges #2994
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
base: main
Are you sure you want to change the base?
Conversation
|
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
cf3f169 to
b443b4e
Compare
…draft into the main docs site
| ``` | ||
|
|
||
| ## Retrieve balance | ||
| If you haven't already downloaded and installed the `@kadena/client` libraries, see [Get started with Kadena client](/reference/kadena-client#get-started-with-kadena-client) for an introduction to creating and using client connections to interact with Chainweb nodes and the Kadena blockchain. |
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.
creating and using client connections to interact with Chainweb nodes and the Kadena blockchain.
This seems confusing. Like there's a difference between chainweb nodes and the Kadena blockchain. They're the same thing.
| If you haven't already downloaded and installed the `@kadena/client` libraries, see [Get started with Kadena client](/reference/kadena-client#get-started-with-kadena-client) for an introduction to creating and using client connections to interact with Chainweb nodes and the Kadena blockchain. | |
| If you haven't already downloaded and installed the `@kadena/client` libraries, see [Get started with Kadena client](/reference/kadena-client#get-started-with-kadena-client) for an introduction to interact with the Kadena blockchain. |
| If you haven't already downloaded and installed the `@kadena/client` libraries, see [Get started with Kadena client](/reference/kadena-client#get-started-with-kadena-client) for an introduction to creating and using client connections to interact with Chainweb nodes and the Kadena blockchain. | ||
| You should also download and install the helper utilities defined in the `@kadena/client-utils` library. | ||
| This library provides simplified functions for interacting with the Kadena `coin` contract and developing your own custom interfaces. | ||
| For more information about the helper utilities, see the [client-utils](https://github.com/kadena-community/kadena.js/tree/main/packages/libs/client-utils) repository and [@kadena/client-utils](https://www.npmjs.com/package/@kadena/client-utils) package registry. |
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.
I propose to make this more concise. If they read to this section, they've already seen the code use @kadena/client.
| If you haven't already downloaded and installed the `@kadena/client` libraries, see [Get started with Kadena client](/reference/kadena-client#get-started-with-kadena-client) for an introduction to creating and using client connections to interact with Chainweb nodes and the Kadena blockchain. | |
| You should also download and install the helper utilities defined in the `@kadena/client-utils` library. | |
| This library provides simplified functions for interacting with the Kadena `coin` contract and developing your own custom interfaces. | |
| For more information about the helper utilities, see the [client-utils](https://github.com/kadena-community/kadena.js/tree/main/packages/libs/client-utils) repository and [@kadena/client-utils](https://www.npmjs.com/package/@kadena/client-utils) package registry. | |
| Install `@kadena/client` (see [Get started with Kadena client](/reference/kadena-client#get-started-with-kadena-client)) and `@kadena/client-utils`, which simplifies interactions with Kadena's coin contract and custom interfaces. Documentation: [client-utils repo](https://github.com/kadena-community/kadena.js/tree/main/packages/libs/client-utils) or [npm package](https://www.npmjs.com/package/@kadena/client-utils). |
|
|
||
| The following example demonstrates how create, sign, and send a `transfer` transaction manually using the `@kadena/client` library: | ||
|
|
||
| ```typescript |
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.
It might be useful to include other methods to sign the transaction as an alternative to signWithChainweaver.
I can imagine this will be very confusing when this doesn't work with wallet.kadena.io, or when we don't demonstrate the signWithKeypair: https://github.com/kadena-community/kadena.js/blob/main/packages/libs/client/src/signing/keypair/createSignWithKeypair.ts#L65-L93.
Caution
BTW, this is also not documented in the README.md of @kadena/client
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.
It's really confusing. I ran into massive problems signing transactions when I tried to update the election workshop to remove the signWithChainweaver function.
After a lot of monkeying around trying to make things work, the best I could do was brute force with a k: account and a generated key pair:
const electionKeyPair:IKeyPair = {
publicKey:
"02b055c8be0eeaa659d0927f3e2399080c91f3fdf94d079498b04d6987acbd46",
secretKey:
'5a02489796c9ec2ec74edf15b63140224d0516ce6cd8f62303ac63b56a45c336',
};
const signWithKeypair = createSignWithKeypair([electionKeyPair]);
const signedTx = await signWithKeypair(unsignedTransaction);
I'll put in whatever code you provide (maybe even some wallet adapter examples?), but it is frustrating to have examples that don't actually work.
lsgunnlsgunn
left a comment
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.
Need to add some transaction signing examples.
|
|
||
| The following example demonstrates how create, sign, and send a `transfer` transaction manually using the `@kadena/client` library: | ||
|
|
||
| ```typescript |
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.
It's really confusing. I ran into massive problems signing transactions when I tried to update the election workshop to remove the signWithChainweaver function.
After a lot of monkeying around trying to make things work, the best I could do was brute force with a k: account and a generated key pair:
const electionKeyPair:IKeyPair = {
publicKey:
"02b055c8be0eeaa659d0927f3e2399080c91f3fdf94d079498b04d6987acbd46",
secretKey:
'5a02489796c9ec2ec74edf15b63140224d0516ce6cd8f62303ac63b56a45c336',
};
const signWithKeypair = createSignWithKeypair([electionKeyPair]);
const signedTx = await signWithKeypair(unsignedTransaction);
I'll put in whatever code you provide (maybe even some wallet adapter examples?), but it is frustrating to have examples that don't actually work.
|
This PR is stale because it is open for 60 days with no activity |
No description provided.