Skip to main content

Use the bridge functions

For most use cases, you can replace your manual API and blockchain calls with the bridge or prepareBridge function and the included chain adapters. These handle all the details of the Rhino.fi API and smart contracts for you. If your use case isn’t covered by them, read on to learn how to use the SDK’s underlying building blocks directly. If the included chain adapters don’t cover your use case, you can implement a custom chain adapter and use it with bridge or prepareBridge.

Use the SDK API wrappers

If you need to stay in control of every API call, you can still replace your manual calls with the SDK’s wrappers and write much less code:
Under api.bridge and api.config, the SDK has an equivalent for every API call you may have used. The parameters are mostly the same, with small convenience changes in some wrappers. The SDK also handles authentication, so you don’t need to manage JWTs yourself.

Use the SDK chain adapters

If you want direct control of the blockchain interactions, you can use the included chain adapters on their own:
Once the deposit succeeds, track the transfer through the API as usual. See Track transactions.