diff --git a/docker/Dockerfile b/docker/Dockerfile index 0464c69..b0ef51d 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -24,6 +24,7 @@ FROM ubuntu:focal as runner COPY --from=builder /build/docker-extracted/usr/bin/docker /usr/bin/ COPY --from=builder /build/scripts/cluster.sh /usr/bin/cluster COPY --from=builder /build/scripts/codegen.sh /usr/bin/codegen +COPY --from=builder /build/scripts/templates.sh /usr/bin/templates COPY --from=builder /build/jq /usr/bin/jq COPY code-templates /code-templates diff --git a/docker/code-templates/nodejs/blank-client/package.json b/docker/code-templates/nodejs/blank-client/package.json index 5628a38..d2219c5 100644 --- a/docker/code-templates/nodejs/blank-client/package.json +++ b/docker/code-templates/nodejs/blank-client/package.json @@ -1,6 +1,6 @@ { "name": "_projname_", "dependencies": { - "hotpocket-js-client": "0.5.4" + "hotpocket-js-client": "^0.5.6" } } diff --git a/docker/code-templates/nodejs/blank-contract/package.json b/docker/code-templates/nodejs/blank-contract/package.json index b325940..c9d6f07 100644 --- a/docker/code-templates/nodejs/blank-contract/package.json +++ b/docker/code-templates/nodejs/blank-contract/package.json @@ -2,11 +2,12 @@ "name": "_projname_", "version": "1.0.0", "scripts": { - "build": "npx ncc build src/_projname_.js -o dist", + "build": "npx ncc build src/contract.js -o dist", + "build:prod": "npx ncc build src/contract.js --minify -o dist", "start": "npm run build && hpdevkit deploy dist" }, "dependencies": { - "hotpocket-nodejs-contract": "0.5.10", + "hotpocket-nodejs-contract": "^0.7.3", "@vercel/ncc": "0.34.0" } } \ No newline at end of file diff --git a/docker/code-templates/nodejs/evernode-starter-client/_projname_.js b/docker/code-templates/nodejs/evernode-bootstrap-client/_projname_.js similarity index 98% rename from docker/code-templates/nodejs/evernode-starter-client/_projname_.js rename to docker/code-templates/nodejs/evernode-bootstrap-client/_projname_.js index efb2558..7cab2d2 100644 --- a/docker/code-templates/nodejs/evernode-starter-client/_projname_.js +++ b/docker/code-templates/nodejs/evernode-bootstrap-client/_projname_.js @@ -30,7 +30,7 @@ async function clientApp() { console.log('My public key is: ' + pkhex); const ip = process.argv[2] || 'localhost'; - const port = process.argv[3] || '8080'; + const port = process.argv[3] || '8081'; const client = await HotPocket.createClient( ['wss://' + ip + ':' + port], userKeyPair, diff --git a/docker/code-templates/nodejs/evernode-bootstrap-client/package.json b/docker/code-templates/nodejs/evernode-bootstrap-client/package.json new file mode 100644 index 0000000..e651437 --- /dev/null +++ b/docker/code-templates/nodejs/evernode-bootstrap-client/package.json @@ -0,0 +1,7 @@ +{ + "name": "_projname_", + "dependencies": { + "bson": "6.4.0", + "hotpocket-js-client": "^0.5.6" + } +} diff --git a/docker/code-templates/nodejs/file-client/_projname_.js b/docker/code-templates/nodejs/file-client/_projname_.js new file mode 100644 index 0000000..089b3b8 --- /dev/null +++ b/docker/code-templates/nodejs/file-client/_projname_.js @@ -0,0 +1,163 @@ +const fs = require('fs'); +const readline = require('readline'); +const bson = require('bson'); +const path = require("path"); +const HotPocket = require('hotpocket-js-client'); + +async function clientApp() { + + const keyFile = 'user.key'; + + // Re-generate a user key pair for the client. + if (process.argv[2] == 'generatekeys' || !fs.existsSync(keyFile)) { + const newKeyPair = await HotPocket.generateKeys(); + const saveData = Buffer.from(newKeyPair.privateKey).toString('hex'); + fs.writeFileSync(keyFile, saveData); + console.log('New key pair generated.'); + + if (process.argv[2] == 'generatekeys') { + const pkhex = Buffer.from(newKeyPair.publicKey).toString('hex'); + console.log('My public key is: ' + pkhex); + return; + } + } + + // Generate the key pair using saved private key data. + const savedPrivateKeyHex = fs.readFileSync(keyFile).toString(); + const userKeyPair = await HotPocket.generateKeys(savedPrivateKeyHex); + + const pkhex = Buffer.from(userKeyPair.publicKey).toString('hex'); + console.log('My public key is: ' + pkhex); + + const ip = process.argv[2] || 'localhost'; + const port = process.argv[3] || '8081'; + const client = await HotPocket.createClient( + ['wss://' + ip + ':' + port], + userKeyPair, + { protocol: HotPocket.protocols.bson } + ); + + // Establish HotPocket connection. + if (!await client.connect()) { + console.log('Connection failed.'); + return; + } + console.log('HotPocket Connected.'); + + // start listening for stdin + const rl = readline.createInterface({ + input: process.stdin, + output: process.stdout + }); + + // On ctrl + c we should close HP connection gracefully. + rl.on('SIGINT', () => { + console.log('SIGINT received...'); + rl.close(); + client.close(); + }); + + // This will get fired if HP server disconnects unexpectedly. + client.on(HotPocket.events.disconnect, () => { + console.log('Disconnected'); + rl.close(); + }); + + // This will get fired when contract sends an output. + client.on(HotPocket.events.contractOutput, (r) => { + + r.outputs.forEach(output => { + handleOutput(output, r.ledgerSeqNo); + }); + }); + + const handleOutput = (output, ledgerSeqNo) => { + // If bson.deserialize error occurred it'll be caught by this try catch. + try { + const result = bson.deserialize(output); + if (result.type == "uploadResult") { + if (result.status == "ok") + console.log(`(ledger:${ledgerSeqNo})>> ${result.status}`); + else + console.log(`(ledger:${ledgerSeqNo})>> Upload failed. reason: ${result.status}`); + } + else if (result.type == "deleteResult") { + if (result.status == "ok") + console.log(`(ledger:${ledgerSeqNo})>> ${result.status}`); + else + console.log(`(ledger:${ledgerSeqNo})>> Delete failed. reason: ${result.status}`); + } + else if (result.type == "downloadResult") { + if (result.status == "ok") + console.log(`(ledger:${ledgerSeqNo})>> ${result.content}`); + else + console.log(`(ledger:${ledgerSeqNo})>> Download failed. reason: ${result.status}`); + } + else { + console.log("Unknown contract output."); + } + } + catch (e) { + console.log(e) + } + } + + console.log("Ready to accept inputs."); + + const input_pump = () => { + rl.question('', async (inp) => { + let input; + if (inp.startsWith("download ")) { + const fileName = inp.substr(9); + + // Read only inputs can be sent as read requests, So it'll be quick. + const output = await client.submitContractReadRequest(bson.serialize({ + type: "download", + fileName: fileName, + })); + + handleOutput(output, (await client.getStatus()).ledgerSeqNo); + } + else if (inp.startsWith("upload ")) { + + const filePath = inp.substr(7); + const fileName = path.basename(filePath); + if (fs.existsSync(filePath)) { + const fileContent = fs.readFileSync(filePath); + const sizeKB = Math.round(fileContent.length / 1024); + console.log("Uploading file " + fileName + " (" + sizeKB + " KB)"); + + input = await client.submitContractInput(bson.serialize({ + type: "upload", + fileName: fileName, + content: fileContent + })); + } + else + console.log("File not found"); + } + else if (inp.startsWith("delete ")) { + const fileName = inp.substr(7); + + input = await client.submitContractInput(bson.serialize({ + type: "delete", + fileName: fileName, + })); + } + else { + console.log("Invalid command. [upload ], [delete ] or [download ] expected.") + } + + if (input) { + const submission = await input.submissionStatus; + if (submission.status != "accepted") + console.log("Submission failed. reason: " + submission.reason); + } + + input_pump(); + }) + } + input_pump(); +} + +clientApp(); \ No newline at end of file diff --git a/docker/code-templates/nodejs/file-client/package.json b/docker/code-templates/nodejs/file-client/package.json new file mode 100644 index 0000000..e651437 --- /dev/null +++ b/docker/code-templates/nodejs/file-client/package.json @@ -0,0 +1,7 @@ +{ + "name": "_projname_", + "dependencies": { + "bson": "6.4.0", + "hotpocket-js-client": "^0.5.6" + } +} diff --git a/docker/code-templates/nodejs/file-contract/dist/hp.cfg.override b/docker/code-templates/nodejs/file-contract/dist/hp.cfg.override new file mode 100644 index 0000000..00e1e78 --- /dev/null +++ b/docker/code-templates/nodejs/file-contract/dist/hp.cfg.override @@ -0,0 +1,6 @@ +{ + "contract": { + "bin_path": "/usr/bin/node", + "bin_args": "index.js" + } +} \ No newline at end of file diff --git a/docker/code-templates/nodejs/file-contract/package.json b/docker/code-templates/nodejs/file-contract/package.json new file mode 100644 index 0000000..55ca623 --- /dev/null +++ b/docker/code-templates/nodejs/file-contract/package.json @@ -0,0 +1,14 @@ +{ + "name": "_projname_", + "version": "1.0.0", + "scripts": { + "build": "npx ncc build src/contract.js -o dist", + "build:prod": "npx ncc build src/contract.js --minify -o dist", + "start": "npm run build && hpdevkit deploy dist" + }, + "dependencies": { + "bson": "6.4.0", + "hotpocket-nodejs-contract": "^0.7.3", + "@vercel/ncc": "0.34.0" + } +} \ No newline at end of file diff --git a/docker/code-templates/nodejs/file-contract/src/_projname_.js b/docker/code-templates/nodejs/file-contract/src/_projname_.js new file mode 100644 index 0000000..64837f7 --- /dev/null +++ b/docker/code-templates/nodejs/file-contract/src/_projname_.js @@ -0,0 +1,98 @@ +const fs = require('fs'); +const bson = require('bson'); + +export class _projname_ { + sendOutput; // This function must be wired up by the caller. + + async handleRequest(user, msg, isReadOnly) { + + // This sample application defines simple file operations. + // It's up to the application to decide the structure and contents of messages. + + if (msg.type == "upload") { + // Check already exist. + if (fs.existsSync(msg.fileName)) { + await user.send(bson.serialize({ + type: "uploadResult", + status: "already_exists", + fileName: msg.fileName + })); + } + // Error is too large. + else if (msg.content.length > 10 * 1024 * 1024) { // 10MB + await user.send(bson.serialize({ + type: "uploadResult", + status: "too_large", + fileName: msg.fileName + })); + } + else { + // Do not write in read only mode. + if (!isReadOnly) { + // Save the file. + fs.writeFileSync(msg.fileName, msg.content.buffer); + + await user.send(bson.serialize({ + type: "uploadResult", + status: "ok", + fileName: msg.fileName + })); + } + else { + await this.sendOutput(user, { + type: "uploadResult", + status: "error", + error: 'Write is not supported in readonly mode' + }) + } + } + } + else if (msg.type == "delete") { + // Delete if exist. + if (fs.existsSync(msg.fileName)) { + // Do not delete in read only mode. + if (!isReadOnly) { + fs.unlinkSync(msg.fileName); + await user.send(bson.serialize({ + type: "deleteResult", + status: "ok", + fileName: msg.fileName + })); + } + else { + await this.sendOutput(user, { + type: "deleteResult", + status: "error", + error: 'Delete is not supported in readonly mode' + }) + } + } + else { + await user.send(bson.serialize({ + type: "deleteResult", + status: "not_found", + fileName: msg.fileName + })); + } + } + // Send file if exist. + else if (msg.type == "download") { + if (fs.existsSync(msg.fileName)) { + const fileContent = fs.readFileSync(msg.fileName); + await user.send(bson.serialize({ + type: "downloadResult", + status: "ok", + fileName: msg.fileName, + content: fileContent + })); + } + else { + await user.send(bson.serialize({ + type: "downloadResult", + status: "not_found", + fileName: msg.fileName + })); + } + } + } +} \ No newline at end of file diff --git a/docker/code-templates/nodejs/file-contract/src/contract.js b/docker/code-templates/nodejs/file-contract/src/contract.js new file mode 100644 index 0000000..90d7d29 --- /dev/null +++ b/docker/code-templates/nodejs/file-contract/src/contract.js @@ -0,0 +1,48 @@ +const HotPocket = require('hotpocket-nodejs-contract'); +const bson = require('bson'); +const { _projname_ } = require('./_projname_'); + +// HotPocket smart contract is defined as a function which takes the HotPocket contract context as an argument. +// This function gets invoked every consensus round and whenever a user sends a out-of-concensus read-request. +async function contract(ctx) { + + // Create our application logic component. + // This pattern allows us to test the application logic independently of HotPocket. + const app = new _projname_(); + + // Wire-up output emissions from the application before we pass user inputs to it. + app.sendOutput = async (user, output) => { + await user.send(output) + } + + // In 'readonly' mode, nothing our contract does will get persisted on the ledger. The benefit is + // readonly messages gets processed much faster due to not being subjected to consensus. + // We should only use readonly mode for returning/replying data for the requesting user. + // + // In consensus mode (NOT read-only), we can do anything like persisting to data storage and/or + // sending data to any connected user at the time. Everything will get subjected to consensus so + // there is a time-penalty. + const isReadOnly = ctx.readonly; + + // Process user inputs. + // Loop through list of users who have sent us inputs. + for (const user of ctx.users.list()) { + + // Loop through inputs sent by each user. + for (const input of user.inputs) { + + // Read the data buffer sent by user (this can be any kind of data like string, json or binary data). + const buf = await ctx.users.read(input); + + // Let's assume all data buffers for this contract are binary. + // In real-world apps, we need to gracefully filter out invalid data formats for our contract. + const msg = bson.deserialize(buf); + + // Pass the JSON message to our application logic component. + await app.handleRequest(user, msg, isReadOnly); + } + } +} + +const hpc = new HotPocket.Contract(); +hpc.init(contract); \ No newline at end of file diff --git a/docker/code-templates/nodejs/multisig-client/_projname_.js b/docker/code-templates/nodejs/multisig-client/_projname_.js new file mode 100644 index 0000000..46c5e61 --- /dev/null +++ b/docker/code-templates/nodejs/multisig-client/_projname_.js @@ -0,0 +1,89 @@ +const readline = require('readline'); +const HotPocket = require('hotpocket-js-client'); + +async function clientApp() { + + const userKeyPair = await HotPocket.generateKeys(); + const client = await HotPocket.createClient(['wss://localhost:8081'], userKeyPair); + + // Establish HotPocket connection. + if (!await client.connect()) { + console.log('Connection failed.'); + return; + } + + console.log('HotPocket Connected.'); + + // start listening for stdin + const rl = readline.createInterface({ + input: process.stdin, + output: process.stdout + }); + + // On ctrl + c we should close HP connection gracefully. + rl.on('SIGINT', () => { + console.log('SIGINT received...'); + rl.close(); + client.close(); + }); + + // This will get fired if HP server disconnects unexpectedly. + client.on(HotPocket.events.disconnect, () => { + console.log('Disconnected'); + rl.close(); + }); + + // This will get fired when contract sends an output. + client.on(HotPocket.events.contractOutput, (r) => { + r.outputs.forEach(output => { + handleOutput(output, r.ledgerSeqNo); + }); + }); + + const handleOutput = (output, ledgerSeqNo) => { + if (output.type == "makePaymentResult") { + if (output.status == "ok") + console.log(`(ledger:${ledgerSeqNo})>> `, output.data); + else + console.log(`(ledger:${ledgerSeqNo})>> Payment failed. reason: `, output.error ?? output.status); + } + else { + console.log("Unknown contract output.", output); + } + } + + console.log("Ready to accept inputs."); + + const input_pump = () => { + rl.question('', async (inp) => { + let input; + if (inp.startsWith("makePayment ")) { + const params = inp.split(' '); + if (params.length == 3) { + input = await client.submitContractInput(JSON.stringify({ + type: "makePayment", + sender: params[1], + receiver: params[2] + })); + } + else { + console.log("Invalid command. [makePayment ]"); + } + } + else { + console.log("Invalid command. [makePayment ]"); + } + + if (input) { + const submission = await input.submissionStatus; + if (submission.status != "accepted") + console.log("Submission failed. reason: " + submission.reason); + } + + input_pump(); + }) + } + input_pump(); +} + +clientApp(); \ No newline at end of file diff --git a/docker/code-templates/nodejs/evernode-starter-client/package.json b/docker/code-templates/nodejs/multisig-client/package.json similarity index 59% rename from docker/code-templates/nodejs/evernode-starter-client/package.json rename to docker/code-templates/nodejs/multisig-client/package.json index 5628a38..d2219c5 100644 --- a/docker/code-templates/nodejs/evernode-starter-client/package.json +++ b/docker/code-templates/nodejs/multisig-client/package.json @@ -1,6 +1,6 @@ { "name": "_projname_", "dependencies": { - "hotpocket-js-client": "0.5.4" + "hotpocket-js-client": "^0.5.6" } } diff --git a/docker/code-templates/nodejs/multisig-contract/dist/hp.cfg.override b/docker/code-templates/nodejs/multisig-contract/dist/hp.cfg.override new file mode 100644 index 0000000..00e1e78 --- /dev/null +++ b/docker/code-templates/nodejs/multisig-contract/dist/hp.cfg.override @@ -0,0 +1,6 @@ +{ + "contract": { + "bin_path": "/usr/bin/node", + "bin_args": "index.js" + } +} \ No newline at end of file diff --git a/docker/code-templates/nodejs/multisig-contract/package.json b/docker/code-templates/nodejs/multisig-contract/package.json new file mode 100644 index 0000000..81c6248 --- /dev/null +++ b/docker/code-templates/nodejs/multisig-contract/package.json @@ -0,0 +1,14 @@ +{ + "name": "_projname_", + "version": "1.0.0", + "scripts": { + "build": "npx ncc build src/contract.js -o dist", + "build:prod": "npx ncc build src/contract.js --minify -o dist", + "start": "npm run build && hpdevkit deploy dist" + }, + "dependencies": { + "hotpocket-nodejs-contract": "^0.7.3", + "everpocket-nodejs-contract": "^0.1.3", + "@vercel/ncc": "0.34.0" + } +} \ No newline at end of file diff --git a/docker/code-templates/nodejs/multisig-contract/src/_projname_.js b/docker/code-templates/nodejs/multisig-contract/src/_projname_.js new file mode 100644 index 0000000..4e36e6b --- /dev/null +++ b/docker/code-templates/nodejs/multisig-contract/src/_projname_.js @@ -0,0 +1,72 @@ +const evp = require('everpocket-nodejs-contract'); + +export class _projname_ { + sendOutput; // This function must be wired up by the caller. + voteContext; + hpContext; + + // This function will be called in each contract execution. + async handleContractExecution(ctx) { + this.voteContext = new evp.VoteContext(ctx); + this.hpContext = new evp.HotPocketContext(ctx, { voteContext: this.voteContext }); + + if (!ctx.readonly) { + // Listen to incoming unl messages and feed them to elector. + ctx.unl.onMessage((node, msg) => { + this.voteContext.feedUnlMessage(node, msg); + }); + } + } + + async handleRequest(user, message, isReadOnly) { + // This sample application defines two simple messages. 'get' and 'set'. + // It's up to the application to decide the structure and contents of messages. + + if (message.type == 'makePayment') { + if (isReadOnly) { + await this.sendOutput(user, { + type: 'makePaymentResult', + status: 'error', + error: 'Submit multisig not supported in readonly mode' + }) + + return; + } + + + const sender = message.sender; + const receiver = message.receiver; + + try { + const xrplContext = new evp.XrplContext(this.hpContext, sender); + await xrplContext.init(); + const tx = await xrplContext.xrplAcc.prepareMakePayment(receiver, "1", "XRP") + + console.log("----------- Multi-Signing Transaction"); + const res = await xrplContext.multiSignAndSubmitTransaction(tx); + console.log("Transaction submitted"); + + await this.sendOutput(user, { + type: 'makePaymentResult', + status: 'ok', + data: res + }) + } + catch (e) { + console.error(e); + + await this.sendOutput(user, { + type: 'makePaymentResult', + status: 'error', + error: e + }) + } + } + else { + await this.sendOutput(user, { + status: 'error', + error: 'Unknown message type' + }) + } + } +} \ No newline at end of file diff --git a/docker/code-templates/nodejs/multisig-contract/src/contract.js b/docker/code-templates/nodejs/multisig-contract/src/contract.js new file mode 100644 index 0000000..b2f540b --- /dev/null +++ b/docker/code-templates/nodejs/multisig-contract/src/contract.js @@ -0,0 +1,50 @@ +const HotPocket = require('hotpocket-nodejs-contract'); +const { _projname_ } = require('./_projname_'); + +// HotPocket smart contract is defined as a function which takes the HotPocket contract context as an argument. +// This function gets invoked every consensus round and whenever a user sends a out-of-concensus read-request. +async function contract(ctx) { + + // Create our application logic component. + // This pattern allows us to test the application logic independently of HotPocket. + const app = new _projname_(); + + // Wire-up output emissions from the application before we pass user inputs to it. + app.sendOutput = async (user, output) => { + await user.send(output) + } + + // In 'readonly' mode, nothing our contract does will get persisted on the ledger. The benefit is + // readonly messages gets processed much faster due to not being subjected to consensus. + // We should only use readonly mode for returning/replying data for the requesting user. + // + // In consensus mode (NOT read-only), we can do anything like persisting to data storage and/or + // sending data to any connected user at the time. Everything will get subjected to consensus so + // there is a time-penalty. + const isReadOnly = ctx.readonly; + + // This function is executed per each contract round. + await app.handleContractExecution(ctx); + + // Process user inputs. + // Loop through list of users who have sent us inputs. + for (const user of ctx.users.list()) { + + // Loop through inputs sent by each user. + for (const input of user.inputs) { + + // Read the data buffer sent by user (this can be any kind of data like string, json or binary data). + const buf = await ctx.users.read(input); + + // Let's assume all data buffers for this contract are JSON. + // In real-world apps, we need to gracefully filter out invalid data formats for our contract. + const message = JSON.parse(buf); + + // Pass the JSON message to our application logic component. + await app.handleRequest(user, message, isReadOnly); + } + } +} + +const hpc = new HotPocket.Contract(); +hpc.init(contract); \ No newline at end of file diff --git a/docker/code-templates/nodejs/npl-client/_projname_.js b/docker/code-templates/nodejs/npl-client/_projname_.js new file mode 100644 index 0000000..30d643c --- /dev/null +++ b/docker/code-templates/nodejs/npl-client/_projname_.js @@ -0,0 +1,78 @@ +const readline = require('readline'); +const HotPocket = require('hotpocket-js-client'); + +async function clientApp() { + + const userKeyPair = await HotPocket.generateKeys(); + const client = await HotPocket.createClient(['wss://localhost:8081'], userKeyPair); + + // Establish HotPocket connection. + if (!await client.connect()) { + console.log('Connection failed.'); + return; + } + + console.log('HotPocket Connected.'); + + // start listening for stdin + const rl = readline.createInterface({ + input: process.stdin, + output: process.stdout + }); + + // On ctrl + c we should close HP connection gracefully. + rl.on('SIGINT', () => { + console.log('SIGINT received...'); + rl.close(); + client.close(); + }); + + // This will get fired if HP server disconnects unexpectedly. + client.on(HotPocket.events.disconnect, () => { + console.log('Disconnected'); + rl.close(); + }); + + // This will get fired when contract sends an output. + client.on(HotPocket.events.contractOutput, (r) => { + r.outputs.forEach(output => { + if (output.type == "rndResult") { + if (output.status == "ok") + console.log(`(ledger:${r.ledgerSeqNo})>> ${JSON.stringify(output)}`); + else + console.log(`(ledger:${r.ledgerSeqNo})>> Rnd failed. reason: ${output.error}`); + } + else { + console.log("Unknown contract output."); + } + }); + }); + + console.log("Ready to accept inputs."); + + const input_pump = () => { + rl.question('', async (inp) => { + let input; + if (inp.startsWith("rnd")) { + + input = await client.submitContractInput(JSON.stringify({ + type: "rnd" + })); + } + else { + console.log("Invalid command. [rnd] expected.") + } + + if (input) { + const submission = await input.submissionStatus; + if (submission.status != "accepted") + console.log("Submission failed. reason: " + submission.reason); + } + + input_pump(); + }) + } + input_pump(); +} + +clientApp(); \ No newline at end of file diff --git a/docker/code-templates/nodejs/npl-client/package.json b/docker/code-templates/nodejs/npl-client/package.json new file mode 100644 index 0000000..d2219c5 --- /dev/null +++ b/docker/code-templates/nodejs/npl-client/package.json @@ -0,0 +1,6 @@ +{ + "name": "_projname_", + "dependencies": { + "hotpocket-js-client": "^0.5.6" + } +} diff --git a/docker/code-templates/nodejs/npl-contract/dist/hp.cfg.override b/docker/code-templates/nodejs/npl-contract/dist/hp.cfg.override new file mode 100644 index 0000000..00e1e78 --- /dev/null +++ b/docker/code-templates/nodejs/npl-contract/dist/hp.cfg.override @@ -0,0 +1,6 @@ +{ + "contract": { + "bin_path": "/usr/bin/node", + "bin_args": "index.js" + } +} \ No newline at end of file diff --git a/docker/code-templates/nodejs/npl-contract/package.json b/docker/code-templates/nodejs/npl-contract/package.json new file mode 100644 index 0000000..14aa800 --- /dev/null +++ b/docker/code-templates/nodejs/npl-contract/package.json @@ -0,0 +1,13 @@ +{ + "name": "_projname_", + "version": "1.0.0", + "scripts": { + "build": "npx ncc build src/contract.js -o dist", + "build:prod": "npx ncc build src/contract.js --minify -o dist", + "start": "npm run build && hpdevkit deploy dist" + }, + "dependencies": { + "hotpocket-nodejs-contract": "^0.7.3", + "@vercel/ncc": "0.34.0" + } +} \ No newline at end of file diff --git a/docker/code-templates/nodejs/npl-contract/src/_projname_.js b/docker/code-templates/nodejs/npl-contract/src/_projname_.js new file mode 100644 index 0000000..34cdf97 --- /dev/null +++ b/docker/code-templates/nodejs/npl-contract/src/_projname_.js @@ -0,0 +1,65 @@ +export class _projname_ { + sendOutput; // This function must be wired up by the caller. + + async handleRequest(user, message, unl, timeout, isReadOnly) { + + // This sample application defines a simple messages. 'rnd' and 'set'. + // It's up to the application to decide the structure and contents of messages. + + if (message.type == 'rnd') { + + // NPL messages are not supported in readonly mode. + if (!isReadOnly) { + // Start listening to incoming NPL messages before we send ours. + const promise = new Promise((resolve, reject) => { + let t = setTimeout(() => { + reject(`NPL messages aren't received withing ${timeout} ms.`); + }, timeout); + + let nplRes = []; + unl.onMessage((node, msg) => { + nplRes.push({ pubkey: node.publicKey, number: Number(msg.toString()) }); + // Resolve once all are received + if (nplRes.length === unl.count()) { + clearTimeout(t); + resolve(nplRes.sort((a, b) => a.number - b.number)); + } + }); + }); + + await unl.send(Math.random().toString()); + + try { + const receipt = await promise; + + await this.sendOutput(user, { + type: 'rndResult', + status: "ok", + nplMessages: receipt, + rnd: receipt[0].number + }); + } + catch (e) { + await this.sendOutput(user, { + type: "rndResult", + status: "error", + error: e.toString() + }); + } + } + else { + await this.sendOutput(user, { + type: "rndResult", + status: "error", + error: 'NPL messages are not supported in readonly mode' + }); + } + } + else { + await this.sendOutput(user, { + type: 'error', + error: 'Unknown message type' + }) + } + } +} \ No newline at end of file diff --git a/docker/code-templates/nodejs/npl-contract/src/contract.js b/docker/code-templates/nodejs/npl-contract/src/contract.js new file mode 100644 index 0000000..65137cb --- /dev/null +++ b/docker/code-templates/nodejs/npl-contract/src/contract.js @@ -0,0 +1,53 @@ +const HotPocket = require('hotpocket-nodejs-contract'); +const { _projname_ } = require('./_projname_'); + +// HotPocket smart contract is defined as a function which takes the HotPocket contract context as an argument. +// This function gets invoked every consensus round and whenever a user sends a out-of-concensus read-request. +async function contract(ctx) { + + // Create our application logic component. + // This pattern allows us to test the application logic independently of HotPocket. + const app = new _projname_(); + + // Wire-up output emissions from the application before we pass user inputs to it. + app.sendOutput = async (user, output) => { + await user.send(output) + } + + // In 'readonly' mode, nothing our contract does will get persisted on the ledger. The benefit is + // readonly messages gets processed much faster due to not being subjected to consensus. + // We should only use readonly mode for returning/replying data for the requesting user. + // + // In consensus mode (NOT read-only), we can do anything like persisting to data storage and/or + // sending data to any connected user at the time. Everything will get subjected to consensus so + // there is a time-penalty. + const isReadOnly = ctx.readonly; + + // Access the HotPocket config. + const hpconfig = await ctx.getConfig(); + // Wait only for half of roundtime for random number generation. + const timeout = Math.ceil(hpconfig.consensus.roundtime); + + + // Process user inputs. + // Loop through list of users who have sent us inputs. + for (const user of ctx.users.list()) { + + // Loop through inputs sent by each user. + for (const input of user.inputs) { + + // Read the data buffer sent by user (this can be any kind of data like string, json or binary data). + const buf = await ctx.users.read(input); + + // Let's assume all data buffers for this contract are JSON. + // In real-world apps, we need to gracefully filter out invalid data formats for our contract. + const message = JSON.parse(buf); + + // Pass the JSON message to our application logic component. + await app.handleRequest(user, message, ctx.unl, timeout, isReadOnly); + } + } +} + +const hpc = new HotPocket.Contract(); +hpc.init(contract); \ No newline at end of file diff --git a/docker/code-templates/nodejs/starter-client/_projname_.js b/docker/code-templates/nodejs/starter-client/_projname_.js new file mode 100644 index 0000000..3a99009 --- /dev/null +++ b/docker/code-templates/nodejs/starter-client/_projname_.js @@ -0,0 +1,115 @@ +const readline = require('readline'); +const HotPocket = require('hotpocket-js-client'); + +async function clientApp() { + + const userKeyPair = await HotPocket.generateKeys(); + const client = await HotPocket.createClient(['wss://localhost:8081'], userKeyPair); + + // Establish HotPocket connection. + if (!await client.connect()) { + console.log('Connection failed.'); + return; + } + + console.log('HotPocket Connected.'); + + // start listening for stdin + const rl = readline.createInterface({ + input: process.stdin, + output: process.stdout + }); + + // On ctrl + c we should close HP connection gracefully. + rl.on('SIGINT', () => { + console.log('SIGINT received...'); + rl.close(); + client.close(); + }); + + // This will get fired if HP server disconnects unexpectedly. + client.on(HotPocket.events.disconnect, () => { + console.log('Disconnected'); + rl.close(); + }); + + // This will get fired when contract sends an output. + client.on(HotPocket.events.contractOutput, (r) => { + r.outputs.forEach(output => { + handleOutput(output, r.ledgerSeqNo); + }); + }); + + const handleOutput = (output, ledgerSeqNo) => { + if (output.type == "statResult") { + console.log(`(ledger:${ledgerSeqNo})>> ${output.data}`); + } + else if (output.type == "dataResult") { + console.log(`(ledger:${ledgerSeqNo})>> ${output.data}`); + } + else if (output.type == "error") { + console.log(`(ledger:${ledgerSeqNo})>> Error: ${output.error}`); + } + else { + console.log("Unknown contract output."); + } + } + + console.log("Ready to accept inputs."); + + const input_pump = () => { + rl.question('', async (inp) => { + let input; + if (inp.startsWith("stat")) { + // Get contract status by read request and contract input. + // This output means + // Read request - contract is deployed and excitable. + // Contract input - node are in sync. + if (inp.startsWith("stat contract")) { + input = await client.submitContractInput(JSON.stringify({ + type: "stat" + })); + } + else if (inp.startsWith("stat read")) { + const output = await client.submitContractReadRequest(JSON.stringify({ + type: "stat" + })); + handleOutput(output, (await client.getStatus()).ledgerSeqNo); + } + else { + const res = await client.getStatus(); + console.log(res); + } + } + else if (inp.startsWith("set ")) { + input = await client.submitContractInput(JSON.stringify({ + type: "set", + data: inp.substr(4) + })); + } + else if (inp.startsWith("get")) { + + // Read only inputs can be sent as read requests, So it'll be quick. + const output = await client.submitContractReadRequest(JSON.stringify({ + type: "get" + })); + + handleOutput(output, (await client.getStatus()).ledgerSeqNo); + } + else { + console.log("Invalid command. [set ] or [get] expected.") + } + + if (input) { + const submission = await input.submissionStatus; + if (submission.status != "accepted") + console.log("Submission failed. reason: " + submission.reason); + } + + input_pump(); + }) + } + input_pump(); +} + +clientApp(); \ No newline at end of file diff --git a/docker/code-templates/nodejs/starter-client/package.json b/docker/code-templates/nodejs/starter-client/package.json new file mode 100644 index 0000000..d2219c5 --- /dev/null +++ b/docker/code-templates/nodejs/starter-client/package.json @@ -0,0 +1,6 @@ +{ + "name": "_projname_", + "dependencies": { + "hotpocket-js-client": "^0.5.6" + } +} diff --git a/docker/code-templates/nodejs/starter-contract/.gitignore b/docker/code-templates/nodejs/starter-contract/.gitignore deleted file mode 100644 index cd4211e..0000000 --- a/docker/code-templates/nodejs/starter-contract/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules -index.js \ No newline at end of file diff --git a/docker/code-templates/nodejs/starter-contract/package-lock.json b/docker/code-templates/nodejs/starter-contract/package-lock.json deleted file mode 100644 index e5519ef..0000000 --- a/docker/code-templates/nodejs/starter-contract/package-lock.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "_projname_", - "version": "1.0.0", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "name": "_projname_", - "version": "1.0.0", - "dependencies": { - "@vercel/ncc": "0.34.0", - "hotpocket-nodejs-contract": "0.5.6" - } - }, - "node_modules/@vercel/ncc": { - "version": "0.34.0", - "resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.34.0.tgz", - "integrity": "sha512-G9h5ZLBJ/V57Ou9vz5hI8pda/YQX5HQszCs3AmIus3XzsmRn/0Ptic5otD3xVST8QLKk7AMk7AqpsyQGN7MZ9A==", - "bin": { - "ncc": "dist/ncc/cli.js" - } - }, - "node_modules/hotpocket-nodejs-contract": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/hotpocket-nodejs-contract/-/hotpocket-nodejs-contract-0.5.6.tgz", - "integrity": "sha512-Q52cE5lYGoVGvdUl3cDYixAh27QxzFF6JFaOm1+HoXU36dsKxZfDeJLGCfnDf4XcgEytM2mPE9STWUV+mdHqEg==" - } - }, - "dependencies": { - "@vercel/ncc": { - "version": "0.34.0", - "resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.34.0.tgz", - "integrity": "sha512-G9h5ZLBJ/V57Ou9vz5hI8pda/YQX5HQszCs3AmIus3XzsmRn/0Ptic5otD3xVST8QLKk7AMk7AqpsyQGN7MZ9A==" - }, - "hotpocket-nodejs-contract": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/hotpocket-nodejs-contract/-/hotpocket-nodejs-contract-0.5.6.tgz", - "integrity": "sha512-Q52cE5lYGoVGvdUl3cDYixAh27QxzFF6JFaOm1+HoXU36dsKxZfDeJLGCfnDf4XcgEytM2mPE9STWUV+mdHqEg==" - } - } -} diff --git a/docker/code-templates/nodejs/starter-contract/package.json b/docker/code-templates/nodejs/starter-contract/package.json index fd2bf42..14aa800 100644 --- a/docker/code-templates/nodejs/starter-contract/package.json +++ b/docker/code-templates/nodejs/starter-contract/package.json @@ -7,7 +7,7 @@ "start": "npm run build && hpdevkit deploy dist" }, "dependencies": { - "hotpocket-nodejs-contract": "0.5.10", + "hotpocket-nodejs-contract": "^0.7.3", "@vercel/ncc": "0.34.0" } } \ No newline at end of file diff --git a/docker/code-templates/nodejs/starter-contract/src/_projname_.js b/docker/code-templates/nodejs/starter-contract/src/_projname_.js index 12fb1fc..388efba 100644 --- a/docker/code-templates/nodejs/starter-contract/src/_projname_.js +++ b/docker/code-templates/nodejs/starter-contract/src/_projname_.js @@ -8,16 +8,23 @@ export class _projname_ { sendOutput; // This function must be wired up by the caller. async handleRequest(user, message, isReadOnly) { - // This sample application defines two simple messages. 'get' and 'set'. // It's up to the application to decide the structure and contents of messages. - if (message.type == 'get') { + if (message.type == 'stat') { + + // Send response as the status. + await this.sendOutput(user, { + type: 'statResult', + data: 'Contract is online' + }) + } + else if (message.type == 'get') { // Retrieved previously saved data and return to the user. const data = await this.getData(); await this.sendOutput(user, { - type: 'data_result', + type: 'dataResult', data: data }) } @@ -26,6 +33,11 @@ export class _projname_ { if (!isReadOnly) { // Save the provided data into storage. await this.setData(message.data); + + await this.sendOutput(user, { + type: 'dataResult', + data: 'success' + }) } else { await this.sendOutput(user, { diff --git a/docker/code-templates/nodejs/starter-contract/src/contract.js b/docker/code-templates/nodejs/starter-contract/src/contract.js index 9fa89e7..4532c30 100644 --- a/docker/code-templates/nodejs/starter-contract/src/contract.js +++ b/docker/code-templates/nodejs/starter-contract/src/contract.js @@ -34,7 +34,7 @@ async function contract(ctx) { const buf = await ctx.users.read(input); // Let's assume all data buffers for this contract are JSON. - // In real-world apps, we need to gracefully fitler out invalid data formats for our contract. + // In real-world apps, we need to gracefully filter out invalid data formats for our contract. const message = JSON.parse(buf); // Pass the JSON message to our application logic component. diff --git a/docker/code-templates/nodejs/upgrader-client/_projname_.js b/docker/code-templates/nodejs/upgrader-client/_projname_.js new file mode 100644 index 0000000..1aae0da --- /dev/null +++ b/docker/code-templates/nodejs/upgrader-client/_projname_.js @@ -0,0 +1,131 @@ +const fs = require('fs'); +const readline = require('readline'); +const bson = require('bson'); +const path = require("path"); +const HotPocket = require('hotpocket-js-client'); + +async function clientApp() { + + const keyFile = 'user.key'; + + // Re-generate a user key pair for the client. + if (process.argv[2] == 'generatekeys' || !fs.existsSync(keyFile)) { + const newKeyPair = await HotPocket.generateKeys(); + const saveData = Buffer.from(newKeyPair.privateKey).toString('hex'); + fs.writeFileSync(keyFile, saveData); + console.log('New key pair generated.'); + + if (process.argv[2] == 'generatekeys') { + const pkhex = Buffer.from(newKeyPair.publicKey).toString('hex'); + console.log('My public key is: ' + pkhex); + return; + } + } + + // Generate the key pair using saved private key data. + const savedPrivateKeyHex = fs.readFileSync(keyFile).toString(); + const userKeyPair = await HotPocket.generateKeys(savedPrivateKeyHex); + + const pkhex = Buffer.from(userKeyPair.publicKey).toString('hex'); + console.log('My public key is: ' + pkhex); + + const ip = process.argv[2] || 'localhost'; + const port = process.argv[3] || '8081'; + const client = await HotPocket.createClient( + ['wss://' + ip + ':' + port], + userKeyPair, + { protocol: HotPocket.protocols.bson } + ); + + // Establish HotPocket connection. + if (!await client.connect()) { + console.log('Connection failed.'); + return; + } + console.log('HotPocket Connected.'); + + // start listening for stdin + const rl = readline.createInterface({ + input: process.stdin, + output: process.stdout + }); + + // On ctrl + c we should close HP connection gracefully. + rl.on('SIGINT', () => { + console.log('SIGINT received...'); + rl.close(); + client.close(); + }); + + // This will get fired if HP server disconnects unexpectedly. + client.on(HotPocket.events.disconnect, () => { + console.log('Disconnected'); + rl.close(); + }); + + // This will get fired when contract sends an output. + client.on(HotPocket.events.contractOutput, (r) => { + + r.outputs.forEach(output => { + handleOutput(output, r.ledgerSeqNo); + }); + }); + + const handleOutput = (output, ledgerSeqNo) => { + // If bson.deserialize error occurred it'll be caught by this try catch. + try { + const result = bson.deserialize(output); + if (result.type == "upgradeResult") { + if (result.status == "ok") + console.log(`(ledger:${ledgerSeqNo})>> ${result.status}`); + else + console.log(`(ledger:${ledgerSeqNo})>> Upgrade failed. reason: `, result.error ?? result.status); + } + else { + console.log("Unknown contract output."); + } + } + catch (e) { + console.log(e) + } + } + + console.log("Ready to accept inputs."); + + const input_pump = () => { + rl.question('', async (inp) => { + let input; + if (inp.startsWith("upgrade ")) { + + const filePath = inp.substr(8); + const fileName = path.basename(filePath); + if (fs.existsSync(filePath)) { + const fileContent = fs.readFileSync(filePath); + const sizeKB = Math.round(fileContent.length / 1024); + console.log("Uploading file " + fileName + " (" + sizeKB + " KB)"); + + input = await client.submitContractInput(bson.serialize({ + type: "upgrade", + content: fileContent + })); + } + else + console.log("File not found"); + } + else { + console.log("Invalid command. [upgrade ] expected.") + } + + if (input) { + const submission = await input.submissionStatus; + if (submission.status != "accepted") + console.log("Submission failed. reason: " + submission.reason); + } + + input_pump(); + }) + } + input_pump(); +} + +clientApp(); \ No newline at end of file diff --git a/docker/code-templates/nodejs/upgrader-client/package.json b/docker/code-templates/nodejs/upgrader-client/package.json new file mode 100644 index 0000000..e651437 --- /dev/null +++ b/docker/code-templates/nodejs/upgrader-client/package.json @@ -0,0 +1,7 @@ +{ + "name": "_projname_", + "dependencies": { + "bson": "6.4.0", + "hotpocket-js-client": "^0.5.6" + } +} diff --git a/docker/code-templates/nodejs/upgrader-contract/dist/hp.cfg.override b/docker/code-templates/nodejs/upgrader-contract/dist/hp.cfg.override new file mode 100644 index 0000000..00e1e78 --- /dev/null +++ b/docker/code-templates/nodejs/upgrader-contract/dist/hp.cfg.override @@ -0,0 +1,6 @@ +{ + "contract": { + "bin_path": "/usr/bin/node", + "bin_args": "index.js" + } +} \ No newline at end of file diff --git a/docker/code-templates/nodejs/upgrader-contract/dist/post_exec.sh b/docker/code-templates/nodejs/upgrader-contract/dist/post_exec.sh new file mode 100755 index 0000000..b65de42 --- /dev/null +++ b/docker/code-templates/nodejs/upgrader-contract/dist/post_exec.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +# Install unzip, jq if not installed, because it's required for the upgrader. + +if ! command -v unzip &>/dev/null; then + echo "Installing unzip" + apt-get update + apt-get install -y unzip +fi + +if ! command -v jq &>/dev/null; then + echo "Installing unzip" + apt-get update + apt-get install -y jq +fi \ No newline at end of file diff --git a/docker/code-templates/nodejs/upgrader-contract/package.json b/docker/code-templates/nodejs/upgrader-contract/package.json new file mode 100644 index 0000000..55ca623 --- /dev/null +++ b/docker/code-templates/nodejs/upgrader-contract/package.json @@ -0,0 +1,14 @@ +{ + "name": "_projname_", + "version": "1.0.0", + "scripts": { + "build": "npx ncc build src/contract.js -o dist", + "build:prod": "npx ncc build src/contract.js --minify -o dist", + "start": "npm run build && hpdevkit deploy dist" + }, + "dependencies": { + "bson": "6.4.0", + "hotpocket-nodejs-contract": "^0.7.3", + "@vercel/ncc": "0.34.0" + } +} \ No newline at end of file diff --git a/docker/code-templates/nodejs/upgrader-contract/src/_projname_.js b/docker/code-templates/nodejs/upgrader-contract/src/_projname_.js new file mode 100644 index 0000000..ae7e8cf --- /dev/null +++ b/docker/code-templates/nodejs/upgrader-contract/src/_projname_.js @@ -0,0 +1,193 @@ +const fs = require('fs'); +const bson = require('bson'); +const child_process = require('child_process'); + +const BUNDLE = "bundle.zip"; +const HP_CFG_OVERRIDE = "hp.cfg.override"; +const CONTRACT_CFG = "contract.config"; +const INSTALL_SCRIPT = "install.sh" +const PATH_CFG = "../patch.cfg" +const BACKUP_PATH_CFG = "../patch.cfg.bk" +const HP_POST_EXEC_SCRIPT = "post_exec.sh"; +const BACKUP = "backup"; +const POST_EXEC_ERR_FILE = "post_exec.err" + +export class _projname_ { + sendOutput; // This function must be wired up by the caller. + postExecErrors = {}; + + // This function will be called in each contract execution. + async handleContractExecution() { + // Read and clear the error file. + if (fs.existsSync(POST_EXEC_ERR_FILE)) { + this.postExecErrors = fs.readFileSync(POST_EXEC_ERR_FILE); + + // Clear the file after reading. + fs.rmSync(POST_EXEC_ERR_FILE); + } + } + + // This function will be called per each user. + async handleUserExecution(user) { + // Handle if there are errors for the user. + if (this.postExecErrors[user.publicKey]) { + if (this.postExecErrors[user.publicKey] !== "success") { + console.error(`Found post execution errors!`); + + const error = this.postExecErrors[user.publicKey]; + delete this.postExecErrors[user.publicKey]; + + await this.sendOutput(user, { + type: "upgradeResult", + status: "error", + error: error + }); + } + } + } + + async #upgradeContract(bundleContent, user, ctx) { + // Backup all the files first. + const backup = `${BACKUP}-${ctx.timestamp}` + child_process.execSync(`mkdir -p ../${backup} && cp -r ./* ../${backup}/ && mv ../${backup} ./${backup}`); + + console.log('Contract binaries backed up!'); + + try { + fs.writeFileSync(BUNDLE, bundleContent, { mode: 0o644 }); + + // Install unzip if not exist. + child_process.execSync(`/usr/bin/unzip -o ${BUNDLE} && rm -f ${BUNDLE}`); + + console.log('New contract binaries extracted!'); + + let hpCfg = {}; + if (fs.existsSync(HP_CFG_OVERRIDE)) { + hpCfg = JSON.parse(fs.readFileSync(HP_CFG_OVERRIDE).toString()); + child_process.execSync(`rm ${HP_CFG_OVERRIDE}`); + } + + if (hpCfg.contract) { + let contractCfg = {}; + if (fs.existsSync(CONTRACT_CFG)) { + contractCfg = JSON.parse(fs.readFileSync(CONTRACT_CFG).toString()); + } + contractCfg = { ...contractCfg, ...hpCfg.contract }; + + fs.writeFileSync(CONTRACT_CFG, JSON.stringify(contractCfg, null, 2), { mode: 0o644 }); + + console.log('New contract configurations persisted!'); + } + + // mesh section. (only known_peers section handled currently) + if (hpCfg.mesh?.known_peers) { + if (hpCfg.mesh.known_peers.length > 0) { + ctx.updatePeers(hpCfg.mesh.known_peers); + console.log('Peer list updated!'); + } + } + + const command = `#!/bin/bash + +# Backup patch config. +cp ${PATH_CFG} ${BACKUP_PATH_CFG} + +function print_err() { + local error=$1 + log=$(jq . ${POST_EXEC_ERR_FILE}) + for key in $(jq -c 'keys[]' <<<$log); do + log=$(jq ".$key = \"$error\"" <<<$log) + done + echo $log >${POST_EXEC_ERR_FILE} +} + +function rollback() { + # Restore patch.cfg if backup exists + [ -f ${BACKUP_PATH_CFG} ] && mv ${BACKUP_PATH_CFG} ${PATH_CFG} + return 0 +} + +function upgrade() { + [ -f "${CONTRACT_CFG}" ] && jq -s '.[0] * .[1]' ${PATH_CFG} ${CONTRACT_CFG} > ../tmp.cfg && mv ../tmp.cfg ${PATH_CFG} + + if [ -f "${INSTALL_SCRIPT}" ]; then + echo "${INSTALL_SCRIPT} found. Executing..." + + chmod +x ${INSTALL_SCRIPT} + ./${INSTALL_SCRIPT} + installcode=$? + + rm ${INSTALL_SCRIPT} + + if [ "$installcode" -eq "0" ]; then + echo "${INSTALL_SCRIPT} executed successfully." + return 0 + else + echo "${INSTALL_SCRIPT} ended with exit code:$installcode" + print_err "InstallScriptFailed" + return 1 + fi + fi +} + +upgrade +upgradecode=$? + +if [ "$upgradecode" -eq "0" ]; then + # We have upgraded the contract successfully. + echo "Upgrade successful." +else + echo "Upgrade failed. Rolling back." + rollback +fi + +finalcode=$? +exit $finalcode`; + + // Create file to write post execution errors. + this.postExecErrors[user.publicKey] = 'success'; + fs.writeFileSync(POST_EXEC_ERR_FILE, JSON.stringify(this.postExecErrors, null, 2), { mode: 0o644 }); + console.log('Generated error log file!'); + + fs.writeFileSync(HP_POST_EXEC_SCRIPT, command, { mode: 0o777 }); + console.log('Generated post execution script!'); + + await user.send(bson.serialize({ + type: "upgradeResult", + status: "ok" + })); + } + catch (e) { + console.error(e); + + child_process.execSync(`cp -r ${backup}/* ./ && rm -r ${backup}`); + + await user.send(bson.serialize({ + type: "upgradeResult", + status: "error", + error: e + })); + } + } + + // This function will be called per each user input. + async handleRequest(user, msg, isReadOnly, ctx) { + // This sample application defines simple file operations. + // It's up to the application to decide the structure and contents of messages. + + if (msg.type == "upgrade") { + + if (isReadOnly) { + await this.sendOutput(user, { + type: "upgradeResult", + status: "error", + error: 'Contract upgrade is not supported in readonly mode' + }); + + return; + } + + await this.#upgradeContract(msg.content.buffer, user, ctx); + } + } +} \ No newline at end of file diff --git a/docker/code-templates/nodejs/upgrader-contract/src/contract.js b/docker/code-templates/nodejs/upgrader-contract/src/contract.js new file mode 100644 index 0000000..a019e72 --- /dev/null +++ b/docker/code-templates/nodejs/upgrader-contract/src/contract.js @@ -0,0 +1,53 @@ +const HotPocket = require('hotpocket-nodejs-contract'); +const bson = require('bson'); +const { _projname_ } = require('./_projname_'); + +// HotPocket smart contract is defined as a function which takes the HotPocket contract context as an argument. +// This function gets invoked every consensus round and whenever a user sends a out-of-concensus read-request. +async function contract(ctx) { + + // Create our application logic component. + // This pattern allows us to test the application logic independently of HotPocket. + const app = new _projname_(); + + // Wire-up output emissions from the application before we pass user inputs to it. + app.sendOutput = async (user, output) => { + await user.send(output) + } + + // In 'readonly' mode, nothing our contract does will get persisted on the ledger. The benefit is + // readonly messages gets processed much faster due to not being subjected to consensus. + // We should only use readonly mode for returning/replying data for the requesting user. + // + // In consensus mode (NOT read-only), we can do anything like persisting to data storage and/or + // sending data to any connected user at the time. Everything will get subjected to consensus so + // there is a time-penalty. + const isReadOnly = ctx.readonly; + + // This function is executed per each contract round. + await app.handleContractExecution(); + + // Process user inputs. + // Loop through list of users who have sent us inputs. + for (const user of ctx.users.list()) { + // This function is executed per each user. + await app.handleUserExecution(user); + + // Loop through inputs sent by each user. + for (const input of user.inputs) { + + // Read the data buffer sent by user (this can be any kind of data like string, json or binary data). + const buf = await ctx.users.read(input); + + // Let's assume all data buffers for this contract are binary. + // In real-world apps, we need to gracefully filter out invalid data formats for our contract. + const msg = bson.deserialize(buf); + + // Pass the JSON message to our application logic component. + await app.handleRequest(user, msg, isReadOnly, ctx); + } + } +} + +const hpc = new HotPocket.Contract(); +hpc.init(contract); \ No newline at end of file diff --git a/docker/scripts/cluster.sh b/docker/scripts/cluster.sh index dbbc59b..70308c7 100644 --- a/docker/scripts/cluster.sh +++ b/docker/scripts/cluster.sh @@ -8,6 +8,7 @@ network=$NETWORK container_prefix=$CONTAINER_PREFIX volume_mount=$VOLUME_MOUNT bundle_mount=$BUNDLE_MOUNT +disparate_dir=$DISPARATE_DIR hotpocket_image=$HOTPOCKET_IMAGE config_overrides_file=$CONFIG_OVERRIDES_FILE user_port_begin=$HP_USER_PORT_BEGIN @@ -274,9 +275,13 @@ function attach_logs { function sync_instance { local node=$1 local contract_dir=$(contract_dir_mount_path $node) - rm -rf $contract_dir/ledger_fs/* $contract_dir/contract_fs/* + rm -rf $contract_dir/ledger_fs/* $contract_dir/contract_fs/* mkdir -p $contract_dir/contract_fs/seed cp -r $bundle_mount $contract_dir/contract_fs/seed/state + [ -d $contract_dir/contract_fs/seed/state/$disparate_dir ] && rm -r $contract_dir/contract_fs/seed/state/$disparate_dir + + # Copy non-syncable files if exist. + [ -d "$bundle_mount/$disparate_dir/$i" ] && cp -r "$bundle_mount/$disparate_dir/$i/." "$contract_dir/contract_fs/seed/" # Merge contract config overrides. local cfg_file=$contract_dir/cfg/hp.cfg diff --git a/docker/scripts/codegen.sh b/docker/scripts/codegen.sh index 374356f..797bce4 100644 --- a/docker/scripts/codegen.sh +++ b/docker/scripts/codegen.sh @@ -18,8 +18,8 @@ fi [ ! -d $templates_dir/$platform ] && echo "Invalid platform '$platform' specified." && exit 1 [ ! -d $templates_dir/$platform/$apptype ] && echo "Invalid application type '$apptype' specified." && exit 1 -if ! [[ "$projname" =~ ^[a-z][a-z0-9_-]*$ ]]; then - echo "Invalid project name. Must be lowercase. Must start with a letter. Can only contain letters, numbers, dash and underscore." +if ! [[ "$projname" =~ ^[a-z][a-z0-9_]*$ ]]; then + echo "Invalid project name. Must be lowercase. Must start with a letter. Can only contain letters, numbers, and underscore." exit 1 fi diff --git a/docker/scripts/templates.sh b/docker/scripts/templates.sh new file mode 100644 index 0000000..65df4bb --- /dev/null +++ b/docker/scripts/templates.sh @@ -0,0 +1,26 @@ +#!/bin/bash +cmd=$1 + +templates_dir="/code-templates" +usage="Usage: + \nlist " + +if [ "$cmd" = "list" ]; then + platform=$2 + + if [ ! -z $platform ]; then + platforms=("$templates_dir/$platform") + else + platforms="$templates_dir/*" + fi + + for p in $platforms; do + [ ! -d "$p" ] && echo "There are no templates for platform: ${p##*/}." && exit 0 + echo "$(tput bold)PLATFORM: ${p##*/}$(tput sgr0)" + for t in $(ls -1 "$p"); do + echo " $t" + done + done +fi + +exit 0 diff --git a/npm/appenv.js b/npm/appenv.js index 24a4899..f3bcba0 100644 --- a/npm/appenv.js +++ b/npm/appenv.js @@ -8,6 +8,9 @@ const appenv = { instanceImage: process.env.HP_INSTANCE_IMAGE || 'evernode/hotpocket:0.6.4-ubt.20.04-njs.20', hpUserPortBegin: process.env.HP_USER_PORT_BEGIN || 8081, hpPeerPortBegin: process.env.HP_PEER_PORT_BEGIN || 22861, + network: process.env.HP_EV_NETWORK || 'mainnet', + signerWeight: process.env.HP_MULTI_SIGNER_WEIGHT || 1, + signerQuorum: process.env.HP_MULTI_SIGNER_QUORUM || 0.8 } Object.freeze(appenv); diff --git a/npm/index.js b/npm/index.js index 9ee80e7..98d7e55 100755 --- a/npm/index.js +++ b/npm/index.js @@ -8,6 +8,11 @@ program .description('Display the hpdevkit version.') .action(commands.version); +program + .command('list [platform]') + .description('Lists existing templates in the specified platform. Lists all templates in the all platforms if unspecified.') + .action(commands.list); + program .command('gen ') .description('Generate HotPocket application development projects.') @@ -15,6 +20,9 @@ program program .command('deploy ') + .option('-m, --multi-sig [multi-sig]', 'Multi signing enabled.') + .option('-a, --master-addr [master-addr]', 'Master address for multi signing.') + .option('-s, --master-sec [master-sec]', 'Master secret for multi signing.') .description('Deploy the specified directory to a HotPocket cluster.') .action(commands.deploy); diff --git a/npm/lib/commands.js b/npm/lib/commands.js index 37cfa76..63f2674 100644 --- a/npm/lib/commands.js +++ b/npm/lib/commands.js @@ -1,5 +1,7 @@ const fs = require('fs'); const appenv = require('../appenv'); +const kp = require('ripple-keypairs'); +const evernode = require("evernode-js-client") const { exec } = require('./child-proc'); const { CONSTANTS, @@ -28,6 +30,21 @@ function version() { error(`\n${CONSTANTS.npmPackageName} is not installed.`); } +function list(platform) { + info("List templates\n"); + + try { + runOnNewContainer(CONSTANTS.codegenContainerName, null, null, null, null, platform ? `list ${platform}` : 'list', 'templates'); + } + catch (e) { + error(`Listing templates failed.`); + } + finally { + if (isExists(CONSTANTS.codegenContainerName)) + exec(`docker rm ${CONSTANTS.codegenContainerName}`, false); + } +} + function codeGen(platform, apptype, projName) { info("Code generator\n"); @@ -50,9 +67,14 @@ function codeGen(platform, apptype, projName) { } } -function deploy(contractPath) { +async function deploy(contractPath, options) { info(`command: deploy (cluster: ${appenv.cluster})`); + if (options.multiSig && !options.masterSec) { + error('Master secret is required to setup multi signing!'); + return; + } + initializeDeploymentCluster(); // If copying a directory, delete target bundle directory. If not create empty target bundle directory to copy a file. @@ -63,6 +85,56 @@ function deploy(contractPath) { executeOnManagementContainer(prepareBundleDir); exec(`docker cp ${contractPath} "${CONSTANTS.managementContainerName}:${CONSTANTS.bundleMount}"`); + // Prepare signers if multisig specified + if (options.multiSig) { + if (!options.masterAddr) { + const keypair = kp.deriveKeypair(options.masterSec); + options.masterAddr = kp.deriveAddress(keypair.publicKey); + } + + let signers = []; + for (let i = 0; i < appenv.clusterSize; i++) { + const nodeSecret = kp.generateSeed({ algorithm: "ecdsa-secp256k1" }); + const keypair = kp.deriveKeypair(nodeSecret); + const signerInfo = { + account: kp.deriveAddress(keypair.publicKey), + secret: nodeSecret, + weight: appenv.signerWeight + }; + + signers.push(signerInfo); + + const disparatePath = `${CONSTANTS.bundleMount}/${CONSTANTS.disparateDir}/${i + 1}`; + executeOnManagementContainer(`mkdir -p ${disparatePath} && echo '${JSON.stringify(signerInfo, null, 2).replace(/"/g, '\\"')}' > ${disparatePath}/${options.masterAddr}.key`); + } + + await evernode.Defaults.useNetwork(appenv.network); + const xrplApi = new evernode.XrplApi(null); + evernode.Defaults.set({ + xrplApi: xrplApi + }); + await xrplApi.connect(); + const xrplAcc = new evernode.XrplAccount(options.masterAddr, options.masterSec); + + try { + const totalWeights = signers.reduce((sum, x) => sum + x.weight, 0); + await xrplAcc.setSignerList(signers.map(s => { + return { + account: s.account, + weight: s.weight + }; + }), { signerQuorum: Math.floor(totalWeights * appenv.signerQuorum) }); + await xrplApi.disconnect(); + } + catch (e) { + error('Error occurred while preparing the signer list', e); + await xrplApi.disconnect(); + return; + } + + info(`Multi signer setup for ${options.masterAddr} completed!`); + } + // Sync contract bundle to all instance directories in the cluster. executeOnManagementContainer('cluster stop ; cluster sync ; cluster start'); @@ -157,6 +229,7 @@ function uninstall() { module.exports = { version, + list, codeGen, deploy, clean, diff --git a/npm/lib/docker-helpers.js b/npm/lib/docker-helpers.js index 0a31710..2a07956 100644 --- a/npm/lib/docker-helpers.js +++ b/npm/lib/docker-helpers.js @@ -11,6 +11,7 @@ const CONSTANTS = { network: `${GLOBAL_PREFIX}_${appenv.cluster}_net`, containerPrefix: `${GLOBAL_PREFIX}_${appenv.cluster}_node`, bundleMount: `${GLOBAL_PREFIX}_vol/contract_bundle`, + disparateDir: `disparate`, managementContainerName: `${GLOBAL_PREFIX}_${appenv.cluster}_deploymgr`, confOverrideFile: "hp.cfg.override", codegenOutputDir: "/codegen-output", @@ -49,7 +50,7 @@ function runOnNewContainer(name, detached, autoRemove, mountSock, mountVolume, e command += ` --restart ${restart}`; command += ` -e CLUSTER=${appenv.cluster} -e CLUSTER_SIZE=${appenv.clusterSize} -e DEFAULT_NODE=${appenv.defaultNode} -e VOLUME=${CONSTANTS.volume} -e NETWORK=${CONSTANTS.network}`; - command += ` -e CONTAINER_PREFIX=${CONSTANTS.containerPrefix} -e VOLUME_MOUNT=${CONSTANTS.volumeMount} -e BUNDLE_MOUNT=${CONSTANTS.bundleMount} -e HOTPOCKET_IMAGE=${appenv.instanceImage}`; + command += ` -e CONTAINER_PREFIX=${CONSTANTS.containerPrefix} -e VOLUME_MOUNT=${CONSTANTS.volumeMount} -e BUNDLE_MOUNT=${CONSTANTS.bundleMount} -e DISPARATE_DIR=${CONSTANTS.disparateDir} -e HOTPOCKET_IMAGE=${appenv.instanceImage}`; command += ` -e CONFIG_OVERRIDES_FILE=${CONSTANTS.confOverrideFile} -e CODEGEN_OUTPUT=${CONSTANTS.codegenOutputDir}`; command += ` -e HP_USER_PORT_BEGIN=${appenv.hpUserPortBegin} -e HP_PEER_PORT_BEGIN=${appenv.hpPeerPortBegin}`; diff --git a/npm/package-lock.json b/npm/package-lock.json index c1d605d..8f9e383 100644 --- a/npm/package-lock.json +++ b/npm/package-lock.json @@ -1,16 +1,17 @@ { "name": "hpdevkit", - "version": "0.6.5", + "version": "0.6.6", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "hpdevkit", - "version": "0.6.5", + "version": "0.6.6", "hasInstallScript": true, "license": "SEE LICENSE IN https://raw.githubusercontent.com/EvernodeXRPL/evernode-resources/main/license/evernode-license.pdf", "dependencies": { - "commander": "9.4.0" + "commander": "9.4.0", + "evernode-js-client": "0.6.43" }, "bin": { "hpdevkit": "index.js" @@ -71,6 +72,30 @@ "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", "dev": true }, + "node_modules/@noble/hashes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", + "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@types/brorand": { + "version": "1.0.33", + "resolved": "https://registry.npmjs.org/@types/brorand/-/brorand-1.0.33.tgz", + "integrity": "sha512-KmNsWYtzKXpmxjecvYWUEGK5biJB/1kpHRObHZD8eme1tz/TvbESbZeNAHPRNd5qyCJiHk2ztbNzKbPC6TuPFg==", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/node": { + "version": "10.12.18", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.18.tgz", + "integrity": "sha512-fh+pAqt4xRzPfqA6eh3Z2y6fyZavRIumvjhaCL753+TVkGKGhpPeyrJG2JftD0T9q4GF00KjefsQ+PQNDdWQaQ==" + }, "node_modules/acorn": { "version": "8.8.2", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", @@ -92,6 +117,17 @@ "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, + "node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, "node_modules/ajv": { "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", @@ -147,12 +183,119 @@ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, + "node_modules/assert": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/assert/-/assert-2.1.0.tgz", + "integrity": "sha512-eLHpSK/Y4nhMJ07gDaAzoX/XAKS8PSaojml3M0DM4JpV1LAi5JOJ/p6H/XWrl8L+DzVEvVCW1z3vWAaB9oTsQw==", + "dependencies": { + "call-bind": "^1.0.2", + "is-nan": "^1.3.2", + "object-is": "^1.1.5", + "object.assign": "^4.1.4", + "util": "^0.12.5" + } + }, + "node_modules/available-typed-arrays": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", + "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", + "dependencies": { + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, + "node_modules/base-x": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.9.tgz", + "integrity": "sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ==", + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/big-integer": { + "version": "1.6.52", + "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.52.tgz", + "integrity": "sha512-QxD8cf2eVqJOOz63z6JIN9BzvVs/dlySa5HGSBH5xtR8dPteIRQnBxxKqkNTiT6jbDTF6jAfrd4oMcND9RGbQg==", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/bignumber.js": { + "version": "9.1.2", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.2.tgz", + "integrity": "sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug==", + "engines": { + "node": "*" + } + }, + "node_modules/bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "dependencies": { + "file-uri-to-path": "1.0.0" + } + }, + "node_modules/bip32": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/bip32/-/bip32-2.0.6.tgz", + "integrity": "sha512-HpV5OMLLGTjSVblmrtYRfFFKuQB+GArM0+XP8HGWfJ5vxYBqo+DesvJwOdC2WJ3bCkZShGf0QIfoIpeomVzVdA==", + "dependencies": { + "@types/node": "10.12.18", + "bs58check": "^2.1.1", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "tiny-secp256k1": "^1.1.3", + "typeforce": "^1.11.5", + "wif": "^2.0.6" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/bip39": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/bip39/-/bip39-3.1.0.tgz", + "integrity": "sha512-c9kiwdk45Do5GL0vJMe7tS95VjCii65mYAH7DfWl3uW8AVzXKQVUm64i3hzVybBDMp9r7j9iNxR85+ul8MdN/A==", + "dependencies": { + "@noble/hashes": "^1.2.0" + } + }, + "node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -163,6 +306,82 @@ "concat-map": "0.0.1" } }, + "node_modules/brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==" + }, + "node_modules/bs58": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", + "integrity": "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==", + "dependencies": { + "base-x": "^3.0.2" + } + }, + "node_modules/bs58check": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-2.1.2.tgz", + "integrity": "sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==", + "dependencies": { + "bs58": "^4.0.0", + "create-hash": "^1.1.0", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "node_modules/bufferutil": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.8.tgz", + "integrity": "sha512-4T53u4PdgsXqKaIctwF8ifXlRTTmEPJ8iEPWFdGZvcf7sbwYo6FKFEX9eNNAnzFZ7EzJAQ3CJeOtCRA4rDp7Pw==", + "hasInstallScript": true, + "dependencies": { + "node-gyp-build": "^4.3.0" + }, + "engines": { + "node": ">=6.14.2" + } + }, + "node_modules/call-bind": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -188,6 +407,15 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, + "node_modules/cipher-base": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "dependencies": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -220,6 +448,31 @@ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "dev": true }, + "node_modules/create-hash": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "dependencies": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" + } + }, + "node_modules/create-hmac": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", + "dependencies": { + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, "node_modules/cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -234,11 +487,22 @@ "node": ">= 8" } }, + "node_modules/d": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.2.tgz", + "integrity": "sha512-MOqHvMWF9/9MX6nza0KgvFH4HpMU0EF5uUDXqX/BtxtU8NfB0QzRtJ8Oe/6SuS4kbhyzVJwjd97EA4PKrzJ8bw==", + "dependencies": { + "es5-ext": "^0.10.64", + "type": "^2.7.2" + }, + "engines": { + "node": ">=0.12" + } + }, "node_modules/debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, "dependencies": { "ms": "2.1.2" }, @@ -251,12 +515,49 @@ } } }, + "node_modules/decimal.js": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.3.tgz", + "integrity": "sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==" + }, "node_modules/deep-is": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/define-properties": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", + "dependencies": { + "define-data-property": "^1.0.1", + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/doctrine": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", @@ -269,6 +570,20 @@ "node": ">=6.0.0" } }, + "node_modules/elliptic": { + "version": "6.5.4", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", + "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", + "dependencies": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + } + }, "node_modules/enquirer": { "version": "2.3.6", "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", @@ -281,6 +596,62 @@ "node": ">=8.6" } }, + "node_modules/es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es5-ext": { + "version": "0.10.64", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.64.tgz", + "integrity": "sha512-p2snDhiLaXe6dahss1LddxqEm+SkuDvV8dnIQG0MWjyHpcMNfXKPE+/Cc0y+PhxJX3A4xGNeFCj5oc0BUh6deg==", + "hasInstallScript": true, + "dependencies": { + "es6-iterator": "^2.0.3", + "es6-symbol": "^3.1.3", + "esniff": "^2.0.1", + "next-tick": "^1.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/es6-iterator": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==", + "dependencies": { + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" + } + }, + "node_modules/es6-symbol": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.4.tgz", + "integrity": "sha512-U9bFFjX8tFiATgtkJ1zg25+KviIXpgRvRHS8sau3GfhVzThRQrOeksPeT0BWW2MNZs1OEWJ1DPXOQMn0KKRkvg==", + "dependencies": { + "d": "^1.0.2", + "ext": "^1.7.0" + }, + "engines": { + "node": ">=0.12" + } + }, "node_modules/escape-string-regexp": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", @@ -403,6 +774,20 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/esniff": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/esniff/-/esniff-2.0.1.tgz", + "integrity": "sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg==", + "dependencies": { + "d": "^1.0.1", + "es5-ext": "^0.10.62", + "event-emitter": "^0.3.5", + "type": "^2.7.2" + }, + "engines": { + "node": ">=0.10" + } + }, "node_modules/espree": { "version": "9.5.1", "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.1.tgz", @@ -462,6 +847,37 @@ "node": ">=0.10.0" } }, + "node_modules/event-emitter": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", + "integrity": "sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA==", + "dependencies": { + "d": "1", + "es5-ext": "~0.10.14" + } + }, + "node_modules/evernode-js-client": { + "version": "0.6.43", + "resolved": "https://registry.npmjs.org/evernode-js-client/-/evernode-js-client-0.6.43.tgz", + "integrity": "sha512-yo2x5/gEaMBdJ8nS6Tba+Oj9/JOnLz5XnRTrux3fHwH1kAkykzcFdtshh68BTfy0fcUhJhIMhW8gMyWOBLmEAA==", + "dependencies": { + "elliptic": "6.5.4", + "libsodium-wrappers": "0.7.10", + "ripple-address-codec": "4.2.0", + "ripple-keypairs": "1.1.0", + "xrpl": "2.2.1", + "xrpl-accountlib": "3.2.9", + "xrpl-binary-codec": "1.4.2" + } + }, + "node_modules/ext": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/ext/-/ext-1.7.0.tgz", + "integrity": "sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==", + "dependencies": { + "type": "^2.7.2" + } + }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -492,6 +908,11 @@ "node": "^10.12.0 || >=12.0.0" } }, + "node_modules/file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" + }, "node_modules/flat-cache": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", @@ -511,18 +932,52 @@ "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", "dev": true }, + "node_modules/for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "dependencies": { + "is-callable": "^1.1.3" + } + }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", "dev": true }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/functional-red-black-tree": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", "integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==", "dev": true }, + "node_modules/get-intrinsic": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/glob": { "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", @@ -570,6 +1025,17 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -579,6 +1045,127 @@ "node": ">=8" } }, + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-proto": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hash-base": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", + "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", + "dependencies": { + "inherits": "^2.0.4", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "dependencies": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==", + "dependencies": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "node_modules/https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, "node_modules/ignore": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", @@ -626,8 +1213,33 @@ "node_modules/inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/is-arguments": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", + "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/is-extglob": { "version": "2.1.1", @@ -638,6 +1250,20 @@ "node": ">=0.10.0" } }, + "node_modules/is-generator-function": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", + "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==", + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", @@ -650,6 +1276,40 @@ "node": ">=0.10.0" } }, + "node_modules/is-nan": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/is-nan/-/is-nan-1.3.2.tgz", + "integrity": "sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w==", + "dependencies": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-typed-array": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz", + "integrity": "sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==", + "dependencies": { + "which-typed-array": "^1.1.14" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==" + }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -693,6 +1353,24 @@ "node": ">= 0.8.0" } }, + "node_modules/libsodium": { + "version": "0.7.13", + "resolved": "https://registry.npmjs.org/libsodium/-/libsodium-0.7.13.tgz", + "integrity": "sha512-mK8ju0fnrKXXfleL53vtp9xiPq5hKM0zbDQtcxQIsSmxNgSxqCj6R7Hl9PkrNe2j29T4yoDaF7DJLK9/i5iWUw==" + }, + "node_modules/libsodium-wrappers": { + "version": "0.7.10", + "resolved": "https://registry.npmjs.org/libsodium-wrappers/-/libsodium-wrappers-0.7.10.tgz", + "integrity": "sha512-pO3F1Q9NPLB/MWIhehim42b/Fwb30JNScCNh8TcQ/kIc+qGLQch8ag8wb0keK3EP5kbGakk1H8Wwo7v+36rNQg==", + "dependencies": { + "libsodium": "^0.7.0" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, "node_modules/lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", @@ -711,6 +1389,26 @@ "node": ">=10" } }, + "node_modules/md5.js": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", + "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", + "dependencies": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" + }, + "node_modules/minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==" + }, "node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -726,8 +1424,12 @@ "node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "node_modules/nan": { + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.19.0.tgz", + "integrity": "sha512-nO1xXxfh/RWNxfd/XPfbIfFk5vgLsAxUR9y5O0cHMJu/AW9U95JLXqthYHjEp+8gQ5p96K9jUp8nbVOxCdRbtw==" }, "node_modules/natural-compare": { "version": "1.4.0", @@ -735,6 +1437,61 @@ "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", "dev": true }, + "node_modules/next-tick": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz", + "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==" + }, + "node_modules/node-gyp-build": { + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.0.tgz", + "integrity": "sha512-u6fs2AEUljNho3EYTJNBfImO5QTo/J/1Etd+NVdCj7qWKUSN/bSLkZwhDv7I+w/MSC6qJ4cknepkAYykDdK8og==", + "bin": { + "node-gyp-build": "bin.js", + "node-gyp-build-optional": "optional.js", + "node-gyp-build-test": "build-test.js" + } + }, + "node_modules/object-is": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.6.tgz", + "integrity": "sha512-F8cZ+KfGlSGi09lJT7/Nd6KJZ9ygtvYC0/UYYLI9nmQKLMnydpB9yvbv9K1uSkEu7FU9vYPmVwLg328tX+ot3Q==", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.assign": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", + "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", + "dependencies": { + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "has-symbols": "^1.0.3", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -791,6 +1548,14 @@ "node": ">=8" } }, + "node_modules/possible-typed-array-names": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz", + "integrity": "sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==", + "engines": { + "node": ">= 0.4" + } + }, "node_modules/prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", @@ -818,6 +1583,19 @@ "node": ">=6" } }, + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/regexpp": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", @@ -854,6 +1632,113 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/ripemd160": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "dependencies": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, + "node_modules/ripple-address-codec": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/ripple-address-codec/-/ripple-address-codec-4.2.0.tgz", + "integrity": "sha512-9QhBNDiWjwj7l+WQ7H7klXF/VwxVj2Q0HRhd4vLCueTPoxUtaNQyfvUZFiXJrqxg0heM3/iWxupkq4TwrXgSuQ==", + "dependencies": { + "base-x": "3.0.9", + "create-hash": "^1.1.2" + }, + "engines": { + "node": ">= 10", + "npm": ">=7.0.0" + } + }, + "node_modules/ripple-binary-codec": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/ripple-binary-codec/-/ripple-binary-codec-1.11.0.tgz", + "integrity": "sha512-g7+gs3T+NfoeW6vIq5dcN0CkIT4t/zwRzFxz8X2RzfbrWRnewPUKqQbmBgs05tXLX5NuWPaneiaAVpFpYBcdfw==", + "dependencies": { + "assert": "^2.0.0", + "big-integer": "^1.6.48", + "buffer": "6.0.3", + "create-hash": "^1.2.0", + "decimal.js": "^10.2.0", + "ripple-address-codec": "^4.3.1" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/ripple-binary-codec/node_modules/ripple-address-codec": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/ripple-address-codec/-/ripple-address-codec-4.3.1.tgz", + "integrity": "sha512-Qa3+9wKVvpL/xYtT6+wANsn0A1QcC5CT6IMZbRJZ/1lGt7gmwIfsrCuz1X0+LCEO7zgb+3UT1I1dc0k/5dwKQQ==", + "dependencies": { + "base-x": "^3.0.9", + "create-hash": "^1.1.2" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/ripple-keypairs": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/ripple-keypairs/-/ripple-keypairs-1.1.0.tgz", + "integrity": "sha512-Zlmbtn2YUpW4uKlLm2/tpkY5RC/EXQlkJwIIKp0AoF9D23pJ43/EuipNW2F6qURdbkUezDwB0bMV7uRXip3x2w==", + "dependencies": { + "bn.js": "^5.1.1", + "brorand": "^1.0.5", + "elliptic": "^6.5.4", + "hash.js": "^1.0.3", + "ripple-address-codec": "^4.2.0" + }, + "engines": { + "node": ">= 10", + "npm": ">=7.0.0" + } + }, + "node_modules/ripple-keypairs/node_modules/bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==" + }, + "node_modules/ripple-secret-codec": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/ripple-secret-codec/-/ripple-secret-codec-1.0.3.tgz", + "integrity": "sha512-vYcHlJx1p+5uH4ORda2dlvbgCy68m/Ib2kn+Np6PMmRoBenf9pKHa4vzaWmp2SjJKPi1921lQjdeAWoXdm7E0g==", + "dependencies": { + "base-x": "^3.0.3", + "bignumber.js": "^5.0.0" + } + }, + "node_modules/ripple-secret-codec/node_modules/bignumber.js": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-5.0.0.tgz", + "integrity": "sha512-KWTu6ZMVk9sxlDJQh2YH1UOnfDP8O8TpxUxgQG/vKASoSnEjK9aVuOueFaPcQEYQ5fyNXNTOYwYw3099RYebWg==", + "engines": { + "node": "*" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, "node_modules/semver": { "version": "7.5.0", "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.0.tgz", @@ -869,6 +1754,34 @@ "node": ">=10" } }, + "node_modules/set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/sha.js": { + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "dependencies": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + }, + "bin": { + "sha.js": "bin.js" + } + }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -890,6 +1803,14 @@ "node": ">=8" } }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, "node_modules/strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", @@ -932,6 +1853,27 @@ "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", "dev": true }, + "node_modules/tiny-secp256k1": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/tiny-secp256k1/-/tiny-secp256k1-1.1.6.tgz", + "integrity": "sha512-FmqJZGduTyvsr2cF3375fqGHUovSwDi/QytexX1Se4BPuPZpTE5Ftp5fg+EFSuEf3lhZqgCRjEG3ydUQ/aNiwA==", + "hasInstallScript": true, + "dependencies": { + "bindings": "^1.3.0", + "bn.js": "^4.11.8", + "create-hmac": "^1.1.7", + "elliptic": "^6.4.0", + "nan": "^2.13.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/type": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/type/-/type-2.7.2.tgz", + "integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==" + }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -956,6 +1898,19 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/typedarray-to-buffer": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", + "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", + "dependencies": { + "is-typedarray": "^1.0.0" + } + }, + "node_modules/typeforce": { + "version": "1.18.0", + "resolved": "https://registry.npmjs.org/typeforce/-/typeforce-1.18.0.tgz", + "integrity": "sha512-7uc1O8h1M1g0rArakJdf0uLRSSgFcYexrVoKo+bzJd32gd4gDy2L/Z+8/FjPnU9ydY3pEnVPtr9FyscYY60K1g==" + }, "node_modules/uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", @@ -965,12 +1920,70 @@ "punycode": "^2.1.0" } }, + "node_modules/utf-8-validate": { + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.10.tgz", + "integrity": "sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ==", + "hasInstallScript": true, + "dependencies": { + "node-gyp-build": "^4.3.0" + }, + "engines": { + "node": ">=6.14.2" + } + }, + "node_modules/util": { + "version": "0.12.5", + "resolved": "https://registry.npmjs.org/util/-/util-0.12.5.tgz", + "integrity": "sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==", + "dependencies": { + "inherits": "^2.0.3", + "is-arguments": "^1.0.4", + "is-generator-function": "^1.0.7", + "is-typed-array": "^1.1.3", + "which-typed-array": "^1.1.2" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" + }, "node_modules/v8-compile-cache": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", "dev": true }, + "node_modules/websocket": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/websocket/-/websocket-1.0.34.tgz", + "integrity": "sha512-PRDso2sGwF6kM75QykIesBijKSVceR6jL2G8NGYyq2XrItNC2P5/qL5XeR056GhA+Ly7JMFvJb9I312mJfmqnQ==", + "dependencies": { + "bufferutil": "^4.0.1", + "debug": "^2.2.0", + "es5-ext": "^0.10.50", + "typedarray-to-buffer": "^3.1.5", + "utf-8-validate": "^5.0.2", + "yaeti": "^0.0.6" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/websocket/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/websocket/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -986,6 +1999,32 @@ "node": ">= 8" } }, + "node_modules/which-typed-array": { + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.15.tgz", + "integrity": "sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==", + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/wif": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/wif/-/wif-2.0.6.tgz", + "integrity": "sha512-HIanZn1zmduSF+BQhkE+YXIbEiH0xPr1012QbFEGB0xsKqJii0/SqJjyn8dFv6y36kOznMgMB+LGcbZTJ1xACQ==", + "dependencies": { + "bs58check": "<3.0.0" + } + }, "node_modules/word-wrap": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", @@ -1001,6 +2040,297 @@ "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", "dev": true }, + "node_modules/ws": { + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.16.0.tgz", + "integrity": "sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/xrpl": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/xrpl/-/xrpl-2.2.1.tgz", + "integrity": "sha512-UlUtV0SAaXxdAAZYluU+pEg9WmDrvEcHZYL0KR2bQS6xu2mMlQvXorkCAiS8cLI+PQR0i8CGJDReRV5kjGg1pA==", + "dependencies": { + "bignumber.js": "^9.0.0", + "bip32": "^2.0.6", + "bip39": "^3.0.4", + "https-proxy-agent": "^5.0.0", + "lodash": "^4.17.4", + "ripple-address-codec": "^4.2.4", + "ripple-binary-codec": "^1.4.0", + "ripple-keypairs": "^1.1.3", + "ws": "^8.2.2" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/xrpl-accountlib": { + "version": "3.2.9", + "resolved": "https://registry.npmjs.org/xrpl-accountlib/-/xrpl-accountlib-3.2.9.tgz", + "integrity": "sha512-jg6I18LzL3jXKPhEdos958PcVW/XLB2eaaZTM06WlVqgxCyNs9G2GEDl+xrqAWopzy1WcCR0/hF/4cmTCHytag==", + "dependencies": { + "assert": "^2.0.0", + "bip32": "^2.0.6", + "bip39": "^3.0.4", + "bn.js": "^5.2.1", + "elliptic": "6.5.4", + "hash.js": "^1.1.7", + "lodash": "^4.17.21", + "ripple-address-codec": "^4.2.5", + "ripple-keypairs": "^1.1.4", + "ripple-secret-codec": "^1.0.3", + "xrpl-binary-codec-prerelease": "^7.0.1", + "xrpl-client": "^2.3.0", + "xrpl-secret-numbers": "^0.3.3", + "xrpl-sign-keypairs": "^2.5.0" + } + }, + "node_modules/xrpl-accountlib/node_modules/bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==" + }, + "node_modules/xrpl-accountlib/node_modules/ripple-address-codec": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/ripple-address-codec/-/ripple-address-codec-4.3.1.tgz", + "integrity": "sha512-Qa3+9wKVvpL/xYtT6+wANsn0A1QcC5CT6IMZbRJZ/1lGt7gmwIfsrCuz1X0+LCEO7zgb+3UT1I1dc0k/5dwKQQ==", + "dependencies": { + "base-x": "^3.0.9", + "create-hash": "^1.1.2" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/xrpl-accountlib/node_modules/ripple-keypairs": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/ripple-keypairs/-/ripple-keypairs-1.3.1.tgz", + "integrity": "sha512-dmPlraWKJciFJxHcoubDahGnoIalG5e/BtV6HNDUs7wLXmtnLMHt6w4ed9R8MTL2zNrVPiIdI/HCtMMo0Tm7JQ==", + "dependencies": { + "bn.js": "^5.1.1", + "brorand": "^1.0.5", + "elliptic": "^6.5.4", + "hash.js": "^1.0.3", + "ripple-address-codec": "^4.3.1" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/xrpl-binary-codec": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/xrpl-binary-codec/-/xrpl-binary-codec-1.4.2.tgz", + "integrity": "sha512-fYyyaiVgeCGUEplqebWl272NxOixLjb0xAIGjNUT17HytECPbUlc/0xUr9PvGLriqpZtQ3YEgpwpCPTEpFvL4A==", + "dependencies": { + "assert": "^2.0.0", + "big-integer": "^1.6.48", + "buffer": "5.6.0", + "create-hash": "^1.2.0", + "decimal.js": "^10.2.0", + "ripple-address-codec": "^4.2.3" + }, + "engines": { + "node": ">=10.22.0" + } + }, + "node_modules/xrpl-binary-codec-prerelease": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/xrpl-binary-codec-prerelease/-/xrpl-binary-codec-prerelease-7.0.1.tgz", + "integrity": "sha512-IOIWUTkCyeYWReT6hn/2ONMpk0FNk1mltqQjpl7n2cfCuxJwSxwk+J4fi5s0cExNJSFT1aUhRSgDQLOtCBo2hQ==", + "dependencies": { + "assert": "^2.0.0", + "big-integer": "^1.6.48", + "buffer": "6.0.3", + "create-hash": "^1.2.0", + "decimal.js": "^10.2.0", + "ripple-address-codec": "^4.3.1" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/xrpl-binary-codec-prerelease/node_modules/ripple-address-codec": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/ripple-address-codec/-/ripple-address-codec-4.3.1.tgz", + "integrity": "sha512-Qa3+9wKVvpL/xYtT6+wANsn0A1QcC5CT6IMZbRJZ/1lGt7gmwIfsrCuz1X0+LCEO7zgb+3UT1I1dc0k/5dwKQQ==", + "dependencies": { + "base-x": "^3.0.9", + "create-hash": "^1.1.2" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/xrpl-binary-codec/node_modules/buffer": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.6.0.tgz", + "integrity": "sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw==", + "dependencies": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4" + } + }, + "node_modules/xrpl-binary-codec/node_modules/ripple-address-codec": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/ripple-address-codec/-/ripple-address-codec-4.3.1.tgz", + "integrity": "sha512-Qa3+9wKVvpL/xYtT6+wANsn0A1QcC5CT6IMZbRJZ/1lGt7gmwIfsrCuz1X0+LCEO7zgb+3UT1I1dc0k/5dwKQQ==", + "dependencies": { + "base-x": "^3.0.9", + "create-hash": "^1.1.2" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/xrpl-client": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/xrpl-client/-/xrpl-client-2.3.1.tgz", + "integrity": "sha512-UyeYZvewX+n+OHpb1W7zutHWfS75Z45Ltz15OOMNhmxFnBPRbJJ0sMQRtk6jVoxuF7Id8kZ85IwifqKNByyMWw==", + "dependencies": { + "debug": "^4.1.1", + "websocket": "^1.0.34" + } + }, + "node_modules/xrpl-secret-numbers": { + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/xrpl-secret-numbers/-/xrpl-secret-numbers-0.3.4.tgz", + "integrity": "sha512-B3m0OLRsmNLQpN/BUR15+LC4yejM/pdneoWgijfBYbgjVVnpyCF5+Ur7zbAs4nCAlBUZYXnxp+o/rSNZkke9jQ==", + "dependencies": { + "@types/brorand": "^1.0.30", + "brorand": "^1.1.0", + "ripple-keypairs": "^1.1.5" + } + }, + "node_modules/xrpl-secret-numbers/node_modules/bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==" + }, + "node_modules/xrpl-secret-numbers/node_modules/ripple-address-codec": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/ripple-address-codec/-/ripple-address-codec-4.3.1.tgz", + "integrity": "sha512-Qa3+9wKVvpL/xYtT6+wANsn0A1QcC5CT6IMZbRJZ/1lGt7gmwIfsrCuz1X0+LCEO7zgb+3UT1I1dc0k/5dwKQQ==", + "dependencies": { + "base-x": "^3.0.9", + "create-hash": "^1.1.2" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/xrpl-secret-numbers/node_modules/ripple-keypairs": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/ripple-keypairs/-/ripple-keypairs-1.3.1.tgz", + "integrity": "sha512-dmPlraWKJciFJxHcoubDahGnoIalG5e/BtV6HNDUs7wLXmtnLMHt6w4ed9R8MTL2zNrVPiIdI/HCtMMo0Tm7JQ==", + "dependencies": { + "bn.js": "^5.1.1", + "brorand": "^1.0.5", + "elliptic": "^6.5.4", + "hash.js": "^1.0.3", + "ripple-address-codec": "^4.3.1" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/xrpl-sign-keypairs": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/xrpl-sign-keypairs/-/xrpl-sign-keypairs-2.5.0.tgz", + "integrity": "sha512-chcO69Aao1lN54ypdmZ3HQOculTf8DaqzSULnPHS1ivsufk/iz7Fa2rg1//cgJx+bYvvV9y9xP6E55S6YBEZ0Q==", + "dependencies": { + "big-integer": "^1.6.51", + "ripple-address-codec": "^4.2.4", + "ripple-keypairs": "^1.1.4", + "xrpl-binary-codec-prerelease": "^7.0.1" + } + }, + "node_modules/xrpl-sign-keypairs/node_modules/bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==" + }, + "node_modules/xrpl-sign-keypairs/node_modules/ripple-address-codec": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/ripple-address-codec/-/ripple-address-codec-4.3.1.tgz", + "integrity": "sha512-Qa3+9wKVvpL/xYtT6+wANsn0A1QcC5CT6IMZbRJZ/1lGt7gmwIfsrCuz1X0+LCEO7zgb+3UT1I1dc0k/5dwKQQ==", + "dependencies": { + "base-x": "^3.0.9", + "create-hash": "^1.1.2" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/xrpl-sign-keypairs/node_modules/ripple-keypairs": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/ripple-keypairs/-/ripple-keypairs-1.3.1.tgz", + "integrity": "sha512-dmPlraWKJciFJxHcoubDahGnoIalG5e/BtV6HNDUs7wLXmtnLMHt6w4ed9R8MTL2zNrVPiIdI/HCtMMo0Tm7JQ==", + "dependencies": { + "bn.js": "^5.1.1", + "brorand": "^1.0.5", + "elliptic": "^6.5.4", + "hash.js": "^1.0.3", + "ripple-address-codec": "^4.3.1" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/xrpl/node_modules/bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==" + }, + "node_modules/xrpl/node_modules/ripple-address-codec": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/ripple-address-codec/-/ripple-address-codec-4.3.1.tgz", + "integrity": "sha512-Qa3+9wKVvpL/xYtT6+wANsn0A1QcC5CT6IMZbRJZ/1lGt7gmwIfsrCuz1X0+LCEO7zgb+3UT1I1dc0k/5dwKQQ==", + "dependencies": { + "base-x": "^3.0.9", + "create-hash": "^1.1.2" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/xrpl/node_modules/ripple-keypairs": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/ripple-keypairs/-/ripple-keypairs-1.3.1.tgz", + "integrity": "sha512-dmPlraWKJciFJxHcoubDahGnoIalG5e/BtV6HNDUs7wLXmtnLMHt6w4ed9R8MTL2zNrVPiIdI/HCtMMo0Tm7JQ==", + "dependencies": { + "bn.js": "^5.1.1", + "brorand": "^1.0.5", + "elliptic": "^6.5.4", + "hash.js": "^1.0.3", + "ripple-address-codec": "^4.3.1" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/yaeti": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/yaeti/-/yaeti-0.0.6.tgz", + "integrity": "sha512-MvQa//+KcZCUkBTIC9blM+CU9J2GzuTytsOUwf2lidtvkx/6gnEp1QvJv34t9vdjhFmha/mUiNDbN0D0mJWdug==", + "engines": { + "node": ">=0.10.32" + } + }, "node_modules/yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", @@ -1051,6 +2381,24 @@ "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", "dev": true }, + "@noble/hashes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", + "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==" + }, + "@types/brorand": { + "version": "1.0.33", + "resolved": "https://registry.npmjs.org/@types/brorand/-/brorand-1.0.33.tgz", + "integrity": "sha512-KmNsWYtzKXpmxjecvYWUEGK5biJB/1kpHRObHZD8eme1tz/TvbESbZeNAHPRNd5qyCJiHk2ztbNzKbPC6TuPFg==", + "requires": { + "@types/node": "*" + } + }, + "@types/node": { + "version": "10.12.18", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.18.tgz", + "integrity": "sha512-fh+pAqt4xRzPfqA6eh3Z2y6fyZavRIumvjhaCL753+TVkGKGhpPeyrJG2JftD0T9q4GF00KjefsQ+PQNDdWQaQ==" + }, "acorn": { "version": "8.8.2", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", @@ -1064,6 +2412,14 @@ "dev": true, "requires": {} }, + "agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "requires": { + "debug": "4" + } + }, "ajv": { "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", @@ -1103,12 +2459,90 @@ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, + "assert": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/assert/-/assert-2.1.0.tgz", + "integrity": "sha512-eLHpSK/Y4nhMJ07gDaAzoX/XAKS8PSaojml3M0DM4JpV1LAi5JOJ/p6H/XWrl8L+DzVEvVCW1z3vWAaB9oTsQw==", + "requires": { + "call-bind": "^1.0.2", + "is-nan": "^1.3.2", + "object-is": "^1.1.5", + "object.assign": "^4.1.4", + "util": "^0.12.5" + } + }, + "available-typed-arrays": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", + "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", + "requires": { + "possible-typed-array-names": "^1.0.0" + } + }, "balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, + "base-x": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.9.tgz", + "integrity": "sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ==", + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" + }, + "big-integer": { + "version": "1.6.52", + "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.52.tgz", + "integrity": "sha512-QxD8cf2eVqJOOz63z6JIN9BzvVs/dlySa5HGSBH5xtR8dPteIRQnBxxKqkNTiT6jbDTF6jAfrd4oMcND9RGbQg==" + }, + "bignumber.js": { + "version": "9.1.2", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.2.tgz", + "integrity": "sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug==" + }, + "bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "requires": { + "file-uri-to-path": "1.0.0" + } + }, + "bip32": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/bip32/-/bip32-2.0.6.tgz", + "integrity": "sha512-HpV5OMLLGTjSVblmrtYRfFFKuQB+GArM0+XP8HGWfJ5vxYBqo+DesvJwOdC2WJ3bCkZShGf0QIfoIpeomVzVdA==", + "requires": { + "@types/node": "10.12.18", + "bs58check": "^2.1.1", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "tiny-secp256k1": "^1.1.3", + "typeforce": "^1.11.5", + "wif": "^2.0.6" + } + }, + "bip39": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/bip39/-/bip39-3.1.0.tgz", + "integrity": "sha512-c9kiwdk45Do5GL0vJMe7tS95VjCii65mYAH7DfWl3uW8AVzXKQVUm64i3hzVybBDMp9r7j9iNxR85+ul8MdN/A==", + "requires": { + "@noble/hashes": "^1.2.0" + } + }, + "bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -1119,6 +2553,58 @@ "concat-map": "0.0.1" } }, + "brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==" + }, + "bs58": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", + "integrity": "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==", + "requires": { + "base-x": "^3.0.2" + } + }, + "bs58check": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-2.1.2.tgz", + "integrity": "sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==", + "requires": { + "bs58": "^4.0.0", + "create-hash": "^1.1.0", + "safe-buffer": "^5.1.2" + } + }, + "buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "requires": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "bufferutil": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.8.tgz", + "integrity": "sha512-4T53u4PdgsXqKaIctwF8ifXlRTTmEPJ8iEPWFdGZvcf7sbwYo6FKFEX9eNNAnzFZ7EzJAQ3CJeOtCRA4rDp7Pw==", + "requires": { + "node-gyp-build": "^4.3.0" + } + }, + "call-bind": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", + "requires": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" + } + }, "callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -1135,6 +2621,15 @@ "supports-color": "^7.1.0" } }, + "cipher-base": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, "color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -1161,6 +2656,31 @@ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "dev": true }, + "create-hash": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "requires": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" + } + }, + "create-hmac": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", + "requires": { + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, "cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -1172,21 +2692,54 @@ "which": "^2.0.1" } }, + "d": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.2.tgz", + "integrity": "sha512-MOqHvMWF9/9MX6nza0KgvFH4HpMU0EF5uUDXqX/BtxtU8NfB0QzRtJ8Oe/6SuS4kbhyzVJwjd97EA4PKrzJ8bw==", + "requires": { + "es5-ext": "^0.10.64", + "type": "^2.7.2" + } + }, "debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, "requires": { "ms": "2.1.2" } }, + "decimal.js": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.3.tgz", + "integrity": "sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==" + }, "deep-is": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true }, + "define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "requires": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + } + }, + "define-properties": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", + "requires": { + "define-data-property": "^1.0.1", + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + } + }, "doctrine": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", @@ -1196,6 +2749,20 @@ "esutils": "^2.0.2" } }, + "elliptic": { + "version": "6.5.4", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", + "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", + "requires": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + } + }, "enquirer": { "version": "2.3.6", "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", @@ -1205,6 +2772,49 @@ "ansi-colors": "^4.1.1" } }, + "es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "requires": { + "get-intrinsic": "^1.2.4" + } + }, + "es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==" + }, + "es5-ext": { + "version": "0.10.64", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.64.tgz", + "integrity": "sha512-p2snDhiLaXe6dahss1LddxqEm+SkuDvV8dnIQG0MWjyHpcMNfXKPE+/Cc0y+PhxJX3A4xGNeFCj5oc0BUh6deg==", + "requires": { + "es6-iterator": "^2.0.3", + "es6-symbol": "^3.1.3", + "esniff": "^2.0.1", + "next-tick": "^1.1.0" + } + }, + "es6-iterator": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==", + "requires": { + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" + } + }, + "es6-symbol": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.4.tgz", + "integrity": "sha512-U9bFFjX8tFiATgtkJ1zg25+KviIXpgRvRHS8sau3GfhVzThRQrOeksPeT0BWW2MNZs1OEWJ1DPXOQMn0KKRkvg==", + "requires": { + "d": "^1.0.2", + "ext": "^1.7.0" + } + }, "escape-string-regexp": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", @@ -1290,6 +2900,17 @@ "integrity": "sha512-HPpKPUBQcAsZOsHAFwTtIKcYlCje62XB7SEAcxjtmW6TD1WVpkS6i6/hOVtTZIl4zGj/mBqpFVGvaDneik+VoQ==", "dev": true }, + "esniff": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/esniff/-/esniff-2.0.1.tgz", + "integrity": "sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg==", + "requires": { + "d": "^1.0.1", + "es5-ext": "^0.10.62", + "event-emitter": "^0.3.5", + "type": "^2.7.2" + } + }, "espree": { "version": "9.5.1", "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.1.tgz", @@ -1331,6 +2952,37 @@ "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true }, + "event-emitter": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", + "integrity": "sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA==", + "requires": { + "d": "1", + "es5-ext": "~0.10.14" + } + }, + "evernode-js-client": { + "version": "0.6.43", + "resolved": "https://registry.npmjs.org/evernode-js-client/-/evernode-js-client-0.6.43.tgz", + "integrity": "sha512-yo2x5/gEaMBdJ8nS6Tba+Oj9/JOnLz5XnRTrux3fHwH1kAkykzcFdtshh68BTfy0fcUhJhIMhW8gMyWOBLmEAA==", + "requires": { + "elliptic": "6.5.4", + "libsodium-wrappers": "0.7.10", + "ripple-address-codec": "4.2.0", + "ripple-keypairs": "1.1.0", + "xrpl": "2.2.1", + "xrpl-accountlib": "3.2.9", + "xrpl-binary-codec": "1.4.2" + } + }, + "ext": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/ext/-/ext-1.7.0.tgz", + "integrity": "sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==", + "requires": { + "type": "^2.7.2" + } + }, "fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -1358,6 +3010,11 @@ "flat-cache": "^3.0.4" } }, + "file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" + }, "flat-cache": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", @@ -1374,18 +3031,43 @@ "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", "dev": true }, + "for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "requires": { + "is-callable": "^1.1.3" + } + }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", "dev": true }, + "function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==" + }, "functional-red-black-tree": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", "integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==", "dev": true }, + "get-intrinsic": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", + "requires": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + } + }, "glob": { "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", @@ -1418,12 +3100,97 @@ "type-fest": "^0.20.2" } }, + "gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "requires": { + "get-intrinsic": "^1.1.3" + } + }, "has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, + "has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "requires": { + "es-define-property": "^1.0.0" + } + }, + "has-proto": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==" + }, + "has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==" + }, + "has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "requires": { + "has-symbols": "^1.0.3" + } + }, + "hash-base": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", + "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", + "requires": { + "inherits": "^2.0.4", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + } + }, + "hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "requires": { + "function-bind": "^1.1.2" + } + }, + "hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==", + "requires": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "requires": { + "agent-base": "6", + "debug": "4" + } + }, + "ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" + }, "ignore": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", @@ -1459,8 +3226,21 @@ "inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "is-arguments": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", + "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", + "requires": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + } + }, + "is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==" }, "is-extglob": { "version": "2.1.1", @@ -1468,6 +3248,14 @@ "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", "dev": true }, + "is-generator-function": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", + "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==", + "requires": { + "has-tostringtag": "^1.0.0" + } + }, "is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", @@ -1477,6 +3265,28 @@ "is-extglob": "^2.1.1" } }, + "is-nan": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/is-nan/-/is-nan-1.3.2.tgz", + "integrity": "sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w==", + "requires": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3" + } + }, + "is-typed-array": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz", + "integrity": "sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==", + "requires": { + "which-typed-array": "^1.1.14" + } + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==" + }, "isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -1514,6 +3324,24 @@ "type-check": "~0.4.0" } }, + "libsodium": { + "version": "0.7.13", + "resolved": "https://registry.npmjs.org/libsodium/-/libsodium-0.7.13.tgz", + "integrity": "sha512-mK8ju0fnrKXXfleL53vtp9xiPq5hKM0zbDQtcxQIsSmxNgSxqCj6R7Hl9PkrNe2j29T4yoDaF7DJLK9/i5iWUw==" + }, + "libsodium-wrappers": { + "version": "0.7.10", + "resolved": "https://registry.npmjs.org/libsodium-wrappers/-/libsodium-wrappers-0.7.10.tgz", + "integrity": "sha512-pO3F1Q9NPLB/MWIhehim42b/Fwb30JNScCNh8TcQ/kIc+qGLQch8ag8wb0keK3EP5kbGakk1H8Wwo7v+36rNQg==", + "requires": { + "libsodium": "^0.7.0" + } + }, + "lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, "lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", @@ -1529,6 +3357,26 @@ "yallist": "^4.0.0" } }, + "md5.js": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", + "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" + }, + "minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==" + }, "minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -1541,8 +3389,12 @@ "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "nan": { + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.19.0.tgz", + "integrity": "sha512-nO1xXxfh/RWNxfd/XPfbIfFk5vgLsAxUR9y5O0cHMJu/AW9U95JLXqthYHjEp+8gQ5p96K9jUp8nbVOxCdRbtw==" }, "natural-compare": { "version": "1.4.0", @@ -1550,6 +3402,41 @@ "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", "dev": true }, + "next-tick": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz", + "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==" + }, + "node-gyp-build": { + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.0.tgz", + "integrity": "sha512-u6fs2AEUljNho3EYTJNBfImO5QTo/J/1Etd+NVdCj7qWKUSN/bSLkZwhDv7I+w/MSC6qJ4cknepkAYykDdK8og==" + }, + "object-is": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.6.tgz", + "integrity": "sha512-F8cZ+KfGlSGi09lJT7/Nd6KJZ9ygtvYC0/UYYLI9nmQKLMnydpB9yvbv9K1uSkEu7FU9vYPmVwLg328tX+ot3Q==", + "requires": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1" + } + }, + "object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==" + }, + "object.assign": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", + "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", + "requires": { + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "has-symbols": "^1.0.3", + "object-keys": "^1.1.1" + } + }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -1594,6 +3481,11 @@ "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true }, + "possible-typed-array-names": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz", + "integrity": "sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==" + }, "prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", @@ -1612,6 +3504,16 @@ "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", "dev": true }, + "readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, "regexpp": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", @@ -1633,6 +3535,88 @@ "glob": "^7.1.3" } }, + "ripemd160": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, + "ripple-address-codec": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/ripple-address-codec/-/ripple-address-codec-4.2.0.tgz", + "integrity": "sha512-9QhBNDiWjwj7l+WQ7H7klXF/VwxVj2Q0HRhd4vLCueTPoxUtaNQyfvUZFiXJrqxg0heM3/iWxupkq4TwrXgSuQ==", + "requires": { + "base-x": "3.0.9", + "create-hash": "^1.1.2" + } + }, + "ripple-binary-codec": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/ripple-binary-codec/-/ripple-binary-codec-1.11.0.tgz", + "integrity": "sha512-g7+gs3T+NfoeW6vIq5dcN0CkIT4t/zwRzFxz8X2RzfbrWRnewPUKqQbmBgs05tXLX5NuWPaneiaAVpFpYBcdfw==", + "requires": { + "assert": "^2.0.0", + "big-integer": "^1.6.48", + "buffer": "6.0.3", + "create-hash": "^1.2.0", + "decimal.js": "^10.2.0", + "ripple-address-codec": "^4.3.1" + }, + "dependencies": { + "ripple-address-codec": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/ripple-address-codec/-/ripple-address-codec-4.3.1.tgz", + "integrity": "sha512-Qa3+9wKVvpL/xYtT6+wANsn0A1QcC5CT6IMZbRJZ/1lGt7gmwIfsrCuz1X0+LCEO7zgb+3UT1I1dc0k/5dwKQQ==", + "requires": { + "base-x": "^3.0.9", + "create-hash": "^1.1.2" + } + } + } + }, + "ripple-keypairs": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/ripple-keypairs/-/ripple-keypairs-1.1.0.tgz", + "integrity": "sha512-Zlmbtn2YUpW4uKlLm2/tpkY5RC/EXQlkJwIIKp0AoF9D23pJ43/EuipNW2F6qURdbkUezDwB0bMV7uRXip3x2w==", + "requires": { + "bn.js": "^5.1.1", + "brorand": "^1.0.5", + "elliptic": "^6.5.4", + "hash.js": "^1.0.3", + "ripple-address-codec": "^4.2.0" + }, + "dependencies": { + "bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==" + } + } + }, + "ripple-secret-codec": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/ripple-secret-codec/-/ripple-secret-codec-1.0.3.tgz", + "integrity": "sha512-vYcHlJx1p+5uH4ORda2dlvbgCy68m/Ib2kn+Np6PMmRoBenf9pKHa4vzaWmp2SjJKPi1921lQjdeAWoXdm7E0g==", + "requires": { + "base-x": "^3.0.3", + "bignumber.js": "^5.0.0" + }, + "dependencies": { + "bignumber.js": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-5.0.0.tgz", + "integrity": "sha512-KWTu6ZMVk9sxlDJQh2YH1UOnfDP8O8TpxUxgQG/vKASoSnEjK9aVuOueFaPcQEYQ5fyNXNTOYwYw3099RYebWg==" + } + } + }, + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" + }, "semver": { "version": "7.5.0", "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.0.tgz", @@ -1642,6 +3626,28 @@ "lru-cache": "^6.0.0" } }, + "set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "requires": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + } + }, + "sha.js": { + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, "shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -1657,6 +3663,14 @@ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true }, + "string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "requires": { + "safe-buffer": "~5.2.0" + } + }, "strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", @@ -1687,6 +3701,23 @@ "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", "dev": true }, + "tiny-secp256k1": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/tiny-secp256k1/-/tiny-secp256k1-1.1.6.tgz", + "integrity": "sha512-FmqJZGduTyvsr2cF3375fqGHUovSwDi/QytexX1Se4BPuPZpTE5Ftp5fg+EFSuEf3lhZqgCRjEG3ydUQ/aNiwA==", + "requires": { + "bindings": "^1.3.0", + "bn.js": "^4.11.8", + "create-hmac": "^1.1.7", + "elliptic": "^6.4.0", + "nan": "^2.13.2" + } + }, + "type": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/type/-/type-2.7.2.tgz", + "integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==" + }, "type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -1702,6 +3733,19 @@ "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "dev": true }, + "typedarray-to-buffer": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", + "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", + "requires": { + "is-typedarray": "^1.0.0" + } + }, + "typeforce": { + "version": "1.18.0", + "resolved": "https://registry.npmjs.org/typeforce/-/typeforce-1.18.0.tgz", + "integrity": "sha512-7uc1O8h1M1g0rArakJdf0uLRSSgFcYexrVoKo+bzJd32gd4gDy2L/Z+8/FjPnU9ydY3pEnVPtr9FyscYY60K1g==" + }, "uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", @@ -1711,12 +3755,65 @@ "punycode": "^2.1.0" } }, + "utf-8-validate": { + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.10.tgz", + "integrity": "sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ==", + "requires": { + "node-gyp-build": "^4.3.0" + } + }, + "util": { + "version": "0.12.5", + "resolved": "https://registry.npmjs.org/util/-/util-0.12.5.tgz", + "integrity": "sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==", + "requires": { + "inherits": "^2.0.3", + "is-arguments": "^1.0.4", + "is-generator-function": "^1.0.7", + "is-typed-array": "^1.1.3", + "which-typed-array": "^1.1.2" + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" + }, "v8-compile-cache": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", "dev": true }, + "websocket": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/websocket/-/websocket-1.0.34.tgz", + "integrity": "sha512-PRDso2sGwF6kM75QykIesBijKSVceR6jL2G8NGYyq2XrItNC2P5/qL5XeR056GhA+Ly7JMFvJb9I312mJfmqnQ==", + "requires": { + "bufferutil": "^4.0.1", + "debug": "^2.2.0", + "es5-ext": "^0.10.50", + "typedarray-to-buffer": "^3.1.5", + "utf-8-validate": "^5.0.2", + "yaeti": "^0.0.6" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + } + } + }, "which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -1726,6 +3823,26 @@ "isexe": "^2.0.0" } }, + "which-typed-array": { + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.15.tgz", + "integrity": "sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==", + "requires": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.2" + } + }, + "wif": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/wif/-/wif-2.0.6.tgz", + "integrity": "sha512-HIanZn1zmduSF+BQhkE+YXIbEiH0xPr1012QbFEGB0xsKqJii0/SqJjyn8dFv6y36kOznMgMB+LGcbZTJ1xACQ==", + "requires": { + "bs58check": "<3.0.0" + } + }, "word-wrap": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", @@ -1738,6 +3855,253 @@ "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", "dev": true }, + "ws": { + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.16.0.tgz", + "integrity": "sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==", + "requires": {} + }, + "xrpl": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/xrpl/-/xrpl-2.2.1.tgz", + "integrity": "sha512-UlUtV0SAaXxdAAZYluU+pEg9WmDrvEcHZYL0KR2bQS6xu2mMlQvXorkCAiS8cLI+PQR0i8CGJDReRV5kjGg1pA==", + "requires": { + "bignumber.js": "^9.0.0", + "bip32": "^2.0.6", + "bip39": "^3.0.4", + "https-proxy-agent": "^5.0.0", + "lodash": "^4.17.4", + "ripple-address-codec": "^4.2.4", + "ripple-binary-codec": "^1.4.0", + "ripple-keypairs": "^1.1.3", + "ws": "^8.2.2" + }, + "dependencies": { + "bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==" + }, + "ripple-address-codec": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/ripple-address-codec/-/ripple-address-codec-4.3.1.tgz", + "integrity": "sha512-Qa3+9wKVvpL/xYtT6+wANsn0A1QcC5CT6IMZbRJZ/1lGt7gmwIfsrCuz1X0+LCEO7zgb+3UT1I1dc0k/5dwKQQ==", + "requires": { + "base-x": "^3.0.9", + "create-hash": "^1.1.2" + } + }, + "ripple-keypairs": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/ripple-keypairs/-/ripple-keypairs-1.3.1.tgz", + "integrity": "sha512-dmPlraWKJciFJxHcoubDahGnoIalG5e/BtV6HNDUs7wLXmtnLMHt6w4ed9R8MTL2zNrVPiIdI/HCtMMo0Tm7JQ==", + "requires": { + "bn.js": "^5.1.1", + "brorand": "^1.0.5", + "elliptic": "^6.5.4", + "hash.js": "^1.0.3", + "ripple-address-codec": "^4.3.1" + } + } + } + }, + "xrpl-accountlib": { + "version": "3.2.9", + "resolved": "https://registry.npmjs.org/xrpl-accountlib/-/xrpl-accountlib-3.2.9.tgz", + "integrity": "sha512-jg6I18LzL3jXKPhEdos958PcVW/XLB2eaaZTM06WlVqgxCyNs9G2GEDl+xrqAWopzy1WcCR0/hF/4cmTCHytag==", + "requires": { + "assert": "^2.0.0", + "bip32": "^2.0.6", + "bip39": "^3.0.4", + "bn.js": "^5.2.1", + "elliptic": "6.5.4", + "hash.js": "^1.1.7", + "lodash": "^4.17.21", + "ripple-address-codec": "^4.2.5", + "ripple-keypairs": "^1.1.4", + "ripple-secret-codec": "^1.0.3", + "xrpl-binary-codec-prerelease": "^7.0.1", + "xrpl-client": "^2.3.0", + "xrpl-secret-numbers": "^0.3.3", + "xrpl-sign-keypairs": "^2.5.0" + }, + "dependencies": { + "bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==" + }, + "ripple-address-codec": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/ripple-address-codec/-/ripple-address-codec-4.3.1.tgz", + "integrity": "sha512-Qa3+9wKVvpL/xYtT6+wANsn0A1QcC5CT6IMZbRJZ/1lGt7gmwIfsrCuz1X0+LCEO7zgb+3UT1I1dc0k/5dwKQQ==", + "requires": { + "base-x": "^3.0.9", + "create-hash": "^1.1.2" + } + }, + "ripple-keypairs": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/ripple-keypairs/-/ripple-keypairs-1.3.1.tgz", + "integrity": "sha512-dmPlraWKJciFJxHcoubDahGnoIalG5e/BtV6HNDUs7wLXmtnLMHt6w4ed9R8MTL2zNrVPiIdI/HCtMMo0Tm7JQ==", + "requires": { + "bn.js": "^5.1.1", + "brorand": "^1.0.5", + "elliptic": "^6.5.4", + "hash.js": "^1.0.3", + "ripple-address-codec": "^4.3.1" + } + } + } + }, + "xrpl-binary-codec": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/xrpl-binary-codec/-/xrpl-binary-codec-1.4.2.tgz", + "integrity": "sha512-fYyyaiVgeCGUEplqebWl272NxOixLjb0xAIGjNUT17HytECPbUlc/0xUr9PvGLriqpZtQ3YEgpwpCPTEpFvL4A==", + "requires": { + "assert": "^2.0.0", + "big-integer": "^1.6.48", + "buffer": "5.6.0", + "create-hash": "^1.2.0", + "decimal.js": "^10.2.0", + "ripple-address-codec": "^4.2.3" + }, + "dependencies": { + "buffer": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.6.0.tgz", + "integrity": "sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw==", + "requires": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4" + } + }, + "ripple-address-codec": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/ripple-address-codec/-/ripple-address-codec-4.3.1.tgz", + "integrity": "sha512-Qa3+9wKVvpL/xYtT6+wANsn0A1QcC5CT6IMZbRJZ/1lGt7gmwIfsrCuz1X0+LCEO7zgb+3UT1I1dc0k/5dwKQQ==", + "requires": { + "base-x": "^3.0.9", + "create-hash": "^1.1.2" + } + } + } + }, + "xrpl-binary-codec-prerelease": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/xrpl-binary-codec-prerelease/-/xrpl-binary-codec-prerelease-7.0.1.tgz", + "integrity": "sha512-IOIWUTkCyeYWReT6hn/2ONMpk0FNk1mltqQjpl7n2cfCuxJwSxwk+J4fi5s0cExNJSFT1aUhRSgDQLOtCBo2hQ==", + "requires": { + "assert": "^2.0.0", + "big-integer": "^1.6.48", + "buffer": "6.0.3", + "create-hash": "^1.2.0", + "decimal.js": "^10.2.0", + "ripple-address-codec": "^4.3.1" + }, + "dependencies": { + "ripple-address-codec": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/ripple-address-codec/-/ripple-address-codec-4.3.1.tgz", + "integrity": "sha512-Qa3+9wKVvpL/xYtT6+wANsn0A1QcC5CT6IMZbRJZ/1lGt7gmwIfsrCuz1X0+LCEO7zgb+3UT1I1dc0k/5dwKQQ==", + "requires": { + "base-x": "^3.0.9", + "create-hash": "^1.1.2" + } + } + } + }, + "xrpl-client": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/xrpl-client/-/xrpl-client-2.3.1.tgz", + "integrity": "sha512-UyeYZvewX+n+OHpb1W7zutHWfS75Z45Ltz15OOMNhmxFnBPRbJJ0sMQRtk6jVoxuF7Id8kZ85IwifqKNByyMWw==", + "requires": { + "debug": "^4.1.1", + "websocket": "^1.0.34" + } + }, + "xrpl-secret-numbers": { + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/xrpl-secret-numbers/-/xrpl-secret-numbers-0.3.4.tgz", + "integrity": "sha512-B3m0OLRsmNLQpN/BUR15+LC4yejM/pdneoWgijfBYbgjVVnpyCF5+Ur7zbAs4nCAlBUZYXnxp+o/rSNZkke9jQ==", + "requires": { + "@types/brorand": "^1.0.30", + "brorand": "^1.1.0", + "ripple-keypairs": "^1.1.5" + }, + "dependencies": { + "bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==" + }, + "ripple-address-codec": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/ripple-address-codec/-/ripple-address-codec-4.3.1.tgz", + "integrity": "sha512-Qa3+9wKVvpL/xYtT6+wANsn0A1QcC5CT6IMZbRJZ/1lGt7gmwIfsrCuz1X0+LCEO7zgb+3UT1I1dc0k/5dwKQQ==", + "requires": { + "base-x": "^3.0.9", + "create-hash": "^1.1.2" + } + }, + "ripple-keypairs": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/ripple-keypairs/-/ripple-keypairs-1.3.1.tgz", + "integrity": "sha512-dmPlraWKJciFJxHcoubDahGnoIalG5e/BtV6HNDUs7wLXmtnLMHt6w4ed9R8MTL2zNrVPiIdI/HCtMMo0Tm7JQ==", + "requires": { + "bn.js": "^5.1.1", + "brorand": "^1.0.5", + "elliptic": "^6.5.4", + "hash.js": "^1.0.3", + "ripple-address-codec": "^4.3.1" + } + } + } + }, + "xrpl-sign-keypairs": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/xrpl-sign-keypairs/-/xrpl-sign-keypairs-2.5.0.tgz", + "integrity": "sha512-chcO69Aao1lN54ypdmZ3HQOculTf8DaqzSULnPHS1ivsufk/iz7Fa2rg1//cgJx+bYvvV9y9xP6E55S6YBEZ0Q==", + "requires": { + "big-integer": "^1.6.51", + "ripple-address-codec": "^4.2.4", + "ripple-keypairs": "^1.1.4", + "xrpl-binary-codec-prerelease": "^7.0.1" + }, + "dependencies": { + "bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==" + }, + "ripple-address-codec": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/ripple-address-codec/-/ripple-address-codec-4.3.1.tgz", + "integrity": "sha512-Qa3+9wKVvpL/xYtT6+wANsn0A1QcC5CT6IMZbRJZ/1lGt7gmwIfsrCuz1X0+LCEO7zgb+3UT1I1dc0k/5dwKQQ==", + "requires": { + "base-x": "^3.0.9", + "create-hash": "^1.1.2" + } + }, + "ripple-keypairs": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/ripple-keypairs/-/ripple-keypairs-1.3.1.tgz", + "integrity": "sha512-dmPlraWKJciFJxHcoubDahGnoIalG5e/BtV6HNDUs7wLXmtnLMHt6w4ed9R8MTL2zNrVPiIdI/HCtMMo0Tm7JQ==", + "requires": { + "bn.js": "^5.1.1", + "brorand": "^1.0.5", + "elliptic": "^6.5.4", + "hash.js": "^1.0.3", + "ripple-address-codec": "^4.3.1" + } + } + } + }, + "yaeti": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/yaeti/-/yaeti-0.0.6.tgz", + "integrity": "sha512-MvQa//+KcZCUkBTIC9blM+CU9J2GzuTytsOUwf2lidtvkx/6gnEp1QvJv34t9vdjhFmha/mUiNDbN0D0mJWdug==" + }, "yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", diff --git a/npm/package.json b/npm/package.json index c9f705b..6197b4f 100644 --- a/npm/package.json +++ b/npm/package.json @@ -1,6 +1,6 @@ { "name": "hpdevkit", - "version": "0.6.5", + "version": "0.6.6", "license": "SEE LICENSE IN https://raw.githubusercontent.com/EvernodeXRPL/evernode-resources/main/license/evernode-license.pdf", "description": "Developer toolkit for HotPocket smart contract development", "scripts": { @@ -18,7 +18,8 @@ ], "homepage": "https://github.com/HotPocketDev/evernode-sdk", "dependencies": { - "commander": "9.4.0" + "commander": "9.4.0", + "evernode-js-client": "0.6.43" }, "devDependencies": { "eslint": "8.3.0"