public ServiceAccount(Unpacker unpacker) : base(unpacker) { unpacker.UnpackUshort(); // protcol version unpacker.Unpack(out ChainId); unpacker.Unpack(out JoinTimeStamp); TotalRevenuePayout = unpacker.UnpackLong(); unpacker.Unpack(_accountKeys, (u) => { var key = new RevokeablePublicServiceAccountKey(AccountId, ChainId, u); _accountKeysLookup.Add(key.Item.UniqueIdentifier, key.Item.KeyIndex); return(key); }); unpacker.Unpack(_accountFeatures, (u) => new FeatureAccountPurchase(u)); unpacker.Unpack(_accountSubscriptions, (u) => new SubscriptionAccountPurchase(u)); }
public bool GetRevokealbeServiceAccountKey(long accountId, Key publicKey, out bool isValidAccount, out RevokeablePublicServiceAccountKey revokeableKey) { var account = GetServiceAccount(accountId); isValidAccount = account != null; if (isValidAccount) { revokeableKey = account.GetAccountKey(publicKey); return(revokeableKey != null); } revokeableKey = null; return(false); }