Browse Source

新增转赠功能

dev
long 3 years ago
parent
commit
68a6fb0cc5
  1. 19
      conflux-admin/src/main/java/com/conflux/web/controller/api/ConfluxAipController.java
  2. 6
      conflux-admin/src/main/java/com/conflux/web/controller/nft/domain/CheckArgs.java
  3. 70
      conflux-admin/src/main/java/com/conflux/web/controller/nft/domain/ConfluxExecutor.java
  4. 4
      conflux-admin/src/main/java/com/conflux/web/controller/nft/service/ConfluxService.java
  5. 205
      conflux-admin/src/main/java/com/conflux/web/controller/nft/service/impl/ConfluxServiceImpl.java
  6. 22
      conflux-admin/src/main/java/com/conflux/web/controller/tool/SwaggerUiController.java
  7. 2
      conflux-admin/src/main/java/com/conflux/web/controller/util/AESUtil.java
  8. 10
      conflux-admin/src/main/resources/META-INF/MANIFEST.MF
  9. BIN
      conflux-admin/src/main/resources/META-INF/resources/webjars/springfox-swagger-ui/favicon-16x16.png
  10. BIN
      conflux-admin/src/main/resources/META-INF/resources/webjars/springfox-swagger-ui/favicon-32x32.png
  11. BIN
      conflux-admin/src/main/resources/META-INF/resources/webjars/springfox-swagger-ui/fonts/open-sans-v15-latin-700.woff
  12. BIN
      conflux-admin/src/main/resources/META-INF/resources/webjars/springfox-swagger-ui/fonts/open-sans-v15-latin-700.woff2
  13. BIN
      conflux-admin/src/main/resources/META-INF/resources/webjars/springfox-swagger-ui/fonts/open-sans-v15-latin-regular.woff
  14. BIN
      conflux-admin/src/main/resources/META-INF/resources/webjars/springfox-swagger-ui/fonts/open-sans-v15-latin-regular.woff2
  15. BIN
      conflux-admin/src/main/resources/META-INF/resources/webjars/springfox-swagger-ui/fonts/source-code-pro-v7-latin-300.woff
  16. BIN
      conflux-admin/src/main/resources/META-INF/resources/webjars/springfox-swagger-ui/fonts/source-code-pro-v7-latin-300.woff2
  17. BIN
      conflux-admin/src/main/resources/META-INF/resources/webjars/springfox-swagger-ui/fonts/source-code-pro-v7-latin-600.woff
  18. BIN
      conflux-admin/src/main/resources/META-INF/resources/webjars/springfox-swagger-ui/fonts/source-code-pro-v7-latin-600.woff2
  19. BIN
      conflux-admin/src/main/resources/META-INF/resources/webjars/springfox-swagger-ui/fonts/titillium-web-v6-latin-600.woff
  20. BIN
      conflux-admin/src/main/resources/META-INF/resources/webjars/springfox-swagger-ui/fonts/titillium-web-v6-latin-600.woff2
  21. BIN
      conflux-admin/src/main/resources/META-INF/resources/webjars/springfox-swagger-ui/fonts/titillium-web-v6-latin-700.woff
  22. BIN
      conflux-admin/src/main/resources/META-INF/resources/webjars/springfox-swagger-ui/fonts/titillium-web-v6-latin-700.woff2
  23. BIN
      conflux-admin/src/main/resources/META-INF/resources/webjars/springfox-swagger-ui/fonts/titillium-web-v6-latin-regular.woff
  24. BIN
      conflux-admin/src/main/resources/META-INF/resources/webjars/springfox-swagger-ui/fonts/titillium-web-v6-latin-regular.woff2
  25. 75
      conflux-admin/src/main/resources/META-INF/resources/webjars/springfox-swagger-ui/index.html
  26. 68
      conflux-admin/src/main/resources/META-INF/resources/webjars/springfox-swagger-ui/oauth2-redirect.html
  27. 69
      conflux-admin/src/main/resources/META-INF/resources/webjars/springfox-swagger-ui/springfox.css
  28. 2
      conflux-admin/src/main/resources/META-INF/resources/webjars/springfox-swagger-ui/springfox.js
  29. 1
      conflux-admin/src/main/resources/META-INF/resources/webjars/springfox-swagger-ui/springfox.js.map
  30. 92
      conflux-admin/src/main/resources/META-INF/resources/webjars/springfox-swagger-ui/swagger-ui-bundle.js
  31. 1
      conflux-admin/src/main/resources/META-INF/resources/webjars/springfox-swagger-ui/swagger-ui-bundle.js.map
  32. 22
      conflux-admin/src/main/resources/META-INF/resources/webjars/springfox-swagger-ui/swagger-ui-standalone-preset.js
  33. 1
      conflux-admin/src/main/resources/META-INF/resources/webjars/springfox-swagger-ui/swagger-ui-standalone-preset.js.map
  34. 4
      conflux-admin/src/main/resources/META-INF/resources/webjars/springfox-swagger-ui/swagger-ui.css
  35. 1
      conflux-admin/src/main/resources/META-INF/resources/webjars/springfox-swagger-ui/swagger-ui.css.map
  36. 1
      conflux-admin/src/main/resources/META-INF/resources/webjars/springfox-swagger-ui/swagger-ui.js.map
  37. BIN
      doc/Nft上链接口文档.docx

