chore: clean up project files (#1180)

* chore: reduce root files

* chore: format tests

* chore: fix blockstack stacks name

* chore: move files

* chore: update readme

* chore: update package

* chore: update dependecies

* chore: update dependencies

* chore: bootstrap

* chore: update linters

* chore: bootstrap

Co-authored-by: janniks <janniks@users.noreply.github.com>
This commit is contained in:
janniks
2022-02-15 16:22:00 +01:00
committed by GitHub
parent ca76f06cda
commit 9c90b45b53
32 changed files with 2587 additions and 2947 deletions

View File

@@ -1,4 +1,3 @@
# top-most EditorConfig file
root = true
[*.{js,ts,json}]
@@ -6,4 +5,4 @@ charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 2
indent_size = 2

View File

@@ -1,15 +0,0 @@
tests/authTests/lib
tests/browserTests/bundle.js
tests/browserTests/lib
tests/operationsTests/lib
tests/unitTests/src
dist
lib
babel.config.js
webpack.config.js
typedoc.js
**/*.d.ts
docs-theme/
node_modules
**/tests/**
jest.config.js

View File

@@ -13,6 +13,7 @@ module.exports = {
tryExtensions: ['.ts'],
},
},
ignorePatterns: ['**/*.js'],
rules: {
'@typescript-eslint/explicit-module-boundary-types': [0],
'@typescript-eslint/prefer-regexp-exec': [0],
@@ -22,6 +23,7 @@ module.exports = {
'@typescript-eslint/no-unnecessary-type-assertion': [0],
// TODO: enable the `no-unsafe-*` rules
'@typescript-eslint/no-unsafe-argument': [0],
'@typescript-eslint/no-unsafe-assignment': [0],
'@typescript-eslint/no-unsafe-call': [0],
'@typescript-eslint/no-unsafe-return': [0],

7
.gitattributes vendored
View File

@@ -1,7 +0,0 @@
docs/* linguist-documentation
docs-theme/* linguist-documentation
docs/* linguist-documentation
docs-theme/* linguist-documentation
# Skipping explicit file types
*.html linguist-vendored

View File

@@ -3,4 +3,4 @@ coverage:
project:
default:
base: pr
patch: off
patch: off

View File

@@ -4,18 +4,18 @@ about: Create a report to help us improve
title: ''
labels: ''
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
**What version of Blockstack.js are you using?**
**What version of Stacks.js are you using?**
**Is the bug present in the Blockstack CLI, Gaia hub, Connect or Blockstack Browser?**
**Is the bug present in the Stacks.js CLI, Gaia hub, Connect or Blockstack Browser?**
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
@@ -31,15 +31,17 @@ If applicable, add screenshots to help explain your problem.
If applicable, add console log to help explain your problem.
**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
**Additional context**
Add any other context about the problem here.

View File

@@ -4,7 +4,6 @@ about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''
---
**Is your feature request related to a problem? Please describe.**

4
.gitignore vendored
View File

@@ -49,4 +49,8 @@ dist
*.tsbuildinfo
# auto-generated typedoc
docs
# from previous .npmignore
unused

View File

@@ -1 +0,0 @@
unused

View File

@@ -1,3 +0,0 @@
*.d.ts
*.html
**/tests/**

View File

@@ -1,4 +1,4 @@
# Stacks.js [![Test Action](https://github.com/hirosystems/stacks.js/actions/workflows/tests.yml/badge.svg?branch=master)](https://github.com/hirosystems/stacks.js/actions/workflows/tests.yml?query=branch%3Amaster)
# stacks.js [![Test Action](https://github.com/hirosystems/stacks.js/actions/workflows/tests.yml/badge.svg?branch=master)](https://github.com/hirosystems/stacks.js/actions/workflows/tests.yml?query=branch%3Amaster)
This repo is home to the Stacks.js libraries which provide everything you need to work with the [Stacks blockchain](https://www.stacks.co/what-is-stacks).
@@ -19,7 +19,7 @@ See `README` in each package directory for installation instructions and usage.
## Migrating from blockstack.js
To migrate your app from blockstack.js to stacks.js follow the steps in the [migration guide](https://github.com/hirosystems/stacks.js/tree/master/migration-guide.md).
To migrate your app from blockstack.js to stacks.js follow the steps in the [migration guide](https://github.com/hirosystems/stacks.js/tree/master/.github/MIGRATION_GUIDE.md).
## Development: environment setup
@@ -52,7 +52,7 @@ npm run lerna -- add lodash --scope @stacks/storage --dev
## Documentation
Documentation for the Stacks.js packages is located [here](https://stacks-js-git-master-blockstack.vercel.app/).
Documentation for the Stacks.js packages is located [here](https://stacks-js.vercel.app/).
## Contributing

View File

@@ -1,277 +0,0 @@
# Changelog
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
### Changed
- export `cvToValue` function
- fix `delegateStx` function
## [21.1.1] - 2020-08-24
### Changed
- Persist etags in UserSession store so they don't always need to be fetched when the page is loaded.
## [21.1.0] - 2020-06-05
### Changed
- Static `storage/` functions used by `UserSession` are no longer globally exported, as they are wrapped by publicly accessible `UserSession` methods. Functions that are no longer accesible are `getFileUrl`, `getFileContents`, `getFile`, `putFile`, `deleteFile`, and `listFiles`.
- Removed various static functions that have been replaced by `UserSession` .
- Delete etags from cached `etag` map on `deleteFile` so that new files with the same name can be subsequently created.
## [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
- Fixed deprecated crypto warning in node.js usage.
- `handlePendingSignIn` now throws an error when overwriting an existing user session. See issue #680
- Updated jsontokens library to v2.
## [19.2.2] - 2019-05-12
### Changed
- Updated bitcoinjs-lib dependency to v5 and eliminates node-gyp errors on install
- Fixed bugs when running in a web worker
## [19.2.0] - 2019-05-12
### Added
- Method `deleteFile()` is now implemented
### Changed
- Fixed return type for BlockstackNetwork.getAccountTokens
- Property `manifestURI` is now included in loaded manifest object
- The `src` directory is now included in the npm package
## [19.1.0] - 2019-03-29
### Added
- Converted codebase to Typescript
- New `dist/blockstack.js` bundle with ES2015/ES6 support
- `lib/**/*.js modules with Node v8.x support (ES2015/ES6 & CommonJS modules)
### Changed
- Fixed protocol handler detection issues with modular usage of blockstack.js
## [19.0.1] - 2019-03-12
### Added
- New function `getFileUrl()` will return a URL for reading a particular file
from an applications' Gaia bucket.
### Changed
- Fixed the email authentication scope
- Fixed multiple bugs with `redirectToSignIn()` and `makeAuthRequest()`
## [19.0.0] - 2019-02-21
### Added
- Moved common user session related functions into `UserSession`. Session configuration is
done through AppConfig objects. This change removes the library's dependency on browser
environments.
- List of functions moved: redirectToSignIn(), isUserSignedIn(), isSignInPending(),
handlePendingSignIn(), loadUserData(), signUserOut(), getFile(), putFile(),
encryptContent(), decryptContent(), listfile(), deleteFile()
- The public API will remain backward compatible until a future release.
### Changed
- `loadUserData()` now throws an error instead of returning null if no signed in user session
is detected
## [18.3.0] - 2019-01-29
### Changed
- New method for auth protocol handler detection. This should fix sign in flows for
most major web browsers and operating systems with both the native browser installed and
not installed.
- NOTE: If you're using this version of blockstack.js with an old version of the native
browser, the app will (1) open an auth handler in the native browser and (2) also redirect
the original tab to browser.blockstack.org.
## [18.2.1] - 2019-01-08
### Added
- Added automatic retry logic to `putFile` in the case of a failed storage call. This might be
the case if there have been any token revokations. This new logic will catch the first failed write,
construct (and cache) a new Gaia token, and then attempt the write again. This allows tokens
to be revoked without any hiccups from a user experience standpoint.
## [18.2.0] - 2018-12-20
### Added
- Added an extra parameter to `makeAuthRequest`, called `extraParams`. This is a wildcard object,
and all keys and values included in this argument will be included in the `payload` of
an `authRequest`.
- `authRequest` version bumped to `1.3.1` from `1.3.0`.
## [18.1.0] - 2018-10-24
### Added
- The `BlockstackWallet` class in `blockstack.js` supports generating
private keys and addresses within the hierarchical derivation scheme
used by the Blockstack Browser and supported by the Blockstack
ecosystem.
- A `listFiles` function allows an application to list files in its
Gaia storage bucket.
- In the transaction generation library, the makeTX functions now
take an optional 'buildIncomplete' argument, allowing you to get
a serialized transaction which hasn't been fully signed yet.
- A `blockstackAPIUrl` field to the authentication response token that overrides the default
in `blockstack.config.network` allowing the user to specify their own Blockstack
Core node.
- A `gaiaAssociationToken` field to the authentication response token which enables
users to run private Gaia hubs without authorization each application address.
- An option `contentType` to the `putFile` `options` object that sets the
Content-Type header for unencrypted data. Thanks to @muneebm for this!
### Changed
- Fixed a bug in version checking during the authentication process
that manifested itself when signing in with apps using very old versions
of blockstack.js.
- Default redirect URI changed from origin plus trailing slash to the
origin. For example, app with origin `https://example.com` default
redirect URI which was previously `https://example.com/` is
now `https://example.com`.
- Fixed a couple bugs in the transaction generation, networking
code. First, coerce address now correctly coerces P2SH
addresses. Second, bitcoinjs-lib recently switched to defaulting to
version 2 transactions, which breaks our interoperability with a handful
of other libraries. Finally, with this comes a little bit of refactoring,
to reduce the repeated code in the transaction libraries.
- Increments the authentication process version to 1.3 in a backwards compatible change.
- When using the bitcoind client in development networks,
track which addresses we've already called `importaddress` with
and do not retry.
## [18.0.4] - 2018-08-06
### Changed
- Resolve unsupported protocol error by redirecting
to hosted authenticator on all mobile devices
## [18.0.3] - 2018-08-01
### Changed
- Resolve unsupported protocol error by redirecting
to hosted authenticator on iOS
## [18.0.2] - 2018-07-27
### Changed
- Update `bitcoinjs-lib` to version 4.0.0.
## [18.0.1] - 2018-07-27
### Changed
- Switched from `cross-fetch` to `cross-fetch/polyfill` to fix a bug that caused
network requests to fail in node environments
## [18.0.0]
### Added
- Support for `verify` and `sign` keywords in `getFile` and `putFile`
respectively. This enables support for ECDSA signatures on SHA256
hashes in the storage operations, and works for encrypted and
unencrypted files, in addition to multi-player reads (for
unencrypted files).
- New `TransactionSigner` interface to allow for different signing agents
in the `transactions` functions (e.g., makePreorder).
- `putFile` can now optionally take the public key for which you want
to encrypt the file. Thanks to @bodymindarts for this!
- `handlePendingSignIn` now accepts `transitKey` as an optional 3rd parameter.
This enables support for more complex sign in flows.
### Changed
- The gaia hub connection functions now use a JWT for authentication,
the "v1" gaia authentication token. This is *not* a backwards
compatible change-- an app using this version of `blockstack.js`
will refuse to downgrade to the old protocol version unless the old
gaia authentication provides a very specific challenge text matching
the normal gaia hub challenge text.
- `encryptContent` now takes a public key instead of a private key to
encrypt content for other users.
- The validateProofs() method now handles errors in proof-checking
more seamlessly, properly catching failed promises. Previous error
cases which resulted in uncaught exception warnings and null
responses should now behave correctly.
- `handlePendingSignIn` now takes a second parameter which is the
signed authentication response token. Thanks to @muneebm for this!
- Fixed an issue in `ecPairToHexString` that may result in generation of
an incorrectly hex string encoding of the private key.
- Proofs now support subdomains.
- Updated a number of dependencies to fix know vulnerablities.
- Switched from isomorphic-fetch to the better maintained cross-fetch
which will improve functionality of the library in node environments.
## [17.2.0]
### Added
- `encryptContent` and `decryptContent` methods for encrypting strings
and buffers with specific keys, or by default, the
appPrivateKey. Thanks to @nikkolasg and @nivas8292 for PRs on this
work.
- Functions in `transactions` to support namespace creation
(`NAMESPACE_PREORDER`, `NAMESPACE_REVEAL`, `NAMESPACE_IMPORT`,
`ANNOUNCE`, and `NAMESPACE_READY`). Thanks @jcnelson.
- Support for `NAME_REVOKE` transactions. Thanks @jcnelson.
- `transactions.AmountType` Flow union type that captures both the
type of JSON response from the stable `/v1/prices/*` RESTful
endpoints on Blockstack Core, as well as the upcoming `/v2/prices/*`
endpoints.
- Support for setting `blockstack.js` logLevels via
`config.logLevel`. Supports strings: `['debug', 'info', 'warn',
'error', 'none']` and defaults to `debug`. If you do not want
`blockstack.js` to print anything to `console.log`, use
`'none'`. Thanks @hstove.
### Changed
- Modified the transaction builders in `transactions.js` to accept a
new flow type `transactions.AmountType` for the price of a name or
namespace. This makes them forwards-compatible with the next stable
release of Blockstack Core.
- Added inline documentation on the wire formats of all transactions.
### Fixed
- Update to proof URLs for instagram proofs. Thanks @cponeill.
- Fixes to several safety checks. Thanks @jcnelson.
- Fixed error handling in proof validation -- several errors which
would cause uncaught promise rejections now are handled correctly.
- Improved error handling in authentication -- if a user tries to sign
in with an application is a different browser context, rather than
experiencing a 'Key must be less than curve order' error, the
authentication fails.

5002
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -5,7 +5,7 @@
"prettier": "@stacks/prettier-config",
"repository": {
"type": "git",
"url": "git+https://github.com/blockstack/blockstack.js.git"
"url": "git+https://github.com/hirosystems/stacks.js.git"
},
"workspaces": [
"packages/**"
@@ -35,18 +35,18 @@
]
},
"devDependencies": {
"@stacks/eslint-config": "^1.0.9",
"@stacks/prettier-config": "0.0.8",
"@stacks/eslint-config": "^1.2.0",
"@stacks/prettier-config": "^0.0.10",
"@strictsoftware/typedoc-plugin-monorepo": "^0.4.2",
"@typescript-eslint/eslint-plugin": "^4.22.0",
"@typescript-eslint/parser": "^4.22.0",
"eslint": "^7.25.0",
"@typescript-eslint/eslint-plugin": "^5.11.0",
"@typescript-eslint/parser": "^5.11.0",
"eslint": "^8.8.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-import": "^2.25.4",
"eslint-plugin-node": "^11.1.0",
"lerna": "^3.22.1",
"madge": "^5.0.1",
"prettier": "^2.2.1",
"prettier": "^2.5.1",
"rimraf": "^3.0.2",
"typedoc": "^0.20.35",
"typescript": "^4.2.4"
@@ -58,10 +58,10 @@
"lerna": "lerna",
"lint": "npm run lint:eslint && npm run lint:prettier",
"lint:eslint": "eslint \"packages/**/src/**/*.{ts,tsx|!(d.ts)}\" -f unix",
"lint:fix": "eslint \"packages/**/src/**/*.{ts,tsx}\" -f unix --fix",
"lint:prettier": "prettier --check \"packages/**/src/**/*.{ts,tsx|!(d.ts)}\" *.js",
"lint:prettier:fix": "prettier --write \"packages/**/src/**/*.{ts,tsx|!(d.ts)}\" *.js",
"build:docs": "rimraf docs && typedoc --name \"Stacks.js $npm_package_version Library Reference\" --readme ./readme.md --tsconfig tsconfig.typedoc.json --out docs --json docs/docs.json packages/**/src/index.ts",
"lint:eslint:fix": "eslint \"packages/**/src/**/*.{ts,tsx}\" -f unix --fix",
"lint:prettier": "prettier --check \"packages/**/src/**/*.{ts,tsx|!(d.ts)}\" *.js --ignore-path .gitignore",
"lint:prettier:fix": "prettier --write \"packages/**/src/**/*.{ts,tsx|!(d.ts)}\" *.js --ignore-path .gitignore",
"build:docs": "rimraf docs && typedoc --name \"stacks.js $npm_package_version Library Reference\" --readme ./readme.md --tsconfig tsconfig.typedoc.json --out docs --json docs/docs.json packages/**/src/index.ts",
"test": "lerna run test",
"typecheck": "lerna run typecheck --parallel --no-bail --stream",
"madge": "madge --circular --extensions ts --exclude 'd.ts' packages/"

View File

@@ -45,7 +45,9 @@
"c32check": "^1.1.3",
"cross-fetch": "^3.1.4",
"jsontokens": "^3.0.0",
"query-string": "^6.13.1"
"query-string": "^6.13.1",
"webpack": "^5.68.0",
"webpack-cli": "^4.9.2"
},
"devDependencies": {
"@types/jest": "^26.0.22",

View File

@@ -42,7 +42,9 @@
"@stacks/network": "^3.2.0",
"@stacks/transactions": "^3.2.0",
"@types/bn.js": "^4.11.6",
"bn.js": "^4.12.0"
"bn.js": "^4.12.0",
"webpack": "^5.68.0",
"webpack-cli": "^4.9.2"
},
"devDependencies": {
"@types/jest": "^26.0.22",

View File

@@ -112,6 +112,8 @@
"jsontokens": "^3.0.0",
"node-fetch": "^2.6.0",
"ripemd160": "^2.0.1",
"webpack": "^5.68.0",
"webpack-cli": "^4.9.2",
"winston": "^3.2.1",
"zone-file": "^2.0.0-beta.3"
},

View File

@@ -36,7 +36,9 @@
"@types/node": "^14.14.43",
"bn.js": "^4.12.0",
"buffer": "^6.0.3",
"cross-fetch": "^3.1.4"
"cross-fetch": "^3.1.4",
"webpack": "^5.68.0",
"webpack-cli": "^4.9.2"
},
"devDependencies": {
"@types/jest": "^26.0.22",

View File

@@ -39,7 +39,9 @@
"elliptic": "^6.5.4",
"randombytes": "^2.1.0",
"ripemd160-min": "^0.0.6",
"sha.js": "^2.4.11"
"sha.js": "^2.4.11",
"webpack": "^5.68.0",
"webpack-cli": "^4.9.2"
},
"devDependencies": {
"@peculiar/webcrypto": "^1.1.6",

View File

@@ -81,6 +81,8 @@
"jsontokens": "^3.0.0",
"randombytes": "^2.1.0",
"triplesec": "^4.0.3",
"webpack": "^5.68.0",
"webpack-cli": "^4.9.2",
"zone-file": "^2.0.0-beta.3"
}
}

