Skip to content

C# SDK Public API Inventory

This page lists the public classes, methods, functions, enum values, fields, and constants of the SDK. Use it to check exact names when working with lower-level SDK APIs.

PhantasmaPhoenix.Core.ISerializable

Source: PhantasmaPhoenix.Core/src/Abstractions/ISerializable.cs

Declarations

public interface ISerializable

Methods

public void SerializeData(BinaryWriter writer);
public void UnserializeData(BinaryReader reader);

PhantasmaPhoenix.Core.ByteArrayComparer

Source: PhantasmaPhoenix.Core/src/ByteArrayComparer.cs

Declarations

public class ByteArrayComparer : IEqualityComparer<byte[]>, IEqualityComparer, IComparer<byte[]>

PhantasmaPhoenix.Core.ByteArrayUtils

Source: PhantasmaPhoenix.Core/src/ByteArrayUtils.cs

Declarations

public static class ByteArrayUtils

Methods

public static bool CompareBytes(this byte[] left, byte[] right)
public static byte[] ConcatBytes(byte source1, byte[] source2)
public static byte[] ConcatBytes(byte[] source1, byte[] source2)
public static byte[] RangeBytes(this byte[] data, int index, int length)
public static byte[] ReverseBytes(byte[] source)
public static byte[]? DupBytes(byte[] src)
public static int HashBytes(byte[]? bytes)
public static int SearchBytes(this byte[] haystack, byte[] needle)
public static void CopyBytes(byte[] src, int spos, byte[] dst, int dpos, int len)

PhantasmaPhoenix.Core.ChainException

Source: PhantasmaPhoenix.Core/src/Exceptions/ChainException.cs

Declarations

public class ChainException : Exception

Methods

public ChainException(string msg) : base(msg)

PhantasmaPhoenix.Core.Extensions.ByteArrayExtensions

Source: PhantasmaPhoenix.Core/src/Extensions/ByteArrayExtensions.cs

Declarations

public static class ByteArrayExtensions

Methods

public static string AsString(this byte[] source)
public static uint ToUInt32(this byte[] value, int startIndex)

PhantasmaPhoenix.Core.Extensions.DoubleExtensions

Source: PhantasmaPhoenix.Core/src/Extensions/DoubleExtensions.cs

Declarations

public static class DoubleExtensions

Methods

public static bool ApproximatelyEquals(this double d, double val, double range)

PhantasmaPhoenix.Core.Extensions.IDictionaryExtensions

Source: PhantasmaPhoenix.Core/src/Extensions/IDictionaryExtensions.cs

Declarations

public static class IDictionaryExtensions

Methods

public static void Merge<K, V>(this IDictionary<K, V> target, IDictionary<K, V> source)

PhantasmaPhoenix.Core.Extensions.IEnumerableExtensions

Source: PhantasmaPhoenix.Core/src/Extensions/IEnumerableExtensions.cs

Declarations

public static class IEnumerableExtensions

Methods

public static IEnumerable<T> ExceptBy<T, TKey>(this IEnumerable<T> src, IEnumerable<T> items, Func<T, TKey> keySelector)
public static IEnumerable<T> ExceptBy<T, TKey>(this IEnumerable<T> src, T item, Func<T, TKey> keySelector)
public static bool None<TSource>(this IEnumerable<TSource> source)
public static bool None<TSource>(this IEnumerable<TSource> source, Func<TSource, bool> predicate)
public static double StdDev(this IEnumerable<double> values)
public static void ForEach<T>(this IEnumerable collection, Action<T> action)
public static void ForEach<T>(this IEnumerable<T> collection, Action<T> action)
public static void ForEachWithIndex<T>(this IEnumerable<T> collection, Action<T, int> action)

PhantasmaPhoenix.Core.Extensions.IntExtensions

Source: PhantasmaPhoenix.Core/src/Extensions/IntExtensions.cs

Declarations

public static class IntExtensions

Methods

public static IEnumerable<int> Range(this int n)
public static void ForEach(this int n, Action action)
public static void ForEach(this int n, Action<int> action)

PhantasmaPhoenix.Core.Extensions.JsonDocumentExtensions

Source: PhantasmaPhoenix.Core/src/Extensions/JsonDocumentExtensions.cs

Declarations

public static class JsonDocumentExtensions

Methods

public static string ToJsonString(this JToken token)

PhantasmaPhoenix.Core.Extensions.ListExtensions

Source: PhantasmaPhoenix.Core/src/Extensions/ListExtensions.cs

Declarations

public static class ListExtensions

Methods

public static bool ContainsBy<T, TKey>(this List<T> list, T item, Func<T, TKey> keySelector)
public static void AddDistinct<T>(this List<T> list, T item)
public static void AddDistinctBy<T, TKey>(this List<T> list, T item, Func<T, TKey> keySelector)
public static void AddMaximum<T>(this List<T> list, T item, int max)
public static void AddRangeDistinctBy<T>(this List<T> target, IEnumerable<T> src, Func<T, T, bool> equalityComparer)
public static void MoveToTail<T>(this List<T> list, T item, Predicate<T> pred)
public static void RemoveRange<T>(this List<T> target, List<T> src)
public static void RemoveRange<T>(this List<T> target, List<T> src, Func<T, T, bool> equalityComparer)
public static void Shuffle<T>(this IList<T> list)

PhantasmaPhoenix.Core.Extensions.StringExtensions

Source: PhantasmaPhoenix.Core/src/Extensions/StringExtensions.cs

Declarations

public static class StringExtensions

Methods

public static byte[] AsByteArray(this string source)
public static byte[]? FromHex(this string? value)
public static string ToHex(this byte[] value)
public static string ToHex(this byte[] value, int offset, int count)

PhantasmaPhoenix.Core.Extensions.TypeExtensions

Source: PhantasmaPhoenix.Core/src/Extensions/TypeExtensions.cs

Declarations

public static class TypeExtensions

Methods

public static bool IsStructOrClass(this Type type)

PhantasmaPhoenix.Core.HexByteArrayJsonConverter

Source: PhantasmaPhoenix.Core/src/HexByteArrayJsonConverter.cs

Declarations

public class HexByteArrayJsonConverter : JsonConverter<byte[]>

Methods

public HexByteArrayJsonConverter() { }
public override byte[] ReadJson(JsonReader reader, Type objectType, byte[]? existingValue, bool hasExistingValue, JsonSerializer serializer)
public override void WriteJson(JsonWriter writer, byte[]? value, JsonSerializer serializer)

PhantasmaPhoenix.Core.HexBytes

Source: PhantasmaPhoenix.Core/src/HexBytes.cs

Declarations

public sealed class HexBytes : IEquatable<HexBytes>

Methods

public bool Equals(HexBytes? other)
public byte[] ToArray()
public int ByteLength => _count;
public override bool Equals(object? obj) => Equals(obj as HexBytes);
public override int GetHashCode()
public override string ToString() => _array.ToHex(_offset, _count);
public static HexBytes FromBytes(byte[] array) => FromBytes(array ?? throw new ArgumentNullException(nameof(array)), 0, array.Length);
public static HexBytes FromBytes(byte[] array, int offset, int count)
public static HexBytes? FromHex(string? hex)
public static implicit operator string?(HexBytes? value) => value?.ToString();
public void WriteTo(IHexValueWriter writer)

PhantasmaPhoenix.Core.HexBytesJsonConverter

Source: PhantasmaPhoenix.Core/src/HexBytesJsonConverter.cs

Declarations

public class HexBytesJsonConverter : JsonConverter<HexBytes?>

Methods

public override HexBytes? ReadJson(JsonReader reader, Type objectType, HexBytes? existingValue, bool hasExistingValue, JsonSerializer serializer)
public override void WriteJson(JsonWriter writer, HexBytes? value, JsonSerializer serializer)

PhantasmaPhoenix.Core.IHexValueWriter

Source: PhantasmaPhoenix.Core/src/IHexValueWriter.cs

Declarations

public interface IHexValueWriter

PhantasmaPhoenix.Core.Compression

Source: PhantasmaPhoenix.Core/src/Serialization/Compression.cs

Declarations

public static class Compression

Methods

public static byte[] Compress(byte[] data)
public static byte[] Decompress(byte[] data)

PhantasmaPhoenix.Core.CustomSerializer

Source: PhantasmaPhoenix.Core/src/Serialization/CustomSerializer.cs

Declarations

public struct CustomSerializer

Methods

public CustomSerializer(CustomReader reader, CustomWriter writer)
public readonly CustomReader Read;
public readonly CustomWriter Write;

PhantasmaPhoenix.Core.Extensions.BigIntegerExtension

Source: PhantasmaPhoenix.Core/src/Serialization/Extensions/BigIntegerExtensions.cs

Declarations

public static class BigIntegerExtension

Methods

public static BigInteger HexToBigInteger(this string a)
public static BigInteger Mod(this BigInteger a, BigInteger b)
public static BigInteger ModInverse(this BigInteger a, BigInteger n)
public static System.Numerics.BigInteger AsBigInteger(this byte[] source)
public static bool IsParsable(this string val)
public static bool TestBit(this BigInteger a, int index)
public static byte[] AsByteArray(this BigInteger source)
public static byte[] ToSignedByteArray(this BigInteger a)
public static byte[] ToUnsignedByteArray(this BigInteger a)
public static int GetBitLength(this BigInteger a)
public static int GetLowestSetBit(this BigInteger a)

PhantasmaPhoenix.Core.Extensions.BinaryIoBasicTypesExtensions

Source: PhantasmaPhoenix.Core/src/Serialization/Extensions/BinaryIoBasicTypesExtensions.cs

Declarations

public static class BinaryIoBasicTypesExtensions

Methods

public static BigInteger ReadBigInteger(this BinaryReader reader)
public static T ReadSerializable<T>(this BinaryReader reader, int max = 0x1000000) where T : ISerializable, new()
public static T[] ReadSerializableArray<T>(this BinaryReader reader, int max = 0x1000000) where T : ISerializable, new()
public static Timestamp ReadTimestamp(this BinaryReader reader)
public static byte[] ReadByteArray(this BinaryReader reader)
public static byte[] ReadFixedBytes(this BinaryReader reader, int size)
public static byte[] ReadVarBytes(this BinaryReader reader, int max = 0x1000000)
public static byte[] ToArray(this ISerializable value)
public static int GetVarSize(int value)
public static int GetVarSize(this string value)
public static int GetVarSize<T>(this IReadOnlyCollection<T> value)
public static string ReadVarString(this BinaryReader reader, int max)
public static string? ReadVarString(this BinaryReader reader)
public static ulong ReadVarInt(this BinaryReader reader, ulong max = ulong.MaxValue)
public static void Write(this BinaryWriter writer, ISerializable value)
public static void Write<T>(this BinaryWriter writer, IReadOnlyCollection<T> value) where T : ISerializable
public static void WriteBigInteger(this BinaryWriter writer, BigInteger n)
public static void WriteByteArray(this BinaryWriter writer, byte[] bytes)
public static void WriteNullableArray<T>(this BinaryWriter writer, T[] value) where T : class, ISerializable
public static void WriteTimestamp(this BinaryWriter writer, Timestamp timestamp)
public static void WriteVarBytes(this BinaryWriter writer, ReadOnlySpan<byte> value)
public static void WriteVarInt(this BinaryWriter writer, long value)
public static void WriteVarString(this BinaryWriter writer, string text)

PhantasmaPhoenix.Core.Serialization

Source: PhantasmaPhoenix.Core/src/Serialization/Serialization.cs

Declarations

public static class Serialization

Methods

public static ISerializable AsSerializable(this byte[] value, Type type)
public static T? Unserialize<T>(BinaryReader reader)
public static T? Unserialize<T>(byte[] bytes)
public static byte[] Serialize(this object obj)
public static object? Unserialize(BinaryReader reader, Type type)
public static object? Unserialize(byte[] bytes, Type type)
public static void RegisterType<T>(CustomReader reader, CustomWriter writer)
public static void Serialize(BinaryWriter writer, object obj)
public static void Serialize(BinaryWriter writer, object obj, Type type)

PhantasmaPhoenix.Core.StructuralEqualityComparer

Source: PhantasmaPhoenix.Core/src/StructuralEqualityComparer.cs

Declarations

public class StructuralEqualityComparer<T> : IEqualityComparer<T>

Methods

public bool Equals(T? x, T? y)
public int GetHashCode(T obj)
public static StructuralEqualityComparer<T> Default

PhantasmaPhoenix.Core.Timestamp

Source: PhantasmaPhoenix.Core/src/Structures/Timestamp.cs

Declarations

public struct Timestamp : IComparable<Timestamp>

Methods

public Timestamp(BigInteger value)
public Timestamp(string value)
public Timestamp(uint value)
public int CompareTo(Timestamp other)
public int GetSize()
public override bool Equals(object? obj)
public override int GetHashCode()
public override string ToString()
public readonly static Timestamp Null = new Timestamp(0);
public readonly uint Value;
public static Timestamp Now => DateTime.UtcNow;
public static bool operator !=(Timestamp A, Timestamp B)
public static bool operator <(Timestamp A, Timestamp B)
public static bool operator <=(Timestamp A, Timestamp B)
public static bool operator ==(Timestamp A, Timestamp B)
public static bool operator >(Timestamp A, Timestamp B)
public static bool operator >=(Timestamp A, Timestamp B)
public static implicit operator DateTime(Timestamp timestamp)
public static implicit operator Timestamp(DateTime time)
public static implicit operator Timestamp(uint ticks)
public static uint operator +(Timestamp A, TimeSpan B)
public static uint operator -(Timestamp A, TimeSpan B)
public static uint operator -(Timestamp A, Timestamp B)
public string ToString(string format)

PhantasmaPhoenix.Core.Throw

Source: PhantasmaPhoenix.Core/src/Throw.cs

Declarations

public static class Throw

Methods

