> For the complete documentation index, see [llms.txt](https://docs.radfi.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.radfi.co/dev/api-endpoints/models.md).

# Models

## The CreateTransactionDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"CreateTransactionDto":{"type":"object","properties":{"type":{"type":"string","enum":["renew-utxo","withdraw","init-liquidity-pool","provide-liquidity","increase-liquidity","swap","withdraw-liquidity","collect-fee","claim-referral-rewards","claim-receipt","satflow-list","satflow-cancel","satflow-buy"]},"params":{"type":"object"}},"required":["type","params"]}}}}
```

## The SignTransactionParamsDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"SignTransactionParamsDto":{"type":"object","properties":{"userAddress":{"type":"string"},"signedBase64Tx":{"type":"string"}},"required":["userAddress","signedBase64Tx"]}}}}
```

## The SignTransactionDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"SignTransactionDto":{"type":"object","properties":{"type":{"type":"string","enum":["renew-utxo","withdraw","init-liquidity-pool","provide-liquidity","increase-liquidity","swap","withdraw-liquidity","collect-fee","claim-referral-rewards","claim-receipt","satflow-list","satflow-cancel","satflow-buy"]},"params":{"$ref":"#/components/schemas/SignTransactionParamsDto"}},"required":["type","params"]},"SignTransactionParamsDto":{"type":"object","properties":{"userAddress":{"type":"string"},"signedBase64Tx":{"type":"string"}},"required":["userAddress","signedBase64Tx"]}}}}
```

## The ResponseMetaData object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"ResponseMetaData":{"type":"object","properties":{"totalItems":{"type":"number"},"currentPage":{"type":"number"},"pageSize":{"type":"number"},"totalPages":{"type":"number"}},"required":["totalItems","currentPage","pageSize","totalPages"]}}}}
```

## The BaseResponseDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"BaseResponseDto":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"data":{"type":"object"},"metaData":{"$ref":"#/components/schemas/ResponseMetaData"}},"required":["code","message","data","metaData"]},"ResponseMetaData":{"type":"object","properties":{"totalItems":{"type":"number"},"currentPage":{"type":"number"},"pageSize":{"type":"number"},"totalPages":{"type":"number"}},"required":["totalItems","currentPage","pageSize","totalPages"]}}}}
```

## The WalletEntity object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"WalletEntity":{"type":"object","properties":{"tradingAddress":{"type":"string"},"userAddress":{"type":"string"},"userPublicKey":{"type":"string"},"requiredSignNumber":{"type":"number"},"pubKeysNum":{"type":"number"}},"required":["tradingAddress","userAddress","userPublicKey","requiredSignNumber","pubKeysNum"]}}}}
```

## The AddWalletDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"AddWalletDto":{"type":"object","properties":{"chain":{"type":"string","enum":["bitcoin","evm","solana"],"description":"Blockchain network of the wallet"},"provider":{"type":"string","description":"Wallet provider / software used"},"publicKey":{"type":"string","description":"Public key of the wallet"},"message":{"type":"string","description":"Message (timestamp in ms) signed by the wallet"},"signature":{"type":"string","description":"Signature of the message produced by the wallet"},"userAddress":{"type":"string","description":"Wallet address (required for BTC; derived from signature for EVM/SOL)"},"isDefault":{"type":"boolean","description":"Mark this wallet as the default for its chain"}},"required":["chain","provider","publicKey","message","signature"]}}}}
```

## The ImportPendingTxDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"ImportPendingTxDto":{"type":"object","properties":{"externalAddress":{"type":"string"},"txid":{"type":"string","description":"Tx id"},"receiverAddress":{"type":"string","description":"Receiver address"}},"required":["externalAddress","txid","receiverAddress"]}}}}
```

## The WalletUpdateDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"WalletUpdateDto":{"type":"object","properties":{"userAddress":{"type":"string"},"type":{"type":"string"},"isStandard":{"type":"boolean"}},"required":["userAddress","type","isStandard"]}}}}
```

## The WalletBulkUpdateDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"WalletBulkUpdateDto":{"type":"object","properties":{"wallets":{"type":"array","items":{"$ref":"#/components/schemas/WalletUpdateDto"}}},"required":["wallets"]},"WalletUpdateDto":{"type":"object","properties":{"userAddress":{"type":"string"},"type":{"type":"string"},"isStandard":{"type":"boolean"}},"required":["userAddress","type","isStandard"]}}}}
```

## The UpdateWalletDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"UpdateWalletDto":{"type":"object","properties":{"isDefault":{"type":"boolean"}}}}}}
```

## The PoolMigrationDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"PoolMigrationDto":{"type":"object","properties":{"token0Id":{"type":"string","description":"The id of the token0"},"token1Id":{"type":"string","description":"The id of the token1"},"fee":{"type":"number","description":"The fee of the pool"},"scVersion":{"type":"string","description":"The sc version"}},"required":["token0Id","token1Id","fee","scVersion"]}}}}
```

## The MigratePoolDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"MigratePoolDto":{"type":"object","properties":{"payFeeAddress":{"type":"string","description":"The address to pay the fee"},"pools":{"description":"List of pools to migrate, if not exist, will migrate all","type":"array","items":{"$ref":"#/components/schemas/PoolMigrationDto"}},"migrateVersion":{"type":"number","description":"The migration version"},"type":{"type":"string","description":"The additional data"},"feeRate":{"type":"number","description":"The fee rate"}},"required":["payFeeAddress","migrateVersion","type","feeRate"]},"PoolMigrationDto":{"type":"object","properties":{"token0Id":{"type":"string","description":"The id of the token0"},"token1Id":{"type":"string","description":"The id of the token1"},"fee":{"type":"number","description":"The fee of the pool"},"scVersion":{"type":"string","description":"The sc version"}},"required":["token0Id","token1Id","fee","scVersion"]}}}}
```

## The BroadcastMigrationDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"BroadcastMigrationDto":{"type":"object","properties":{"txHex":{"type":"string","description":"The tx hex"},"type":{"type":"string","description":"The tx id"},"migrateVersion":{"type":"number","description":"The migration version"}},"required":["txHex","type","migrateVersion"]}}}}
```

## The CompleteMigrationDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"CompleteMigrationDto":{"type":"object","properties":{"pools":{"description":"List of pools to migrate, if not exist, will migrate all","type":"array","items":{"$ref":"#/components/schemas/PoolMigrationDto"}},"migrateVersion":{"type":"number","description":"The migration times"}},"required":["migrateVersion"]},"PoolMigrationDto":{"type":"object","properties":{"token0Id":{"type":"string","description":"The id of the token0"},"token1Id":{"type":"string","description":"The id of the token1"},"fee":{"type":"number","description":"The fee of the pool"},"scVersion":{"type":"string","description":"The sc version"}},"required":["token0Id","token1Id","fee","scVersion"]}}}}
```

## The TokenSocial object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"TokenSocial":{"type":"object","properties":{}}}}}
```

## The TokenEntity object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"TokenEntity":{"type":"object","properties":{"source":{"type":"string"},"chainName":{"type":"string"},"chainId":{"type":"string"},"symbol":{"type":"string"},"rune":{"type":"string"},"spacedRune":{"type":"string"},"decimals":{"type":"number"},"tokenAddress":{"type":"string"},"mainTokenAddress":{"type":"string"},"tokenAddressV4":{"type":"string"},"mainTokenAddressV4":{"type":"string"},"tokenId":{"type":"string"},"price":{"type":"number"},"priceInSats":{"type":"number"},"priceChange24h":{"type":"number"},"isTest":{"type":"boolean"},"updatedBy":{"type":"string"},"displayTicker":{"type":"string"},"supply":{"type":"string"},"premine":{"type":"string"},"social":{"$ref":"#/components/schemas/TokenSocial"},"volume24h":{"type":"number"},"volume24hInSats":{"type":"number"},"volume7d":{"type":"number"},"volume7dInSats":{"type":"number"},"volumeAllTime":{"type":"number"},"volumeAllTimeInSats":{"type":"number"},"marketCap":{"type":"number"},"marketCapInSats":{"type":"number"},"hasPool":{"type":"boolean"}},"required":["source","chainName","chainId","symbol","rune","spacedRune","decimals","tokenAddress","mainTokenAddress","tokenAddressV4","mainTokenAddressV4","tokenId","price","priceInSats","priceChange24h","isTest","updatedBy","displayTicker","supply","premine","social","volume24h","volume24hInSats","volume7d","volume7dInSats","volumeAllTime","volumeAllTimeInSats","marketCap","marketCapInSats","hasPool"]},"TokenSocial":{"type":"object","properties":{}}}}}
```

## The TokenResponseDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"TokenResponseDto":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/TokenEntity"}},"metaData":{"$ref":"#/components/schemas/ResponseMetaData"}},"required":["code","message","data","metaData"]},"TokenEntity":{"type":"object","properties":{"source":{"type":"string"},"chainName":{"type":"string"},"chainId":{"type":"string"},"symbol":{"type":"string"},"rune":{"type":"string"},"spacedRune":{"type":"string"},"decimals":{"type":"number"},"tokenAddress":{"type":"string"},"mainTokenAddress":{"type":"string"},"tokenAddressV4":{"type":"string"},"mainTokenAddressV4":{"type":"string"},"tokenId":{"type":"string"},"price":{"type":"number"},"priceInSats":{"type":"number"},"priceChange24h":{"type":"number"},"isTest":{"type":"boolean"},"updatedBy":{"type":"string"},"displayTicker":{"type":"string"},"supply":{"type":"string"},"premine":{"type":"string"},"social":{"$ref":"#/components/schemas/TokenSocial"},"volume24h":{"type":"number"},"volume24hInSats":{"type":"number"},"volume7d":{"type":"number"},"volume7dInSats":{"type":"number"},"volumeAllTime":{"type":"number"},"volumeAllTimeInSats":{"type":"number"},"marketCap":{"type":"number"},"marketCapInSats":{"type":"number"},"hasPool":{"type":"boolean"}},"required":["source","chainName","chainId","symbol","rune","spacedRune","decimals","tokenAddress","mainTokenAddress","tokenAddressV4","mainTokenAddressV4","tokenId","price","priceInSats","priceChange24h","isTest","updatedBy","displayTicker","supply","premine","social","volume24h","volume24hInSats","volume7d","volume7dInSats","volumeAllTime","volumeAllTimeInSats","marketCap","marketCapInSats","hasPool"]},"TokenSocial":{"type":"object","properties":{}},"ResponseMetaData":{"type":"object","properties":{"totalItems":{"type":"number"},"currentPage":{"type":"number"},"pageSize":{"type":"number"},"totalPages":{"type":"number"}},"required":["totalItems","currentPage","pageSize","totalPages"]}}}}
```

## The TokenGetDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"TokenGetDto":{"type":"object","properties":{"runes":{"type":"array","items":{"type":"string"}}},"required":["runes"]}}}}
```

## The BlackListActions object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"BlackListActions":{"type":"object","properties":{"withdraw":{"type":"boolean","description":"Whether the user can withdraw"},"init-liquidity-pool":{"type":"boolean","description":"Whether the user can init LP"},"provide-liquidity":{"type":"boolean","description":"Whether the user can provide liquidity"},"increase-liquidity":{"type":"boolean","description":"Whether the user can increase liquidity"},"swap":{"type":"boolean","description":"Whether the user can swap"},"withdraw-liquidity":{"type":"boolean","description":"Whether the user can withdraw liquidity"},"collect-fee":{"type":"boolean","description":"Whether the user can collect fee"},"claim-diamond-hand-rewards":{"type":"boolean","description":"Whether the user can claim diamond hand rewards"}},"required":["withdraw","init-liquidity-pool","provide-liquidity","increase-liquidity","swap","withdraw-liquidity","collect-fee","claim-diamond-hand-rewards"]}}}}
```

## The BlackListCreateDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"BlackListCreateDto":{"type":"object","properties":{"tradingAddress":{"type":"string","description":"The trading address of the user"},"actions":{"description":"The actions of the user","allOf":[{"$ref":"#/components/schemas/BlackListActions"}]}},"required":["tradingAddress","actions"]},"BlackListActions":{"type":"object","properties":{"withdraw":{"type":"boolean","description":"Whether the user can withdraw"},"init-liquidity-pool":{"type":"boolean","description":"Whether the user can init LP"},"provide-liquidity":{"type":"boolean","description":"Whether the user can provide liquidity"},"increase-liquidity":{"type":"boolean","description":"Whether the user can increase liquidity"},"swap":{"type":"boolean","description":"Whether the user can swap"},"withdraw-liquidity":{"type":"boolean","description":"Whether the user can withdraw liquidity"},"collect-fee":{"type":"boolean","description":"Whether the user can collect fee"},"claim-diamond-hand-rewards":{"type":"boolean","description":"Whether the user can claim diamond hand rewards"}},"required":["withdraw","init-liquidity-pool","provide-liquidity","increase-liquidity","swap","withdraw-liquidity","collect-fee","claim-diamond-hand-rewards"]}}}}
```

## The EtchEntity object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"EtchEntity":{"type":"object","properties":{}}}}}
```

## The ValidateEtchRuneDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"ValidateEtchRuneDto":{"type":"object","properties":{"rune":{"type":"string","description":"Rune name with or without spacers (•)"}},"required":["rune"]}}}}
```

## The FetchEtchAddressDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"FetchEtchAddressDto":{"type":"object","properties":{"runeName":{"type":"string"},"inscriptionType":{"type":"string"},"inscriptionContent":{"type":"string"}},"required":["runeName","inscriptionType","inscriptionContent"]}}}}
```

## The EtchBuildCommitTxDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"EtchBuildCommitTxDto":{"type":"object","properties":{"runeName":{"type":"string"},"inscriptionType":{"type":"string"},"inscriptionContent":{"type":"string"},"userAddress":{"type":"string"},"feeTier":{"type":"number","description":"Fee tier for the pool (5000 = 0.5%, 10000 = 1%, 20000 = 2%, etc.)","minimum":5000,"maximum":100000},"diamondHandRewardRate":{"type":"number","description":"Diamond hands share of the available 66.67% (0-1, e.g., 0.5 = 50% of 66.67% = 33.33% total)","minimum":0,"maximum":1},"blockWithdrawals":{"type":"boolean","description":"Block withdrawals of this token from radFi (only internal transfers allowed)","default":false},"addLpSatsRate":{"type":"number","description":"Percentage of raised funds to allocate to liquidity (0-1, e.g., 0.2 = 20% to LP, 80% to creator)","minimum":0,"maximum":1},"customFeeRate":{"type":"number","description":"Customized fee rate for the etching transaction (>=1)","minimum":1},"isReserve":{"type":"boolean","description":"Reserve to launch the token at a later date","default":false},"userPremineAmount":{"type":"string","description":"Raw rune amount (base units) to transfer to the creator before public distribution. Must fit within the total premine supply."}},"required":["runeName","inscriptionType","inscriptionContent","userAddress","feeTier"]}}}}
```

## The EtchSocialDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"EtchSocialDto":{"type":"object","properties":{"x":{"type":"string"},"telegram":{"type":"string"},"website":{"type":"string"}}}}}}
```

## The SubmitEtchDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"SubmitEtchDto":{"type":"object","properties":{"signedBase64Psbt":{"type":"string"},"runeName":{"type":"string"},"inscriptionType":{"type":"string"},"inscriptionContent":{"type":"string"},"symbol":{"type":"string"},"creator":{"type":"string"},"description":{"type":"string"},"displayTicker":{"type":"string"},"social":{"$ref":"#/components/schemas/EtchSocialDto"}},"required":["signedBase64Psbt","runeName","inscriptionType","inscriptionContent","symbol","creator","description"]},"EtchSocialDto":{"type":"object","properties":{"x":{"type":"string"},"telegram":{"type":"string"},"website":{"type":"string"}}}}}}
```

## The EtchBuildGetRewardDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"EtchBuildGetRewardDto":{"type":"object","properties":{"runeId":{"type":"string"},"userAddress":{"type":"string"}},"required":["runeId","userAddress"]}}}}
```

## The EtchSignAndBroadcastRewardTxDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"EtchSignAndBroadcastRewardTxDto":{"type":"object","properties":{"signedBase64Tx":{"type":"string"},"userAddress":{"type":"string"}},"required":["signedBase64Tx","userAddress"]}}}}
```

## The EtchUpdateDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"EtchUpdateDto":{"type":"object","properties":{"social":{"$ref":"#/components/schemas/EtchSocialDto"}}},"EtchSocialDto":{"type":"object","properties":{"x":{"type":"string"},"telegram":{"type":"string"},"website":{"type":"string"}}}}}}
```

## The EtchBuildOpenMintDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"EtchBuildOpenMintDto":{"type":"object","properties":{"runeId":{"type":"string"},"userAddress":{"type":"string"}},"required":["runeId"]}}}}
```

## The VMTransactionEntity object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"VMTransactionEntity":{"type":"object","properties":{"txId":{"type":"string"},"replaceTxId":{"type":"string"},"state":{"type":"string"},"runeId":{"type":"string"},"replacedRequestsCount":{"type":"number"},"requestsInMempoolCount":{"type":"number"},"requestsInBlocksCount":{"type":"number"},"satsPerNewRequest":{"type":"number"},"satsNewRequests":{"type":"number"},"satsPreviousRequests":{"type":"number"},"tradingAddress":{"type":"string"},"base64Tx":{"type":"string"},"timestamp":{"type":"number"},"transferBtcTxId":{"type":"string"},"transferBtcAt":{"type":"number"},"distributeRuneTxId":{"type":"string"},"distributeRuneAt":{"type":"number"},"refundTxId":{"type":"string"},"isRefundable":{"type":"boolean"},"vmDistributionId":{"type":"string"}},"required":["txId","replaceTxId","state","runeId","replacedRequestsCount","requestsInMempoolCount","requestsInBlocksCount","satsPerNewRequest","satsNewRequests","satsPreviousRequests","tradingAddress","base64Tx","timestamp","transferBtcTxId","transferBtcAt","distributeRuneTxId","distributeRuneAt","refundTxId","isRefundable","vmDistributionId"]}}}}
```

## The MintDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"MintDto":{"type":"object","properties":{"userAddress":{"type":"string"},"runeId":{"type":"string"},"requestCount":{"type":"number"},"satsNewRequests":{"type":"number"}},"required":["userAddress","runeId","requestCount","satsNewRequests"]}}}}
```

## The RequestClaimDiamondHandRewardsDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"RequestClaimDiamondHandRewardsDto":{"type":"object","properties":{"userAddress":{"type":"string"},"runeId":{"type":"string"}},"required":["userAddress","runeId"]}}}}
```

## The SignAndBroadcastRewardsDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"SignAndBroadcastRewardsDto":{"type":"object","properties":{"signedBase64Tx":{"type":"string"},"userAddress":{"type":"string"},"runeId":{"type":"string"}},"required":["signedBase64Tx","userAddress","runeId"]}}}}
```

## The ClaimBuildDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"ClaimBuildDto":{"type":"object","properties":{"payFeeAddress":{"type":"string","description":"Referrer's 2-of-2 trading wallet address. Funds the claim tx (fee + dust) AND receives the claimed bUSD. Must be the calling referrer's own `tradingAddress` — the BE validates this against `walletService` before building."}},"required":["payFeeAddress"]}}}}
```

## The ClaimSignDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"ClaimSignDto":{"type":"object","properties":{"signedBase64Tx":{"type":"string","description":"Base64-encoded PSBT signed by the referrer"}},"required":["signedBase64Tx"]}}}}
```

## The ChangePasswordDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"ChangePasswordDto":{"type":"object","properties":{"sessionId":{"type":"string","description":"Session ID returned by POST /auth/srp/change-password/init"},"clientPublic":{"type":"string","description":"Client ephemeral public key A = g^a mod N (base64)"},"clientProof":{"type":"string","description":"Client proof M1 = H(H(N)⊕H(g) || H(I) || salt || A || B || K) (base64)"},"newSrpSalt":{"type":"string","description":"New SRP salt generated client-side (base64, 32 bytes)"},"newSrpVerifier":{"type":"string","description":"New SRP verifier v = g^x mod N (base64)"},"newEncryptedBlob":{"type":"string","description":"Keystore blob re-encrypted with new derived key (base64, max 13708 chars)"},"newPasswordHint":{"type":"string","description":"New password hint"}},"required":["sessionId","clientPublic","clientProof","newSrpSalt","newSrpVerifier","newEncryptedBlob"]}}}}
```

## The RotateAuthWalletDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"RotateAuthWalletDto":{"type":"object","properties":{"address":{"type":"string","description":"Address of the NEW auth wallet"},"chain":{"type":"string","enum":["evm","solana","bitcoin"]},"publicKey":{"type":"string","description":"Public key of the NEW auth wallet (verifies EVM/Solana signatures)"},"provider":{"type":"string","description":"metamask | phantom | xverse | okx | unisat"},"challengeId":{"type":"string","description":"challengeId from GET /auth/wallet/challenge?address=<newAddress>"},"signature":{"type":"string","description":"NEW wallet signature over the issued server nonce (control proof)"},"encryptedBlob":{"type":"string","description":"Keystore blob re-encrypted client-side with the NEW wallet derivation key"}},"required":["address","chain","publicKey","provider","challengeId","signature","encryptedBlob"]}}}}
```

## The TotpToggleDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"TotpToggleDto":{"type":"object","properties":{}}}}}
```

## The SetAvatarDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"SetAvatarDto":{"type":"object","properties":{"inscriptionId":{"type":"string","description":"The inscriptionId to set as avatar. Pass null or omit to remove the avatar.","nullable":true}}}}}}
```

## The SetDefaultTokenDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"SetDefaultTokenDto":{"type":"object","properties":{"slot":{"type":"string","enum":["usdc"]},"tokenId":{"type":"string"}},"required":["slot","tokenId"]}}}}
```

## The RemoveDefaultTokenDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"RemoveDefaultTokenDto":{"type":"object","properties":{"slot":{"type":"string","enum":["usdc"]},"tokenId":{"type":"string"}},"required":["slot","tokenId"]}}}}
```

## The ChangeEmailInitDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"ChangeEmailInitDto":{"type":"object","properties":{"newEmail":{"type":"string","description":"New email address to associate with the account"}},"required":["newEmail"]}}}}
```

## The ChangeEmailSrpDataDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"ChangeEmailSrpDataDto":{"type":"object","properties":{"newSrpVerifier":{"type":"string","description":"New SRP verifier recomputed as SRP(newEmail, currentPassword)"},"sessionId":{"type":"string","description":"SRP session ID from the init response"},"clientPublic":{"type":"string","description":"SRP client public ephemeral"},"clientProof":{"type":"string","description":"SRP client proof"}},"required":["newSrpVerifier","sessionId","clientPublic","clientProof"]}}}}
```

## The ChangeEmailWebAuthnAssertionDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"ChangeEmailWebAuthnAssertionDto":{"type":"object","properties":{"authenticatorData":{"type":"string","description":"Base64-encoded authenticator data"},"clientDataJson":{"type":"string","description":"Base64-encoded client data JSON"},"signature":{"type":"string","description":"Base64-encoded DER signature"}},"required":["authenticatorData","clientDataJson","signature"]}}}}
```

## The ChangeEmailPasskeyDataDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"ChangeEmailPasskeyDataDto":{"type":"object","properties":{"credentialId":{"type":"string","description":"Credential ID of the registered passkey"},"challengeId":{"type":"string","description":"Challenge ID from the init response"},"webauthnAssertion":{"description":"WebAuthn assertion from the passkey device","allOf":[{"$ref":"#/components/schemas/ChangeEmailWebAuthnAssertionDto"}]}},"required":["credentialId","challengeId","webauthnAssertion"]},"ChangeEmailWebAuthnAssertionDto":{"type":"object","properties":{"authenticatorData":{"type":"string","description":"Base64-encoded authenticator data"},"clientDataJson":{"type":"string","description":"Base64-encoded client data JSON"},"signature":{"type":"string","description":"Base64-encoded DER signature"}},"required":["authenticatorData","clientDataJson","signature"]}}}}
```

## The ChangeEmailVerifyDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"ChangeEmailVerifyDto":{"type":"object","properties":{"token":{"type":"string","description":"Verification token from the change-email email link"},"email":{"type":"string","description":"New email address being verified (cross-verified against the token)"},"srpData":{"description":"SRP re-auth data — required when the account has an SRP keystore","allOf":[{"$ref":"#/components/schemas/ChangeEmailSrpDataDto"}]},"passkeyData":{"description":"Passkey re-auth data — required when the account has a passkey keystore","allOf":[{"$ref":"#/components/schemas/ChangeEmailPasskeyDataDto"}]}},"required":["token","email"]},"ChangeEmailSrpDataDto":{"type":"object","properties":{"newSrpVerifier":{"type":"string","description":"New SRP verifier recomputed as SRP(newEmail, currentPassword)"},"sessionId":{"type":"string","description":"SRP session ID from the init response"},"clientPublic":{"type":"string","description":"SRP client public ephemeral"},"clientProof":{"type":"string","description":"SRP client proof"}},"required":["newSrpVerifier","sessionId","clientPublic","clientProof"]},"ChangeEmailPasskeyDataDto":{"type":"object","properties":{"credentialId":{"type":"string","description":"Credential ID of the registered passkey"},"challengeId":{"type":"string","description":"Challenge ID from the init response"},"webauthnAssertion":{"description":"WebAuthn assertion from the passkey device","allOf":[{"$ref":"#/components/schemas/ChangeEmailWebAuthnAssertionDto"}]}},"required":["credentialId","challengeId","webauthnAssertion"]},"ChangeEmailWebAuthnAssertionDto":{"type":"object","properties":{"authenticatorData":{"type":"string","description":"Base64-encoded authenticator data"},"clientDataJson":{"type":"string","description":"Base64-encoded client data JSON"},"signature":{"type":"string","description":"Base64-encoded DER signature"}},"required":["authenticatorData","clientDataJson","signature"]}}}}
```

## The RequestLinkDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"RequestLinkDto":{"type":"object","properties":{"email":{"type":"string","description":"Email of the account Device B wants to link to"},"pubKeyB":{"type":"string","description":"Device B ephemeral ECDH public key (base64 or hex)"}},"required":["email","pubKeyB"]}}}}
```

## The ApproveLinkDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"ApproveLinkDto":{"type":"object","properties":{"otp":{"type":"string","description":"OTP from the request-link session"},"encryptedForB":{"type":"string","description":"AES-GCM encrypted mnemonic, key derived via ECDH (base64)"},"pubKeyA":{"type":"string","description":"Device A ephemeral ECDH public key (base64 or hex)"}},"required":["otp","encryptedForB","pubKeyA"]}}}}
```

## The ConfirmLinkDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"ConfirmLinkDto":{"type":"object","properties":{"otp":{"type":"string","description":"OTP from the request-link session"},"email":{"type":"string","description":"Email address — must match the account that owns the OTP session"},"challengeId":{"type":"string","description":"Challenge ID from GET /auth/webauthn/challenge"},"credentialId":{"type":"string","description":"WebAuthn credential ID"},"webauthnPublicKey":{"type":"string","description":"DER/SPKI public key (base64)"},"attestation":{"type":"string","description":"CBOR attestation object (base64)"},"clientDataJson":{"type":"string","description":"WebAuthn clientDataJSON (base64)"},"authenticatorData":{"type":"string","description":"WebAuthn authenticatorData (base64)"},"encryptedBlob":{"type":"string","description":"Keystore blob encrypted with Device B derived key"},"deviceName":{"type":"string","description":"Human-readable device label (e.g. \"Work Laptop\")"}},"required":["otp","email","challengeId","credentialId","webauthnPublicKey","attestation","clientDataJson","authenticatorData","encryptedBlob"]}}}}
```

## The RequestPasswordHintDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"RequestPasswordHintDto":{"type":"object","properties":{"email":{"type":"string","description":"Email address of the account to send the password hint to"}},"required":["email"]}}}}
```

## The VerifyInscriptionsDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"VerifyInscriptionsDto":{"type":"object","properties":{"inscriptionIds":{"description":"Array of inscription IDs to verify","minItems":1,"maxItems":3,"type":"array","items":{"type":"string"}},"walletAddress":{"type":"string"}},"required":["inscriptionIds"]}}}}
```

## The AuthenticateDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"AuthenticateDto":{"type":"object","properties":{"message":{"type":"string","description":"The message that was signed"},"signature":{"type":"string","description":"The BIP322 signature of the message"},"address":{"type":"string","description":"The Bitcoin address that signed the message"},"publicKey":{"type":"string","description":"The public key used for signing"}},"required":["message","signature","address","publicKey"]}}}}
```

## The RefreshTokenDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"RefreshTokenDto":{"type":"object","properties":{"refreshToken":{"type":"string","description":"Refresh token to generate new access token"}},"required":["refreshToken"]}}}}
```

## The EmailVerificationRequestDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"EmailVerificationRequestDto":{"type":"object","properties":{"email":{"type":"string","description":"Email address to send OTP to"}},"required":["email"]}}}}
```

## The RegisterPasskeyDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"RegisterPasskeyDto":{"type":"object","properties":{"challengeId":{"type":"string"},"credentialId":{"type":"string"},"webauthnPublicKey":{"type":"string"},"attestation":{"type":"string"},"clientDataJson":{"type":"string"},"authenticatorData":{"type":"string"},"encryptedBlob":{"type":"string"},"deviceName":{"type":"string"}},"required":["challengeId","credentialId","webauthnPublicKey","attestation","clientDataJson","authenticatorData","encryptedBlob"]}}}}
```

## The RegisterSrpDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"RegisterSrpDto":{"type":"object","properties":{"srpSalt":{"type":"string","description":"Random salt generated client-side (base64, 32 bytes)"},"srpVerifier":{"type":"string","description":"SRP verifier v = g^x mod N (base64), x = H(salt || H(email:password))"},"encryptedBlob":{"type":"string"},"passwordHint":{"type":"string"}},"required":["srpSalt","srpVerifier","encryptedBlob"]}}}}
```

## The RegisterWalletAuthDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"RegisterWalletAuthDto":{"type":"object","properties":{"address":{"type":"string"},"chain":{"type":"string","enum":["evm","solana","bitcoin"]},"publicKey":{"type":"string"},"provider":{"type":"string"},"challengeId":{"type":"string"},"signature":{"type":"string"},"encryptedBlob":{"type":"string"}},"required":["address","chain","publicKey","provider","challengeId","signature","encryptedBlob"]}}}}
```

## The RegisterBtcWalletDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"RegisterBtcWalletDto":{"type":"object","properties":{"publicKey":{"type":"string"},"address":{"type":"string"},"message":{"type":"string"},"signature":{"type":"string"}},"required":["publicKey","address","message","signature"]}}}}
```

## The RegisterEvmWalletDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"RegisterEvmWalletDto":{"type":"object","properties":{"publicKey":{"type":"string"},"message":{"type":"string"},"signature":{"type":"string"}},"required":["publicKey","message","signature"]}}}}
```

## The RegisterSolWalletDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"RegisterSolWalletDto":{"type":"object","properties":{"publicKey":{"type":"string"},"message":{"type":"string"},"signature":{"type":"string"}},"required":["publicKey","message","signature"]}}}}
```

## The RegisterWalletsDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"RegisterWalletsDto":{"type":"object","properties":{"btc":{"$ref":"#/components/schemas/RegisterBtcWalletDto"},"evm":{"$ref":"#/components/schemas/RegisterEvmWalletDto"},"sol":{"$ref":"#/components/schemas/RegisterSolWalletDto"}},"required":["btc","evm","sol"]},"RegisterBtcWalletDto":{"type":"object","properties":{"publicKey":{"type":"string"},"address":{"type":"string"},"message":{"type":"string"},"signature":{"type":"string"}},"required":["publicKey","address","message","signature"]},"RegisterEvmWalletDto":{"type":"object","properties":{"publicKey":{"type":"string"},"message":{"type":"string"},"signature":{"type":"string"}},"required":["publicKey","message","signature"]},"RegisterSolWalletDto":{"type":"object","properties":{"publicKey":{"type":"string"},"message":{"type":"string"},"signature":{"type":"string"}},"required":["publicKey","message","signature"]}}}}
```

## The RegisterDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"RegisterDto":{"type":"object","properties":{"email":{"type":"string"},"otp":{"type":"string"},"authType":{"type":"string","enum":["passkey","srp","wallet"]},"passkey":{"$ref":"#/components/schemas/RegisterPasskeyDto"},"srpData":{"$ref":"#/components/schemas/RegisterSrpDto"},"walletAuth":{"$ref":"#/components/schemas/RegisterWalletAuthDto"},"wallets":{"$ref":"#/components/schemas/RegisterWalletsDto"},"referralCode":{"type":"string","description":"Referral code (base64url-encoded referrer accountId). Throws if invalid."}},"required":["email","otp","authType","wallets"]},"RegisterPasskeyDto":{"type":"object","properties":{"challengeId":{"type":"string"},"credentialId":{"type":"string"},"webauthnPublicKey":{"type":"string"},"attestation":{"type":"string"},"clientDataJson":{"type":"string"},"authenticatorData":{"type":"string"},"encryptedBlob":{"type":"string"},"deviceName":{"type":"string"}},"required":["challengeId","credentialId","webauthnPublicKey","attestation","clientDataJson","authenticatorData","encryptedBlob"]},"RegisterSrpDto":{"type":"object","properties":{"srpSalt":{"type":"string","description":"Random salt generated client-side (base64, 32 bytes)"},"srpVerifier":{"type":"string","description":"SRP verifier v = g^x mod N (base64), x = H(salt || H(email:password))"},"encryptedBlob":{"type":"string"},"passwordHint":{"type":"string"}},"required":["srpSalt","srpVerifier","encryptedBlob"]},"RegisterWalletAuthDto":{"type":"object","properties":{"address":{"type":"string"},"chain":{"type":"string","enum":["evm","solana","bitcoin"]},"publicKey":{"type":"string"},"provider":{"type":"string"},"challengeId":{"type":"string"},"signature":{"type":"string"},"encryptedBlob":{"type":"string"}},"required":["address","chain","publicKey","provider","challengeId","signature","encryptedBlob"]},"RegisterWalletsDto":{"type":"object","properties":{"btc":{"$ref":"#/components/schemas/RegisterBtcWalletDto"},"evm":{"$ref":"#/components/schemas/RegisterEvmWalletDto"},"sol":{"$ref":"#/components/schemas/RegisterSolWalletDto"}},"required":["btc","evm","sol"]},"RegisterBtcWalletDto":{"type":"object","properties":{"publicKey":{"type":"string"},"address":{"type":"string"},"message":{"type":"string"},"signature":{"type":"string"}},"required":["publicKey","address","message","signature"]},"RegisterEvmWalletDto":{"type":"object","properties":{"publicKey":{"type":"string"},"message":{"type":"string"},"signature":{"type":"string"}},"required":["publicKey","message","signature"]},"RegisterSolWalletDto":{"type":"object","properties":{"publicKey":{"type":"string"},"message":{"type":"string"},"signature":{"type":"string"}},"required":["publicKey","message","signature"]}}}}
```

## The WebAuthnAssertionDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"WebAuthnAssertionDto":{"type":"object","properties":{"authenticatorData":{"type":"string"},"clientDataJson":{"type":"string"},"signature":{"type":"string"}},"required":["authenticatorData","clientDataJson","signature"]}}}}
```

## The LoginDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"LoginDto":{"type":"object","properties":{"credentialId":{"type":"string"},"challengeId":{"type":"string"},"webauthnAssertion":{"$ref":"#/components/schemas/WebAuthnAssertionDto"}},"required":["credentialId","challengeId","webauthnAssertion"]},"WebAuthnAssertionDto":{"type":"object","properties":{"authenticatorData":{"type":"string"},"clientDataJson":{"type":"string"},"signature":{"type":"string"}},"required":["authenticatorData","clientDataJson","signature"]}}}}
```

## The SrpInitDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"SrpInitDto":{"type":"object","properties":{"email":{"type":"string","description":"Account email"}},"required":["email"]}}}}
```

## The SrpVerifyDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"SrpVerifyDto":{"type":"object","properties":{"sessionId":{"type":"string","description":"Session ID returned by srp/init"},"clientPublic":{"type":"string","description":"Client ephemeral public key A = g^a mod N (base64)"},"clientProof":{"type":"string","description":"Client proof M1 = H(H(N)⊕H(g) || H(I) || salt || A || B || K) (base64)"}},"required":["sessionId","clientPublic","clientProof"]}}}}
```

## The WalletLoginDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"WalletLoginDto":{"type":"object","properties":{"address":{"type":"string","description":"Registered auth wallet address"},"challengeId":{"type":"string","description":"challengeId from GET /auth/wallet/challenge"},"signature":{"type":"string","description":"Wallet signature over the issued server nonce"}},"required":["address","challengeId","signature"]}}}}
```

## The TotpVerifyDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"TotpVerifyDto":{"type":"object","properties":{}}}}}
```

## The ISignedFields object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"ISignedFields":{"type":"object","properties":{"key":{"type":"string"},"Policy":{"type":"string"},"bucket":{"type":"string"},"X-Amz-Date":{"type":"string"},"Content-Type":{"type":"string"},"X-Amz-Algorithm":{"type":"string"},"X-Amz-Signature":{"type":"string"},"X-Amz-Credential":{"type":"string"}},"required":["key","Policy","bucket","X-Amz-Date","Content-Type","X-Amz-Algorithm","X-Amz-Signature","X-Amz-Credential"]}}}}
```

## The ISignedUrl object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"ISignedUrl":{"type":"object","properties":{"url":{"type":"string"},"fields":{"$ref":"#/components/schemas/ISignedFields"}},"required":["url","fields"]},"ISignedFields":{"type":"object","properties":{"key":{"type":"string"},"Policy":{"type":"string"},"bucket":{"type":"string"},"X-Amz-Date":{"type":"string"},"Content-Type":{"type":"string"},"X-Amz-Algorithm":{"type":"string"},"X-Amz-Signature":{"type":"string"},"X-Amz-Credential":{"type":"string"}},"required":["key","Policy","bucket","X-Amz-Date","Content-Type","X-Amz-Algorithm","X-Amz-Signature","X-Amz-Credential"]}}}}
```

## The RuneEtchMediaEntity object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"RuneEtchMediaEntity":{"type":"object","properties":{"key":{"type":"string"},"url":{"type":"string"},"signedUrl":{"$ref":"#/components/schemas/ISignedUrl"},"fileName":{"type":"string"},"mimeType":{"type":"string"},"size":{"type":"number"}},"required":["key","url","signedUrl","fileName","mimeType","size"]},"ISignedUrl":{"type":"object","properties":{"url":{"type":"string"},"fields":{"$ref":"#/components/schemas/ISignedFields"}},"required":["url","fields"]},"ISignedFields":{"type":"object","properties":{"key":{"type":"string"},"Policy":{"type":"string"},"bucket":{"type":"string"},"X-Amz-Date":{"type":"string"},"Content-Type":{"type":"string"},"X-Amz-Algorithm":{"type":"string"},"X-Amz-Signature":{"type":"string"},"X-Amz-Credential":{"type":"string"}},"required":["key","Policy","bucket","X-Amz-Date","Content-Type","X-Amz-Algorithm","X-Amz-Signature","X-Amz-Credential"]}}}}
```

## The ItemPresignedUrlDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"ItemPresignedUrlDto":{"type":"object","properties":{"filename":{"type":"string"}},"required":["filename"]}}}}
```

## The PresignedUrlDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"PresignedUrlDto":{"type":"object","properties":{"files":{"type":"array","items":{"$ref":"#/components/schemas/ItemPresignedUrlDto"}},"userAddress":{"type":"string"}},"required":["files","userAddress"]},"ItemPresignedUrlDto":{"type":"object","properties":{"filename":{"type":"string"}},"required":["filename"]}}}}
```

## The CreatePolicySignatureDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"CreatePolicySignatureDto":{"type":"object","properties":{"message":{"type":"string"},"userAddress":{"type":"string"},"signature":{"type":"string"}},"required":["message","userAddress","signature"]}}}}
```

## The SettingUpdateDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"SettingUpdateDto":{"type":"object","properties":{"key":{"type":"string","enum":["virtual_mint","transaction","pool","sodax","keystore","bound_lending","satflow","email","message_processor","email_outbox","app","permission","referral","ordinal_drop"]},"data":{"type":"object"}},"required":["key","data"]}}}}
```

## The CreateRefundDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"CreateRefundDto":{"type":"object","properties":{"type":{"type":"string","enum":["virtual_mint"]},"runeIds":{"description":"require if refund type is \"virtual_mint\"","type":"array","items":{"type":"string"}},"userAddress":{"type":"string"}},"required":["type","userAddress"]}}}}
```

## The BroadcastRefundDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"BroadcastRefundDto":{"type":"object","properties":{"base64Psbt":{"type":"string"},"userAddress":{"type":"string"}},"required":["base64Psbt","userAddress"]}}}}
```

## The AdminCreateRefundDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"AdminCreateRefundDto":{"type":"object","properties":{"runeIds":{"type":"array","items":{"type":"string"}},"userAddresses":{"type":"array","items":{"type":"string"}},"isBroadcast":{"type":"boolean"},"states":{"type":"array","items":{"type":"string"}}},"required":["runeIds","userAddresses","isBroadcast","states"]}}}}
```

## The EventSourceRegisterDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"EventSourceRegisterDto":{"type":"object","properties":{"userAddress":{"type":"string"}},"required":["userAddress"]}}}}
```

## The ActivityFeedItemDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"ActivityFeedItemDto":{"type":"object","properties":{"source":{"type":"string","enum":["amm","sodax"]},"pair":{"type":"string"},"amountSold":{"type":"string"},"tokenSoldSymbol":{"type":"string","description":"Symbol of token sold (for display)"},"amountReceived":{"type":"string"},"tokenReceivedSymbol":{"type":"string","description":"Symbol of token received (for display)"},"tradeValueUsd":{"type":"number"},"trader":{"type":"string"},"time":{"type":"number"},"txId":{"type":"string"}},"required":["source","pair","amountSold","tokenSoldSymbol","amountReceived","tokenReceivedSymbol","tradeValueUsd","trader","time","txId"]}}}}
```

## The ActivityFeedResponseDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"ActivityFeedResponseDto":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/ActivityFeedItemDto"}},"metaData":{"$ref":"#/components/schemas/ResponseMetaData"}},"required":["code","message","data","metaData"]},"ActivityFeedItemDto":{"type":"object","properties":{"source":{"type":"string","enum":["amm","sodax"]},"pair":{"type":"string"},"amountSold":{"type":"string"},"tokenSoldSymbol":{"type":"string","description":"Symbol of token sold (for display)"},"amountReceived":{"type":"string"},"tokenReceivedSymbol":{"type":"string","description":"Symbol of token received (for display)"},"tradeValueUsd":{"type":"number"},"trader":{"type":"string"},"time":{"type":"number"},"txId":{"type":"string"}},"required":["source","pair","amountSold","tokenSoldSymbol","amountReceived","tokenReceivedSymbol","tradeValueUsd","trader","time","txId"]},"ResponseMetaData":{"type":"object","properties":{"totalItems":{"type":"number"},"currentPage":{"type":"number"},"pageSize":{"type":"number"},"totalPages":{"type":"number"}},"required":["totalItems","currentPage","pageSize","totalPages"]}}}}
```

## The ImportExpiredTxsDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"ImportExpiredTxsDto":{"type":"object","properties":{"expiredTxs":{"description":"Token0 ID","type":"array","items":{"type":"string"}}},"required":["expiredTxs"]}}}}
```

## The CreateSodaxTxDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"CreateSodaxTxDto":{"type":"object","properties":{"type":{"type":"string","enum":["sodax-withdraw","sodax-withdraw-musig2","sodax-solver-swap"]},"params":{"type":"object"}},"required":["type","params"]}}}}
```

## The RelayDataDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"RelayDataDto":{"type":"object","properties":{"address":{"type":"string","description":"Hub destination address"},"payload":{"type":"string","description":"Encoded intent instruction payload"}},"required":["address","payload"]}}}}
```

## The SignSodaxTransactionParamsDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"SignSodaxTransactionParamsDto":{"type":"object","properties":{"userAddress":{"type":"string","description":"Set from JWT token. Do not send from client."},"signedBase64Tx":{"type":"string"},"relayData":{"description":"Relay extra data from SDK createIntent(). Required for BTC relay resubmit.","allOf":[{"$ref":"#/components/schemas/RelayDataDto"}]}},"required":["signedBase64Tx"]},"RelayDataDto":{"type":"object","properties":{"address":{"type":"string","description":"Hub destination address"},"payload":{"type":"string","description":"Encoded intent instruction payload"}},"required":["address","payload"]}}}}
```

## The SignSodaxTransactionDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"SignSodaxTransactionDto":{"type":"object","properties":{"type":{"type":"string","enum":["sodax-withdraw","sodax-withdraw-musig2","sodax-solver-swap"]},"params":{"$ref":"#/components/schemas/SignSodaxTransactionParamsDto"}},"required":["type","params"]},"SignSodaxTransactionParamsDto":{"type":"object","properties":{"userAddress":{"type":"string","description":"Set from JWT token. Do not send from client."},"signedBase64Tx":{"type":"string"},"relayData":{"description":"Relay extra data from SDK createIntent(). Required for BTC relay resubmit.","allOf":[{"$ref":"#/components/schemas/RelayDataDto"}]}},"required":["signedBase64Tx"]},"RelayDataDto":{"type":"object","properties":{"address":{"type":"string","description":"Hub destination address"},"payload":{"type":"string","description":"Encoded intent instruction payload"}},"required":["address","payload"]}}}}
```

## The PartnerTxEntity object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"PartnerTxEntity":{"type":"object","properties":{}}}}}
```

## The SodaxResponseDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"SodaxResponseDto":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/PartnerTxEntity"}},"metaData":{"$ref":"#/components/schemas/ResponseMetaData"}},"required":["code","message","data","metaData"]},"PartnerTxEntity":{"type":"object","properties":{}},"ResponseMetaData":{"type":"object","properties":{"totalItems":{"type":"number"},"currentPage":{"type":"number"},"pageSize":{"type":"number"},"totalPages":{"type":"number"}},"required":["totalItems","currentPage","pageSize","totalPages"]}}}}
```

## The SignBoundLendingPsbtDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"SignBoundLendingPsbtDto":{"type":"object","properties":{"psbtBase64":{"type":"string","description":"Base64-encoded PSBT with all required signatures except RadFi BE trading wallet co-sign"},"type":{"type":"string","description":"PSBT type: origination, repayment, option_origination, or option_exercise","enum":["origination","repayment","option_origination","option_exercise","order_book_premium"]},"userAccountId":{"type":"string","description":"Borrower's Bound accountId (24-hex Mongo ObjectId). When set on an origination PSBT, the server resolves the borrower's referrer (if any) and enforces that the referrer's address appears as an output receiving a proportional bUSD share of the protocol fee (referralFeeBps / MAX_FEE). Optional — omit to skip referrer validation."},"userTradingAddress":{"type":"string","description":"Trading wallet address of the user who initiates from the FE (borrower for lending, seller for options)"},"solverTradingAddress":{"type":"string","description":"Trading wallet address of the solver/counterparty (lender for lending, buyer for options)"},"borrowerPubkey":{"type":"string","description":"Borrower 33-byte compressed pubkey hex (required for origination/repayment)"},"lenderPubkey":{"type":"string","description":"Lender 33-byte compressed pubkey hex (required for origination/repayment)"},"forfeitureExpiryTimestamp":{"type":"number","description":"Absolute Unix timestamp for forfeiture CLTV leaf (required for origination/repayment)"},"previousLenderPubkey":{"type":"string","description":"Lender 33-byte compressed pubkey hex of the previous loan escrow being rolled over. Required only when the origination PSBT spends a previous escrow input (rollover)."},"previousForfeitureExpiryTimestamp":{"type":"number","description":"Forfeiture CLTV expiry timestamp of the previous loan escrow being rolled over. When set, the origination PSBT is treated as a rollover: input 0 must spend the reconstructed previous escrow (script-path) and the metadata OP_RETURN flag must be 0x04."},"previousLenderTradingAddress":{"type":"string","description":"Previous lender trading wallet address (used in cross-lender rollover to allow the payment output back to the previous lender)."},"sellerPubkey":{"type":"string","description":"Seller 33-byte compressed pubkey hex (required for option_origination/option_exercise)"},"escrowExpiryTimestamp":{"type":"number","description":"Absolute Unix timestamp for escrow CLTV expiry (required for option_origination/option_exercise)"},"hashY":{"type":"string","description":"SHA256 hash Y (32-byte hex) for HTLC escrow (required for option_origination/option_exercise)"}},"required":["psbtBase64","type"]}}}}
```

## The SignBoundLendingPsbtResponseDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"SignBoundLendingPsbtResponseDto":{"type":"object","properties":{"txId":{"type":"string","description":"Transaction ID of the broadcasted transaction"},"hex":{"type":"string","description":"Raw transaction hex"}},"required":["txId","hex"]}}}}
```

## The DownloadHistoryFilterDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"DownloadHistoryFilterDto":{"type":"object","properties":{"chain":{"type":"string","enum":["bitcoin","ethereum"]},"type":{"type":"string","enum":["swap","withdraw_liquidity","collect_fee","init_pool","provide_liquidity","increase_liquidity","withdraw","withdraw_rune_stable_coin","renew_utxo","protocol_collect_fee","splitting_orders","deposit","satflow_list","satflow_cancel","satflow_buy"]},"from":{"type":"string"},"to":{"type":"string"}}}}}}
```

## The CreateDownloadHistoryDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"CreateDownloadHistoryDto":{"type":"object","properties":{"format":{"type":"string","enum":["csv","json","pdf"]},"filter":{"$ref":"#/components/schemas/DownloadHistoryFilterDto"}},"required":["format","filter"]},"DownloadHistoryFilterDto":{"type":"object","properties":{"chain":{"type":"string","enum":["bitcoin","ethereum"]},"type":{"type":"string","enum":["swap","withdraw_liquidity","collect_fee","init_pool","provide_liquidity","increase_liquidity","withdraw","withdraw_rune_stable_coin","renew_utxo","protocol_collect_fee","splitting_orders","deposit","satflow_list","satflow_cancel","satflow_buy"]},"from":{"type":"string"},"to":{"type":"string"}}}}}}
```

## The CreateSatflowTxDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"CreateSatflowTxDto":{"type":"object","properties":{"type":{"type":"string","enum":["satflow-list","satflow-cancel","satflow-buy"]},"userAddress":{"type":"string"},"inscriptionId":{"type":"string"},"priceInSats":{"type":"string"},"orderIds":{"type":"array","items":{"type":"string"}},"orderType":{"type":"string"},"inscriptionIds":{"description":"Inscription IDs to buy","type":"array","items":{"type":"string"}}},"required":["type","userAddress"]}}}}
```

## The SignSatflowTxDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"SignSatflowTxDto":{"type":"object","properties":{"type":{"type":"string","enum":["satflow-list","satflow-cancel","satflow-buy"]},"userAddress":{"type":"string"},"signedPsbt":{"type":"string"},"intentId":{"type":"string"},"signedChallenge":{"type":"string"},"signedSecureListingPsbts":{"type":"array","items":{"type":"string"}},"signedPaymentPrepPsbts":{"type":"array","items":{"type":"string"}},"signedPurchasePsbts":{"type":"array","items":{"type":"string"}},"signedTransferPsbt":{"type":"string"},"feeRate":{"type":"number"}},"required":["type","userAddress","intentId"]}}}}
```

## The RevertSatflowBuyDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"RevertSatflowBuyDto":{"type":"object","properties":{"inscriptionId":{"type":"string","description":"Inscription ID of the BUY intent to revert (FE tracks this, not the server-generated txId)"},"userAddress":{"type":"string"}},"required":["inscriptionId","userAddress"]}}}}
```

## The SeedPrizeDto object

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"components":{"schemas":{"SeedPrizeDto":{"type":"object","properties":{"prizeNumber":{"type":"number","description":"Prize number (1..100)"},"name":{"type":"string"},"inscriptionId":{"type":"string","description":"Ordinal inscription id"},"controllingUtxo":{"type":"string","description":"Treasury UTXO holding the inscription (txid:vout)"}},"required":["prizeNumber","name","inscriptionId","controllingUtxo"]}}}}
```
