Class Blob
The Blob type is a length-prefixed field with arbitrary data.
Two common fields that use this type are SigningPubKey and TxnSignature, which contain (respectively)
the public key and signature that authorize a transaction to be executed.
Blob fields have no further structure to their contents, so they consist of
exactly the amount of bytes indicated in the variable-length encoding, after the Field ID and length prefixes.
Variable length encoded type
Inheritance
System.Object
Blob
Assembly: Xrpl.BinaryCodec.dll
Syntax
public class Blob : object, ISerializedType
Fields
|
Improve this Doc
View Source
Buffer
Declaration
public readonly byte[] Buffer
Field Value
Type |
Description |
System.Byte[] |
|
Methods
|
Improve this Doc
View Source
FromAscii(String)
Create a Blob object from a hex-string
Declaration
public static Blob FromAscii(string blob)
Parameters
Type |
Name |
Description |
System.String |
blob |
existing hex-string in ASCII
|
Returns
Type |
Description |
Blob |
A Blob object
|
|
Improve this Doc
View Source
FromHex(String)
Declaration
public static Blob FromHex(string value)
Parameters
Type |
Name |
Description |
System.String |
value |
|
Returns
|
Improve this Doc
View Source
FromJson(JToken)
Declaration
public static Blob FromJson(JToken token)
Parameters
Type |
Name |
Description |
JToken |
token |
json token
|
Returns
Type |
Description |
Blob |
A Blob object
|
|
Improve this Doc
View Source
FromParser(BinaryParser, Nullable<Int32>)
Defines how to read a Blob from a BinaryParser
Declaration
public static Blob FromParser(BinaryParser parser, int? hint = null)
Parameters
Type |
Name |
Description |
BinaryParser |
parser |
The binary parser to read the Blob from
|
System.Nullable<System.Int32> |
hint |
The length of the blob, computed by readVariableLengthLength() and passed in
|
Returns
Type |
Description |
Blob |
A Blob object
|
|
Improve this Doc
View Source
FromString(String, System.Text.Encoding)
Create a Blob object from a hex-string
Declaration
public static Blob FromString(string blob, System.Text.Encoding encoding)
Parameters
Type |
Name |
Description |
System.String |
blob |
existing hex-string
|
System.Text.Encoding |
encoding |
string encoding
|
Returns
Type |
Description |
Blob |
A Blob object
|
|
Improve this Doc
View Source
ToBytes(IBytesSink)
Declaration
public void ToBytes(IBytesSink sink)
Parameters
Type |
Name |
Description |
IBytesSink |
sink |
bytes Sink container
|
|
Improve this Doc
View Source
ToJson()
Get the JSON representation of this type
Declaration
Returns
|
Improve this Doc
View Source
ToString()
Declaration
public override string ToString()
Returns
Type |
Description |
System.String |
|
Operators
|
Improve this Doc
View Source
Implicit(JToken to Blob)
Declaration
public static implicit operator Blob(JToken token)
Parameters
Type |
Name |
Description |
JToken |
token |
|
Returns
|
Improve this Doc
View Source
Implicit(Byte[] to Blob)
Declaration
public static implicit operator Blob(byte[] value)
Parameters
Type |
Name |
Description |
System.Byte[] |
value |
|
Returns
Implements