any.sender

Ethereum transactions made simple
any.sender is a transaction sending service that makes sure your transaction is delivered on time, every time.
Read the docs arrow_forward

Why use it?

any.sender makes it easy to outsource your transaction infrastructure so you can focus on product development and not re-writing infrastructure. It's the first in its kind to use smart contracts to enforce a quality of service.
  • alarm

    Build faster!

    Accelerate development. Let any.sender deal with transaction management so you can focus on what makes your dapp great.

  • send

    Non-custodial

    any.sender can only relay pre-authorised transactions. And thanks to meta-transactions, you can enable gasless interactions with your dapp

  • favorite_border

    Better UX

    Users never have to deal with setting gas prices or bumping up stuck transactions. Just set a deadline and let us do the rest.

Getting started

1. Install the client

npm i @any-sender/client
                        
2. Use your favourite wallet to send funds to the relay contract.

// send the funds
const tx = await userWallet.sendTransaction({ 
    to: relayContractAddress, 
    value: parseEther("1") 
});
await tx.wait(12);

// check the balance
const client = new AnySenderClient(anySenderUrl, receiptSignerAddress);
const balance = await client.balance(userWallet.address); // 1 ether
                    
3. Create a transaction and relay it with any.sender.

import { AnySenderClient } from "@any-sender/client";
const client = new AnySenderClient(anySenderUrl, receiptSignerAddress);

// create a relay transaction
const deadlineBlockNumber = (await provider.getBlockNumber()) + 405;
const relayTx = {
    from: userWallet.address,
    to: echoContractAddress,
    gas: 100000,
    deadlineBlockNumber,
    data,
    refund: parseEther("0.01").toString(),
    relayContractAddress
};

// authorise
const id = AnySenderClient.relayTxId(relayTx);
const signature = await userWallet.signMessage(arrayify(id));
const signedTx = { ...relayTx, signature };

// relay!
const signedReceipt = await client.relay(signedTx);