@stacks/network
Advanced tools
Comparing version 1.2.2 to 1.3.0-beta-1
@@ -11,3 +11,3 @@ import { inheritsLoose as _inheritsLoose } from './_virtual/_rollupPluginBabelHelpers.js'; | ||
this.coreApiUrl = 'https://stacks-node-api.mainnet.stacks.co'; | ||
this.bnsLookupUrl = 'https://core.blockstack.org'; | ||
this.bnsLookupUrl = 'https://stacks-node-api.mainnet.stacks.co'; | ||
this.broadcastEndpoint = '/v2/transactions'; | ||
@@ -14,0 +14,0 @@ this.transferFeeEstimateEndpoint = '/v2/fees/transfer'; |
@@ -20,3 +20,3 @@ 'use strict'; | ||
this.coreApiUrl = 'https://stacks-node-api.mainnet.stacks.co'; | ||
this.bnsLookupUrl = 'https://core.blockstack.org'; | ||
this.bnsLookupUrl = 'https://stacks-node-api.mainnet.stacks.co'; | ||
this.broadcastEndpoint = '/v2/transactions'; | ||
@@ -23,0 +23,0 @@ this.transferFeeEstimateEndpoint = '/v2/fees/transfer'; |
@@ -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://stacks-node-api.mainnet.stacks.co",this.bnsLookupUrl="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.bnsLookupUrl+"/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.testnet.stacks.co",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://stacks-node-api.mainnet.stacks.co",this.bnsLookupUrl="https://stacks-node-api.mainnet.stacks.co",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.bnsLookupUrl+"/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.testnet.stacks.co",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 |
@@ -20,3 +20,3 @@ (function (global, factory) { | ||
this.coreApiUrl = 'https://stacks-node-api.mainnet.stacks.co'; | ||
this.bnsLookupUrl = 'https://core.blockstack.org'; | ||
this.bnsLookupUrl = 'https://stacks-node-api.mainnet.stacks.co'; | ||
this.broadcastEndpoint = '/v2/transactions'; | ||
@@ -23,0 +23,0 @@ this.transferFeeEstimateEndpoint = '/v2/fees/transfer'; |
@@ -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 o=function(){function t(){var t=this;this.version=n.TransactionVersion.Mainnet,this.chainId=n.ChainID.Mainnet,this.coreApiUrl="https://stacks-node-api.mainnet.stacks.co",this.bnsLookupUrl="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,o){return""+t.coreApiUrl+t.readOnlyFunctionCallEndpoint+"/"+n+"/"+e+"/"+encodeURIComponent(o)},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.bnsLookupUrl+"/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}(),r=function(t){function o(){var e;return(e=t.apply(this,arguments)||this).version=n.TransactionVersion.Testnet,e.chainId=n.ChainID.Testnet,e.coreApiUrl="https://stacks-node-api.testnet.stacks.co",e}return e(o,t),o}(o),i=function(t){function o(){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(o,t),o}(o);t.StacksMainnet=o,t.StacksMocknet=i,t.StacksTestnet=r,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 o=function(){function t(){var t=this;this.version=n.TransactionVersion.Mainnet,this.chainId=n.ChainID.Mainnet,this.coreApiUrl="https://stacks-node-api.mainnet.stacks.co",this.bnsLookupUrl="https://stacks-node-api.mainnet.stacks.co",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,o){return""+t.coreApiUrl+t.readOnlyFunctionCallEndpoint+"/"+n+"/"+e+"/"+encodeURIComponent(o)},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.bnsLookupUrl+"/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}(),r=function(t){function o(){var e;return(e=t.apply(this,arguments)||this).version=n.TransactionVersion.Testnet,e.chainId=n.ChainID.Testnet,e.coreApiUrl="https://stacks-node-api.testnet.stacks.co",e}return e(o,t),o}(o),i=function(t){function o(){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(o,t),o}(o);t.StacksMainnet=o,t.StacksMocknet=i,t.StacksTestnet=r,Object.defineProperty(t,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=network.umd.production.min.js.map |
{ | ||
"name": "@stacks/network", | ||
"version": "1.2.2", | ||
"version": "1.3.0-beta-1", | ||
"description": "Library for Stacks network operations", | ||
@@ -64,3 +64,3 @@ "keywords": [ | ||
"unpkg": "dist/network.cjs.production.min.js", | ||
"gitHead": "73ad43fb8cf501d2bf4e5a96a98b6b2b56b66819" | ||
"gitHead": "77b4d6d531b74996e4b7a0cbd1cf5b8358a690ce" | ||
} |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
2
57907
16
3