Skip to content

refactor: replace algosdk with algokit-utils#108

Open
aorumbayev wants to merge 3 commits intomainfrom
decoupling
Open

refactor: replace algosdk with algokit-utils#108
aorumbayev wants to merge 3 commits intomainfrom
decoupling

Conversation

@aorumbayev
Copy link
Copy Markdown
Collaborator

@aorumbayev aorumbayev commented Jan 21, 2026

Proposed changes

  • Replace algosdk dependency with @algorandfoundation/algokit-utils
  • Refactor simulation trace parsing to use decodeSimulateResponseFromJson instead of custom recursive parsing
  • Update address encoding and base64 conversion to use algokit-utils utilities
  • Add computeLogicSigAddress function for Logic Sig address calculation
  • Rename properties to match new type definitions (e.g., appCall.appIdapplicationCall.appIndex)
  • Remove legacy algosdk parsing code and update related tests

NOTES

Remove algosdk dependency and use @algorandfoundation/algokit-utils instead.
- Import types and utilities from algokit-utils subpaths
- Use decodeSimulateResponseFromJson for trace parsing
- Compute LogicSig address using hash and encodeAddress utilities
Copy link
Copy Markdown

@joe-p joe-p left a comment

Choose a reason for hiding this comment

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

Question about Lsig address but otherwise LGTM

lsigBytes = new Uint8Array(Buffer.from(lsigBytes, 'base64'))
}
const lsigAddr = lsigBytes ? new algosdk.LogicSigAccount(lsigBytes).address() : undefined
const lsigAddr = lsigBytes ? computeLogicSigAddress(lsigBytes) : undefined
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Is there a reason for using this function vs new LogicSig(lsigBytes).address()?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants