40 lines
733 B
JavaScript
Raw Normal View History

2021-12-25 14:39:47 +01:00
/**
* CrossChain - TradeBot Respond Request (Buy Action)
*
* These are special types of transactions (JSON ENCODED)
*/
export default class TradeBotRespondRequest {
constructor() {
// ...
}
createTransaction(txnReq) {
this.atAddress(txnReq.atAddress)
this.foreignKey(txnReq.foreignKey)
this.receivingAddress(txnReq.receivingAddress)
return this.txnRequest()
}
atAddress(atAddress) {
this._atAddress = atAddress
}
foreignKey(foreignKey) {
this._foreignKey = foreignKey
}
receivingAddress(receivingAddress) {
this._receivingAddress = receivingAddress
}
txnRequest() {
return {
atAddress: this._atAddress,
foreignKey: this._foreignKey,
receivingAddress: this._receivingAddress
}
}
2021-12-25 14:39:47 +01:00
}