-
Notifications
You must be signed in to change notification settings - Fork 1
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
1169: Add documentation data #7
Conversation
const [walletAddress] = await pufferClient.requestAddresses(); | ||
``` | ||
|
||
With the wallet address at hand, make the transacation. |
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.
typo
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.
Fix in next PR. Thanks for the catch.
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.
left a few comments, none are blockers until we go public.
} from '@pufferfinance/puffer-sdk'; | ||
|
||
// highlight-start | ||
const walletClient = PufferClientHelpers.createWalletClient({ |
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.
we should enlist, or add a link to another doc of supported inputs here.
createWalletClient
function definition would also be ideal.
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.
createWalletClient function definition would also be ideal.
The name overlaps with viem
's function, so I thought it might be better to have it inside a class kind of like a namespace to avoid confusion.
Our function here gives a more simpler interface to create a wallet. Which is to use either RPC URLs or the JSON-RPC API (window.ethereum). It's possible with viem but it's not as much intuitive since it's a low-level library.
### 3. Interact with the Contract | ||
|
||
```ts | ||
const { transact, estimate } = pufferClient.depositETH(walletAddress); |
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.
similar comment, somewhere we should document what depositETH returns, and what other functions can we call using pufferClient
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.
This is coming as part of the API reference documentation in the next PR.
@@ -0,0 +1,40 @@ | |||
--- |
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.
If we're going the guides route, there should be multiple 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.
Right now, we only have the depositETH method which only does either a transaction or an estimate. Will add more once the SDK has more functionality.
No description provided.