@@ -342,13 +342,6 @@ typedef struct MUST_USE_STRUCT LDKChannelPublicKeys {
342
342
bool is_owned ;
343
343
} LDKChannelPublicKeys ;
344
344
345
- typedef struct LDKC2TupleTempl_u64__u64 {
346
- uint64_t a ;
347
- uint64_t b ;
348
- } LDKC2TupleTempl_u64__u64 ;
349
-
350
- typedef struct LDKC2TupleTempl_u64__u64 LDKC2Tuple_u64u64Z ;
351
-
352
345
typedef struct LDKSignature {
353
346
uint8_t compact_form [64 ];
354
347
} LDKSignature ;
@@ -523,11 +516,11 @@ typedef struct LDKChannelKeys {
523
516
*/
524
517
void (* set_pubkeys )(const struct LDKChannelKeys * NONNULL_PTR );
525
518
/**
526
- * Gets arbitrary identifiers describing the set of keys which are provided back to you in
527
- * some SpendableOutputDescriptor types. These should be sufficient to identify this
519
+ * Gets an arbitrary identifier describing the set of keys which are provided back to you in
520
+ * some SpendableOutputDescriptor types. This should be sufficient to identify this
528
521
* ChannelKeys object uniquely and lookup or re-derive its keys.
529
522
*/
530
- LDKC2Tuple_u64u64Z ( * key_derivation_params )(const void * this_arg );
523
+ struct LDKThirtyTwoBytes ( * channel_keys_id )(const void * this_arg );
531
524
/**
532
525
* Create a signature for a counterparty's commitment transaction and associated HTLC transactions.
533
526
*
@@ -921,26 +914,39 @@ typedef struct LDKu8slice {
921
914
typedef struct LDKKeysInterface {
922
915
void * this_arg ;
923
916
/**
924
- * Get node secret key (aka node_id or network_key)
917
+ * Get node secret key (aka node_id or network_key).
918
+ *
919
+ * This method must return the same value each time it is called.
925
920
*/
926
921
struct LDKSecretKey (* get_node_secret )(const void * this_arg );
927
922
/**
928
- * Get destination redeemScript to encumber static protocol exit points.
923
+ * Get a script pubkey which we send funds to when claiming on-chain contestable outputs.
924
+ *
925
+ * This method should return a different value each time it is called, to avoid linking
926
+ * on-chain funds across channels as controlled to the same user.
929
927
*/
930
928
LDKCVec_u8Z (* get_destination_script )(const void * this_arg );
931
929
/**
932
- * Get shutdown_pubkey to use as PublicKey at channel closure
930
+ * Get a public key which we will send funds to (in the form of a P2WPKH output) when closing
931
+ * a channel.
932
+ *
933
+ * This method should return a different value each time it is called, to avoid linking
934
+ * on-chain funds across channels as controlled to the same user.
933
935
*/
934
936
struct LDKPublicKey (* get_shutdown_pubkey )(const void * this_arg );
935
937
/**
936
938
* Get a new set of ChannelKeys for per-channel secrets. These MUST be unique even if you
937
939
* restarted with some stale data!
940
+ *
941
+ * This method must return a different value each time it is called.
938
942
*/
939
943
struct LDKChannelKeys (* get_channel_keys )(const void * this_arg , bool inbound , uint64_t channel_value_satoshis );
940
944
/**
941
945
* Gets a unique, cryptographically-secure, random 32 byte value. This is used for encrypting
942
946
* onion packets and for temporary channel IDs. There is no requirement that these be
943
947
* persisted anywhere, though they must be unique across restarts.
948
+ *
949
+ * This method must return a different value each time it is called.
944
950
*/
945
951
struct LDKThirtyTwoBytes (* get_secure_random_bytes )(const void * this_arg );
946
952
/**
@@ -1190,9 +1196,9 @@ typedef struct LDKCResultTempl_CVecTempl_Signature_____u8 LDKCResult_CVec_Signat
1190
1196
*/
1191
1197
typedef enum LDKSpendableOutputDescriptor_Tag {
1192
1198
/**
1193
- * An output to a script which was provided via KeysInterface, thus you should already know
1194
- * how to spend it. No keys are provided as rust-lightning was never given any keys - only the
1195
- * script_pubkey as it appears in the output .
1199
+ * An output to a script which was provided via KeysInterface directly, either from
1200
+ * `get_destination_script()` or `get_shutdown_pubkey()`, thus you should already know how to
1201
+ * spend it. No secret keys are provided as rust-lightning was never given any key .
1196
1202
* These may include outputs from a transaction punishing our counterparty or claiming an HTLC
1197
1203
* on-chain using the payment preimage or after it has timed out.
1198
1204
*/
@@ -1254,14 +1260,16 @@ typedef struct LDKSpendableOutputDescriptor_LDKDynamicOutputP2WSH_Body {
1254
1260
struct LDKPublicKey per_commitment_point ;
1255
1261
uint16_t to_self_delay ;
1256
1262
struct LDKTxOut output ;
1257
- LDKC2Tuple_u64u64Z key_derivation_params ;
1258
1263
struct LDKPublicKey revocation_pubkey ;
1264
+ struct LDKThirtyTwoBytes channel_keys_id ;
1265
+ uint64_t channel_value_satoshis ;
1259
1266
} LDKSpendableOutputDescriptor_LDKDynamicOutputP2WSH_Body ;
1260
1267
1261
1268
typedef struct LDKSpendableOutputDescriptor_LDKStaticOutputCounterpartyPayment_Body {
1262
1269
struct LDKOutPoint outpoint ;
1263
1270
struct LDKTxOut output ;
1264
- LDKC2Tuple_u64u64Z key_derivation_params ;
1271
+ struct LDKThirtyTwoBytes channel_keys_id ;
1272
+ uint64_t channel_value_satoshis ;
1265
1273
} LDKSpendableOutputDescriptor_LDKStaticOutputCounterpartyPayment_Body ;
1266
1274
1267
1275
typedef struct MUST_USE_STRUCT LDKSpendableOutputDescriptor {
@@ -3640,8 +3648,6 @@ extern const LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ (*CResult_C
3640
3648
3641
3649
extern const LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ (* CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err )(struct LDKDecodeError );
3642
3650
3643
- extern const void (* C2Tuple_u64u64Z_free )(LDKC2Tuple_u64u64Z );
3644
-
3645
3651
extern const void (* CResult_SpendableOutputDescriptorDecodeErrorZ_free )(LDKCResult_SpendableOutputDescriptorDecodeErrorZ );
3646
3652
3647
3653
extern const LDKCResult_SpendableOutputDescriptorDecodeErrorZ (* CResult_SpendableOutputDescriptorDecodeErrorZ_ok )(struct LDKSpendableOutputDescriptor );
@@ -3928,8 +3934,6 @@ LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new
3928
3934
3929
3935
LDKC2Tuple_BlockHashChannelMonitorZ C2Tuple_BlockHashChannelMonitorZ_new (struct LDKThirtyTwoBytes a , struct LDKChannelMonitor b );
3930
3936
3931
- LDKC2Tuple_u64u64Z C2Tuple_u64u64Z_new (uint64_t a , uint64_t b );
3932
-
3933
3937
LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_new (struct LDKSignature a , LDKCVec_SignatureZ b );
3934
3938
3935
3939
LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err (void );
@@ -4726,7 +4730,7 @@ void InMemoryChannelKeys_set_commitment_seed(struct LDKInMemoryChannelKeys *NONN
4726
4730
/**
4727
4731
* Create a new InMemoryChannelKeys
4728
4732
*/
4729
- MUST_USE_RES struct LDKInMemoryChannelKeys InMemoryChannelKeys_new (struct LDKSecretKey funding_key , struct LDKSecretKey revocation_base_key , struct LDKSecretKey payment_key , struct LDKSecretKey delayed_payment_base_key , struct LDKSecretKey htlc_base_key , struct LDKThirtyTwoBytes commitment_seed , uint64_t channel_value_satoshis , LDKC2Tuple_u64u64Z key_derivation_params );
4733
+ MUST_USE_RES struct LDKInMemoryChannelKeys InMemoryChannelKeys_new (struct LDKSecretKey funding_key , struct LDKSecretKey revocation_base_key , struct LDKSecretKey payment_key , struct LDKSecretKey delayed_payment_base_key , struct LDKSecretKey htlc_base_key , struct LDKThirtyTwoBytes commitment_seed , uint64_t channel_value_satoshis , struct LDKThirtyTwoBytes channel_keys_id );
4730
4734
4731
4735
/**
4732
4736
* Counterparty pubkeys.
@@ -4805,10 +4809,10 @@ MUST_USE_RES struct LDKKeysManager KeysManager_new(const uint8_t (*seed)[32], en
4805
4809
* Derive an old set of ChannelKeys for per-channel secrets based on a key derivation
4806
4810
* parameters.
4807
4811
* Key derivation parameters are accessible through a per-channel secrets
4808
- * ChannelKeys::key_derivation_params and is provided inside DynamicOuputP2WSH in case of
4812
+ * ChannelKeys::channel_keys_id and is provided inside DynamicOuputP2WSH in case of
4809
4813
* onchain output detection for which a corresponding delayed_payment_key must be derived.
4810
4814
*/
4811
- MUST_USE_RES struct LDKInMemoryChannelKeys KeysManager_derive_channel_keys (const struct LDKKeysManager * NONNULL_PTR this_arg , uint64_t channel_value_satoshis , uint64_t params_1 , uint64_t params_2 );
4815
+ MUST_USE_RES struct LDKInMemoryChannelKeys KeysManager_derive_channel_keys (const struct LDKKeysManager * NONNULL_PTR this_arg , uint64_t channel_value_satoshis , const uint8_t ( * params )[ 32 ] );
4812
4816
4813
4817
struct LDKKeysInterface KeysManager_as_KeysInterface (const struct LDKKeysManager * NONNULL_PTR this_arg );
4814
4818
@@ -6590,23 +6594,21 @@ uint32_t ReplyChannelRange_get_number_of_blocks(const struct LDKReplyChannelRang
6590
6594
void ReplyChannelRange_set_number_of_blocks (struct LDKReplyChannelRange * NONNULL_PTR this_ptr , uint32_t val );
6591
6595
6592
6596
/**
6593
- * Indicates if the query recipient maintains up-to-date channel
6594
- * information for the chain_hash
6597
+ * True when this is the final reply for a query
6595
6598
*/
6596
- bool ReplyChannelRange_get_full_information (const struct LDKReplyChannelRange * NONNULL_PTR this_ptr );
6599
+ bool ReplyChannelRange_get_sync_complete (const struct LDKReplyChannelRange * NONNULL_PTR this_ptr );
6597
6600
6598
6601
/**
6599
- * Indicates if the query recipient maintains up-to-date channel
6600
- * information for the chain_hash
6602
+ * True when this is the final reply for a query
6601
6603
*/
6602
- void ReplyChannelRange_set_full_information (struct LDKReplyChannelRange * NONNULL_PTR this_ptr , bool val );
6604
+ void ReplyChannelRange_set_sync_complete (struct LDKReplyChannelRange * NONNULL_PTR this_ptr , bool val );
6603
6605
6604
6606
/**
6605
6607
* The short_channel_ids in the channel range
6606
6608
*/
6607
6609
void ReplyChannelRange_set_short_channel_ids (struct LDKReplyChannelRange * NONNULL_PTR this_ptr , LDKCVec_u64Z val );
6608
6610
6609
- MUST_USE_RES struct LDKReplyChannelRange ReplyChannelRange_new (struct LDKThirtyTwoBytes chain_hash_arg , uint32_t first_blocknum_arg , uint32_t number_of_blocks_arg , bool full_information_arg , LDKCVec_u64Z short_channel_ids_arg );
6611
+ MUST_USE_RES struct LDKReplyChannelRange ReplyChannelRange_new (struct LDKThirtyTwoBytes chain_hash_arg , uint32_t first_blocknum_arg , uint32_t number_of_blocks_arg , bool sync_complete_arg , LDKCVec_u64Z short_channel_ids_arg );
6610
6612
6611
6613
void QueryShortChannelIds_free (struct LDKQueryShortChannelIds this_ptr );
6612
6614
0 commit comments