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); }
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() }); }
/// <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); }
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 }); }
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() }); }