feat: implement platform treasury model with merchant balance tracking and API docs

This commit is contained in:
mstfyldz
2026-03-13 01:33:28 +03:00
parent 5d14a08490
commit 3f2e21c3d3
8 changed files with 245 additions and 108 deletions

View File

@@ -51,10 +51,14 @@ export async function POST(req: NextRequest) {
// Generate Temporary Wallets for Crypto fallback
const evmWallet = await CryptoEngine.createTemporaryWallet('POLYGON');
const solWallet = await CryptoEngine.createTemporaryWallet('SOLANA');
const tronWallet = await CryptoEngine.createTemporaryWallet('TRON');
const btcWallet = await CryptoEngine.createTemporaryWallet('BITCOIN');
const cryptoWallets = {
EVM: { address: evmWallet.address, privateKey: evmWallet.privateKey },
SOLANA: { address: solWallet.address, privateKey: solWallet.privateKey }
SOLANA: { address: solWallet.address, privateKey: solWallet.privateKey },
TRON: { address: tronWallet.address, privateKey: tronWallet.privateKey },
BITCOIN: { address: btcWallet.address, privateKey: btcWallet.privateKey }
};
if (useMock) {
@@ -114,7 +118,9 @@ export async function POST(req: NextRequest) {
status: 'pending',
wallets: {
EVM: evmWallet.address,
SOLANA: solWallet.address
SOLANA: solWallet.address,
TRON: tronWallet.address,
BITCOIN: btcWallet.address
}
}
});