Combine @abstraxn/server-signer and @abstraxn/relayer so your backend agent can sign meta-transactions with an Abstraxn Server Wallet and submit them gaslessly through the relayer.

How it works

StepWho signs / pays
Meta-tx authorizationAbstraxn Server Wallet
On-chain executionRelayer (gas tank)

Install

1. Authenticate the server wallet

Use the same userIdentity string every time — it must match the value you used when the wallet was first created.
userIdentity is permanent. Changing it creates a new wallet. accessKey must match the key from the first authenticate() for that identity.

2. Create a relayer signer

createRelayerSigner() returns a signer the relayer SDK can use. Signing is handled remotely by Abstraxn — your backend never holds the wallet private key.

3. Build and send a gasless transaction

Pick the build method that matches your contract (see Relayer guide):
MethodWhen to use
buildRelayerTxEIP712Default — most Abstraxn meta-tx contracts
buildRelayerTxContracts that verify EIP-191 signMessage hashes
Use buildRelayerTx only if your contract does not verify EIP-712 MetaTransaction typed data.

Prerequisites

  • Same userIdentity on every authenticate() call for that wallet
  • Contract exposes getNonce(address) and your target method in the ABI
  • Contract is whitelisted on your relayer app
  • Relayer gas tank has balance on the target chain
  • fromAddress / server wallet address owns the on-chain meta-tx nonce
  • (Optional) If wallet whitelist is enabled in Dashboard, your server wallet address must be in the list — add it with setWalletWhitelist() from the backend (details)

Environment variables

VariableDescription
ABSTRAXN_API_KEYApp API key from dashboard
SERVER_WALLET_ACCESS_KEY64-char hex from first authenticate() (omit on first run)
RPC_URLChain JSON-RPC URL
RELAYER_URLRelayer URL from dashboard

Next Steps