Skip to content
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

chore: add documentation for starknetid.ts #1115

Closed

Conversation

muheebyusufbaba1
Copy link

Motivation and Resolution

Closes #1090

RPC version (if applicable)

...

Usage related changes

  • Change 1.
  • ...

Development related changes

  • Change 1.
  • ...

Checklist:

  • Performed a self-review of the code
  • Rebased to the last commit of the target branch (or merged it into my branch)
  • Linked the issues which this PR resolves
  • Documented the changes in code (API docs will be generated automatically)
  • Updated the tests
  • All tests are passing

src/utils/starknetId.ts Outdated Show resolved Hide resolved
@muheebyusufbaba1
Copy link
Author

@ivpavici

src/utils/stark.ts Show resolved Hide resolved
src/utils/stark.ts Show resolved Hide resolved
src/utils/stark.ts Outdated Show resolved Hide resolved
src/utils/stark.ts Show resolved Hide resolved
@@ -24,6 +24,12 @@ function extractStars(str: string): [string, number] {
* Decodes an array of BigInts into a string using the given algorithm.
* @param {bigint[]} encoded - The encoded array of BigInts.
* @return {string} The decoded string.
* @example
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@irisdv can you please confirm if these example's look ok?

@tabaktoni tabaktoni added the Type: documentation Improvements or additions to documentation label May 3, 2024
@ivpavici ivpavici requested a review from PhilippeR26 May 6, 2024 13:17
@@ -96,6 +108,13 @@ export function signatureToHexArray(sig?: Signature): ArraySignatureType {

/**
* Convert estimated fee to max fee with overhead
* @param {BigNumberish} estimatedFee - The estimated fee
* @param {number} [overhead = feeMarginPercentage.MAX_FEE] - The overhead added to the gas
* @returns {bigint} The maximum fee with overhead
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@example missning!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@example still missing!

Copy link
Collaborator

@PhilippeR26 PhilippeR26 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nearly good, but as explained in Telegram https://t.me/c/2066195975/59 ,
please follow very rigorously the template of this PR #1100, especially for the examples : result always in a result variable, result displayed in a comment (//) (no assert).

@muheebyusufbaba1
Copy link
Author

Reviews fixed @PhilippeR26

Copy link
Collaborator

@PhilippeR26 PhilippeR26 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it normal to have no examples or missing @returns in some areas :
starks.ts : L79-106, L168-242 ?

@ivpavici ivpavici closed this May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve JSDocs by adding examples of usages
4 participants