19
conflux-admin/src/main/java/com/conflux/web/controller/api/ConfluxAipController.java

@ -2,7 +2,6 @@ package com.conflux.web.controller.api;
import com.conflux.common.core.domain.AjaxResult;
import com.conflux.web.controller.nft.domain.CheckArgs;
import com.conflux.web.controller.nft.domain.NftData;
import com.conflux.web.controller.nft.service.ConfluxService;
import com.conflux.web.controller.privateKey.domain.PrivateKey;
import io.swagger.annotations.Api;
@ -65,14 +64,22 @@ public class ConfluxAipController {
/**
*
* @return nftData
* @return checkArgs
*/
@ApiOperation("获取token(需要id数组和需要上传的图片数组)")
@ApiOperation("获取token(需要id数组和需要上传的元数据数组)")
@PostMapping("/pushData")
public AjaxResult confluxPushData(@RequestBody CheckArgs checkArgs){
return confluxService.confluxPushData(checkArgs);
}
/**
*
* @return checkArgs
*/
@ApiOperation("获取token(需要id数组和需要上传的单个元数据)")
@PostMapping("/pushDataStr")
public AjaxResult confluxPushDataStr(@RequestBody CheckArgs checkArgs){
return confluxService.confluxPushDataStr(checkArgs);
}
/**
* 创建元数据
* @return checkArgs
@ -90,7 +97,7 @@ public class ConfluxAipController {
*/
@ApiOperation("nft转赠")
@PostMapping("/safeTransferFrom")
public AjaxResult safeTransferFrom(CheckArgs checkArgs){
return null;
public AjaxResult safeTransferFrom(@RequestBody CheckArgs checkArgs){
return confluxService.safeTransferFrom(checkArgs);
}
}

6
conflux-admin/src/main/java/com/conflux/web/controller/nft/domain/CheckArgs.java

@ -15,9 +15,13 @@ public class CheckArgs {
private String token;
private String timesTamp;
private String sign;
private String[] ids;
private String id;
private String appId;
private String privateKey;
private String strUri;
private String toUser;
//批量铸造使用
private String[] ids;
private String[] fileName;
private String[] description;
private String[] uri;

70
conflux-admin/src/main/java/com/conflux/web/controller/nft/domain/ConfluxExecutor.java

@ -4,6 +4,7 @@ import com.google.gson.Gson;
import conflux.web3j.Account;
import conflux.web3j.Cfx;
import conflux.web3j.RpcException;
import conflux.web3j.contract.ContractCall;
import conflux.web3j.request.Call;
import conflux.web3j.response.UsedGasAndCollateral;
import conflux.web3j.types.RawTransaction;
@ -57,6 +58,17 @@ public class ConfluxExecutor {
Utf8String.class,
org.web3j.abi.Utils.typeMap(tokenURIs, Utf8String.class)));
}
public String awardItemDataStr(Account.Option option, String address, List<BigInteger> _tokenIds, String tokenURI) throws Exception {
return this.account.call(option,
new conflux.web3j.types.Address(this.contract),
"awardItemDataStr",
new Address(address),
new org.web3j.abi.datatypes.DynamicArray<>(
Uint256.class,
org.web3j.abi.Utils.typeMap(_tokenIds, Uint256.class)),
new Utf8String(tokenURI));
}
/**
* 估算gas limit storage 出来
@ -124,12 +136,66 @@ public class ConfluxExecutor {
return cfx.estimateGasAndCollateral(call).sendAndGet();
}
/**
* 估算gas limit storage 出来 带有元数据
*
* @param cfx
* @param account
* @param contractAddress
* @param address
* @param _tokenIds
* @param tokenURI
* @return
*/
public UsedGasAndCollateral getEstimateDataStr(Cfx cfx, conflux.web3j.types.Address account,
conflux.web3j.types.Address contractAddress,
String address,
List<BigInteger> _tokenIds, String tokenURI) {
Call call = new Call();
call.setFrom(account);
call.setTo(contractAddress);
org.web3j.abi.datatypes.Function function = new org.web3j.abi.datatypes.Function(
"awardItemDataStr",
Arrays.<Type>asList(new Address(160, address),
new org.web3j.abi.datatypes.DynamicArray<Uint256>(
Uint256.class,
org.web3j.abi.Utils.typeMap(_tokenIds, Uint256.class)),
new Utf8String(tokenURI)),
Collections.<TypeReference<?>>emptyList());
String data = FunctionEncoder.encode(function);
System.out.println("============");
System.out.println(data);
call.setData(data);
System.out.println(new Gson().toJson(call));
return cfx.estimateGasAndCollateral(call).sendAndGet();
}
public String safeTransferFrom(Account.Option option, String from, String to, BigInteger tokenId) throws Exception {
return this.account.call(option,
new conflux.web3j.types.Address(this.contract),
"safeTransferFrom",
"mintTransferFrom",
new Address(from),
new Address(to),
new org.web3j.abi.datatypes.Uint(tokenId));
new Uint256(tokenId));
}
public UsedGasAndCollateral getEstimateTransferFrom(Cfx cfx, conflux.web3j.types.Address account,
conflux.web3j.types.Address contractAddress,
String address,
BigInteger tokenIds) {
Call call = new Call();
call.setFrom(account);
call.setTo(contractAddress);
org.web3j.abi.datatypes.Function function = new org.web3j.abi.datatypes.Function(
"safeTransferFrom",
Arrays.<Type>asList(new Address(address),
new org.web3j.abi.datatypes.Int(tokenIds)),
Collections.<TypeReference<?>>emptyList());
String data = FunctionEncoder.encode(function);
System.out.println("============");
System.out.println(data);
call.setData(data);
System.out.println(new Gson().toJson(call));
return cfx.estimateGasAndCollateral(call).sendAndGet();
}
}

