Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: hirosystems/stacks.js
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 91316d323b45e5b847a8b26fce7fba5defb4c382
Choose a base ref
...
head repository: hirosystems/stacks.js
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: c21cae1fb61c6ad24d412580d7e594ff219f27fc
Choose a head ref

Commits on May 22, 2019

  1. Fix core node endpoint preference from the user not being used for na…

    …me lookups, removed redundant UserSession AppConfig code
    zone117x committed May 22, 2019
    Copy the full SHA
    b9e34ab View commit details

Commits on Jul 31, 2019

  1. Copy the full SHA
    71e2bf4 View commit details

Commits on Aug 5, 2019

  1. Ignore null list-file entry array items which indicate a filtered ent…

    …ry, and that there may be additional pages.
    zone117x committed Aug 5, 2019
    Copy the full SHA
    bfe47d2 View commit details

Commits on Aug 6, 2019

  1. Copy the full SHA
    0e234e2 View commit details
  2. Merge branch 'develop' into feature/expose-network-apis

    * develop:
      Bump to v19.2.5.
      Bump to v19.2.4 and include script-dist-file.md
    zone117x committed Aug 6, 2019
    Copy the full SHA
    0250e89 View commit details
  3. Expose the BlockstackNetwork class and the default instance, update…

    … typedoc and typescript minor versions
    zone117x committed Aug 6, 2019
    Copy the full SHA
    2105c2c View commit details

Commits on Aug 7, 2019

  1. Exposing the Blockstack network. Adding the caveat to the getName* "T…

    …his is intended for use in third-party wallets or in DApps that register names." Also, this exposes AuthScope.
    
    Signed-off-by: Mary Anthony <mary@blockstack.com>
    Mary Anthony committed Aug 7, 2019
    Copy the full SHA
    1c9a360 View commit details
  2. Fixing line length

    Signed-off-by: Mary Anthony <mary@blockstack.com>
    Mary Anthony committed Aug 7, 2019
    Copy the full SHA
    abc2cb0 View commit details

Commits on Aug 12, 2019

  1. Merge branch 'develop' into network-reveal

    * develop:
      Remove extra console log from tests.
      Update bitcoinjs-lib -- includes improvements to the native secp256k1 depedencies
      Throw error on user session overwrite.
      Update to typed `jsontokens` lib, fix all typing errors
    
    # Conflicts:
    #	package-lock.json
    zone117x committed Aug 12, 2019
    Copy the full SHA
    a499068 View commit details
  2. Merge branch 'network-reveal' into feature/file-api-additions

    * network-reveal:
      Fixing line length
      Exposing the Blockstack network. Adding the caveat to the getName* "This is intended for use in third-party wallets or in DApps that register names."  Also, this exposes AuthScope.
      Expose the `BlockstackNetwork` class and the default instance, update typedoc and typescript minor versions
      Remove jsdoc types from network.ts
    
    # Conflicts:
    #	mdincludes/script-dist-file.md
    zone117x committed Aug 12, 2019
    Copy the full SHA
    e6dfdd4 View commit details
  3. Copy the full SHA
    6687f36 View commit details
  4. Copy the full SHA
    ade8820 View commit details
  5. Copy the full SHA
    4cafb8f View commit details
  6. Copy the full SHA
    8b9ee0f View commit details

Commits on Aug 14, 2019

  1. Merge branch 'develop' into feature/respect-user-corenode

    * develop: (22 commits)
      Remove extra console log from tests.
      Bump to v19.2.5.
      Bump to v19.2.4 and include script-dist-file.md
      Bump to version 19.2.3.
      Update bitcoinjs-lib -- includes improvements to the native secp256k1 depedencies
      Throw error on user session overwrite.
      Bump to v19.2.2
      Update to typed `jsontokens` lib, fix all typing errors
      Update changelog.
      Bump to v19.2.2 beta 1
      make comment consistent with constructor
      Fix merge conflicts.
      Update docs.
      Bump to v19.2.1
      Update to bitcoinjs-lib v5.0.5 - tiny-secp256k1-native is now an optional depedency and will no longer fail on node-gyp errors
      Bump version to v19.2.0
      Bump to version v19.2.0 beta 2.
      Bump version for v19.2.0 beta 1.
      Additional package updates, remove redundant packages
      Update to bitcoinjs-lib v5
      ...
    
    # Conflicts:
    #	src/storage/index.ts
    zone117x committed Aug 14, 2019
    Copy the full SHA
    c35c7ca View commit details

