Skip to content

Commit 1dff6e5

Browse files
committed
rpc: use channel_id for external funding open result
1 parent 2d0121e commit 1dff6e5

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

crates/fiber-lib/src/rpc/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ Opens a channel with external funding. The node will negotiate the channel with
393393

394394
##### Returns
395395

396-
* `temporary_channel_id` - <em>[Hash256](#type-hash256)</em>, The temporary channel ID of the channel being opened.
396+
* `channel_id` - <em>[Hash256](#type-hash256)</em>, The channel ID of the channel being opened.
397397
Use this ID to submit the signed funding transaction.
398398
* `unsigned_funding_tx` - <em>`ckb_jsonrpc_types::Transaction`</em>, The final unsigned funding transaction that needs to be signed.
399399
The user should sign this transaction with their wallet and submit it
@@ -414,14 +414,14 @@ Submits a signed funding transaction for an externally funded channel.
414414

415415
##### Params
416416

417-
* `channel_id` - <em>[Hash256](#type-hash256)</em>, The temporary channel ID returned from `open_channel_with_external_funding`.
417+
* `channel_id` - <em>[Hash256](#type-hash256)</em>, The channel ID returned from `open_channel_with_external_funding`.
418418
* `signed_funding_tx` - <em>`ckb_jsonrpc_types::Transaction`</em>, The signed funding transaction. This must be the same final transaction structure
419419
that was returned from `open_channel_with_external_funding`, with valid
420420
witnesses (signatures) added, and should be ready for direct broadcast.
421421

422422
##### Returns
423423

424-
* `channel_id` - <em>[Hash256](#type-hash256)</em>, The channel ID (may be updated from temporary to final after peer exchange).
424+
* `channel_id` - <em>[Hash256](#type-hash256)</em>, The channel ID.
425425
* `funding_tx_hash` - <em>`H256`</em>, The hash of the funding transaction that was submitted.
426426

427427
---

crates/fiber-lib/src/rpc/channel.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -420,9 +420,9 @@ pub struct OpenChannelWithExternalFundingParams {
420420
/// Result of opening a channel with external funding.
421421
#[derive(Clone, Serialize, Deserialize)]
422422
pub struct OpenChannelWithExternalFundingResult {
423-
/// The temporary channel ID of the channel being opened.
423+
/// The channel ID of the channel being opened.
424424
/// Use this ID to submit the signed funding transaction.
425-
pub temporary_channel_id: Hash256,
425+
pub channel_id: Hash256,
426426

427427
/// The final unsigned funding transaction that needs to be signed.
428428
/// The user should sign this transaction with their wallet and submit it
@@ -433,7 +433,7 @@ pub struct OpenChannelWithExternalFundingResult {
433433
/// Parameters for submitting a signed funding transaction for external funding.
434434
#[derive(Serialize, Deserialize, Debug)]
435435
pub struct SubmitSignedFundingTxParams {
436-
/// The temporary channel ID returned from `open_channel_with_external_funding`.
436+
/// The channel ID returned from `open_channel_with_external_funding`.
437437
pub channel_id: Hash256,
438438

439439
/// The signed funding transaction. This must be the same final transaction structure
@@ -445,7 +445,7 @@ pub struct SubmitSignedFundingTxParams {
445445
/// Result of submitting a signed funding transaction.
446446
#[derive(Clone, Serialize, Deserialize)]
447447
pub struct SubmitSignedFundingTxResult {
448-
/// The channel ID (may be updated from temporary to final after peer exchange).
448+
/// The channel ID.
449449
pub channel_id: Hash256,
450450

451451
/// The hash of the funding transaction that was submitted.
@@ -830,7 +830,7 @@ where
830830
};
831831
handle_actor_call!(self.actor, message, params).map(|response| {
832832
OpenChannelWithExternalFundingResult {
833-
temporary_channel_id: response.channel_id,
833+
channel_id: response.channel_id,
834834
unsigned_funding_tx: response.unsigned_funding_tx.into(),
835835
}
836836
})

fiber-js/src/types/channel.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ interface OpenChannelWithExternalFundingParams {
116116
}
117117

118118
interface OpenChannelWithExternalFundingResult {
119-
temporary_channel_id: HexString;
119+
channel_id: HexString;
120120
unsigned_funding_tx: CkbJsonRpcTransaction;
121121
}
122122

0 commit comments

Comments
 (0)