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

@stacks/network

Package Overview
Dependencies
Maintainers
6
Versions
632
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stacks/network - npm Package Compare versions

Comparing version 1.0.0-beta.10 to 1.0.0-beta.11

22

dist/index.esm.js

@@ -17,2 +17,6 @@ import { inheritsLoose as _inheritsLoose } from './_virtual/_rollupPluginBabelHelpers.js';

this.isMainnet = function () {
return _this.version === TransactionVersion.Mainnet;
};
this.getBroadcastApiUrl = function () {

@@ -37,2 +41,18 @@ return "" + _this.coreApiUrl + _this.broadcastEndpoint;

};
this.getInfoUrl = function () {
return _this.coreApiUrl + "/v2/info";
};
this.getBlockTimeInfoUrl = function () {
return _this.coreApiUrl + "/extended/v1/info/network_block_times";
};
this.getPoxInfoUrl = function () {
return _this.coreApiUrl + "/v2/pox";
};
this.getStackerInfoUrl = function (contractAddress, contractName) {
return "" + _this.coreApiUrl + _this.readOnlyFunctionCallEndpoint + "\n " + contractAddress + "/" + contractName + "/get-stacker-info";
};
}

@@ -74,3 +94,3 @@

_this2.chainId = ChainID.Testnet;
_this2.coreApiUrl = 'http://testnet-master.blockstack.org:20443';
_this2.coreApiUrl = 'https://stacks-node-api.blockstack.org';
return _this2;

@@ -77,0 +97,0 @@ }

@@ -26,2 +26,6 @@ 'use strict';

this.isMainnet = function () {
return _this.version === common.TransactionVersion.Mainnet;
};
this.getBroadcastApiUrl = function () {

@@ -46,2 +50,18 @@ return "" + _this.coreApiUrl + _this.broadcastEndpoint;

};
this.getInfoUrl = function () {
return _this.coreApiUrl + "/v2/info";
};
this.getBlockTimeInfoUrl = function () {
return _this.coreApiUrl + "/extended/v1/info/network_block_times";
};
this.getPoxInfoUrl = function () {
return _this.coreApiUrl + "/v2/pox";
};
this.getStackerInfoUrl = function (contractAddress, contractName) {
return "" + _this.coreApiUrl + _this.readOnlyFunctionCallEndpoint + "\n " + contractAddress + "/" + contractName + "/get-stacker-info";
};
}

@@ -83,3 +103,3 @@

_this2.chainId = common.ChainID.Testnet;
_this2.coreApiUrl = 'http://testnet-master.blockstack.org:20443';
_this2.coreApiUrl = 'https://stacks-node-api.blockstack.org';
return _this2;

@@ -86,0 +106,0 @@ }

2

dist/network.cjs.production.min.js