public static Exception? ExpandInnerExceptions(this Exception? ex)
public static void Assert( #if NET6_0_OR_GREATER #endif bool condition, string message = "assertion failure")
public static void If( #if NET6_0_OR_GREATER #endif bool constraint, string constraintName)
public static void If(Func<bool> lambda, string constraintName)
public static void IfEmpty( #if NET6_0_OR_GREATER #endif string? argumentValue, string argumentName)
public static void IfEmpty<T>(IEnumerable<T> argumentValue, string argumentName)
public static void IfHasNull<T>(ICollection<T>? argumentValue, string argumentName)
public static void IfInRange(int argumentValue, int startRange, int endRange, string argumentName)
public static void IfNot( #if NET6_0_OR_GREATER #endif bool constraint, string constraintName)
public static void IfNot(Func<bool> lambda, string constraintName)
public static void IfNull( #if NET6_0_OR_GREATER #endif object? argumentValue, string argumentName)
public static void IfNull<T>( #if NET6_0_OR_GREATER #endif T? argumentValue, string argumentName) where T : struct
public static void IfNullOrEmpty( #if NET6_0_OR_GREATER #endif ICollection? argumentValue, string argumentName)
public static void IfNullOrEmpty( #if NET6_0_OR_GREATER #endif string? argumentValue, string argumentName)
public static void IfOutOfRange(Enum argumentValue, string argumentName)
public static void IfOutOfRange(int argumentValue, int startRange, int endRange, string argumentName)

PhantasmaPhoenix.Core.Tools.NamedStopwatch

Source: PhantasmaPhoenix.Core/src/Tools/NamedStopwatch.cs

Declarations

public sealed class NamedStopwatch

Methods

public NamedStopwatch( string name )
public bool HasName => !string.IsNullOrEmpty(Name);
public long ElapsedMilliseconds => _stopwatch.ElapsedMilliseconds;
public readonly string Name;
public static string StopwatchesToString(List<NamedStopwatch> stopwatches, Stopwatch totalStopwatch)
public static void Start( ref List<NamedStopwatch> stopwatches, string name )
public static void Stop( List<NamedStopwatch> stopwatches, string name )
public string GetPrefixedName( string prefix )
public void Reset()
public void Start()
public void Stop()

PhantasmaPhoenix.Core.Tools.NamedStopwatchSet

Source: PhantasmaPhoenix.Core/src/Tools/NamedStopwatchSet.cs

Declarations

public sealed class NamedStopwatchSet

Methods

public NamedStopwatchSet(bool enabled, bool startTotal = true)
public long ElapsedMilliseconds => _totalStopwatch?.ElapsedMilliseconds ?? 0;
public override string ToString()
public string? GetReportIfReady(string messagePrefix)
public void Configure(uint reportFrequencyLimitInSeconds, uint reportMinElapsedLimitInMilliseconds = 100)
public void Reset(bool resetTotal = true)
public void Start(string name)
public void Stop()
public void Stop(string name)
public void StopAll(bool stopTotal = false)
public void TotalStart()
public void TotalStop()

PhantasmaPhoenix.Core.Tools.ProfileSession

Source: PhantasmaPhoenix.Core/src/Tools/ProfileMarker.cs

Declarations

public class ProfileSession : IDisposable

Methods

public ProfileMarker(string name)
public ProfileMarker(string name, ProfileMarker parent)
public ProfileSession(System.IO.Stream o)
public int parentIdx;
public long end;
public long start;
public static ProfileSession CurrentSession;
public string name;
public struct ProfileMarker : IDisposable
public void Pop(string name)
public void Push(string name)
public void Stop()

PhantasmaPhoenix.Core.Tools.TaskLogger

Source: PhantasmaPhoenix.Core/src/Tools/TaskLogger.cs

Declarations

public static class TaskLogger

Methods

public static IReadOnlyDictionary<string, int> GetSnapshot()
public static Task RunLogged(string name, Func<Task> func)
public static void Initialize(ILogger logger, TimeSpan interval, CancellationToken? ct = default)
public static void RunFireAndForget(string name, Func<Task> func)

PhantasmaPhoenix.Core.UnitConversion

Source: PhantasmaPhoenix.Core/src/UnitConversion.cs

Declarations

public static class UnitConversion

Methods

public static BigInteger ConvertDecimals(BigInteger value, uint decimalFrom, uint decimalTo)
public static BigInteger GetUnitValue(uint decimals)
public static BigInteger ToBigInteger(decimal n, uint units)
public static decimal ToDecimal(BigInteger value, uint tokenDecimals)
public static decimal ToDecimal(string amount, uint tokenDecimals)
public static string ToDecimalString(string amount, uint tokenDecimals)

PhantasmaPhoenix.Cryptography.IKeyPair

Source: PhantasmaPhoenix.Cryptography/src/Abstractions/IKeyPair.cs

Declarations

public interface IKeyPair

PhantasmaPhoenix.Cryptography.Base16

Source: PhantasmaPhoenix.Cryptography/src/Common/Base16.cs

Declarations

public static class Base16

Methods

public static byte[]? Decode(this string input, bool allowExceptions = true)
public static string Encode(this byte[] input)

PhantasmaPhoenix.Cryptography.Base58

Source: PhantasmaPhoenix.Cryptography/src/Common/Base58.cs

Declarations

public static class Base58

Methods

public const string Alphabet = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";
public static byte[] Decode(string input)
public static string Encode(byte[] input)

PhantasmaPhoenix.Cryptography.ECDsaCurve

Source: PhantasmaPhoenix.Cryptography/src/Cryptography/ECDsa/ECDsa.Curves.cs

Declarations

public enum ECDsaCurve

Variants

  • Secp256k1
  • Secp256r1

PhantasmaPhoenix.Cryptography.ECDsaHelpers

Source: PhantasmaPhoenix.Cryptography/src/Cryptography/ECDsa/ECDsa.Helpers.cs

Declarations

public static class ECDsaHelpers

Methods

public static ECDomainParameters GetECDomainParameters(ECDsaCurve curve)
public static ECPrivateKeyParameters GetECPrivateKeyParameters(ECDsaCurve curve, byte[] privateKey)
public static ECPublicKeyParameters GetECPublicKeyParameters(ECDsaCurve curve, byte[] publicKey)
public static X9ECParameters GetECParameters(ECDsaCurve curve)
public static byte[] FromDER(byte[] derSignature, int outputLength = 64)
public static byte[] ToDER(byte[] signature)

PhantasmaPhoenix.Cryptography.ECDsaSignature

Source: PhantasmaPhoenix.Cryptography/src/Cryptography/ECDsa/ECDsa.Signature.cs

Declarations

public class ECDsaSignature : Signature

Methods

public ECDsaCurve Curve { get; private set; }
public ECDsaSignature(byte[] bytes, ECDsaCurve curve)
public byte[] Bytes { get; private set; }
public override SignatureKind Kind => SignatureKind.ECDSA;
public override bool Equals(object obj)
public override bool Verify(byte[] message, IEnumerable<Address> addresses)
public override int GetHashCode()
public override void SerializeData(BinaryWriter writer)
public override void UnserializeData(BinaryReader reader)
public static ECDsaSignature Generate(IKeyPair keypair, byte[] message, ECDsaCurve curve, Func<byte[], byte[], byte[], byte[]>? customSignFunction = null)
public static byte[] ExtractPublicKeyFromAddress(Address address)

PhantasmaPhoenix.Cryptography.ECDsa

Source: PhantasmaPhoenix.Cryptography/src/Cryptography/ECDsa/ECDsa.cs

Declarations

public static class ECDsa

Methods

public static bool Verify(byte[] message, byte[] signature, byte[] pubkey, ECDsaCurve curve)
public static byte[] CompressPublicKey(byte[] uncompressedPublicKey)
public static byte[] DecompressPublicKey(byte[] compressedPublicKey, ECDsaCurve curve, bool dropUncompressedKeyPrefixByte = false)
public static byte[] GetPublicKey(byte[] privateKey, bool compressed, ECDsaCurve curve)
public static byte[] Sign(byte[] message, byte[] prikey, ECDsaCurve curve)
public static byte[] SignDeterministic(byte[] message, byte[] prikey, ECDsaCurve curve)

PhantasmaPhoenix.Cryptography.Ed25519Signature

Source: PhantasmaPhoenix.Cryptography/src/Cryptography/EdDSA/Ed25519.Signature.cs

Declarations

public class Ed25519Signature : Signature

Methods

public Ed25519Signature(byte[] bytes)
public byte[] Bytes { get; private set; }
public override SignatureKind Kind => SignatureKind.Ed25519;
public override bool Equals(object obj)
public override bool Verify(byte[] message, IEnumerable<Address> addresses)
public override int GetHashCode()
public override void SerializeData(BinaryWriter writer)
public override void UnserializeData(BinaryReader reader)
public static Ed25519Signature Generate(IKeyPair keypair, byte[] message)

PhantasmaPhoenix.Cryptography.Ed25519

Source: PhantasmaPhoenix.Cryptography/src/Cryptography/EdDSA/Ed25519.cs

Declarations

public static class Ed25519

Methods

public const int ExpandedPrivateKeySizeInBytes = 32 * 2;
public const int PrivateKeySeedSizeInBytes = 32;
public const int PublicKeySizeInBytes = 32;
public const int SharedKeySizeInBytes = 32;
public const int SignatureSizeInBytes = 64;
public static bool Verify(byte[] signature, byte[] message, byte[] publicKey)
public static byte[] PublicKeyFromSeed(byte[] privateKey)
public static byte[] Sign(byte[] message, byte[] expandedPrivateKey)

PhantasmaPhoenix.Cryptography.Entropy

Source: PhantasmaPhoenix.Cryptography/src/Cryptography/Entropy.cs

Declarations

public static class Entropy

Methods

public static byte[] GetRandomBytes(int targetLength)

PhantasmaPhoenix.Cryptography.Extensions.Base58Extensions

Source: PhantasmaPhoenix.Cryptography/src/Cryptography/Extensions/Base58Extensions.cs

Declarations

public static class Base58Extensions

Methods

public static byte[] Base58CheckDecode(this string input)
public static string Base58CheckEncode(this byte[] data)

PhantasmaPhoenix.Cryptography.Extensions.HashExtensions

Source: PhantasmaPhoenix.Cryptography/src/Cryptography/Extensions/HashExtensions.cs

Declarations

public static class HashExtensions

Methods

public static byte[] Blake2b_256(this byte[] value, int offset, int count)
public static byte[] Sha256(this IEnumerable<byte> value)
public static byte[] Sha256(this byte[] value, int offset, int count)
public static byte[] Sha256(this string value)

PhantasmaPhoenix.Cryptography.Hash

Source: PhantasmaPhoenix.Cryptography/src/Cryptography/Hash/Hash.cs

Declarations

public struct Hash : ISerializable, IComparable<Hash>, IEquatable<Hash>

Methods

public Hash(byte[] value)
public bool IsNull
public byte[] ToByteArray()
public byte[] ToByteArrayReversed()
public const int Length = 32;
public int CompareTo(Hash other)
public int Size => _data.Length;
public override bool Equals(object? obj)
public override int GetHashCode() => (int)_data.ToUInt32(0);
public override string ToString()
public static Hash FromBytes(byte[] input)
public static Hash FromString(string str)
public static Hash FromUnpaddedHex(string hash)
public static Hash MerkleCombine(Hash A, Hash B)
public static Hash Parse(string s)
public static bool TryParse(string s, out Hash result)
public static bool operator !=(Hash left, Hash right)
public static bool operator <(Hash left, Hash right)
public static bool operator <=(Hash left, Hash right)
public static bool operator ==(Hash left, Hash right)
public static bool operator >(Hash left, Hash right)
public static bool operator >=(Hash left, Hash right)
public static implicit operator BigInteger(Hash val)
public static implicit operator Hash(BigInteger val)
public static readonly Hash Null = FromBytes(new byte[Length]);
public static readonly Hash Zero = new Hash();
public void SerializeData(BinaryWriter writer)
public void UnserializeData(BinaryReader reader)

PhantasmaPhoenix.Cryptography.NaCl

Source: PhantasmaPhoenix.Cryptography/src/Cryptography/NaCl/NaCl.cs

Declarations

public static class NaCl

Methods

public const int KeyLength = 32;
public const int NonceLength = 24;
public const int PublicKeyLength = 32;
public const int SecretKeyLength = 32;
public const int TagLength = 16;
public static (byte[] publicKey, byte[] secretKey) GenerateKeyPair()
public static bool TrySecretBoxOpen(byte[] sealedBox, byte[] nonce, byte[] key, out byte[] plaintext)
public static byte[] DeriveSessionKey(byte[] theirPublicKey, byte[] mySecretKey)
public static byte[] GenerateNonce()
public static byte[] GenerateSessionKey()
public static byte[] SecretBoxSeal(byte[] plaintext, byte[] nonce, byte[] key)

PhantasmaPhoenix.Cryptography.AddressKind

Source: PhantasmaPhoenix.Cryptography/src/Enums.cs

Declarations

public enum AddressKind

Variants

  • Interop = 3
  • Invalid = 0
  • System = 2
  • User = 1

PhantasmaPhoenix.Cryptography.SignatureKind

Source: PhantasmaPhoenix.Cryptography/src/Enums.cs

Declarations

public enum SignatureKind

Variants

  • ECDSA
  • Ed25519
  • None

PhantasmaPhoenix.Cryptography.MnemonicPhraseLength

Source: PhantasmaPhoenix.Cryptography/src/Mnemonics/Enums.cs

Declarations

public enum MnemonicPhraseLength

Variants

  • Twelve_Words
  • Twenty_Four_Words

PhantasmaPhoenix.Cryptography.Mnemonics

Source: PhantasmaPhoenix.Cryptography/src/Mnemonics/Mnemonics.cs

Declarations

public static class Mnemonics

Methods

public static (byte[]?, string?) MnemonicToPK(string mnemonicPhrase, uint pkIndex = 0)
public static (string?, string?) MnemonicToWif(string mnemonicPhrase, uint pkIndex = 0)
public static string GenerateMnemonic(MnemonicPhraseLength mnemonicPhraseLength)

PhantasmaPhoenix.Cryptography.Extensions.BinaryIoStructuresExtensions

Source: PhantasmaPhoenix.Cryptography/src/Serialization/Extensions/BinaryIoStructuresExtensions.cs

Declarations

public static class BinaryIoStructuresExtensions

Methods

public static Address ReadAddress(this BinaryReader reader)
public static Hash ReadHash(this BinaryReader reader)
public static Signature ReadSignature(this BinaryReader reader)
public static byte[] ReadPublicKey(this BinaryReader reader)
public static void WriteAddress(this BinaryWriter writer, Address address)
public static void WriteHash(this BinaryWriter writer, Hash hash)
public static void WritePublicKey(this BinaryWriter writer, byte[] publicKey)
public static void WriteSignature(this BinaryWriter writer, Signature signature)

PhantasmaPhoenix.Cryptography.Address

Source: PhantasmaPhoenix.Cryptography/src/Structures/Address.cs

Declarations

public struct Address : ISerializable, IComparable<Address>, IEquatable<Address>

Methods

public AddressKind Kind => IsNull ? AddressKind.System : (_bytes[0] >= 3) ? AddressKind.Interop : (AddressKind)_bytes[0];
public bool Equals(Address otherAddress)
public bool IsInterop => Kind == AddressKind.Interop;
public bool IsNull
public bool IsSystem => Kind == AddressKind.System;
public bool IsUser => Kind == AddressKind.User;
public bool ValidateSignedData(string signedData, string random, string data)
public byte PlatformID => (byte)(1 + _bytes[0] - AddressKind.Interop);
public byte[] GetPublicKey()
public byte[] ToByteArray()
public const int LengthInBytes = 34;
public const int MaxPlatformNameLength = 10;
public int CompareTo(Address other)
public int GetSize()
public override bool Equals(object? obj)
public override int GetHashCode()
public override string ToString()
public static Address EncodeAddress(byte platformID, string addressText)
public static Address FromBytes(byte[] bytes)
public static Address FromHash(byte[] input)
public static Address FromHash(string str)
public static Address FromInterop(byte platformID, byte[] publicKey)
public static Address FromKey(IKeyPair key)
public static Address Parse(string text, bool checkReservedByte = true)
public static bool IsValidAddress(string text)
public static bool operator !=(Address A, Address B)
public static bool operator ==(Address A, Address B)
public static readonly Address Null = new Address(NullPublicKey);
public static readonly string NullText = "NULL";
public string ConvertPhantasmaToEthereum()
public string Text
public void DecodeInterop(out byte platformID, out byte[] publicKey)
public void SerializeData(BinaryWriter writer)
public void UnserializeData(BinaryReader reader)

PhantasmaPhoenix.Cryptography.PhantasmaKeys

Source: PhantasmaPhoenix.Cryptography/src/Structures/KeyPair.cs

Declarations

public sealed class PhantasmaKeys : IKeyPair

Methods

public PhantasmaKeys(byte[] privateKey)
public Signature Sign(byte[] msg, Func<byte[], byte[], byte[], byte[]>? customSignFunction = null)
public byte[] PrivateKey { get; private set; }
public byte[] PublicKey { get; private set; }
public const int PrivateKeyLength = 32;
public override string ToString()
public readonly Address Address;
public static PhantasmaKeys FromWIF(string wif)
public static PhantasmaKeys Generate()
public string ToWIF()

PhantasmaPhoenix.Cryptography.Signature

Source: PhantasmaPhoenix.Cryptography/src/Structures/Signature.cs

Declarations

public abstract class Signature : ISerializable

Methods

public abstract SignatureKind Kind { get; }
public abstract bool Verify(byte[] message, IEnumerable<Address> addresses);
public abstract void SerializeData(BinaryWriter writer);
public abstract void UnserializeData(BinaryReader reader);
public bool Verify(byte[] message, Address address)
public byte[] ToByteArray()
public override bool Equals(object? obj)

PhantasmaPhoenix.Cryptography.Legacy.BIP39.BIP39

Source: PhantasmaPhoenix.Cryptography.Legacy/src/Mnemonics/BIP39.cs

Declarations

public class BIP39

Methods

public BIP39(string mnemonicSentence, string passphrase = cEmptyString)
public byte[] SeedBytes
public const string cEmptyString = "";
public const string cSaltHeader = "mnemonic"; //this is the first part of the salt as described in the BIP39 spec
public string MnemonicSentence

PhantasmaPhoenix.Cryptography.Legacy.MnemonicsLegacy

Source: PhantasmaPhoenix.Cryptography.Legacy/src/Mnemonics/MnemonicsLegacy.cs

Declarations

public static class MnemonicsLegacy

Methods

public static string DecodeLegacySeedToWif(string mnemonicPhrase, string password)

PhantasmaPhoenix.Cryptography.Legacy.PBKDF2.Rfc2898_pbkdf2_hmacsha512

Source: PhantasmaPhoenix.Cryptography.Legacy/src/Mnemonics/RFC2898_PBDF2_HMAC-SHA512.cs

Declarations

public class Rfc2898_pbkdf2_hmacsha512

Methods

public Byte[] GetDerivedKeyBytes_PBKDF2_HMACSHA512(Int32 keyLength)
public Rfc2898_pbkdf2_hmacsha512(Byte[] password, Byte[] salt, int iterations = CMinIterations)
public const int CMinIterations = 2048;
public const int CMinSaltLength = 8;
public const int hLen = 64;
public static Byte[] PBKDF2(Byte[] P, Byte[] S, int c = CMinIterations, int dkLen = hLen)

PhantasmaPhoenix.Cryptography.Legacy.Utilities

Source: PhantasmaPhoenix.Cryptography.Legacy/src/Mnemonics/Utilities.cs

Declarations

public static class Utilities

Methods

public static Byte[] MergeByteArrays(Byte[] source1, Byte[] source2)
public static String NormaliseStringNfkd(String toNormalise)
public static byte[] HmacSha512Digest(byte[] input, int offset, int length, byte[] hmacKey)

PhantasmaPhoenix.Cryptography.Legacy.Storage.ArchiveEncryptionMode

Source: PhantasmaPhoenix.Cryptography.Legacy/src/Storage/Abstractions/IArchiveEncryption.cs

Declarations

public enum ArchiveEncryptionMode

Variants

  • None
  • Private
  • Shared

PhantasmaPhoenix.Cryptography.Legacy.Storage.IArchiveEncryption

Source: PhantasmaPhoenix.Cryptography.Legacy/src/Storage/Abstractions/IArchiveEncryption.cs

Declarations

public interface IArchiveEncryption : ISerializable

PhantasmaPhoenix.Cryptography.Legacy.Storage.ArchiveExtensions

Source: PhantasmaPhoenix.Cryptography.Legacy/src/Storage/ArchiveExtensions.cs

Declarations

public static class ArchiveExtensions

Methods

public static IArchiveEncryption ReadArchiveEncryption(byte[] bytes)
public static IArchiveEncryption ReadArchiveEncryption(this BinaryReader reader)
public static byte[] ToBytes(this IArchiveEncryption encryption)
public static readonly byte[] Uncompressed = new byte[] { (byte)ArchiveEncryptionMode.None };
public static void WriteArchiveEncryption(this BinaryWriter writer, IArchiveEncryption encryption)

PhantasmaPhoenix.Cryptography.Legacy.Storage.AES

Source: PhantasmaPhoenix.Cryptography.Legacy/src/Storage/Cryptography/AES.cs

Declarations

public static class AES

Methods

public static byte[] GCMDecrypt(byte[] data, byte[] key, byte[] iv)
public static byte[] GCMEncrypt(byte[] data, byte[] key, byte[] iv)
public static byte[] GenerateIV(int vectorSize)

PhantasmaPhoenix.Cryptography.Legacy.Storage.DiffieHellman

Source: PhantasmaPhoenix.Cryptography.Legacy/src/Storage/Cryptography/DiffieHellman.cs

Declarations

public static class DiffieHellman

Methods

public static byte[] Decrypt(byte[] input, byte[] key)
public static byte[] Encrypt(byte[] input, byte[] key)
public static byte[] GetSharedSecret(byte[] localPrivateKeyBytes, byte[] remotePublicKeyBytes)

PhantasmaPhoenix.Cryptography.Legacy.Storage.PrivateArchiveEncryption

Source: PhantasmaPhoenix.Cryptography.Legacy/src/Storage/PrivateArchiveEncryption.cs

Declarations

public class PrivateArchiveEncryption : IArchiveEncryption

Methods

public Address Address { get; private set; }
public ArchiveEncryptionMode Mode => ArchiveEncryptionMode.Private;
public PrivateArchiveEncryption()
public PrivateArchiveEncryption(Address publicKey)
public byte[] ContentInitializationVector { get; private set; }
public byte[] Decrypt(byte[] chunk, PhantasmaKeys keys)
public byte[] Encrypt(byte[] chunk, PhantasmaKeys keys)
public byte[] NameInitializationVector { get; private set; }
public string DecryptName(string name, PhantasmaKeys keys)
public string EncryptName(string name, PhantasmaKeys keys)
public void SerializeData(BinaryWriter writer)
public void UnserializeData(BinaryReader reader)

PhantasmaPhoenix.Cryptography.Legacy.Storage.SharedArchiveEncryption

Source: PhantasmaPhoenix.Cryptography.Legacy/src/Storage/SharedArchiveEncryption.cs

Declarations

public class SharedArchiveEncryption : IArchiveEncryption

Methods

public Address Destination { get; private set; }
public Address Source { get; private set; }
public ArchiveEncryptionMode Mode => ArchiveEncryptionMode.Shared;
public SharedArchiveEncryption()
public byte[] Decrypt(byte[] chunk, PhantasmaKeys keys)
public byte[] Encrypt(byte[] chunk, PhantasmaKeys keys)
public string DecryptName(string name, PhantasmaKeys keys)
public string EncryptName(string name, PhantasmaKeys keys)
public void SerializeData(BinaryWriter writer)
public void UnserializeData(BinaryReader reader)

PhantasmaPhoenix.InteropChains.Legacy.Ethereum.Signer.Crypto.ECDSASignature

Source: PhantasmaPhoenix.InteropChains.Legacy/src/Ethereum/Crypto/ECDSASignature.cs

Declarations

public class ECDSASignature

Methods

public BigInteger R { get; }
public BigInteger S { get; }
public ECDSASignature MakeCanonical()
public ECDSASignature(BigInteger r, BigInteger s)
public ECDSASignature(BigInteger[] rs)
public ECDSASignature(byte[] derSig)
public bool IsLowS => S.CompareTo(ECKey.HALF_CURVE_ORDER) <= 0;
public byte[] ToDER()
public byte[] V { get; set; }
public static ECDSASignature FromDER(byte[] sig)
public static bool IsValidDER(byte[] bytes)

PhantasmaPhoenix.InteropChains.Legacy.Ethereum.Signer.Crypto.ECKey

Source: PhantasmaPhoenix.InteropChains.Legacy/src/Ethereum/Crypto/ECKey.cs

Declarations

public class ECKey

Methods

public ECDomainParameters DomainParameter
public ECKey(byte[] vch, bool isPrivate)
public ECPrivateKeyParameters PrivateKey => _Key as ECPrivateKeyParameters;
public ECPublicKeyParameters GetPublicKeyParameters()
public bool Verify(byte[] hash, ECDSASignature sig)
public byte[] GetPubKey(bool isCompressed)
public static ECKey RecoverFromSignature(int recId, ECDSASignature sig, byte[] message, bool compressed)
public static X9ECParameters Secp256k1 => _Secp256k1;
public static readonly BigInteger CURVE_ORDER;
public static readonly BigInteger HALF_CURVE_ORDER;
public static readonly ECDomainParameters CURVE;
public static readonly X9ECParameters _Secp256k1;
public virtual ECDSASignature Sign(byte[] hash)

PhantasmaPhoenix.InteropChains.Legacy.Ethereum.Hex.HexConvertors.Extensions.HexBigIntegerConvertorExtensions

Source: PhantasmaPhoenix.InteropChains.Legacy/src/Ethereum/Hex/Extensions/HexBigIntegerConvertorExtensions.cs

Declarations

public static class HexBigIntegerConvertorExtensions

Methods

public static BigInteger HexToBigInteger(this string hex, bool isHexLittleEndian)
public static byte[] ToByteArray(this BigInteger value, bool littleEndian)
public static string ToHex(this BigInteger value, bool littleEndian, bool compact = true, bool add0x = true)

PhantasmaPhoenix.InteropChains.Legacy.Ethereum.Hex.HexConvertors.Extensions.HexByteConvertorExtensions

Source: PhantasmaPhoenix.InteropChains.Legacy/src/Ethereum/Hex/Extensions/HexByteConvertorExtensions.cs

Declarations

public static class HexByteConvertorExtensions

Methods

public static bool HasHexPrefix(this string value)
public static bool IsHex(this string value)
public static bool IsTheSameHex(this string first, string second)
public static byte[] HexToByteArray(this string value)
public static string EnsureHexPrefix(this string value)
public static string RemoveHexPrefix(this string value)
public static string ToHex(this byte[] value, bool prefix = false)
public static string ToHexCompact(this byte[] value)
public static string[] EnsureHexPrefix(this string[] values)

PhantasmaPhoenix.InteropChains.Legacy.Ethereum.EthereumKey

Source: PhantasmaPhoenix.InteropChains.Legacy/src/Ethereum/KeyPair.cs

Declarations

public class EthereumKey : IKeyPair

Methods

public EthereumKey(byte[] privateKey)
public Signature Sign(byte[] msg, Func<byte[], byte[], byte[], byte[]> customSignFunction = null)
public byte[] PrivateKey { get; private set; }
public byte[] PublicKey { get; private set; }
public override string ToString()
public readonly byte[] CompressedPublicKey;
public readonly byte[] UncompressedPublicKey;
public readonly string Address;
public static EthereumKey FromPrivateKey(string prv)
public static EthereumKey FromWIF(string wif)
public static EthereumKey Generate()
public static byte[] FromWIFToBytes(string wif)
public static string PublicKeyToAddress(byte[] publicKey, ECDsaCurve curve)
public string GetWIF()

PhantasmaPhoenix.InteropChains.Legacy.Ethereum.Model.DefaultValues

Source: PhantasmaPhoenix.InteropChains.Legacy/src/Ethereum/Model/DefaultValues.cs

Declarations

public class DefaultValues

Methods

public static DefaultValues Current { get; } = new DefaultValues();
public static byte[] EMPTY_BYTE_ARRAY = new byte[0];
public static readonly byte[] EMPTY_DATA_HASH = Sha3Keccack.Current.CalculateHash(EMPTY_BYTE_ARRAY);
public static readonly byte[] EMPTY_TRIE_HASH = Sha3Keccack.Current.CalculateHash(RLP.RLP.EncodeElement(EMPTY_BYTE_ARRAY));
public static readonly byte[] ZERO_BYTE_ARRAY = { 0 };

PhantasmaPhoenix.InteropChains.Legacy.Ethereum.RLP.ConvertorForRLPEncodingExtensions

Source: PhantasmaPhoenix.InteropChains.Legacy/src/Ethereum/RLP/ConvertorForRLPEncodingExtensions.cs

Declarations

public static class ConvertorForRLPEncodingExtensions

Methods

public static BigInteger ToBigIntegerFromRLPDecoded(this byte[] bytes)
public static byte[] ToBytesForRLPEncoding(this BigInteger bigInteger)
public static byte[] ToBytesForRLPEncoding(this int number)
public static byte[] ToBytesForRLPEncoding(this long number)
public static byte[] ToBytesForRLPEncoding(this string str)
public static byte[][] ToBytesForRLPEncoding(this string[] strings)
public static int ToIntFromRLPDecoded(this byte[] bytes)
public static long ToLongFromRLPDecoded(this byte[] bytes)
public static string ToStringFromRLPDecoded(this byte[] bytes)

PhantasmaPhoenix.InteropChains.Legacy.Ethereum.RLP.IRLPElement

Source: PhantasmaPhoenix.InteropChains.Legacy/src/Ethereum/RLP/IRLPElement.cs

Declarations

public interface IRLPElement

PhantasmaPhoenix.InteropChains.Legacy.Ethereum.RLP.RLP

Source: PhantasmaPhoenix.InteropChains.Legacy/src/Ethereum/RLP/RLP.cs

Declarations

public class RLP

Methods

public static IRLPElement Decode(byte[] msgData)
public static IRLPElement DecodeFirstElement(byte[] msgData, int startPos)
public static bool IsNullOrZeroArray(byte[] array)
public static bool IsSingleZero(byte[] array)
public static byte[] EncodeByte(byte singleByte)
public static byte[] EncodeElement(byte[] srcData)
public static byte[] EncodeElementsAndList(params byte[][] dataItems)
public static byte[] EncodeList(params byte[][] items)
public static int ByteArrayToInt(byte[] bytes)
public static readonly byte[] EMPTY_BYTE_ARRAY = new byte[0];
public static readonly byte[] ZERO_BYTE_ARRAY = { 0 };
public static void Decode(byte[] msgData, int level, int startPosition, int endPosition, int levelToIndex, RLPCollection rlpCollection)

PhantasmaPhoenix.InteropChains.Legacy.Ethereum.RLP.RLPCollection

Source: PhantasmaPhoenix.InteropChains.Legacy/src/Ethereum/RLP/RLPCollection.cs

Declarations

public class RLPCollection : List<IRLPElement>, IRLPElement

Methods

public byte[] RLPData { get; set; }

PhantasmaPhoenix.InteropChains.Legacy.Ethereum.RLP.RLPItem

Source: PhantasmaPhoenix.InteropChains.Legacy/src/Ethereum/RLP/RLPItem.cs

Declarations

public class RLPItem : IRLPElement

Methods

public RLPItem(byte[] rlpData)
public byte[] RLPData => GetRLPData();

PhantasmaPhoenix.InteropChains.Legacy.Ethereum.Signer.ECDSASignatureFactory

Source: PhantasmaPhoenix.InteropChains.Legacy/src/Ethereum/Signer/ECDSASignatureFactory.cs

Declarations

public class ECDSASignatureFactory

Methods

public static ECDSASignature ExtractECDSASignature(byte[] signatureArray)
public static ECDSASignature ExtractECDSASignature(string signature)
public static ECDSASignature FromComponents(byte[] r, byte[] s)
public static ECDSASignature FromComponents(byte[] r, byte[] s, byte v)
public static ECDSASignature FromComponents(byte[] r, byte[] s, byte[] v)
public static ECDSASignature FromComponents(byte[] rs)

PhantasmaPhoenix.InteropChains.Legacy.Ethereum.Signer.EthECDSASignature

Source: PhantasmaPhoenix.InteropChains.Legacy/src/Ethereum/Signer/EthECDSASignature.cs

Declarations

public class EthECDSASignature

Methods

public EthECDSASignature(BigInteger r, BigInteger s, byte[] v)
public EthECDSASignature(byte[] derSig)
public bool IsLowS => ECDSASignature.IsLowS;
public bool IsVSignedForChain()
public byte[] R => ECDSASignature.R.ToByteArrayUnsigned();
public byte[] S => ECDSASignature.S.ToByteArrayUnsigned();
public byte[] To64ByteArray()
public byte[] ToDER()
public byte[] V
public static EthECDSASignature FromDER(byte[] sig)
public static bool IsValidDER(byte[] bytes)
public static string CreateStringSignature(EthECDSASignature signature)

PhantasmaPhoenix.InteropChains.Legacy.Ethereum.Signer.EthECDSASignatureFactory

Source: PhantasmaPhoenix.InteropChains.Legacy/src/Ethereum/Signer/EthECDSASignatureFactory.cs

Declarations

public class EthECDSASignatureFactory

Methods

public static EthECDSASignature ExtractECDSASignature(string signature)
public static EthECDSASignature FromComponents(byte[] r, byte[] s)
public static EthECDSASignature FromComponents(byte[] r, byte[] s, byte v)
public static EthECDSASignature FromComponents(byte[] r, byte[] s, byte[] v)
public static EthECDSASignature FromComponents(byte[] rs)

PhantasmaPhoenix.InteropChains.Legacy.Ethereum.Signer.EthECKey

Source: PhantasmaPhoenix.InteropChains.Legacy/src/Ethereum/Signer/EthECKey.cs

Declarations

public class EthECKey

Methods

public EthECDSASignature Sign(byte[] hash)
public EthECDSASignature SignAndCalculateV(byte[] hash)
public EthECDSASignature SignAndCalculateV(byte[] hash, BigInteger chainId)
public EthECKey(byte[] vch, bool isPrivate)
public EthECKey(byte[] vch, bool isPrivate, byte prefix)
public EthECKey(string privateKey)
public bool Verify(byte[] hash, EthECDSASignature sig)
public bool VerifyAllowingOnlyLowS(byte[] hash, EthECDSASignature sig)
public byte[] CalculateCommonSecret(EthECKey publicKey)
public byte[] GetPrivateKeyAsBytes()
public byte[] GetPubKey()
public byte[] GetPubKeyNoPrefix()
public static BigInteger GetChainFromVChain(BigInteger vChain)
public static EthECKey GenerateKey()
public static EthECKey RecoverFromSignature(EthECDSASignature signature, byte[] hash)
public static EthECKey RecoverFromSignature(EthECDSASignature signature, byte[] hash, BigInteger chainId)
public static EthECKey RecoverFromSignature(EthECDSASignature signature, int recId, byte[] hash)
public static byte DEFAULT_PREFIX = 0x04;
public static int GetRecIdFromV(byte v)
public static int GetRecIdFromV(byte[] v)
public static int GetRecIdFromVChain(BigInteger vChain, BigInteger chainId)
public static int GetRecIdFromVChain(byte[] vChain, BigInteger chainId)
public static string GetPublicAddress(string privateKey)
public string GetPrivateKey()
public string GetPublicAddress()

PhantasmaPhoenix.InteropChains.Legacy.Ethereum.Signer.ExternalSignerTransactionFormat

Source: PhantasmaPhoenix.InteropChains.Legacy/src/Ethereum/Signer/IEthExternalSigner.cs

Declarations

public enum ExternalSignerTransactionFormat

Variants

  • Hash
  • RLP
  • Transaction

PhantasmaPhoenix.InteropChains.Legacy.Ethereum.Signer.IEthExternalSigner

Source: PhantasmaPhoenix.InteropChains.Legacy/src/Ethereum/Signer/IEthExternalSignerBase.cs

Declarations

public interface IEthExternalSigner

PhantasmaPhoenix.InteropChains.Legacy.Ethereum.Signer.RLPDecoder

Source: PhantasmaPhoenix.InteropChains.Legacy/src/Ethereum/Signer/RLPDecoder.cs

Declarations

public class RLPDecoder

Methods

public static SignedData DecodeSigned(byte[] rawdata, int numberOfEncodingElements)

PhantasmaPhoenix.InteropChains.Legacy.Ethereum.Signer.RLPEncoder

Source: PhantasmaPhoenix.InteropChains.Legacy/src/Ethereum/Signer/RLPEncoder.cs

Declarations

public class RLPEncoder

Methods

public static byte[] EncodeSigned(SignedData signedData, int numberOfElements)

PhantasmaPhoenix.InteropChains.Legacy.Ethereum.Signer.RLPSigner

Source: PhantasmaPhoenix.InteropChains.Legacy/src/Ethereum/Signer/RLPSigner.cs

Declarations

public class RLPSigner

Methods

public EthECDSASignature Signature { get; private set; }
public RLPSigner(byte[] rawData, int numberOfEncodingElements)
public RLPSigner(byte[][] data) : this(data, data.Length)
public RLPSigner(byte[][] data, byte[] r, byte[] s, byte v) : this(data, r, s, v, data.Length)
public RLPSigner(byte[][] data, byte[] r, byte[] s, byte v, int numberOfEncodingElements)
public RLPSigner(byte[][] data, byte[] r, byte[] s, byte[] v) : this(data, r, s, v, data.Length)
public RLPSigner(byte[][] data, byte[] r, byte[] s, byte[] v, int numberOfEncodingElements)
public RLPSigner(byte[][] data, int numberOfEncodingElements)
public bool IsVSignatureForChain()
public byte[] GetRLPEncoded()
public byte[] GetRLPEncodedRaw()
public byte[] Hash
public byte[] RawHash
public byte[][] Data { get; private set; }
public void AppendData(params byte[][] extraData)
public void SetSignature(EthECDSASignature signature)
public void Sign(EthECKey key)
public void Sign(EthECKey key, BigInteger chainId)

PhantasmaPhoenix.InteropChains.Legacy.Ethereum.Signer.SignedData

Source: PhantasmaPhoenix.InteropChains.Legacy/src/Ethereum/Signer/SignedData.cs

Declarations

public class SignedData

Methods

public EthECDSASignature GetSignature()
public SignedData()
public SignedData(byte[][] data, EthECDSASignature signature)
public bool IsSigned()
public byte[] R { get; set; }
public byte[] S { get; set; }
public byte[] V { get; set; }
public byte[][] Data { get; set; }

PhantasmaPhoenix.InteropChains.Legacy.Ethereum.Signer.SignedTransactionBase

Source: PhantasmaPhoenix.InteropChains.Legacy/src/Ethereum/Signer/SignedTransactionBase.cs

Declarations

public abstract class SignedTransactionBase

Methods

public EthECDSASignature Signature => SimpleRlpSigner.Signature;
public abstract EthECKey Key { get; }
public abstract Task SignExternallyAsync(IEthExternalSigner externalSigner);
public byte[] Data => SimpleRlpSigner.Data[5];
public byte[] GasLimit => SimpleRlpSigner.Data[2];
public byte[] GasPrice => SimpleRlpSigner.Data[1] ?? DefaultValues.ZERO_BYTE_ARRAY;
public byte[] GetRLPEncoded()
public byte[] GetRLPEncodedRaw()
public byte[] Nonce => SimpleRlpSigner.Data[0] ?? DefaultValues.ZERO_BYTE_ARRAY;
public byte[] RawHash => SimpleRlpSigner.RawHash;
public byte[] ReceiveAddress => SimpleRlpSigner.Data[3];
public byte[] Value => SimpleRlpSigner.Data[4] ?? DefaultValues.ZERO_BYTE_ARRAY;
public const int NUMBER_ENCODING_ELEMENTS = 6;
public static RLPSigner CreateDefaultRLPSigner(byte[] rawData)
public static readonly BigInteger DEFAULT_GAS_LIMIT = BigInteger.Parse("21000");
public static readonly BigInteger DEFAULT_GAS_PRICE = BigInteger.Parse("20000000000");
public virtual void Sign(EthECKey key)
public void SetSignature(EthECDSASignature signature)

PhantasmaPhoenix.InteropChains.Legacy.Ethereum.Signer.Transaction

Source: PhantasmaPhoenix.InteropChains.Legacy/src/Ethereum/Signer/Transaction.cs

Declarations

public class Transaction : SignedTransactionBase

Methods

public Transaction(RLPSigner rlpSigner)
public Transaction(byte[] nonce, byte[] gasPrice, byte[] gasLimit, byte[] receiveAddress, byte[] value, byte[] data)
public Transaction(byte[] nonce, byte[] gasPrice, byte[] gasLimit, byte[] receiveAddress, byte[] value, byte[] data, byte[] r, byte[] s, byte v)
public Transaction(byte[] rawData)
public Transaction(string to, BigInteger amount, BigInteger nonce) : this(to, amount, nonce, DEFAULT_GAS_PRICE, DEFAULT_GAS_LIMIT)
public Transaction(string to, BigInteger amount, BigInteger nonce, BigInteger gasPrice, BigInteger gasLimit) : this(to, amount, nonce, gasPrice, gasLimit, "")
public Transaction(string to, BigInteger amount, BigInteger nonce, BigInteger gasPrice, BigInteger gasLimit, string data) : this(nonce.ToBytesForRLPEncoding(), gasPrice.ToBytesForRLPEncoding(), gasLimit.ToBytesForRLPEncoding(), to.HexToByteArray(), amount.ToBytesForRLPEncoding(), data.HexToByteArray() )
public Transaction(string to, BigInteger amount, BigInteger nonce, string data) : this(to, amount, nonce, DEFAULT_GAS_PRICE, DEFAULT_GAS_LIMIT, data)
public override EthECKey Key => EthECKey.RecoverFromSignature(SimpleRlpSigner.Signature, SimpleRlpSigner.RawHash);
public override async Task SignExternallyAsync(IEthExternalSigner externalSigner)
public string ToJsonHex()

PhantasmaPhoenix.InteropChains.Legacy.Ethereum.Signer.TransactionChainId

Source: PhantasmaPhoenix.InteropChains.Legacy/src/Ethereum/Signer/TransactionChainId.cs

Declarations

public class TransactionChainId : SignedTransactionBase

Methods

public BigInteger GetChainIdAsBigInteger()
public TransactionChainId(RLPSigner rlpSigner)
public TransactionChainId(byte[] nonce, byte[] gasPrice, byte[] gasLimit, byte[] receiveAddress, byte[] value, byte[] data, byte[] chainId)
public TransactionChainId(byte[] nonce, byte[] gasPrice, byte[] gasLimit, byte[] receiveAddress, byte[] value, byte[] data, byte[] chainId, byte[] r, byte[] s, byte[] v)
public TransactionChainId(byte[] rawData)
public TransactionChainId(byte[] rawData, BigInteger chainId)
public TransactionChainId(string to, BigInteger amount, BigInteger nonce, BigInteger chainId) : this(to, amount, nonce, DEFAULT_GAS_PRICE, DEFAULT_GAS_LIMIT, chainId)
public TransactionChainId(string to, BigInteger amount, BigInteger nonce, BigInteger gasPrice, BigInteger gasLimit, BigInteger chainId) : this(to, amount, nonce, gasPrice, gasLimit, "", chainId)
public TransactionChainId(string to, BigInteger amount, BigInteger nonce, BigInteger gasPrice, BigInteger gasLimit, string data, BigInteger chainId) : this(nonce.ToBytesForRLPEncoding(), gasPrice.ToBytesForRLPEncoding(), gasLimit.ToBytesForRLPEncoding(), to.HexToByteArray(), amount.ToBytesForRLPEncoding(), data.HexToByteArray(), chainId.ToBytesForRLPEncoding() )
public TransactionChainId(string to, BigInteger amount, BigInteger nonce, string data, BigInteger chainId) : this(to, amount, nonce, DEFAULT_GAS_PRICE, DEFAULT_GAS_LIMIT, data, chainId)
public byte[] ChainId => SimpleRlpSigner.Data[6];
public byte[] RHash => SimpleRlpSigner.Data[7];
public byte[] SHash => SimpleRlpSigner.Data[8];
public override EthECKey Key => EthECKey.RecoverFromSignature(SimpleRlpSigner.Signature, SimpleRlpSigner.RawHash, ChainId.ToBigIntegerFromRLPDecoded());
public override async Task SignExternallyAsync(IEthExternalSigner externalSigner)
public override void Sign(EthECKey key)
public string ToJsonHex()

PhantasmaPhoenix.InteropChains.Legacy.Ethereum.Util.AddressExtensions

Source: PhantasmaPhoenix.InteropChains.Legacy/src/Ethereum/Util/AddressExtensions.cs

Declarations

public static class AddressExtensions

Methods

public static bool IsAnEmptyAddress(this string address)
public static bool IsEmptyOrEqualsAddress(this string address1, string candidate)
public static bool IsEthereumChecksumAddress(this string address)
public static bool IsNotAnEmptyAddress(this string address)
public static bool IsTheSameAddress(this string address, string otherAddress)
public static bool IsValidEthereumAddressHexFormat(this string address)
public static bool IsValidEthereumAddressLength(this string address)
public static string AddressValueOrEmpty(this string address)
public static string ConvertToEthereumChecksumAddress(this string address)

PhantasmaPhoenix.InteropChains.Legacy.Ethereum.Util.UniqueAddressList

Source: PhantasmaPhoenix.InteropChains.Legacy/src/Ethereum/Util/AddressUtil.cs

Declarations

public class UniqueAddressList : HashSet<string>

Methods

public UniqueAddressList() : base(new AddressEqualityComparer()) { }

PhantasmaPhoenix.InteropChains.Legacy.Ethereum.Util.AddressEqualityComparer

Source: PhantasmaPhoenix.InteropChains.Legacy/src/Ethereum/Util/AddressUtil.cs

Declarations

public class AddressEqualityComparer : IEqualityComparer<string>

Methods

public bool Equals(string x, string y)
public int GetHashCode(string obj)

PhantasmaPhoenix.InteropChains.Legacy.Ethereum.Util.AddressUtil

Source: PhantasmaPhoenix.InteropChains.Legacy/src/Ethereum/Util/AddressUtil.cs

Declarations

public class AddressUtil

Methods

public bool AreAddressesTheSame(string address1, string address2)
public bool IsAnEmptyAddress(string address)
public bool IsChecksumAddress(string address)
public bool IsEmptyOrEqualsAddress(string address1, string candidate)
public bool IsNotAnEmptyAddress(string address)
public bool IsValidAddressLength(string address)
public bool IsValidEthereumAddressHexFormat(string address)
public const string AddressEmptyAsHex = "0x0";
public static AddressUtil Current
public string AddressValueOrEmpty(string address)
public string ConvertToChecksumAddress(string address)
public string ConvertToValid20ByteAddress(string address)

PhantasmaPhoenix.InteropChains.Legacy.Ethereum.Util.ByteUtil

Source: PhantasmaPhoenix.InteropChains.Legacy/src/Ethereum/Util/ByteUtil.cs

Declarations

public static class ByteUtil

Methods

public static IEnumerable<byte> MergeToEnum(params byte[][] arrays)
public static byte[] AppendByte(byte[] bytes, byte b)
public static byte[] InitialiseEmptyByteArray(int length)
public static byte[] Merge(params byte[][] arrays)
public static byte[] Slice(this byte[] org, int start, int end = int.MaxValue)
public static byte[] XOR(this byte[] a, byte[] b)
public static readonly byte[] EMPTY_BYTE_ARRAY = new byte[0];
public static readonly byte[] ZERO_BYTE_ARRAY = { 0 };

PhantasmaPhoenix.InteropChains.Legacy.Ethereum.Util.Sha3Keccack

Source: PhantasmaPhoenix.InteropChains.Legacy/src/Ethereum/Util/Sha3Keccack.cs

Declarations

public class Sha3Keccack

Methods

public byte[] CalculateHash(byte[] value)
public static Sha3Keccack Current { get; } = new Sha3Keccack();
public string CalculateHash(string value)
public string CalculateHashFromHex(params string[] hexValues)

PhantasmaPhoenix.InteropChains.Legacy.Neo2.NeoKeys

Source: PhantasmaPhoenix.InteropChains.Legacy/src/Neo2/Core/NeoKeys.cs

Declarations

public class NeoKeys

Methods

public NeoKeys(byte[] privateKey)
public override string ToString()
public readonly UInt160 PublicKeyHash;
public readonly UInt160 signatureHashN2;
public readonly UInt160 signatureHashN3;
public readonly byte[] CompressedPublicKey;
public readonly byte[] PrivateKey;
public readonly byte[] PublicKey;
public readonly byte[] signatureScriptN2;
public readonly byte[] signatureScriptN3;
public readonly string Address;
public readonly string AddressN3;
public readonly string WIF;
public static NeoKeys FromWIF(string wif)
public static byte[] CreateSignatureScript(byte[] bytes)
public static byte[] CreateSignatureScriptN3(byte[] bytes)
public static byte[] EncodePoint(byte[] bytes)
public static string PublicKeyToN2Address(byte[] publicKey)

PhantasmaPhoenix.InteropChains.Legacy.Neo2.OpCode

Source: PhantasmaPhoenix.InteropChains.Legacy/src/Neo2/Core/Opcodes.cs

Declarations

public enum OpCode : byte

Variants

  • ABS = 0x90, // The input is made positive.
  • ADD = 0x93, // a is added to b.
  • AND = 0x84, // Boolean and between each bit in the inputs.
  • APPCALL = 0x67
  • APPEND = 0xC8
  • ARRAYSIZE = 0xC0
  • BOOLAND = 0x9A, // If both a and b are not 0, the output is 1. Otherwise 0.
  • BOOLOR = 0x9B, // If a or b is not 0, the output is 1. Otherwise 0.
  • CALL = 0x65
  • CALL_E = 0xE1
  • CALL_ED = 0xE2
  • CALL_EDT = 0xE4
  • CALL_ET = 0xE3
  • CALL_I = 0xE0
  • CAT = 0x7E, // Concatenates two strings.
  • CHECKMULTISIG = 0xAE
  • CHECKSIG = 0xAC
  • DEC = 0x8C, // 1 is subtracted from the input.
  • DEPTH = 0x74, // Puts the number of stack items onto the stack.
  • DIV = 0x96, // a is divided by b.
  • DROP = 0x75, // Removes the top stack item.
  • DUP = 0x76, // Duplicates the top stack item.
  • DUPFROMALTSTACK = 0x6A
  • EQUAL = 0x87, // Returns 1 if the inputs are exactly equal, 0 otherwise.
  • FROMALTSTACK = 0x6C, // Puts the input onto the top of the main stack. Removes it from the alt stack.
  • GT = 0xA0, // Returns 1 if a is greater than b, 0 otherwise.
  • GTE = 0xA2, // Returns 1 if a is greater than or equal to b, 0 otherwise.
  • HASH160 = 0xA9
  • HASH256 = 0xAA
  • HASKEY = 0xCB
  • INC = 0x8B, // 1 is added to the input.
  • INVERT = 0x83, // Flips all of the bits in the input.
  • JMP = 0x62
  • JMPIF = 0x63
  • JMPIFNOT = 0x64
  • KEYS = 0xCC
  • LEFT = 0x80, // Keeps only characters left of the specified point in a string.
  • LT = 0x9F, // Returns 1 if a is less than b, 0 otherwise.
  • LTE = 0xA1, // Returns 1 if a is less than or equal to b, 0 otherwise.
  • MAX = 0xA4, // Returns the larger of a and b.
  • MIN = 0xA3, // Returns the smaller of a and b.
  • MOD = 0x97, // Returns the remainder after dividing a by b.
  • MUL = 0x95, // a is multiplied by b.
  • NEGATE = 0x8F, // The sign of the input is flipped.
  • NEWARRAY = 0xC5, //用作引用類型
  • NEWMAP = 0xC7
  • NEWSTRUCT = 0xC6, //用作值類型
  • NIP = 0x77, // Removes the second-to-top stack item.
  • NOP = 0x61, // Does nothing.
  • NOT = 0x91, // If the input is 0 or 1, it is flipped. Otherwise the output will be 0.
  • NUMEQUAL = 0x9C, // Returns 1 if the numbers are equal, 0 otherwise.
  • NUMNOTEQUAL = 0x9E, // Returns 1 if the numbers are not equal, 0 otherwise.
  • NZ = 0x92, // Returns 0 if the input is 0. 1 otherwise.
  • OR = 0x85, // Boolean or between each bit in the inputs.
  • OVER = 0x78, // Copies the second-to-top stack item to the top.
  • PACK = 0xC1
  • PICK = 0x79, // The item n back in the stack is copied to the top.
  • PICKITEM = 0xC3
  • PUSH0 = 0x00, // An empty array of bytes is pushed onto the stack.
  • PUSH1 = 0x51, // The number 1 is pushed onto the stack.
  • PUSH10 = 0x5A, // The number 10 is pushed onto the stack.
  • PUSH11 = 0x5B, // The number 11 is pushed onto the stack.
  • PUSH12 = 0x5C, // The number 12 is pushed onto the stack.
  • PUSH13 = 0x5D, // The number 13 is pushed onto the stack.
  • PUSH14 = 0x5E, // The number 14 is pushed onto the stack.
  • PUSH15 = 0x5F, // The number 15 is pushed onto the stack.
  • PUSH16 = 0x60, // The number 16 is pushed onto the stack.
  • PUSH2 = 0x52, // The number 2 is pushed onto the stack.
  • PUSH3 = 0x53, // The number 3 is pushed onto the stack.
  • PUSH4 = 0x54, // The number 4 is pushed onto the stack.
  • PUSH5 = 0x55, // The number 5 is pushed onto the stack.
  • PUSH6 = 0x56, // The number 6 is pushed onto the stack.
  • PUSH7 = 0x57, // The number 7 is pushed onto the stack.
  • PUSH8 = 0x58, // The number 8 is pushed onto the stack.
  • PUSH9 = 0x59, // The number 9 is pushed onto the stack.
  • PUSHBYTES1 = 0x01, // 0x01-0x4B The next opcode bytes is data to be pushed onto the stack
  • PUSHBYTES10 = 0xA
  • PUSHBYTES11 = 0xB
  • PUSHBYTES12 = 0xC
  • PUSHBYTES13 = 0xD
  • PUSHBYTES14 = 0xE
  • PUSHBYTES15 = 0xF
  • PUSHBYTES16 = 0x10
  • PUSHBYTES17 = 0x11
  • PUSHBYTES18 = 0x12
  • PUSHBYTES19 = 0x13
  • PUSHBYTES2 = 0x2
  • PUSHBYTES20 = 0x14
  • PUSHBYTES21 = 0x15
  • PUSHBYTES22 = 0x16
  • PUSHBYTES23 = 0x17
  • PUSHBYTES24 = 0x18
  • PUSHBYTES25 = 0x19
  • PUSHBYTES26 = 0x1A
  • PUSHBYTES27 = 0x1B
  • PUSHBYTES28 = 0x1C
  • PUSHBYTES29 = 0x1D
  • PUSHBYTES3 = 0x3
  • PUSHBYTES30 = 0x1E
  • PUSHBYTES31 = 0x1F
  • PUSHBYTES32 = 0x20
  • PUSHBYTES33 = 0x21
  • PUSHBYTES34 = 0x22
  • PUSHBYTES35 = 0x23
  • PUSHBYTES36 = 0x24
  • PUSHBYTES37 = 0x25
  • PUSHBYTES38 = 0x26
  • PUSHBYTES39 = 0x27
  • PUSHBYTES4 = 0x4
  • PUSHBYTES40 = 0x28
  • PUSHBYTES41 = 0x29
  • PUSHBYTES42 = 0x2A
  • PUSHBYTES43 = 0x2B
  • PUSHBYTES44 = 0x2C
  • PUSHBYTES45 = 0x2D
  • PUSHBYTES46 = 0x2E
  • PUSHBYTES47 = 0x2F
  • PUSHBYTES48 = 0x30
  • PUSHBYTES49 = 0x31
  • PUSHBYTES5 = 0x5
  • PUSHBYTES50 = 0x32
  • PUSHBYTES51 = 0x33
  • PUSHBYTES52 = 0x34
  • PUSHBYTES53 = 0x35
  • PUSHBYTES54 = 0x36
  • PUSHBYTES55 = 0x37
  • PUSHBYTES56 = 0x38
  • PUSHBYTES57 = 0x39
  • PUSHBYTES58 = 0x3A
  • PUSHBYTES59 = 0x3B
  • PUSHBYTES6 = 0x6
  • PUSHBYTES60 = 0x3C
  • PUSHBYTES61 = 0x3D
  • PUSHBYTES62 = 0x3E
  • PUSHBYTES63 = 0x3F
  • PUSHBYTES64 = 0x40
  • PUSHBYTES65 = 0x41
  • PUSHBYTES66 = 0x42
  • PUSHBYTES67 = 0x43
  • PUSHBYTES68 = 0x44
  • PUSHBYTES69 = 0x45
  • PUSHBYTES7 = 0x7
  • PUSHBYTES70 = 0x46
  • PUSHBYTES71 = 0x47
  • PUSHBYTES72 = 0x48
  • PUSHBYTES73 = 0x49
  • PUSHBYTES74 = 0x4A
  • PUSHBYTES75 = 0x4B
  • PUSHBYTES8 = 0x8
  • PUSHBYTES9 = 0x9
  • PUSHDATA1 = 0x0C, // The next byte contains the number of bytes to be pushed onto the stack.
  • PUSHDATA2 = 0x0D, // The next two bytes contain the number of bytes to be pushed onto the stack.
  • PUSHDATA4 = 0x0E, // The next four bytes contain the number of bytes to be pushed onto the stack.
  • PUSHF = PUSH0
  • PUSHM1 = 0x4F, // The number -1 is pushed onto the stack.
  • PUSHT = PUSH1
  • REMOVE = 0xCA
  • RET = 0x66
  • REVERSE = 0xC9
  • RIGHT = 0x81, // Keeps only characters right of the specified point in a string.
  • ROLL = 0x7A, // The item n back in the stack is moved to the top.
  • ROT = 0x7B, // The top three items on the stack are rotated to the left.
  • SETITEM = 0xC4
  • SHA1 = 0xA7, // The input is hashed using SHA-1.
  • SHA256 = 0xA8, // The input is hashed using SHA-256.
  • SHL = 0x98, // Shifts a left b bits, preserving sign.
  • SHR = 0x99, // Shifts a right b bits, preserving sign.
  • SIGN = 0x8D
  • SIZE = 0x82, // Returns the length of the input string.
  • SUB = 0x94, // b is subtracted from a.
  • SUBSTR = 0x7F, // Returns a section of a string.
  • SWAP = 0x7C, // The top two items on the stack are swapped.
  • SYSCALL = 0x41
  • TAILCALL = 0x69
  • THROW = 0xF0
  • THROWIFNOT = 0xF1
  • TOALTSTACK = 0x6B, // Puts the input onto the top of the alt stack. Removes it from the main stack.
  • TUCK = 0x7D, // The item at the top of the stack is copied and inserted before the second-to-top item.
  • UNPACK = 0xC2
  • VALUES = 0xCD
  • VERIFY = 0xAD
  • WITHIN = 0xA5, // Returns 1 if x is within the specified range (left-inclusive), 0 otherwise.
  • XDROP = 0x6D
  • XOR = 0x86, // Boolean exclusive or between each bit in the inputs.
  • XSWAP = 0x72
  • XTUCK = 0x73

PhantasmaPhoenix.InteropChains.Legacy.Neo2.NeoUtils

Source: PhantasmaPhoenix.InteropChains.Legacy/src/Neo2/Utils/NeoUtils.cs

Declarations

public static class NeoUtils

Methods

public static UInt160 ToScriptHash(this byte[] script)
public static bool IsValidAddress(this string address)
public static byte[] AES256Decrypt(this byte[] block, byte[] key)
public static byte[] Hash160(byte[] message)
public static byte[] HexToBytes(this string value)
public static byte[] RIPEMD160(this IEnumerable<byte> value)
public static string ToAddress(this UInt160 scriptHash)
public static string ToAddressN3(this UInt160 scriptHash)
public static string ToHexString(this IEnumerable<byte> value)

PhantasmaPhoenix.InteropChains.Legacy.Neo2.RIPEMD160

Source: PhantasmaPhoenix.InteropChains.Legacy/src/Neo2/Utils/RIPEMD160.cs

Declarations

public class RIPEMD160

Methods

public byte[] ComputeHash(byte[] rgb)

PhantasmaPhoenix.InteropChains.Legacy.Neo2.ScriptBuilder

Source: PhantasmaPhoenix.InteropChains.Legacy/src/Neo2/Utils/Script.cs

Declarations

public class ScriptBuilder : IDisposable

Methods

public ScriptBuilder Emit(OpCode op, byte[] arg = null)
public ScriptBuilder EmitAppCall(UInt160 scriptHash, bool useTailCall = false)
public ScriptBuilder EmitJump(OpCode op, short offset)
public ScriptBuilder EmitPush(BigInteger number)
public ScriptBuilder EmitPush(bool data)
public ScriptBuilder EmitPush(byte[] data)
public ScriptBuilder EmitPush(string data)
public ScriptBuilder EmitSysCall(string api)
public byte[] ToArray()
public int Offset => (int)ms.Position;
public void Dispose()

PhantasmaPhoenix.InteropChains.Legacy.Neo2.UInt160

Source: PhantasmaPhoenix.InteropChains.Legacy/src/Neo2/Utils/UInt160.cs

Declarations

public class UInt160 : UIntBase, IComparable<UInt160>, IEquatable<UInt160>

Methods

public UInt160() : this(null)
public UInt160(byte[] value) : base(20, value)
public int CompareTo(UInt160 other)
public static UInt160 Parse(string value)
public static bool TryParse(string s, out UInt160 result)
public static bool operator <(UInt160 left, UInt160 right)
public static bool operator <=(UInt160 left, UInt160 right)
public static bool operator >(UInt160 left, UInt160 right)
public static bool operator >=(UInt160 left, UInt160 right)
public static readonly UInt160 Zero = new UInt160();

PhantasmaPhoenix.InteropChains.Legacy.Neo2.UIntBase

Source: PhantasmaPhoenix.InteropChains.Legacy/src/Neo2/Utils/UIntBase.cs

Declarations

public abstract class UIntBase : IEquatable<UIntBase>

Methods

public bool Equals(UIntBase other)
public byte[] ToArray()
public int Size => data_bytes.Length;
public override bool Equals(object obj)
public override int GetHashCode()
public override string ToString()
public static bool operator !=(UIntBase left, UIntBase right)
public static bool operator ==(UIntBase left, UIntBase right)

PhantasmaPhoenix.Link.LinkServer

Source: PhantasmaPhoenix.Link/src/LinkServer.cs

Declarations

public class LinkServer

Methods

public Action<Action>? OnUI;
public Action<string>? OnMessageBack;
public Action<string>? OnUserMessage;
public DateTime StartTime { get; private set; }
public LinkServer(WalletLink walletLink, WalletLinkV5? walletLinkV5 = null)
public WalletLink WalletLink { get; private set; }
public WalletLinkV5? WalletLinkV5 { get; private set; }
public static string GenerateWebSocketKey(string input)
public void Start()
public void Stop()
public void Tick()
public void WebSocket(string path, Action<WebSocket> handler, params string[] protocols)

PhantasmaPhoenix.Link.RelayWebSocketClient

Source: PhantasmaPhoenix.Link/src/RelayWebSocketClient.cs

Declarations

public sealed class RelayWebSocketClient : ILinkRelaySocketFactory

Methods

public ClientSocket(string url, Action onOpen, Action<string> onText, Action onClosed)
public ILinkRelaySocket Connect(string url, Action onOpen, Action<string> onText, Action onClosed)
public void Close()
public void SendText(string text)
public void Start()

PhantasmaPhoenix.Link.WebSockets.BufferPool

Source: PhantasmaPhoenix.Link/src/WebSockets/BufferPool.cs

Declarations

public class BufferPool

Methods

public BufferPool() : this(DEFAULT_BUFFER_SIZE)
public BufferPool(int bufferSize)
public MemoryStream GetBuffer()
public PublicBufferMemoryStream(byte[] buffer, BufferPool bufferPool) : base(new byte[0])
public override IAsyncResult BeginRead(byte[] buffer, int offset, int count, AsyncCallback? callback, object? state)
public override IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback? callback, object? state)
public override Task CopyToAsync(Stream destination, int bufferSize, CancellationToken cancellationToken)
public override Task FlushAsync(CancellationToken cancellationToken)
public override Task WriteAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
public override bool CanRead => _ms.CanRead;
public override bool CanSeek => _ms.CanSeek;
public override bool CanTimeout => _ms.CanTimeout;
public override bool CanWrite => _ms.CanWrite;
public override bool TryGetBuffer(out ArraySegment<byte> buffer)
public override byte[] GetBuffer()
public override byte[] ToArray()
public override int Capacity { get => _ms.Capacity; set => _ms.Capacity = value; }
public override int EndRead(IAsyncResult asyncResult)
public override int Read(byte[] buffer, int offset, int count)
public override int ReadByte()
public override int ReadTimeout { get => _ms.ReadTimeout; set => _ms.ReadTimeout = value; }
public override int WriteTimeout { get => _ms.WriteTimeout; set => _ms.WriteTimeout = value; }
public override long Length => base.Length;
public override long Position { get => _ms.Position; set => _ms.Position = value; }
public override long Seek(long offset, SeekOrigin loc)
public override void Close()
public override void EndWrite(IAsyncResult asyncResult)
public override void Flush()
public override void SetLength(long value)
public override void Write(byte[] buffer, int offset, int count)
public override void WriteByte(byte value)
public override void WriteTo(Stream stream)

PhantasmaPhoenix.Link.WebSockets.EntityTooLargeException

Source: PhantasmaPhoenix.Link/src/WebSockets/Exceptions.cs

Declarations

public class EntityTooLargeException : Exception

Methods

public EntityTooLargeException() : base()
public EntityTooLargeException(string message) : base(message)
public EntityTooLargeException(string message, Exception inner) : base(message, inner)

PhantasmaPhoenix.Link.WebSockets.InvalidHttpResponseCodeException

Source: PhantasmaPhoenix.Link/src/WebSockets/Exceptions.cs

Declarations

public class InvalidHttpResponseCodeException : Exception

Methods

public InvalidHttpResponseCodeException() : base()
public InvalidHttpResponseCodeException(string message) : base(message)
public InvalidHttpResponseCodeException(string message, Exception inner) : base(message, inner)
public InvalidHttpResponseCodeException(string responseCode, string responseDetails, string responseHeader) : base(responseCode)
public string? ResponseCode { get; private set; }
public string? ResponseDetails { get; private set; }
public string? ResponseHeader { get; private set; }

PhantasmaPhoenix.Link.WebSockets.SecWebSocketKeyMissingException

Source: PhantasmaPhoenix.Link/src/WebSockets/Exceptions.cs

Declarations

public class SecWebSocketKeyMissingException : Exception

Methods

public SecWebSocketKeyMissingException() : base()
public SecWebSocketKeyMissingException(string message) : base(message)
public SecWebSocketKeyMissingException(string message, Exception inner) : base(message, inner)

PhantasmaPhoenix.Link.WebSockets.ServerListenerSocketException

Source: PhantasmaPhoenix.Link/src/WebSockets/Exceptions.cs

Declarations

public class ServerListenerSocketException : Exception

Methods

public ServerListenerSocketException() : base()
public ServerListenerSocketException(string message) : base(message)
public ServerListenerSocketException(string message, Exception inner) : base(message, inner)

PhantasmaPhoenix.Link.WebSockets.WebSocketBufferOverflowException

Source: PhantasmaPhoenix.Link/src/WebSockets/Exceptions.cs

Declarations

public class WebSocketBufferOverflowException : Exception

Methods

public WebSocketBufferOverflowException() : base()
public WebSocketBufferOverflowException(string message) : base(message)
public WebSocketBufferOverflowException(string message, Exception inner) : base(message, inner)

PhantasmaPhoenix.Link.WebSockets.WebSocketHandshakeFailedException

Source: PhantasmaPhoenix.Link/src/WebSockets/Exceptions.cs

Declarations

public class WebSocketHandshakeFailedException : Exception

Methods

public WebSocketHandshakeFailedException() : base()
public WebSocketHandshakeFailedException(string message) : base(message)
public WebSocketHandshakeFailedException(string message, Exception inner) : base(message, inner)

PhantasmaPhoenix.Link.WebSockets.WebSocketVersionNotSupportedException

Source: PhantasmaPhoenix.Link/src/WebSockets/Exceptions.cs

Declarations

public class WebSocketVersionNotSupportedException : Exception

Methods

public WebSocketVersionNotSupportedException() : base()
public WebSocketVersionNotSupportedException(string message) : base(message)
public WebSocketVersionNotSupportedException(string message, Exception inner) : base(message, inner)

PhantasmaPhoenix.Link.WebSockets.HTTPCode

Source: PhantasmaPhoenix.Link/src/WebSockets/HTTPRequest.cs

Declarations

public enum HTTPCode

Variants

  • BadRequest = 400
  • Forbidden = 403
  • InternalServerError = 500
  • NotFound = 404
  • NotModified = 304
  • OK = 200
  • Redirect = 302, //https://en.wikipedia.org/wiki/HTTP_302
  • ServiceUnavailable = 503
  • Unauthorized = 401

PhantasmaPhoenix.Link.WebSockets.HTTPRequest

Source: PhantasmaPhoenix.Link/src/WebSockets/HTTPRequest.cs

Declarations

public class HTTPRequest

Methods

public Dictionary<string, string> args = new Dictionary<string, string>();
public Dictionary<string, string> headers = new Dictionary<string, string>(StringComparer.InvariantCultureIgnoreCase);
public Method method;
public bool HasVariable(string name)
public byte[]? bytes;
public enum Method
public string? GetVariable(string name)
public string? path;
public string? postBody;
public string? url;
public string? version;

PhantasmaPhoenix.Link.WebSockets.WebSocketState

Source: PhantasmaPhoenix.Link/src/WebSockets/WebSocket.cs

Declarations

public enum WebSocketState

Variants

  • Aborted = 6 // Reserved for future use.
  • CloseReceived = 4, // A close message was received from the remote endpoint.
  • CloseSent = 3, // A close message was sent to the remote endpoint.
  • Closed = 5, // Indicates the WebSocket close handshake completed gracefully.
  • Connecting = 1, // The connection is negotiating the handshake with the remote endpoint.
  • None = 0, // Reserved for future use.
  • Open = 2, // The initial state after the HTTP handshake has been completed.

PhantasmaPhoenix.Link.WebSockets.WebSocketMessageType

Source: PhantasmaPhoenix.Link/src/WebSockets/WebSocket.cs

Declarations

public enum WebSocketMessageType

Variants

  • Binary = 1, // The message is in binary format.
  • Close = 2 // A receive has completed because a close message was received.
  • Text = 0, // The message is clear text.

PhantasmaPhoenix.Link.WebSockets.WebSocketCloseStatus

Source: PhantasmaPhoenix.Link/src/WebSockets/WebSocket.cs

Declarations

public enum WebSocketCloseStatus

Variants

  • Empty = 1005
  • EndpointUnavailable = 1001
  • InternalServerError = 1011
  • InvalidMessageType = 1003
  • InvalidPayloadData = 1007
  • MandatoryExtension = 1010
  • MessageTooBig = 1009
  • None = 0
  • NormalClosure = 1000
  • PolicyViolation = 1008
  • ProtocolError = 1002

PhantasmaPhoenix.Link.WebSockets.WebSocketReceiveResult

Source: PhantasmaPhoenix.Link/src/WebSockets/WebSocket.cs

Declarations

public struct WebSocketReceiveResult

Methods

public WebSocketCloseStatus CloseStatus { get; }
public WebSocketMessageType MessageType { get; }
public WebSocketReceiveResult(int count, WebSocketMessageType messageType, bool endOfMessage, ArraySegment<byte> bytes)
public WebSocketReceiveResult(int count, WebSocketMessageType messageType, bool endOfMessage, WebSocketCloseStatus closeStatus, string? closeStatusDescription)
public bool EndOfMessage { get; }
public byte[]? Bytes { get; }
public int Count { get; }
public string? CloseStatusDescription { get; }

PhantasmaPhoenix.Link.WebSockets.WebSocket

Source: PhantasmaPhoenix.Link/src/WebSockets/WebSocket.cs

Declarations

public class WebSocket

Methods

public DateTime LastPingPong { get; private set; }
public WebSocket(Func<MemoryStream> recycledStreamFactory, Stream stream, int keepAliveInterval, string? secWebSocketExtensions, bool includeExceptionInCloseResponse, bool isClient, string? subProtocol)
public WebSocketCloseStatus? CloseStatus => _closeStatus;
public WebSocketReceiveResult Receive()
public WebSocketState State { get { return _state; } }
public bool IsOpen => State == WebSocketState.Open;
public bool NeedsPing { get; private set; }
public int KeepAliveInterval { get; private set; }
public string? CloseStatusDescription => _closeStatusDescription;
public string? SubProtocol => _subProtocol;
public void Close(WebSocketCloseStatus closeStatus, string statusDescription)
public void CloseOutput(WebSocketCloseStatus closeStatus, string statusDescription)
public void Dispose()
public void Send(ArraySegment<byte> buffer, WebSocketMessageType messageType, bool endOfMessage)
public void Send(byte[] bytes)
public void Send(string text)
public void SendPing()

PhantasmaPhoenix.NFT.IRom

Source: PhantasmaPhoenix.NFT/src/Abstractions/IRom.cs

Declarations

public interface IRom

PhantasmaPhoenix.NFT.Extensions.TokenDataExtensions

Source: PhantasmaPhoenix.NFT/src/Extensions/TokenDataExtensions.cs

Declarations

public static class TokenDataExtensions

Methods

public static IRom ParseRom(this TokenDataResult tokenData, string symbol)
public static string? GetPropertyValue(this TokenDataResult tokenData, string key)

PhantasmaPhoenix.NFT.CrownRom

Source: PhantasmaPhoenix.NFT/src/ROM/CrownRom.cs

Declarations

public class CrownRom : IRom

Methods

public (bool, string?) HasParsingError() => (!string.IsNullOrEmpty(parsingError), parsingError);
public Address staker;
public CrownRom(byte[] rom, string tokenId)
public DateTime GetDate() => date;
public Timestamp date;
public bool IsEmpty() => isEmpty;
public string GetDescription() => "";
public string GetName() => "CROWN #" + tokenId;
public string tokenId;

PhantasmaPhoenix.NFT.VMDictionaryRom

Source: PhantasmaPhoenix.NFT/src/ROM/VMDictionaryRom.cs

Declarations

public class VMDictionaryRom : IRom

Methods

public (bool, string?) HasParsingError() => (!string.IsNullOrEmpty(parsingError), parsingError);
public DateTime GetDate()
public VMDictionaryRom(byte[] romBytes)
public bool IsEmpty() => isEmpty;
public string GetDescription()
public string GetName()

PhantasmaPhoenix.Protocol.ITransaction

Source: PhantasmaPhoenix.Protocol/src/Abstractions/ITransaction.cs

Declarations

public interface ITransaction

PhantasmaPhoenix.Protocol.DomainExtensions

Source: PhantasmaPhoenix.Protocol/src/DomainExtensions.cs

Declarations

public static class DomainExtensions

Methods

public static T GetContent<T>(this Event evt)

PhantasmaPhoenix.Protocol.DomainSettings

Source: PhantasmaPhoenix.Protocol/src/DomainSettings.cs

Declarations

public static class DomainSettings

Methods

public const int AddressMaxSize = 34;
public const int ArgsMax = 64;
public const int DefaultMinimumGasFee = 100000; // 100000
public const int FiatTokenDecimals = 8;
public const int FieldMaxLength = 80;
public const int FieldMinLength = 1;
public const int FuelTokenDecimals = 10;
public const int InitialValidatorCount = 4;
public const int LatestKnownProtocol = 19;
public const int LiquidityTokenDecimals = 8;
public const int MAX_TOKEN_DECIMALS = 18;
public const int MaxEventsPerBlock = 2048;
public const int MaxEventsPerTx = 8096;
public const int MaxOracleEntriesPerBlock = 5120;
public const int MaxTriggerLoop = 5;
public const int MaxTxPerBlock = 1024;
public const int NameMaxLength = 255;
public const int Phantasma20Protocol = 7;
public const int Phantasma30Protocol = 8;
public const int ScriptMaxSize = short.MaxValue;
public const int StakingTokenDecimals = 8;
public const int UrlMaxLength = 2048;
public const string FiatTokenName = "Dollars";
public const string FiatTokenSymbol = "USD";
public const string FuelPerContractDeployTag = "nexus.contract.cost";
public const string FuelPerOrganizationDeployTag = "nexus.organization.cost";
public const string FuelPerTokenDeployTag = "nexus.token.cost";
public const string FuelTokenName = "Phantasma Energy";
public const string FuelTokenSymbol = "KCAL";
public const string LiquidityTokenName = "Phantasma Liquidity";
public const string LiquidityTokenSymbol = "LP";
public const string MastersOrganizationName = "masters";
public const string NexusMainnet = "mainnet";
public const string NexusSimnet = "simnet";
public const string NexusTestnet = "testnet";
public const string PhantomForceOrganizationName = "phantom_force";
public const string PlatformName = "phantasma";
public const string RewardTokenName = "Phantasma Crown";
public const string RewardTokenSymbol = "CROWN";
public const string RootChainName = "main";
public const string StakersOrganizationName = "stakers";
public const string StakingTokenName = "Phantasma Stake";
public const string StakingTokenSymbol = "SOUL";
public const string ValidatorsOrganizationName = "validators";
public static readonly IEnumerable<string> SystemTokens = new List<string>
public static readonly int ArchiveMaxSize = 104857600; //100mb
public static readonly int ArchiveMinSize = 64; // in bytes
public static readonly string InfusionName = "infusion";

PhantasmaPhoenix.Protocol.EventKind

Source: PhantasmaPhoenix.Protocol/src/Enums.cs

Declarations

public enum EventKind

Variants

  • AddressLink = 10
  • AddressMigration = 46
  • AddressRegister = 9
  • AddressUnlink = 11
  • AddressUnregister = 17
  • ChainCreate = 1
  • ChainSwap = 43
  • ChannelCreate = 36
  • ChannelRefill = 37
  • ChannelSettle = 38
  • ContractDeploy = 45
  • ContractKill = 60
  • ContractRegister = 44
  • ContractUpgrade = 47
  • Crowdsale = 58
  • CrownRewards = 56
  • Custom = 64
  • Custom_V2 = 65
  • DomainCreate = 52
  • DomainDelete = 53
  • ExecutionFailure = 63
  • FeedCreate = 22
  • FeedUpdate = 23
  • FileCreate = 24
  • FileDelete = 25
  • GasEscrow = 15
  • GasPayment = 16
  • GovernanceSetChainConfig = 67
  • GovernanceSetGasConfig = 66
  • Inflation = 49
  • Infusion = 57
  • LeaderboardCreate = 39
  • LeaderboardInsert = 40
  • LeaderboardReset = 41
  • Log = 48
  • MasterClaim = 62
  • OrderBid = 59
  • OrderCancelled = 19
  • OrderClosed = 21
  • OrderCreated = 18
  • OrderFilled = 20
  • OrganizationAdd = 13
  • OrganizationCreate = 12
  • OrganizationKill = 61
  • OrganizationRemove = 14
  • OwnerAdded = 50
  • OwnerRemoved = 51
  • PackedNFT = 30
  • PlatformCreate = 42
  • PollClosed = 34
  • PollCreated = 33
  • PollVote = 35
  • SpecialResolution = 69
  • TaskStart = 54
  • TaskStop = 55
  • TokenBurn = 6
  • TokenClaim = 8
  • TokenCreate = 2
  • TokenMint = 5
  • TokenReceive = 4
  • TokenSend = 3
  • TokenSeriesCreate = 68
  • TokenStake = 7
  • Unknown = 0
  • ValidatorElect = 27
  • ValidatorPropose = 26
  • ValidatorRemove = 28
  • ValidatorSwitch = 29
  • ValueCreate = 31
  • ValueUpdate = 32

PhantasmaPhoenix.Protocol.ExecutionState

Source: PhantasmaPhoenix.Protocol/src/Enums.cs

Declarations

public enum ExecutionState

Variants

  • Break
  • Fault
  • Halt
  • Running

PhantasmaPhoenix.Protocol.ProofOfWork

Source: PhantasmaPhoenix.Protocol/src/Enums.cs

Declarations

public enum ProofOfWork

Variants

  • Extreme = 30
  • Hard = 19
  • Heavy = 24
  • Minimal = 5
  • Moderate = 15
  • None = 0

PhantasmaPhoenix.Protocol.NativeContractKind

Source: PhantasmaPhoenix.Protocol/src/Enums.cs

Declarations

public enum NativeContractKind

Variants

  • Account
  • Block
  • Consensus
  • Exchange
  • Friends
  • Gas
  • Governance
  • Interop
  • Mail
  • Market
  • Privacy
  • Ranking
  • Relay
  • Sale
  • Stake
  • Storage
  • Swap
  • Unknown
  • Validator

PhantasmaPhoenix.Protocol.Nexus

Source: PhantasmaPhoenix.Protocol/src/Enums.cs

Declarations

public enum Nexus

Variants

  • Mainnet
  • Simnet
  • Testnet

PhantasmaPhoenix.Protocol.TokenFlags

Source: PhantasmaPhoenix.Protocol/src/Enums.cs

Declarations

public enum TokenFlags

Variants

  • Burnable = 1 << 8
  • Divisible = 1 << 3
  • Fiat = 1 << 6
  • Finite = 1 << 2
  • Fuel = 1 << 4
  • Fungible = 1 << 1
  • None = 0
  • Stakable = 1 << 5
  • Swappable = 1 << 7
  • Transferable = 1 << 0

PhantasmaPhoenix.Protocol.TokenStatus

Source: PhantasmaPhoenix.Protocol/src/Enums.cs

Declarations

public enum TokenStatus

Variants

  • Active
  • Infused

PhantasmaPhoenix.Protocol.TypeAuction

Source: PhantasmaPhoenix.Protocol/src/Enums.cs

Declarations

public enum TypeAuction

Variants

  • Classic = 1
  • Dutch = 3
  • Fixed = 0
  • Reserve = 2

PhantasmaPhoenix.Protocol.SaleEventKind

Source: PhantasmaPhoenix.Protocol/src/Enums.cs

Declarations

public enum SaleEventKind

Variants

  • AddedToWhitelist
  • Creation
  • Distribution
  • HardCap
  • Participation
  • PriceChange
  • Refund
  • RemovedFromWhitelist
  • SoftCap

PhantasmaPhoenix.Protocol.Block

Source: PhantasmaPhoenix.Protocol/src/Structures/Block.cs

Declarations

public sealed class Block : ISerializable

Methods

public Address ChainAddress { get; private set; }
public Address Validator { get; private set; }
public BigInteger GetTransactionFee(Hash transactionHash)
public BigInteger Height { get; private set; }
public Block()
public Block(BigInteger height, Address chainAddress, Timestamp timestamp, Hash previousHash, uint protocol, Address validator, byte[] payload, IEnumerable<OracleEntry>? oracleEntries = null)
public Event[] GetEventsForTransaction(Hash hash)
public ExecutionState GetStateForTransaction(Hash hash)
public Hash Hash
public Hash PreviousHash { get; private set; }
public Hash[] TransactionHashes => _transactionHashes.ToArray();
public IEnumerable<Event> Events => _blockEvents;
public List<OracleEntry> _oracleData = new List<OracleEntry>();
public OracleEntry[] OracleData => _oracleData.Select(x => (OracleEntry)x).ToArray();
public Signature Signature { get; private set; }
public Timestamp Timestamp { get; private set; }
public bool IsSigned => Signature != null;
public byte[] GetResultForTransaction(Hash hash)
public byte[] Payload { get; private set; }
public byte[] ToByteArray(bool withSignatures)
public int GetTxIndex(Hash txHash)
public int TransactionCount => _transactionHashes.Count;
public static BigInteger GetBlockReward(Block block)
public static Block Unserialize(BinaryReader reader)
public static Block Unserialize(byte[] bytes)
public uint Protocol { get; private set; }
public void SerializeData(BinaryWriter writer)
public void UnserializeData(BinaryReader reader)

PhantasmaPhoenix.Protocol.ChainValueEventData

Source: PhantasmaPhoenix.Protocol/src/Structures/ChainValueEventData.cs

Declarations

public struct ChainValueEventData

Methods

public BigInteger Value;
public string Name;

PhantasmaPhoenix.Protocol.Event

Source: PhantasmaPhoenix.Protocol/src/Structures/Event.cs

Declarations

public struct Event

Methods

public Address Address { get; private set; }
public Event(EventKind kind, Address address, string contract, byte[] data, string? name = null)
public EventKind Kind { get; private set; }
public byte[] Data { get; private set; }
public override bool Equals(object obj)
public override string ToString()
public static Event Unserialize(BinaryReader reader)
public static Event Unserialize(byte[] bytes)
public string Contract { get; private set; }
public string? Name { get; private set; }
public void Serialize(BinaryWriter writer)

PhantasmaPhoenix.Protocol.ExtendedEvents.MarketOrderData

Source: PhantasmaPhoenix.Protocol/src/Structures/ExtendedEvents/MarketOrderData.cs

Declarations

public struct MarketOrderData

Methods

public MarketOrderData( string baseSymbol, string quoteSymbol, string tokenId, ulong carbonBaseTokenId, ulong carbonQuoteTokenId, ulong carbonInstanceId, string seller, string buyer, string price, string endPrice, long startDate, long endDate, string type)
public long EndDate;
public long StartDate;
public string BaseSymbol;
public string Buyer;
public string EndPrice;
public string Price;
public string QuoteSymbol;
public string Seller;
public string TokenId;
public string Type;
public ulong CarbonBaseTokenId;
public ulong CarbonInstanceId;
public ulong CarbonQuoteTokenId;

PhantasmaPhoenix.Protocol.ExtendedEvents.SpecialResolutionArguments

Source: PhantasmaPhoenix.Protocol/src/Structures/ExtendedEvents/SpecialResolutionArguments.cs

Declarations

public abstract class SpecialResolutionArguments

PhantasmaPhoenix.Protocol.ExtendedEvents.RawArguments

Source: PhantasmaPhoenix.Protocol/src/Structures/ExtendedEvents/SpecialResolutionArguments.cs

Declarations

public sealed class RawArguments : SpecialResolutionArguments

Methods

public HexBytes RawArgs { get; set; } = HexBytes.FromBytes(System.Array.Empty<byte>());

PhantasmaPhoenix.Protocol.ExtendedEvents.ContractStorageRow

Source: PhantasmaPhoenix.Protocol/src/Structures/ExtendedEvents/SpecialResolutionArguments.cs

Declarations

public sealed class ContractStorageRow

Methods

public HexBytes Key { get; set; } = HexBytes.FromBytes(System.Array.Empty<byte>());
public HexBytes Value { get; set; } = HexBytes.FromBytes(System.Array.Empty<byte>());

PhantasmaPhoenix.Protocol.ExtendedEvents.ContractStorageTable

Source: PhantasmaPhoenix.Protocol/src/Structures/ExtendedEvents/SpecialResolutionArguments.cs

Declarations

public sealed class ContractStorageTable

Methods

public ContractStorageRow[] Rows { get; set; } = System.Array.Empty<ContractStorageRow>();
public string Name { get; set; } = string.Empty;

PhantasmaPhoenix.Protocol.ExtendedEvents.ImportedContract

Source: PhantasmaPhoenix.Protocol/src/Structures/ExtendedEvents/SpecialResolutionArguments.cs

Declarations

public sealed class ImportedContract

Methods

public ContractStorageRow[] RootVariables { get; set; } = System.Array.Empty<ContractStorageRow>();
public ContractStorageTable[] Tables { get; set; } = System.Array.Empty<ContractStorageTable>();
public HexBytes Abi { get; set; } = HexBytes.FromBytes(System.Array.Empty<byte>());
public HexBytes Script { get; set; } = HexBytes.FromBytes(System.Array.Empty<byte>());
public string Address { get; set; } = string.Empty;
public string Name { get; set; } = string.Empty;
public string Owner { get; set; } = string.Empty;

PhantasmaPhoenix.Protocol.ExtendedEvents.ImportContractsArguments

Source: PhantasmaPhoenix.Protocol/src/Structures/ExtendedEvents/SpecialResolutionArguments.cs

Declarations

public sealed class ImportContractsArguments : SpecialResolutionArguments

Methods

public ImportedContract[] Contracts { get; set; } = System.Array.Empty<ImportedContract>();
public string ContractsCount { get; set; } = "0";

PhantasmaPhoenix.Protocol.ExtendedEvents.SeriesSupplement

Source: PhantasmaPhoenix.Protocol/src/Structures/ExtendedEvents/SpecialResolutionArguments.cs

Declarations

public sealed class SeriesSupplement

Methods

public HexBytes Abi { get; set; } = HexBytes.FromBytes(System.Array.Empty<byte>());
public HexBytes Rom { get; set; } = HexBytes.FromBytes(System.Array.Empty<byte>());
public HexBytes Script { get; set; } = HexBytes.FromBytes(System.Array.Empty<byte>());
public string MaxSupply { get; set; } = string.Empty;
public string MintCount { get; set; } = string.Empty;
public string Mode { get; set; } = string.Empty;
public string PhantasmaSeriesId { get; set; } = string.Empty;
public string Token { get; set; } = string.Empty;
public string TokenId { get; set; } = string.Empty;

PhantasmaPhoenix.Protocol.ExtendedEvents.SeriesMintCountRepair

Source: PhantasmaPhoenix.Protocol/src/Structures/ExtendedEvents/SpecialResolutionArguments.cs

Declarations

public sealed class SeriesMintCountRepair

Methods

public HexBytes Abi { get; set; } = HexBytes.FromBytes(System.Array.Empty<byte>());
public HexBytes Script { get; set; } = HexBytes.FromBytes(System.Array.Empty<byte>());
public string ImportedLiveCount { get; set; } = string.Empty;
public string PhantasmaSeriesId { get; set; } = string.Empty;
public string Token { get; set; } = string.Empty;
public string TokenId { get; set; } = string.Empty;

PhantasmaPhoenix.Protocol.ExtendedEvents.RepairSeriesArguments

Source: PhantasmaPhoenix.Protocol/src/Structures/ExtendedEvents/SpecialResolutionArguments.cs

Declarations

public sealed class RepairSeriesArguments : SpecialResolutionArguments

Methods

public SeriesMintCountRepair[] Repairs { get; set; } = System.Array.Empty<SeriesMintCountRepair>();
public SeriesSupplement[] Supplements { get; set; } = System.Array.Empty<SeriesSupplement>();
public string RepairsCount { get; set; } = "0";
public string SupplementsCount { get; set; } = "0";

PhantasmaPhoenix.Protocol.ExtendedEvents.TokenRepair

Source: PhantasmaPhoenix.Protocol/src/Structures/ExtendedEvents/SpecialResolutionArguments.cs

Declarations

public sealed class TokenRepair

Methods

public HexBytes Abi { get; set; } = HexBytes.FromBytes(System.Array.Empty<byte>());
public HexBytes Script { get; set; } = HexBytes.FromBytes(System.Array.Empty<byte>());
public string RepairMask { get; set; } = string.Empty;
public string Symbol { get; set; } = string.Empty;
public string Token { get; set; } = string.Empty;
public string TokenFlags { get; set; } = string.Empty;
public string TokenId { get; set; } = string.Empty;

PhantasmaPhoenix.Protocol.ExtendedEvents.RepairTokenArguments

Source: PhantasmaPhoenix.Protocol/src/Structures/ExtendedEvents/SpecialResolutionArguments.cs

Declarations

public sealed class RepairTokenArguments : SpecialResolutionArguments

Methods

public TokenRepair[] Repairs { get; set; } = System.Array.Empty<TokenRepair>();
public string RepairsCount { get; set; } = "0";

PhantasmaPhoenix.Protocol.ExtendedEvents.SpecialResolutionCall

Source: PhantasmaPhoenix.Protocol/src/Structures/ExtendedEvents/SpecialResolutionData.cs

Declarations

public struct SpecialResolutionCall

Methods

public SpecialResolutionArguments? Arguments;
public SpecialResolutionCall( uint moduleId, string module, uint methodId, string method, SpecialResolutionArguments? arguments = null, SpecialResolutionCall[]? calls = null)
public SpecialResolutionCall[]? Calls;
public string Method = string.Empty;
public string Module = string.Empty;
public uint MethodId;
public uint ModuleId;

PhantasmaPhoenix.Protocol.ExtendedEvents.SpecialResolutionData

Source: PhantasmaPhoenix.Protocol/src/Structures/ExtendedEvents/SpecialResolutionData.cs

Declarations

public struct SpecialResolutionData

Methods

public SpecialResolutionCall[] Calls = Array.Empty<SpecialResolutionCall>();
public SpecialResolutionData(ulong resolutionId, string? description, SpecialResolutionCall[]? calls = null)
public string? Description;
public ulong ResolutionId;

PhantasmaPhoenix.Protocol.ExtendedEvents.GasConfigArguments

Source: PhantasmaPhoenix.Protocol/src/Structures/ExtendedEvents/SpecialResolutionGovernanceArguments.cs

Declarations

public sealed class GasConfigArguments : SpecialResolutionArguments

Methods

public string DataEscrowPerRow { get; set; } = string.Empty;
public string DataTokenId { get; set; } = string.Empty;
public string FeeMultiplier { get; set; } = string.Empty;
public string FeeShift { get; set; } = string.Empty;
public string GasBurnRatioMul { get; set; } = string.Empty;
public string GasBurnRatioShift { get; set; } = string.Empty;
public string GasFeeCreateTokenBase { get; set; } = string.Empty;
public string GasFeeCreateTokenSeries { get; set; } = string.Empty;
public string GasFeeCreateTokenSymbol { get; set; } = string.Empty;
public string GasFeePerByte { get; set; } = string.Empty;
public string GasFeeQuery { get; set; } = string.Empty;
public string GasFeeRegisterName { get; set; } = string.Empty;
public string GasFeeTransfer { get; set; } = string.Empty;
public string GasTokenId { get; set; } = string.Empty;
public string MaxNameLength { get; set; } = string.Empty;
public string MaxStructureSize { get; set; } = string.Empty;
public string MaxTokenSymbolLength { get; set; } = string.Empty;
public string MinimumGasOffer { get; set; } = string.Empty;
public string Version { get; set; } = string.Empty;
public string? GasDappRatioMul { get; set; }
public string? GasDappRatioShift { get; set; }
public string? GasProducerRatioMul { get; set; }
public string? GasProducerRatioShift { get; set; }
public string? LegacyDataEscrowPerRow { get; set; }
public string? MinimumGasBill { get; set; }
public string? PolicyFeeCreateTokenBase { get; set; }
public string? PolicyFeeCreateTokenSeries { get; set; }
public string? PolicyFeeCreateTokenSymbol { get; set; }
public string? PolicyFeeRegisterName { get; set; }

PhantasmaPhoenix.Protocol.ExtendedEvents.ChainConfigArguments

Source: PhantasmaPhoenix.Protocol/src/Structures/ExtendedEvents/SpecialResolutionGovernanceArguments.cs

Declarations

public sealed class ChainConfigArguments : SpecialResolutionArguments

Methods

public string AllowedTxTypes { get; set; } = string.Empty;
public string BlockRateTarget { get; set; } = string.Empty;
public string ExpiryWindow { get; set; } = string.Empty;
public string Reserved1 { get; set; } = string.Empty;
public string Reserved2 { get; set; } = string.Empty;
public string Reserved3 { get; set; } = string.Empty;
public string Version { get; set; } = string.Empty;

PhantasmaPhoenix.Protocol.ExtendedEvents.NestedResolutionArguments

Source: PhantasmaPhoenix.Protocol/src/Structures/ExtendedEvents/SpecialResolutionGovernanceArguments.cs

Declarations

public sealed class NestedResolutionArguments : SpecialResolutionArguments

Methods

public string ResolutionId { get; set; } = string.Empty;

PhantasmaPhoenix.Protocol.ExtendedEvents.MetadataArguments

Source: PhantasmaPhoenix.Protocol/src/Structures/ExtendedEvents/SpecialResolutionGovernanceArguments.cs

Declarations

public sealed class MetadataArguments : SpecialResolutionArguments

Methods

public Dictionary<string, VmValue> Metadata { get; set; } = new Dictionary<string, VmValue>();

PhantasmaPhoenix.Protocol.ExtendedEvents.ConsensusNode

Source: PhantasmaPhoenix.Protocol/src/Structures/ExtendedEvents/SpecialResolutionGovernanceArguments.cs

Declarations

public sealed class ConsensusNode

Methods

public string Id { get; set; } = string.Empty;
public string Type { get; set; } = string.Empty;

PhantasmaPhoenix.Protocol.ExtendedEvents.NodeConfigArguments

Source: PhantasmaPhoenix.Protocol/src/Structures/ExtendedEvents/SpecialResolutionGovernanceArguments.cs

Declarations

public sealed class NodeConfigArguments : SpecialResolutionArguments

Methods

public ConsensusNode[] Nodes { get; set; } = System.Array.Empty<ConsensusNode>();

PhantasmaPhoenix.Protocol.ExtendedEvents.RegisterNameArguments

Source: PhantasmaPhoenix.Protocol/src/Structures/ExtendedEvents/SpecialResolutionGovernanceArguments.cs

Declarations

public sealed class RegisterNameArguments : SpecialResolutionArguments

Methods

public string Address { get; set; } = string.Empty;
public string Name { get; set; } = string.Empty;

PhantasmaPhoenix.Protocol.ExtendedEvents.AddressArguments

Source: PhantasmaPhoenix.Protocol/src/Structures/ExtendedEvents/SpecialResolutionGovernanceArguments.cs

Declarations

public sealed class AddressArguments : SpecialResolutionArguments

Methods

public string Address { get; set; } = string.Empty;

PhantasmaPhoenix.Protocol.ExtendedEvents.NameArguments

Source: PhantasmaPhoenix.Protocol/src/Structures/ExtendedEvents/SpecialResolutionGovernanceArguments.cs

Declarations

public sealed class NameArguments : SpecialResolutionArguments

Methods

public string Name { get; set; } = string.Empty;

PhantasmaPhoenix.Protocol.ExtendedEvents.ExecuteScriptArguments

Source: PhantasmaPhoenix.Protocol/src/Structures/ExtendedEvents/SpecialResolutionGovernanceArguments.cs

Declarations

public sealed class ExecuteScriptArguments : SpecialResolutionArguments

Methods

public HexBytes Script { get; set; } = HexBytes.FromBytes(System.Array.Empty<byte>());
public string GasFrom { get; set; } = string.Empty;
public string MaxGas { get; set; } = string.Empty;

PhantasmaPhoenix.Protocol.ExtendedEvents.RegisterTokenContractArguments

Source: PhantasmaPhoenix.Protocol/src/Structures/ExtendedEvents/SpecialResolutionGovernanceArguments.cs

Declarations

public sealed class RegisterTokenContractArguments : SpecialResolutionArguments

Methods

public HexBytes Abi { get; set; } = HexBytes.FromBytes(System.Array.Empty<byte>());
public HexBytes Script { get; set; } = HexBytes.FromBytes(System.Array.Empty<byte>());
public string Symbol { get; set; } = string.Empty;
public string TokenId { get; set; } = string.Empty;
public string? Token { get; set; }

PhantasmaPhoenix.Protocol.ExtendedEvents.DeployContractArguments

Source: PhantasmaPhoenix.Protocol/src/Structures/ExtendedEvents/SpecialResolutionGovernanceArguments.cs

Declarations

public sealed class DeployContractArguments : SpecialResolutionArguments

Methods

public HexBytes Abi { get; set; } = HexBytes.FromBytes(System.Array.Empty<byte>());
public HexBytes Script { get; set; } = HexBytes.FromBytes(System.Array.Empty<byte>());
public string ContractName { get; set; } = string.Empty;
public string From { get; set; } = string.Empty;

PhantasmaPhoenix.Protocol.ExtendedEvents.PhantasmaVmConfigArguments

Source: PhantasmaPhoenix.Protocol/src/Structures/ExtendedEvents/SpecialResolutionGovernanceArguments.cs

Declarations

public sealed class PhantasmaVmConfigArguments : SpecialResolutionArguments

Methods

public string FeatureLevel { get; set; } = string.Empty;
public string FuelPerContractDeploy { get; set; } = string.Empty;
public string GasAccount { get; set; } = string.Empty;
public string GasConstructor { get; set; } = string.Empty;
public string GasLeaderboard { get; set; } = string.Empty;
public string GasNexus { get; set; } = string.Empty;
public string GasOracle { get; set; } = string.Empty;
public string GasOrganization { get; set; } = string.Empty;
public string GasStandard { get; set; } = string.Empty;

PhantasmaPhoenix.Protocol.ExtendedEvents.TokenReferenceArguments

Source: PhantasmaPhoenix.Protocol/src/Structures/ExtendedEvents/SpecialResolutionTokenArguments.cs

Declarations

public class TokenReferenceArguments : SpecialResolutionArguments

Methods

public string Token { get; set; } = string.Empty;
public string TokenId { get; set; } = string.Empty;

PhantasmaPhoenix.Protocol.ExtendedEvents.TokenSeriesReferenceArguments

Source: PhantasmaPhoenix.Protocol/src/Structures/ExtendedEvents/SpecialResolutionTokenArguments.cs

Declarations

public sealed class TokenSeriesReferenceArguments : TokenReferenceArguments

Methods

public string SeriesId { get; set; } = string.Empty;

PhantasmaPhoenix.Protocol.ExtendedEvents.SymbolArguments

Source: PhantasmaPhoenix.Protocol/src/Structures/ExtendedEvents/SpecialResolutionTokenArguments.cs

Declarations

public sealed class SymbolArguments : SpecialResolutionArguments

Methods

public string Symbol { get; set; } = string.Empty;

PhantasmaPhoenix.Protocol.ExtendedEvents.TransferFungibleArguments

Source: PhantasmaPhoenix.Protocol/src/Structures/ExtendedEvents/SpecialResolutionTokenArguments.cs

Declarations

public sealed class TransferFungibleArguments : TokenReferenceArguments

Methods

public string Amount { get; set; } = string.Empty;
public string From { get; set; } = string.Empty;
public string To { get; set; } = string.Empty;

PhantasmaPhoenix.Protocol.ExtendedEvents.TransferNonFungibleArguments

Source: PhantasmaPhoenix.Protocol/src/Structures/ExtendedEvents/SpecialResolutionTokenArguments.cs

Declarations

public sealed class TransferNonFungibleArguments : TokenReferenceArguments

Methods

public string From { get; set; } = string.Empty;
public string To { get; set; } = string.Empty;
public string[] InstanceIds { get; set; } = System.Array.Empty<string>();

PhantasmaPhoenix.Protocol.ExtendedEvents.MintFungibleArguments

Source: PhantasmaPhoenix.Protocol/src/Structures/ExtendedEvents/SpecialResolutionTokenArguments.cs

Declarations

public sealed class MintFungibleArguments : TokenReferenceArguments

Methods

public string Amount { get; set; } = string.Empty;
public string To { get; set; } = string.Empty;

PhantasmaPhoenix.Protocol.ExtendedEvents.BurnFungibleArguments

Source: PhantasmaPhoenix.Protocol/src/Structures/ExtendedEvents/SpecialResolutionTokenArguments.cs

Declarations

public sealed class BurnFungibleArguments : TokenReferenceArguments

Methods

public string Amount { get; set; } = string.Empty;
public string From { get; set; } = string.Empty;

PhantasmaPhoenix.Protocol.ExtendedEvents.BalanceArguments

Source: PhantasmaPhoenix.Protocol/src/Structures/ExtendedEvents/SpecialResolutionTokenArguments.cs

Declarations

public sealed class BalanceArguments : TokenReferenceArguments

Methods

public string Address { get; set; } = string.Empty;

PhantasmaPhoenix.Protocol.ExtendedEvents.CreateTokenArguments

Source: PhantasmaPhoenix.Protocol/src/Structures/ExtendedEvents/SpecialResolutionTokenArguments.cs

Declarations

public sealed class CreateTokenArguments : SpecialResolutionArguments

Methods

public Dictionary<string, VmValue>? Metadata { get; set; }
public HexBytes? TokenSchemas { get; set; }
public string Decimals { get; set; } = string.Empty;
public string Flags { get; set; } = string.Empty;
public string MaxSupply { get; set; } = string.Empty;
public string Owner { get; set; } = string.Empty;
public string Symbol { get; set; } = string.Empty;

PhantasmaPhoenix.Protocol.ExtendedEvents.TokenSeriesArguments

Source: PhantasmaPhoenix.Protocol/src/Structures/ExtendedEvents/SpecialResolutionTokenArguments.cs

Declarations

public class TokenSeriesArguments : TokenReferenceArguments

Methods

public Dictionary<string, VmValue>? Metadata { get; set; }
public HexBytes? MetadataRaw { get; set; }
public string MaxMint { get; set; } = string.Empty;
public string MaxSupply { get; set; } = string.Empty;
public string Owner { get; set; } = string.Empty;
public string? SeriesId { get; set; }

PhantasmaPhoenix.Protocol.ExtendedEvents.CreateMintedTokenSeriesArguments

Source: PhantasmaPhoenix.Protocol/src/Structures/ExtendedEvents/SpecialResolutionTokenArguments.cs

Declarations

public sealed class CreateMintedTokenSeriesArguments : TokenSeriesArguments

Methods

public HexBytes[] Rams { get; set; } = System.Array.Empty<HexBytes>();
public HexBytes[] Roms { get; set; } = System.Array.Empty<HexBytes>();
public string Recipient { get; set; } = string.Empty;

PhantasmaPhoenix.Protocol.ExtendedEvents.NftMint

Source: PhantasmaPhoenix.Protocol/src/Structures/ExtendedEvents/SpecialResolutionTokenArguments.cs

Declarations

public sealed class NftMint

Methods

public HexBytes Ram { get; set; } = HexBytes.FromBytes(System.Array.Empty<byte>());
public HexBytes Rom { get; set; } = HexBytes.FromBytes(System.Array.Empty<byte>());
public string SeriesId { get; set; } = string.Empty;

PhantasmaPhoenix.Protocol.ExtendedEvents.PhantasmaNftMint

Source: PhantasmaPhoenix.Protocol/src/Structures/ExtendedEvents/SpecialResolutionTokenArguments.cs

Declarations

public sealed class PhantasmaNftMint

Methods

public HexBytes Ram { get; set; } = HexBytes.FromBytes(System.Array.Empty<byte>());
public HexBytes Rom { get; set; } = HexBytes.FromBytes(System.Array.Empty<byte>());
public string PhantasmaSeriesId { get; set; } = string.Empty;

PhantasmaPhoenix.Protocol.ExtendedEvents.MintNonFungibleArguments

Source: PhantasmaPhoenix.Protocol/src/Structures/ExtendedEvents/SpecialResolutionTokenArguments.cs

Declarations

public sealed class MintNonFungibleArguments : TokenReferenceArguments

Methods

public NftMint[] Tokens { get; set; } = System.Array.Empty<NftMint>();
public string Owner { get; set; } = string.Empty;

PhantasmaPhoenix.Protocol.ExtendedEvents.MintPhantasmaNonFungibleArguments

Source: PhantasmaPhoenix.Protocol/src/Structures/ExtendedEvents/SpecialResolutionTokenArguments.cs

Declarations

public sealed class MintPhantasmaNonFungibleArguments : TokenReferenceArguments

Methods

public PhantasmaNftMint[] Tokens { get; set; } = System.Array.Empty<PhantasmaNftMint>();
public string Owner { get; set; } = string.Empty;

PhantasmaPhoenix.Protocol.ExtendedEvents.BurnNonFungibleArguments

Source: PhantasmaPhoenix.Protocol/src/Structures/ExtendedEvents/SpecialResolutionTokenArguments.cs

Declarations

public sealed class BurnNonFungibleArguments : TokenReferenceArguments

Methods

public string Address { get; set; } = string.Empty;
public string[] InstanceIds { get; set; } = System.Array.Empty<string>();

PhantasmaPhoenix.Protocol.ExtendedEvents.NonFungibleInfoArguments

Source: PhantasmaPhoenix.Protocol/src/Structures/ExtendedEvents/SpecialResolutionTokenArguments.cs

Declarations

public sealed class NonFungibleInfoArguments : TokenReferenceArguments

Methods

public string GetSchemas { get; set; } = string.Empty;
public string InstanceId { get; set; } = string.Empty;

PhantasmaPhoenix.Protocol.ExtendedEvents.NonFungibleInfoByRomIdArguments

Source: PhantasmaPhoenix.Protocol/src/Structures/ExtendedEvents/SpecialResolutionTokenArguments.cs

Declarations

public sealed class NonFungibleInfoByRomIdArguments : TokenReferenceArguments

Methods

public string GetSchemas { get; set; } = string.Empty;
public string RomId { get; set; } = string.Empty;

PhantasmaPhoenix.Protocol.ExtendedEvents.SeriesInfoByMetaIdArguments

Source: PhantasmaPhoenix.Protocol/src/Structures/ExtendedEvents/SpecialResolutionTokenArguments.cs

Declarations

public sealed class SeriesInfoByMetaIdArguments : TokenReferenceArguments

Methods

public string RomId { get; set; } = string.Empty;

PhantasmaPhoenix.Protocol.ExtendedEvents.TokensConfigArguments

Source: PhantasmaPhoenix.Protocol/src/Structures/ExtendedEvents/SpecialResolutionTokenArguments.cs

Declarations

public sealed class TokensConfigArguments : SpecialResolutionArguments

Methods

public string Flags { get; set; } = string.Empty;
public string[] FlagsNames { get; set; } = System.Array.Empty<string>();

PhantasmaPhoenix.Protocol.ExtendedEvents.UpdateTokenMetadataArguments

Source: PhantasmaPhoenix.Protocol/src/Structures/ExtendedEvents/SpecialResolutionTokenArguments.cs

Declarations

public sealed class UpdateTokenMetadataArguments : TokenReferenceArguments

Methods

public Dictionary<string, VmValue>? Metadata { get; set; }

PhantasmaPhoenix.Protocol.ExtendedEvents.UpdateSeriesMetadataArguments

Source: PhantasmaPhoenix.Protocol/src/Structures/ExtendedEvents/SpecialResolutionTokenArguments.cs

Declarations

public sealed class UpdateSeriesMetadataArguments : TokenReferenceArguments

Methods

public HexBytes Metadata { get; set; } = HexBytes.FromBytes(System.Array.Empty<byte>());
public string SeriesId { get; set; } = string.Empty;

PhantasmaPhoenix.Protocol.ExtendedEvents.TokenCreateData

Source: PhantasmaPhoenix.Protocol/src/Structures/ExtendedEvents/TokenCreateData.cs

Declarations

public struct TokenCreateData

Methods

public Dictionary<string, string> Metadata;
public TokenCreateData(string symbol, string maxSupply, uint decimals, bool isNonFungible, UInt64 carbonTokenId, Dictionary<string, string> metadata)
public UInt64 CarbonTokenId;
public bool IsNonFungible;
public string MaxSupply;
public string Symbol;
public uint Decimals;

PhantasmaPhoenix.Protocol.ExtendedEvents.TokenSeriesCreateData

Source: PhantasmaPhoenix.Protocol/src/Structures/ExtendedEvents/TokenSeriesCreateData.cs

Declarations

public struct TokenSeriesCreateData

Methods

public Dictionary<string, string> Metadata;
public TokenSeriesCreateData(string symbol, string seriesId, uint maxMint, uint maxSupply, string owner, UInt64 carbonTokenId, UInt32 carbonSeriesId, Dictionary<string, string> metadata)
public UInt32 CarbonSeriesId;
public UInt64 CarbonTokenId;
public string Owner;
public string SeriesId;
public string Symbol;
public uint MaxMint;
public uint MaxSupply;

PhantasmaPhoenix.Protocol.GasEventData

Source: PhantasmaPhoenix.Protocol/src/Structures/GasEventData.cs

Declarations

public struct GasEventData

Methods

public GasEventData(Address address, BigInteger price, BigInteger amount)
public byte[] Serialize()
public readonly Address address;
public readonly BigInteger amount;
public readonly BigInteger price;

PhantasmaPhoenix.Protocol.InfusionEventData

Source: PhantasmaPhoenix.Protocol/src/Structures/InfusionEventData.cs

Declarations

public struct InfusionEventData

Methods

public InfusionEventData(string baseSymbol, BigInteger tokenID, string infusedSymbol, BigInteger infusedValue, string chainName)
public readonly BigInteger InfusedValue;
public readonly BigInteger TokenID;
public readonly string BaseSymbol;
public readonly string ChainName;
public readonly string InfusedSymbol;

PhantasmaPhoenix.Protocol.MarketEventData

Source: PhantasmaPhoenix.Protocol/src/Structures/MarketEventData.cs

Declarations

public struct MarketEventData

Methods

public BigInteger EndPrice;
public BigInteger ID;
public BigInteger Price;
public TypeAuction Type;
public string BaseSymbol;
public string QuoteSymbol;

PhantasmaPhoenix.Protocol.OracleEntry

Source: PhantasmaPhoenix.Protocol/src/Structures/OracleEntry.cs

Declarations

public struct OracleEntry

Methods

public OracleEntry(string url, byte[] content)
public byte[] Content { get; private set; }
public override bool Equals(object obj)
public override int GetHashCode()
public string URL { get; private set; }

PhantasmaPhoenix.Protocol.OrganizationEventData

Source: PhantasmaPhoenix.Protocol/src/Structures/OrganizationEventData.cs

Declarations

public struct OrganizationEventData

Methods

public OrganizationEventData(string organization, Address memberAddress)
public readonly Address MemberAddress;
public readonly string Organization;

PhantasmaPhoenix.Protocol.SaleEventData

Source: PhantasmaPhoenix.Protocol/src/Structures/SaleEventData.cs

Declarations

public struct SaleEventData

Methods

public Hash saleHash;
public SaleEventKind kind;

PhantasmaPhoenix.Protocol.TokenEventData

Source: PhantasmaPhoenix.Protocol/src/Structures/TokenEventData.cs

Declarations

public struct TokenEventData

Methods

public TokenEventData(string symbol, BigInteger value, string chainName)
public byte[] Serialize()
public readonly BigInteger Value;
public readonly string ChainName;
public readonly string Symbol;

PhantasmaPhoenix.Protocol.Transaction

Source: PhantasmaPhoenix.Protocol/src/Structures/Transaction.cs

Declarations

public sealed class Transaction : ITransaction, ISerializable

Methods

public Hash Hash { get; private set; }
public Hash Sign(IKeyPair keypair, Func<byte[], byte[], byte[], byte[]>? customSignFunction = null)
public Signature GetTransactionSignature(IKeyPair keypair, Func<byte[], byte[], byte[], byte[]>? customSignFunction = null)
public Signature[] Signatures { get; private set; }
public Timestamp Expiration { get; private set; }
public Transaction( string nexusName, string chainName, byte[] script, Timestamp expiration, Address gasPayer, Address gasTarget, BigInteger gasLimit, BigInteger gasPrice, byte[]? payload = null)
public Transaction( string nexusName, string chainName, byte[] script, Timestamp expiration, Address gasPayer, Address gasTarget, BigInteger gasLimit, BigInteger gasPrice, string payload) : this(nexusName, chainName, script, expiration, gasPayer, gasTarget, gasLimit, gasPrice, Encoding.UTF8.GetBytes(payload))
public Transaction( string nexusName, string chainName, byte[] script, Timestamp expiration, byte[]? payload = null)
public Transaction( string nexusName, string chainName, byte[] script, Timestamp expiration, string payload) : this(nexusName, chainName, script, expiration, Encoding.UTF8.GetBytes(payload))
public Transaction()
public bool HasSignatures => Signatures != null && Signatures.Length > 0;
public bool IsSignedBy(Address address)
public bool IsSignedBy(IEnumerable<Address> addresses)
public bool IsSignedByEveryone(IEnumerable<Address> addresses)
public bool ValidateNexus(Nexus chainNexus)
public byte[] Payload { get; private set; }
public byte[] Script { get; private set; }
public byte[] ToByteArray(bool withSignature)
public override bool Equals(object obj)
public override string ToString()
public readonly static Transaction? Null = null;
public static BigInteger GetTransactionFee(Hash transactionHash, Block block)
public static Transaction? Unserialize(BinaryReader reader)
public static Transaction? Unserialize(byte[] bytes)
public static byte[] GetMessageHash(byte[] message)
public static readonly int DefaultGasLimit = 9999;
public string ChainName { get; private set; }
public string NexusName { get; private set; }
public void AddSignature(Signature signature)
public void Mine(int targetDifficulty)
public void Serialize(BinaryWriter writer, bool withSignature)
public void SerializeData(BinaryWriter writer)
public void UnserializeData(BinaryReader reader)

PhantasmaPhoenix.Protocol.TransactionSettleEventData

Source: PhantasmaPhoenix.Protocol/src/Structures/TransactionSettleEventData.cs

Declarations

public struct TransactionSettleEventData

Methods

public TransactionSettleEventData(Hash hash, string platform, string chain)
public readonly Hash Hash;
public readonly string Chain;
public readonly string Platform;

PhantasmaPhoenix.Protocol.VmValue

Source: PhantasmaPhoenix.Protocol/src/Structures/Vm/VmValue.cs

Declarations

public sealed class VmValue

Methods

public Dictionary<string, VmValue>? Fields { get; }
public VmValue[]? Items { get; }
public bool IsText => Text != null;
public override string ToString() => Text ?? string.Empty;
public static VmValue FromFields(Dictionary<string, VmValue> fields) => new VmValue(null, null, fields);
public static VmValue FromItems(VmValue[] items) => new VmValue(null, items, null);
public static VmValue FromText(string? text) => new VmValue(text, null, null);
public static implicit operator string?(VmValue? value) => value?.Text;
public string? Text { get; }

PhantasmaPhoenix.Protocol.ValidationUtils

Source: PhantasmaPhoenix.Protocol/src/ValidationUtils.cs

Declarations

public static class ValidationUtils

Methods

public readonly static string ENTRY_CONTEXT_NAME = "entry";
public static bool IsReservedIdentifier(string name)
public static bool IsValidIdentifier(string name)
public static bool IsValidTicker(string name)
public static readonly string ANONYMOUS_NAME = "anonymous";
public static readonly string GENESIS_NAME = "genesis";
public static readonly string NULL_NAME = "null";
public static string[] prefixNames = new string[]
public static string[] reservedNames = new string[]

PhantasmaPhoenix.Protocol.IAPIResult

Source: PhantasmaPhoenix.Protocol/src/WalletLink/IAPIResult.cs

Declarations

public interface IAPIResult

PhantasmaPhoenix.Protocol.ErrorResult

Source: PhantasmaPhoenix.Protocol/src/WalletLink/IAPIResult.cs

Declarations

public struct ErrorResult : IAPIResult

Methods

public string error;

PhantasmaPhoenix.Protocol.SingleResult

Source: PhantasmaPhoenix.Protocol/src/WalletLink/IAPIResult.cs

Declarations

public struct SingleResult : IAPIResult

Methods

public object value;

PhantasmaPhoenix.Protocol.ArrayResult

Source: PhantasmaPhoenix.Protocol/src/WalletLink/IAPIResult.cs

Declarations

public struct ArrayResult : IAPIResult

Methods

public object[] values;

PhantasmaPhoenix.Protocol.APIUtils

Source: PhantasmaPhoenix.Protocol/src/WalletLink/IAPIResult.cs

Declarations

public static class APIUtils

Methods

public static JToken FromAPIResult(IAPIResult input)

PhantasmaPhoenix.Protocol.LinkChannel

Source: PhantasmaPhoenix.Protocol/src/WalletLink/LinkChannel.cs

Declarations

public sealed class LinkChannel

Methods

public LinkChannel(byte[] sessionKey)
public bool TryOpenEnvelope(string frameJson, out string envelopeJson)
public string SealEnvelope(string envelopeJson)

PhantasmaPhoenix.Protocol.LinkDeeplinkEndpoint

Source: PhantasmaPhoenix.Protocol/src/WalletLink/LinkDeeplinkEndpoint.cs

Declarations

public sealed class LinkDeeplinkEndpoint

Methods

public LinkDeeplinkEndpoint(WalletLinkV5 dispatcher, IWalletLinkV5Ops ops, ILinkPairingStore pairings, LinkRelayClient? relay = null, Action<string>? log = null)
public bool TryHandle(string url, Action<string> openUrl)
public static bool TryParseRequest(string url, out string topic, out string frameJson)
public static string BuildResponseUrl(string callback, string topic, string frame)

PhantasmaPhoenix.Protocol.LinkPairingMode

Source: PhantasmaPhoenix.Protocol/src/WalletLink/LinkPairing.cs

Declarations

public enum LinkPairingMode

Variants

  • Ecdh
  • Sym

PhantasmaPhoenix.Protocol.LinkPairingParams

Source: PhantasmaPhoenix.Protocol/src/WalletLink/LinkPairing.cs

Declarations

public sealed class LinkPairingParams

Methods

public LinkPairingMode Mode { get; set; }
public byte[]? DappPublicKey { get; set; }
public byte[]? SymKey { get; set; }
public int Version { get; set; }
public string Topic { get; set; } = "";
public string? CallbackUrl { get; set; }
public string? DappName { get; set; }
public string? DappUrl { get; set; }
public string? Relay { get; set; }

PhantasmaPhoenix.Protocol.LinkPairing

Source: PhantasmaPhoenix.Protocol/src/WalletLink/LinkPairing.cs

Declarations

public static class LinkPairing

Methods

public static LinkPairingParams Parse(string uri)

PhantasmaPhoenix.Protocol.LinkPairingRecord

Source: PhantasmaPhoenix.Protocol/src/WalletLink/LinkPairingStore.cs

Declarations

public sealed class LinkPairingRecord

Methods

public DateTime CreatedUtc { get; set; }
public DateTime LastSeenUtc { get; set; }
public byte[] Key { get; set; } = Array.Empty<byte>();
public string CallbackUrl { get; set; } = "";
public string DappName { get; set; } = "";
public string SessionId { get; set; } = "";
public string Topic { get; set; } = "";
public string? RelayUrl { get; set; }

PhantasmaPhoenix.Protocol.ILinkPairingStore

Source: PhantasmaPhoenix.Protocol/src/WalletLink/LinkPairingStore.cs

Declarations

public interface ILinkPairingStore

PhantasmaPhoenix.Protocol.InMemoryLinkPairingStore

Source: PhantasmaPhoenix.Protocol/src/WalletLink/LinkPairingStore.cs

Declarations

public sealed class InMemoryLinkPairingStore : ILinkPairingStore

Methods

public LinkPairingRecord? Get(string topic)
public LinkPairingRecord[] List()
public void Remove(string topic)
public void Save(LinkPairingRecord record)

PhantasmaPhoenix.Protocol.ILinkRelaySocket

Source: PhantasmaPhoenix.Protocol/src/WalletLink/LinkRelayClient.cs

Declarations

public interface ILinkRelaySocket

PhantasmaPhoenix.Protocol.ILinkRelaySocketFactory

Source: PhantasmaPhoenix.Protocol/src/WalletLink/LinkRelayClient.cs

Declarations

public interface ILinkRelaySocketFactory

PhantasmaPhoenix.Protocol.LinkRelayClient

Source: PhantasmaPhoenix.Protocol/src/WalletLink/LinkRelayClient.cs

Declarations

public sealed class LinkRelayClient : IDisposable

Methods

public DateTime TouchedUtc;
public Dictionary<int, string> Received = new Dictionary<int, string>();
public ILinkRelaySocket? Socket;
public LinkRelayClient( WalletLinkV5 dispatcher, ILinkPairingStore pairings, ILinkRelaySocketFactory sockets, Action<Action>? marshal = null, int[]? reconnectDelaysMs = null, Action<string>? log = null, int relaySessionCap = 6, TimeSpan? idleTtl = null)
public System.Threading.Timer? ReconnectTimer;
public bool Open;
public int Chars;
public int ReconnectAttempt;
public int Total;
public readonly HashSet<string> Topics = new HashSet<string>();
public readonly List<string> Outbox = new List<string>();
public static string NormalizeRelayUrl(string relay)
public string Url = "";
public void Dispose()
public void EnsureConnected()
public void PublishHandshake(LinkPairingRecord pairing, byte[] walletPublicKey, string envelopeJson)
public void PublishSealed(LinkPairingRecord pairing, string envelopeJson)
public void RevokeSession(string sessionId)
public void TrackPairing(LinkPairingRecord pairing)

PhantasmaPhoenix.Protocol.LinkSessionRecord

Source: PhantasmaPhoenix.Protocol/src/WalletLink/LinkSessionStore.cs

Declarations

public sealed class LinkSessionRecord

Methods

public DateTime CreatedUtc { get; set; }
public DateTime LastSeenUtc { get; set; }
public string Address { get; set; } = "";
public string Dapp { get; set; } = "";
public string Id { get; set; } = "";

PhantasmaPhoenix.Protocol.ILinkSessionStore

Source: PhantasmaPhoenix.Protocol/src/WalletLink/LinkSessionStore.cs

Declarations

public interface ILinkSessionStore

PhantasmaPhoenix.Protocol.InMemoryLinkSessionStore

Source: PhantasmaPhoenix.Protocol/src/WalletLink/LinkSessionStore.cs

Declarations

public sealed class InMemoryLinkSessionStore : ILinkSessionStore

Methods

public LinkSessionRecord? Get(string id)
public LinkSessionRecord[] List()
public void Remove(string id)
public void Save(LinkSessionRecord record)

PhantasmaPhoenix.Protocol.LinkSignMessage

Source: PhantasmaPhoenix.Protocol/src/WalletLink/LinkSignMessage.cs

Declarations

public static class LinkSignMessage

Methods

public const int RandomLength = 32;
public static byte[] BuildPayload(byte[] message, byte[] random)
public static byte[] GenerateRandom()
public static readonly byte[] DomainTag = Encoding.ASCII.GetBytes("PHANTASMA_LINK_V5_MSG\n");

PhantasmaPhoenix.Protocol.WalletStatus

Source: PhantasmaPhoenix.Protocol/src/WalletLink/WalletLink.cs

Declarations

public enum WalletStatus

Variants

  • Closed
  • Ready

PhantasmaPhoenix.Protocol.WalletLink

Source: PhantasmaPhoenix.Protocol/src/WalletLink/WalletLink.cs

Declarations

public abstract class WalletLink

Methods

public Balance[] balances;
public Connection(string token, int version)
public File[] files;
public WalletLink()
public abstract string Name { get; }
public abstract string Nexus { get; }
public bool success;
public class Connection
public const int LinkProtocol = 4;
public const int WebSocketPort = 7090;
public int size;
public int version;
public readonly int Version;
public readonly string Token;
public string address;
public string alias;
public string avatar;
public string dapp;
public string external;
public string hash;
public string message;
public string name;
public string nexus;
public string peer;
public string platform;
public string random;
public string result; // deprecated
public string signature;
public string symbol;
public string token;
public string value;
public string version;
public string wallet;
public string[] ids;
public string[] results;
public struct Account : IAPIResult
public struct Authorization : IAPIResult
public struct Balance : IAPIResult
public struct Error : IAPIResult
public struct File : IAPIResult
public struct Invocation : IAPIResult
public struct MultiSig : IAPIResult
public struct N3Address : IAPIResult
public struct NexusResult : IAPIResult
public struct Peer : IAPIResult
public struct Signature : IAPIResult
public struct Transaction : IAPIResult
public struct WalletVersion : IAPIResult
public uint date;
public uint decimals;
public void Execute(string cmd, Action<int, JToken, bool> callback)
public void Revoke(string dapp, string token)

PhantasmaPhoenix.Protocol.WalletLinkV5

Source: PhantasmaPhoenix.Protocol/src/WalletLink/WalletLinkV5.cs

Declarations

public class WalletLinkV5

Methods

public WalletLinkV5(IWalletLinkV5Ops ops, ILinkSessionStore? sessions = null)
public const int ProtocolVersion = 5;
public const string SessionDeletedEvent = "pha_sessionDeleted";
public const string SessionEstablishedEvent = "pha_sessionEstablished";
public int PendingTakeoverSeconds { get; set; } = 150;
public string BuildSessionDeletedEnvelope(string sessionId)
public void EstablishConsentedSession(string dappName, Action<string> deliver)
public void HandleMessage(string message, Action<string> respond)

PhantasmaPhoenix.Protocol.LinkFailure

Source: PhantasmaPhoenix.Protocol/src/WalletLink/WalletLinkV5Contract.cs

Declarations

public enum LinkFailure

Variants

  • Internal
  • InvalidTransaction
  • NexusMismatch
  • None = 0
  • NotLoggedIn
  • UnsupportedSignatureKind
  • UserRejected

PhantasmaPhoenix.Protocol.LinkTxFormat

Source: PhantasmaPhoenix.Protocol/src/WalletLink/WalletLinkV5Contract.cs

Declarations

public enum LinkTxFormat

Variants

  • Carbon
  • Script

PhantasmaPhoenix.Protocol.LinkBalance

Source: PhantasmaPhoenix.Protocol/src/WalletLink/WalletLinkV5Contract.cs

Declarations

public sealed class LinkBalance

Methods

public int Decimals { get; set; }
public string Symbol { get; set; } = "";
public string Value { get; set; } = "";
public string[] Ids { get; set; } = Array.Empty<string>();

PhantasmaPhoenix.Protocol.LinkAccount

Source: PhantasmaPhoenix.Protocol/src/WalletLink/WalletLinkV5Contract.cs

Declarations

public sealed class LinkAccount

Methods

public LinkBalance[] Balances { get; set; } = Array.Empty<LinkBalance>();
public string Address { get; set; } = "";
public string Avatar { get; set; } = "";
public string Name { get; set; } = "";

PhantasmaPhoenix.Protocol.LinkWalletInfo

Source: PhantasmaPhoenix.Protocol/src/WalletLink/WalletLinkV5Contract.cs

Declarations

public sealed class LinkWalletInfo

Methods

public string Name { get; set; } = "";
public string Rpc { get; set; } = "";
public string Version { get; set; } = "";

PhantasmaPhoenix.Protocol.LinkChains

Source: PhantasmaPhoenix.Protocol/src/WalletLink/WalletLinkV5Contract.cs

Declarations

public sealed class LinkChains

Methods

public string Nexus { get; set; } = "";

PhantasmaPhoenix.Protocol.LinkConnectResult

Source: PhantasmaPhoenix.Protocol/src/WalletLink/WalletLinkV5Contract.cs

Declarations

public sealed class LinkConnectResult

Methods

public LinkAccount? Account { get; set; }
public LinkFailure Failure { get; set; }
public static LinkConnectResult Fail(LinkFailure failure, string? message) => new LinkConnectResult { Failure = failure, Message = message };
public static LinkConnectResult Ok(LinkAccount account, string walletName, string walletVersion, string nexus) => new LinkConnectResult { Account = account, WalletName = walletName, WalletVersion = walletVersion, Nexus = nexus };
public string Nexus { get; set; } = "";
public string WalletName { get; set; } = "";
public string WalletVersion { get; set; } = "";
public string? Message { get; set; }

PhantasmaPhoenix.Protocol.LinkAccountResult

Source: PhantasmaPhoenix.Protocol/src/WalletLink/WalletLinkV5Contract.cs

Declarations

public sealed class LinkAccountResult

Methods

public LinkAccount? Account { get; set; }
public LinkFailure Failure { get; set; }
public static LinkAccountResult Fail(LinkFailure failure, string? message) => new LinkAccountResult { Failure = failure, Message = message };
public static LinkAccountResult Ok(LinkAccount account) => new LinkAccountResult { Account = account };
public string? Message { get; set; }

PhantasmaPhoenix.Protocol.LinkSignMessageResult

Source: PhantasmaPhoenix.Protocol/src/WalletLink/WalletLinkV5Contract.cs

Declarations

public sealed class LinkSignMessageResult

Methods

public LinkFailure Failure { get; private set; }
public byte[]? Random { get; private set; }
public byte[]? Signature { get; private set; }
public static LinkSignMessageResult Fail(LinkFailure failure, string? message) => new LinkSignMessageResult { Failure = failure, Message = message };
public static LinkSignMessageResult Ok(byte[] signature, byte[] random) => new LinkSignMessageResult { Signature = signature, Random = random };
public string? Message { get; private set; }

PhantasmaPhoenix.Protocol.LinkSignTransactionResult

Source: PhantasmaPhoenix.Protocol/src/WalletLink/WalletLinkV5Contract.cs

Declarations

public sealed class LinkSignTransactionResult

Methods

public LinkFailure Failure { get; private set; }
public byte[]? SignedTx { get; private set; }
public static LinkSignTransactionResult Fail(LinkFailure failure, string? message) => new LinkSignTransactionResult { Failure = failure, Message = message };
public static LinkSignTransactionResult Ok(byte[] signedTx) => new LinkSignTransactionResult { SignedTx = signedTx };
public string? Message { get; private set; }

PhantasmaPhoenix.Protocol.LinkSendResult

Source: PhantasmaPhoenix.Protocol/src/WalletLink/WalletLinkV5Contract.cs

Declarations

public sealed class LinkSendResult

Methods

public Hash Hash { get; set; } = Hash.Null;
public LinkFailure Failure { get; set; }
public static LinkSendResult Fail(LinkFailure failure, string? message) => new LinkSendResult { Failure = failure, Message = message };
public static LinkSendResult Ok(Hash hash) => new LinkSendResult { Hash = hash };
public string? Message { get; set; }

PhantasmaPhoenix.Protocol.LinkInvokeResult

Source: PhantasmaPhoenix.Protocol/src/WalletLink/WalletLinkV5Contract.cs

Declarations

public sealed class LinkInvokeResult

Methods

public LinkFailure Failure { get; set; }
public static LinkInvokeResult Fail(LinkFailure failure, string? message) => new LinkInvokeResult { Failure = failure, Message = message };
public static LinkInvokeResult Ok(string[] results) => new LinkInvokeResult { Results = results };
public string? Message { get; set; }
public string[] Results { get; set; } = Array.Empty<string>();

PhantasmaPhoenix.Protocol.IWalletLinkV5Ops

Source: PhantasmaPhoenix.Protocol/src/WalletLink/WalletLinkV5Contract.cs

Declarations

public interface IWalletLinkV5Ops

PhantasmaPhoenix.Protocol.Carbon.ICarbonBlob

Source: PhantasmaPhoenix.Protocol.Carbon/src/Abstractions/ICarbonBlob.cs

Declarations

public interface ICarbonBlob

Methods

public void Read(BinaryReader r);
public void Write(BinaryWriter w);

PhantasmaPhoenix.Protocol.Carbon.Blockchain.TxTypes

Source: PhantasmaPhoenix.Protocol.Carbon/src/Enums/Blockchain/Enums.cs

Declarations

public enum TxTypes

Variants

  • BurnFungible = 10
  • BurnFungible_GasPayer = 11
  • BurnNonFungible = 13
  • BurnNonFungible_GasPayer = 14
  • Call = 0
  • Call_Multi = 1
  • MintFungible = 9
  • MintNonFungible = 12
  • Phantasma = 15
  • Phantasma_Raw = 16
  • Trade = 2
  • TransferFungible = 3
  • TransferFungible_GasPayer = 4
  • TransferNonFungible_Multi = 7
  • TransferNonFungible_Multi_GasPayer = 8
  • TransferNonFungible_Single = 5
  • TransferNonFungible_Single_GasPayer = 6

PhantasmaPhoenix.Protocol.Carbon.Blockchain.Modules.ModuleId

Source: PhantasmaPhoenix.Protocol.Carbon/src/Enums/Blockchain/Modules/Enums.cs

Declarations

public enum ModuleId : uint

Variants

  • Governance = 0u
  • Internal = 0xFFFFFFFFu, // C++'s ~0U
  • Market = 4u
  • Organization = 3u
  • PhantasmaVm = 2u
  • Token = 1u

PhantasmaPhoenix.Protocol.Carbon.Blockchain.Modules.TokenFlags

Source: PhantasmaPhoenix.Protocol.Carbon/src/Enums/Blockchain/Modules/Enums.cs

Declarations

public enum TokenFlags

Variants

  • BigFungible = 1 << 0
  • NonFungible = 1 << 1
  • None = 0

PhantasmaPhoenix.Protocol.Carbon.Blockchain.Modules.TokensConfigFlags

Source: PhantasmaPhoenix.Protocol.Carbon/src/Enums/Blockchain/Modules/Enums.cs

Declarations

public enum TokensConfigFlags

Variants

  • AllowExplicitNftMetaIdMint = 1 << 4
  • None = 0
  • RequireMetadata = 1 << 0
  • RequireNftMetaId = 1 << 2
  • RequireNftStandard = 1 << 3
  • RequireSymbol = 1 << 1

PhantasmaPhoenix.Protocol.Carbon.Blockchain.Modules.TokenContract_Methods

Source: PhantasmaPhoenix.Protocol.Carbon/src/Enums/Blockchain/Modules/Enums.cs

Declarations

public enum TokenContract_Methods

Variants

  • ApplyInflation = 22
  • BurnFungible = 4
  • BurnNonFungible = 9
  • CreateMintedTokenSeries = 21
  • CreateToken = 2
  • CreateTokenSeries = 6
  • DeleteTokenSeries = 7
  • GetBalance = 5
  • GetBalances = 20
  • GetInstances = 10
  • GetNextTokenInflation = 24
  • GetNonFungibleInfo = 11
  • GetNonFungibleInfoByRomId = 12
  • GetSeriesInfo = 13
  • GetSeriesInfoByMetaId = 14
  • GetSeriesSupply = 18
  • GetTokenIdBySymbol = 19
  • GetTokenInfo = 15
  • GetTokenInfoBySymbol = 16
  • GetTokenSupply = 17
  • MintFungible = 3
  • MintNonFungible = 8
  • MintPhantasmaNonFungible = 27
  • SetTokensConfig = 25
  • TransferFungible = 0
  • TransferNonFungible = 1
  • UpdateSeriesMetadata = 26
  • UpdateTokenMetadata = 23

PhantasmaPhoenix.Protocol.Carbon.Blockchain.Modules.GovernanceContract_Methods

Source: PhantasmaPhoenix.Protocol.Carbon/src/Enums/Blockchain/Modules/Enums.cs

Declarations

public enum GovernanceContract_Methods

Variants

  • RegisterName = 1
  • SetGasConfig = 3

PhantasmaPhoenix.Protocol.Carbon.Blockchain.Modules.MarketContract_Methods

Source: PhantasmaPhoenix.Protocol.Carbon/src/Enums/Blockchain/Modules/Enums.cs

Declarations

public enum MarketContract_Methods

Variants

  • BuyToken = 4
  • BuyTokenById = 5
  • CancelSale = 2
  • CancelSaleById = 3
  • GetTokenListingCount = 6
  • GetTokenListingInfo = 7
  • GetTokenListingInfoById = 8
  • SellToken = 0
  • SellTokenById = 1

PhantasmaPhoenix.Protocol.Carbon.Blockchain.Vm.VmType

Source: PhantasmaPhoenix.Protocol.Carbon/src/Enums/Blockchain/Vm/Enums.cs

Declarations

public enum VmType

Variants

  • Array = 1
  • Array_Bytes = Array | Bytes
  • Array_Bytes16 = Array | Bytes16
  • Array_Bytes32 = Array | Bytes32
  • Array_Bytes64 = Array | Bytes64
  • Array_Dynamic = Array | Dynamic
  • Array_Int16 = Array | Int16
  • Array_Int256 = Array | Int256
  • Array_Int32 = Array | Int32
  • Array_Int64 = Array | Int64
  • Array_Int8 = Array | Int8
  • Array_String = Array | String
  • Array_Struct = Array | Struct
  • Bytes = 1 << 1
  • Bytes16 = 8 << 1
  • Bytes32 = 9 << 1
  • Bytes64 = 10 << 1
  • Dynamic = 0
  • Int16 = 4 << 1
  • Int256 = 7 << 1
  • Int32 = 5 << 1
  • Int64 = 6 << 1
  • Int8 = 3 << 1
  • String = 11 << 1
  • Struct = 2 << 1

PhantasmaPhoenix.Protocol.Carbon.Blockchain.Vm.VmException

Source: PhantasmaPhoenix.Protocol.Carbon/src/Exceptions/Blockchain/Vm/VmException.cs

Declarations

public class VmException : Exception

Methods

public VmException(string message) : base(message) { }

PhantasmaPhoenix.Protocol.Carbon.Blockchain.ITxSigner

Source: PhantasmaPhoenix.Protocol.Carbon/src/Helpers/Blockchain/ITxSigner.cs

Declarations

public interface ITxSigner

PhantasmaPhoenix.Protocol.Carbon.Blockchain.KeyPairSigner

Source: PhantasmaPhoenix.Protocol.Carbon/src/Helpers/Blockchain/ITxSigner.cs

Declarations

public sealed class KeyPairSigner : ITxSigner

Methods

public KeyPairSigner(IKeyPair keys)
public Task<byte[]> SignAsync(byte[] message, CancellationToken cancellationToken = default)
public byte[] PublicKey => _keys.PublicKey;

PhantasmaPhoenix.Protocol.Carbon.Blockchain.Modules.Builders.IdHelper

Source: PhantasmaPhoenix.Protocol.Carbon/src/Helpers/Blockchain/Modules/Builders/IdHelper.cs

Declarations

public static class IdHelper

Methods

public static BigInteger GetRandomPhantasmaId()

PhantasmaPhoenix.Protocol.Carbon.Blockchain.Modules.Builders.MetadataField

Source: PhantasmaPhoenix.Protocol.Carbon/src/Helpers/Blockchain/Modules/Builders/MetadataHelper.cs

Declarations

public sealed class MetadataField

Methods

public MetadataField(string name, object? value)
public object? Value { get; set; }
public string Name { get; set; }

PhantasmaPhoenix.Protocol.Carbon.Blockchain.Modules.Builders.FieldType

Source: PhantasmaPhoenix.Protocol.Carbon/src/Helpers/Blockchain/Modules/Builders/MetadataHelper.cs

Declarations

public readonly struct FieldType

Methods

public FieldType(string name, VmType type)
public VmType Type { get; }
public string Name { get; }

PhantasmaPhoenix.Protocol.Carbon.Blockchain.Modules.Builders.MetadataHelper

Source: PhantasmaPhoenix.Protocol.Carbon/src/Helpers/Blockchain/Modules/Builders/MetadataHelper.cs

Declarations

public static class MetadataHelper

Methods

public static MetadataField? FindMetadataField(IReadOnlyList<MetadataField> fields, string name)
public static byte[] GetOptionalBytesField(IReadOnlyList<MetadataField> fields, string name)
public static readonly FieldType[] NftDefaultMetadataFields =
public static readonly FieldType[] SeriesDefaultMetadataFields =
public static readonly FieldType[] StandardMetadataFields =
public static void PushMetadataField( VmNamedVariableSchema fieldSchema, List<VmNamedDynamicVariable> fields, IReadOnlyList<MetadataField> metadataFields)

PhantasmaPhoenix.Protocol.Carbon.Blockchain.Modules.Builders.NftRomBuilder

Source: PhantasmaPhoenix.Protocol.Carbon/src/Helpers/Blockchain/Modules/Builders/NftRomBuilder.cs

Declarations

public static class NftRomBuilder

Methods

public static byte[] BuildAndSerialize( VmStructSchema nftRomSchema, BigInteger phantasmaNftId, IReadOnlyList<MetadataField> metadata)

PhantasmaPhoenix.Protocol.Carbon.Blockchain.Modules.Builders.PhantasmaNftRomBuilder

Source: PhantasmaPhoenix.Protocol.Carbon/src/Helpers/Blockchain/Modules/Builders/PhantasmaNftRomBuilder.cs

Declarations

public static class PhantasmaNftRomBuilder

Methods

public static VmStructSchema BuildPublicMintSchema(VmStructSchema nftRomSchema)
public static byte[] BuildAndSerialize( VmStructSchema nftRomSchema, IReadOnlyList<MetadataField> metadata)

PhantasmaPhoenix.Protocol.Carbon.Blockchain.Modules.Builders.SeriesInfoBuilder

Source: PhantasmaPhoenix.Protocol.Carbon/src/Helpers/Blockchain/Modules/Builders/SeriesInfoBuilder.cs

Declarations

public static class SeriesInfoBuilder

Methods

public static SeriesInfo Build(BigInteger phantasmaSeriesId, uint maxMint, uint maxSupply, Bytes32 ownerPublicKey, byte[]? metadata = null)

PhantasmaPhoenix.Protocol.Carbon.Blockchain.Modules.Builders.TokenInfoBuilder

Source: PhantasmaPhoenix.Protocol.Carbon/src/Helpers/Blockchain/Modules/Builders/TokenInfoBuilder.cs

Declarations

public static class TokenInfoBuilder

Methods

public static TokenInfo Build( string symbol, IntX maxSupply, bool isNFT, uint decimals, Bytes32 creatorPublicKey, byte[]? metadata = null, byte[]? tokenSchemas = null)

PhantasmaPhoenix.Protocol.Carbon.Blockchain.Modules.Builders.TokenMetadataBuilder

Source: PhantasmaPhoenix.Protocol.Carbon/src/Helpers/Blockchain/Modules/Builders/TokenMetadataBuilder.cs

Declarations

public static class TokenMetadataBuilder

Methods

public static byte[] BuildAndSerialize(Dictionary<string, string> fields)

PhantasmaPhoenix.Protocol.Carbon.Blockchain.Modules.Builders.TokenSchemasBuilder

Source: PhantasmaPhoenix.Protocol.Carbon/src/Helpers/Blockchain/Modules/Builders/TokenSchemasBuilder.cs

Declarations

public static class TokenSchemasBuilder

Methods

public static (bool ok, string? error) Verify(TokenSchemas schemas)
public static TokenSchemas FromJson(string json)
public static TokenSchemas PrepareStandardTokenSchemas(bool sharedMetadata = false)
public static TokenSchemasJson ParseTokenSchemasJson(string json)
public static byte[] BuildAndSerialize(TokenSchemas? tokenSchemas)
public static byte[] Serialize(TokenSchemas tokenSchemas)
public static string SerializeHex(TokenSchemas tokenSchemas)

PhantasmaPhoenix.Protocol.Carbon.Blockchain.Modules.Builders.TokenSchemasJson

Source: PhantasmaPhoenix.Protocol.Carbon/src/Helpers/Blockchain/Modules/Builders/TokenSchemasBuilder.cs

Declarations

public sealed class TokenSchemasJson

Methods

public IReadOnlyList<FieldType> Ram { get; set; } = Array.Empty<FieldType>();
public IReadOnlyList<FieldType> Rom { get; set; } = Array.Empty<FieldType>();
public IReadOnlyList<FieldType> SeriesMetadata { get; set; } = Array.Empty<FieldType>();

PhantasmaPhoenix.Protocol.Carbon.Blockchain.Modules.Builders.TokenSeriesMetadataBuilder

Source: PhantasmaPhoenix.Protocol.Carbon/src/Helpers/Blockchain/Modules/Builders/TokenSeriesMetadataBuilder.cs

Declarations

public static class TokenSeriesMetadataBuilder

Methods

public static byte[] BuildAndSerialize( VmStructSchema seriesMetadataSchema, BigInteger newPhantasmaSeriesId, IReadOnlyList<MetadataField> metadata)

PhantasmaPhoenix.Protocol.Carbon.Blockchain.TxHelpers.CreateTokenSeriesTxHelper

Source: PhantasmaPhoenix.Protocol.Carbon/src/Helpers/Blockchain/TxHelpers/CreateTokenSeriesTxHelper.cs

Declarations

public static class CreateTokenSeriesTxHelper

Methods

public static TxMsg BuildTx(ulong tokenId, SeriesInfo seriesInfo, Bytes32 creatorPublicKey, TxLimits? limits = null)
public static byte[] BuildTxAndSign(ulong tokenId, SeriesInfo seriesInfo, PhantasmaKeys signer, in GasConfig config, PlanAndSignOptions? options = null)
public static string BuildTxAndSignHex(ulong tokenId, SeriesInfo seriesInfo, PhantasmaKeys signer, in GasConfig config, PlanAndSignOptions? options = null)
public static uint ParseResult(string resultHex)

PhantasmaPhoenix.Protocol.Carbon.Blockchain.TxHelpers.CreateTokenTxHelper

Source: PhantasmaPhoenix.Protocol.Carbon/src/Helpers/Blockchain/TxHelpers/CreateTokenTxHelper.cs

Declarations

public static class CreateTokenTxHelper

Methods

public static TxMsg BuildTx(TokenInfo tokenInfo, Bytes32 creatorPublicKey, TxLimits? limits = null)
public static byte[] BuildTxAndSign(TokenInfo tokenInfo, PhantasmaKeys signer, in GasConfig config, PlanAndSignOptions? options = null)
public static string BuildTxAndSignHex(TokenInfo tokenInfo, PhantasmaKeys signer, in GasConfig config, PlanAndSignOptions? options = null)
public static ulong ParseResult(string resultHex)

PhantasmaPhoenix.Protocol.Carbon.Blockchain.TxHelpers.FeePlanSummary

Source: PhantasmaPhoenix.Protocol.Carbon/src/Helpers/Blockchain/TxHelpers/FeePlanSummary.cs

Declarations

public sealed class FeePlanSummary

Methods

public const uint DataTokenDecimals = 8;
public const uint GasTokenDecimals = 10;
public static FeePlanSummary Summarize(FeePlan plan, uint gasDecimals = GasTokenDecimals, uint dataDecimals = DataTokenDecimals)
public string GasBill { get; }
public string GasOffer { get; }
public string StorageCeiling { get; }

PhantasmaPhoenix.Protocol.Carbon.Blockchain.TxHelpers.FeePlanOptions

Source: PhantasmaPhoenix.Protocol.Carbon/src/Helpers/Blockchain/TxHelpers/FeePlanner.cs

Declarations

public class FeePlanOptions

Methods

public FeePlanOptions Clone() => (FeePlanOptions)MemberwiseClone();
public IReadOnlyList<InfusedAsset>? Infusions { get; set; }
public bool? BigFungible { get; set; }
public bool? DuplicatedSeries { get; set; }
public bool? RecipientHoldsToken { get; set; }
public bool? RomHasMetaId { get; set; }
public bool? SeriesHasMetaId { get; set; }
public bool? SupplyRowExists { get; set; }
public bool? TokenBurnedBefore { get; set; }
public int? WitnessCount { get; set; }
public uint? ScriptEventBytes { get; set; }
public uint? ScriptStorageQuanta { get; set; }
public ulong? ScriptUnitsAllowance { get; set; }

PhantasmaPhoenix.Protocol.Carbon.Blockchain.TxHelpers.FeePlan

Source: PhantasmaPhoenix.Protocol.Carbon/src/Helpers/Blockchain/TxHelpers/FeePlanner.cs

Declarations

public sealed class FeePlan

Methods

public FeePlan(IReadOnlyList<NativeFeeKind> kinds, bool exact, int envelopeBytes, NativeFeeEstimate estimate)
public IReadOnlyList<NativeFeeKind> Kinds { get; }
public NativeFeeEstimate Estimate { get; }
public TxMsg Apply(TxMsg msg)
public bool Exact { get; }
public int EnvelopeBytes { get; }
public uint DeletedStorageQuanta => Estimate.DeletedStorageQuanta;
public uint NewStorageQuanta => Estimate.NewStorageQuanta;
public ulong ExpectedGasBill => Estimate.ExpectedGasBill;
public ulong MaxData => Estimate.MaxData;
public ulong MaxGas => Estimate.MaxGas;

PhantasmaPhoenix.Protocol.Carbon.Blockchain.TxHelpers.FeePlanner

Source: PhantasmaPhoenix.Protocol.Carbon/src/Helpers/Blockchain/TxHelpers/FeePlanner.cs

Declarations

public static class FeePlanner

Methods

public static FeePlan Plan(in TxMsg msg, in GasConfig config, FeePlanOptions? options = null)
public static IReadOnlyList<(UInt64 TokenId, UInt64 InstanceId)> BurnedInstances(in TxMsg msg)

PhantasmaPhoenix.Protocol.Carbon.Blockchain.TxHelpers.PhantasmaNftMintParams

Source: PhantasmaPhoenix.Protocol.Carbon/src/Helpers/Blockchain/TxHelpers/MintPhantasmaNonFungibleTxHelper.cs

Declarations

public sealed class PhantasmaNftMintParams

Methods

public Bytes32 Sender { get; set; }
public Bytes32 To { get; set; }
public PhantasmaNftMintInfo[] Tokens { get; set; } = Array.Empty<PhantasmaNftMintInfo>();
public ulong TokenId { get; set; }

PhantasmaPhoenix.Protocol.Carbon.Blockchain.TxHelpers.MintPhantasmaNonFungibleTxHelper

Source: PhantasmaPhoenix.Protocol.Carbon/src/Helpers/Blockchain/TxHelpers/MintPhantasmaNonFungibleTxHelper.cs

Declarations

public static class MintPhantasmaNonFungibleTxHelper

Methods

public static PhantasmaNftMintResult[] ParseResult(string resultHex)
public static TxMsg BuildTx(PhantasmaNftMintParams p, TxLimits? limits = null)
public static byte[] BuildTxAndSign(PhantasmaNftMintParams p, PhantasmaKeys signer, in GasConfig config, PlanAndSignOptions? options = null)
public static string BuildTxAndSignHex(PhantasmaNftMintParams p, PhantasmaKeys signer, in GasConfig config, PlanAndSignOptions? options = null)

PhantasmaPhoenix.Protocol.Carbon.Blockchain.TxHelpers.NativeFeeKind

Source: PhantasmaPhoenix.Protocol.Carbon/src/Helpers/Blockchain/TxHelpers/NativeFeeEstimator.cs

Declarations

public enum NativeFeeKind

Variants

  • BurnFungible
  • BurnNonFungible
  • CreateToken
  • CreateTokenSeries
  • MintFungible
  • MintNonFungible
  • MintPhantasmaNonFungible
  • RegisterName
  • Script
  • TransferFungible
  • TransferNonFungible

PhantasmaPhoenix.Protocol.Carbon.Blockchain.TxHelpers.NativeFeeParams

Source: PhantasmaPhoenix.Protocol.Carbon/src/Helpers/Blockchain/TxHelpers/NativeFeeEstimator.cs

Declarations

public sealed class NativeFeeParams

Methods

public IReadOnlyList<InfusedAsset>? Infusions { get; set; }
public bool HasInflationSchedule { get; set; }
public bool HasPreBurn { get; set; }
public bool HasStakingOrganisation { get; set; }
public bool HasStakingRewardToken { get; set; }
public bool NonFungible { get; set; }
public bool RecipientHoldsToken { get; set; }
public bool SupplyRowExists { get; set; }
public bool ToIsNftAddress { get; set; }
public bool TokenBurnedBefore { get; set; }
public bool? BigFungible { get; set; }
public bool? DuplicatedSeries { get; set; }
public bool? RomHasMetaId { get; set; }
public bool? SeriesHasMetaId { get; set; }
public int NameLength { get; set; }
public int SymbolLength { get; set; }
public uint Count { get; set; } = 1;
public uint DistinctSeriesCount { get; set; } = 1;
public uint PayloadBytes { get; set; }
public uint RamBytes { get; set; }
public uint RomBytes { get; set; }
public uint ScriptEventBytes { get; set; } = 512;
public uint ScriptStorageQuanta { get; set; } = 4;
public uint SeriesInfoBytes { get; set; }
public uint TokenInfoBytes { get; set; }
public uint? EnvelopeBytes { get; set; }
public uint[]? RamBytesPerInstance { get; set; }
public uint[]? RomBytesPerInstance { get; set; }
public ulong ScriptUnitsAllowance { get; set; } = 5000;
public ulong? TokenId { get; set; }

PhantasmaPhoenix.Protocol.Carbon.Blockchain.TxHelpers.NativeFeePart

Source: PhantasmaPhoenix.Protocol.Carbon/src/Helpers/Blockchain/TxHelpers/NativeFeeEstimator.cs

Declarations

public sealed class NativeFeePart

Methods

public NativeFeeKind Kind { get; }
public NativeFeeParams Params { get; }
public NativeFeePart(NativeFeeKind kind, NativeFeeParams? p = null)

PhantasmaPhoenix.Protocol.Carbon.Blockchain.TxHelpers.NativeFeeTransaction

Source: PhantasmaPhoenix.Protocol.Carbon/src/Helpers/Blockchain/TxHelpers/NativeFeeEstimator.cs

Declarations

public sealed class NativeFeeTransaction

Methods

public uint PayloadBytes { get; set; }
public uint? EnvelopeBytes { get; set; }

PhantasmaPhoenix.Protocol.Carbon.Blockchain.TxHelpers.InfusedAsset

Source: PhantasmaPhoenix.Protocol.Carbon/src/Helpers/Blockchain/TxHelpers/NativeFeeEstimator.cs

Declarations

public sealed class InfusedAsset

Methods

public bool BurnerHoldsToken { get; set; }
public bool NonFungible { get; set; }
public uint InstanceCount { get; set; } = 1;
public ulong? TokenId { get; set; }

PhantasmaPhoenix.Protocol.Carbon.Blockchain.TxHelpers.FeeQuote

Source: PhantasmaPhoenix.Protocol.Carbon/src/Helpers/Blockchain/TxHelpers/NativeFeeEstimator.cs

Declarations

public readonly struct FeeQuote

Methods

public FeeQuote(ulong maxGas, ulong maxData, ulong expectedGasBill)
public ulong ExpectedGasBill { get; }
public ulong MaxData { get; }
public ulong MaxGas { get; }

PhantasmaPhoenix.Protocol.Carbon.Blockchain.TxHelpers.NativeFeeEstimate

Source: PhantasmaPhoenix.Protocol.Carbon/src/Helpers/Blockchain/TxHelpers/NativeFeeEstimator.cs

Declarations

public readonly struct NativeFeeEstimate

Methods

public FeeQuote ToQuote() => new(MaxGas, MaxData, ExpectedGasBill);
public NativeFeeEstimate(ulong maxGas, ulong maxData, ulong expectedGasBill, uint newStorageQuanta, uint deletedStorageQuanta)
public uint DeletedStorageQuanta { get; }
public uint NewStorageQuanta { get; }
public ulong ExpectedGasBill { get; }
public ulong MaxData { get; }
public ulong MaxGas { get; }

PhantasmaPhoenix.Protocol.Carbon.Blockchain.TxHelpers.NativeFeeEstimator

Source: PhantasmaPhoenix.Protocol.Carbon/src/Helpers/Blockchain/TxHelpers/NativeFeeEstimator.cs

Declarations

public static class NativeFeeEstimator

Methods

public OperationModel(ulong workUnits, ulong policyFee, uint resultBytes, uint newQuanta, uint deletedQuanta)
public const uint NativeSignatureBytes = 64;
public const uint StorageQuantumBytes = 1024;
public const uint WitnessArrayEntryBytes = 96;
public const ulong GasModelV2UnitsPerBlockDataByte = 25;
public readonly uint DeletedQuanta;
public readonly uint NewQuanta;
public readonly uint ResultBytes;
public readonly ulong PolicyFee;
public readonly ulong WorkUnits;
public static NativeFeeEstimate EstimateNativeFee(NativeFeeKind kind, in GasConfig config, NativeFeeParams? p = null)
public static NativeFeeEstimate EstimateNativeFeeBatch(IReadOnlyList<NativeFeePart> parts, in GasConfig config, NativeFeeTransaction? transaction = null)
public static uint EnvelopeBytesFor(NativeFeeKind kind, int serializedMessageLength, int witnessCount)
public static uint PhantasmaCanonicalRomBytes(uint publicRomBytes) => publicRomBytes * 2 + PhantasmaCanonicalRomOverhead;
public static uint StorageQuantaFor(uint rowBytes) => (rowBytes + StorageQuantumBytes - 1) / StorageQuantumBytes;

PhantasmaPhoenix.Protocol.Carbon.Blockchain.TxHelpers.NativeTxParties

Source: PhantasmaPhoenix.Protocol.Carbon/src/Helpers/Blockchain/TxHelpers/NativeTxHelper.cs

Declarations

public class NativeTxParties : TxLimits

Methods

public Bytes32 From { get; set; }
public Bytes32? GasPayer { get; set; }

PhantasmaPhoenix.Protocol.Carbon.Blockchain.TxHelpers.TransferFungibleParams

Source: PhantasmaPhoenix.Protocol.Carbon/src/Helpers/Blockchain/TxHelpers/NativeTxHelper.cs

Declarations

public sealed class TransferFungibleParams : NativeTxParties

Methods

public Bytes32 To { get; set; }
public ulong Amount { get; set; }
public ulong TokenId { get; set; }

PhantasmaPhoenix.Protocol.Carbon.Blockchain.TxHelpers.TransferNonFungibleParams

Source: PhantasmaPhoenix.Protocol.Carbon/src/Helpers/Blockchain/TxHelpers/NativeTxHelper.cs

Declarations

public sealed class TransferNonFungibleParams : NativeTxParties

Methods

public Bytes32 To { get; set; }
public ulong TokenId { get; set; }
public ulong[] InstanceIds { get; set; } = Array.Empty<ulong>();

PhantasmaPhoenix.Protocol.Carbon.Blockchain.TxHelpers.MintFungibleParams

Source: PhantasmaPhoenix.Protocol.Carbon/src/Helpers/Blockchain/TxHelpers/NativeTxHelper.cs

Declarations

public sealed class MintFungibleParams : TxLimits

Methods

public Bytes32 Owner { get; set; }
public Bytes32 To { get; set; }
public IntX Amount { get; set; }
public ulong TokenId { get; set; }

PhantasmaPhoenix.Protocol.Carbon.Blockchain.TxHelpers.BurnFungibleParams

Source: PhantasmaPhoenix.Protocol.Carbon/src/Helpers/Blockchain/TxHelpers/NativeTxHelper.cs

Declarations

public sealed class BurnFungibleParams : NativeTxParties

Methods

public IntX Amount { get; set; }
public ulong TokenId { get; set; }

PhantasmaPhoenix.Protocol.Carbon.Blockchain.TxHelpers.BurnNonFungibleParams

Source: PhantasmaPhoenix.Protocol.Carbon/src/Helpers/Blockchain/TxHelpers/NativeTxHelper.cs

Declarations

public sealed class BurnNonFungibleParams : NativeTxParties

Methods

public ulong InstanceId { get; set; }
public ulong TokenId { get; set; }

PhantasmaPhoenix.Protocol.Carbon.Blockchain.TxHelpers.NativeTxHelper

Source: PhantasmaPhoenix.Protocol.Carbon/src/Helpers/Blockchain/TxHelpers/NativeTxHelper.cs

Declarations

public static class NativeTxHelper

Methods

public static TxMsg BurnFungible(BurnFungibleParams p)
public static TxMsg BurnNonFungible(BurnNonFungibleParams p)
public static TxMsg MintFungible(MintFungibleParams p)
public static TxMsg TransferFungible(TransferFungibleParams p)
public static TxMsg TransferNonFungible(TransferNonFungibleParams p)

PhantasmaPhoenix.Protocol.Carbon.Blockchain.TxHelpers.PlanAndSignOptions

Source: PhantasmaPhoenix.Protocol.Carbon/src/Helpers/Blockchain/TxHelpers/PlanAndSign.cs

Declarations

public sealed class PlanAndSignOptions : FeePlanOptions

Methods

public TxLimits Limits => new() { MaxGas = MaxGas, MaxData = MaxData, Expiry = Expiry };
public long? Expiry { get; set; }
public ulong? MaxData { get; set; }
public ulong? MaxGas { get; set; }

PhantasmaPhoenix.Protocol.Carbon.Blockchain.TxHelpers.PlanAndSign

Source: PhantasmaPhoenix.Protocol.Carbon/src/Helpers/Blockchain/TxHelpers/PlanAndSign.cs

Declarations

public static class PlanAndSign

Methods

public static byte[] WithKeys(TxMsg msg, IKeyPair[] keys, in GasConfig config, PlanAndSignOptions? options = null)

PhantasmaPhoenix.Protocol.Carbon.Blockchain.TxHelpers.TxLimits

Source: PhantasmaPhoenix.Protocol.Carbon/src/Helpers/Blockchain/TxHelpers/TxLimits.cs

Declarations

public class TxLimits

Methods

public const long DefaultExpiryMs = 45_000;
public long? Expiry { get; set; }
public static long DefaultExpiry() => DateTimeOffset.UtcNow.ToUnixTimeMilliseconds() + DefaultExpiryMs;
public static long ExpiryWithin(long expiryWindowMs, long marginMs = 5_000)
public ulong? MaxData { get; set; }
public ulong? MaxGas { get; set; }

PhantasmaPhoenix.Protocol.Carbon.Blockchain.TxMsgSigner

Source: PhantasmaPhoenix.Protocol.Carbon/src/Helpers/Blockchain/TxMsgSigner.cs

Declarations

public static class TxMsgSigner

Methods

public WitnessSlot(Bytes32 address, ITxSigner signer)
public readonly Bytes32 Address;
public readonly ITxSigner Signer;
public static SignedTxMsg SignWithKeys(TxMsg msg, params IKeyPair[] keys)
public static async Task<SignedTxMsg> SignWithAsync(TxMsg msg, IReadOnlyList<ITxSigner> signers, CancellationToken cancellationToken = default)
public static async Task<byte[]> SignAndSerializeWithAsync(TxMsg msg, IReadOnlyList<ITxSigner> signers, CancellationToken cancellationToken = default) => CarbonBlob.Serialize(await SignWithAsync(msg, signers, cancellationToken).ConfigureAwait(false));
public static byte[] Sign(TxMsg msg, PhantasmaKeys keys) => SignAndSerializeWithKeys(msg, keys);
public static byte[] SignAndSerializeWithKeys(TxMsg msg, params IKeyPair[] keys) => CarbonBlob.Serialize(SignWithKeys(msg, keys));

PhantasmaPhoenix.Protocol.Carbon.Blockchain.Vm.VmGlobal

Source: PhantasmaPhoenix.Protocol.Carbon/src/Helpers/Blockchain/Vm/VmGlobal.cs

Declarations

public static class VmGlobal

Methods

public static void VmAssert( #if NET6_0_OR_GREATER #endif bool condition, string constraintName = "")
public static void VmError(string constraintName)
public static void VmExpect( #if NET6_0_OR_GREATER #endif bool condition, string constraintName)

PhantasmaPhoenix.Protocol.Carbon.BinaryStreamExt

Source: PhantasmaPhoenix.Protocol.Carbon/src/Serialization/Serialization.cs

Declarations

public static class BinaryStreamExt

Methods

public static BigInteger ReadBigInt(this BinaryReader r)
public static BigInteger ReadBigInt(this BinaryReader r, out BigInteger data, int preReadHeader = -1)
public static BigInteger ReadBigInt(this byte[] data)
public static BigInteger[] ReadArrayBigInt(this BinaryReader r)
public static Byte Read1(this BinaryReader r)
public static Bytes16 Read16(this BinaryReader r)
public static Bytes32 Read32(this BinaryReader r)
public static Bytes64 Read64(this BinaryReader r)
public static Int16 Read2(this BinaryReader r)
public static Int16[] ReadArray16(this BinaryReader r)
public static Int16[] ReadArray16(this BinaryReader r, out Int16[] data)
public static Int32 Read4(this BinaryReader r)
public static Int32[] ReadArray32(this BinaryReader r)
public static Int32[] ReadArray32(this BinaryReader r, out Int32[] data)
public static Int64 Read8(this BinaryReader r)
public static Int64[] ReadArray64(this BinaryReader r)
public static Int64[] ReadArray64(this BinaryReader r, out Int64[] data)
public static T Read<T>(this BinaryReader r) where T : ICarbonBlob, new()
public static T[] ReadArray<T>(this BinaryReader r) where T : ICarbonBlob
public static byte[] ReadArray(this BinaryReader r)
public static byte[] ReadExactly(this BinaryReader r, int count)
public static byte[] ReadRemaining(this BinaryReader r)
public static byte[][] ReadArrayArray(this BinaryReader r)
public static int ReadLengthFor(this BinaryReader r, int elementSize = 1)
public static sbyte[] ReadArray8(this BinaryReader r)
public static sbyte[] ReadArray8(this BinaryReader r, out sbyte[] data)
public static string ReadSz(this BinaryReader r)
public static string[] ReadArraySz(this BinaryReader r)
public static void Read1(this BinaryReader r, out Byte v)
public static void Read16(this BinaryReader r, out Bytes16 v)
public static void Read16(this BinaryReader r, out byte[] v)
public static void Read1<T>(this BinaryReader r, out T v) where T : struct
public static void Read2(this BinaryReader r, out Int16 v)
public static void Read32(this BinaryReader r, out Bytes32 v)
public static void Read32(this BinaryReader r, out byte[] v)
public static void Read4(this BinaryReader r, out Int32 v)
public static void Read4(this BinaryReader r, out UInt32 v)
public static void Read4<T>(this BinaryReader r, out T v) where T : struct
public static void Read64(this BinaryReader r, out Bytes64 v)
public static void Read64(this BinaryReader r, out byte[] v)
public static void Read8(this BinaryReader r, out Int64 v)
public static void Read8(this BinaryReader r, out UInt64 v)
public static void Read<T>(this BinaryReader r, out T data) where T : ICarbonBlob, new()
public static void ReadArray(this BinaryReader r, out byte[] data)
public static void ReadArray(this BinaryReader r, out byte[][] data)
public static void ReadArray64(this BinaryReader r, out UInt64[] data)
public static void ReadArray<T>(this BinaryReader r, out T[] data) where T : ICarbonBlob
public static void ReadSz(this BinaryReader r, out string data)
public static void Write1(this BinaryWriter w, Byte data)
public static void Write16(this BinaryWriter w, Bytes16 data)
public static void Write16(this BinaryWriter w, byte[] data)
public static void Write1<T>(this BinaryWriter w, T data) where T : IComparable, IFormattable, IConvertible
public static void Write2(this BinaryWriter w, Int16 data)
public static void Write32(this BinaryWriter w, Bytes32 data)
public static void Write32(this BinaryWriter w, byte[] data)
public static void Write4(this BinaryWriter w, Int32 data)
public static void Write4(this BinaryWriter w, UInt32 data)
public static void Write4<T>(this BinaryWriter w, T data) where T : IComparable, IFormattable, IConvertible
public static void Write64(this BinaryWriter w, Bytes64 data)
public static void Write64(this BinaryWriter w, byte[] data)
public static void Write8(this BinaryWriter w, Int64 data)
public static void Write8(this BinaryWriter w, UInt64 data)
public static void Write<T>(this BinaryWriter w, T data) where T : ICarbonBlob
public static void WriteArray(this BinaryWriter w, byte[] data)
public static void WriteArray(this BinaryWriter w, byte[][] data)
public static void WriteArray16(this BinaryWriter w, Int16[] data)
public static void WriteArray32(this BinaryWriter w, Int32[] data)
public static void WriteArray64(this BinaryWriter w, Int64[] data)
public static void WriteArray64(this BinaryWriter w, UInt64[] data)
public static void WriteArray8(this BinaryWriter w, sbyte[] data)
public static void WriteArray<T>(this BinaryWriter w, T[] data) where T : ICarbonBlob
public static void WriteArrayBigInt(this BinaryWriter w, BigInteger[] data)
public static void WriteArraySz(this BinaryWriter w, string[] data)
public static void WriteBigInt(this BinaryWriter w, BigInteger data)
public static void WriteBigInt(this BinaryWriter w, byte[] bytes)
public static void WriteExactly(this BinaryWriter w, byte[] data, int count)
public static void WriteSz(this BinaryWriter w, string data)

PhantasmaPhoenix.Protocol.Carbon.GenericCastTo

Source: PhantasmaPhoenix.Protocol.Carbon/src/Serialization/Serialization.cs

Declarations

public static class GenericCastTo<T>

Methods

public static T From<S>(S s)
public static readonly Func<S, T> caster = Get();

PhantasmaPhoenix.Protocol.Carbon.Blockchain.ChainConfig

Source: PhantasmaPhoenix.Protocol.Carbon/src/Structures/Blockchain/ChainConfig.cs

Declarations

public struct ChainConfig : ICarbonBlob

Methods

public Byte reserved1;
public Byte reserved2;
public Byte reserved3;
public Byte version;
public UInt32 allowedTxTypes;
public UInt32 blockRateTarget;
public UInt32 expiryWindow;
public void Read(BinaryReader r)
public void Write(BinaryWriter w)

PhantasmaPhoenix.Protocol.Carbon.Blockchain.GasConfig

Source: PhantasmaPhoenix.Protocol.Carbon/src/Structures/Blockchain/GasConfig.cs

Declarations

public struct GasConfig : ICarbonBlob

Methods

public Byte feeShift;
public Byte gasBurnRatioShift;
public Byte gasDappRatioShift;
public Byte gasProducerRatioShift;
public Byte maxNameLength;
public Byte maxTokenSymbolLength;
public Byte version;
public UInt32 maxStructureSize;
public UInt64 dataEscrowPerRow;
public UInt64 dataTokenId;
public UInt64 feeMultiplier;
public UInt64 gasBurnRatioMul;
public UInt64 gasDappRatioMul;
public UInt64 gasFeeCreateTokenBase;
public UInt64 gasFeeCreateTokenSeries;
public UInt64 gasFeeCreateTokenSymbol;
public UInt64 gasFeePerByte;
public UInt64 gasFeeQuery;
public UInt64 gasFeeRegisterName;
public UInt64 gasFeeTransfer;
public UInt64 gasProducerRatioMul;
public UInt64 gasTokenId;
public UInt64 legacyDataEscrowPerRow;
public UInt64 minimumGasBill;
public UInt64 minimumGasOffer;
public UInt64 policyFeeCreateTokenBase;
public UInt64 policyFeeCreateTokenSeries;
public UInt64 policyFeeCreateTokenSymbol;
public UInt64 policyFeeRegisterName;
public bool HasGasModelV2 => version >= 1;
public void Read(BinaryReader r)
public void Write(BinaryWriter w)

PhantasmaPhoenix.Protocol.Carbon.Blockchain.Modules.MarketSellTokenArgs

Source: PhantasmaPhoenix.Protocol.Carbon/src/Structures/Blockchain/Modules/MarketCallArgs.cs

Declarations

public struct MarketSellTokenArgs : ICarbonBlob

Methods

public Bytes32 from;
public Int64 endDate;
public IntX price;
public UInt64 instanceId;
public UInt64 quoteTokenId;
public UInt64 tokenId;
public void Read(BinaryReader r)
public void Write(BinaryWriter w)

PhantasmaPhoenix.Protocol.Carbon.Blockchain.Modules.MarketSellTokenByIdArgs

Source: PhantasmaPhoenix.Protocol.Carbon/src/Structures/Blockchain/Modules/MarketCallArgs.cs

Declarations

public struct MarketSellTokenByIdArgs : ICarbonBlob

Methods

public Bytes32 from;
public Int64 endDate;
public IntX price;
public SmallString quoteSymbol;
public SmallString symbol;
public VmDynamicVariable instanceId;
public void Read(BinaryReader r)
public void Write(BinaryWriter w)

PhantasmaPhoenix.Protocol.Carbon.Blockchain.Modules.MarketCancelSaleArgs

Source: PhantasmaPhoenix.Protocol.Carbon/src/Structures/Blockchain/Modules/MarketCallArgs.cs

Declarations

public struct MarketCancelSaleArgs : ICarbonBlob

Methods

public UInt64 instanceId;
public UInt64 tokenId;
public void Read(BinaryReader r)
public void Write(BinaryWriter w)

PhantasmaPhoenix.Protocol.Carbon.Blockchain.Modules.MarketCancelSaleByIdArgs

Source: PhantasmaPhoenix.Protocol.Carbon/src/Structures/Blockchain/Modules/MarketCallArgs.cs

Declarations

public struct MarketCancelSaleByIdArgs : ICarbonBlob

Methods

public SmallString symbol;
public VmDynamicVariable instanceId;
public void Read(BinaryReader r)
public void Write(BinaryWriter w)

PhantasmaPhoenix.Protocol.Carbon.Blockchain.Modules.MarketBuyTokenArgs

Source: PhantasmaPhoenix.Protocol.Carbon/src/Structures/Blockchain/Modules/MarketCallArgs.cs

Declarations

public struct MarketBuyTokenArgs : ICarbonBlob

Methods

public Bytes32 from;
public UInt64 instanceId;
public UInt64 tokenId;
public void Read(BinaryReader r)
public void Write(BinaryWriter w)

PhantasmaPhoenix.Protocol.Carbon.Blockchain.Modules.MarketBuyTokenByIdArgs

Source: PhantasmaPhoenix.Protocol.Carbon/src/Structures/Blockchain/Modules/MarketCallArgs.cs

Declarations

public struct MarketBuyTokenByIdArgs : ICarbonBlob

Methods

public Bytes32 from;
public SmallString symbol;
public VmDynamicVariable instanceId;
public void Read(BinaryReader r)
public void Write(BinaryWriter w)

PhantasmaPhoenix.Protocol.Carbon.Blockchain.Modules.MarketGetTokenListingCountArgs

Source: PhantasmaPhoenix.Protocol.Carbon/src/Structures/Blockchain/Modules/MarketCallArgs.cs

Declarations

public struct MarketGetTokenListingCountArgs : ICarbonBlob

Methods

public UInt64 tokenId;
public void Read(BinaryReader r)
public void Write(BinaryWriter w)

PhantasmaPhoenix.Protocol.Carbon.Blockchain.Modules.MarketGetTokenListingInfoArgs

Source: PhantasmaPhoenix.Protocol.Carbon/src/Structures/Blockchain/Modules/MarketCallArgs.cs

Declarations

public struct MarketGetTokenListingInfoArgs : ICarbonBlob

Methods

public UInt64 instanceId;
public UInt64 tokenId;
public void Read(BinaryReader r)
public void Write(BinaryWriter w)

PhantasmaPhoenix.Protocol.Carbon.Blockchain.Modules.MarketGetTokenListingInfoByIdArgs

Source: PhantasmaPhoenix.Protocol.Carbon/src/Structures/Blockchain/Modules/MarketCallArgs.cs

Declarations

public struct MarketGetTokenListingInfoByIdArgs : ICarbonBlob

Methods

public SmallString symbol;
public VmDynamicVariable instanceId;
public void Read(BinaryReader r)
public void Write(BinaryWriter w)

PhantasmaPhoenix.Protocol.Carbon.Blockchain.Modules.MarketConfigFlags

Source: PhantasmaPhoenix.Protocol.Carbon/src/Structures/Blockchain/Modules/MarketConfig.cs

Declarations

public enum MarketConfigFlags : uint

Variants

  • CanCancelEarly = 1u << 2
  • CanPurchaseLate = 1u << 3
  • EnforceRoyalties = 1u << 1
  • None = 0
  • PriceRequired = 1u << 0

PhantasmaPhoenix.Protocol.Carbon.Blockchain.Modules.MarketConfigDefaults

Source: PhantasmaPhoenix.Protocol.Carbon/src/Structures/Blockchain/Modules/MarketConfig.cs

Declarations

public static class MarketConfigDefaults

Methods

public const MarketConfigFlags Flags = MarketConfigFlags.PriceRequired | MarketConfigFlags.EnforceRoyalties;
public const ulong DelistingGraceMs = 1000UL * 60 * 60 * 24;
public const ulong MaximumListingTimeMs = 1000UL * 60 * 60 * 24 * 90;
public const ulong MinimumListingTimeMs = 1000UL;

PhantasmaPhoenix.Protocol.Carbon.Blockchain.Modules.MarketRoyalties

Source: PhantasmaPhoenix.Protocol.Carbon/src/Structures/Blockchain/Modules/MarketConfig.cs

Declarations

public static class MarketRoyalties

Methods

public const ulong HundredPercent = 100UL * OnePercent;
public const ulong OnePercent = 10000000UL;

PhantasmaPhoenix.Protocol.Carbon.Blockchain.Modules.MarketConfig

Source: PhantasmaPhoenix.Protocol.Carbon/src/Structures/Blockchain/Modules/MarketConfig.cs

Declarations

public struct MarketConfig : ICarbonBlob

Methods

public MarketConfigFlags flags;
public const int SerializedSize = 28;
public ulong delistingGrace;
public ulong maximumListingTime;
public ulong minimumListingTime;
public void Read(BinaryReader r)
public void Write(BinaryWriter w)

PhantasmaPhoenix.Protocol.Carbon.Blockchain.Modules.SeriesInfo

Source: PhantasmaPhoenix.Protocol.Carbon/src/Structures/Blockchain/Modules/SeriesInfo.cs

Declarations

public struct SeriesInfo : ICarbonBlob

Methods

public Bytes32 owner;
public VmStructSchema ram;
public VmStructSchema rom;
public byte[] metadata; // TokenInfo.tokenSchemas.seriesMetadata
public uint maxMint;
public uint maxSupply;
public void Read(BinaryReader r)
public void Write(BinaryWriter w)

PhantasmaPhoenix.Protocol.Carbon.Blockchain.Modules.NftMintInfo

Source: PhantasmaPhoenix.Protocol.Carbon/src/Structures/Blockchain/Modules/TokenCallArgs.cs

Declarations

public struct NftMintInfo : ICarbonBlob

Methods

public UInt32 seriesId;
public byte[] ram;
public byte[] rom;
public void Read(BinaryReader r)
public void Write(BinaryWriter w)

PhantasmaPhoenix.Protocol.Carbon.Blockchain.Modules.MintNonFungibleArgs

Source: PhantasmaPhoenix.Protocol.Carbon/src/Structures/Blockchain/Modules/TokenCallArgs.cs

Declarations

public struct MintNonFungibleArgs : ICarbonBlob

Methods

public Bytes32 address;
public NftMintInfo[] tokens;
public UInt64 tokenId;
public void Read(BinaryReader r)
public void Write(BinaryWriter w)

PhantasmaPhoenix.Protocol.Carbon.Blockchain.Modules.CreateTokenSeriesArgs

Source: PhantasmaPhoenix.Protocol.Carbon/src/Structures/Blockchain/Modules/TokenCallArgs.cs

Declarations

public struct CreateTokenSeriesArgs : ICarbonBlob

Methods

public SeriesInfo info;
public UInt64 tokenId;
public void Read(BinaryReader r)
public void Write(BinaryWriter w)

PhantasmaPhoenix.Protocol.Carbon.Blockchain.Modules.CreateMintedTokenSeriesArgs

Source: PhantasmaPhoenix.Protocol.Carbon/src/Structures/Blockchain/Modules/TokenCallArgs.cs

Declarations

public struct CreateMintedTokenSeriesArgs : ICarbonBlob

Methods

public Bytes32 address;
public SeriesInfo info;
public UInt64 tokenId;
public byte[][] rams;
public byte[][] roms;
public void Read(BinaryReader r)
public void Write(BinaryWriter w)

PhantasmaPhoenix.Protocol.Carbon.Blockchain.Modules.PhantasmaNftMintInfo

Source: PhantasmaPhoenix.Protocol.Carbon/src/Structures/Blockchain/Modules/TokenCallArgs.cs

Declarations

public struct PhantasmaNftMintInfo : ICarbonBlob

Methods

public IntX phantasmaSeriesId;
public byte[] ram;
public byte[] rom; // public schema-driven NFT payload; chain-owned `_i` / nested `rom` are not caller input here
public void Read(BinaryReader r)
public void Write(BinaryWriter w)

PhantasmaPhoenix.Protocol.Carbon.Blockchain.Modules.MintPhantasmaNonFungibleArgs

Source: PhantasmaPhoenix.Protocol.Carbon/src/Structures/Blockchain/Modules/TokenCallArgs.cs

Declarations

public struct MintPhantasmaNonFungibleArgs : ICarbonBlob

Methods

public Bytes32 address;
public PhantasmaNftMintInfo[] tokens;
public UInt64 tokenId;
public void Read(BinaryReader r)
public void Write(BinaryWriter w)

PhantasmaPhoenix.Protocol.Carbon.Blockchain.Modules.PhantasmaNftMintResult

Source: PhantasmaPhoenix.Protocol.Carbon/src/Structures/Blockchain/Modules/TokenCallArgs.cs

Declarations

public struct PhantasmaNftMintResult : ICarbonBlob

Methods

public Bytes32 phantasmaNftId;
public UInt64 carbonInstanceId;
public void Read(BinaryReader r)
public void Write(BinaryWriter w)

PhantasmaPhoenix.Protocol.Carbon.Blockchain.Modules.MintFungibleArgs

Source: PhantasmaPhoenix.Protocol.Carbon/src/Structures/Blockchain/Modules/TokenCallArgs.cs

Declarations

public struct MintFungibleArgs : ICarbonBlob

Methods

public Bytes32 to;
public IntX amount;
public UInt64 tokenId;
public void Read(BinaryReader r)
public void Write(BinaryWriter w)

PhantasmaPhoenix.Protocol.Carbon.Blockchain.Modules.TransferFungibleArgs

Source: PhantasmaPhoenix.Protocol.Carbon/src/Structures/Blockchain/Modules/TokenCallArgs.cs

Declarations

public struct TransferFungibleArgs : ICarbonBlob

Methods

public Bytes32 from;
public Bytes32 to;
public IntX amount;
public UInt64 tokenId;
public void Read(BinaryReader r)
public void Write(BinaryWriter w)

PhantasmaPhoenix.Protocol.Carbon.Blockchain.Modules.TransferNonFungibleArgs

Source: PhantasmaPhoenix.Protocol.Carbon/src/Structures/Blockchain/Modules/TokenCallArgs.cs

Declarations

public struct TransferNonFungibleArgs : ICarbonBlob

Methods

public Bytes32 from;
public Bytes32 to;
public UInt64 tokenId;
public UInt64[] instanceIds;
public void Read(BinaryReader r)
public void Write(BinaryWriter w)

PhantasmaPhoenix.Protocol.Carbon.Blockchain.Modules.BurnFungibleArgs

Source: PhantasmaPhoenix.Protocol.Carbon/src/Structures/Blockchain/Modules/TokenCallArgs.cs

Declarations

public struct BurnFungibleArgs : ICarbonBlob

Methods

public Bytes32 from;
public IntX amount;
public UInt64 tokenId;
public void Read(BinaryReader r)
public void Write(BinaryWriter w)

PhantasmaPhoenix.Protocol.Carbon.Blockchain.Modules.BurnNonFungibleArgs

Source: PhantasmaPhoenix.Protocol.Carbon/src/Structures/Blockchain/Modules/TokenCallArgs.cs

Declarations

public struct BurnNonFungibleArgs : ICarbonBlob

Methods

public Bytes32 from;
public UInt64 tokenId;
public UInt64[] instanceIds;
public void Read(BinaryReader r)
public void Write(BinaryWriter w)

PhantasmaPhoenix.Protocol.Carbon.Blockchain.Modules.UpdateTokenMetadataArgs

Source: PhantasmaPhoenix.Protocol.Carbon/src/Structures/Blockchain/Modules/TokenCallArgs.cs

Declarations

public struct UpdateTokenMetadataArgs : ICarbonBlob

Methods

public UInt64 tokenId;
public VmDynamicStruct metadata;
public void Read(BinaryReader r)
public void Write(BinaryWriter w)

PhantasmaPhoenix.Protocol.Carbon.Blockchain.Modules.UpdateSeriesMetadataArgs

Source: PhantasmaPhoenix.Protocol.Carbon/src/Structures/Blockchain/Modules/TokenCallArgs.cs

Declarations

public struct UpdateSeriesMetadataArgs : ICarbonBlob

Methods

public UInt32 seriesId;
public UInt64 tokenId;
public byte[] metadata;
public void Read(BinaryReader r)
public void Write(BinaryWriter w)

PhantasmaPhoenix.Protocol.Carbon.Blockchain.Modules.SystemAddress

Source: PhantasmaPhoenix.Protocol.Carbon/src/Structures/Blockchain/Modules/TokenHelper.cs

Declarations

public static class SystemAddress

Methods

public static Bytes32 DataPool = Create(2);
public static Bytes32 GasPool = Create(1);
public static Bytes32 Null = Create(0); // All elements default to 0

PhantasmaPhoenix.Protocol.Carbon.Blockchain.Modules.TokenHelper

Source: PhantasmaPhoenix.Protocol.Carbon/src/Structures/Blockchain/Modules/TokenHelper.cs

Declarations

public static class TokenHelper

Methods

public static Bytes32 GetNftAddress(UInt64 tokenId, UInt64 instanceId)
public static bool IsNftAddress(Bytes32 address) => IsNftAddress(address.bytes);
public static bool IsNftAddress(byte[] address)
public static void UnpackNftInstanceId(UInt64 instanceId, out uint seriesId, out uint mintNumber)

PhantasmaPhoenix.Protocol.Carbon.Blockchain.Modules.TokenInfo

Source: PhantasmaPhoenix.Protocol.Carbon/src/Structures/Blockchain/Modules/TokenInfo.cs

Declarations

public struct TokenInfo : ICarbonBlob

Methods

public Bytes32 owner;
public IntX maxSupply;
public SmallString symbol;
public TokenFlags flags;
public byte[] metadata;
public byte[] tokenSchemas;
public uint decimals;
public void Read(BinaryReader r)
public void Write(BinaryWriter w)

PhantasmaPhoenix.Protocol.Carbon.Blockchain.Modules.ListingType

Source: PhantasmaPhoenix.Protocol.Carbon/src/Structures/Blockchain/Modules/TokenListing.cs

Declarations

public enum ListingType : byte

Variants

  • FixedPrice

PhantasmaPhoenix.Protocol.Carbon.Blockchain.Modules.TokenListing

Source: PhantasmaPhoenix.Protocol.Carbon/src/Structures/Blockchain/Modules/TokenListing.cs

Declarations

public struct TokenListing : ICarbonBlob

Methods

public Bytes32 seller;
public Int64 endDate;
public Int64 startDate;
public IntX price;
public ListingType type;
public UInt64 quoteTokenId;
public void Read(BinaryReader r)
public void Write(BinaryWriter w)

PhantasmaPhoenix.Protocol.Carbon.Blockchain.Modules.TokenSchemas

Source: PhantasmaPhoenix.Protocol.Carbon/src/Structures/Blockchain/Modules/TokenSchemas.cs

Declarations

public struct TokenSchemas : ICarbonBlob

Methods

public VmStructSchema ram;
public VmStructSchema rom;
public VmStructSchema seriesMetadata;
public void Read(BinaryReader r)
public void Write(BinaryWriter w)

PhantasmaPhoenix.Protocol.Carbon.Blockchain.Modules.TokensConfig

Source: PhantasmaPhoenix.Protocol.Carbon/src/Structures/Blockchain/Modules/TokensConfig.cs

Declarations

public struct TokensConfig : ICarbonBlob

Methods

public TokensConfigFlags flags;
public void Read(BinaryReader r)
public void Write(BinaryWriter w)

PhantasmaPhoenix.Protocol.Carbon.Blockchain.SignedTxMsg

Source: PhantasmaPhoenix.Protocol.Carbon/src/Structures/Blockchain/SignedTxMsg.cs

Declarations

public struct SignedTxMsg : ICarbonBlob

Methods

public TxMsg msg;
public Witness[] witnesses;
public static Bytes32[]? RequiredWitnesses(in TxMsg msg)
public static int EnvelopeBytes(in TxMsg msg, int? witnessCount = null)
public void Read(BinaryReader r)
public void Write(BinaryWriter w)

PhantasmaPhoenix.Protocol.Carbon.Blockchain.TxMsg

Source: PhantasmaPhoenix.Protocol.Carbon/src/Structures/Blockchain/TxMsg.cs

Declarations

public struct TxMsg : ICarbonBlob

Methods

public Bytes32 gasFrom;
public Int64 expiry;
public SmallString payload;
public TxTypes type;
public UInt64 maxData;
public UInt64 maxGas;
public object msg;
public static TxMsg FromPhantasmaRaw(byte[] rawTransaction)
public static object? ReadDataByType(BinaryReader r, TxTypes type)
public static void WriteDataByType(BinaryWriter w, TxTypes type, object msg)
public void Read(BinaryReader r)
public void Write(BinaryWriter w)

PhantasmaPhoenix.Protocol.Carbon.Blockchain.TxMsgBurnFungible

Source: PhantasmaPhoenix.Protocol.Carbon/src/Structures/Blockchain/TxMsgBurnFungible.cs

Declarations

public struct TxMsgBurnFungible : ICarbonBlob

Methods

public IntX amount;
public UInt64 tokenId;
public void Read(BinaryReader r)
public void Write(BinaryWriter w)

PhantasmaPhoenix.Protocol.Carbon.Blockchain.TxMsgBurnFungible_GasPayer

Source: PhantasmaPhoenix.Protocol.Carbon/src/Structures/Blockchain/TxMsgBurnFungible_GasPayer.cs

Declarations

public struct TxMsgBurnFungible_GasPayer : ICarbonBlob

Methods

public Bytes32 from;
public IntX amount;
public UInt64 tokenId;
public void Read(BinaryReader r)
public void Write(BinaryWriter w)

PhantasmaPhoenix.Protocol.Carbon.Blockchain.TxMsgBurnNonFungible

Source: PhantasmaPhoenix.Protocol.Carbon/src/Structures/Blockchain/TxMsgBurnNonFungible.cs

Declarations

public struct TxMsgBurnNonFungible : ICarbonBlob

Methods

public UInt64 instanceId;
public UInt64 tokenId;
public void Read(BinaryReader r)
public void Write(BinaryWriter w)

PhantasmaPhoenix.Protocol.Carbon.Blockchain.TxMsgBurnNonFungible_GasPayer

Source: PhantasmaPhoenix.Protocol.Carbon/src/Structures/Blockchain/TxMsgBurnNonFungible_GasPayer.cs

Declarations

public struct TxMsgBurnNonFungible_GasPayer : ICarbonBlob

Methods

public Bytes32 from;
public UInt64 instanceId;
public UInt64 tokenId;
public void Read(BinaryReader r)
public void Write(BinaryWriter w)

PhantasmaPhoenix.Protocol.Carbon.Blockchain.TxMsgCall

Source: PhantasmaPhoenix.Protocol.Carbon/src/Structures/Blockchain/TxMsgCall.cs

Declarations

public struct TxMsgCall : ICarbonBlob

Methods

public MsgCallArgSections sections;
public UInt32 methodId;
public UInt32 moduleId;
public byte[] args;
public void Read(BinaryReader r)
public void Write(BinaryWriter w)

PhantasmaPhoenix.Protocol.Carbon.Blockchain.MsgCallArgs

Source: PhantasmaPhoenix.Protocol.Carbon/src/Structures/Blockchain/TxMsgCallArgSections.cs

Declarations

public struct MsgCallArgs : ICarbonBlob

Methods

public byte[] args;
public int registerOffset;
public void Read(BinaryReader r)
public void Write(BinaryWriter w)

PhantasmaPhoenix.Protocol.Carbon.Blockchain.MsgCallArgSections

Source: PhantasmaPhoenix.Protocol.Carbon/src/Structures/Blockchain/TxMsgCallArgSections.cs

Declarations

public struct MsgCallArgSections : ICarbonBlob

Methods

public MsgCallArgs[] argSections;
public bool HasSections => argSections != null && argSections.Length > 0;
public void Read(BinaryReader r)
public void ReadWithNegativeCount(BinaryReader r, int countNegative)
public void Write(BinaryWriter w)

PhantasmaPhoenix.Protocol.Carbon.Blockchain.TxMsgCall_Multi

Source: PhantasmaPhoenix.Protocol.Carbon/src/Structures/Blockchain/TxMsgCall_Multi.cs

Declarations

public struct TxMsgCall_Multi : ICarbonBlob

Methods

public TxMsgCall[] calls;
public void Read(BinaryReader r)
public void Write(BinaryWriter w)

PhantasmaPhoenix.Protocol.Carbon.Blockchain.TxMsgMintFungible

Source: PhantasmaPhoenix.Protocol.Carbon/src/Structures/Blockchain/TxMsgMintFungible.cs

Declarations

public struct TxMsgMintFungible : ICarbonBlob

Methods

public Bytes32 to;
public IntX amount;
public UInt64 tokenId;
public void Read(BinaryReader r)
public void Write(BinaryWriter w)

PhantasmaPhoenix.Protocol.Carbon.Blockchain.TxMsgMintNonFungible

Source: PhantasmaPhoenix.Protocol.Carbon/src/Structures/Blockchain/TxMsgMintNonFungible.cs

Declarations

public struct TxMsgMintNonFungible : ICarbonBlob

Methods

public Bytes32 to;
public UInt32 seriesId;
public UInt64 tokenId;
public byte[] ram;
public byte[] rom;
public void Read(BinaryReader r)
public void Write(BinaryWriter w)

PhantasmaPhoenix.Protocol.Carbon.Blockchain.TxMsgPhantasma

Source: PhantasmaPhoenix.Protocol.Carbon/src/Structures/Blockchain/TxMsgPhantasma.cs

Declarations

public struct TxMsgPhantasma : ICarbonBlob

Methods

public SmallString chain;
public SmallString nexus;
public byte[] script;
public void Read(BinaryReader r)
public void Write(BinaryWriter w)

PhantasmaPhoenix.Protocol.Carbon.Blockchain.TxMsgPhantasma_Raw

Source: PhantasmaPhoenix.Protocol.Carbon/src/Structures/Blockchain/TxMsgPhantasma_Raw.cs

Declarations

public struct TxMsgPhantasma_Raw : ICarbonBlob

Methods

public byte[] transaction;
public void Read(BinaryReader r)
public void Write(BinaryWriter w)

PhantasmaPhoenix.Protocol.Carbon.Blockchain.TxMsgSpecialResolution

Source: PhantasmaPhoenix.Protocol.Carbon/src/Structures/Blockchain/TxMsgSpecialResolution.cs

Declarations

public struct TxMsgSpecialResolution : ICarbonBlob

Methods

public TxMsgCall[] calls;
public UInt64 resolutionId;
public void Read(BinaryReader r)
public void Write(BinaryWriter w)

PhantasmaPhoenix.Protocol.Carbon.Blockchain.TxMsgTrade

Source: PhantasmaPhoenix.Protocol.Carbon/src/Structures/Blockchain/TxMsgTrade.cs

Declarations

public struct TxMsgTrade : ICarbonBlob

Methods

public TxMsgBurnFungible_GasPayer[] burnF;
public TxMsgBurnNonFungible_GasPayer[] burnN;
public TxMsgMintFungible[] mintF;
public TxMsgMintNonFungible[] mintN;
public TxMsgTransferFungible_GasPayer[] transferF;
public TxMsgTransferNonFungible_Single_GasPayer[] transferN;
public void Read(BinaryReader r)
public void Write(BinaryWriter w)

PhantasmaPhoenix.Protocol.Carbon.Blockchain.TxMsgTransferFungible

Source: PhantasmaPhoenix.Protocol.Carbon/src/Structures/Blockchain/TxMsgTransferFungible.cs

Declarations

public struct TxMsgTransferFungible : ICarbonBlob

Methods

public Bytes32 to;
public UInt64 amount;
public UInt64 tokenId;
public void Read(BinaryReader r)
public void Write(BinaryWriter w)

PhantasmaPhoenix.Protocol.Carbon.Blockchain.TxMsgTransferFungible_GasPayer

Source: PhantasmaPhoenix.Protocol.Carbon/src/Structures/Blockchain/TxMsgTransferFungible_GasPayer.cs

Declarations

public struct TxMsgTransferFungible_GasPayer : ICarbonBlob

Methods

public Bytes32 from;
public Bytes32 to;
public UInt64 amount;
public UInt64 tokenId;
public void Read(BinaryReader r)
public void Write(BinaryWriter w)

PhantasmaPhoenix.Protocol.Carbon.Blockchain.TxMsgTransferNonFungible_Multi

Source: PhantasmaPhoenix.Protocol.Carbon/src/Structures/Blockchain/TxMsgTransferNonFungible_Multi.cs

Declarations

public struct TxMsgTransferNonFungible_Multi : ICarbonBlob

Methods

public Bytes32 to;
public UInt64 tokenId;
public UInt64[] instanceIds;
public void Read(BinaryReader r)
public void Write(BinaryWriter w)

PhantasmaPhoenix.Protocol.Carbon.Blockchain.TxMsgTransferNonFungible_Multi_GasPayer

Source: PhantasmaPhoenix.Protocol.Carbon/src/Structures/Blockchain/TxMsgTransferNonFungible_Multi_GasPayer.cs

Declarations

public struct TxMsgTransferNonFungible_Multi_GasPayer : ICarbonBlob

Methods

public Bytes32 from;
public Bytes32 to;
public UInt64 tokenId;
public UInt64[] instanceIds;
public void Read(BinaryReader r)
public void Write(BinaryWriter w)

PhantasmaPhoenix.Protocol.Carbon.Blockchain.TxMsgTransferNonFungible_Single

Source: PhantasmaPhoenix.Protocol.Carbon/src/Structures/Blockchain/TxMsgTransferNonFungible_Single.cs

Declarations

public struct TxMsgTransferNonFungible_Single : ICarbonBlob

Methods

public Bytes32 to;
public UInt64 instanceId;
public UInt64 tokenId;
public void Read(BinaryReader r)
public void Write(BinaryWriter w)

PhantasmaPhoenix.Protocol.Carbon.Blockchain.TxMsgTransferNonFungible_Single_GasPayer

Source: PhantasmaPhoenix.Protocol.Carbon/src/Structures/Blockchain/TxMsgTransferNonFungible_Single_GasPayer.cs

Declarations

public struct TxMsgTransferNonFungible_Single_GasPayer : ICarbonBlob

Methods

public Bytes32 from;
public Bytes32 to;
public UInt64 instanceId;
public UInt64 tokenId;
public void Read(BinaryReader r)
public void Write(BinaryWriter w)

PhantasmaPhoenix.Protocol.Carbon.Blockchain.Vm.StandardMeta

Source: PhantasmaPhoenix.Protocol.Carbon/src/Structures/Blockchain/Vm/StandardMeta.cs

Declarations

public static class StandardMeta

Methods

public static SmallString address = new("_a");
public static SmallString id = new("_i");
public static SmallString inflation_period = new("_ip");
public static SmallString name = new("_n");
public static SmallString nexus = new("_x");
public static SmallString phantasmaRom = new("rom");
public static SmallString phantasma_abi = new("_phb");
public static SmallString phantasma_script = new("_phs");
public static SmallString pre_burn = new("_brn");
public static SmallString royalties = new("royalties");
public static SmallString staking_booster_div = new("_sbd");
public static SmallString staking_booster_limit = new("_sbl");
public static SmallString staking_booster_mul = new("_sbm");
public static SmallString staking_booster_token = new("_sbt");
public static SmallString staking_lock = new("_sl");
public static SmallString staking_org_id = new("_soi");
public static SmallString staking_org_threshold = new("_sot");
public static SmallString staking_reward_div = new("_srd");
public static SmallString staking_reward_mul = new("_srm");
public static SmallString staking_reward_period = new("_srp");
public static SmallString staking_reward_token = new("_srt");
public static SmallString tokenomics = new("_t");
public static class Chain
public static class Nft
public static class Token

PhantasmaPhoenix.Protocol.Carbon.Blockchain.Vm.VmDynamicStruct

Source: PhantasmaPhoenix.Protocol.Carbon/src/Structures/Blockchain/Vm/VmDynamicStruct.cs

Declarations

public struct VmDynamicStruct : ICarbonBlob

Methods

public VmDynamicVariable? GetValue(SmallString key)
public VmDynamicVariable? this[SmallString key]
public VmDynamicVariable? this[string key]
public VmNamedDynamicVariable[] fields;//NOTE: fields *must* be sorted by name
public bool Write(VmStructSchema schema, BinaryWriter w)
public static VmDynamicStruct New(VmStructSchema schema, byte[] bytes)
public void Read(BinaryReader r)
public void Read(VmStructSchema schema, BinaryReader r)
public void Write(BinaryWriter w)

PhantasmaPhoenix.Protocol.Carbon.Blockchain.Vm.VmDynamicVariable

Source: PhantasmaPhoenix.Protocol.Carbon/src/Structures/Blockchain/Vm/VmDynamicVariable.cs

Declarations

public struct VmDynamicVariable : ICarbonBlob

Methods

public BigInteger GetInt256(string e = "not Int256") { VmExpect(type == VmType.Int256, e); VmAssert(data != null, "bad variable"); return (BigInteger)data!; }
public BigInteger GetUInt256(string e = "not Int256")
public Int16 GetInt16(string e = "not Int16") { VmExpect(type == VmType.Int16, e); VmAssert(data != null, "bad variable"); return (Int16)data!; }
public Int32 GetInt32(string e = "not Int32") { VmExpect(type == VmType.Int32, e); VmAssert(data != null, "bad variable"); return (Int32)data!; }
public Int64 GetInt64(string e = "not Int64") { VmExpect(type == VmType.Int64, e); VmAssert(data != null, "bad variable"); return (Int64)data!; }
public UInt16 GetUInt16(string e = "not Int16") { VmExpect(type == VmType.Int16, e); VmAssert(data != null, "bad variable"); return (UInt16)(Int16)data!; }
public UInt32 GetUInt32(string e = "not Int32") { VmExpect(type == VmType.Int32, e); VmAssert(data != null, "bad variable"); return (UInt32)(Int32)data!; }
public UInt64 GetUInt64(string e = "not Int64") { VmExpect(type == VmType.Int64, e); VmAssert(data != null, "bad variable"); return (UInt64)(Int64)data!; }
public VmDynamicVariable() { type = VmType.Dynamic; data = null; }
public VmDynamicVariable(BigInteger i) { type = VmType.Int256; data = i; }
public VmDynamicVariable(Bytes16 b) { type = VmType.Bytes16; data = b; }
public VmDynamicVariable(Bytes32 b) { type = VmType.Bytes32; data = b; }
public VmDynamicVariable(Bytes64 b) { type = VmType.Bytes64; data = b; }
public VmDynamicVariable(Int16 i) { type = VmType.Int16; data = i; }
public VmDynamicVariable(Int32 i) { type = VmType.Int32; data = i; }
public VmDynamicVariable(Int64 i) { type = VmType.Int64; data = i; }
public VmDynamicVariable(UInt16 i) { type = VmType.Int16; data = (Int16)i; }
public VmDynamicVariable(UInt32 i) { type = VmType.Int32; data = (Int32)i; }
public VmDynamicVariable(UInt64 i) { type = VmType.Int64; data = (Int64)i; }
public VmDynamicVariable(VmStructArray s) { type = VmType.Array | VmType.Struct; data = s; }
public VmDynamicVariable(VmType t)
public VmDynamicVariable(byte i) { type = VmType.Int8; data = i; }
public VmDynamicVariable(byte[] b) { type = VmType.Bytes; data = b; }
public VmDynamicVariable(sbyte i) { type = VmType.Int8; data = (byte)i; }
public VmDynamicVariable(string s) { type = VmType.String; data = s; }
public VmType type;
public bool Write(VmVariableSchema schema, BinaryWriter w)
public byte GetUInt8(string e = "not Int8") { VmExpect(type == VmType.Int8, e); VmAssert(data != null, "bad variable"); return (byte)data!; }
public byte[] GetBytes(string e = "not Bytes") { VmExpect(type == VmType.Bytes, e); VmAssert(data != null, "bad variable"); return (byte[])data!; }
public object? data;
public sbyte GetInt8(string e = "not Int8") { VmExpect(type == VmType.Int8, e); VmAssert(data != null, "bad variable"); return (sbyte)(byte)data!; }
public static bool Write(VmType type, VmDynamicVariable v, VmStructSchema? schema, BinaryWriter w)
public static void Read(VmType type, out VmDynamicVariable v, VmStructSchema? schema, BinaryReader r)
public string GetString(string e = "not String") { VmExpect(type == VmType.String, e); VmAssert(data != null, "bad variable"); return (string)data!; }
public void Read(BinaryReader r)
public void Read(VmVariableSchema schema, BinaryReader r)
public void Write(BinaryWriter w)

PhantasmaPhoenix.Protocol.Carbon.Blockchain.Vm.VmNamedDynamicVariable

Source: PhantasmaPhoenix.Protocol.Carbon/src/Structures/Blockchain/Vm/VmNamedDynamicVariable.cs

Declarations

public struct VmNamedDynamicVariable : ICarbonBlob

Methods

public SmallString name;
public VmDynamicVariable value;
public void Read(BinaryReader r)
public void Write(BinaryWriter w)

PhantasmaPhoenix.Protocol.Carbon.Blockchain.Vm.VmNamedVariableSchema

Source: PhantasmaPhoenix.Protocol.Carbon/src/Structures/Blockchain/Vm/VmNamedVariableSchema.cs

Declarations

public struct VmNamedVariableSchema : ICarbonBlob

Methods

public SmallString name;
public VmVariableSchema schema;
public void Read(BinaryReader r)
public void Write(BinaryWriter w)

PhantasmaPhoenix.Protocol.Carbon.Blockchain.Vm.VmStructArray

Source: PhantasmaPhoenix.Protocol.Carbon/src/Structures/Blockchain/Vm/VmStructArray.cs

Declarations

public class VmStructArray

Methods

public VmDynamicStruct[] structs = Array.Empty<VmDynamicStruct>();
public VmStructSchema schema = new VmStructSchema { fields = Array.Empty<VmNamedVariableSchema>(), flags = VmStructSchema.Flags.None };

PhantasmaPhoenix.Protocol.Carbon.Blockchain.Vm.VmStructSchema

Source: PhantasmaPhoenix.Protocol.Carbon/src/Structures/Blockchain/Vm/VmStructSchema.cs

Declarations

public struct VmStructSchema : ICarbonBlob

Methods

public Flags flags;
public VmNamedVariableSchema[] fields;
public enum Flags
public static VmStructSchema CreateEmpty()
public void Read(BinaryReader r)
public void Write(BinaryWriter w)

PhantasmaPhoenix.Protocol.Carbon.Blockchain.Vm.VmVariableSchema

Source: PhantasmaPhoenix.Protocol.Carbon/src/Structures/Blockchain/Vm/VmVariableSchema.cs

Declarations

public struct VmVariableSchema : ICarbonBlob

Methods

public VmStructSchema structure;
public VmType type;
public void Read(BinaryReader r)
public void Write(BinaryWriter w)

PhantasmaPhoenix.Protocol.Carbon.Bytes16

Source: PhantasmaPhoenix.Protocol.Carbon/src/Structures/Bytes16.cs

Declarations

public struct Bytes16 : ICarbonBlob

Methods

public Bytes16()
public Bytes16(byte[] data)
public bool Equals(Bytes16 obj)
public byte[] bytes;
public override bool Equals(object? obj)
public override int GetHashCode()
public readonly static Bytes16 Empty = new();
public static explicit operator byte[](Bytes16 v)
public void Read(BinaryReader r)
public void Write(BinaryWriter w)

PhantasmaPhoenix.Protocol.Carbon.Bytes32

Source: PhantasmaPhoenix.Protocol.Carbon/src/Structures/Bytes32.cs

Declarations

public struct Bytes32 : ICarbonBlob, IEquatable<Bytes32>

Methods

public Bytes32()
public Bytes32(byte[] data)
public Bytes32(byte[] data, int offset)
public Bytes32(string hex) : this(hex.FromHex() ?? Array.Empty<byte>())
public bool Equals(Bytes32 obj)
public byte[] bytes;
public override bool Equals(object? obj)
public override int GetHashCode()
public readonly static Bytes32 Empty = new();
public static explicit operator byte[](Bytes32 v)
public string ToHex()
public void Read(BinaryReader r)
public void Write(BinaryWriter w)

PhantasmaPhoenix.Protocol.Carbon.Bytes64

Source: PhantasmaPhoenix.Protocol.Carbon/src/Structures/Bytes64.cs

Declarations

public struct Bytes64 : ICarbonBlob, IEquatable<Bytes64>

Methods

public Bytes64()
public Bytes64(byte[] data)
public bool Equals(Bytes64 obj)
public byte[] bytes;
public override bool Equals(object? obj)
public override int GetHashCode()
public readonly static Bytes64 Empty = new();
public static explicit operator byte[](Bytes64 v)
public string ToHex()
public void Read(BinaryReader r)
public void Write(BinaryWriter w)

PhantasmaPhoenix.Protocol.Carbon.CarbonBlob

Source: PhantasmaPhoenix.Protocol.Carbon/src/Structures/CarbonBlob.cs

Declarations

public static class CarbonBlob

Methods

public static T New<T>(BinaryReader r) where T : ICarbonBlob, new()
public static T New<T>(Stream s, bool allowTrailingBytes = false) where T : ICarbonBlob, new()
public static T New<T>(byte[] bytes, bool allowTrailingBytes = false, long offset = 0) where T : ICarbonBlob, new()
public static T New<T>(byte[] bytes, long offset) where T : ICarbonBlob, new()
public static byte[] Serialize<T>(T carbonBlob) where T : ICarbonBlob, new()

PhantasmaPhoenix.Protocol.Carbon.IntX

Source: PhantasmaPhoenix.Protocol.Carbon/src/Structures/IntX.cs

Declarations

public struct IntX : ICarbonBlob

Methods

public IntX(BigInteger v)
public IntX(Int64 v)
public bool IsZero
public override string ToString()
public static IntX operator -(IntX a)
public static IntX operator -(IntX a, IntX b)
public static explicit operator BigInteger(IntX self)
public static explicit operator Int64(IntX self)
public void Read(BinaryReader r)
public void Write(BinaryWriter w)

PhantasmaPhoenix.Protocol.Carbon.SmallString

Source: PhantasmaPhoenix.Protocol.Carbon/src/Structures/SmallString.cs

Declarations

public struct SmallString : ICarbonBlob

Methods

public SmallString() { data = ""; }
public SmallString(string s)
public byte[] GetBytes()
public int CompareTo(SmallString other) { return data.CompareTo(other.data); }
public readonly static SmallString Empty = new SmallString { data = "" };
public static SmallString FromBytes(byte[] bytes)
public static SmallString FromBytes(byte[] bytes, int index, int count)
public string data;
public void Read(BinaryReader r)
public void Write(BinaryWriter w)

PhantasmaPhoenix.Protocol.Carbon.Witness

Source: PhantasmaPhoenix.Protocol.Carbon/src/Structures/Witness.cs

Declarations

public struct Witness : ICarbonBlob

Methods

public Bytes32 address;
public Bytes64 signature;
public void Read(BinaryReader r)
public void Write(BinaryWriter w)

PhantasmaPhoenix.RPC.Annotations.ApiDescriptionAttribute

Source: PhantasmaPhoenix.RPC/src/Annotations/ApiAttributes.cs

Declarations

public class ApiDescriptionAttribute : Attribute

Methods

public ApiDescriptionAttribute(string description)
public readonly string Description;

PhantasmaPhoenix.RPC.Annotations.ApiParameterAttribute

Source: PhantasmaPhoenix.RPC/src/Annotations/ApiAttributes.cs

Declarations

public class ApiParameterAttribute : ApiDescriptionAttribute

Methods

public ApiParameterAttribute(string description) : base(description)
public ApiParameterAttribute(string description, string value) : base(description)
public bool? Required { get; set; }
public readonly string? Value;

PhantasmaPhoenix.RPC.Annotations.ApiInfoAttribute

Source: PhantasmaPhoenix.RPC/src/Annotations/ApiAttributes.cs

Declarations

public class ApiInfoAttribute : ApiDescriptionAttribute

Methods

public ApiInfoAttribute(Type returnType, string description, bool paginated = false, int cacheDuration = 0, string? cacheTag = null) : base(description)
public readonly Type ReturnType;
public readonly bool Paginated;
public readonly int CacheDuration;
public readonly string? CacheTag;

PhantasmaPhoenix.RPC.IGasConfigSource

Source: PhantasmaPhoenix.RPC/src/ChainFeePlanner.cs

Declarations

public interface IGasConfigSource

PhantasmaPhoenix.RPC.IInfusionSource

Source: PhantasmaPhoenix.RPC/src/ChainFeePlanner.cs

Declarations

public interface IInfusionSource

PhantasmaPhoenix.RPC.ChainFeePlannerOptions

Source: PhantasmaPhoenix.RPC/src/ChainFeePlanner.cs

Declarations

public sealed class ChainFeePlannerOptions

Methods

public int ConfigTtlMs { get; set; } = 60_000;

PhantasmaPhoenix.RPC.PlanRequestOptions

Source: PhantasmaPhoenix.RPC/src/ChainFeePlanner.cs

Declarations

public class PlanRequestOptions : FeePlanOptions

Methods

public bool RefreshConfig { get; set; }

PhantasmaPhoenix.RPC.ChainFeeParams

Source: PhantasmaPhoenix.RPC/src/ChainFeePlanner.cs

Declarations

public readonly struct ChainFeeParams

Methods

public ChainFeeParams(uint expiryWindow, uint blockRateTarget, uint gasModelVersion)
public uint BlockRateTarget { get; }
public uint ExpiryWindow { get; }
public uint GasModelVersion { get; }

PhantasmaPhoenix.RPC.ChainFeePlanner

Source: PhantasmaPhoenix.RPC/src/ChainFeePlanner.cs

Declarations

public sealed class ChainFeePlanner

Methods

public Cached(GasConfig config, ChainFeeParams @params, long fetchedAt) { Config = config; Params = @params; FetchedAt = fetchedAt; }
public ChainFeeParams Params;
public ChainFeePlanner(IGasConfigSource source, ChainFeePlannerOptions? options = null)
public FeePlan PlanWith(in GasConfig config, TxMsg msg, FeePlanOptions? options = null) => FeePlanner.Plan(msg, config, options);
public GasConfig Config;
public async Task<ChainFeeParams> ChainParamsAsync(bool refresh = false) => (await ReadAsync(refresh).ConfigureAwait(false)).Params;
public async Task<FeePlan> PlanAsync(TxMsg msg, PlanRequestOptions? options = null)
public async Task<GasConfig> ConfigAsync(bool refresh = false) => (await ReadAsync(refresh).ConfigureAwait(false)).Config;
public long FetchedAt;
public void Invalidate() => _cached = null;

PhantasmaPhoenix.RPC.Models.ABIEventResult

Source: PhantasmaPhoenix.RPC/src/Models/ABIEventResult.cs

Declarations

public class ABIEventResult

Methods

public ABIEventResult() { }
public int Value { get; set; }
public string Description { get; set; } = "";
public string Name { get; set; } = "";
public string ReturnType { get; set; } = "";

PhantasmaPhoenix.RPC.Models.ABIMethodResult

Source: PhantasmaPhoenix.RPC/src/Models/ABIMethodResult.cs

Declarations

public class ABIMethodResult

Methods

public ABIMethodResult() { }
public ABIParameterResult[] Parameters { get; set; } = Array.Empty<ABIParameterResult>();
public string Name { get; set; } = "";
public string ReturnType { get; set; } = "";

PhantasmaPhoenix.RPC.Models.ABIParameterResult

Source: PhantasmaPhoenix.RPC/src/Models/ABIParameterResult.cs

Declarations

public class ABIParameterResult

Methods

public ABIParameterResult() { }
public string Name { get; set; } = "";
public string Type { get; set; } = "";

PhantasmaPhoenix.RPC.Models.AccountInfoResult

Source: PhantasmaPhoenix.RPC/src/Models/AccountInfoResult.cs

Declarations

public class AccountInfoResult

Methods

public AccountInfoResult() { }
public StakeResult Stake { get; set; } = new();
public string Address { get; set; } = "";
public string Name { get; set; } = "";

PhantasmaPhoenix.RPC.Models.AccountResult

Source: PhantasmaPhoenix.RPC/src/Models/AccountResult.cs

Declarations

public class AccountResult

Methods

public AccountResult() { }
public BalanceResult[] Balances { get; set; } = Array.Empty<BalanceResult>();
public StakeResult Stakes { get; set; } = new();
public StorageResult Storage { get; set; } = new();
public string Address { get; set; } = "";
public string Name { get; set; } = "";
public string Stake { get; set; } = "";
public string Unclaimed { get; set; } = "";
public string Validator { get; set; } = "";
public string? Relay { get; set; }
public string[]? Txs { get; set; }

PhantasmaPhoenix.RPC.Models.AccountTransactionsResult

Source: PhantasmaPhoenix.RPC/src/Models/AccountTransactionsResult.cs

Declarations

public class AccountTransactionsResult

Methods

public AccountTransactionsResult() { }
public TransactionResult[] Txs { get; set; } = Array.Empty<TransactionResult>();
public string Address { get; set; } = "";

PhantasmaPhoenix.RPC.Models.ArchiveResult

Source: PhantasmaPhoenix.RPC/src/Models/ArchiveResult.cs

Declarations

public class ArchiveResult

Methods

public ArchiveResult() { }
public int BlockCount { get; set; }
public int[]? MissingBlocks { get; set; }
public string? Encryption { get; set; }
public string? Hash { get; set; }
public string? Name { get; set; }
public string[]? Owners { get; set; }
public uint Size { get; set; }
public uint Time { get; set; }

PhantasmaPhoenix.RPC.Models.AuctionResult

Source: PhantasmaPhoenix.RPC/src/Models/AuctionResult.cs

Declarations

public class AuctionResult

Methods

public AuctionResult() { }
public string BaseSymbol { get; set; } = "";
public string ChainAddress { get; set; } = "";
public string CreatorAddress { get; set; } = "";
public string CurrentWinner { get; set; } = "";
public string EndPrice { get; set; } = "";
public string ExtensionPeriod { get; set; } = "";
public string ListingFee { get; set; } = "";
public string Price { get; set; } = "";
public string QuoteSymbol { get; set; } = "";
public string Ram { get; set; } = "";
public string Rom { get; set; } = "";
public string TokenId { get; set; } = "";
public string Type { get; set; } = "";
public uint EndDate { get; set; }
public uint StartDate { get; set; }

PhantasmaPhoenix.RPC.Models.BalanceResult

Source: PhantasmaPhoenix.RPC/src/Models/BalanceResult.cs

Declarations

public class BalanceResult

Methods

public BalanceResult() { }
public string Amount { get; set; } = "";
public string Chain { get; set; } = "";
public string Symbol { get; set; } = "";
public string[]? Ids { get; set; }
public uint Decimals { get; set; }

PhantasmaPhoenix.RPC.Models.BlockResult

Source: PhantasmaPhoenix.RPC/src/Models/BlockResult.cs

Declarations

public class BlockResult

Methods

public BlockResult() { }
public EventResult[]? Events { get; set; }
public OracleResult[]? Oracles { get; set; }
public TransactionResult[] Txs { get; set; } = Array.Empty<TransactionResult>();
public string ChainAddress { get; set; } = "";
public string Hash { get; set; } = "";
public string PreviousHash { get; set; } = "";
public string Reward { get; set; } = "";
public string ValidatorAddress { get; set; } = "";
public string? ProducerAddress { get; set; }
public uint Height { get; set; }
public uint Protocol { get; set; }
public uint Timestamp { get; set; }

PhantasmaPhoenix.RPC.Models.ChainResult

Source: PhantasmaPhoenix.RPC/src/Models/ChainResult.cs

Declarations

public class ChainResult

Methods

public ChainResult() { }
public string? Address { get; set; }
public string? Name { get; set; }
public string? Organization { get; set; }
public string? Parent { get; set; }
public string[]? Contracts { get; set; }
public string[]? Dapps { get; set; }
public uint Height { get; set; }

PhantasmaPhoenix.RPC.Models.ContractResult

Source: PhantasmaPhoenix.RPC/src/Models/ContractResult.cs

Declarations

public class ContractResult

Methods

public ABIEventResult[]? Events { get; set; }
public ABIMethodResult[]? Methods { get; set; }
public ContractResult() { }
public string Address { get; set; } = "";
public string Name { get; set; } = "";
public string Script { get; set; } = "";
public string? Owner { get; set; }

PhantasmaPhoenix.RPC.Models.EstimateTransactionResult

Source: PhantasmaPhoenix.RPC/src/Models/EstimateTransactionResult.cs

Declarations

public class EstimateTransactionResult

Methods

public EstimateTransactionResult() { }
public FeeQuote ToFeeQuote()
public bool WouldAbort { get; set; }
public string? AbortReason { get; set; }
public string? DataEscrowAtoms { get; set; }
public string? DataRefundAtoms { get; set; }
public string? DataRows { get; set; }
public string? GasBillKcalBase { get; set; }
public string? RecommendedMaxData { get; set; }
public string? RecommendedMaxGas { get; set; }

PhantasmaPhoenix.RPC.Models.EventExResult

Source: PhantasmaPhoenix.RPC/src/Models/EventExResult.cs

Declarations

public class EventExResult

Methods

public EventExResult()
public EventExResult(string address, string contract, EventKind kind, object? data)
public EventKind Kind { get; set; }
public object? Data { get; set; }
public string Address { get; set; } = string.Empty;
public string Contract { get; set; } = string.Empty;

PhantasmaPhoenix.RPC.Models.EventResult

Source: PhantasmaPhoenix.RPC/src/Models/EventResult.cs

Declarations

public class EventResult

Methods

public EventResult() { }
public EventResult(Event e)
public EventResult(string address, string contract, string kind, string name, string data)
public string Address { get; set; } = string.Empty;
public string Contract { get; set; } = string.Empty;
public string Data { get; set; } = string.Empty;
public string Kind { get; set; } = string.Empty;
public string Name { get; set; } = string.Empty;

PhantasmaPhoenix.RPC.Models.GasConfigResult

Source: PhantasmaPhoenix.RPC/src/Models/GasConfigResult.cs

Declarations

public class GasConfigResult

Methods

public GasConfig ToGasConfig()
public GasConfigDataResult? GasConfig { get; set; }
public GasConfigResult() { }
public uint BlockRateTarget { get; set; }
public uint ExpiryWindow { get; set; }
public uint GasModelVersion { get; set; }
public uint? UnitsPerBlockDataByte { get; set; }

PhantasmaPhoenix.RPC.Models.GasConfigDataResult

Source: PhantasmaPhoenix.RPC/src/Models/GasConfigResult.cs

Declarations

public class GasConfigDataResult

Methods

public GasConfigDataResult() { }
public byte FeeShift { get; set; }
public byte GasBurnRatioShift { get; set; }
public byte MaxNameLength { get; set; }
public byte MaxTokenSymbolLength { get; set; }
public byte Version { get; set; }
public byte? GasDappRatioShift { get; set; }
public byte? GasProducerRatioShift { get; set; }
public string? DataEscrowPerRow { get; set; }
public string? DataTokenId { get; set; }
public string? FeeMultiplier { get; set; }
public string? GasBurnRatioMul { get; set; }
public string? GasDappRatioMul { get; set; }
public string? GasFeeCreateTokenBase { get; set; }
public string? GasFeeCreateTokenSeries { get; set; }
public string? GasFeeCreateTokenSymbol { get; set; }
public string? GasFeePerByte { get; set; }
public string? GasFeeQuery { get; set; }
public string? GasFeeRegisterName { get; set; }
public string? GasFeeTransfer { get; set; }
public string? GasProducerRatioMul { get; set; }
public string? GasTokenId { get; set; }
public string? LegacyDataEscrowPerRow { get; set; }
public string? MinimumGasBill { get; set; }
public string? MinimumGasOffer { get; set; }
public string? PolicyFeeCreateTokenBase { get; set; }
public string? PolicyFeeCreateTokenSeries { get; set; }
public string? PolicyFeeCreateTokenSymbol { get; set; }
public string? PolicyFeeRegisterName { get; set; }
public uint MaxStructureSize { get; set; }

PhantasmaPhoenix.RPC.Models.GovernanceResult

Source: PhantasmaPhoenix.RPC/src/Models/GovernanceResult.cs

Declarations

public class GovernanceResult

Methods

public GovernanceResult() { }
public string? Name { get; set; }
public string? Value { get; set; }

PhantasmaPhoenix.RPC.Models.LeaderboardResult

Source: PhantasmaPhoenix.RPC/src/Models/LeaderboardResult.cs

Declarations

public class LeaderboardResult

Methods

public LeaderboardResult() { }
public LeaderboardRowResult[]? Rows { get; set; }
public string? Name { get; set; }

PhantasmaPhoenix.RPC.Models.LeaderboardRowResult

Source: PhantasmaPhoenix.RPC/src/Models/LeaderboardRowResult.cs

Declarations

public class LeaderboardRowResult

Methods

public LeaderboardRowResult() { }
public string? Address { get; set; }
public string? Value { get; set; }

PhantasmaPhoenix.RPC.Models.NexusResult

Source: PhantasmaPhoenix.RPC/src/Models/NexusResult.cs

Declarations

public class NexusResult

Methods

public ChainResult[]? Chains { get; set; }
public GovernanceResult[]? Governance { get; set; }
public NexusResult() { }
public TokenResult[]? Tokens { get; set; }
public string? Name { get; set; }
public string[]? Organizations { get; set; }
public uint Protocol { get; set; }

PhantasmaPhoenix.RPC.Models.OracleResult

Source: PhantasmaPhoenix.RPC/src/Models/OracleResult.cs

Declarations

public class OracleResult

Methods

public OracleResult() { }
public string Content { get; set; } = "";
public string Url { get; set; } = "";

PhantasmaPhoenix.RPC.Models.OrganizationMemberResult

Source: PhantasmaPhoenix.RPC/src/Models/OrganizationMemberResult.cs

Declarations

public class OrganizationMemberResult

Methods

public OrganizationMemberResult() { }
public bool IsMember { get; set; } = true;
public long? MemberTime { get; set; }
public string Address { get; set; } = string.Empty;
public string CarbonAddress { get; set; } = string.Empty;

PhantasmaPhoenix.RPC.Models.OrganizationResult

Source: PhantasmaPhoenix.RPC/src/Models/OrganizationResult.cs

Declarations

public class OrganizationResult

Methods

public OrganizationResult() { }
public TokenPropertyResult[] Metadata { get; set; } = Array.Empty<TokenPropertyResult>();
public string CarbonOwner { get; set; } = string.Empty;
public string Name { get; set; } = string.Empty;
public string Owner { get; set; } = string.Empty;
public string? MemberCount { get; set; }

PhantasmaPhoenix.RPC.Models.ScriptResult

Source: PhantasmaPhoenix.RPC/src/Models/ScriptResult.cs

Declarations

public class ScriptResult

Methods

public EventResult[] Events { get; set; } = Array.Empty<EventResult>();
public OracleResult[] Oracles { get; set; } = Array.Empty<OracleResult>();
public ScriptResult() { }
public string? Error { get; set; }
public string? Gas { get; set; }
public string? Result { get; set; }
public string? State { get; set; }
public string[] Results { get; set; } = Array.Empty<string>();

PhantasmaPhoenix.RPC.Models.StakeResult

Source: PhantasmaPhoenix.RPC/src/Models/StakeResult.cs

Declarations

public class StakeResult

Methods

public StakeResult() { }
public string Amount { get; set; } = "";
public string Unclaimed { get; set; } = "";
public uint Time { get; set; }

PhantasmaPhoenix.RPC.Models.StorageResult

Source: PhantasmaPhoenix.RPC/src/Models/StorageResult.cs

Declarations

public class StorageResult

Methods

public ArchiveResult[] Archives { get; set; } = Array.Empty<ArchiveResult>();
public StorageResult() { }
public string Avatar { get; set; } = "";
public uint Available { get; set; }
public uint Used { get; set; }

PhantasmaPhoenix.RPC.Models.TokenDataResult

Source: PhantasmaPhoenix.RPC/src/Models/TokenDataResult.cs

Declarations

public class TokenDataResult

Methods

public TokenDataResult() { }
public TokenPropertyResult[] Infusion { get; set; } = Array.Empty<TokenPropertyResult>();
public TokenPropertyResult[] Properties { get; set; } = Array.Empty<TokenPropertyResult>();
public TokenStatus Status { get; set; }
public string ChainName { get; set; } = string.Empty;
public string CreatorAddress { get; set; } = string.Empty;
public string Id { get; set; } = string.Empty;
public string Mint { get; set; } = string.Empty;
public string OwnerAddress { get; set; } = string.Empty;
public string Ram { get; set; } = string.Empty;
public string Rom { get; set; } = string.Empty;
public string Series { get; set; } = string.Empty;
public string carbonNftAddress { get; set; } = string.Empty;
public string carbonSeriesId { get; set; } = string.Empty;
public string carbonTokenId { get; set; } = string.Empty;

PhantasmaPhoenix.RPC.Models.TokenExternalResult

Source: PhantasmaPhoenix.RPC/src/Models/TokenExternalResult.cs

Declarations

public class TokenExternalResult

Methods

public TokenExternalResult() { }
public string Hash { get; set; } = string.Empty;
public string Platform { get; set; } = string.Empty;

PhantasmaPhoenix.RPC.Models.TokenPriceResult

Source: PhantasmaPhoenix.RPC/src/Models/TokenPriceResult.cs

Declarations

public class TokenPriceResult

Methods

public TokenPriceResult() { }
public string Close { get; set; } = string.Empty;
public string High { get; set; } = string.Empty;
public string Low { get; set; } = string.Empty;
public string Open { get; set; } = string.Empty;
public uint Timestamp { get; set; }

PhantasmaPhoenix.RPC.Models.TokenPropertyResult

Source: PhantasmaPhoenix.RPC/src/Models/TokenPropertyResult.cs

Declarations

public class TokenPropertyResult

Methods

public TokenPropertyResult() { }
public VmValue? Value { get; set; }
public string Key { get; set; } = string.Empty;

PhantasmaPhoenix.RPC.Models.TokenResult

Source: PhantasmaPhoenix.RPC/src/Models/TokenResult.cs

Declarations

public class TokenResult

Methods

public TokenExternalResult[]? External { get; set; }
public TokenPriceResult[]? Price { get; set; }
public TokenPropertyResult[]? Metadata { get; set; }
public TokenResult() { }
public TokenSchemasResult? TokenSchemas { get; set; }
public TokenSeriesResult[] Series { get; set; } = Array.Empty<TokenSeriesResult>();
public bool IsBurnable()
public bool IsFungible()
public bool IsTransferable()
public string Address { get; set; } = string.Empty;
public string BurnedSupply { get; set; } = string.Empty;
public string CarbonId { get; set; } = string.Empty;
public string CurrentSupply { get; set; } = string.Empty;
public string Flags { get; set; } = string.Empty;
public string MaxSupply { get; set; } = string.Empty;
public string Name { get; set; } = string.Empty;
public string Owner { get; set; } = string.Empty;
public string Symbol { get; set; } = string.Empty;
public string? Script { get; set; }
public uint Decimals { get; set; }

PhantasmaPhoenix.RPC.Models.TokenSchemasResult

Source: PhantasmaPhoenix.RPC/src/Models/TokenSchemasResult.cs

Declarations

public class TokenSchemasResult

Methods

public TokenSchemasResult() { }
public VmStructSchemaResult Ram { get; set; } = new();
public VmStructSchemaResult Rom { get; set; } = new();
public VmStructSchemaResult SeriesMetadata { get; set; } = new();

PhantasmaPhoenix.RPC.Models.TokenSeriesResult

Source: PhantasmaPhoenix.RPC/src/Models/TokenSeriesResult.cs

Declarations

public class TokenSeriesResult

Methods

public ABIMethodResult[]? Methods { get; set; }
public TokenPropertyResult[] Metadata { get; set; } = Array.Empty<TokenPropertyResult>();
public TokenSeriesResult() { }
public string CurrentSupply { get; set; } = "";
public string MaxMint { get; set; } = "";
public string MaxSupply { get; set; } = "";
public string MintCount { get; set; } = "";
public string OwnerAddress { get; set; } = "";
public string SeriesId { get; set; } = "";
public string carbonSeriesId { get; set; } = "";
public string carbonTokenId { get; set; } = "";
public string? BurnedSupply { get; set; }
public string? Mode { get; set; }
public string? Script { get; set; }

PhantasmaPhoenix.RPC.Models.TransactionResult

Source: PhantasmaPhoenix.RPC/src/Models/TransactionResult.cs

Declarations

public class TransactionResult

Methods

public EventExResult[]? ExtendedEvents { get; set; }
public EventResult[]? Events { get; set; }
public ExecutionState State { get; set; }
public HexBytes? CarbonTxData { get; set; }
public TransactionResult() { }
public TransactionSignatureResult[]? Signatures { get; set; }
public UInt64 BlockHeight { get; set; }
public UInt64 Expiration { get; set; }
public UInt64 Timestamp { get; set; }
public byte CarbonTxType { get; set; }
public string GasPrice { get; set; } = "";
public string GasTarget { get; set; } = "NULL";
public string Hash { get; set; } = "";
public string Sender { get; set; } = Address.Null.Text; // Initialized as in original Phantasma code.
public string? BlockHash { get; set; }
public string? ChainAddress { get; set; }
public string? DebugComment { get; set; }
public string? Fee { get; set; }
public string? GasLimit { get; set; }
public string? GasPayer { get; set; }
public string? Payload { get; set; }
public string? Result { get; set; }
public string? Script { get; set; }

PhantasmaPhoenix.RPC.Models.TransactionSignatureResult

Source: PhantasmaPhoenix.RPC/src/Models/TransactionSignatureResult.cs

Declarations

public class TransactionSignatureResult

Methods

public TransactionSignatureResult() { }
public string Data { get; set; } = string.Empty;
public string Kind { get; set; } = string.Empty;

PhantasmaPhoenix.RPC.Models.VmNamedVariableSchemaResult

Source: PhantasmaPhoenix.RPC/src/Models/VmNamedVariableSchemaResult.cs

Declarations

public class VmNamedVariableSchemaResult

Methods

public VmNamedVariableSchemaResult() { }
public VmVariableSchemaResult Schema { get; set; } = new();
public string Name { get; set; } = "";

PhantasmaPhoenix.RPC.Models.VmStructSchemaResult

Source: PhantasmaPhoenix.RPC/src/Models/VmStructSchemaResult.cs

Declarations

public class VmStructSchemaResult

Methods

public VmNamedVariableSchemaResult[] Fields { get; set; } = Array.Empty<VmNamedVariableSchemaResult>();
public VmStructSchemaResult() { }
public uint Flags { get; set; }

PhantasmaPhoenix.RPC.Models.VmVariableSchemaResult

Source: PhantasmaPhoenix.RPC/src/Models/VmVariableSchemaResult.cs

Declarations

public class VmVariableSchemaResult

Methods

public VmStructSchemaResult? Schema { get; set; }
public VmType Type { get; set; }
public VmVariableSchemaResult() { }

PhantasmaPhoenix.RPC.SendTransactionOptions

Source: PhantasmaPhoenix.RPC/src/PhantasmaAPI.cs

Declarations

public sealed class SendTransactionOptions : PlanRequestOptions

Methods

public bool Preflight { get; set; } = true;

PhantasmaPhoenix.RPC.PhantasmaAPI

Source: PhantasmaPhoenix.RPC/src/PhantasmaAPI.cs

Declarations

public class PhantasmaAPI : IDisposable, IGasConfigSource, IPreflightSource, IInfusionSource

Methods

public ChainFeePlanner Fees => _fees ??= new ChainFeePlanner(this);
public PhantasmaAPI(string host, RpcClient? rpcClient = null, string? apiKey = null)
public Task<AccountInfoResult?> GetAccountInfoAsync( string account, bool checkAddressReservedByte, RpcAddressType addressType) => _rpc.SendRpcAsync<AccountInfoResult>(Host, "getAccountInfo", account, checkAddressReservedByte, addressType);
public Task<AccountInfoResult?> GetAccountInfoAsync(string account) => _rpc.SendRpcAsync<AccountInfoResult>(Host, "getAccountInfo", account);
public Task<AccountInfoResult[]?> GetAccountInfosAsync( string[] accounts, bool checkAddressReservedByte, RpcAddressType addressType) => _rpc.SendRpcAsync<AccountInfoResult[]>(Host, "getAccountInfos", accounts ?? Array.Empty<string>(), checkAddressReservedByte, addressType);
public Task<AccountInfoResult[]?> GetAccountInfosAsync(string[] accounts) => _rpc.SendRpcAsync<AccountInfoResult[]>(Host, "getAccountInfos", new object[] { accounts ?? Array.Empty<string>() });
public Task<AccountResult?> GetAccountAsync( string address, bool extended, bool checkAddressReservedByte, RpcAddressType addressType) => _rpc.SendRpcAsync<AccountResult>(Host, "getAccount", address, extended, checkAddressReservedByte, addressType);
public Task<AccountResult?> GetAccountAsync(string address) => _rpc.SendRpcAsync<AccountResult>(Host, "getAccount", address);
public Task<AccountResult[]?> GetAccountsAsync( string[] addresses, bool extended, bool checkAddressReservedByte, RpcAddressType addressType) => _rpc.SendRpcAsync<AccountResult[]>( Host, "getAccounts", string.Join(",", addresses ?? Array.Empty<string>()), extended, checkAddressReservedByte, addressType);
public Task<AccountResult[]?> GetAccountsAsync(string[] addresses) => _rpc.SendRpcAsync<AccountResult[]>(Host, "getAccounts", string.Join(",", addresses ?? Array.Empty<string>()));
public Task<ArchiveResult?> GetArchiveAsync(string hash) => _rpc.SendRpcAsync<ArchiveResult>(Host, "getArchive", hash);
public Task<AuctionResult?> GetAuctionAsync(string chainAddressOrName, string symbol, string id) => _rpc.SendRpcAsync<AuctionResult>(Host, "getAuction", chainAddressOrName, symbol, id);
public Task<BalanceResult?> GetTokenBalanceAsync( string address, string symbol, string chain, bool checkAddressReservedByte, RpcAddressType addressType) => _rpc.SendRpcAsync<BalanceResult>(Host, "getTokenBalance", address, symbol, chain, checkAddressReservedByte, addressType);
public Task<BalanceResult?> GetTokenBalanceAsync(string address, string symbol, string chain = "main") => _rpc.SendRpcAsync<BalanceResult>(Host, "getTokenBalance", address, symbol, chain);
public Task<BlockResult?> GetBlockByHashAsync(string blockHash) => _rpc.SendRpcAsync<BlockResult>(Host, "getBlockByHash", blockHash);
public Task<BlockResult?> GetBlockByHeightAsync(string chain, long height) => _rpc.SendRpcAsync<BlockResult>(Host, "getBlockByHeight", chain, height.ToString());
public Task<BlockResult?> GetLatestBlockAsync(string chain) => _rpc.SendRpcAsync<BlockResult>(Host, "getLatestBlock", chain);
public Task<ChainResult?> GetChainAsync(string name = "main", bool extended = true) => _rpc.SendRpcAsync<ChainResult>(Host, "getChain", name, extended);
public Task<ChainResult[]?> GetChainsAsync() => _rpc.SendRpcAsync<ChainResult[]>(Host, "getChains");
public Task<ContractResult?> GetContractAsync(string contractName) => _rpc.SendRpcAsync<ContractResult>(Host, "getContract", PhantasmaPhoenix.Protocol.DomainSettings.RootChainName, contractName);
public Task<ContractResult?> GetContractByAddressAsync(string chainAddressOrName, string contractAddress) => _rpc.SendRpcAsync<ContractResult>(Host, "getContractByAddress", chainAddressOrName, contractAddress);
public Task<ContractResult[]?> GetContractsAsync() => _rpc.SendRpcAsync<ContractResult[]>(Host, "getContracts", PhantasmaPhoenix.Protocol.DomainSettings.RootChainName);
public Task<CursorPaginatedResult<BalanceResult[]>?> GetAccountFungibleTokensAsync( string account, string tokenSymbol = "", ulong carbonTokenId = 0, uint pageSize = 10, string cursor = "", bool checkAddressReservedByte = true) => _rpc.SendRpcAsync<CursorPaginatedResult<BalanceResult[]>>( Host, "getAccountFungibleTokens", account, tokenSymbol, carbonTokenId, pageSize, cursor, checkAddressReservedByte);
public Task<CursorPaginatedResult<BalanceResult[]>?> GetAccountFungibleTokensAsync( string account, string tokenSymbol, ulong carbonTokenId, uint pageSize, string cursor, bool checkAddressReservedByte, RpcAddressType addressType) => _rpc.SendRpcAsync<CursorPaginatedResult<BalanceResult[]>>( Host, "getAccountFungibleTokens", account, tokenSymbol, carbonTokenId, pageSize, cursor, checkAddressReservedByte, addressType);
public Task<CursorPaginatedResult<OrganizationMemberResult[]>?> GetOrganizationMembersAsync( string name, uint pageSize = 10, string cursor = "", bool includeMemberTime = true) => _rpc.SendRpcAsync<CursorPaginatedResult<OrganizationMemberResult[]>>( Host, "getOrganizationMembers", name, pageSize, cursor, includeMemberTime);
public Task<CursorPaginatedResult<OrganizationResult[]>?> GetOrganizationsAsync( uint pageSize = 10, string cursor = "", bool includeMemberCount = false) => _rpc.SendRpcAsync<CursorPaginatedResult<OrganizationResult[]>>( Host, "getOrganizations", pageSize, cursor, includeMemberCount);
public Task<CursorPaginatedResult<TokenDataResult[]>?> GetAccountNFTsAsync( string account, string tokenSymbol = "", ulong carbonTokenId = 0, uint carbonSeriesId = 0, uint pageSize = 10, string cursor = "", bool extended = false, bool checkAddressReservedByte = true) => _rpc.SendRpcAsync<CursorPaginatedResult<TokenDataResult[]>>( Host, "getAccountNFTs", account, tokenSymbol, carbonTokenId, carbonSeriesId, pageSize, cursor, extended, checkAddressReservedByte);
public Task<CursorPaginatedResult<TokenDataResult[]>?> GetAccountNFTsAsync( string account, string tokenSymbol, ulong carbonTokenId, uint carbonSeriesId, uint pageSize, string cursor, bool extended, bool checkAddressReservedByte, RpcAddressType addressType) => _rpc.SendRpcAsync<CursorPaginatedResult<TokenDataResult[]>>( Host, "getAccountNFTs", account, tokenSymbol, carbonTokenId, carbonSeriesId, pageSize, cursor, extended, checkAddressReservedByte, addressType);
public Task<CursorPaginatedResult<TokenDataResult[]>?> GetTokenNFTsAsync( ulong carbonTokenId, uint carbonSeriesId = 0, uint pageSize = 10, string cursor = "", bool extended = false, string seriesId = "") => _rpc.SendRpcAsync<CursorPaginatedResult<TokenDataResult[]>>( Host, "getTokenNFTs", carbonTokenId, carbonSeriesId, pageSize, cursor, extended, seriesId);
public Task<CursorPaginatedResult<TokenResult[]>?> GetAccountOwnedTokensAsync( string account, string tokenSymbol = "", ulong carbonTokenId = 0, uint pageSize = 10, string cursor = "", bool checkAddressReservedByte = true) => _rpc.SendRpcAsync<CursorPaginatedResult<TokenResult[]>>( Host, "getAccountOwnedTokens", account, tokenSymbol, carbonTokenId, pageSize, cursor, checkAddressReservedByte);
public Task<CursorPaginatedResult<TokenResult[]>?> GetAccountOwnedTokensAsync( string account, string tokenSymbol, ulong carbonTokenId, uint pageSize, string cursor, bool checkAddressReservedByte, RpcAddressType addressType) => _rpc.SendRpcAsync<CursorPaginatedResult<TokenResult[]>>( Host, "getAccountOwnedTokens", account, tokenSymbol, carbonTokenId, pageSize, cursor, checkAddressReservedByte, addressType);
public Task<CursorPaginatedResult<TokenSeriesResult[]>?> GetAccountOwnedTokenSeriesAsync( string account, string tokenSymbol = "", ulong carbonTokenId = 0, uint pageSize = 10, string cursor = "", bool checkAddressReservedByte = true) => _rpc.SendRpcAsync<CursorPaginatedResult<TokenSeriesResult[]>>( Host, "getAccountOwnedTokenSeries", account, tokenSymbol, carbonTokenId, pageSize, cursor, checkAddressReservedByte);
public Task<CursorPaginatedResult<TokenSeriesResult[]>?> GetAccountOwnedTokenSeriesAsync( string account, string tokenSymbol, ulong carbonTokenId, uint pageSize, string cursor, bool checkAddressReservedByte, RpcAddressType addressType) => _rpc.SendRpcAsync<CursorPaginatedResult<TokenSeriesResult[]>>( Host, "getAccountOwnedTokenSeries", account, tokenSymbol, carbonTokenId, pageSize, cursor, checkAddressReservedByte, addressType);
public Task<CursorPaginatedResult<TokenSeriesResult[]>?> GetTokenSeriesAsync( string symbol = "", ulong carbonTokenId = 0, uint pageSize = 10, string cursor = "") => _rpc.SendRpcAsync<CursorPaginatedResult<TokenSeriesResult[]>>( Host, "getTokenSeries", symbol, carbonTokenId, pageSize, cursor);
public Task<EstimateTransactionResult?> EstimateTransactionAsync(string txData) => _rpc.SendRpcAsync<EstimateTransactionResult>(Host, "estimateTransaction", txData);
public Task<GasConfigResult?> GetGasConfigAsync() => _rpc.SendRpcAsync<GasConfigResult>(Host, "getGasConfig");
public Task<LeaderboardResult?> GetLeaderboardAsync(string name) => _rpc.SendRpcAsync<LeaderboardResult>(Host, "getLeaderboard", name);
public Task<NexusResult?> GetNexusAsync() => _rpc.SendRpcAsync<NexusResult>(Host, "getNexus");
public Task<OrganizationMemberResult?> GetOrganizationMemberAsync( string name, string address, bool checkAddressReservedByte = true, RpcAddressType addressType = RpcAddressType.Phantasma) => _rpc.SendRpcAsync<OrganizationMemberResult>( Host, "getOrganizationMember", name, address, checkAddressReservedByte, addressType);
public Task<OrganizationResult?> GetOrganizationAsync(string name, bool includeMemberCount = false) => _rpc.SendRpcAsync<OrganizationResult>(Host, "getOrganization", name, includeMemberCount);
public Task<ScriptResult?> InvokeRawScriptAsync(string chain, string scriptData) => _rpc.SendRpcAsync<ScriptResult>(Host, "invokeRawScript", chain, scriptData);
public Task<TokenDataResult?> GetNFTAsync(string symbol, string tokenId, bool loadProperties) => _rpc.SendRpcAsync<TokenDataResult>(Host, "getNFT", symbol, tokenId, loadProperties);
public Task<TokenDataResult?> GetTokenDataAsync(string symbol, string tokenId) => _rpc.SendRpcAsync<TokenDataResult>(Host, "getTokenData", symbol, tokenId);
public Task<TokenDataResult[]?> GetNFTsAsync(string symbol, IEnumerable<string> tokenIds, bool extended = false) => _rpc.SendRpcAsync<TokenDataResult[]>(Host, "getNFTs", symbol, string.Join(",", tokenIds), extended);
public Task<TokenResult?> GetTokenAsync(string symbol) => _rpc.SendRpcAsync<TokenResult>(Host, "getToken", symbol);
public Task<TokenResult?> GetTokenAsync(string symbol, bool extended, ulong carbonTokenId) => _rpc.SendRpcAsync<TokenResult>(Host, "getToken", symbol, extended, carbonTokenId);
public Task<TokenResult[]?> GetTokensAsync() => _rpc.SendRpcAsync<TokenResult[]>(Host, "getTokens");
public Task<TokenResult[]?> GetTokensAsync(bool extended, string? ownerAddress = null) => _rpc.SendRpcAsync<TokenResult[]>(Host, "getTokens", extended, ownerAddress);
public Task<TokenResult[]?> GetTokensAsync(bool extended, string? ownerAddress, RpcAddressType addressType) => _rpc.SendRpcAsync<TokenResult[]>(Host, "getTokens", extended, ownerAddress, addressType);
public Task<TokenSeriesResult?> GetTokenSeriesByIdAsync( string symbol = "", ulong carbonTokenId = 0, string seriesId = "", uint carbonSeriesId = 0) => _rpc.SendRpcAsync<TokenSeriesResult>( Host, "getTokenSeriesById", symbol, carbonTokenId, seriesId, carbonSeriesId);
public Task<TransactionResult?> GetTransactionAsync(string txHash) => _rpc.SendRpcAsync<TransactionResult>(Host, "getTransaction", txHash);
public Task<TransactionResult?> GetTransactionByBlockHashAndIndexAsync( string chainAddressOrName, string blockHash, int index) => _rpc.SendRpcAsync<TransactionResult>( Host, "getTransactionByBlockHashAndIndex", chainAddressOrName, blockHash, index);
public Task<string> SendTransactionAsync(TxMsg msg, IKeyPair keys, SendTransactionOptions? options = null, CancellationToken cancellationToken = default) => SendTransactionAsync(msg, new ITxSigner[] { new KeyPairSigner(keys ?? throw new ArgumentNullException(nameof(keys))) }, options, cancellationToken);
public Task<string> SendTransactionAsync(TxMsg msg, IKeyPair[] keys, SendTransactionOptions? options = null, CancellationToken cancellationToken = default)
public Task<string> SendTransactionAsync(TxMsg msg, ITxSigner signer, SendTransactionOptions? options = null, CancellationToken cancellationToken = default) => SendTransactionAsync(msg, new[] { signer ?? throw new ArgumentNullException(nameof(signer)) }, options, cancellationToken);
public Task<string?> LookUpNameAsync(string name) => _rpc.SendRpcAsync<string>(Host, "lookUpName", name);
public Task<string?> ReadArchiveAsync(string hash, int blockIndex) => _rpc.SendRpcAsync<string>(Host, "readArchive", hash, blockIndex);
public Task<string?> SendCarbonTransactionAsync(string txData) => _rpc.SendRpcAsync<string>(Host, "sendCarbonTransaction", txData);
public Task<string?> SendRawTransactionAsync(string txData) => _rpc.SendRpcAsync<string>(Host, "sendRawTransaction", txData);
public async Task<(AccountTransactionsResult? result, uint page, uint totalPages)> GetAddressTransactionsAsync(string address, uint page, uint pageSize)
public async Task<(AuctionResult[]? result, uint page, uint total, uint totalPages)> GetAuctionsAsync(string chainAddressOrName, string symbol, uint page, uint pageSize)
public async Task<IReadOnlyList<InfusedAsset>> InfusedAssetsAsync(ulong tokenId, ulong instanceId)
public async Task<bool> WriteArchiveAsync(string hash, int blockIndex, byte[] blockContent)
public async Task<int> GetAddressTransactionCountAsync(string address, string chain)
public async Task<int> GetAuctionsCountAsync(string chainAddressOrName, string symbol)
public async Task<int> GetBlockTransactionCountByHashAsync(string chainAddressOrName, string blockHash)
public async Task<long> GetBlockHeightAsync(string chain)
public async Task<string> SendTransactionAsync(TxMsg msg, IReadOnlyList<ITxSigner> signers, SendTransactionOptions? options = null, CancellationToken cancellationToken = default)
public async Task<string?> SignAndSendTransactionAsync( IKeyPair keys, string nexus, byte[] script, string chain, byte[] payload, Func<byte[], byte[], byte[], byte[]>? customSignFunction = null, Timestamp? expiration = null)
public async Task<string?> SignAndSendTransactionAsync( IKeyPair keys, string nexus, byte[] script, string chain, string payload, Func<byte[], byte[], byte[], byte[]>? customSignFunction = null, Timestamp? expiration = null)
public async Task<ulong?> ControlTokenIdAsync()
public static bool IsValidPrivateKey(string key)
public string Host { get; }
public void Dispose()

PhantasmaPhoenix.RPC.RpcClient

Source: PhantasmaPhoenix.RPC/src/RpcClient.cs

Declarations

public sealed class RpcClient : IDisposable

Methods

public RpcClient(HttpClient? httpClient = null, ILogger? logger = null, int maxRetries = 0, int retryDelayMs = 1000, long maxResponseBytes = DefaultMaxResponseBytes, string? apiKey = null)
public async Task<T?> RestGetAsync<T>(string url)
public async Task<T?> RestPostAsync<T>(string url, object body)
public async Task<T?> SendRpcAsync<T>(string url, string method, params object[] parameters)
public const long DefaultMaxResponseBytes = 16L * 1024 * 1024;
public const string ApiKeyHeaderName = "X-Api-Key";
public void Dispose()

PhantasmaPhoenix.RPC.TransactionPreflightException

Source: PhantasmaPhoenix.RPC/src/TransactionPreflight.cs

Declarations

public class TransactionPreflightException : Exception

Methods

public TransactionPreflightException(string message) : base(message) { }

PhantasmaPhoenix.RPC.IPreflightSource

Source: PhantasmaPhoenix.RPC/src/TransactionPreflight.cs

Declarations

public interface IPreflightSource

PhantasmaPhoenix.RPC.PreflightVerdict

Source: PhantasmaPhoenix.RPC/src/TransactionPreflight.cs

Declarations

public enum PreflightVerdict

Variants

  • Free
  • NotApplicable
  • Taken
  • Unknown

PhantasmaPhoenix.RPC.PreflightResult

Source: PhantasmaPhoenix.RPC/src/TransactionPreflight.cs

Declarations

public sealed class PreflightResult

Methods

public PreflightResult(PreflightVerdict verdict, string? subject = null, string? reason = null)
public PreflightVerdict Verdict { get; }
public string? Reason { get; }
public string? Subject { get; }

PhantasmaPhoenix.RPC.TransactionPreflight

Source: PhantasmaPhoenix.RPC/src/TransactionPreflight.cs

Declarations

public static class TransactionPreflight

Methods

public LookUp(bool ok, string? reason) { Ok = ok; Reason = reason; }
public readonly bool Ok;
public readonly string? Reason;
public static async Task<PreflightResult> PreflightAsync(IPreflightSource source, TxMsg msg)

PhantasmaPhoenix.RPC.Types.CursorPaginatedResult

Source: PhantasmaPhoenix.RPC/src/Types/CursorPaginatedResult.cs

Declarations

public class CursorPaginatedResult<T>

Methods

public CursorPaginatedResult(T? result, string? cursor)
public T? Result { get; set; }
public string? Cursor { get; set; }

PhantasmaPhoenix.RPC.Types.PaginatedResult

Source: PhantasmaPhoenix.RPC/src/Types/PaginatedResult.cs

Declarations

public class PaginatedResult<T>

Methods

public T? Result { get; set; }
public uint Page { get; set; }
public uint PageSize { get; set; }
public uint Total { get; set; }
public uint TotalPages { get; set; }

PhantasmaPhoenix.RPC.Types.RpcAddressType

Source: PhantasmaPhoenix.RPC/src/Types/RpcAddressType.cs

Declarations

public enum RpcAddressType

Variants

  • Carbon
  • Phantasma

PhantasmaPhoenix.RPC.Types.RpcError

Source: PhantasmaPhoenix.RPC/src/Types/RpcError.cs

Declarations

public class RpcError

Methods

public RpcError()
public RpcError(RpcErrorDescription rpcErrorDescription)
public RpcError(RpcErrorDescription rpcErrorDescription, string additionalErrorInfo)
public RpcError(int code, string message)
public int Code { get; set; }
public string Message { get; set; }

PhantasmaPhoenix.RPC.Types.RpcErrorDescription

Source: PhantasmaPhoenix.RPC/src/Types/RpcError.cs

Declarations

public class RpcErrorDescription

Methods

public HttpStatusCode HttpCode { get; set; }
public RpcErrorDescription(int code, string message, HttpStatusCode httpCode)
public int Code { get; set; }
public string Message { get; set; }

PhantasmaPhoenix.RPC.Types.RpcErrors

Source: PhantasmaPhoenix.RPC/src/Types/RpcError.cs

Declarations

public static class RpcErrors

Methods

public const int RPC_ERROR_IMPLEMENTATION = -32000;
public const int RPC_ERROR_INTERNAL = -32603;
public const int RPC_ERROR_INVALID = -32600;
public const int RPC_ERROR_METHOD = -32601;
public const int RPC_ERROR_PARAMS = -32602;
public const int RPC_ERROR_PARSE = -32700;
public static Dictionary<int, RpcErrorDescription> errors = new()
public static RpcErrorDescription GetDescription(int code)

PhantasmaPhoenix.RPC.Types.RpcId

Source: PhantasmaPhoenix.RPC/src/Types/RpcId.cs

Declarations

public sealed class RpcId : IEquatable<RpcId>

Methods

public JToken Value => _value.DeepClone();
public RpcId(int value) : this((long)value)
public RpcId(long value)
public RpcId(string value)
public bool Equals(RpcId? other)
public override bool Equals(object? obj)
public override int GetHashCode()
public override string ToString()
public static RpcId FromJsonToken(JToken value)
public static implicit operator RpcId(int value)
public static implicit operator RpcId(long value)
public static implicit operator RpcId(string value)

PhantasmaPhoenix.RPC.Types.RpcRequest

Source: PhantasmaPhoenix.RPC/src/Types/RpcRequest.cs

Declarations

public struct RpcRequest

Methods

public RpcId? id { get; set; }
public object[] @params { get; set; }
public override string ToString()
public string jsonrpc { get; set; }
public string method { get; set; }

PhantasmaPhoenix.RPC.Types.RpcResponse

Source: PhantasmaPhoenix.RPC/src/Types/RpcResponse.cs

Declarations

public class RpcResponse

Methods

public RpcError? Error { get; set; }
public RpcId? id { get; set; }
public RpcResponse()
public RpcResponse(RpcId? id, object? result, RpcError? error)
public object? Result { get; set; }
public string jsonrpc { get; set; } = "2.0";

PhantasmaPhoenix.VM.ExecutionContext

Source: PhantasmaPhoenix.VM/src/Data/ExecutionContext.cs

Declarations

public abstract class ExecutionContext

Methods

public Address Address
public abstract ExecutionState Execute(ExecutionFrame frame, Stack<VMObject> stack);
public abstract string Name { get; }
public override string ToString()

PhantasmaPhoenix.VM.ExecutionFrame

Source: PhantasmaPhoenix.VM/src/Data/ExecutionFrame.cs

Declarations

public class ExecutionFrame

Methods

public ExecutionContext Context { get; }
public ExecutionFrame(IVirtualMachine vm, uint offset, ExecutionContext context, int registerCount)
public IVirtualMachine VM { get; }
public VMObject GetRegister(int index)
public VMObject[] Registers { get; }
public uint Offset { get; }

PhantasmaPhoenix.VM.IVirtualMachine

Source: PhantasmaPhoenix.VM/src/Data/IVirtualMachine.cs

Declarations

public interface IVirtualMachine

Methods

public Address EntryAddress { get; set; }
public ExecutionContext CurrentContext { get; set; }
public ExecutionContext FindContext(string contextName);
public ExecutionContext PreviousContext { get; set; }
public ExecutionFrame CurrentFrame { get; set; }
public ExecutionFrame PeekFrame();
public ExecutionState Execute();
public ExecutionState ExecuteInterop(string method);
public ExecutionState SwitchContext(ExecutionContext context, uint instructionPointer);
public ExecutionState ValidateOpcode(Opcode opcode);
public Stack<ExecutionFrame> Frames { get; }
public Stack<VMObject> Stack { get; }
public abstract ExecutionContext LoadContext(string contextName);
public byte[] EntryScript { get; }
public string GetDumpFileName();
public uint PopFrame();
public void DumpData(List<string> lines);
public void Expect(bool condition, string description);
public void PushFrame(ExecutionContext context, uint instructionPointer, int registerCount);
public void RegisterContext(string contextName, ExecutionContext context);
public void SetCurrentContext(ExecutionContext context);

PhantasmaPhoenix.VM.VMType

Source: PhantasmaPhoenix.VM/src/Data/VMObject.cs

Declarations

public enum VMType

Variants

  • Bool
  • Bytes
  • Enum
  • None
  • Number
  • Object
  • String
  • Struct
  • Timestamp

PhantasmaPhoenix.VM.VMObject

Source: PhantasmaPhoenix.VM/src/Data/VMObject.cs

Declarations

public sealed class VMObject : ISerializable

Methods

public Address AsAddress()
public BigInteger AsNumber()
public Dictionary<VMObject, VMObject> GetChildren() => this.Type == VMType.Struct ? (Dictionary<VMObject, VMObject>)Data : null;
public T AsEnum<T>() where T : struct, IConvertible
public T AsInterop<T>()
public T AsStruct<T>()
public T ToStruct<T>()
public T[] ToArray<T>()
public Timestamp AsTimestamp()
public VMObject GetKey(VMObject key)
public VMObject SetDefaultValue(VMType type)
public VMObject SetValue(Address address)
public VMObject SetValue(BigInteger val)
public VMObject SetValue(DateTime val)
public VMObject SetValue(Dictionary<VMObject, VMObject> children)
public VMObject SetValue(Enum val)
public VMObject SetValue(Hash hash)
public VMObject SetValue(Timestamp val)
public VMObject SetValue(bool val)
public VMObject SetValue(byte[] val)
public VMObject SetValue(byte[] val, VMType type)
public VMObject SetValue(object val)
public VMObject SetValue(string val)
public VMObject()
public VMObject[] AsArray(VMType type)
public VMType GetArrayType()
public VMType Type { get; private set; }
public bool AsBool()
public bool IsEmpty => Data == null;
public byte[] AsByteArray()
public int Size
public object AsType(VMType type)
public object Data { get; private set; }
public object ToArray(Type arrayElementType)
public object ToObject()
public object ToObject(Type type)
public object ToStruct(Type structType)
public override bool Equals(object obj)
public override int GetHashCode()
public override string ToString()
public static VMObject CastTo(VMObject srcObj, VMType type)
public static VMObject FromArray(Array array)
public static VMObject FromBytes(byte[] bytes)
public static VMObject FromObject(object obj)
public static VMObject FromStruct(object obj)
public static VMType GetVMType(Type type)
public static bool IsVMType(Type type)
public string AsString()
public void Copy(VMObject other)
public void SerializeData(BinaryWriter writer)
public void SetKey(VMObject key, VMObject obj)
public void UnserializeData(BinaryReader reader)
public void UnserializeData(byte[] bytes)

PhantasmaPhoenix.VM.GasMachine

Source: PhantasmaPhoenix.VM/src/Execution/GasMachine.cs

Declarations

public class GasMachine : VirtualMachine

Methods

public BigInteger UsedGas { get; protected set; }
public GasMachine(byte[] script, uint offset, string contextName = null) : base(script, offset, contextName)
public override ExecutionContext LoadContext(string contextName)
public override ExecutionState ExecuteInterop(string method)
public override ExecutionState ValidateOpcode(Opcode opcode)
public override void DumpData(List<string> lines)
public static BigInteger GetGasCostForOpcode(Opcode opcode)
public virtual ExecutionState ConsumeGas(BigInteger gasCost)

PhantasmaPhoenix.VM.VirtualMachine

Source: PhantasmaPhoenix.VM/src/Execution/VirtualMachine.cs

Declarations

public abstract class VirtualMachine : IVirtualMachine

Methods

public Address EntryAddress
public ExecutionContext CurrentContext { get; set; }
public ExecutionContext EntryContext => entryContext;
public ExecutionContext PreviousContext { get; set; }
public ExecutionFrame CurrentFrame { get; set; }
public ExecutionFrame PeekFrame()
public Stack<Address> ActiveAddresses => _activeAddresses;
public Stack<ExecutionFrame> Frames { get { return frames; } }
public Stack<VMObject> Stack { get; } = new Stack<VMObject>();
public VirtualMachine(byte[] script, uint offset, string contextName)
public abstract ExecutionContext LoadContext(string contextName);
public abstract ExecutionState ExecuteInterop(string method);
public abstract void DumpData(List<string> lines);
public byte[] EntryScript { get; }
public const int DefaultRegisterCount = 32;
public const int MaxRegisterCount = 32;
public readonly static string EntryContextName = "entry";
public readonly static string ExchangeContextName = "exchange";
public readonly static string GasContextName = "gas";
public readonly static string StakeContextName = "stake";
public virtual ExecutionContext FindContext(string contextName)
public virtual ExecutionState Execute()
public virtual ExecutionState SwitchContext(ExecutionContext context, uint instructionPointer)
public virtual ExecutionState ValidateOpcode(Opcode opcode)
public virtual string GetDumpFileName()
public virtual uint PopFrame()
public void Expect(bool condition, string description)
public void PushFrame(ExecutionContext context, uint instructionPointer, int registerCount)
public void RegisterContext(string contextName, ExecutionContext context)
public void SetCurrentContext(ExecutionContext context)

PhantasmaPhoenix.VM.VMException

Source: PhantasmaPhoenix.VM/src/Execution/VirtualMachine.cs

Declarations

public class VMException : Exception

Methods

public IVirtualMachine vm;
public VMException(IVirtualMachine vm, string msg) : base(msg)
public static string Header(string s)

PhantasmaPhoenix.VM.Instruction

Source: PhantasmaPhoenix.VM/src/Script/Instruction.cs

Declarations

public struct Instruction

Methods

public Opcode Opcode;
public object[] Args;
public override string ToString()
public uint Offset;

PhantasmaPhoenix.VM.Opcode

Source: PhantasmaPhoenix.VM/src/Script/Opcodes.cs

Declarations

public enum Opcode

Variants

  • ABS
  • ADD
  • AND
  • CALL
  • CAST
  • CAT
  • CLEAR, // clears a register
  • COPY, // copy by value
  • COUNT
  • CTX
  • DEBUG
  • DEC
  • DIV
  • EQUAL
  • EXTCALL
  • GET, // lookups a key and copies a reference into register
  • GT
  • GTE
  • INC
  • JMP
  • JMPIF
  • JMPNOT
  • LEFT
  • LOAD
  • LT
  • LTE
  • MAX
  • MIN
  • MOD
  • MOVE, // copy reference
  • MUL
  • NEGATE
  • NOP
  • NOT
  • OR
  • PACK, // unused for now
  • POP
  • POW
  • PUSH
  • PUT
  • RANGE
  • RET
  • RIGHT
  • SHL
  • SHR
  • SIGN
  • SIZE
  • SUB
  • SUBSTR
  • SWAP
  • SWITCH
  • THROW
  • UNPACK, // unpacks serialized struct based on ref struct
  • XOR

PhantasmaPhoenix.VM.ScriptBuilder

Source: PhantasmaPhoenix.VM/src/Script/ScriptBuilder.cs

Declarations

public class ScriptBuilder

Methods

public ScriptBuilder Emit(Opcode opcode, byte[] bytes = null)
public ScriptBuilder EmitCall(string label, byte regCount)
public ScriptBuilder EmitConditionalJump(Opcode opcode, byte src_reg, string label)
public ScriptBuilder EmitCopy(byte src_reg, byte dst_reg)
public ScriptBuilder EmitExtCall(string method, byte reg = 0)
public ScriptBuilder EmitJump(Opcode opcode, string label, byte reg = 0)
public ScriptBuilder EmitLabel(string label)
public ScriptBuilder EmitLoad(byte reg, BigInteger val)
public ScriptBuilder EmitLoad(byte reg, Enum val)
public ScriptBuilder EmitLoad(byte reg, ISerializable val)
public ScriptBuilder EmitLoad(byte reg, Timestamp val)
public ScriptBuilder EmitLoad(byte reg, bool val)
public ScriptBuilder EmitLoad(byte reg, byte[] bytes, VMType type = VMType.Bytes)
public ScriptBuilder EmitLoad(byte reg, string val)
public ScriptBuilder EmitMove(byte src_reg, byte dst_reg)
public ScriptBuilder EmitPop(byte reg)
public ScriptBuilder EmitPush(byte reg)
public ScriptBuilder EmitRaw(byte[] bytes)
public ScriptBuilder EmitThrow(byte reg)
public ScriptBuilder EmitVarBytes(long value)
public ScriptBuilder()
public byte[] ToScript()
public byte[] ToScript(out Dictionary<string, int> labels)
public int CurrentSize => (int)writer.BaseStream.Position;

PhantasmaPhoenix.VM.ScriptBuilderExtensions

Source: PhantasmaPhoenix.VM/src/Script/ScriptBuilderExtensions.cs

Declarations

public static class ScriptBuilderExtensions

Methods

public static ScriptBuilder AllowGas(this ScriptBuilder sb, Address from, Address to, BigInteger gasPrice, BigInteger gasLimit)
public static ScriptBuilder CallContract(this ScriptBuilder sb, NativeContractKind contractKind, string method, params object[] args)
public static ScriptBuilder CallNFT(this ScriptBuilder sb, string symbol, BigInteger seriesID, string method, params object[] args)
public static ScriptBuilder CrossTransferNFT(this ScriptBuilder sb, Address destinationChain, string tokenSymbol, Address from, Address to, BigInteger tokenId)
public static ScriptBuilder CrossTransferNFT(this ScriptBuilder sb, Address destinationChain, string tokenSymbol, Address from, string to, BigInteger tokenId)
public static ScriptBuilder CrossTransferToken(this ScriptBuilder sb, Address destinationChain, string tokenSymbol, Address from, Address to, BigInteger amount)
public static ScriptBuilder CrossTransferToken(this ScriptBuilder sb, Address destinationChain, string tokenSymbol, Address from, string to, BigInteger amount)
public static ScriptBuilder MintTokens(this ScriptBuilder sb, string tokenSymbol, Address from, Address target, BigInteger amount)
public static ScriptBuilder SpendGas(this ScriptBuilder sb, Address address)
public static ScriptBuilder TransferBalance(this ScriptBuilder sb, string tokenSymbol, Address from, Address to)
public static ScriptBuilder TransferNFT(this ScriptBuilder sb, string tokenSymbol, Address from, Address to, BigInteger tokenId)
public static ScriptBuilder TransferNFT(this ScriptBuilder sb, string tokenSymbol, Address from, string to, BigInteger tokenId)
public static ScriptBuilder TransferTokens(this ScriptBuilder sb, string tokenSymbol, Address from, Address to, BigInteger amount)
public static ScriptBuilder TransferTokens(this ScriptBuilder sb, string tokenSymbol, Address from, string to, BigInteger amount)

PhantasmaPhoenix.VM.ScriptContext

Source: PhantasmaPhoenix.VM/src/Script/ScriptContext.cs

Declarations

public class ScriptContext : ExecutionContext

Methods

public ScriptContext(string name, byte[] script, uint offset)
public byte[] Script { get; private set; }
public override ExecutionState Execute(ExecutionFrame frame, Stack<VMObject> stack)
public override string Name => _name;
public static readonly byte[] EmptyScript = new byte[] { (byte)Opcode.RET };
public string Error { get; private set; }
public uint InstructionPointer { get; private set; }
public void Step(ref ExecutionFrame frame, Stack<VMObject> stack)

PhantasmaPhoenix.VM.ScriptUtils

Source: PhantasmaPhoenix.VM/src/Script/ScriptUtils.cs

Declarations

public static class ScriptUtils

Methods

public static ScriptBuilder BeginScript()
public static ScriptBuilder CallContract(this ScriptBuilder sb, string contractName, string method, params object[] args)
public static ScriptBuilder CallInterop(this ScriptBuilder sb, string method, params object[] args)
public static byte[] EndScript(this ScriptBuilder sb)

PhantasmaPhoenix.VM.DisasmMethodCall

Source: PhantasmaPhoenix.VM/src/Tools/DisasmUtils.cs

Declarations

public struct DisasmMethodCall

Methods

public VMObject[] Arguments;
public override string ToString()
public string ContractName;
public string MethodName;
public string ToString(bool useNewlines)

PhantasmaPhoenix.VM.DisasmUtils

Source: PhantasmaPhoenix.VM/src/Tools/DisasmUtils.cs

Declarations

public static class DisasmUtils

Methods

public static Dictionary<string, int> GetDefaultDisasmTable()
public static IEnumerable<DisasmMethodCall> ExtractMethodCalls(Disassembler disassembler, Dictionary<string, int> methodArgumentCountTable)
public static IEnumerable<DisasmMethodCall> ExtractMethodCalls(byte[] script, Dictionary<string, int> methodArgumentCountTable)
public static IEnumerable<string> ExtractContractNames(Disassembler disassembler)
public static IEnumerable<string> ExtractContractNames(byte[] script)

PhantasmaPhoenix.VM.Disassembler

Source: PhantasmaPhoenix.VM/src/Tools/Disassembler.cs

Declarations

public class Disassembler

Methods

public Disassembler(byte[] script)
public IEnumerable<Instruction> Instructions => _instructions.AsReadOnly();
public override string ToString()

PhantasmaPhoenix.VM.Validation

Source: PhantasmaPhoenix.VM/src/Tools/ValidationUtils.cs

Declarations

public static class Validation

Methods

public static bool IsValidMethod(string methodName, VMType returnType)