Skip to content

Commit

Permalink
release: bump version to 0.1.1 (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
darioAnongba authored Dec 18, 2024
1 parent a0edcee commit 6014d10
Show file tree
Hide file tree
Showing 9 changed files with 64 additions and 86 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
on:
pull_request:
branches:
- main
name: Build, Lint, and Test

name: CI
on:
workflow_call:

jobs:
build-test:
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Main
on:
push:
branches: [main]
pull_request:

jobs:
check-workflows:
Expand All @@ -18,11 +19,16 @@ jobs:
run: ${{ steps.download-actionlint.outputs.executable }} -color
shell: bash

build-lint-test:
name: Build, lint, and test
uses: ./.github/workflows/build-lint-test.yml

all-jobs-completed:
name: All jobs completed
runs-on: ubuntu-latest
needs:
- check-workflows
- build-lint-test
outputs:
PASSED: ${{ steps.set-output.outputs.PASSED }}
steps:
Expand All @@ -45,6 +51,7 @@ jobs:
is-release:
needs: all-jobs-pass
if: github.event_name == 'push'
name: Check if release
uses: ./.github/workflows/check-is-release.yml
with:
Expand Down
46 changes: 10 additions & 36 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ jobs:
permissions:
contents: write
runs-on: ubuntu-latest
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
steps:
- name: checkout
uses: actions/checkout@v4
Expand All @@ -26,42 +28,14 @@ jobs:
uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab
- name: Build
run: wasm-pack build --features "esplora"

publish-npm-dry-run:
needs: publish-release
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: Setup Node
with:
ref: ${{ github.sha }}
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@4f647fc679bcd3b11499ccb42104547c83dabe96
with:
toolchain: stable
- name: Install wasm-pack
run: curl https://raw.githubusercontent.com/rustwasm/wasm-pack/a3a48401795cd4b3afe1d74568c93675a04f3970/installer/init.sh -sSf | sh -s -- -f
- name: Rust Cache
uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab
node-version: "lts/*"
registry-url: "https://registry.npmjs.org"
uses: actions/setup-node@v4
- name: Dry Run Publish
run: wasm-pack publish --dry-run

publish-npm:
needs: publish-npm-dry-run
runs-on: ubuntu-latest
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.sha }}
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@4f647fc679bcd3b11499ccb42104547c83dabe96
with:
toolchain: stable
- name: Install wasm-pack
run: curl https://raw.githubusercontent.com/rustwasm/wasm-pack/a3a48401795cd4b3afe1d74568c93675a04f3970/installer/init.sh -sSf | sh -s -- -f
- name: Rust Cache
uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab
working-directory: pkg
run: npm publish --dry-run
- name: Publish
run: wasm-pack publish
working-directory: pkg
run: npm publish
54 changes: 27 additions & 27 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 9 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
[package]
name = "bdk_wasm"
version = "0.1.0"
name = "bitcoindevkit"
version = "0.1.1"
repository = "https://github.com/MetaMask/bdk-wasm"
description = "A modern, lightweight, descriptor-based wallet library for WASM and JS/TS"
description = "A modern, lightweight, descriptor-based wallet library in WebAssembly for browsers and Node"
keywords = [
"bitcoin",
"wallet",
"descriptor",
"psbt",
"wasm",
"js",
"typescript",
"bitcoindevkit",
"bdk",
"browser",
"node",
]
readme = "README.md"
license = "MIT OR Apache-2.0"
Expand All @@ -23,12 +25,12 @@ crate-type = ["cdylib", "rlib"]

[features]
default = []
esplora = ["bdk_esplora"]
esplora = ["bdk_esplora", "wasm-bindgen-futures"]
debug = ["console_error_panic_hook"]

[dependencies]
wasm-bindgen = "0.2.99"
wasm-bindgen-futures = "0.4.49"
wasm-bindgen-futures = { version = "0.4.49", optional = true }
anyhow = "1.0.94"
serde = { version = "1.0.216", default-features = false, features = ["derive"] }
js-sys = "0.3.76"
Expand Down
13 changes: 5 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
<div align="center">
<h1>The Bitcoin Dev Kit: WebAssembly</h1>