@@ -1,2 +0,2 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("@stacks/common");function n(t,n){t.prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n}var r=function(){function n(){var n=this;this.version=t.TransactionVersion.Mainnet,this.chainId=t.ChainID.Mainnet,this.coreApiUrl="https://core.blockstack.org",this.broadcastEndpoint="/v2/transactions",this.transferFeeEstimateEndpoint="/v2/fees/transfer",this.accountEndpoint="/v2/accounts",this.contractAbiEndpoint="/v2/contracts/interface",this.readOnlyFunctionCallEndpoint="/v2/contracts/call-read",this.getBroadcastApiUrl=function(){return""+n.coreApiUrl+n.broadcastEndpoint},this.getTransferFeeEstimateApiUrl=function(){return""+n.coreApiUrl+n.transferFeeEstimateEndpoint},this.getAccountApiUrl=function(t){return""+n.coreApiUrl+n.accountEndpoint+"/"+t+"?proof=0"},this.getAbiApiUrl=function(t,r){return""+n.coreApiUrl+n.contractAbiEndpoint+"/"+t+"/"+r},this.getReadOnlyFunctionCallApiUrl=function(t,r,e){return""+n.coreApiUrl+n.readOnlyFunctionCallEndpoint+"/"+t+"/"+r+"/"+encodeURIComponent(e)}}return n.prototype.getNameInfo=function(n){return t.fetchPrivate(this.coreApiUrl+"/v1/names/"+n).then((function(t){if(404===t.status)throw new Error("Name not found");if(200!==t.status)throw new Error("Bad response status: "+t.status);return t.json()})).then((function(t){return t.address?Object.assign({},t,{address:t.address}):t}))},n}(),e=function(r){function e(){var n;return(n=r.apply(this,arguments)||this).version=t.TransactionVersion.Testnet,n.chainId=t.ChainID.Testnet,n.coreApiUrl="http://testnet-master.blockstack.org:20443",n}return n(e,r),e}(r),o=function(r){function e(){var n;return(n=r.apply(this,arguments)||this).version=t.TransactionVersion.Testnet,n.chainId=t.ChainID.Testnet,n.coreApiUrl="http://localhost:3999",n}return n(e,r),e}(r);exports.StacksMainnet=r,exports.StacksMocknet=o,exports.StacksTestnet=e;
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("@stacks/common");function n(t,n){t.prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n}var r=function(){function n(){var n=this;this.version=t.TransactionVersion.Mainnet,this.chainId=t.ChainID.Mainnet,this.coreApiUrl="https://core.blockstack.org",this.broadcastEndpoint="/v2/transactions",this.transferFeeEstimateEndpoint="/v2/fees/transfer",this.accountEndpoint="/v2/accounts",this.contractAbiEndpoint="/v2/contracts/interface",this.readOnlyFunctionCallEndpoint="/v2/contracts/call-read",this.isMainnet=function(){return n.version===t.TransactionVersion.Mainnet},this.getBroadcastApiUrl=function(){return""+n.coreApiUrl+n.broadcastEndpoint},this.getTransferFeeEstimateApiUrl=function(){return""+n.coreApiUrl+n.transferFeeEstimateEndpoint},this.getAccountApiUrl=function(t){return""+n.coreApiUrl+n.accountEndpoint+"/"+t+"?proof=0"},this.getAbiApiUrl=function(t,r){return""+n.coreApiUrl+n.contractAbiEndpoint+"/"+t+"/"+r},this.getReadOnlyFunctionCallApiUrl=function(t,r,e){return""+n.coreApiUrl+n.readOnlyFunctionCallEndpoint+"/"+t+"/"+r+"/"+encodeURIComponent(e)},this.getInfoUrl=function(){return n.coreApiUrl+"/v2/info"},this.getBlockTimeInfoUrl=function(){return n.coreApiUrl+"/extended/v1/info/network_block_times"},this.getPoxInfoUrl=function(){return n.coreApiUrl+"/v2/pox"},this.getStackerInfoUrl=function(t,r){return""+n.coreApiUrl+n.readOnlyFunctionCallEndpoint+"\n "+t+"/"+r+"/get-stacker-info"}}return n.prototype.getNameInfo=function(n){return t.fetchPrivate(this.coreApiUrl+"/v1/names/"+n).then((function(t){if(404===t.status)throw new Error("Name not found");if(200!==t.status)throw new Error("Bad response status: "+t.status);return t.json()})).then((function(t){return t.address?Object.assign({},t,{address:t.address}):t}))},n}(),e=function(r){function e(){var n;return(n=r.apply(this,arguments)||this).version=t.TransactionVersion.Testnet,n.chainId=t.ChainID.Testnet,n.coreApiUrl="https://stacks-node-api.blockstack.org",n}return n(e,r),e}(r),o=function(r){function e(){var n;return(n=r.apply(this,arguments)||this).version=t.TransactionVersion.Testnet,n.chainId=t.ChainID.Testnet,n.coreApiUrl="http://localhost:3999",n}return n(e,r),e}(r);exports.StacksMainnet=r,exports.StacksMocknet=o,exports.StacksTestnet=e;
//# sourceMappingURL=network.cjs.production.min.js.map