Commits on Aug 21, 2019

  1. Merge branch 'develop' into feature/exclude-unused-wordlists

    * develop:
      Fix typedoc build
      Disable synthetic default es6 module import code gen -- likely fix for  #681
      Remove extra console log from tests.
      Bump to v19.2.5.
      Bump to v19.2.4 and include script-dist-file.md
      Bump to version 19.2.3.
      Throw error on user session overwrite.
    zone117x committed Aug 21, 2019
    Copy the full SHA
    7f4ba16 View commit details
  2. Copy the full SHA
    7aaa82e View commit details

Commits on Aug 22, 2019

  1. Merge tag 'v19.3.0-beta.1' into develop

    v19.3.0-beta.1
    yknl committed Aug 22, 2019
    Copy the full SHA
    7928772 View commit details

Commits on Aug 23, 2019

  1. Merge branch 'develop' into feature/file-api-additions

    * develop:
      Bump version to v19.3.0-beta.1
      PR template formatting changes
      Use case and acceptance criteria in pull request template.
      More pull request template changes.
      More pull request template changes.
      Pull request template changes.
      Add checklist to pull request template
      More pull request template updates.
      More pull request template updates.
      Update pull request template
      Add a pull request template.
    zone117x committed Aug 23, 2019
    Copy the full SHA
    9e4f163 View commit details
  2. Revert doc PR changes

    zone117x committed Aug 23, 2019
    Copy the full SHA
    586ed8c View commit details
  3. Merge pull request #683 from blockstack/feature/exclude-unused-wordlists

    Exclude unused bip39 wordlists from dist bundle
    zone117x authored Aug 23, 2019
    Copy the full SHA
    249ad21 View commit details

Commits on Aug 28, 2019

  1. Merge branch 'develop' into feature/file-api-additions

    * develop:
      Update worldlist filter with single regex
      Exclude unused bip39 wordlists from dist bundle (saves around 240KB uncompressed)
    zone117x committed Aug 28, 2019
    Copy the full SHA
    9fd51b8 View commit details
  2. Merge branch 'release/v19.3.0'

    yknl committed Aug 28, 2019
    Copy the full SHA
    660f6e7 View commit details
  3. Copy the full SHA
    0293687 View commit details
  4. Copy the full SHA
    429c627 View commit details
  5. Copy the full SHA
    6aa02c7 View commit details
  6. Merge pull request #716 from blockstack/release-checklist-update

    Separate and update beta and production release checklist
    yknl authored Aug 28, 2019
    Copy the full SHA
    72670e7 View commit details
  7. Copy the full SHA
    f46367c View commit details

Commits on Sep 3, 2019

  1. Copy the full SHA
    e1dd5fb View commit details
  2. Copy the full SHA
    5ae5555 View commit details
  3. Copy the full SHA
    0474888 View commit details
  4. Copy the full SHA
    1db1752 View commit details
  5. Copy the full SHA
    9eee6f0 View commit details
  6. Merge tag 'v19.4.0-beta.1' into develop

    v19.4.0-beta.1
    yknl committed Sep 3, 2019
    Copy the full SHA
    59de36e View commit details

Commits on Sep 5, 2019

  1. * Replace all usages of the bitcoinjs-lib crypto export with node.js …

    …crypto.
    
    * Remove dependency on ripemd160 package, replace with node.js crypto usage.
    * Import only what is used from the `crypto` lib.
    zone117x committed Sep 5, 2019
    Copy the full SHA
    12e43fa View commit details

