diff --git a/client/README.md b/client/README.md new file mode 100644 index 0000000000..ae0b177318 --- /dev/null +++ b/client/README.md @@ -0,0 +1,9 @@ +# @stacks/blockchain-api-client +[![NPM Package](https://img.shields.io/npm/v/@stacks/blockchain-api-client.svg?style=flat-square)](https://www.npmjs.org/package/@stacks/blockchain-api-client) +[![Build Status](https://github.com/blockstack/stacks-blockchain-api/workflows/Build/badge.svg)](https://github.com/blockstack/stacks-blockchain-api/actions) + +Client for the Stacks Blockchain API. + +### Known Issues + +* The TypeScript definitions for several objects involving type unions, including transactions, are incorrectly specified as only `object`. diff --git a/client/package.json b/client/package.json index e7bb892d17..f53d427b7e 100644 --- a/client/package.json +++ b/client/package.json @@ -2,11 +2,22 @@ "name": "@stacks/blockchain-api-client", "version": "0.1.0", "access": "public", - "description": "TypeScript client for the Stacks Blockchain API", + "description": "Client for the Stacks Blockchain API", + "homepage": "https://github.com/blockstack/stacks-blockchain-api/tree/master/client#readme", + "author": "Blockstack PBC (https://blockstack.org)", + "license": "GPL-3.0", + "repository": { + "type": "git", + "url": "git+https://github.com/blockstack/stacks-blockchain-api.git" + }, + "bugs": { + "url": "https://github.com/blockstack/stacks-blockchain-api/issues" + }, "main": "lib/index.js", "unpkg": "lib/index.umd.js", "scripts": { "prepublishOnly": "npm run build", + "postinstall": "npx shx find lib/index.js || npm run build", "build": "rimraf ./lib && npm run generate-openapi && npm run build:node && npm run build:browser", "build:node": "tsc", "build:browser": "microbundle -i src/index.ts -o lib/index.umd.js --no-pkg-main -f umd --external none --globals none --tsconfig tsconfig.browser.json --name StacksBlockchainApiClient", @@ -15,8 +26,6 @@ "prep-openapi": "rimraf ./.tmp && swagger-cli bundle --dereference -o ./.tmp/openapi.json ../docs/openapi.yaml && shx sed -i '^.*\\$schema.*$' '' ./.tmp/openapi.json", "generate-openapi": "npm run prep-openapi && openapi-generator generate --skip-validate-spec -g typescript-fetch --additional-properties=typescriptThreePlus=true,supportsES6=true,legacyDiscriminatorBehavior=false,enumPropertyNaming=original,modelPropertyNaming=original -i ./.tmp/openapi.json -o ./src/generated" }, - "author": "@blockstack", - "license": "ISC", "prettier": "@blockstack/prettier-config", "files": [ "./src", diff --git a/client/tsconfig.json b/client/tsconfig.json index f0604a72aa..0704a8de1e 100644 --- a/client/tsconfig.json +++ b/client/tsconfig.json @@ -1,6 +1,6 @@ { "compilerOptions": { - "target": "es2019", + "target": "es2017", "module": "commonjs", "moduleResolution": "node", "declaration": true,