@@ -26,2 +26,6 @@ (function (global, factory) {

this.isMainnet = function () {
return _this.version === common.TransactionVersion.Mainnet;
};
this.getBroadcastApiUrl = function () {

@@ -46,2 +50,18 @@ return "" + _this.coreApiUrl + _this.broadcastEndpoint;

};
this.getInfoUrl = function () {
return _this.coreApiUrl + "/v2/info";
};
this.getBlockTimeInfoUrl = function () {
return _this.coreApiUrl + "/extended/v1/info/network_block_times";
};
this.getPoxInfoUrl = function () {
return _this.coreApiUrl + "/v2/pox";
};
this.getStackerInfoUrl = function (contractAddress, contractName) {
return "" + _this.coreApiUrl + _this.readOnlyFunctionCallEndpoint + "\n " + contractAddress + "/" + contractName + "/get-stacker-info";
};
}

@@ -83,3 +103,3 @@

_this2.chainId = common.ChainID.Testnet;
_this2.coreApiUrl = 'http://testnet-master.blockstack.org:20443';
_this2.coreApiUrl = 'https://stacks-node-api.blockstack.org';
return _this2;

@@ -86,0 +106,0 @@ }

@@ -1,2 +0,2 @@

!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("@stacks/common")):"function"==typeof define&&define.amd?define(["exports","@stacks/common"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self)["@stacks/network"]={},t.common)}(this,(function(t,n){"use strict";function e(t,n){t.prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n}var r=function(){function t(){var t=this;this.version=n.TransactionVersion.Mainnet,this.chainId=n.ChainID.Mainnet,this.coreApiUrl="https://core.blockstack.org",this.broadcastEndpoint="/v2/transactions",this.transferFeeEstimateEndpoint="/v2/fees/transfer",this.accountEndpoint="/v2/accounts",this.contractAbiEndpoint="/v2/contracts/interface",this.readOnlyFunctionCallEndpoint="/v2/contracts/call-read",this.getBroadcastApiUrl=function(){return""+t.coreApiUrl+t.broadcastEndpoint},this.getTransferFeeEstimateApiUrl=function(){return""+t.coreApiUrl+t.transferFeeEstimateEndpoint},this.getAccountApiUrl=function(n){return""+t.coreApiUrl+t.accountEndpoint+"/"+n+"?proof=0"},this.getAbiApiUrl=function(n,e){return""+t.coreApiUrl+t.contractAbiEndpoint+"/"+n+"/"+e},this.getReadOnlyFunctionCallApiUrl=function(n,e,r){return""+t.coreApiUrl+t.readOnlyFunctionCallEndpoint+"/"+n+"/"+e+"/"+encodeURIComponent(r)}}return t.prototype.getNameInfo=function(t){return n.fetchPrivate(this.coreApiUrl+"/v1/names/"+t).then((function(t){if(404===t.status)throw new Error("Name not found");if(200!==t.status)throw new Error("Bad response status: "+t.status);return t.json()})).then((function(t){return t.address?Object.assign({},t,{address:t.address}):t}))},t}(),o=function(t){function r(){var e;return(e=t.apply(this,arguments)||this).version=n.TransactionVersion.Testnet,e.chainId=n.ChainID.Testnet,e.coreApiUrl="http://testnet-master.blockstack.org:20443",e}return e(r,t),r}(r),i=function(t){function r(){var e;return(e=t.apply(this,arguments)||this).version=n.TransactionVersion.Testnet,e.chainId=n.ChainID.Testnet,e.coreApiUrl="http://localhost:3999",e}return e(r,t),r}(r);t.StacksMainnet=r,t.StacksMocknet=i,t.StacksTestnet=o,Object.defineProperty(t,"__esModule",{value:!0})}));
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("@stacks/common")):"function"==typeof define&&define.amd?define(["exports","@stacks/common"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self)["@stacks/network"]={},t.common)}(this,(function(t,n){"use strict";function e(t,n){t.prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n}var r=function(){function t(){var t=this;this.version=n.TransactionVersion.Mainnet,this.chainId=n.ChainID.Mainnet,this.coreApiUrl="https://core.blockstack.org",this.broadcastEndpoint="/v2/transactions",this.transferFeeEstimateEndpoint="/v2/fees/transfer",this.accountEndpoint="/v2/accounts",this.contractAbiEndpoint="/v2/contracts/interface",this.readOnlyFunctionCallEndpoint="/v2/contracts/call-read",this.isMainnet=function(){return t.version===n.TransactionVersion.Mainnet},this.getBroadcastApiUrl=function(){return""+t.coreApiUrl+t.broadcastEndpoint},this.getTransferFeeEstimateApiUrl=function(){return""+t.coreApiUrl+t.transferFeeEstimateEndpoint},this.getAccountApiUrl=function(n){return""+t.coreApiUrl+t.accountEndpoint+"/"+n+"?proof=0"},this.getAbiApiUrl=function(n,e){return""+t.coreApiUrl+t.contractAbiEndpoint+"/"+n+"/"+e},this.getReadOnlyFunctionCallApiUrl=function(n,e,r){return""+t.coreApiUrl+t.readOnlyFunctionCallEndpoint+"/"+n+"/"+e+"/"+encodeURIComponent(r)},this.getInfoUrl=function(){return t.coreApiUrl+"/v2/info"},this.getBlockTimeInfoUrl=function(){return t.coreApiUrl+"/extended/v1/info/network_block_times"},this.getPoxInfoUrl=function(){return t.coreApiUrl+"/v2/pox"},this.getStackerInfoUrl=function(n,e){return""+t.coreApiUrl+t.readOnlyFunctionCallEndpoint+"\n "+n+"/"+e+"/get-stacker-info"}}return t.prototype.getNameInfo=function(t){return n.fetchPrivate(this.coreApiUrl+"/v1/names/"+t).then((function(t){if(404===t.status)throw new Error("Name not found");if(200!==t.status)throw new Error("Bad response status: "+t.status);return t.json()})).then((function(t){return t.address?Object.assign({},t,{address:t.address}):t}))},t}(),o=function(t){function r(){var e;return(e=t.apply(this,arguments)||this).version=n.TransactionVersion.Testnet,e.chainId=n.ChainID.Testnet,e.coreApiUrl="https://stacks-node-api.blockstack.org",e}return e(r,t),r}(r),i=function(t){function r(){var e;return(e=t.apply(this,arguments)||this).version=n.TransactionVersion.Testnet,e.chainId=n.ChainID.Testnet,e.coreApiUrl="http://localhost:3999",e}return e(r,t),r}(r);t.StacksMainnet=r,t.StacksMocknet=i,t.StacksTestnet=o,Object.defineProperty(t,"__esModule",{value:!0})}));
//# sourceMappingURL=network.umd.production.min.js.map