Commits on Sep 6, 2019

  1. Specify the import used from the triplesec dependency, note a TODO ab…

    …out removing it from the lib.
    zone117x committed Sep 6, 2019
    Copy the full SHA
    cf36da5 View commit details
  2. Import only what is used from the bip39 module. Note direct usage o…

    …f `elliptic` only used for secp256k1 -- good target for replacement
    zone117x committed Sep 6, 2019
    Copy the full SHA
    59f3498 View commit details
  3. Copy the full SHA
    51b8d11 View commit details
  4. Copy the full SHA
    22f5ea6 View commit details

Commits on Sep 9, 2019

  1. Improve very slow build process with "run-parallel npm command" util,…

    … and reducing docgen command to output html and json in a single-pass.
    zone117x committed Sep 9, 2019
    Copy the full SHA
    f5a1b83 View commit details
  2. Copy the full SHA
    647e5f2 View commit details
  3. Copy the full SHA
    6e838e7 View commit details
  4. Move upload string content type and content length related logic into…

    … own function, add case for common incorrect usage of `text/html`
    zone117x committed Sep 9, 2019
    Copy the full SHA
    62c6661 View commit details
  5. Remove jsdoc types from network.ts

    Expose the `BlockstackNetwork` class and the default instance, update typedoc and typescript minor versions
    Exposing the Blockstack network. Adding the caveat to the getName* "This is intended for use in third-party wallets or in DApps that register names."  Also, this exposes AuthScope.
    Fixing line length
    Adding in Aaron's comments from discussion
    Adding in a match to the better description in android
    Changing line length
    
    Signed-off-by: Mary Anthony <mary@blockstack.com>
    zone117x authored and Mary Anthony committed Sep 9, 2019
    Copy the full SHA
    43208c9 View commit details
  6. Merge pull request #687 from moxiegirl/network-reveal

    Exposing the Blockstack network
    Moxiegirl authored Sep 9, 2019
    Copy the full SHA
    748c546 View commit details
  7. Copy the full SHA
    f2bc3c0 View commit details

Commits on Sep 10, 2019

  1. Merge pull request #693 from blockstack/feature/file-api-additions

    Support additional types in putFile
    zone117x authored Sep 10, 2019
    Copy the full SHA
    0b0b5c0 View commit details
  2. Copy the full SHA
    d51fe6d View commit details
  3. Copy the full SHA
    586ee92 View commit details

Commits on Sep 11, 2019

  1. Copy the full SHA
    e593028 View commit details
