-
Notifications
You must be signed in to change notification settings - Fork 197
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
Document Algodv2 methods #486
Conversation
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.
Thank you for the contribution, this is a great improvement! I just have a few comments
src/client/v2/algod/algod.ts
Outdated
* const getPendingTxns = algodClient.pendingTransactionsInformation(); | ||
* getPendingTxns.max(maxTxns); | ||
* const pendingTxns = await getPendingTxns.do(); |
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.
nit: a simpler way to do this would be:
const pendingTxns = await algodClient
.pendingTransactionsInformation()
.max(maxTxns)
.do();
Also applies to pendingTransactionByAddress
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.
Oh right, done! btw pendingTransactionByAddress
is returning PendingTransaction
sByAddress
🤔
src/client/v2/serviceClient.ts
Outdated
@@ -66,6 +68,7 @@ export default abstract class ServiceClient { | |||
} | |||
|
|||
/** | |||
* @ignore |
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.
Why ignore this? It's a useful method
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 thought developers using the sdk probably don't need to know about it
0401112
to
9245191
Compare
* ``` | ||
* @remarks | ||
* The above configuration is for a sandbox private network. | ||
* For applications on production, you are encouraged to run your own node, or use an Algorand REST API provider with a dedicated API key. |
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.
Given the recent outage, I've changed the base server example from algoexplorer to sandbox and added the remarks. Can you see if this is okay? @jasonpaulos
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.
Sorry for the delay, this looks good!
* Document Algodv2 methods * Link to relevant methods on Algodv2 doc * Replace algoexplorer api with sandbox api * Clean up pendingTxns examples * Show setIntEncoding method on docs
I was looking at this repo's source code and cross-checking with the REST APIs doc and got super annoyed....
Live Deployment
https://js-algosdk.netlify.app/classes/algodv2