Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions rest/v0/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,99 +8,99 @@ export const APIVersion = '0';
export const Routes = {
/**
* Route for:
* - GET `/user`
* - GET `/user` - Gets info about the logged in user.
*/
user() {
return '/user' as const;
},
/**
* Route for:
* - GET `/user/connections`
* - GET `/user/connections` - Returns all platforms connected to this user.
*/
userConnections() {
return '/user/connections' as const;
},
/**
* Route for:
* - GET `/account/wallets`
* - GET `/account/wallets` - Returns all balances
*/
accountWallets() {
return '/account/wallets' as const;
},
/**
* Route for:
* - GET `/account/wallets/{code}`
* - GET `/account/wallets/{code}` - Balance of chosen wallet
*/
accountWallet(code: ApiCurrencyIdentifier) {
return `/account/wallets/${code}` as const;
},
/**
* Route for:
* - GET `/account/wallets/{code}/addresses`
* - GET `/account/wallets/{code}/addresses` - Gets deposit address or addresses for selected currency
*/
accountWalletAddresses(code: string) {
return `/account/wallets/${code}/addresses` as const;
},
/**
* Route for:
* - GET `/account/wallets/{code}/destination_info`
* - GET `/account/wallets/{code}/destination_info` - Validates destination address and extra for selected currency
*/
accountWalletDestinationInfo(code: string) {
return `/account/wallets/${code}/destination_info` as const;
},
/**
* Route for:
* - POST `/account/wallets/{code}/withdrawal`
* - POST `/account/wallets/{code}/withdrawal` - Creates a withdrawal request
*/
accountWalletWithdrawal(code: string) {
return `/account/wallets/${code}/withdrawal` as const;
},
/**
* Route for:
* - PUT `/account/wallets/{code}/withdrawal/{id}`
* - DELETE `/account/wallets/{code}/withdrawal/{id}`
* - PUT `/account/wallets/{code}/withdrawal/{id}` - Sends a withdrawal
* - DELETE `/account/wallets/{code}/withdrawal/{id}` - Cancel a withdrawal
*/
accountWalletWithdrawalId(code: string, id: string) {
return `/account/wallets/${code}/withdrawal/${id}` as const;
},
/**
* Route for:
* - GET `/account/wallets/transactions`
* - GET `/account/wallets/transactions` - List of user's tips, deposits and withdrawals
*/
accountWalletTransactions() {
return '/account/wallets/transactions' as const;
},
/**
* Route for:
* - GET `/account/wallets/transactions/{id}`
* - GET `/account/wallets/transactions/{id}` - Get a single tip, deposit or withdrawal by ID
*/
accountWalletTransaction(id: string) {
return `/account/wallets/transactions/${id}` as const;
},
/**
* Route for:
* - POST `/tips`
* - POST `/tips` - Sends a tip
*/
tips() {
return '/tips' as const;
},
/**
* Route for:
* - GET `/currencies/cryptocurrencies`
* - GET `/currencies/cryptocurrencies` - List of all supported cryptocurrencies
*/
currenciesCryptocurrencies() {
return '/currencies/cryptocurrencies' as const;
},
/**
* Route for:
* - GET `/currencies/fiats`
* - GET `/currencies/fiats` - List of all supported fiat currencies
*/
currenciesFiats() {
return '/currencies/fiats' as const;
},
/**
* Route for:
* - GET `/currencies/rates`
* - GET `/currencies/rates` - Exchange rates for all supported currencies
*/
currenciesRates() {
return '/currencies/rates' as const;
Expand Down