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

Radix client #1146

Merged
merged 16 commits into from
Jun 4, 2024
Merged

Radix client #1146

merged 16 commits into from
Jun 4, 2024

Conversation

balda-rdx
Copy link
Contributor

This PR adds a Client for the radix network.

This client makes use of the radix gateway api: https://radix-babylon-gateway-api.redoc.ly/
It also uses the radix engine toolkit: https://github.com/radixdlt/typescript-radix-engine-toolkit/tree/main and the gateway sdk: https://www.npmjs.com/package/@radixdlt/babylon-gateway-api-sdk

balda-rdx and others added 2 commits May 10, 2024 10:05
* adding a first version of the radix client

* throwing not implemented

* adding unit tests and types

* adding more unit tests

* adding the implementation for getFees

* implementing things as generic methods

* taking urls to constants.ts

* adding stream transactions

* implementing transfer and prepareTx

* adding broadcast transaction

* removing not needed types

* Revert "removing not needed types"

This reverts commit 3ce956b.

* removing not needed types

* adding docstrings

* addressing comments from the review

* introducing the gateway sdk

* adding missing files

* adding types for resources and test for Secp256k1 curve

* adding more unit tests

* adding root derivation paths

* using more sdk methods

* using the gateway sdk for the fees

* using the gateway sdk everywhere

* removing global mocks

* using mocks for all gateway sdk calls in unit tests

* removing not needed test

* updating dependencies

* fixing deps and unit tests

* adding more docs

* adding docs for creating and getting transactions

* adding docs for providers

* adding more examples

* adding the option to use both curves

* fixing the logic

* updating the transfer method and the unit tests

* adding fee bunds

* updating the way we calculate fees

* using the memo in the transaction manifest

* updating the validate address method

* removing public signer keys

* adding tests to validate keys

* fix: refactor network derivation and changing networks.

* Add a RadixSpecificClient

* fixing unit tests after the improvements merge

* fixing all unit tests

* making sure estimate fees work for both networks

* adding e2e tests with no mocks

* adding pagination for balances

* updating docs

* split lock_and_withdraw

* fixing tests

* updating docs

* last fixes

* removing logs

* updating docs

---------

Co-authored-by: Omar <OmarAbdulla7@hotmail.com>
@Thorian1te Thorian1te requested a review from 0xp3gasus May 11, 2024 02:43
@0xp3gasus
Copy link
Collaborator

This PR adds a Client for the radix network.

This client makes use of the radix gateway api: https://radix-babylon-gateway-api.redoc.ly/ It also uses the radix engine toolkit: https://github.com/radixdlt/typescript-radix-engine-toolkit/tree/main and the gateway sdk: https://www.npmjs.com/package/@radixdlt/babylon-gateway-api-sdk

First of all, thanks for opening the pull request!! I left you a few comments due the latest changes we have made in the repo. On the other side. Is there any way to get testnet faucet to test transactions?

packages/xchain-radix/README.md Outdated Show resolved Hide resolved
packages/xchain-radix/package.json Outdated Show resolved Hide resolved
packages/xchain-radix/package.json Outdated Show resolved Hide resolved
packages/xchain-radix/rollup.config.js Outdated Show resolved Hide resolved
packages/xchain-radix/src/const.ts Outdated Show resolved Hide resolved
packages/xchain-radix/src/const.ts Outdated Show resolved Hide resolved
packages/xchain-radix/src/client.ts Outdated Show resolved Hide resolved
packages/xchain-radix/package.json Show resolved Hide resolved
@balda-rdx
Copy link
Contributor Author

This PR adds a Client for the radix network.
This client makes use of the radix gateway api: https://radix-babylon-gateway-api.redoc.ly/ It also uses the radix engine toolkit: https://github.com/radixdlt/typescript-radix-engine-toolkit/tree/main and the gateway sdk: https://www.npmjs.com/package/@radixdlt/babylon-gateway-api-sdk

First of all, thanks for opening the pull request!! I left you a few comments due the latest changes we have made in the repo. On the other side. Is there any way to get testnet faucet to test transactions?

@0xp3gasus thanks for the feedback. I'll be addressing all the comments and yes, there's a way to get testnet funds from the faucet. will add it

@0xp3gasus 0xp3gasus self-requested a review May 23, 2024 11:06
Copy link
Collaborator

@0xp3gasus 0xp3gasus left a comment

Choose a reason for hiding this comment

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

I could not test transfers in Testnet network due to an error on the getFees

@balda-rdx
Copy link
Contributor Author

I could not test transfers in Testnet network due to an error on the getFees

there's an e2e test that transfer funds in the testnet network, maybe take a look at that one? https://github.com/xchainjs/xchainjs-lib/pull/1146/files#diff-86a40cb25a0073784030ae41e4080be5316ec62d4291712315fd94916e2d1582R404

0xp3gasus
0xp3gasus previously approved these changes Jun 3, 2024
Copy link
Collaborator

@0xp3gasus 0xp3gasus left a comment

Choose a reason for hiding this comment

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

Great work!! 🚀🚀

@0xp3gasus 0xp3gasus merged commit 3be1989 into xchainjs:master Jun 4, 2024
1 check passed
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.

None yet

2 participants