/// Public constructor.
 public MsgBuyMembership(BuyMembership buyMembership)
 {
     Trace.Assert(buyMembership != null);
     // Assigns the properties
     this.buyMembership = buyMembership;
     base.setProperties("commercio/MsgBuyMembership", _toJson());
 }
Esempio n. 2
0
        /// Buys the membership with the given [membershipType].
        public static async Task <TransactionResult> buyMembership(MembershipType membershipType, Wallet wallet, StdFee fee = null, BroadcastingMode mode = BroadcastingMode.SYNC)
        {
            BuyMembership buyMembership = BuyMembershipHelper.fromWallet(wallet, membershipType);

            MsgBuyMembership msg = new MsgBuyMembership(buyMembership: buyMembership);

            // 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));
        }