X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=c_sharp%2Fsrc%2Forg%2Fldk%2Fstructs%2FInitFeatures.cs;fp=c_sharp%2Fsrc%2Forg%2Fldk%2Fstructs%2FInitFeatures.cs;h=4f1551e3778bbc20a27a284a95ecd7db5a046d5e;hb=3d1f246d05172683acd3b81836de4e4e9f0c1afd;hp=44c97a13c6687756d536311942e7ec54717b5e64;hpb=a32b8843c44637ebd82c83390d17db573b972153;p=ldk-java diff --git a/c_sharp/src/org/ldk/structs/InitFeatures.cs b/c_sharp/src/org/ldk/structs/InitFeatures.cs index 44c97a13..4f1551e3 100644 --- a/c_sharp/src/org/ldk/structs/InitFeatures.cs +++ b/c_sharp/src/org/ldk/structs/InitFeatures.cs @@ -50,6 +50,18 @@ public class InitFeatures : CommonBase { return ret_hu_conv; } + /** + * Generates a non-cryptographic 64-bit hash of the InitFeatures. + */ + public long hash() { + long ret = bindings.InitFeatures_hash(this.ptr); + GC.KeepAlive(this); + return ret; + } + + public override int GetHashCode() { + return (int)this.hash(); + } /** * Create a blank Features with no features set */ @@ -541,6 +553,40 @@ public class InitFeatures : CommonBase { return ret; } + /** + * Set this feature as optional. + */ + public void set_route_blinding_optional() { + bindings.InitFeatures_set_route_blinding_optional(this.ptr); + GC.KeepAlive(this); + } + + /** + * Set this feature as required. + */ + public void set_route_blinding_required() { + bindings.InitFeatures_set_route_blinding_required(this.ptr); + GC.KeepAlive(this); + } + + /** + * Checks if this feature is supported. + */ + public bool supports_route_blinding() { + bool ret = bindings.InitFeatures_supports_route_blinding(this.ptr); + GC.KeepAlive(this); + return ret; + } + + /** + * Checks if this feature is required. + */ + public bool requires_route_blinding() { + bool ret = bindings.InitFeatures_requires_route_blinding(this.ptr); + GC.KeepAlive(this); + return ret; + } + /** * Set this feature as optional. */