![require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages](https://cdn.sanity.io/images/cgdhsj6q/production/be8ab80c8efa5907bc341c6fefe9aa20d239d890-1600x1097.png?w=400&fit=max&auto=format)
Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
@xyo-network/api-diviner-nodejs
Advanced tools
The main API for accessing a diviner on the XYO network information using GraphQL.
Install Node 10.x or later from: NodeJs
sudo npm install @xyo-network/api-diviner-nodejs -g --unsafe-perm=true
xyo-diviner start
Install Node 10.x or later from: NodeJs
npm install https://github.com/XYOracleNetwork/api-diviner-nodejs
npm run build
npm run start
Install the Diviner in a Docker and start the server at the end.
Note: There currently are quite a few build errors/warnings generted from dependencies that can safely be ignored, but should addressed in the future.
docker image build -t xyonetwork-api-diviner-nodejs-install:latest https://raw.githubusercontent.com/XYOracleNetwork/api-diviner-nodejs/master/docker/install/Dockerfile
docker run -p 12002:12002 xyonetwork-api-diviner-nodejs-install:latest
GraphQL Query
query QuestionHasIntersected($partyOneAddresses: [String]!, $partyTwoAddresses: [String]!, $markers: [String], $direction: Direction) {
questionHasIntersected(partyOneAddresses: $partyOneAddresses, partyTwoAddresses: $partyTwoAddresses, markers: $markers, direction: $direction)
}
partyOneAddresses - the first of two entities in the query
partyTwoAddresses - the second of two entities in the query
markers - a list of known interactions between the two entities used for truncating
direction - truncate everything before or after the markers
Notes:
Query Variables (replace the addresses with known addresses and markers)
{
"partyOneAddresses": ["040135DC4E51B3A3AC55F5A88D22DDAD498FDE02273BD0DF6FC63D5138EB8C128CF4268A6ED86A1DC433E0D3EFD24172CD1253EAFEFF71C9B6C133B7D759BFFE7E95"],
"partyTwoAddresses": ["0401FF4FD5F39558F82E53111993D632756FBB9E5FAF85C0316DA8465F6B8B0F0BD1EC61D9C56EBBDF31C14F125964279F1996623995CCC1E30ACDF4A42E002620D4"],
"markers": ["030524007069b9aa23dfa7b86e729aff39f976027dacd292588b70c93d9b53cfc15d"],
"direction": "FORWARD"
}
xyo-diviner <cmd> [opt]
<cmd>: commands
[opt]: options
start Start the Api Server
-g, --graphql [n] The http port to listen on for graphql connections
(default = 12001)
-a, --archivist [s] The url of the seed archivists to contact
(default = http://archivists.xyo.network:11001)
xyo-diviner start -g 9070 -a http://localhost:9079
Only for internal XY Company use at this time
Made with ❤️ by XYO
FAQs
Main Diviner Interface
The npm package @xyo-network/api-diviner-nodejs receives a total of 0 weekly downloads. As such, @xyo-network/api-diviner-nodejs popularity was classified as not popular.
We found that @xyo-network/api-diviner-nodejs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.