Integrate Gibs into a wallet or app
This guide shows you how to add Gibs Finance bridge routes to your wallet, app or script. You search for routes, plan the transactions, send them with your own signer, track the transfer, and claim it when the bridge needs a claim.
The guide covers the @gibs/* packages at version 1.21.0. Check npm for the current version before you install. Never install 1.12.0 or older: those versions do not load.
The packages never sign and never hold funds. Your wallet signs every transaction. A mobile wallet such as Internet Money uses the packages this way, and so can any other app.
Terms used once and then kept:
- API means application programming interface. HTTP means Hypertext Transfer Protocol. JSON means JavaScript Object Notation.
- An RPC endpoint is a node's remote procedure call address, for example
https://your-node.example. - A section is one wallet signature in a route. A route with a crossing and then a swap has two sections.
- A crossing is one omnibridge transfer between PulseChain and Ethereum, or between PulseChain and BNB Smart Chain.
- Delivery means that a paid service submits the last transaction of a crossing on the destination chain, so the user does not have to come back and claim.
Contents
- What the packages do
- Install and set up
- Search for routes
- Plan the transactions
- Track a transfer
- Claim a transfer
- Defaults you replace
- The public Gibs services
- Example A: ETH on Ethereum to PLS on PulseChain
- Example B: an ERC-20 token from PulseChain to Ethereum, delivery off
- Fees and attribution
- Known limits
The examples are TypeScript files. They typecheck against the published packages:
The files ship inside @gibs/bridge-sdk, in node_modules/@gibs/bridge-sdk/docs/examples/. To check them, install the packages and typescript, copy the folder into your project, and run npx tsc -p examples/tsconfig.json. The examples never ran against a live chain.