-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add UNL to get_network
API
#60
base: main
Are you sure you want to change the base?
Conversation
{ | ||
action: 'Get Network From Node', | ||
route: '/v1/network/get_network', | ||
example: 'https://data.xrpl.org/v1/network/get_network', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The example should include that it takes a parameter.
@@ -11,6 +11,11 @@ const log = logger({ name: 'api-get-network' }) | |||
|
|||
const CRAWL_PORTS = [51235, 2459, 30001] | |||
|
|||
interface NetworkInfo { | |||
network: string | |||
unl?: string[] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should it just be a string based on the functions below?
if (result.length > 0) { | ||
return { | ||
network: result[0].id, | ||
unl: result[0].unls.split(',')[0], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we just show all unls similar to getNetworkInfoFromPublicKey
below?
@mvadari is this PR still needed? |
High Level Overview of Change
Title says it all. This PR also documents the
get_network
API.Context of Change
This is necessary for ripple/explorer#470
Type of Change
Before / After
Test Plan
Works locally.