View File

@@ -38,7 +38,9 @@
"url": "https://github.com/blockstack/blockstack.js/issues"
},
"dependencies": {
"@stacks/common": "^3.0.0"
"@stacks/common": "^3.0.0",
"webpack": "^5.68.0",
"webpack-cli": "^4.9.2"
},
"devDependencies": {
"@types/jest": "^26.0.22",

View File

@@ -40,6 +40,8 @@
"@stacks/transactions": "^3.2.0",
"jsontokens": "^3.0.0",
"schema-inspector": "^2.0.1",
"webpack": "^5.68.0",
"webpack-cli": "^4.9.2",
"zone-file": "^2.0.0-beta.3"
},
"devDependencies": {

View File

@@ -40,7 +40,9 @@
"@stacks/transactions": "^3.2.0",
"@types/bn.js": "^4.11.6",
"bitcoinjs-lib": "^5.2.0",
"bn.js": "^4.12.0"
"bn.js": "^4.12.0",
"webpack": "^5.68.0",
"webpack-cli": "^4.9.2"
},
"devDependencies": {
"@types/jest": "^26.0.22",

View File

@@ -34,7 +34,9 @@
"@stacks/common": "^3.0.0",
"@stacks/encryption": "^3.0.0",
"bitcoinjs-lib": "^5.2.0",
"jsontokens": "^3.0.0"
"jsontokens": "^3.0.0",
"webpack": "^5.68.0",
"webpack-cli": "^4.9.2"
},
"devDependencies": {
"@types/jest": "^26.0.22",

View File

@@ -57,7 +57,9 @@
"randombytes": "^2.1.0",
"ripemd160-min": "^0.0.6",
"sha.js": "^2.4.11",
"smart-buffer": "^4.1.0"
"smart-buffer": "^4.1.0",
"webpack": "^5.68.0",
"webpack-cli": "^4.9.2"
},
"publishConfig": {
"access": "public"

View File

@@ -1,16 +1,15 @@
import { Buffer } from '@stacks/common';
import { SmartBuffer, SmartBufferOptions } from 'smart-buffer';
function createEnumChecker<T extends string, TEnumValue extends number>(
enumVariable: { [key in T]: TEnumValue }
): (value: number) => value is TEnumValue {
function createEnumChecker<T extends string, TEnumValue extends number>(enumVariable: {
[key in T]: TEnumValue;
}): (value: number) => value is TEnumValue {
// Create a set of valid enum number values.
const enumValues = Object.values<number>(enumVariable).filter(v => typeof v === 'number');
const enumValueSet = new Set<number>(enumValues);
return (value: number): value is TEnumValue => enumValueSet.has(value);
}
// eslint-disable-next-line @typescript-eslint/ban-types
const enumCheckFunctions = new Map<object, (value: number) => boolean>();
/**

View File

@@ -1,37 +1,6 @@
import { StacksMainnet, StacksTestnet } from '@stacks/network';
import * as fs from 'fs';
import {
makeUnsignedSTXTokenTransfer,
makeContractDeploy,
makeUnsignedContractDeploy,
makeContractCall,
makeStandardSTXPostCondition,
makeContractSTXPostCondition,
makeStandardFungiblePostCondition,
makeContractFungiblePostCondition,
makeStandardNonFungiblePostCondition,
makeContractNonFungiblePostCondition,
broadcastTransaction,
getNonce,
TxBroadcastResult,
TxBroadcastResultOk,
TxBroadcastResultRejected,
callReadOnlyFunction,
sponsorTransaction,
makeSTXTokenTransfer,
makeUnsignedContractCall,
estimateTransaction,
SignedTokenTransferOptions
} from '../src/builders';
import { deserializeTransaction, StacksTransaction } from '../src/transaction';
import { createTokenTransferPayload, serializePayload, TokenTransferPayload } from '../src/payload';
import { BufferReader } from '../src/bufferReader';
import { createAssetInfo } from '../src/postcondition-types';
import fetchMock from 'jest-fetch-mock';
import {
createSingleSigSpendingCondition,
createSponsoredAuth,
@@ -42,28 +11,30 @@ import {
SingleSigSpendingCondition,
SponsoredAuthorization, StandardAuthorization
} from '../src/authorization';
import { createTransactionAuthField } from '../src/signature';
import { BufferReader } from '../src/bufferReader';
import {
broadcastTransaction, callReadOnlyFunction, estimateTransaction, getNonce, makeContractCall, makeContractDeploy, makeContractFungiblePostCondition, makeContractNonFungiblePostCondition, makeContractSTXPostCondition,
makeStandardFungiblePostCondition, makeStandardNonFungiblePostCondition, makeStandardSTXPostCondition, makeSTXTokenTransfer,
makeUnsignedContractCall, makeUnsignedContractDeploy, makeUnsignedSTXTokenTransfer, SignedTokenTransferOptions, sponsorTransaction, TxBroadcastResult,
TxBroadcastResultOk,
TxBroadcastResultRejected
} from '../src/builders';
import { bufferCV, bufferCVFromString, serializeCV, standardPrincipalCV } from '../src/clarity';
import { createMessageSignature } from '../src/common';
import {
DEFAULT_CORE_NODE_API_URL,
AddressHashMode,
AnchorMode, AuthType, DEFAULT_CORE_NODE_API_URL,
FungibleConditionCode,
NonFungibleConditionCode,
PostConditionMode,
TxRejectedReason,
AuthType,
AddressHashMode,
AnchorMode,
PubKeyEncoding, TransactionVersion,
PostConditionMode, PubKeyEncoding, TransactionVersion, TxRejectedReason
} from '../src/constants';
import { StacksTestnet, StacksMainnet } from '@stacks/network';
import { bufferCV, standardPrincipalCV, bufferCVFromString, serializeCV } from '../src/clarity';
import { ClarityAbi } from '../src/contract-abi';
import { createStacksPrivateKey, isCompressed, pubKeyfromPrivKey, publicKeyToString } from '../src/keys';
import { createTokenTransferPayload, serializePayload, TokenTransferPayload } from '../src/payload';
import { createAssetInfo } from '../src/postcondition-types';
import { createTransactionAuthField } from '../src/signature';
import { TransactionSigner } from '../src/signer';
import fetchMock from 'jest-fetch-mock';
import { deserializeTransaction, StacksTransaction } from '../src/transaction';
import { cloneDeep } from '../src/utils';
function setSignature(unsignedTransaction: StacksTransaction, signature: string | Buffer): StacksTransaction {

View File

@@ -6,7 +6,7 @@
"packages": {
"": {
"name": "@stacks/wallet-sdk",
"version": "3.1.1",
"version": "3.2.0",
"license": "MIT",
"dependencies": {
"bip32": "2.0.6",

View File

@@ -57,6 +57,8 @@
"jsontokens": "^3.0.0",
"randombytes": "^2.1.0",
"triplesec": "^3.0.27",
"webpack": "^5.68.0",
"webpack-cli": "^4.9.2",
"zone-file": "^2.0.0-beta.3"
},
"publishConfig": {

View File

@@ -1,51 +0,0 @@
# Release checklist
## Beta release
- [ ] `git flow release start <VERSION_NUMBER>` (`<VERSION_NUMBER>` prefixed with `v` and add `-beta.1` for beta)
- [ ] Check that all new changes are reflected in the changelog
- [ ] Bump package.json version to `<VERSION_NUMBER>` excluding prefix `v` and including the `-beta.1` suffix
- [ ] `nvm ls` Make sure you are on node v10+
- [ ] `npm run build`
- [ ] `npm run test`, make sure all tests are passing
- [ ] Commit changes
- [ ] `npm publish --tag beta`
- [ ] Make sure your `master` and `develop` branches are up-to-date
- [ ] `git flow release finish <VERSION_NUMBER>`
- [ ] `git push origin develop`
- [ ] `git push origin --tags`
- [ ] `git checkout master`
- [ ] `git checkout -b master-test`
- [ ] `git push origin master-test`
- [ ] Wait for checks to finish on pushed `master-test` branch
- [ ] `git checkout master`
- [ ] `git push origin master`
- [ ] `git branch -D master-test`
- [ ] `git push origin :master-test`
- [ ] Announce availability in #engineering and on the forum here: https://forum.blockstack.org/c/releases (Include a link to the changelog)
- [ ] Announce availability to the community via Jenny Mith <jenny@blockstack.com> and Mitchell Cuevas <mitchell@blockstack.com>. Provide a succinct list of changes, the link to the changelog and latest release as well as a desired date for the community update.
## Production Release
- [ ] `git flow release start <VERSION_NUMBER> master` (`<VERSION_NUMBER>` prefixed with `v`)
- [ ] Check that all new changes are reflected in the changelog
- [ ] Bump package.json version to `<VERSION_NUMBER>` without prefix `v`
- [ ] `nvm ls` Make sure you are on node v10+
- [ ] `npm run build`
- [ ] Make sure `dist/blockstack.js` exists
- [ ] `npm run test`, make sure all tests are passing
- [ ] Commit changes
- [ ] `npm publish`
- [ ] Make sure your `master` and `develop` branches are up-to-date
- [ ] `git flow release finish <VERSION_NUMBER>`
- [ ] `git checkout develop`
- [ ] `git merge master`
- [ ] `git push origin develop`
- [ ] `git push origin --tags`
- [ ] `git checkout master`
- [ ] `git checkout -b master-test`
- [ ] `git push origin master-test`
- [ ] Wait for checks to finish on pushed `master-test` branch
- [ ] `git checkout master`
- [ ] `git push origin master`
- [ ] `git branch -D master-test`
- [ ] `git push origin :master-test`
- [ ] Announce availability in #engineering and on the forum here: https://forum.blockstack.org/c/releases (Include a link to the changelog)
- [ ] Announce availability to the community via Jenny Mith <jenny@blockstack.com> and Mitchell Cuevas <mitchell@blockstack.com>. Provide a succinct list of changes, the link to the changelog and latest release as well as a desired date for the community update. Consider doing an AMA on major/breaking releases.