Skip to content
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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

feat: add UNL to get_network API #60

wants to merge 3 commits into from

Conversation

mvadari
Copy link
Collaborator

@mvadari mvadari commented Dec 6, 2022

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

  • New feature (non-breaking change which adds functionality)

Before / After

Test Plan

Works locally.

{
action: 'Get Network From Node',
route: '/v1/network/get_network',
example: 'https://data.xrpl.org/v1/network/get_network',
Copy link
Collaborator

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[]
Copy link
Collaborator

@pdp2121 pdp2121 Dec 14, 2022

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],
Copy link
Collaborator

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?

@intelliot
Copy link

@mvadari is this PR still needed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants