示例#1
0
        public override DictionaryObject GetJson()
        {
            var result = new DictionaryObject
            {
                { "type", (byte)TransactionType.Alias },
                { "senderPublicKey", SenderPublicKey.ToBase58() },
                { "alias", Alias },
                { "fee", Assets.ZBS.AmountToLong(Fee) },
                { "timestamp", Timestamp.ToLong() }
            };

            if (Sender != null)
            {
                result.Add("sender", AddressEncoding.GetAddressFromPublicKey(SenderPublicKey, ChainId));
            }

            return(result);
        }
示例#2
0
 private PrivateKeyAccount(byte[] privateKey, char chainId)
 {
     _publicKey  = GetPublicKeyFromPrivateKey(privateKey);
     Address     = AddressEncoding.GetAddressFromPublicKey(PublicKey, chainId);
     _privateKey = privateKey;
 }