0.7.6 ā€¢ Published 9 months ago

@alephium/sdk v0.7.6

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

Alephium js-sdk

Github CI Code Coverage NPM code style: prettier

A JavaScript/TypeScript library for building applications that interact the Alephium platform.

Install

In Node projects

npm install @alephium/sdk

šŸ’„ Until our SDK 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/sdk": "~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.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.min.js), or simply using a CDN.

npm run build

via UNPKG CDN

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

via jsDelivr CDN

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

Development

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
  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 devnet:start # this will start a devnet for smart contract tests
npm test

or, to watch for changes:

npm run test:watch
0.7.4-rc.0

9 months ago

0.7.6-rc.0

9 months ago

0.7.2-rc.1

10 months ago

0.7.4

9 months ago

0.7.3

10 months ago

0.7.6

9 months ago

0.7.5

9 months ago

0.7.6-rc.1

9 months ago

0.7.3-rc.0

10 months ago

0.7.6-rc.2

9 months ago

0.7.1-rc.0

11 months ago

0.7.2-rc.0

11 months ago

0.7.2

11 months ago

0.7.1

11 months ago

0.7.0

12 months ago

0.6.4-rc.2

1 year ago

0.6.4-rc.1

1 year ago

0.6.4-rc.0

1 year ago

0.7.0-rc.2

1 year ago

0.7.0-rc.1

1 year ago

0.7.0-rc.0

1 year ago

0.7.0-rc.4

12 months ago

0.7.0-rc.3

12 months ago

0.6.3

1 year ago

0.6.4

1 year ago

0.6.0-rc.2

1 year ago

0.6.0-rc.3

1 year ago

0.6.0-rc.4

1 year ago

0.6.0-rc.0

1 year ago

0.6.0-rc.1

1 year ago

0.6.2-rc.0

1 year ago

0.6.2-rc.1

1 year ago

0.6.2

1 year ago

0.6.1

1 year ago

0.6.0

1 year ago

0.5.0-rc.0

1 year ago

0.5.0

1 year ago

0.2.1-rc.0

2 years ago

0.2.1-rc.1

2 years ago

0.1.1-rc.1

2 years ago

0.1.1-rc.0

2 years ago

0.1.1-rc.2

2 years ago

0.3.1-rc.1

1 year ago

0.3.1-rc.0

1 year ago

0.4.0-rc.3

1 year ago

0.4.0-rc.2

1 year ago

0.2.0-rc.2

2 years ago

0.4.0-rc.1

1 year ago

0.4.0-rc.0

1 year ago

0.2.0-rc.1

2 years ago

0.2.0-rc.0

2 years ago

0.3.0

1 year ago

0.2.1

2 years ago

0.2.0

2 years ago

0.2.2-rc.0

1 year ago

0.4.1

1 year ago

0.4.0

1 year ago

0.2.2

1 year ago

0.1.0

2 years ago

0.0.15

2 years ago

0.0.10

2 years ago

0.0.11

2 years ago

0.0.12

2 years ago

0.0.13

2 years ago

0.0.14

2 years ago

0.0.7-rc.1

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.13-rc.0

2 years ago

0.0.7-rc.0

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.4-rc.0

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago