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

  1. What the packages do
  2. Install and set up
  3. Search for routes
  4. Plan the transactions
  5. Track a transfer
  6. Claim a transfer
  7. Defaults you replace
  8. The public Gibs services
  9. Example A: ETH on Ethereum to PLS on PulseChain
  10. Example B: an ERC-20 token from PulseChain to Ethereum, delivery off
  11. Fees and attribution
  12. Known limits

The examples are TypeScript files. They typecheck against the published packages:

FileWhat it holds
examples/shared.tsThe signer and chain-read interfaces, the viem clients of the search, the sender, the status poller
examples/adapter-viem.tsThe signer and the chain reads with viem. Examples A and B use it
examples/adapter-walletconnect.tsThe signer and the receipt wait with WalletConnect: Reown AppKit and wagmi
examples/adapter-ethers.tsThe signer and the chain reads with ethers 6
examples/adapter-web3.tsThe signer and the chain reads with web3.js 4
examples/example-a-ether-to-pulse.tsExample A
examples/example-b-token-pulsechain-to-ethereum.tsExample B
examples/example-c-delivered-amount.tsExample C: the amount the recipient receives, before and after a send
examples/tsconfig.jsonStrict compiler settings with moduleResolution: "Bundler"

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.