Skip to content

Commit

Permalink
/nodeinfo: add channel limit amounts
Browse files Browse the repository at this point in the history
  • Loading branch information
zoedberg committed Sep 26, 2024
1 parent 2d00080 commit f6491bd
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
12 changes: 12 additions & 0 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1498,6 +1498,18 @@ components:
rgb_htlc_min_msat:
type: integer
example: 3000000
channel_capacity_min_sat:
type: integer
example: 5506
channel_capacity_max_sat:
type: integer
example: 16777215
channel_asset_min_amount:
type: integer
example: 1
channel_asset_max_amount:
type: integer
example: 18446744073709551615
OpenChannelRequest:
type: object
properties:
Expand Down
8 changes: 8 additions & 0 deletions src/routes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -648,6 +648,10 @@ pub(crate) struct NodeInfoResponse {
pub(crate) onchain_pubkey: String,
pub(crate) max_media_upload_size_mb: u16,
pub(crate) rgb_htlc_min_msat: u64,
pub(crate) channel_capacity_min_sat: u64,
pub(crate) channel_capacity_max_sat: u64,
pub(crate) channel_asset_min_amount: u64,
pub(crate) channel_asset_max_amount: u64,
}

#[derive(Deserialize, Serialize)]
Expand Down Expand Up @@ -2302,6 +2306,10 @@ pub(crate) async fn node_info(
onchain_pubkey: unlocked_state.rgb_get_wallet_data().pubkey,
max_media_upload_size_mb: state.static_state.max_media_upload_size_mb,
rgb_htlc_min_msat: HTLC_MIN_MSAT,
channel_capacity_min_sat: OPENCHANNEL_MIN_SAT,
channel_capacity_max_sat: OPENCHANNEL_MAX_SAT,
channel_asset_min_amount: OPENCHANNEL_MIN_RGB_AMT,
channel_asset_max_amount: u64::MAX,
}))
}

Expand Down

0 comments on commit f6491bd

Please sign in to comment.