Showing with 25,104 additions and 12,486 deletions.
  1. +2 −0 .circleci/config.yml
  2. +73 −15 .eslintrc.js
  3. +66 −0 .prettierignore
  4. +17 −0 .vscode/launch.json
  5. +0 −8 .vscode/settings.json
  6. +28 −0 CHANGELOG.md
  7. +18 −2 README.md
  8. +5 −2 babel.config.js
  9. +2,233 −770 docs/assets/css/main.css
  10. +0 −7 docs/assets/css/main.css.map
  11. BIN docs/assets/images/icons.png
  12. BIN docs/assets/images/icons@2x.png
  13. +1 −5 docs/assets/js/main.js
  14. +1 −1 docs/assets/js/search.js
  15. +13 −12 docs/classes/appconfig.html
  16. +73 −63 docs/classes/facebook.html
  17. +72 −62 docs/classes/github.html
  18. +71 −61 docs/classes/hackernews.html
  19. +73 −63 docs/classes/instagram.html
  20. +72 −62 docs/classes/linkedin.html
  21. +8 −7 docs/classes/passworderror.html
  22. +18 −14 docs/classes/profile.html
  23. +8 −7 docs/classes/sessiondatastore.html
  24. +72 −62 docs/classes/twitter.html
  25. +33 −44 docs/classes/usersession.html
  26. +12,026 −5,085 docs/docs.json
  27. +242 −0 docs/enums/authscope.html
  28. +1,176 −358 docs/globals.html
  29. +187 −12 docs/index.html
  30. +22 −7 docs/interfaces/gaiahubconfig.html
  31. +13 −11 docs/interfaces/getfileoptions.html
  32. +8 −7 docs/interfaces/getfileurloptions.html
  33. +251 −0 docs/interfaces/getglobalobjectoptions.html
  34. +72 −14 docs/interfaces/putfileoptions.html
  35. +9 −64 docs/interfaces/sessionoptions.html
  36. +29 −14 docs/interfaces/userdata.html
  37. +0 −323 docs/interfaces/validateproofservice.html
  38. +1 −1 mdincludes/script-dist-file.md
  39. +3,498 −3,162 package-lock.json
  40. +82 −58 package.json
  41. +31 −2 release-checklist.md
  42. 0 src/address.ts
  43. +2 −8 src/auth/appConfig.ts
  44. +33 −22 src/auth/authApp.ts
  45. +24 −22 src/auth/authMessages.ts
  46. +20 −30 src/auth/authProvider.ts
  47. +7 −7 src/auth/authSession.ts
  48. +45 −58 src/auth/authVerification.ts
  49. +22 −5 src/auth/protocolEchoDetection.ts
  50. +0 −23 src/auth/sessionData.ts
  51. +11 −8 src/auth/userSession.ts
  52. +128 −0 src/encryption/aesCipher.ts
  53. +7 −0 src/encryption/cryptoRandom.ts
  54. +69 −0 src/encryption/cryptoUtils.ts
  55. +247 −64 src/encryption/ec.ts
  56. +63 −0 src/encryption/hashRipemd160.ts
  57. +53 −0 src/encryption/hmacSha256.ts
  58. +159 −0 src/encryption/pbkdf2.ts
  59. +77 −0 src/encryption/sha2Hash.ts
  60. +110 −88 src/encryption/wallet.ts
  61. +163 −22 src/errors.ts
  62. +11 −4 src/fetchUtil.ts
  63. +64 −15 src/keys.ts
  64. +20 −26 src/logger.ts
  65. +188 −135 src/network.ts
  66. +1 −1 src/operations/signers.ts
  67. +5 −6 src/operations/skeletons.ts
  68. +199 −207 src/operations/txbuild.ts
  69. +10 −9 src/operations/utils.ts
  70. +7 −6 src/profiles/profile.ts
  71. +2 −1 src/profiles/profileLookup.ts
  72. +15 −6 src/profiles/profileProofs.ts
  73. +2 −1 src/profiles/profileSchemas/creativework.ts
  74. +2 −1 src/profiles/profileSchemas/organization.ts
  75. +1 −1 src/profiles/profileSchemas/person.ts
  76. +10 −8 src/profiles/profileTokens.ts
  77. +1 −1 src/profiles/profileZoneFiles.ts
  78. +9 −6 src/profiles/services/facebook.ts
  79. +9 −4 src/profiles/services/github.ts
  80. +6 −7 src/profiles/services/hackerNews.ts
  81. +8 −14 src/profiles/services/index.ts
  82. +8 −9 src/profiles/services/instagram.ts
  83. +8 −9 src/profiles/services/linkedIn.ts
  84. +40 −60 src/profiles/services/service.ts
  85. +20 −6 src/profiles/services/twitter.ts
  86. +3 −4 src/public.ts
  87. +39 −34 src/storage/hub.ts
  88. +542 −242 src/storage/index.ts
  89. 0 src/types.ts
  90. +138 −68 src/utils.ts
  91. +44 −23 src/wallet.ts
  92. +6 −4 tests/operationsTests/src/operationsTests.ts
  93. +0 −15 tests/unitTests/src/@types/bitcoinjs-lib/index.d.ts
  94. +0 −16 tests/unitTests/src/@types/fetch-mock/index.d.ts
  95. +194 −202 tests/unitTests/src/@types/tape-promise/index.d.ts
  96. +4 −0 tests/unitTests/src/index.ts
  97. +16 −0 tests/unitTests/src/tsconfig.json
  98. +61 −82 tests/unitTests/src/unitTestsAuth.ts
  99. +337 −34 tests/unitTests/src/unitTestsEncryption.ts
  100. +1 −2 tests/unitTests/src/unitTestsErrors.ts
  101. +1 −3 tests/unitTests/src/unitTestsNetwork.ts
  102. +133 −167 tests/unitTests/src/unitTestsOperations.ts
  103. +5 −5 tests/unitTests/src/unitTestsProfiles.ts
  104. +20 −19 tests/unitTests/src/unitTestsProofs.ts
  105. +1,022 −261 tests/unitTests/src/unitTestsStorage.ts
  106. +4 −3 tests/unitTests/src/unitTestsWallet.ts
  107. +6 −4 tsconfig.browser.json
  108. +5 −1 tsconfig.build.json
  109. +2 −3 tsconfig.json
  110. +1 −1 tsconfig.typedoc.json
  111. +30 −8 webpack.config.js
