Universal Bridge .NET Integration
We've built Universal Bridge to allow your users to use any asset on any chain, and it's ready for you to try.
This integration simplifies onchain asset trading, and we've added extensions in .NET to integrate with any IThirdwebWallet
nicely.
The design is akin to letting us know what your intent is.
- Buy: "I want to buy x USDC on y Chain using z Token"
- Sell: "I want to sell x USDC on y Chain for z Token"
- Transfer: "Just transfer all my money to vitalik"
- Onramp: "I want to buy x USDC on y Chain by paying with card"
We will return the transactions needed to achieve whatever you desire. You may then handle execution yourself or use our extensions.
Buy - Get an executable set of transactions (alongside a quote) for buying a specific amount of tokens
Sell - Get an executable set of transactions (alongside a quote) for selling a specific amount of tokens
Why not just transfer with the SDK? Stay tuned for webhooks, think direct payments!
This is not production code, we're just showcasing some of the APIs that would help you execute and poll status here.
The SDK comes with some extensions that simplify the use of ThirdwebBridge
.
The onramp flow will return a link for you to display/open as you please. You may poll the status of that onramp by its ID.
In some cases, you may receive an additional set of onchain steps required to get to your destination token post on-ramp, in such cases, you may use our extension IsSwapRequiredPostOnramp
to check, and if a swap is indeed required, you may use our Execute
extensions to execute the transactions, or manually execute them by going through each Step
.