0.39.3 ā€¢ Published 9 days ago

@alephium/web3 v0.39.3

Weekly downloads
-
License
GPL
Repository
github
Last release
9 days ago

Alephium Web3

Github CI Code Coverage NPM code style: prettier

A JavaScript/TypeScript library for building decentralized applications and smart contracts on Alephium.

You could run the following command to scaffold a skeleton project for smart contract development:

npx @alephium/web3 <project-dir> [-t template-name]

Install

In Node projects

npm install @alephium/web3

šŸ’„ Until our library is stable, breaking changes will be introduced in minor versions (instead of the traditional major versions of semver). We recommend allowing patch-level updates and to always read the release notes for breaking changes.

// package.json
{
   "dependencies": {
      "@alephium/web3": "~X.Y.Z"
   }
}

In browser projects

All you have to do is to include the library in your HTML document. The alephium global variable will be available.

<script src="alephium-web3.min.js"></script>
<script>
  const { walletGenerate } = alephium
  const wallet = walletGenerate()
  console.log(wallet)
</script>

You can either build the library by cloning this repo and running the build script (the file will be located at /dist/alephium-web3.min.js), or simply using a CDN.

npm run build

via UNPKG CDN

<script src="https://unpkg.com/@alephium/web3@X.Y.Z/dist/alephium-web3.min.js"></script>

via jsDelivr CDN

<script src="https://cdn.jsdelivr.net/npm/@alephium/web3@X.Y.Z/dist/alephium-web3.min.js"></script>

Development

Update schemas

One first needs to update the version number of alephium and explorer-backend in package.json. Kindly note that one needs to check the compatibility of both OpenAPI files manually.

Typings can automatically generated using the following command:

npm run update-schemas

Packaging

We need to include the .gitignore file inside the npm package so that it can be used by the dist/cli/create-project.js script. To do that we define the prepack and postpack npm scripts that will rename the .gitignore file to gitignore, pack it into the package, and rename it back to .gitignore. Similar approach has been followed by create-react-app1.

Release

To release a new version:

  1. Create a commit that updates the package version in package.json and package-lock.json and a tag with:
    npm version patch # if you want to bump the patch version, without breaking changes
    npm version minor # if you want to bump the minor version, with breaking changes
    npm version prerelease --preid=rc # if you want to create a release candidate
    npm version prerelease --preid=leman # if you want to create a leman prerelease
  2. Push the tag to GitHub and trigger the publish workflow that will publish it on NPM with:

    git push [remote] <tag>
  3. Unless you are on master, create a new branch and push it to GitHub so that the tagged commit belongs to a branch of this repo with:

    git checkout -b <tag>
    git push

    Otherwise, just push to master.

Build

Compile the TypeScript files into JavaScript:

npm run build

Testing

npm run start-devnet # this will start a devnet for smart contract tests
npm test

or, to watch for changes:

npm run test:watch
0.39.3

9 days ago

0.39.2

14 days ago

0.39.1

15 days ago

0.39.0

17 days ago

0.38.2

26 days ago

0.38.1

29 days ago

0.38.0

1 month ago

0.37.0

2 months ago

0.36.1

2 months ago

0.36.0

2 months ago

0.35.1

2 months ago

0.35.0

2 months ago

0.34.1

2 months ago

0.34.0

2 months ago

0.33.0

2 months ago

0.32.1

2 months ago

0.32.0

2 months ago

0.31.2

2 months ago

0.30.2

3 months ago

0.31.1

3 months ago

0.31.0

3 months ago

0.30.1

3 months ago

0.30.0

3 months ago

0.30.0-beta.1

3 months ago

0.29.3

3 months ago

0.29.2

3 months ago

0.29.1

4 months ago

0.29.0

4 months ago

0.28.1

4 months ago

0.28.0

4 months ago

0.27.5

5 months ago

0.27.4

5 months ago

0.27.3

5 months ago

0.27.2

5 months ago

0.27.1

5 months ago

0.27.0

5 months ago

0.25.2

5 months ago

0.26.0

5 months ago

0.25.1

5 months ago

0.25.0

5 months ago

0.23.0

5 months ago

0.24.0

5 months ago

0.20.0

8 months ago

0.17.0

9 months ago

0.17.1

9 months ago

0.21.2

8 months ago

0.21.1

8 months ago

0.21.0

8 months ago

0.18.1

9 months ago

0.14.5

10 months ago

0.18.2

9 months ago

0.14.6

9 months ago

0.18.3

9 months ago

0.14.0

11 months ago

0.14.1

10 months ago

0.14.2

10 months ago

0.14.3

10 months ago

0.18.0

9 months ago

0.14.4

10 months ago

0.22.0

8 months ago

0.19.0

8 months ago

0.19.1

8 months ago

0.19.2

8 months ago

0.15.0

9 months ago

0.15.1

9 months ago

0.16.0

9 months ago

0.16.1

9 months ago

0.13.0

11 months ago

0.12.5-rc.1

12 months ago

0.12.5-rc.0

12 months ago

0.12.5

12 months ago

