public override WalletAccount CreateAccount(SmartContract.Contract contract, KeyPair key = null) { VerificationContract verification_contract = contract as VerificationContract; if (verification_contract == null) { verification_contract = new VerificationContract { Script = contract.Script, ParameterList = contract.ParameterList }; } byte[] decryptedPrivateKey = new byte[96]; Buffer.BlockCopy(key.PublicKey.EncodePoint(false), 1, decryptedPrivateKey, 0, 64); Buffer.BlockCopy(key.PrivateKey, 0, decryptedPrivateKey, 64, 32); UserWalletAccount account = new UserWalletAccount(this, verification_contract.ScriptHash) { Key = key, EncryptedPrivateKey = EncryptPrivateKey(decryptedPrivateKey), Contract = verification_contract }; AddAccount(account, false); return(account); }
public override WalletAccount CreateAccount(SmartContract.Contract contract, KeyPair key = null) { VerificationContract verification_contract = contract as VerificationContract; if (verification_contract == null) { verification_contract = new VerificationContract { Script = contract.Script, ParameterList = contract.ParameterList }; } UserWalletAccount account = new UserWalletAccount(verification_contract.ScriptHash) { Key = key, Contract = verification_contract }; AddAccount(account, false); return account; }
public override WalletAccount CreateAccount(SmartContract.Contract contract, KeyPair key = null) { throw new NotSupportedException(); }