/// Public constructor. public MsgSendDocumentReceipt(CommercioDocReceipt receipt) { Trace.Assert(receipt != null); // Assigns the properties this.receipt = receipt; base.setProperties("commercio/MsgSendDocumentReceipt", receipt.toJson()); }
/// Creates a new transaction which tells the [recipient] that the document /// having the specified [documentId] and present inside the transaction with /// hash [txHash] has been properly seen. /// [proof] optional proof of reading. public static async Task <TransactionResult> sendDocumentReceipt( String recipient, String txHash, String documentId, Wallet wallet, String proof = "", StdFee fee = null, BroadcastingMode mode = BroadcastingMode.SYNC ) { CommercioDocReceipt commercioDocReceipt = CommercioDocReceiptHelper.fromWallet( wallet: wallet, recipient: recipient, txHash: txHash, documentId: documentId, proof: proof ); MsgSendDocumentReceipt msg = new MsgSendDocumentReceipt(receipt: commercioDocReceipt); // Careful here, Eugene: we are passing a list of BaseType containing the derived MsgSetDidDocument msg return(await TxHelper.createSignAndSendTx(new List <StdMsg> { msg }, wallet, fee : fee, mode : mode)); }