Awesome
0xsequence
Sequence: a modular web3 stack and smart wallet for Ethereum chains
Usage
npm install 0xsequence ethers
or
pnpm install 0xsequence ethers
or
yarn add 0xsequence ethers
Packages
- 0xsequence
- @0xsequence/abi
- @0xsequence/api
- @0xsequence/auth
- @0xsequence/core
- @0xsequence/deployer
- @0xsequence/guard
- @0xsequence/marketplace
- @0xsequence/multicall
- @0xsequence/network
- @0xsequence/provider
- @0xsequence/relayer
- @0xsequence/replacer
- @0xsequence/sessions
- @0xsequence/signhub
- @0xsequence/utils
- @0xsequence/wallet
Development Environment
Below are notes and instructions on how to get your development environment up and running, and enjoyable.
-
Install dependencies Run,
pnpm install
-
Workflow -- we use the amazing preconstruct package to handle our monorepo build system.
-
Local dev -- when you're working on the code in this repository, you can safely run
pnpm dev
at the root-level, which will link all packages/** together, so that when a local dependency from packages/** is used by another, it will automatically be linked without having to run a build command. Just remember: runpnpm dev
anytime you developing in this repo. Note, that when you runpnpm build
it will clear the dev environment, so you will need to runpnpm dev
again after a build. However,pnpm build
should only be used when making a release. -
Testing -- to test the system, you can run
pnpm test
at the top-level or at an individual package-level. -
Type-checking -- to typecheck the system you can run
pnpm typecheck
at any level. -
Building -- to compile the project to dist files for a release, run
pnpm build
at the root-level. Note building packages repeatedly during development is unnecessary withpreconstruct
. During local development runpnpm dev
and when building to make a release, runpnpm build
. -
Versioning -- this repository uses the handy changesets package for package versioning across the monorepo, as well as changelogs. See Releasing section below.
Releasing to NPM
0xsequence uses changesets to do versioning. This makes releasing really easy and changelogs are automatically generated.
How to do a release
Authorization on https://www.npmjs.com/ to push to the 0xsequence organization's packages is required.
- (first time)
pnpm login
- check that master is passing tests on github
- (warning: destructive) start from a clean repo:
git checkout master && git reset --hard && git clean -dfx && pnpm i
- for each new change:
a.
pnpm changeset
b. select all packages c. update all packages with either a minor or patch bump according to semver d. add a summary of the form:package: description of a single change
e. repeat a-d until all changes are accounted for pnpm changeset:version && pnpm i && pnpm build && pnpm i
git diff
and copy the newest version according to the changelogsgit commit -a -m <new version here>
git push
pnpm changeset:publish
and enter your 2fa totp token when promptedgit push --tags
How to do a snapshot release
Authorization on https://www.npmjs.com/ to push to the 0xsequence organization's packages is required.
Snapshot releases are versioned as 0.0.0-YYYYmmddHHMMSS and are intended for testing builds only.
- (first time)
pnpm login
- (warning: destructive) start from a clean repo:
git checkout <branch or commit to snapshot> && git reset --hard && git clean -dfx && pnpm i
pnpm changeset:snapshot
a. select all packages b. update all packages with a patch bump c. any summary is ok d. enter your 2fa totp token when prompted e. note the snapshot version 0.0.0-YYYYmmddHHMMSSgit reset --hard
NOTES
- Browser tests can be run with
pnpm test
or, separatelypnpm test:server
andpnpm test:run
- To run a specific test, run
pnpm test:only <test-file-basename>
, ie.pnpm test:only window-transport
TIPS
- If you're using node v18+ and you hit the error
Error: error:0308010C:digital envelope routines::unsupported
, make sure to first set,export NODE_OPTIONS=--openssl-legacy-provider
LICENSE
Apache-2.0
Copyright (c) 2017-present Horizon Blockchain Games Inc. / https://horizon.io