@@ -79,6 +79,7 @@ enum WordCount {
7979 "Words24",
8080};
8181
82+ [Remote]
8283enum LogLevel {
8384 "Gossip",
8485 "Trace",
@@ -281,6 +282,7 @@ interface OnchainPayment {
281282 Txid bump_fee_rbf(PaymentId payment_id, FeeRate? fee_rate);
282283};
283284
285+ [Remote]
284286interface FeeRate {
285287 [Name=from_sat_per_kwu]
286288 constructor(u64 sat_kwu);
@@ -377,6 +379,7 @@ dictionary NodeStatus {
377379 u64? latest_node_announcement_broadcast_timestamp;
378380};
379381
382+ [Remote]
380383dictionary BestBlock {
381384 BlockHash block_hash;
382385 u32 height;
@@ -400,35 +403,21 @@ enum BuildError {
400403 "AsyncPaymentsConfigMismatch",
401404};
402405
403- [Trait]
406+ [Trait, WithForeign ]
404407interface VssHeaderProvider {
405408 [Async, Throws=VssHeaderProviderError]
406- record<string, string> get_headers([ByRef] sequence<u8> request);
409+ record<string, string> get_headers(sequence<u8> request);
407410};
408411
409412[Error]
410- enum VssHeaderProviderError {
411- "InvalidData",
412- "RequestError",
413- "AuthorizationError",
414- "InternalError",
415- };
416-
417- [Enum]
418- interface Event {
419- PaymentSuccessful(PaymentId? payment_id, PaymentHash payment_hash, PaymentPreimage? payment_preimage, u64? fee_paid_msat);
420- PaymentFailed(PaymentId? payment_id, PaymentHash? payment_hash, PaymentFailureReason? reason);
421- PaymentReceived(PaymentId? payment_id, PaymentHash payment_hash, u64 amount_msat, sequence<CustomTlvRecord> custom_records);
422- PaymentClaimable(PaymentId payment_id, PaymentHash payment_hash, u64 claimable_amount_msat, u32? claim_deadline, sequence<CustomTlvRecord> custom_records);
423- PaymentForwarded(ChannelId prev_channel_id, ChannelId next_channel_id, UserChannelId?
424- prev_user_channel_id, UserChannelId? next_user_channel_id, PublicKey? prev_node_id, PublicKey? next_node_id, u64? total_fee_earned_msat, u64? skimmed_fee_msat, boolean claim_from_onchain_tx, u64? outbound_amount_forwarded_msat);
425- ChannelPending(ChannelId channel_id, UserChannelId user_channel_id, ChannelId former_temporary_channel_id, PublicKey counterparty_node_id, OutPoint funding_txo);
426- ChannelReady(ChannelId channel_id, UserChannelId user_channel_id, PublicKey? counterparty_node_id, OutPoint? funding_txo);
427- ChannelClosed(ChannelId channel_id, UserChannelId user_channel_id, PublicKey? counterparty_node_id, ClosureReason? reason);
428- SplicePending(ChannelId channel_id, UserChannelId user_channel_id, PublicKey counterparty_node_id, OutPoint new_funding_txo);
429- SpliceFailed(ChannelId channel_id, UserChannelId user_channel_id, PublicKey counterparty_node_id, OutPoint? abandoned_funding_txo);
413+ interface VssHeaderProviderError {
414+ InvalidData(string error);
415+ RequestError(string error);
416+ AuthorizationError(string error);
417+ InternalError(string error);
430418};
431419
420+ [Remote]
432421enum PaymentFailureReason {
433422 "RecipientRejected",
434423 "UserAbandoned",
@@ -442,25 +431,6 @@ enum PaymentFailureReason {
442431 "BlindedPathCreationFailed",
443432};
444433
445- [Enum]
446- interface ClosureReason {
447- CounterpartyForceClosed(UntrustedString peer_msg);
448- HolderForceClosed(boolean? broadcasted_latest_txn, string message);
449- LegacyCooperativeClosure();
450- CounterpartyInitiatedCooperativeClosure();
451- LocallyInitiatedCooperativeClosure();
452- CommitmentTxConfirmed();
453- FundingTimedOut();
454- ProcessingError(string err);
455- DisconnectedPeer();
456- OutdatedChannelManager();
457- CounterpartyCoopClosedUnfundedChannel();
458- LocallyCoopClosedUnfundedChannel();
459- FundingBatchClosure();
460- HTLCsTimedOut( PaymentHash? payment_hash );
461- PeerFeerateTooLow(u32 peer_feerate_sat_per_kw, u32 required_feerate_sat_per_kw);
462- };
463-
464434[Enum]
465435interface PaymentKind {
466436 Onchain(Txid txid, ConfirmationStatus status);
@@ -510,6 +480,7 @@ dictionary PaymentDetails {
510480 u64 latest_update_timestamp;
511481};
512482
483+ [Remote]
513484dictionary RouteParametersConfig {
514485 u64? max_total_routing_fee_msat;
515486 u32 max_total_cltv_expiry_delta;
@@ -522,13 +493,15 @@ dictionary CustomTlvRecord {
522493 sequence<u8> value;
523494};
524495
496+ [Remote]
525497dictionary LSPS1OrderStatus {
526498 LSPS1OrderId order_id;
527499 LSPS1OrderParams order_params;
528500 LSPS1PaymentInfo payment_options;
529501 LSPS1ChannelInfo? channel_state;
530502};
531503
504+ [Remote]
532505dictionary LSPS1OrderParams {
533506 u64 lsp_balance_sat;
534507 u64 client_balance_sat;
@@ -563,26 +536,29 @@ dictionary LSPS1OnchainPaymentInfo {
563536 Address? refund_onchain_address;
564537};
565538
539+ [Remote]
566540dictionary LSPS1ChannelInfo {
567541 LSPSDateTime funded_at;
568542 OutPoint funding_outpoint;
569543 LSPSDateTime expires_at;
570544};
571545
546+ [Remote]
572547enum LSPS1PaymentState {
573548 "ExpectPayment",
574549 "Paid",
575550 "Refunded",
576551};
577552
578- [NonExhaustive]
553+ [Remote, NonExhaustive]
579554enum Network {
580555 "Bitcoin",
581556 "Testnet",
582557 "Signet",
583558 "Regtest",
584559};
585560
561+ [Remote]
586562dictionary OutPoint {
587563 Txid txid;
588564 u32 vout;
@@ -679,6 +655,7 @@ interface LightningBalance {
679655 );
680656};
681657
658+ [Remote]
682659enum BalanceSource {
683660 "HolderForceClosed",
684661 "CounterpartyForceClosed",
@@ -741,6 +718,7 @@ dictionary ChannelUpdateInfo {
741718 RoutingFees fees;
742719};
743720
721+ [Remote]
744722dictionary RoutingFees {
745723 u32 base_msat;
746724 u32 proportional_millionths;
@@ -757,6 +735,7 @@ dictionary NodeAnnouncementInfo {
757735 sequence<SocketAddress> addresses;
758736};
759737
738+ [Remote]
760739enum Currency {
761740 "Bitcoin",
762741 "BitcoinTestnet",
@@ -929,3 +908,6 @@ typedef string LSPSDateTime;
929908
930909[Custom]
931910typedef string ScriptBuf;
911+
912+ typedef interface ClosureReason;
913+ typedef enum Event;
0 commit comments