The @abstraxn/server-signer package lets your backend create wallets, sign transactions, and execute on-chain operations — without any user-facing UI. Use it when you need:
  • Automated server-to-server transactions (payouts, treasury ops, batch minting)
  • Backend-controlled signing (no browser, no popup)
  • Custodial or semi-custodial wallet flows managed entirely in Node.js
This SDK is for server environments only. Never expose your API key or access key in frontend code.

1. Install the SDK

npm install @abstraxn/server-signer

2. Get Your API Key

  1. Go to https://dashboard.abstraxn.com/
  2. Log in or sign up
  3. Navigate to AppsCreate New App
  4. Go to WalletsAdd Wallet Service
  5. Click View Details and copy your API key

3. Authenticate

Create a client and authenticate a server wallet identity:
import { ServerSignerClient } from '@abstraxn/server-signer';

const client = new ServerSignerClient({
  apiKey: process.env.ABSTRAXN_API_KEY!,
});

const session = await client.authenticate({
  userIdentity: 'merchant-backend-user-001',
  userName: 'Merchant Backend',
  userEmail: '[email protected]',
});

console.log(session.didCreate);       // true on first run, false on subsequent calls
console.log(session.accessToken);     // JWT access token
console.log(session.accessKey);       // 64-char hex key — persist this securely!
console.log(session.targetPublicKey); // derived public key
On the first call, authenticate generates a new accessKey for you. Save it in a secrets manager — you will need it to recover the same identity later.

4. Verify the Session

Confirm your wallet identity:
const me = await client.whoami();
console.log(me);
// { userId: '...', organizationId: '...', walletAddress: '0x...' }

5. Send Your First Transaction

Create a public client and send a native transfer:
const publicClient = client.createPublicClient({
  rpcUrl: process.env.RPC_URL!,
  chainId: 137,                   // Polygon mainnet
  organizationId: session.organizationId,
  fromAddress: session.walletAddress,
});

// Prepare the transaction (adds nonce, chain ID, gas fields)
const prepared = await publicClient.prepareTransaction({
  to: '0x1111111111111111111111111111111111111111',
  value: 1_000_000_000_000_000n,  // 0.001 MATIC
});

// Sign and broadcast in one step
const txHash = await publicClient.signAndSendPreparedTransaction(
  prepared.unsignedTransaction,
);

// Wait for on-chain confirmation
const receipt = await publicClient.waitForTransactionReceipt(txHash);
console.log('Confirmed in block:', receipt.blockNumber);

Next Steps

  • Authentication — understand the full auth model, token refresh, and access key management
  • Transactions & Signing — prepare transactions, sign messages, typed data, and raw payloads
  • Export & Security — export private keys, handle errors, and follow security best practices