import https from "../utils/https";
import {ContentType, Method} from "axios-mapper";

export async function getAddressList(data: any) {
  return await (await https(true)).request('/admin/address/get', Method.POST, data, ContentType.json);
}

export async function makeAddress(data: any) {
  return await (await https(true, true)).request('/admin/address/make', Method.POST, data, ContentType.json);
}

export async function getNotifyList(data: any) {
  return await (await https(true)).request('/admin/notify/get', Method.POST, data, ContentType.json);
}

export async function triggerNotify(data: any) {
  return await (await https(true, true)).request('/admin/notify/trigger', Method.POST, data, ContentType.json);
}

export async function getWithdrawalLog(data: any) {
  return await (await https(true)).request('/admin/address/withdrawalLog', Method.POST, data, ContentType.json);
}

export async function withdrawal(data: any) {
  return await (await https(true, true)).request('/admin/address/withdrawal', Method.POST, data, ContentType.json);
}

export async function getWithdrawalAccount(data: any) {
  return await (await https(true)).request('/admin/address/withdrawal/get', Method.GET, data, ContentType.form);
}

export async function getListenInfo(data: any) {
  return await (await https(true)).request('/admin/listen/get', Method.GET, data, ContentType.form);
}
