diff --git a/.circleci/config.yml b/.circleci/config.yml index 19f0d010..3395a762 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -5,7 +5,6 @@ workflows: jobs: - build - lint - # - faucet_docker - test jobs: @@ -101,18 +100,3 @@ jobs: - ~/.cache/yarn - run: command: yarn lint - faucet_docker: - docker: - - image: circleci/node:10 - steps: - - checkout - - setup_remote_docker: - docker_layer_caching: true - - run: - name: Build docker image - command: docker build -t cosmwasm/faucet:manual --file faucet.Dockerfile . - - run: - name: Test docker image - command: | - docker run --read-only --rm cosmwasm/faucet:manual help - docker run --read-only --rm cosmwasm/faucet:manual version diff --git a/README.md b/README.md index 9f3a5247..77d24bcf 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,6 @@ -# @iov/cosmos +# CosmWasm JS -[![npm version](https://img.shields.io/npm/v/cosm-js.svg)](https://www.npmjs.com/package/cosm-js) - -This is a Typescript client-side binding to [wasmd](https://github.com/cosmwasm/wasmd), a sample blockchain for the [cosmwasm](https://github.com/confio/cosmwasm) smart contracting platform. +This is a JavaScript/TypeScript client-side binding to [wasmd](https://github.com/cosmwasm/wasmd), a sample blockchain for the [cosmwasm](https://github.com/confio/cosmwasm) smart contracting platform. ## Development diff --git a/docs/faucet.Dockerfile b/docs/faucet.Dockerfile new file mode 100644 index 00000000..d863b964 --- /dev/null +++ b/docs/faucet.Dockerfile @@ -0,0 +1,15 @@ +# The only officially supported distribution channel of the faucet binary is @cosmwasm/faucet on npmjs.com +# This is an example file of how to wrap the faucet in a docker container. +# This file will be outdated very soon, but should work as a template for your custom docker setup. + +# Coose from https://hub.docker.com/_/node/ +FROM node:12.14.1-alpine + +RUN yarn global add @cosmwasm/faucet@0.0.3 + +# Check it exists +RUN /usr/local/bin/cosmwasm-faucet version + +EXPOSE 8000 +ENTRYPOINT ["/usr/local/bin/cosmwasm-faucet"] +CMD [""] diff --git a/faucet.Dockerfile b/faucet.Dockerfile deleted file mode 100644 index 558ede9d..00000000 --- a/faucet.Dockerfile +++ /dev/null @@ -1,24 +0,0 @@ -# Start the build environment -# https://hub.docker.com/_/node/ -FROM node:12.14-alpine AS build-env - -ADD package.json yarn.lock tsconfig.json lerna.json /build_repo_root/ -ADD packages/bcp /build_repo_root/packages/bcp -ADD packages/faucet /build_repo_root/packages/faucet -ADD packages/sdk /build_repo_root/packages/sdk - -WORKDIR /build_repo_root -RUN yarn install --frozen-lockfile -RUN yarn build - -# Start the runtime environment -FROM node:12.14-alpine -COPY --from=build-env /build_repo_root/package.json /run_repo_root/ -COPY --from=build-env /build_repo_root/yarn.lock /run_repo_root/ -COPY --from=build-env /build_repo_root/packages /run_repo_root/packages -WORKDIR /run_repo_root -RUN yarn install --frozen-lockfile --production - -EXPOSE 8000 -ENTRYPOINT ["/run_repo_root/packages/faucet/bin/cosmwasm-faucet"] -CMD [""] diff --git a/lerna.json b/lerna.json index c2afe01c..8adaeb72 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "0.0.2", + "version": "0.0.3", "useWorkspaces": true, "npmClient": "yarn" } diff --git a/package.json b/package.json index b5a56f15..019ab0a4 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "cosm-js-monorepo-root", + "name": "cosmwasm-js-monorepo-root", "description": "Transaction codec and client to communicate with any wasmd blockchain", "private": true, "author": "Ethan Frey ", @@ -15,7 +15,7 @@ ], "repository": { "type": "git", - "url": "https://github.com/confio/cosm-js" + "url": "https://github.com/confio/cosmwasm-js" }, "publishConfig": { "access": "public" diff --git a/packages/bcp/README.md b/packages/bcp/README.md new file mode 100644 index 00000000..2c9419c6 --- /dev/null +++ b/packages/bcp/README.md @@ -0,0 +1,5 @@ +# @cosmwasm/bcp + +[![npm version](https://img.shields.io/npm/v/@cosmwasm/bcp.svg)](https://www.npmjs.com/package/@cosmwasm/bcp) + +A [BCP](https://github.com/iov-one/iov-core/tree/master/packages/iov-bcp) implementation for CosmWasm. diff --git a/packages/bcp/nonces/1580980830 b/packages/bcp/nonces/1580980830 new file mode 100644 index 00000000..e69de29b diff --git a/packages/bcp/package.json b/packages/bcp/package.json index e2ad28e4..b91f2ec0 100644 --- a/packages/bcp/package.json +++ b/packages/bcp/package.json @@ -1,6 +1,6 @@ { "name": "@cosmwasm/bcp", - "version": "0.0.2", + "version": "0.0.3", "description": "Transaction codec and client to communicate with any wasmd blockchain", "author": "Ethan Frey ", "license": "Apache-2.0", @@ -15,7 +15,7 @@ ], "repository": { "type": "git", - "url": "https://github.com/confio/cosm-js/tree/master/packages/bcp" + "url": "https://github.com/confio/cosmwasm-js/tree/master/packages/bcp" }, "publishConfig": { "access": "public" @@ -38,7 +38,7 @@ "pack-web": "yarn build-or-skip && webpack --mode development --config webpack.web.config.js" }, "dependencies": { - "@cosmwasm/sdk": "^0.0.2", + "@cosmwasm/sdk": "^0.0.3", "@iov/bcp": "^2.0.0-alpha.7", "@iov/crypto": "^2.0.0-alpha.7", "@iov/encoding": "^2.0.0-alpha.7", diff --git a/packages/faucet/README.md b/packages/faucet/README.md index 9cf560a3..5793bc26 100644 --- a/packages/faucet/README.md +++ b/packages/faucet/README.md @@ -1,4 +1,6 @@ -# @cosmwasm/faucet +# @cosmwasm/sdk + +[![npm version](https://img.shields.io/npm/v/@cosmwasm/faucet.svg)](https://www.npmjs.com/package/@cosmwasm/faucet) The faucet is built as part of the monorepo. In the repo root do: @@ -74,29 +76,33 @@ as soon as there is ### Working with docker -- Build an artifact () +**Note:** The Dockerfile in this repo is for demonstration purposes only. If you chose to +deploy the faucet via docker, make sure to copy the Dockerfile and keep it up-to-date. + +- Build an artifact (from monorepo root) ```sh -docker build -t cosmwasm/faucet:manual --file faucet.Dockerfile . +cd docs +docker build -t local-cosmwasm-faucet:manual --file faucet.Dockerfile . ``` - Version and help ```sh -docker run --read-only --rm cosmwasm/faucet:manual version -docker run --read-only --rm cosmwasm/faucet:manual help +docker run --read-only --rm local-cosmwasm-faucet:manual version +docker run --read-only --rm local-cosmwasm-faucet:manual help ``` - Run faucet locally ```sh -DOCKER_HOST_IP=$(docker run --read-only --rm alpine ip route | awk 'NR==1 {print $3}') \ +DOCKER_HOST_IP=$(docker run --read-only --rm alpine ip route | awk 'NR==1 {print $3}'); \ FAUCET_CONCURRENCY=3 FAUCET_MNEMONIC="economy stock theory fatal elder harbor betray wasp final emotion task crumble siren bottom lizard educate guess current outdoor pair theory focus wife stone" \ docker run --read-only --rm \ -e FAUCET_MNEMONIC \ -e FAUCET_CONCURRENCY \ -p 8000:8000 \ - cosmwasm/faucet:manual \ + local-cosmwasm-faucet:manual \ start "http://$DOCKER_HOST_IP:1317" ``` diff --git a/packages/faucet/nonces/1580980830 b/packages/faucet/nonces/1580980830 new file mode 100644 index 00000000..e69de29b diff --git a/packages/faucet/package.json b/packages/faucet/package.json index 94192f91..af98acd7 100644 --- a/packages/faucet/package.json +++ b/packages/faucet/package.json @@ -1,11 +1,14 @@ { "name": "@cosmwasm/faucet", - "version": "0.0.2", + "version": "0.0.3", "description": "The faucet", "author": "Ethan Frey ", "license": "Apache-2.0", "main": "build/index.js", "types": "types/index.d.ts", + "bin": { + "cosmwasm-faucet": "bin/cosmwasm-faucet" + }, "files": [ "build/", "types/", @@ -15,7 +18,7 @@ ], "repository": { "type": "git", - "url": "https://github.com/confio/cosm-js/tree/master/packages/faucet" + "url": "https://github.com/confio/cosmwasm-js/tree/master/packages/faucet" }, "publishConfig": { "access": "public" @@ -32,7 +35,7 @@ "test": "yarn build-or-skip && yarn test-node" }, "dependencies": { - "@cosmwasm/bcp": "^0.0.2", + "@cosmwasm/bcp": "^0.0.3", "@iov/bcp": "^2.0.0-alpha.7", "@iov/crypto": "^2.0.0-alpha.7", "@iov/encoding": "^2.0.0-alpha.7", diff --git a/packages/sdk/README.md b/packages/sdk/README.md new file mode 100644 index 00000000..e6ea142e --- /dev/null +++ b/packages/sdk/README.md @@ -0,0 +1,5 @@ +# @cosmwasm/sdk + +[![npm version](https://img.shields.io/npm/v/@cosmwasm/sdk.svg)](https://www.npmjs.com/package/@cosmwasm/sdk) + +An SDK to build CosmWasm clients. diff --git a/packages/sdk/nonces/1580980830 b/packages/sdk/nonces/1580980830 new file mode 100644 index 00000000..e69de29b diff --git a/packages/sdk/package.json b/packages/sdk/package.json index a64fd6f0..a05d2ce8 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@cosmwasm/sdk", - "version": "0.0.2", + "version": "0.0.3", "description": "CosmWasm SDK", "author": "Ethan Frey ", "license": "Apache-2.0", @@ -15,7 +15,7 @@ ], "repository": { "type": "git", - "url": "https://github.com/confio/cosm-js/tree/master/packages/sdk" + "url": "https://github.com/confio/cosmwasm-js/tree/master/packages/sdk" }, "publishConfig": { "access": "public" diff --git a/packages/sdk/src/types.ts b/packages/sdk/src/types.ts index 9cf9cdfb..56da7b1a 100644 --- a/packages/sdk/src/types.ts +++ b/packages/sdk/src/types.ts @@ -130,7 +130,7 @@ export interface StdSignature { export interface PubKey { // type is one of the strings defined in pubkeyTypes // I don't use a string literal union here as that makes trouble with json test data: - // https://github.com/confio/cosm-js/pull/44#pullrequestreview-353280504 + // https://github.com/confio/cosmwasm-js/pull/44#pullrequestreview-353280504 readonly type: string; // Value field is base64-encoded in all cases // Note: if type is Secp256k1, this must contain a COMPRESSED pubkey - to encode from bcp/keycontrol land, you must compress it first