Skip to main content

Overview

The x404-Age feature verifies that a wallet has been active for a minimum amount of time. This helps filter out newly created wallets or bots.

Import

import { X404Age } from "magenx404";

Usage

import { X404Age } from "magenx404";

const result = await X404Age({
  min_wallet_age_days: 90, // Wallet must be 90+ days old
  min_first_transaction_days: 30, // First transaction 30+ days ago
  geo_code: "false",
  geo_code_locs: "",
  coords: { latitude: null, longitude: null },
});

if (result.success) {
  console.log("Authenticated! Token:", result.token);
}

Configuration

min_wallet_age_days
number
required
Minimum age of the wallet in days (based on first transaction)
min_first_transaction_days
number
required
Minimum days since the first transaction

Error Types

Example

"use client";

import { X404Age } from "magenx404";

export async function verifyEstablishedWallet() {
  const result = await X404Age({
    min_wallet_age_days: 180, // 6 months old
    min_first_transaction_days: 90, // First transaction 3 months ago
    geo_code: "false",
    geo_code_locs: "",
    coords: { latitude: null, longitude: null },
  });

  if (result.success) {
    console.log("User has an established wallet!");
  }
}