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

feat(sdk-coin-icp): added address creation and validation logic #5390

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mohd-kashif
Copy link
Contributor

TICKET: WIN-4247

@mohd-kashif mohd-kashif self-assigned this Jan 20, 2025
Base automatically changed from WIN-4245 to master January 20, 2025 09:10
@mohd-kashif mohd-kashif marked this pull request as ready for review January 20, 2025 09:13
@mohd-kashif mohd-kashif requested review from a team as code owners January 20, 2025 09:13
Comment on lines 104 to 112
const payload = {
network_identifier: utils.getNetworkIdentifier(),
public_key: {
hex_bytes: HexEncodedPublicKey,
curve_type: utils.getCurveType(),
},
};

return this.callRosettaApi('/construction/derive', payload);
Copy link
Contributor

Choose a reason for hiding this comment

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

we should not rely on an external API for this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we have tried to eliminate this API and have this logic locally but the script is not working as expected therefore we are using an API for this and it will not be an external API call because we will be hosting the rosetta node in our environment through which we will be interacting the ICP chain for the details and transactions
cc: @DinshawKothari @darklrd

Copy link
Contributor

Choose a reason for hiding this comment

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

it doesn't matter who is hosting the node, the SDK should do these kinds of basic operations locally

Copy link
Contributor

Choose a reason for hiding this comment

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

@mohd-kashif So the SDK (client) has to trust BitGo for this address? Also are we sure this function will not be used in OVC in any way?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@OttoAllmendinger @saravanan7mani ICP is different kind of chain where the interaction with the chain can be done through Rosetta node. We have tried to do the sandboxing with the local methods and not using the rosetta node but it was not a successful attempt as the documentation for the direct interaction with the ICP chain is very limited. The ICP foundation has also recommended us to use the Rosetta node setup.
We have published the TDD for this integration and consulted devops team as well for the same
Advantage for using rosetta node is also that rosetta can also be used for interacting with other chains as well which are in the roadmaps as well
for Rosetta documentation kindly go through the below links

If you guys have any further doubts or want to discuss we can have a call together with other folks as well for better understanding

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.

3 participants