Skip to main content

General Types

type MiniAppError = {
  message: string;
  code: string;
};

type Address = `0x${string}`;
type Hex = `0x${string}`;

Transaction Result

enum TransactionResult {
  SUCCESS = 'SUCCESS',
  FAILED = 'FAILED',
  CANCELLED = 'CANCELLED',
  PENDING = 'PENDING',
}

Chain IDs

enum ChainId {
  // Mainnet
  ARBITRUM_ONE = 42161,
  AVALANCHE = 43114,
  BASE = 8453,
  BNB_SMART_CHAIN = 56,
  CELO = 42220,
  ETH = 1,
  GNOSIS = 100,
  OP_MAINNET = 10,
  POLYGON = 137,
  ROOTSTOCK = 30,

  // Testnet
  ARBITRUM_SEPOLIA = 421614,
  AVALANCHE_FUJI = 43113,
  BASE_SEPOLIA = 84532,
  BNB_SMART_CHAIN_TESTNET = 97,
  CELO_SEPOLIA = 11142220,
  ETH_HOODI = 560048,
  ETH_SEPOLIA = 11155111,
  GNOSIS_CHIADO_TESTNET = 10200,
  OPTIMISM_SEPOLIA = 11155420,
  POLYGON_AMOY = 80002,
  ROOTSTOCK_TESTNET = 31,
}

Token Names

enum TokenName {
  AAVE = 'AAVE',
  ARB = 'ARB',
  AVAX = 'AVAX',
  AXS = 'AXS',
  BNB = 'BNB',
  BTC = 'BTC',
  CELO = 'CELO',
  DAI = 'DAI',
  ETH = 'ETH',
  GNO = 'GNO',
  LINK = 'LINK',
  OP = 'OP',
  PAXG = 'PAXG',
  POL = 'POL',
  RIF = 'RIF',
  UNI = 'UNI',
  USDC = 'USDC',
  USDT = 'USDT',
  USDS = 'USDS',
  XDAI = 'XDAI',
}

Currency

enum Currency {
  ARS = 'ARS',
  PEN = 'PEN',
}

Contract Standards

enum ContractStandard {
  ERC20 = 'ERC20',
}

Claim Keys

enum ClaimKey {
  NAME = 'NAME',
  LAST_NAME = 'LAST_NAME',
  EMAIL = 'EMAIL',
  IS_PEP = 'IS_PEP',
  LEMONTAG = 'LEMONTAG',
  OPERATION_COUNTRY = 'OPERATION_COUNTRY',
}

Granted Claims

interface MiniAppGrantedClaim {
  key: ClaimKey;
  value: string;
}
The MiniAppGrantedClaim type represents a claim that was granted by the user during authentication. Each granted claim contains the claim key and its corresponding value. The ClaimKey enum defines the available claim keys that can be requested during authentication. These claims represent user information that can be requested through the requirements.claims parameter in the authenticate function.

Claim Key Descriptions

Claim KeyDescription
NAMEThe user’s first name.
LAST_NAMEThe user’s last name.
EMAILThe user’s email address.
IS_PEPIndicates whether the user is a Politically Exposed Person (PEP).
LEMONTAGThe user’s Lemon Cash tag (username).
OPERATION_COUNTRYThe country where the user operates.
The IS_PEP claim is only available for users in Argentina and indicates when a user is a Politically Exposed Person.