@Override public byte[] get_shutdown_pubkey() { return underlying_if.get_shutdown_pubkey(); }
@Override
- public ChannelKeys get_channel_keys(boolean inbound, long channel_value_satoshis) {
- ChannelKeys underlying_ck = underlying_if.get_channel_keys(inbound, channel_value_satoshis);
- ChannelKeys.ChannelKeysInterface cki = new ChannelKeys.ChannelKeysInterface() {
+ public Sign get_channel_signer(boolean inbound, long channel_value_satoshis) {
+ Sign underlying_ck = underlying_if.get_channel_signer(inbound, channel_value_satoshis);
+ Sign.SignInterface si = new Sign.SignInterface() {
@Override
public byte[] get_per_commitment_point(long idx) {
return underlying_ck.get_per_commitment_point(idx);
}
@Override
- public TwoTuple<Long, Long> key_derivation_params() {
- return new TwoTuple<Long, Long>((long)0, (long)1);
+ public byte[] channel_keys_id() {
+ return new byte[32];
}
@Override
return underlying_ck.write();
}
};
- ChannelKeys resp = ChannelKeys.new_impl(cki, underlying_ck.get_pubkeys());
- must_free_objs.add(new WeakReference<>(cki));
+ Sign resp = Sign.new_impl(si, underlying_ck.get_pubkeys());
+ must_free_objs.add(new WeakReference<>(si));
must_free_objs.add(new WeakReference<>(resp));
must_free_objs.add(new WeakReference<>(underlying_ck));
return resp;
}
@Override
- public Result_ChannelKeysDecodeErrorZ read_chan_signer(byte[] reader) {
+ public Result_SignDecodeErrorZ read_chan_signer(byte[] reader) {
return underlying_if.read_chan_signer(reader);
}
});
for (byte i = 0; i < 32; i++) {
key_seed[i] = (byte) (i ^ seed);
}
- KeysManager keys = KeysManager.constructor_new(key_seed, LDKNetwork.LDKNetwork_Bitcoin, System.currentTimeMillis() / 1000, (int) (System.currentTimeMillis() * 1000));
+ KeysManager keys = KeysManager.constructor_new(key_seed, System.currentTimeMillis() / 1000, (int) (System.currentTimeMillis() * 1000));
if (use_km_wrapper) {
this.keys_interface = manual_keysif(keys.as_KeysInterface());
} else {
byte[] key_seed = new byte[32];
for (byte i = 0; i < 32; i++) { key_seed[i] = (byte) (i ^ seed); }
- this.keys = bindings.KeysManager_new(key_seed, LDKNetwork.LDKNetwork_Bitcoin, System.currentTimeMillis() / 1000, (int)(System.currentTimeMillis() * 1000) & 0xffffffff);
+ this.keys = bindings.KeysManager_new(key_seed, System.currentTimeMillis() / 1000, (int)(System.currentTimeMillis() * 1000) & 0xffffffff);
this.keys_interface = bindings.KeysManager_as_KeysInterface(keys);
this.config = bindings.UserConfig_default();
this.chan_manager = bindings.ChannelManager_new(LDKNetwork.LDKNetwork_Bitcoin, fee_estimator, chain_monitor, tx_broadcaster, logger, keys_interface, config, 1);