tx-pool namespace:
Connecting
The socket takes the same API key as the REST API. Send it in the handshake asauth.apiKey, or as an x-api-key header if your client sets
headers.
Subscribing to a transfer
Once you have sent a transfer, subscribe with what identifies it on its chain: the transaction signature for a transfer toaddress on Solana, or the
transaction hash for a transfer to evmAddress on an EVM chain. The field is
called signature either way:
TX_POOL_UPDATE arrives when the deposit is picked up, usually within seconds
of confirmation. Subscribing late is also fine. A transfer that has already been
paid out is still found, and the acknowledgement carries its final state.
EVM hashes are matched whatever their letter case, so a checksummed hash from a
wallet works as-is. Solana signatures are case-sensitive and must be sent
exactly.
The acknowledgement
The callback you pass tosubscribe receives:
Where the transfer stands now, in the same shape as a
TX_POOL_UPDATE, or null when Paj has not seen it yet.Why the subscription was refused, when
ok is false. The same message is
also sent as an ERROR event.signature is missing or longer than 128
characters, or when the connection already watches 50 signatures. Unsubscribe
from transfers that have completed to stay under the limit, or open a second
connection.
Updates
EveryTX_POOL_UPDATE carries the whole current state of one transfer, not just
what changed, so you can handle each one on its own.
The chain it was sent on.
Where it stands. Build on this field. See Stages.
Paj’s own processing step, finer than
stage. Useful for logs and support,
but the values may change, so don’t branch on them.The on-chain transaction that moved the funds from the address into Paj’s
treasury, once made.
GET /pub/v2/bank-account.
Stages
These follow the steps in what happens after a deposit:
Treat only
completed as the end of a transfer. If a transfer stays in error,
contact Paj with its signature.
A transfer worth less than 0.40 USDC is too small to pay out and is never
picked up, so its subscription gets no updates.
Staying connected
Subscriptions belong to the connection. When a connection drops, its subscriptions go with it, and Socket.IO reconnects with a fresh connection and none of them. Subscribe again on everyconnect, not just the first: