Layer 2 Fulfilment Service


This SDK will give you the ability to transfer ERC20 tokens via zkSync, Loopring or StarkNET chains to a target address while retaining full custody of the source wallets without other infrastructure to support those chains. You will need to create an API endpoint that Banxa will use to invoke the service and return the transaction hash.

Before you begin

Ensure that you have completed the following prerequisites:

  • Provide us your username for npm and we will add you as collaborators
  • Login to npm with npm login
  • Install the SDK via npm install l2_fulfilment_service
  • Import the module import * as l2_fulfilment_service from 'l2-fulfilment_service


toAddressThe address of the account the funds are being sent to
amountAmount to be sent
coinCoin to be sent
chainThe chain for the coin to be sent on
privateKeyGenerated by you
privateKeyPathPath of the file (.txt) containing the privateKey

Example request

txHash = await l2_fulfilment_service.fullfill(


This request has:
toAddress → 0x9945Fe84d915BD1c1dddF9971964c532c9a4A27f
amount → 0.000001
coin → ETH
chain → zksync
privateKeyPath → /keys.txt

Ability to test the service

  • Must use coin:ETH
  • Must use chain:zksync

Note that all transactions will occur only on the zkSync testnet (rinkeby) until production approval received from Banxa.


  1. Complete prerequisites
  2. Create an API endpoint and provide to Banxa
  3. Use preferred authentication
  4. Include required order checks in the API (e.g. Chainalysis, fraud checks)
  5. Create privateKey and secure as a secret e.g. via Docker (help) or Kubernetes (help)
  6. Banxa calls the API endpoint on demand with specified parameters (toAddress, amount, coin, chain)
  7. Your API performs all necessary checks before invoking the Layer 2 Fulfilment Service
  8. Transaction is broadcast to the network and the transfer is made
  9. Transaction hash is returned from partner to Banxa via the API response

Please note that the API created by you must:

  1. Use your preferred authentication - which Banxa will accept and use
  2. Incorporate any checks for the order to satisfy compliance and note that comprehensive fraud, AML and compliance checks also occur at Banxa
  3. Return the transaction hash as a string