TS API Endpoint (Main Server)

/auth

/auth/~ method request response role
register POST email: str,
userId : str,
username: str Authenticates the user with a unique identifier (e.g., FaceID) and stores the data in the database.
login POST Depends on the authentication method userId: str,
username: str,
wallets: [
chainType: str,
balance: float
] Authenticates the user and retrieves wallet information from the database.
delete

/wallet

/wallet/~ method request response role
create POST userId: str,
chainType: str wallets: [
chainType: str,
balance: float
] Create new wallet.
buy GET userId: str, chainType: str appId: str,
address: str Returns the necessary parameters for using Coinbase Onramp from the frontend.
list GET userId: str wallets: [
address: str,
chainType: str,
balance: float
] Returns the list of user’s wallets.
prompt POST userId: str,
prompt: str amount: float,
chainType: str,
targets: list[
userId: str,
username: str,
wallets: list[
chainType: str,
address: str
],
isRisky: bool,
riskDetail: str null
] Parses the user’s input to extract transaction details and returns the chain type, transaction amount, and potential recipients. Also includes a risk assessment for each recipient.
send POST userId: str,
swapFrom: str,
amount: float,
swapTo: str,
address: str isAccepted: str,
reason: str null Executes the transaction and returns whether it was accepted, along with the reason if not accepted.
transaction GET userId: str transactions: list[
id: str,
status: str
] Retrieves the status of the user's transactions.

Fast API Endpoint (Internal Server)

endpoint method request response role
parse_instruction POST prompt: str target: str,
value: float,
chain_type: str Parses the user's input and extracts the essential elements required for the transaction.
check_reputation GET address: str,
chain_type: str is_risky: bool,
risk_detail: str Check the risk of the target.

App Image: https://www.figma.com/design/OGRhavzincD9dgoV8mlGAR/Untitled?node-id=0-1&p=f&t=LBrvi8GvY7LHsFGK-0