0.12.0-test.2

12 months ago

0.10.3

1 year ago

0.10.4

1 year ago

0.11.8

12 months ago

0.11.0

1 year ago

0.11.1

1 year ago

0.11.2

1 year ago

0.11.3

1 year ago

0.11.4

12 months ago

0.11.5

12 months ago

0.11.6

12 months ago

0.11.7

12 months ago

0.12.0

12 months ago

0.12.1

12 months ago

0.12.2

12 months ago

0.12.3

12 months ago

0.12.4

12 months ago

0.10.0-rc.2

1 year ago

0.10.0-rc.1

1 year ago

0.10.0-rc.0

1 year ago

0.10.0-rc.3

1 year ago

0.10.1

1 year ago

0.10.2

1 year ago

0.10.0

1 year ago

0.7.1

1 year ago

0.7.0

1 year ago

0.5.0-rc.9

1 year ago

0.9.0-rc.2

1 year ago

0.5.0-rc.2

1 year ago

0.9.0-rc.1

1 year ago

0.5.0-rc.1

1 year ago

0.5.0-rc.4

1 year ago

0.5.0-rc.3

1 year ago

0.8.2-test.2

1 year ago

0.5.0-rc.6

1 year ago

0.5.0-rc.5

1 year ago

0.9.0-rc.0

1 year ago

0.5.0-rc.8

1 year ago

0.8.2-test.3

1 year ago

0.5.0-rc.7

1 year ago

0.5.0-rc.0

1 year ago

0.8.1

1 year ago

0.8.0

1 year ago

0.4.0

1 year ago

0.6.7

1 year ago

0.6.6

1 year ago

0.5.0-rc.20

1 year ago

0.5.0-rc.22

1 year ago

0.5.0-rc.21

1 year ago

0.9.0

1 year ago

0.5.4

1 year ago

0.5.3

1 year ago

0.9.1

1 year ago

0.5.0

1 year ago

0.5.2

1 year ago

0.5.1

1 year ago

0.5.0-rc.11

1 year ago

0.5.0-rc.10

1 year ago

0.5.0-rc.13

1 year ago

0.5.0-rc.12

1 year ago

0.5.0-rc.15

1 year ago

0.5.0-rc.14

1 year ago

0.5.0-rc.17

1 year ago

0.5.0-rc.16

1 year ago

0.5.0-rc.19

1 year ago

0.5.0-rc.18

1 year ago

0.6.3

1 year ago

0.6.2

1 year ago

0.6.5

1 year ago

0.6.4

1 year ago

0.6.1

1 year ago

0.6.0

1 year ago

0.3.0-rc.7

1 year ago

0.3.0-rc.8

1 year ago

0.3.0-rc.3

1 year ago

0.3.0-rc.4

1 year ago

0.3.0-rc.5

1 year ago

0.3.0-rc.0

1 year ago

0.3.0-rc.1

1 year ago

0.2.0-rc.38

2 years ago

0.2.0-rc.37

2 years ago

0.2.0-rc.36

2 years ago

0.2.0-rc.35

2 years ago

0.2.0-rc.34

2 years ago

0.2.0-rc.33

2 years ago

0.2.0

2 years ago

0.2.2

1 year ago

0.2.0-rc.32

2 years ago

0.2.0-rc.31

2 years ago

0.2.0-rc.30

2 years ago

0.2.0-rc.29

2 years ago

0.2.0-rc.28

2 years ago

0.2.0-rc.27

2 years ago

0.2.0-rc.26

2 years ago

0.2.0-rc.25

2 years ago

0.2.0-rc.24

2 years ago

0.2.0-rc.23

2 years ago

0.2.0-rc.22

2 years ago

0.2.0-rc.21

2 years ago

0.2.0-rc.20

2 years ago

0.2.0-test.1

2 years ago

0.2.0-rc.19

2 years ago

0.2.0-rc.18

2 years ago

0.2.0-rc.17

2 years ago

0.2.0-rc.16

2 years ago

0.2.0-rc.15

2 years ago

0.2.0-rc.14

2 years ago

0.2.0-rc.13

2 years ago

0.2.0-rc.12

2 years ago

0.2.0-rc.11

2 years ago

0.2.0-rc.10

2 years ago

0.2.0-rc.7

2 years ago

0.2.0-rc.6

2 years ago

0.2.0-rc.9

2 years ago

0.2.0-rc.8

2 years ago

0.2.0-rc.5

2 years ago

0.2.0-rc.4

2 years ago

0.2.0-rc.3

2 years ago

0.2.0-rc.2

2 years ago

0.2.0-rc.1

2 years ago

0.2.0-rc.0

2 years ago

0.2.0-test.0

2 years ago

0.0.1-test.2

2 years ago

0.0.1-test.0

2 years ago

0.1.0-rc.3-hc

2 years ago

0.1.0

2 years ago

0.1.0-rc.3

2 years ago

0.1.0-rc.2

2 years ago

0.1.0-rc.1

2 years ago

0.1.0-rc.0

2 years ago

0.0.3

2 years ago