-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #136 from zhangcongcobo/main
add get_utxo_assets and get_ordinals_inscription interface
- Loading branch information
Showing
8 changed files
with
323 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
src/main/java/com/cobo/custody/api/client/domain/transaction/MPCUTXOAsset.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package com.cobo.custody.api.client.domain.transaction; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
import java.math.BigInteger; | ||
import java.util.List; | ||
import java.util.Map; | ||
|
||
public class MPCUTXOAsset { | ||
@JsonProperty(value = "brc_20") | ||
private Map<String, MPCUTXOBRC20Asset> brc20; | ||
@JsonProperty(value = "ordinals_inscription") | ||
private List<MPCUTXOOrdinalsInscription> ordinalsInscription; | ||
|
||
public Map<String, MPCUTXOBRC20Asset> getBrc20() { | ||
return brc20; | ||
} | ||
|
||
public void setBrc20(Map<String, MPCUTXOBRC20Asset> brc20) { | ||
this.brc20 = brc20; | ||
} | ||
|
||
public List<MPCUTXOOrdinalsInscription> getOrdinalsInscription() { | ||
return ordinalsInscription; | ||
} | ||
|
||
public void setOrdinalsInscription(List<MPCUTXOOrdinalsInscription> ordinalsInscription) { | ||
this.ordinalsInscription = ordinalsInscription; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "MPCUTXOAsset{" + | ||
"brc20=" + brc20 + | ||
", ordinalsInscription=" + ordinalsInscription + | ||
'}'; | ||
} | ||
} |
68 changes: 68 additions & 0 deletions
68
src/main/java/com/cobo/custody/api/client/domain/transaction/MPCUTXOAssetInfo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
package com.cobo.custody.api.client.domain.transaction; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
public class MPCUTXOAssetInfo { | ||
@JsonProperty(value = "chain_coin") | ||
private String chainCoin; | ||
@JsonProperty(value = "txid") | ||
private String txId; | ||
|
||
@JsonProperty(value = "vout_n") | ||
private Integer voutN; | ||
|
||
private Boolean pending; | ||
|
||
private MPCUTXOAsset assets; | ||
|
||
public String getChainCoin() { | ||
return chainCoin; | ||
} | ||
|
||
public void setChainCoin(String chainCoin) { | ||
this.chainCoin = chainCoin; | ||
} | ||
|
||
public String getTxId() { | ||
return txId; | ||
} | ||
|
||
public void setTxId(String txId) { | ||
this.txId = txId; | ||
} | ||
|
||
public Integer getVoutN() { | ||
return voutN; | ||
} | ||
|
||
public void setVoutN(Integer voutN) { | ||
this.voutN = voutN; | ||
} | ||
|
||
public Boolean getPending() { | ||
return pending; | ||
} | ||
|
||
public void setPending(Boolean pending) { | ||
this.pending = pending; | ||
} | ||
|
||
public MPCUTXOAsset getAssets() { | ||
return assets; | ||
} | ||
|
||
public void setAssets(MPCUTXOAsset assets) { | ||
this.assets = assets; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "MPCUTXOAssetInfo{" + | ||
"chainCoin='" + chainCoin + '\'' + | ||
", txId='" + txId + '\'' + | ||
", voutN=" + voutN + | ||
", pending=" + pending + | ||
", assets=" + assets + | ||
'}'; | ||
} | ||
} |
46 changes: 46 additions & 0 deletions
46
src/main/java/com/cobo/custody/api/client/domain/transaction/MPCUTXOBRC20Asset.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package com.cobo.custody.api.client.domain.transaction; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
import java.math.BigInteger; | ||
|
||
public class MPCUTXOBRC20Asset { | ||
|
||
private BigInteger value; | ||
private Integer decimal; | ||
@JsonProperty(value = "cobo_coin_code") | ||
private String coinCode; | ||
|
||
public BigInteger getValue() { | ||
return value; | ||
} | ||
|
||
public void setValue(BigInteger value) { | ||
this.value = value; | ||
} | ||
|
||
public Integer getDecimal() { | ||
return decimal; | ||
} | ||
|
||
public void setDecimal(Integer decimal) { | ||
this.decimal = decimal; | ||
} | ||
|
||
public String getCoinCode() { | ||
return coinCode; | ||
} | ||
|
||
public void setCoinCode(String coinCode) { | ||
this.coinCode = coinCode; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "MPCUTXOBRC20Asset{" + | ||
"value=" + value + | ||
", decimal=" + decimal + | ||
", coinCode='" + coinCode + '\'' + | ||
'}'; | ||
} | ||
} |
130 changes: 130 additions & 0 deletions
130
src/main/java/com/cobo/custody/api/client/domain/transaction/MPCUTXOOrdinalsInscription.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
package com.cobo.custody.api.client.domain.transaction; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
import java.util.Map; | ||
|
||
public class MPCUTXOOrdinalsInscription { | ||
@JsonProperty(value = "inscription_id") | ||
private String inscriptionId; | ||
@JsonProperty(value = "metadata") | ||
private Map metaData; | ||
private String parent; | ||
private String address; | ||
@JsonProperty(value = "content_type") | ||
private String contentType; | ||
@JsonProperty(value = "genesis_height") | ||
private Integer genesisHeight; | ||
@JsonProperty(value = "genesis_transaction") | ||
private String genesisTransaction; | ||
private String location; | ||
private String output; | ||
private Integer offset; | ||
@JsonProperty(value = "ethereum_teleburn_address") | ||
private String ethereumTeleburnAddress; | ||
|
||
public String getInscriptionId() { | ||
return inscriptionId; | ||
} | ||
|
||
public void setInscriptionId(String inscriptionId) { | ||
this.inscriptionId = inscriptionId; | ||
} | ||
|
||
public Map getMetaData() { | ||
return metaData; | ||
} | ||
|
||
public void setMetaData(Map metaData) { | ||
this.metaData = metaData; | ||
} | ||
|
||
public String getParent() { | ||
return parent; | ||
} | ||
|
||
public void setParent(String parent) { | ||
this.parent = parent; | ||
} | ||
|
||
public String getAddress() { | ||
return address; | ||
} | ||
|
||
public void setAddress(String address) { | ||
this.address = address; | ||
} | ||
|
||
public String getContentType() { | ||
return contentType; | ||
} | ||
|
||
public void setContentType(String contentType) { | ||
this.contentType = contentType; | ||
} | ||
|
||
public Integer getGenesisHeight() { | ||
return genesisHeight; | ||
} | ||
|
||
public void setGenesisHeight(Integer genesisHeight) { | ||
this.genesisHeight = genesisHeight; | ||
} | ||
|
||
public String getGenesisTransaction() { | ||
return genesisTransaction; | ||
} | ||
|
||
public void setGenesisTransaction(String genesisTransaction) { | ||
this.genesisTransaction = genesisTransaction; | ||
} | ||
|
||
public String getLocation() { | ||
return location; | ||
} | ||
|
||
public void setLocation(String location) { | ||
this.location = location; | ||
} | ||
|
||
public String getOutput() { | ||
return output; | ||
} | ||
|
||
public void setOutput(String output) { | ||
this.output = output; | ||
} | ||
|
||
public Integer getOffset() { | ||
return offset; | ||
} | ||
|
||
public void setOffset(Integer offset) { | ||
this.offset = offset; | ||
} | ||
|
||
public String getEthereumTeleburnAddress() { | ||
return ethereumTeleburnAddress; | ||
} | ||
|
||
public void setEthereumTeleburnAddress(String ethereumTeleburnAddress) { | ||
this.ethereumTeleburnAddress = ethereumTeleburnAddress; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "MPCUTXOOrdinalsInscription{" + | ||
"inscriptionId='" + inscriptionId + '\'' + | ||
", metaData=" + metaData + | ||
", parent='" + parent + '\'' + | ||
", address='" + address + '\'' + | ||
", contentType='" + contentType + '\'' + | ||
", genesisHeight=" + genesisHeight + | ||
", genesisTransaction='" + genesisTransaction + '\'' + | ||
", location='" + location + '\'' + | ||
", output='" + output + '\'' + | ||
", offset=" + offset + | ||
", ethereumTeleburnAddress='" + ethereumTeleburnAddress + '\'' + | ||
'}'; | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
src/main/java/com/cobo/custody/api/client/domain/transaction/OrdinalsInscriptionContent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package com.cobo.custody.api.client.domain.transaction; | ||
|
||
public class OrdinalsInscriptionContent { | ||
private String content; | ||
|
||
public String getContent() { | ||
return content; | ||
} | ||
|
||
public void setContent(String content) { | ||
this.content = content; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "OrdinalsInscriptionContent{" + | ||
"content='" + content + '\'' + | ||
'}'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters