Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

web-ledger-client

Package Overview
Dependencies
Maintainers
5
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

web-ledger-client - npm Package Compare versions

Comparing version 6.0.0 to 7.0.0

12

lib/constants.js
/*!
* Copyright (c) 2018-2021 Digital Bazaar, Inc. All rights reserved.
* Copyright (c) 2018-2022 Digital Bazaar, Inc. All rights reserved.
*/
'use strict';
module.exports = {
DEFAULT_HEADERS: {Accept: 'application/ld+json, application/json'},
WEB_LEDGER_CONTEXT_V1_URL: 'https://w3id.org/webledger/v1',
ZCAP_CONTEXT_V1_URL: 'https://w3id.org/zcap/v1'
export const DEFAULT_HEADERS = {
Accept: 'application/ld+json, application/json'
};
export const WEB_LEDGER_CONTEXT_V1_URL = 'https://w3id.org/webledger/v1';
export const ZCAP_CONTEXT_V1_URL = 'https://w3id.org/zcap/v1';
/*!
* Copyright (c) 2018-2021 Digital Bazaar, Inc. All rights reserved.
* Copyright (c) 2018-2022 Digital Bazaar, Inc. All rights reserved.
*/
'use strict';
module.exports = {
constants: require('./constants'),
WebLedgerClient: require('./WebLedgerClient'),
WebLedgerClientError: require('./WebLedgerClientError'),
};
export * as constants from './constants.js';
export {WebLedgerClient} from './WebLedgerClient.js';
export {WebLedgerClientError} from './WebLedgerClientError.js';
/*!
* Copyright (c) 2018-2021 Digital Bazaar, Inc. All rights reserved.
* Copyright (c) 2018-2022 Digital Bazaar, Inc. All rights reserved.
*/
'use strict';
import * as constants from './constants.js';
import {httpClient, DEFAULT_HEADERS} from '@digitalbazaar/http-client';
import {WebLedgerClientError} from './WebLedgerClientError.js';
const _get = require('lodash.get');
const constants = require('./constants');
const {httpClient, DEFAULT_HEADERS} = require('@digitalbazaar/http-client');
const WebLedgerClientError = require('./WebLedgerClientError');
/**

@@ -30,4 +27,6 @@ * A SSL capable HTTP Agent.

class WebLedgerClient {
export class WebLedgerClient {
/**
* @class WebLedgerClient
*
* @param {object} options - Options for the WebLedgerClient.

@@ -185,3 +184,3 @@ * @param {string} options.hostname - The hostname of the ledger node.

}
const serviceURL = _get(this.ledgerAgent.service, serviceId);
const serviceURL = this.ledgerAgent.service?.[serviceId];
if(!serviceURL) {

@@ -410,3 +409,1 @@ throw new WebLedgerClientError(

}
module.exports = WebLedgerClient;
/*!
* Copyright (c) 2019-2021 Digital Bazaar, Inc. All rights reserved.
* Copyright (c) 2019-2022 Digital Bazaar, Inc. All rights reserved.
*/
'use strict';
module.exports = class WebLedgerClientError extends Error {
export class WebLedgerClientError extends Error {
constructor(message, name, details) {

@@ -16,2 +14,2 @@ super(message);

}
};
}
{
"name": "web-ledger-client",
"version": "6.0.0",
"version": "7.0.0",
"description": "A WebLedger client.",

@@ -38,30 +38,32 @@ "homepage": "https://github.com/digitalbazaar/web-ledger-client",

"license": "BSD-3-Clause",
"main": "lib/index.js",
"type": "module",
"exports": "./lib/index.js",
"files": [
"lib/**/*.js"
],
"dependencies": {
"@digitalbazaar/http-client": "^1.1.0",
"lodash.get": "^4.4.2"
"@digitalbazaar/http-client": "^3.2.0"
},
"devDependencies": {
"chai": "^4.2.0",
"c8": "^7.11.3",
"chai": "^4.3.6",
"cross-env": "^7.0.3",
"eslint": "^7.21.0",
"eslint-config-digitalbazaar": "^2.6.1",
"eslint-plugin-jsdoc": "^35.2.0",
"jsdoc-to-markdown": "^7.0.1",
"mocha": "^9.0.0",
"eslint": "^8.17.0",
"eslint-config-digitalbazaar": "^3.0.0",
"eslint-plugin-jsdoc": "^39.3.2",
"eslint-plugin-unicorn": "^42.0.0",
"jsdoc-to-markdown": "^7.1.1",
"mocha": "^10.0.0",
"mocha-lcov-reporter": "^1.3.0",
"nock": "^13.1.0",
"nyc": "^15.1.0"
"nock": "^13.2.6"
},
"nyc": {
"exclude": [
"tests"
],
"c8": {
"reporter": [
"html",
"text-summary"
"lcov",
"text-summary",
"text"
]
},
"engines": {
"node": ">=10.0.0"
"node": ">=14"
},

@@ -76,11 +78,9 @@ "keywords": [

"generate-docs": "jsdoc2md lib/*.js > ./docs/api.md",
"test": "npm run lint && npm run test-node",
"test": "npm run test-node",
"test-node": "cross-env NODE_ENV=test mocha --preserve-symlinks -t 10000 tests/*.spec.js",
"coverage": "cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary npm run test-node",
"coverage-ci": "cross-env NODE_ENV=test nyc --reporter=lcovonly npm run test-node",
"coverage-report": "nyc report",
"lint": "eslint .",
"preversion": "npm test",
"postversion": "git push --follow-tags"
"coverage": "cross-env NODE_ENV=test c8 npm run test-node",
"coverage-ci": "cross-env NODE_ENV=test c8 --reporter=lcovonly --reporter=text-summary --reporter=text npm run test-node",
"coverage-report": "c8 report",
"lint": "eslint ."
}
}

@@ -25,3 +25,3 @@ # Web Ledger Client _(web-ledger-client)_

Requires Node.js 10+
- Browsers and Node.js 14+ are supported.

@@ -28,0 +28,0 @@ To install via NPM:

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc