WrappedData
public protocol WrappedData : Equatable, XDRDecodable, XDREncodable
Protocol for fixed-size binary data wrappers used in XDR encoding.
WrappedData provides a type-safe way to handle fixed-size byte arrays in Stellar’s XDR protocol. Common sizes include 4, 12, and 32 bytes for various key types and hashes.
-
Fixed capacity in bytes for this data type.
Declaration
Swift
static var capacity: Int { get } -
The underlying binary data.
Declaration
Swift
var wrapped: Data { get set } -
xdrEncode(to:Default implementation) Encodes the data to XDR format.
Default Implementation
Declaration
Swift
func xdrEncode(to encoder: XDREncoder) throws -
Creates an empty instance.
Declaration
Swift
init() -
init(fromBinary:Default implementation) Decodes from XDR format.
Default Implementation
Declaration
Swift
init(fromBinary decoder: XDRDecoder) throws -
init(_:Default implementation) Creates an instance from data, padding to capacity if necessary.
Default Implementation
Declaration
Swift
init(_ data: Data) -
==(_:Extension method_: ) Declaration
Swift
public static func == (lhs: Self, rhs: Self) -> Bool
View on GitHub
Install in Dash