<img src="./static/bdk.png" width="220" />

<p>
<strong>The Bitcoin Dev Kit for Browsers and Node</strong>
<strong>The Bitcoin Dev Kit for Browser and Node</strong>
</p>

<p>
<a href=""><img alt="NPM Package" src="https://img.shields.io/crates/v/bdk_wallet.svg"/></a>
<a href="https://www.npmjs.com/package/bitcoindevkit"><img alt="NPM Version" src="https://img.shields.io/npm/v/bitcoindevkit?color=red&logo=npm"/></a>
<a href="https://github.com/MetaMask/bdk-wasm/blob/master/LICENSE"><img alt="MIT or Apache-2.0 Licensed" src="https://img.shields.io/badge/license-MIT%2FApache--2.0-blue.svg"/></a>
<a href="https://coveralls.io/github/MetaMask/bdk-wasm?branch=main"><img src="https://coveralls.io/repos/github/MetaMask/bdk-wasm/badge.svg?branch=main"/></a>
<a href="https://blog.rust-lang.org/2022/08/11/Rust-1.63.0.html"><img alt="Rustc Version 1.63.0+" src="https://img.shields.io/badge/rustc-1.63.0%2B-lightgrey.svg"/></a>
<a href="https://blog.rust-lang.org/2022/08/11/Rust-1.73.0.html"><img alt="Rustc Version 1.63.0+" src="https://img.shields.io/badge/rustc-1.73.0%2B-lightgrey.svg"/></a>
<a href="https://discord.gg/d7NkDKm"><img alt="Chat on Discord" src="https://img.shields.io/discord/753336465005608961?logo=discord"></a>
</p>

Expand All @@ -24,7 +21,7 @@
The `bdk-wasm` library aims at providing access to the excellent [BitcoinDevKit](https://github.com/bitcoindevkit/bdk) to JS and Node environments (and eventually any device supporting WebAssembly).
It specializes in compiling BDK on the `wasm32-unknown-unknown` target and use [`wasm-bindgen`](https://github.com/rustwasm/wasm-bindgen) to create TypeScript bindings.

This repo handles the packaging and publishing of the `bdk` NPM package, using `wasm-pack`.
This repo handles the packaging and publishing of the `bitcoindevkit` NPM package, using `wasm-pack`.

This library offers all the desired functionality to build a Bitcoin wallet out of the box:

Expand All @@ -42,7 +39,7 @@ For a lightweight library providing stateless utility functions, see [`bitcoinjs
## Browser Usage

```sh
yarn add bdk
yarn add bitcoindevkit
```

## Development Environment
Expand Down
2 changes: 1 addition & 1 deletion tests/esplora.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

extern crate wasm_bindgen_test;

use bdk_wasm::{
use bitcoindevkit::{
bitcoin::{EsploraClient, Wallet},
set_panic_hook,
types::{DescriptorPair, KeychainKind, Network},
Expand Down
2 changes: 1 addition & 1 deletion tests/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
extern crate wasm_bindgen_test;

use bdk_wallet::bip39::Mnemonic;
use bdk_wasm::{
use bitcoindevkit::{
seed_to_descriptor, seed_to_xpriv, set_panic_hook,
types::{AddressType, Network},
xpriv_to_descriptor, xpub_to_descriptor,
Expand Down
2 changes: 1 addition & 1 deletion tests/wallet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
extern crate wasm_bindgen_test;

use bdk_wallet::bip39::Mnemonic;
use bdk_wasm::{
use bitcoindevkit::{
bitcoin::Wallet,
seed_to_descriptor, set_panic_hook,
types::{AddressType, ChangeSet, KeychainKind, Network},
Expand Down

0 comments on commit 6014d10

Please sign in to comment.