예제 #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);
            }
예제 #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()
                });
            }
예제 #3
0
        /// <summary>
        /// Construct using the on disk references
        /// </summary>
        /// <param name="u5Directory"></param>
        /// <param name="dataOvlReference"></param>
        /// <param name="npcReferences"></param>
        public ShoppeKeeperDialogueReference(string u5Directory, DataOvlReference dataOvlReference, NonPlayerCharacterReferences npcReferences, Inventory inventory)
        {
            _dataOvlReference = dataOvlReference;
            string shoppeKeeperDataFilePath = Path.Combine(u5Directory, FileConstants.SHOPPE_DAT);

            _inventory = inventory;

            _dataChunks = new DataChunks <ShoppeKeeperChunkNames>(shoppeKeeperDataFilePath, ShoppeKeeperChunkNames.Unused);

            _dataChunks.AddDataChunk(DataChunk.DataFormatType.StringList, "All Shoppe Keeper Conversations", 0x00, 0x2797, 0, ShoppeKeeperChunkNames.AllData);

            BuildConversationTable(dataOvlReference);

            _shoppeKeeperReferences = new ShoppeKeeperReferences(dataOvlReference, npcReferences);
        }
예제 #4
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
                });
            }
예제 #5
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()
                });
            }