Beispiel #1
0
            public SendMessage(byte[] tokenId, ulong[] tokenOutputQuantities) : base(TokenType1.TransactionType.SEND)
            {
                TokenId = tokenId;
                TokenOutputQuantities = tokenOutputQuantities;

                DataChunks.Add("SEND".Select(x => (byte)x).ToArray());
                DataChunks.Add(tokenId);
                DataChunks.AddRange(TokenOutputQuantityBytes);
            }
Beispiel #2
0
            public MintMessage(byte[] tokenId, byte mintBatonVOut, ulong additionalTokenQuantity) : base(TokenType1.TransactionType.MINT)
            {
                TokenId                 = tokenId;
                MintBatonVOut           = mintBatonVOut;
                AdditionalTokenQuantity = additionalTokenQuantity;

                DataChunks.AddRange(new List <byte[]>
                {
                    "MINT".Select(x => (byte)x).ToArray(),
                    tokenId,
                    new[] { mintBatonVOut },
                    BitConverter.GetBytes(additionalTokenQuantity).Reverse().ToArray()
                });
            }
Beispiel #3
0
            public CommitMessage(byte[] tokenId, byte[] forBitcoinBlockHash, ulong forBitcoinBlockHeight,
                                 byte[] tokenTransactionSetHash,
                                 byte[] transactionSetDocumentUrlBytes) : base(TokenType1.TransactionType.COMMIT)
            {
                TokenId                        = tokenId;
                ForBitcoinBlockHash            = forBitcoinBlockHash;
                ForBitcoinBlockHeight          = forBitcoinBlockHeight;
                TokenTransactionSetHash        = tokenTransactionSetHash;
                TransactionSetDocumentUrlBytes = transactionSetDocumentUrlBytes;

                DataChunks.AddRange(new List <byte[]>
                {
                    "COMMIT".Select(x => (byte)x).ToArray(),
                    tokenId,
                    forBitcoinBlockHash,
                    BitConverter.GetBytes(forBitcoinBlockHeight).Reverse().ToArray(),
                    tokenTransactionSetHash,
                    transactionSetDocumentUrlBytes
                });
            }
Beispiel #4
0
            public GenesisMessage(byte[] tokenTickerBytes, byte[] tokenNameBytes, byte[] tokenDocumentUrlBytes,
                                  byte[] tokenDocumentHash, byte decimals, byte mintBatonVOut, ulong initialTokenMintQuantity) : base(
                    TokenType1.TransactionType.GENESIS)
            {
                TokenTickerBytes      = tokenTickerBytes;
                TokenNameBytes        = tokenNameBytes;
                TokenDocumentUrlBytes = tokenDocumentUrlBytes;
                TokenDocumentHash     = tokenDocumentHash;
                Decimals                 = decimals;
                MintBatonVOut            = mintBatonVOut;
                InitialTokenMintQuantity = initialTokenMintQuantity;

                DataChunks.AddRange(new List <byte[]>
                {
                    "GENESIS".Select(x => (byte)x).ToArray(),
                    tokenTickerBytes,
                    tokenNameBytes,
                    tokenDocumentUrlBytes,
                    tokenDocumentHash,
                    new[] { decimals },
                    new[] { mintBatonVOut },
                    BitConverter.GetBytes(initialTokenMintQuantity).Reverse().ToArray()
                });
            }