* [`ChannelMonitor`]: crate::chain::channelmonitor::ChannelMonitor
*/
public static KeysManager of(byte[] seed, long starting_time_secs, int starting_time_nanos) {
- long ret = bindings.KeysManager_new(InternalUtils.check_arr_len(seed, 32), starting_time_secs, starting_time_nanos);
+ long ret = bindings.KeysManager_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(seed, 32)), starting_time_secs, starting_time_nanos);
GC.KeepAlive(seed);
GC.KeepAlive(starting_time_secs);
GC.KeepAlive(starting_time_nanos);
* Gets the \"node_id\" secret key used to sign gossip announcements, decode onion data, etc.
*/
public byte[] get_node_secret_key() {
- byte[] ret = bindings.KeysManager_get_node_secret_key(this.ptr);
+ long ret = bindings.KeysManager_get_node_secret_key(this.ptr);
GC.KeepAlive(this);
- return ret;
+ if (ret >= 0 && ret <= 4096) { return null; }
+ byte[] ret_conv = InternalUtils.decodeUint8Array(ret);
+ return ret_conv;
}
/**
* Derive an old [`WriteableEcdsaChannelSigner`] containing per-channel secrets based on a key derivation parameters.
*/
public InMemorySigner derive_channel_keys(long channel_value_satoshis, byte[] _params) {
- long ret = bindings.KeysManager_derive_channel_keys(this.ptr, channel_value_satoshis, InternalUtils.check_arr_len(_params, 32));
+ long ret = bindings.KeysManager_derive_channel_keys(this.ptr, channel_value_satoshis, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(_params, 32)));
GC.KeepAlive(this);
GC.KeepAlive(channel_value_satoshis);
GC.KeepAlive(_params);
* May panic if the [`SpendableOutputDescriptor`]s were not generated by channels which used
* this [`KeysManager`] or one of the [`InMemorySigner`] created by this [`KeysManager`].
*/
- public Result_PartiallySignedTransactionNoneZ sign_spendable_outputs_psbt(SpendableOutputDescriptor[] descriptors, byte[] psbt) {
- long ret = bindings.KeysManager_sign_spendable_outputs_psbt(this.ptr, descriptors != null ? InternalUtils.mapArray(descriptors, descriptors_conv_27 => descriptors_conv_27.ptr) : null, psbt);
+ public Result_CVec_u8ZNoneZ sign_spendable_outputs_psbt(SpendableOutputDescriptor[] descriptors, byte[] psbt) {
+ long ret = bindings.KeysManager_sign_spendable_outputs_psbt(this.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(descriptors, descriptors_conv_27 => descriptors_conv_27.ptr)), InternalUtils.encodeUint8Array(psbt));
GC.KeepAlive(this);
GC.KeepAlive(descriptors);
GC.KeepAlive(psbt);
if (ret >= 0 && ret <= 4096) { return null; }
- Result_PartiallySignedTransactionNoneZ ret_hu_conv = Result_PartiallySignedTransactionNoneZ.constr_from_ptr(ret);
+ Result_CVec_u8ZNoneZ ret_hu_conv = Result_CVec_u8ZNoneZ.constr_from_ptr(ret);
foreach (SpendableOutputDescriptor descriptors_conv_27 in descriptors) { if (this != null) { this.ptrs_to.AddLast(descriptors_conv_27); }; };
return ret_hu_conv;
}
* May panic if the [`SpendableOutputDescriptor`]s were not generated by channels which used
* this [`KeysManager`] or one of the [`InMemorySigner`] created by this [`KeysManager`].
*/
- public Result_TransactionNoneZ spend_spendable_outputs(SpendableOutputDescriptor[] descriptors, TxOut[] outputs, byte[] change_destination_script, int feerate_sat_per_1000_weight, org.ldk.structs.Option_PackedLockTimeZ locktime) {
- long ret = bindings.KeysManager_spend_spendable_outputs(this.ptr, descriptors != null ? InternalUtils.mapArray(descriptors, descriptors_conv_27 => descriptors_conv_27.ptr) : null, outputs != null ? InternalUtils.mapArray(outputs, outputs_conv_7 => outputs_conv_7.ptr) : null, change_destination_script, feerate_sat_per_1000_weight, locktime.ptr);
+ public Result_TransactionNoneZ spend_spendable_outputs(SpendableOutputDescriptor[] descriptors, TxOut[] outputs, byte[] change_destination_script, int feerate_sat_per_1000_weight, org.ldk.structs.Option_u32Z locktime) {
+ long ret = bindings.KeysManager_spend_spendable_outputs(this.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(descriptors, descriptors_conv_27 => descriptors_conv_27.ptr)), InternalUtils.encodeUint64Array(InternalUtils.mapArray(outputs, outputs_conv_7 => outputs_conv_7.ptr)), InternalUtils.encodeUint8Array(change_destination_script), feerate_sat_per_1000_weight, locktime.ptr);
GC.KeepAlive(this);
GC.KeepAlive(descriptors);
GC.KeepAlive(outputs);