public override WalletAccount CreateAccount(UInt160 scriptHash) { MyWalletAccount account = new MyWalletAccount(scriptHash); AddAccount(account); return(account); }
public void TestGetWatchOnly() { MyWalletAccount walletAccount = new MyWalletAccount(UInt160.Zero); walletAccount.WatchOnly.Should().BeTrue(); walletAccount.Contract = new Contract(); walletAccount.WatchOnly.Should().BeFalse(); }
public override WalletAccount CreateAccount(Contract contract, KeyPair key = null) { MyWalletAccount account = new MyWalletAccount(contract.ScriptHash) { Contract = contract }; account.SetKey(key); AddAccount(account); return(account); }
public override WalletAccount CreateAccount(byte[] privateKey) { KeyPair key = new KeyPair(privateKey); VerificationContract contract = new VerificationContract { Script = Contract.CreateSignatureRedeemScript(key.PublicKey), ParameterList = new[] { ContractParameterType.Signature } }; MyWalletAccount account = new MyWalletAccount(contract.ScriptHash); account.SetKey(key); account.Contract = contract; AddAccount(account); return(account); }
public void TestGetAddress() { MyWalletAccount walletAccount = new MyWalletAccount(UInt160.Zero); walletAccount.Address.Should().Be("AFmseVrdL9f9oyCzZefL9tG6UbvhPbdYzM"); }