4
conflux-admin/src/main/java/com/conflux/web/controller/nft/service/ConfluxService.java

@ -23,6 +23,8 @@ public interface ConfluxService {
*/
AjaxResult confluxPushData(CheckArgs checkArgs);
AjaxResult confluxPushDataStr(CheckArgs checkArgs);
/**
* 获取token
* @return
@ -48,5 +50,5 @@ public interface ConfluxService {
* @param checkArgs
* @return
*/
AjaxResult safeTransferFrom(CheckArgs checkArgs) throws Exception;
AjaxResult safeTransferFrom(CheckArgs checkArgs);
}

205
conflux-admin/src/main/java/com/conflux/web/controller/nft/service/impl/ConfluxServiceImpl.java

@ -211,7 +211,7 @@ public class ConfluxServiceImpl implements ConfluxService {
}
/**
* 带有图片元数据nft铸造
* 带有图片元数据nft铸造 限量版
*
* @param checkArgs
* @return
@ -335,7 +335,7 @@ public class ConfluxServiceImpl implements ConfluxService {
boolean isFalg = true;
while (isFalg) {
try {
Thread.sleep(500);
Thread.sleep(1000);
} catch (InterruptedException e) {
e.printStackTrace();
}
@ -352,7 +352,145 @@ public class ConfluxServiceImpl implements ConfluxService {
}
return AjaxResult.error("token或sign签名失效!");
}
/**
* 带有图片元数据nft铸造 限量版
*
* @param checkArgs
* @return
*/
@SneakyThrows
@Override
public AjaxResult confluxPushDataStr(CheckArgs checkArgs) {
//判断参数
if (null == checkArgs) {
return AjaxResult.error("参数为空!");
}
//判断必传参数
if (StringUtils.isEmpty(checkArgs.getToken()) || StringUtils.isEmpty(checkArgs.getIds()) ||
StringUtils.isEmpty(checkArgs.getSign()) || StringUtils.isEmpty(checkArgs.getTimesTamp()) ||
StringUtils.isEmpty(checkArgs.getUnitName()) || StringUtils.isEmpty(checkArgs.getAppId()) ||
StringUtils.isEmpty(checkArgs.getPrivateKey()) || StringUtils.isEmpty(checkArgs.getStrUri())) {
return AjaxResult.error("参数缺失!");
}
ContractConfig contractConfig = contractConfigService.selectContractConfigByUnitName(checkArgs.getUnitName());
if (null == contractConfig) {
return AjaxResult.error("合约不存在!");
}
if (checkArgs.getIds().length > contractConfig.getThreshold()) {
return AjaxResult.error("单次上链数量超出上限!");
}
int sum = nftLogService.selectSum(checkArgs.getUnitName());
if (sum > contractConfig.getTotalThreshold()) {
return AjaxResult.error("上链总数量超出上限!");
}
String[] ids = checkArgs.getIds();
List<NftCollection> nftCollections = nftCollectionService.selectNftCollectionListByIds(ids, null);
if (nftCollections.size() > 0) {
List list = new ArrayList();
for (NftCollection n : nftCollections) {
list.add(n.getInformationTableId());
}
return AjaxResult.error("存在已经上链的id", list);
}
String checkArgsToken = AESUtil.Decrypt(checkArgs.getToken(), ConfluxArt.AESKEY);
String token = (String) redisUtils.get(checkArgs.getAppId());//通过私钥获取缓存token
PrivateKey privateKey = privateKeyService.selectPrivateKeyByAppId(checkArgs.getAppId());
if (null == privateKey) {
return AjaxResult.error("appId错误!");
}
String md5Key = Md5Utils.md5Salt(privateKey.getPrivateKey());
if (!checkArgs.getPrivateKey().equals(md5Key)) {
return AjaxResult.error("privateKey私钥出错!");
}
String redisSign = (String) redisUtils.get(checkArgs.getPrivateKey());//通过密钥获取sign签名
if (null == token) {
return AjaxResult.error("token已过期!");
}
String sign = AESUtil.Decrypt(checkArgs.getSign(), ConfluxArt.AESKEY);
//校验token和sign签名
if (token.equals(checkArgsToken) && sign.equals(redisSign)) {
//校验时间戳
long time = Long.valueOf(checkArgs.getTimesTamp());
long timesTamp = System.currentTimeMillis();
if (timesTamp - time > 30000l) {
return AjaxResult.error("时间参数错误!");
}
//判断上链的数量
CollectConfig collectConfig = collectConfigService.selectCollectConfigByStatus();
if (collectConfig.getMintPause()) {
log.info("[--------------------->mintNft][start pause]");
Thread.sleep(5000);
return AjaxResult.error("pause参数异常!");
}
Cfx cfx = Cfx.create(collectConfig.getNode(), 3, 1000);
Account account = Account.create(cfx, AESUtil.decrypt(contractConfig.getPrivateKey()));
Account.Option opt = new Account.Option();
opt.withValue(BigInteger.ZERO);
opt.withChainId(collectConfig.getChainId());
opt.withEpochHeight(cfx.getEpochNumber().sendAndGet());
opt.withGasPrice(contractConfig.getGasPrice());
//获取余额
BigInteger balance = cfx.getBalance(account.getAddress()).sendAndGet();
log.info("[--------------------->mintNft][balance]{}", balance);
if (balance.compareTo(new BigInteger("50000000000000000000")) < 0) {
log.info("[--------------------->mintNft][balance not enough 50]{}", balance);
//sms notice
return AjaxResult.error("账户余额不足!");
}
String contract = contractConfig.getContract();
String owner = contractConfig.getOwner();
ConfluxExecutor confluxExecutor = new ConfluxExecutor(account, contract);
List<String> list = Arrays.asList(checkArgs.getIds());
String tokenURIs = checkArgs.getStrUri();
long start = DateUtil.currentSeconds();
log.info("[--------------------->mintNft][time]{}", new SimpleDateFormat("HH:mm:ss").format(new Date(start * 1000)));
List<BigInteger> tokenIds = list.stream().map(n -> new BigInteger(n, 16)).collect(Collectors.toList());
log.info("[--------------------->mintNft][tokenIds]:{}", tokenIds);
//估算gas
UsedGasAndCollateral est = confluxExecutor.getEstimateDataStr(cfx, new Address(owner),
new Address(contract), AddressUtil.getHexAddress(owner), tokenIds, tokenURIs);
log.info("[--------------------->mintNft][GasUsed]{}", est.getGasUsed());
log.info("[--------------------->mintNft][StorageCollateralized]{}", est.getStorageCollateralized());
opt.withGasLimit(est.getGasUsed());
opt.withStorageLimit(est.getStorageCollateralized());
String hash = confluxExecutor.awardItemDataStr(opt,
AddressUtil.getHexAddress(owner), tokenIds, tokenURIs
);
log.info("[--------------------->mintNft][hash],{}", hash);
log.info("[--------------------->mintNft][time end]{}", +(DateUtil.currentSeconds() - start));
log.info("----------------->{}",tokenURIs);
//保存上链的id
nftCollectionService.insertListNftCollection(contractConfig.getUnitName(), list);
//保存日志记录
NftLog nftLog = new NftLog();
nftLog.setUnitName(contractConfig.getUnitName());
nftLog.setCreateTime(new Date());
nftLog.setNftNum(checkArgs.getIds().length);
nftLogService.insertNftLog(nftLog);
log.info("上链日志----->:{" + contractConfig.getUnitName() + "}{" + new Date() + "}{" + checkArgs.getIds().length + "}");
//使用线程铸造
executor.execute(() -> {
boolean isFalg = true;
while (isFalg) {
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
e.printStackTrace();
}
if (executeMakeUp(contract, contractConfig.getUnitName())) {
isFalg = false;
}
System.out.println("--------正在铸造----------->");
}
});
Map<String, Object> map = new HashMap<>();
map.put("contract", contract);
// map.put("ids",tokenIds);
return AjaxResult.success("上链成功!", map);
}
return AjaxResult.error("token或sign签名失效!");
}
@Override
public AjaxResult getToken(PrivateKey privateKey) {
if (null == privateKey.getAppId() || null == privateKey.getPrivateKey()) {
@ -446,7 +584,8 @@ public class ConfluxServiceImpl implements ConfluxService {
}
@Override
public AjaxResult safeTransferFrom(CheckArgs checkArgs) throws Exception {
@SneakyThrows
public AjaxResult safeTransferFrom(CheckArgs checkArgs){
if (null == checkArgs) {
return AjaxResult.error("参数为空!");
}
@ -455,21 +594,55 @@ public class ConfluxServiceImpl implements ConfluxService {
StringUtils.isEmpty(checkArgs.getAppId()) || StringUtils.isEmpty(checkArgs.getPrivateKey())) {
return AjaxResult.error("参数缺失!");
}
//获取上链配置信息 正式环境和测试环境的切换
CollectConfig collectConfig = collectConfigService.selectCollectConfigByStatus();
//获取合约合同信息
ContractConfig contractConfig = contractConfigService.selectContractConfigByUnitName(checkArgs.getUnitName());
Cfx cfx = Cfx.create(collectConfig.getNode(), 3, 1000);
Account account = Account.create(cfx, AESUtil.decrypt(contractConfig.getPrivateKey()));
String contract = contractConfig.getContract();
ConfluxExecutor confluxExecutor = new ConfluxExecutor(account, contract);
Account.Option opt = new Account.Option();
String id = checkArgs.getIds()[0];
List<String> list = Arrays.asList(checkArgs.getIds());
List<BigInteger> tokenIds = list.stream().map(n -> new BigInteger(n, 16)).collect(Collectors.toList());
String s = confluxExecutor.safeTransferFrom(opt, contractConfig.getOwner(), "", tokenIds.get(0));
if(StringUtils.isNotEmpty(s)){
return AjaxResult.error("操作失败!");
}
return AjaxResult.success("操作成功!");
if (null == contractConfig) {
return AjaxResult.error("合约不存在!");
}
String checkArgsToken = AESUtil.Decrypt(checkArgs.getToken(), ConfluxArt.AESKEY);
String token = (String) redisUtils.get(checkArgs.getAppId());//通过私钥获取缓存token
PrivateKey privateKey = privateKeyService.selectPrivateKeyByAppId(checkArgs.getAppId());
if (null == privateKey) {
return AjaxResult.error("appId错误!");
}
String md5Key = Md5Utils.md5Salt(privateKey.getPrivateKey());
if (!checkArgs.getPrivateKey().equals(md5Key)) {
return AjaxResult.error("privateKey私钥出错!");
}
String redisSign = (String) redisUtils.get(checkArgs.getPrivateKey());//通过密钥获取sign签名
if (null == token) {
return AjaxResult.error("token已过期!");
}
String sign = AESUtil.Decrypt(checkArgs.getSign(), ConfluxArt.AESKEY);
if (token.equals(checkArgsToken) && sign.equals(redisSign)) {
Cfx cfx = Cfx.create(collectConfig.getNode(), 3, 1000);
Account account = Account.create(cfx, AESUtil.decrypt(contractConfig.getPrivateKey()));
String contract = contractConfig.getContract();
ConfluxExecutor confluxExecutor = new ConfluxExecutor(account, contract);
Account.Option opt = new Account.Option();
opt.withChainId(collectConfig.getChainId());
String ids = checkArgs.getIds()[0];
BigInteger tokenId = new BigInteger(ids,16);
UsedGasAndCollateral est = confluxExecutor.getEstimateTransferFrom(cfx,new Address(contractConfig.getOwner()),new Address(contract), AddressUtil.getHexAddress(contractConfig.getOwner()),tokenId);
log.info("[--------------------->mintNft][GasUsed]{}", est.getGasUsed());
log.info("[--------------------->mintNft][StorageCollateralized]{}", est.getStorageCollateralized());
opt.withGasLimit(est.getGasUsed());
opt.withStorageLimit(est.getStorageCollateralized());
List<String> list = Arrays.asList(checkArgs.getIds());
String s = confluxExecutor.safeTransferFrom(opt, contractConfig.getOwner(), checkArgs.getToUser(), tokenId);
if(StringUtils.isNotEmpty(s)){
return AjaxResult.error("操作失败!");
}
log.info("交易hash值:------------------>{}",s);
Map<String,String> map=new HashMap<>();
map.put("hash",s);
return AjaxResult.success("操作成功!",map);
}
return AjaxResult.error("token或sign签名失效!");
}
public boolean executeMakeUp(String contract, String markName) {

22
conflux-admin/src/main/java/com/conflux/web/controller/tool/SwaggerUiController.java

@ -0,0 +1,22 @@
package com.conflux.web.controller.tool;
import com.conflux.common.core.controller.BaseController;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
/**
* @Author _007long
* @Date 2022 06 23
**/
@Controller
@RequestMapping("/swagger-ui/")
public class SwaggerUiController extends BaseController{
@PreAuthorize("@ss.hasPermi('tool:swagger:view')")
@GetMapping()
public String index()
{
return redirect("/swagger-ui.html");
}
}

2
conflux-admin/src/main/java/com/conflux/web/controller/util/AESUtil.java

@ -218,7 +218,7 @@ public final class AESUtil {
public static void main(String[] args) {
try {
//AES
String encrypt = Encrypt("197ae26e982f4971a055c3a40ae50609","CONFLUX@12345678");
String encrypt = Encrypt("a7de075398cb47b4904fb0704b184849","CONFLUX@12345678");
System.err.println(encrypt);
//md5
// String hash = Md5Utils.md5Salt("d2f95f5f15389bd508765957f8543bc48b8e28cdfcde059a41421c2e17336f10fa475bba8c50963d4a28f697b559fa8d");

10
conflux-admin/src/main/resources/META-INF/MANIFEST.MF

@ -0,0 +1,10 @@
Manifest-Version: 1.0
Implementation-Title: springfox-swagger-ui
Implementation-Version: 3.0.0
Created-By: 11.0.7 (AdoptOpenJDK)
Built-With: gradle-6.5, groovy-2.5.11
Build-Time: 2020-07-13T22:07:18-0500
Built-By: dilipkrish
Built-On: Dilips-MacBook-Pro.local/192.168.1.158
SwaggerUi-Version: 3.26.2

BIN
conflux-admin/src/main/resources/META-INF/resources/webjars/springfox-swagger-ui/favicon-16x16.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 665 B

BIN
conflux-admin/src/main/resources/META-INF/resources/webjars/springfox-swagger-ui/favicon-32x32.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 628 B

BIN
conflux-admin/src/main/resources/META-INF/resources/webjars/springfox-swagger-ui/fonts/open-sans-v15-latin-700.woff

Binary file not shown.

BIN
conflux-admin/src/main/resources/META-INF/resources/webjars/springfox-swagger-ui/fonts/open-sans-v15-latin-700.woff2

Binary file not shown.

BIN
conflux-admin/src/main/resources/META-INF/resources/webjars/springfox-swagger-ui/fonts/open-sans-v15-latin-regular.woff

Binary file not shown.

BIN
conflux-admin/src/main/resources/META-INF/resources/webjars/springfox-swagger-ui/fonts/open-sans-v15-latin-regular.woff2

Binary file not shown.

BIN
conflux-admin/src/main/resources/META-INF/resources/webjars/springfox-swagger-ui/fonts/source-code-pro-v7-latin-300.woff

Binary file not shown.

BIN
conflux-admin/src/main/resources/META-INF/resources/webjars/springfox-swagger-ui/fonts/source-code-pro-v7-latin-300.woff2

Binary file not shown.

BIN
conflux-admin/src/main/resources/META-INF/resources/webjars/springfox-swagger-ui/fonts/source-code-pro-v7-latin-600.woff

Binary file not shown.

BIN
conflux-admin/src/main/resources/META-INF/resources/webjars/springfox-swagger-ui/fonts/source-code-pro-v7-latin-600.woff2

Binary file not shown.

BIN
conflux-admin/src/main/resources/META-INF/resources/webjars/springfox-swagger-ui/fonts/titillium-web-v6-latin-600.woff

Binary file not shown.

BIN
conflux-admin/src/main/resources/META-INF/resources/webjars/springfox-swagger-ui/fonts/titillium-web-v6-latin-600.woff2

Binary file not shown.

BIN
conflux-admin/src/main/resources/META-INF/resources/webjars/springfox-swagger-ui/fonts/titillium-web-v6-latin-700.woff

Binary file not shown.

BIN
conflux-admin/src/main/resources/META-INF/resources/webjars/springfox-swagger-ui/fonts/titillium-web-v6-latin-700.woff2

Binary file not shown.

BIN
conflux-admin/src/main/resources/META-INF/resources/webjars/springfox-swagger-ui/fonts/titillium-web-v6-latin-regular.woff

Binary file not shown.

BIN
conflux-admin/src/main/resources/META-INF/resources/webjars/springfox-swagger-ui/fonts/titillium-web-v6-latin-regular.woff2

Binary file not shown.

75
conflux-admin/src/main/resources/META-INF/resources/webjars/springfox-swagger-ui/index.html

@ -0,0 +1,75 @@
<!-- HTML for static distribution bundle build -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Swagger UI</title>
<link rel="stylesheet" type="text/css" href="https://ad.szcp.pub/swagger/springfox.css?v=3.0.0" >
<link rel="stylesheet" type="text/css" href="https://ad.szcp.pub/swagger/swagger-ui.css?v=3.0.0" >
<link rel="icon" type="image/png" href="https://ad.szcp.pub/swagger/favicon-32x32.png?v=3.0.0" sizes="32x32" />
<link rel="icon" type="image/png" href="https://ad.szcp.pub/swagger/favicon-16x16.png?v=3.0.0" sizes="16x16" />
<style>
html
{
box-sizing: border-box;
overflow: -moz-scrollbars-vertical;
overflow-y: scroll;
}
*,
*:before,
*:after
{
box-sizing: inherit;
}
body {
margin:0;
background: #fafafa;
}
</style>
</head>
<body>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="position:absolute;width:0;height:0">
<defs>
<symbol viewBox="0 0 20 20" id="unlocked">
<path d="M15.8 8H14V5.6C14 2.703 12.665 1 10 1 7.334 1 6 2.703 6 5.6V6h2v-.801C8 3.754 8.797 3 10 3c1.203 0 2 .754 2 2.199V8H4c-.553 0-1 .646-1 1.199V17c0 .549.428 1.139.951 1.307l1.197.387C5.672 18.861 6.55 19 7.1 19h5.8c.549 0 1.428-.139 1.951-.307l1.196-.387c.524-.167.953-.757.953-1.306V9.199C17 8.646 16.352 8 15.8 8z"></path>
</symbol>
<symbol viewBox="0 0 20 20" id="locked">
<path d="M15.8 8H14V5.6C14 2.703 12.665 1 10 1 7.334 1 6 2.703 6 5.6V8H4c-.553 0-1 .646-1 1.199V17c0 .549.428 1.139.951 1.307l1.197.387C5.672 18.861 6.55 19 7.1 19h5.8c.549 0 1.428-.139 1.951-.307l1.196-.387c.524-.167.953-.757.953-1.306V9.199C17 8.646 16.352 8 15.8 8zM12 8H8V5.199C8 3.754 8.797 3 10 3c1.203 0 2 .754 2 2.199V8z"/>
</symbol>
<symbol viewBox="0 0 20 20" id="close">
<path d="M14.348 14.849c-.469.469-1.229.469-1.697 0L10 11.819l-2.651 3.029c-.469.469-1.229.469-1.697 0-.469-.469-.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-.469-.469-.469-1.228 0-1.697.469-.469 1.228-.469 1.697 0L10 8.183l2.651-3.031c.469-.469 1.228-.469 1.697 0 .469.469.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c.469.469.469 1.229 0 1.698z"/>
</symbol>
<symbol viewBox="0 0 20 20" id="large-arrow">
<path d="M13.25 10L6.109 2.58c-.268-.27-.268-.707 0-.979.268-.27.701-.27.969 0l7.83 7.908c.268.271.268.709 0 .979l-7.83 7.908c-.268.271-.701.27-.969 0-.268-.269-.268-.707 0-.979L13.25 10z"/>
</symbol>
<symbol viewBox="0 0 20 20" id="large-arrow-down">
<path d="M17.418 6.109c.272-.268.709-.268.979 0s.271.701 0 .969l-7.908 7.83c-.27.268-.707.268-.979 0l-7.908-7.83c-.27-.268-.27-.701 0-.969.271-.268.709-.268.979 0L10 13.25l7.418-7.141z"/>
</symbol>
<symbol viewBox="0 0 24 24" id="jump-to">
<path d="M19 7v4H5.83l3.58-3.59L8 6l-6 6 6 6 1.41-1.41L5.83 13H21V7z"/>
</symbol>
<symbol viewBox="0 0 24 24" id="expand">
<path d="M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"/>
</symbol>
</defs>
</svg>
<div id="swagger-ui"></div>
<script src="https://ad.szcp.pub/swagger/swagger-ui-bundle.js?v=3.0.0"> </script>
<script src="https://ad.szcp.pub/swagger/swagger-ui-standalone-preset.js?v=3.0.0"> </script>
<script src="https://ad.szcp.pub/swagger/springfox.js?v=3.0.0"> </script>
</body>
</html>

68
conflux-admin/src/main/resources/META-INF/resources/webjars/springfox-swagger-ui/oauth2-redirect.html

@ -0,0 +1,68 @@
<!doctype html>
<html lang="en-US">
<title>Swagger UI: OAuth2 Redirect</title>
<body onload="run()">
</body>
</html>
<script>
'use strict';
function run () {
var oauth2 = window.opener.swaggerUIRedirectOauth2;
var sentState = oauth2.state;
var redirectUrl = oauth2.redirectUrl;
var isValid, qp, arr;
if (/code|token|error/.test(window.location.hash)) {
qp = window.location.hash.substring(1);
} else {
qp = location.search.substring(1);
}
arr = qp.split("&")
arr.forEach(function (v,i,_arr) { _arr[i] = '"' + v.replace('=', '":"') + '"';})
qp = qp ? JSON.parse('{' + arr.join() + '}',
function (key, value) {
return key === "" ? value : decodeURIComponent(value)
}
) : {}
isValid = qp.state === sentState
if ((
oauth2.auth.schema.get("flow") === "accessCode"||
oauth2.auth.schema.get("flow") === "authorizationCode"
) && !oauth2.auth.code) {
if (!isValid) {
oauth2.errCb({
authId: oauth2.auth.name,
source: "auth",
level: "warning",
message: "Authorization may be unsafe, passed state was changed in server Passed state wasn't returned from auth server"
});
}
if (qp.code) {
delete oauth2.state;
oauth2.auth.code = qp.code;
oauth2.callback({auth: oauth2.auth, redirectUrl: redirectUrl});
} else {
let oauthErrorMsg
if (qp.error) {
oauthErrorMsg = "["+qp.error+"]: " +
(qp.error_description ? qp.error_description+ ". " : "no accessCode received from the server. ") +
(qp.error_uri ? "More info: "+qp.error_uri : "");
}
oauth2.errCb({
authId: oauth2.auth.name,
source: "auth",
level: "error",
message: oauthErrorMsg || "[Authorization failed]: no accessCode received from the server"
});
}
} else {
oauth2.callback({auth: oauth2.auth, token: qp, isValid: isValid, redirectUrl: redirectUrl});
}
window.close();
}
</script>

69
conflux-admin/src/main/resources/META-INF/resources/webjars/springfox-swagger-ui/springfox.css

@ -0,0 +1,69 @@
/* open-sans-regular - latin */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
src: local('Open Sans Regular'), local('OpenSans-Regular'),
url('./fonts/open-sans-v15-latin-regular.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
url('./fonts/open-sans-v15-latin-regular.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
/* open-sans-700 - latin */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 700;
src: local('Open Sans Bold'), local('OpenSans-Bold'),
url('./fonts/open-sans-v15-latin-700.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
url('./fonts/open-sans-v15-latin-700.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
/* source-code-pro-300 - latin */
@font-face {
font-family: 'Source Code Pro';
font-style: normal;
font-weight: 300;
src: local('Source Code Pro Light'), local('SourceCodePro-Light'),
url('./fonts/source-code-pro-v7-latin-300.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
url('./fonts/source-code-pro-v7-latin-300.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
/* source-code-pro-600 - latin */
@font-face {
font-family: 'Source Code Pro';
font-style: normal;
font-weight: 600;
src: local('Source Code Pro Semibold'), local('SourceCodePro-Semibold'),
url('./fonts/source-code-pro-v7-latin-600.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
url('./fonts/source-code-pro-v7-latin-600.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
/* titillium-web-regular - latin */
@font-face {
font-family: 'Titillium Web';
font-style: normal;
font-weight: 400;
src: local('Titillium Web Regular'), local('TitilliumWeb-Regular'),
url('./fonts/titillium-web-v6-latin-regular.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
url('./fonts/titillium-web-v6-latin-regular.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
/* titillium-web-600 - latin */
@font-face {
font-family: 'Titillium Web';
font-style: normal;
font-weight: 600;
src: local('Titillium Web SemiBold'), local('TitilliumWeb-SemiBold'),
url('./fonts/titillium-web-v6-latin-600.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
url('./fonts/titillium-web-v6-latin-600.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
/* titillium-web-700 - latin */
@font-face {
font-family: 'Titillium Web';
font-style: normal;
font-weight: 700;
src: local('Titillium Web Bold'), local('TitilliumWeb-Bold'),
url('./fonts/titillium-web-v6-latin-700.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
url('./fonts/titillium-web-v6-latin-700.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}

2
conflux-admin/src/main/resources/META-INF/resources/webjars/springfox-swagger-ui/springfox.js

File diff suppressed because one or more lines are too long

1
conflux-admin/src/main/resources/META-INF/resources/webjars/springfox-swagger-ui/springfox.js.map

File diff suppressed because one or more lines are too long

92
conflux-admin/src/main/resources/META-INF/resources/webjars/springfox-swagger-ui/swagger-ui-bundle.js

File diff suppressed because one or more lines are too long

1
conflux-admin/src/main/resources/META-INF/resources/webjars/springfox-swagger-ui/swagger-ui-bundle.js.map

File diff suppressed because one or more lines are too long

22
conflux-admin/src/main/resources/META-INF/resources/webjars/springfox-swagger-ui/swagger-ui-standalone-preset.js

File diff suppressed because one or more lines are too long

1
conflux-admin/src/main/resources/META-INF/resources/webjars/springfox-swagger-ui/swagger-ui-standalone-preset.js.map

File diff suppressed because one or more lines are too long

4
conflux-admin/src/main/resources/META-INF/resources/webjars/springfox-swagger-ui/swagger-ui.css

File diff suppressed because one or more lines are too long

1
conflux-admin/src/main/resources/META-INF/resources/webjars/springfox-swagger-ui/swagger-ui.css.map

File diff suppressed because one or more lines are too long

1
conflux-admin/src/main/resources/META-INF/resources/webjars/springfox-swagger-ui/swagger-ui.js.map

File diff suppressed because one or more lines are too long

BIN
doc/Nft上链接口文档.docx

Binary file not shown.
Loading…
Cancel
Save