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

mapexplorer-core

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mapexplorer-core - npm Package Compare versions

Comparing version 0.0.18 to 0.1.0

2

karma.conf.js

@@ -15,3 +15,3 @@ var path = require('path');

// frameworks to use
frameworks: ['mocha', 'should'],
frameworks: ['mocha', 'should', 'sinon'],

@@ -18,0 +18,0 @@

(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('d3-hierarchy'), require('d3-transition'), require('d3-ease'), require('d3-selection'), require('d3-zoom'), require('d3-array'), require('deepmerge'), require('stratumn-sdk'), require('canonical-json'), require('js-sha256'), require('superagent')) :
typeof define === 'function' && define.amd ? define(['exports', 'd3-hierarchy', 'd3-transition', 'd3-ease', 'd3-selection', 'd3-zoom', 'd3-array', 'deepmerge', 'stratumn-sdk', 'canonical-json', 'js-sha256', 'superagent'], factory) :
(factory((global.mapexplorerCore = global.mapexplorerCore || {}),global.d3,global.d3,global.d3,global.d3,global.d3,global.d3,global.merge,global.StratumnSDK,global.stringify,global.sha256,global.request));
}(this, (function (exports,d3Hierarchy,d3Transition,d3Ease,d3Selection,d3Zoom,d3Array,merge,StratumnSDK,stringify,sha256,request) { 'use strict';
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('d3-hierarchy'), require('d3-transition'), require('d3-ease'), require('d3-selection'), require('d3-zoom'), require('d3-array'), require('deepmerge'), require('stratumn-sdk'), require('canonical-json'), require('js-sha256'), require('httpplease')) :
typeof define === 'function' && define.amd ? define(['exports', 'd3-hierarchy', 'd3-transition', 'd3-ease', 'd3-selection', 'd3-zoom', 'd3-array', 'deepmerge', 'stratumn-sdk', 'canonical-json', 'js-sha256', 'httpplease'], factory) :
(factory((global.mapexplorerCore = global.mapexplorerCore || {}),global.d3,global.d3,global.d3,global.d3,global.d3,global.d3,global.merge,global.stratumnSdk,global.stringify,global.sha256,global.httpplease));
}(this, (function (exports,d3Hierarchy,d3Transition,d3Ease,d3Selection,d3Zoom,d3Array,merge,stratumnSdk,stringify,sha256,httpplease) { 'use strict';
merge = 'default' in merge ? merge['default'] : merge;
var StratumnSDK__default = 'default' in StratumnSDK ? StratumnSDK['default'] : StratumnSDK;
stringify = 'default' in stringify ? stringify['default'] : stringify;
sha256 = 'default' in sha256 ? sha256['default'] : sha256;
request = 'default' in request ? request['default'] : request;
httpplease = 'default' in httpplease ? httpplease['default'] : httpplease;

@@ -250,3 +249,3 @@ function makeLink(source, target) {

if (!segment.link.state) {
return StratumnSDK.loadLink(segment).then(function (res) {
return stratumnSdk.loadLink(segment).then(function (res) {
return merge(res, segment);

@@ -343,3 +342,3 @@ });

value: function _load(map) {
return StratumnSDK__default.getApplication(map.application).then(function (app) {
return stratumnSdk.getApplication(map.application).then(function (app) {
return app.getMap(map.id);

@@ -465,3 +464,4 @@ }).then(function (res) {

return this._getFossil(txId).then(function (res) {
if (!res.body.outputs.find(function (output) {
var body = JSON.parse(res.xhr.response);
if (!body.outputs.find(function (output) {
return output.data_hex === _this2.segment.meta.evidence.merkleRoot;

@@ -482,3 +482,3 @@ })) {

var p = new Promise(function (resolve, reject) {
return request('https://api.blockcypher.com/v1/btc/main/txs/' + txId).end(function (err, res) {
return httpplease.get('https://api.blockcypher.com/v1/btc/main/txs/' + txId, function (err, res) {
return err ? reject(err) : resolve(res);

@@ -485,0 +485,0 @@ });

{
"name": "mapexplorer-core",
"version": "0.0.18",
"version": "0.1.0",
"description": "Core library for building Map Explorer components",

@@ -55,2 +55,3 @@ "main": "lib/mapexplorer-core.js",

"karma-should": "^1.0.0",
"karma-sinon": "^1.0.5",
"karma-sourcemap-loader": "^0.3.7",

@@ -61,2 +62,3 @@ "mocha": "^2.4.5",

"rollup-plugin-babel": "^2.6.1",
"rollup-plugin-coffee-script": "^1.1.0",
"rollup-plugin-commonjs": "^3.3.1",

@@ -69,3 +71,4 @@ "rollup-plugin-json": "^2.0.1",

"should": "^8.2.2",
"superagent-nock": "^0.1.1"
"sinon": "^1.17.5",
"zock": "^0.2.6"
},

@@ -81,6 +84,6 @@ "dependencies": {

"deepmerge": "^0.2.10",
"httpplease": "^0.16.4",
"js-sha256": "^0.3.0",
"stratumn-sdk": "^0.5.0",
"superagent": "1.7.1"
"stratumn-sdk": "^0.6.0"
}
}

@@ -7,3 +7,3 @@ import ChainTree from './ChainTree';

import tagsSet from './tagsSet';
import StratumnSDK from 'stratumn-sdk';
import { getApplication } from 'stratumn-sdk';

@@ -56,3 +56,3 @@ export const defaultOptions = {

_load(map) {
return StratumnSDK.getApplication(map.application)
return getApplication(map.application)
.then(app => app.getMap(map.id))

@@ -59,0 +59,0 @@ .then(res => Promise.all(res.map(link => link.load())))

import hashJson from './hashJson';
import request from 'superagent';
import httpplease from 'httpplease';

@@ -82,3 +82,4 @@ import computeMerkleParent from './computeMerkleParent';

.then(res => {
if (!res.body.outputs.find(
const body = JSON.parse(res.xhr.response);
if (!body.outputs.find(
output => output.data_hex === this.segment.meta.evidence.merkleRoot)) {

@@ -97,3 +98,3 @@ return 'Merkle root not found in transaction data';

const p = new Promise((resolve, reject) =>
request(`https://api.blockcypher.com/v1/btc/main/txs/${txId}`).end((err, res) =>
httpplease.get(`https://api.blockcypher.com/v1/btc/main/txs/${txId}`, (err, res) =>
(err ? reject(err) : resolve(res)))

@@ -100,0 +101,0 @@ );

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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