Support for responding to multiple crosschain sell offers.

This commit is contained in:
kennycud
2024-07-29 13:59:58 -07:00
parent 22e938bb87
commit 3edea9fe8c
6 changed files with 118 additions and 14 deletions

View File

@@ -0,0 +1,39 @@
/**
* CrossChain - TradeBot Respond Multiple Request (Buy Action)
*
* These are special types of transactions (JSON ENCODED)
*/
export default class TradeBotRespondMultipleRequest {
constructor() {
// ...
}
createTransaction(txnReq) {
this.addresses(txnReq.addresses)
this.foreignKey(txnReq.foreignKey)
this.receivingAddress(txnReq.receivingAddress)
return this.txnRequest()
}
addresses(addresses) {
this._addresses = addresses
}
foreignKey(foreignKey) {
this._foreignKey = foreignKey
}
receivingAddress(receivingAddress) {
this._receivingAddress = receivingAddress
}
txnRequest() {
return {
addresses: this._addresses,
foreignKey: this._foreignKey,
receivingAddress: this._receivingAddress
}
}
}