2 changes: 2 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -34,6 +34,8 @@ jobs:
key: v1-dependencies-{{ checksum "package.json" }}

# run tests!
- run: npm run lint:formatting

- run: npm test

- run: npm run build
88 changes: 73 additions & 15 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,28 @@
module.exports = {
"extends": [
"eslint:recommended",
"airbnb-base",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:import/typescript",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"prettier/@typescript-eslint"

],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json"
"project": "./tsconfig.json",
"tsconfigRootDir": __dirname
},
"plugins": [
"import",
"@typescript-eslint"
],
"settings": {
"import/parsers": {
"@typescript-eslint/parser": [".ts"]
"@typescript-eslint/parser": [ ".ts" ]
},
"import/resolver": { "typescript": {} }
},
@@ -24,17 +33,15 @@ module.exports = {
"rules": {
"no-tabs": 0,
"no-restricted-globals": 0,
"import/prefer-default-export": 0,
"no-buffer-constructor": 0,
"no-mixed-operators": 0,
"no-plusplus": 0,
"no-bitwise": 0,
"prefer-promise-reject-errors": 0,
"class-methods-use-this": 0,
"import/no-cycle": 0,
"prefer-destructuring": 0,
"no-prototype-builtins": 0,
"comma-dangle": ["error", "never"],
"comma-dangle": "off",
"quotes": [2, "single"],
"eol-last": 2,
"no-debugger": 1,
@@ -50,16 +57,21 @@ module.exports = {
"no-console": 0,
"prefer-const": 2,
"new-cap": 0,
"semi": [2, "never"],
"semi": 0,
"valid-jsdoc": "off",
"object-curly-newline": "off",
"arrow-parens": "off",
"function-paren-newline": 0,
"max-classes-per-file": "off",
"prefer-object-spread": "off",
"no-multiple-empty-lines": "off",
"no-shadow": "off",
"no-use-before-define": "off",
"@typescript-eslint/indent": [2, 2, {
"FunctionDeclaration": { "parameters": "first" },
"FunctionExpression": { "parameters": "first" },
"no-return-await": "off",
"no-useless-constructor": "off",
"indent": [2, 2, {
"FunctionDeclaration" : { "parameters": "first" },
"FunctionExpression" : { "parameters": "first" },
"ObjectExpression": "first",
"ArrayExpression": "first",
"ImportDeclaration": "first",
@@ -74,15 +86,61 @@ module.exports = {
"@typescript-eslint/no-angle-bracket-type-assertion": "off",
"@typescript-eslint/prefer-interface": "off",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/no-unused-vars": "off",

// TODO: enable this when reasonable
"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/ban-ts-ignore": "off",
"@typescript-eslint/consistent-type-assertions": "off",
"@typescript-eslint/prefer-regexp-exec": "off",
"@typescript-eslint/no-useless-constructor": "error",
"@typescript-eslint/no-unused-vars": ["error", { "argsIgnorePattern": "^_" }],
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-misused-promises": "error",
"@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/require-await": "error",
"@typescript-eslint/await-thenable": "error",


// TODO: enable this when reasonable
// TODO: enable these when reasonable
"@typescript-eslint/promise-function-async": "off",
"@typescript-eslint/prefer-includes": "off",
"@typescript-eslint/prefer-string-starts-ends-with": "off",
// ---


"import/no-unresolved": "error",
"import/named": "error",
"import/prefer-default-export": "off",

// TODO: enable these when reasonable -- these can help module dependencies be easier to bundle w/ tree-shaking.
"import/no-cycle": "off",
// ---

"import/no-self-import": "error",
"import/no-useless-path-segments": ["error", { noUselessIndex: true }],
"import/no-unused-modules": ["error", { "missingExports": true }],
"import/export": "error",
"import/no-extraneous-dependencies": "error",
"import/no-duplicates": "error",
"import/no-unassigned-import": "error",
"import/order": "error",

"import/no-nodejs-modules": ["error", { "allow": [

]}],

// ---- Enforce some blockstack.js specific rules ----

"no-restricted-globals": ["error", {
"name": "fetch",
"message": "Use `privateFetch` instead."
}
],

"no-restricted-modules": ["error", {
"name": "crypto",
"message": "Use a specific module from `./src/encryption/` "
}
]

// TODO: enable when this is fixed https://github.com/benmosher/eslint-plugin-import/issues/1282
"import/named": "off"
// ----
}
}
66 changes: 66 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
src/wallet.ts
src/encryption/wallet.ts
src/encryption/index.ts
src/encryption/ec.ts
src/errors.ts
src/auth/authSession.ts
src/auth/protocolEchoDetection.ts
src/auth/sessionData.ts
src/auth/authMessages.ts
src/auth/authApp.ts
src/auth/authConstants.ts
src/auth/sessionStore.ts
src/auth/appConfig.ts
src/auth/protocolLaunch.ts
src/auth/index.ts
src/auth/authVerification.ts
src/auth/userSession.ts
src/auth/authProvider.ts
src/network.ts
src/utils.ts
src/operations/safety.ts
src/operations/txbuild.ts
src/operations/utils.ts
src/operations/skeletons.ts
src/operations/signers.ts
src/operations/index.ts
src/storage/hub.ts
src/storage/index.ts
src/types.ts
src/keys.ts
src/index.ts
src/profiles/profileProofs.ts
src/profiles/profileZoneFiles.ts
src/profiles/profile.ts
src/profiles/index.ts
src/profiles/profileTokens.ts
src/profiles/services/github.ts
src/profiles/services/linkedIn.ts
src/profiles/services/instagram.ts
src/profiles/services/twitter.ts
src/profiles/services/facebook.ts
src/profiles/services/serviceUtils.ts
src/profiles/services/index.ts
src/profiles/services/service.ts
src/profiles/services/hackerNews.ts
src/profiles/profileSchemas/personUtils.ts
src/profiles/profileSchemas/personZoneFiles.ts
src/profiles/profileSchemas/creativework.ts
src/profiles/profileSchemas/personLegacy.ts
src/profiles/profileSchemas/organization.ts
src/profiles/profileSchemas/index.ts
src/profiles/profileSchemas/person.ts
src/profiles/profileLookup.ts
src/config.ts
src/dids.ts
src/fetchUtil.ts
src/public.ts
src/address.ts
src/bn.ts
src/encryption/aesCipher.ts
src/encryption/cryptoRandom.ts
src/encryption/cryptoUtils.ts
src/encryption/hashRipemd160.ts
src/encryption/hmacSha256.ts
src/encryption/pbkdf2.ts
src/encryption/sha2Hash.ts
17 changes: 17 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Tests",
"runtimeArgs": ["--nolazy", "-r", "ts-node/register/transpile-only"],
"args": ["${workspaceFolder}/tests/unitTests/src/index.ts"],
"env": { "TS_NODE_PROJECT": "${workspaceFolder}/tests/unitTests/src/tsconfig.json" },
"console": "integratedTerminal"
}
]
}
8 changes: 0 additions & 8 deletions .vscode/settings.json

This file was deleted.

28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -4,6 +4,34 @@ All notable changes to the project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased

## [21.0.0] - 2020-01-17
### Added
- More Blockstack error codes.
- `putFile` and `encryptContent` can now optionally base64 encode data, for a ~33% size increase compared to the default hex encoding which has a 100% size increase.

### Changed
- `putFile` performs client-side validation that data size is within the Gaia hub's reported maximum limit.
- When a `string` value is passed to `putFile` and the `contentType` option is unspecified, it is set to `text/plain; charset=UTF-8`.
- `getFile` now throws error on 404 instead of returning null.
- `getFile`, `putFile`, `deleteFile`, `listfiles` now include error info upon failure.
- `getFile` can now decrypt using a custom private key
- Several cryptographic operations now use the native Web Crypto APIs when available. This primarily
increases the performance of file encryption and decryption, and account seed phrase encryption and
decryption.
- The following functions now return Promises: `handleSignedEncryptedContents`, `makeAuthResponse`,
`encryptECIES`, `decryptECIES`, `encryptPrivateKey`, `decryptPrivateKey`, `encryptContent`,
`decryptContent`, `aes256CbcEncrypt`, `aes256CbcDecrypt`, `hmacSha256`.
- `putfile` now prevents data corruption caused by race conditions by using etag values to verify that the client is updating the latest version of the file.
- `putFile` now attempts to include `etag` values in the `If-Match` header of its request, and sets the `If-None-Match` header to `*` if it is unaware of an etag for the file it is attempting to write.
- `putFile` now returns an `etag` in addition to the `publicURL` after successfully writing a file.
- `PreconditionFailedError` thrown if `putFile` returns with a `412` response.

## [19.4.0] - 2019-09-03
### Changed
- Excluded unused bip39 wordlist from dist bundle, reducing bundle size.

## [19.3.0] - 2019-08-21

### Changed
20 changes: 18 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -18,7 +18,19 @@ Note: If you're looking for the Blockstack CLI repo it was merged with [Blocksta
$ npm install blockstack
```

You can import `blockstack.js` as a script without using a package manager. To securely use the latest distribution of blockstack.js from a CDN, add [the mdincludes/script-dist-file.md](mdincludes/script-dist-file.md) script in your application.
### Using blockstack.js with a CDN

You can import `blockstack.js` as a script without using a package manager.
To securely use the latest distribution of blockstack.js from a CDN, use the following script in your application:

<!-- cdn -->
```html
<script src="https://unpkg.com/blockstack@21.0.0/dist/blockstack.js" integrity="sha384-zbpmDp1R7a7Eyh11zgCQlx8vx50WvRyGsZ1+ke6SEogm2ahOAIrnURy+cLjYE3jq" crossorigin="anonymous"></script>
```
<!-- cdnstop -->

_Note: this is script is bundled as standalone (UMD) lib, targeting ES6 (ECMAScript 2015)._



## About
@@ -40,7 +52,11 @@ The storage portion of this library can be used to:

1. store and retrieve your app's data in storage that is controlled by the user

_Note: this document uses ES6 in its examples but it is compiled down to Javascript (ES5) and is perfectly compatible with it. If you're using the latter, just make a few adjustments to the examples below (e.g. use "let" instead of "var")._
_Note:_ this lib is written in Typescript and is compiled to ES6 (ECMAScript 2015)
syntax and uses CommonJS modules. The NPM package works out of the box within the
Node.js runtime, and within browsers when using a common bundler (e.g. Webpack,
Browserify, Rollup, etc).


## Documentation

7 changes: 5 additions & 2 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -9,8 +9,11 @@ module.exports = function (api) {
// Babel config for web browser lib dist with wide-spread browser support.
let opts = {
presets: [
"@babel/preset-env",
"@babel/preset-typescript"
["@babel/preset-env", {
"targets": {
"esmodules": true
}
}]
],
plugins: [
"@babel/proposal-class-properties",
Loading