@@ -11,2 +11,3 @@ import { TransactionVersion, ChainID } from '@stacks/common';

readOnlyFunctionCallEndpoint: string;
isMainnet(): boolean;
getBroadcastApiUrl: () => string;

@@ -17,2 +18,6 @@ getTransferFeeEstimateApiUrl: () => string;

getReadOnlyFunctionCallApiUrl: (contractAddress: string, contractName: string, functionName: string) => string;
getInfoUrl: () => string;
getBlockTimeInfoUrl: () => string;
getPoxInfoUrl: () => string;
getStackerInfoUrl: (contractAddress: string, contractName: string) => string;
getNameInfo: (fullyQualifiedName: string) => any;

@@ -29,2 +34,3 @@ }

readOnlyFunctionCallEndpoint: string;
isMainnet: () => boolean;
getBroadcastApiUrl: () => string;

@@ -35,2 +41,6 @@ getTransferFeeEstimateApiUrl: () => string;

getReadOnlyFunctionCallApiUrl: (contractAddress: string, contractName: string, functionName: string) => string;
getInfoUrl: () => string;
getBlockTimeInfoUrl: () => string;
getPoxInfoUrl: () => string;
getStackerInfoUrl: (contractAddress: string, contractName: string) => string;
getNameInfo(fullyQualifiedName: string): Promise<any>;

@@ -37,0 +47,0 @@ }

{
"name": "@stacks/network",
"version": "1.0.0-beta.10",
"version": "1.0.0-beta.11",
"description": "Library for Stacks network operations",

@@ -47,3 +47,3 @@ "keywords": [

"dependencies": {
"@stacks/common": "^1.0.0-beta.10"
"@stacks/common": "^1.0.0-beta.11"
},

@@ -50,0 +50,0 @@ "devDependencies": {

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

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