Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export Signer to WASM #78

Closed
wants to merge 56 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
cc1be97
asset metadata change
zqhxuyuan Jan 10, 2023
16024bd
change signer type
SupremoUGH Feb 2, 2023
9e8ebf7
Merge branch 'main' into signer_extension
SupremoUGH Feb 2, 2023
ff6aff0
signer methods
SupremoUGH Feb 2, 2023
8ba2548
signer methods work now
SupremoUGH Feb 3, 2023
c17bafe
signer finished
SupremoUGH Feb 6, 2023
979ea0d
wallet works
SupremoUGH Feb 6, 2023
ad34d82
Merge branch 'main' into signer_extension
SupremoUGH Feb 6, 2023
4ef7815
sign with transaction data
SupremoUGH Feb 6, 2023
a63e110
Merge branch 'signer_extension' of https://github.com/Manta-Network/s…
SupremoUGH Feb 6, 2023
e953d70
docs
SupremoUGH Feb 6, 2023
c5e8b15
multi-network suppport + docs + clippy issues
SupremoUGH Feb 7, 2023
29b1470
comments out
SupremoUGH Feb 7, 2023
379702e
changed error variant
SupremoUGH Feb 9, 2023
658216b
expect instead of error
SupremoUGH Feb 9, 2023
ee193b3
mnemonic + storage API
SupremoUGH Feb 9, 2023
6f5ecc2
changed initialization logic
SupremoUGH Feb 10, 2023
a94c1d2
dependencies
SupremoUGH Feb 10, 2023
606e4df
update wasmSigner
DanielZhangReal Feb 12, 2023
17736db
Add Read/Write API for Browser Storage
DanielZhangReal Feb 12, 2023
f600873
Update tsconfig.json
DanielZhangReal Feb 12, 2023
6ecb24e
Fix parameter error
DanielZhangReal Feb 12, 2023
25bea25
new signer constructor
SupremoUGH Feb 12, 2023
c399084
add SignerApi
DanielZhangReal Feb 13, 2023
b5ec1fe
Update initWasmSdk
DanielZhangReal Feb 13, 2023
73a0909
add spending_key & viewing_key
DanielZhangReal Feb 15, 2023
33df0e6
Update read/write api
DanielZhangReal Feb 15, 2023
5861636
style change
DanielZhangReal Feb 16, 2023
acfbada
Key Dependent Signer Function APIs (#85)
SupremoUGH Feb 21, 2023
51d85ea
RawFullParameters
SupremoUGH Feb 21, 2023
2843c7f
RawMultiProvingContext
SupremoUGH Feb 22, 2023
fa7e531
default method
SupremoUGH Feb 22, 2023
1739bce
new_with_random_context
SupremoUGH Feb 22, 2023
1499acf
last one
SupremoUGH Feb 22, 2023
7acb74e
fix: add test code
DanielZhangReal Feb 22, 2023
7b6f2bd
fix: rm debugger
DanielZhangReal Feb 22, 2023
716c53d
bug fix
SupremoUGH Feb 23, 2023
e53b4b1
point at release
SupremoUGH Feb 23, 2023
83a1d3d
slow parameters loading time fixed
SupremoUGH Feb 24, 2023
175b999
functions now take references
SupremoUGH Feb 24, 2023
5af95be
fix: add test code
DanielZhangReal Feb 24, 2023
b543ef2
Save while syncing (#105)
SupremoUGH Mar 15, 2023
51d1410
Initial signer sync (#108)
SupremoUGH Mar 30, 2023
e10167b
Feature/sbt extension (#114)
DanielZhangReal Apr 7, 2023
3d3e5dd
Upgrade to v0.5.14 (#115)
SupremoUGH Apr 11, 2023
f3dbd4f
Fix/download file bug (#119)
DanielZhangReal Apr 16, 2023
b5b6817
Pruning (#118)
SupremoUGH Apr 28, 2023
1fc7bc9
Upgrade to 0.5.15 (#124)
SupremoUGH Apr 28, 2023
2dc2951
Disable pruning feature (#125)
SupremoUGH May 10, 2023
56656db
Bug/reproduce extra balance (#126)
DanielZhangReal May 11, 2023
1706946
feat: add syncProgress (#127)
DanielZhangReal May 15, 2023
63256fb
feat: add total ledger count (#128)
DanielZhangReal May 17, 2023
5e588d8
Signer bug fix (#129)
SupremoUGH May 24, 2023
0ba9349
feat: add ledger api (#131)
DanielZhangReal May 30, 2023
fc69d04
Restore pruning functionality (#133)
SupremoUGH Jun 22, 2023
d458167
fix: select utxo bug (#136)
DanielZhangReal Jun 26, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@


---

Before we can merge this PR, please make sure that all the following items have been checked off:

- [ ] Linked to an issue with discussion and accepted design OR have an explanation in the PR that describes this work.
- [ ] Added **one** line describing your change in [`CHANGELOG.md`](https://github.com/manta-network/sdk/blob/main/CHANGELOG.md) and added the appropriate `L-` label to the PR.
- [ ] Re-reviewed `Files changed` in the GitHub PR explorer.

8 changes: 8 additions & 0 deletions .github/RELEASE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
**Each reviewer needs to check that these conditions are met before approving the PR.**

- [ ] Checked that the release is on the correct branch name of the form `release-vX.Y.Z` and the PR title matches `Release vX.Y.Z`
- [ ] Added the `L-skip` label and the relevant `release` label to this PR
- [ ] Updated the [`CHANGELOG.md`](https://github.com/manta-network/sdk/blob/main/CHANGELOG.md)
- [ ] Updated the version number in the following files:
- [ ] `manta-js/package/package.json`

27 changes: 27 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
changelog:
exclude:
labels:
- L-skip
categories:
- title: Added
labels:
- L-added
- title: Changed
labels:
- L-changed
- title: Deprecated
labels:
- L-deprecated
- title: Removed
labels:
- L-removed
- title: Fixed
labels:
- L-fixed
- title: Security
labels:
- L-security
- title: Other Unsorted Updates
labels:
- "*"

18 changes: 18 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Release
on:
push:
branches:
- 'main'
jobs:
release-on-push:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: rymndhng/release-on-push-action@v0.27.0
with:
bump_version_scheme: norelease
tag_prefix: v
use_github_release_notes: true
max_commits: 128

1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
8 changes: 8 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"printWidth": 80,
"singleQuote": true,
"trailingComma": "all",
"proseWrap": "never",
"overrides": [{ "files": ".prettierrc", "options": { "parser": "json" } }],
"importOrderSeparation": true
}
9 changes: 9 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"cSpell.words": [
"transferposts",
"Utxo"
],
"rust-analyzer.linkedProjects": [
"./manta-js/package/src/wallet/crate/Cargo.toml"
]
}
37 changes: 37 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Added
- [\#133](https://github.com/Manta-Network/sdk/pull/133) Restore pruning and add UTXO consolidation && add Api `estimateTransferPostsCount` && add Api `consolidateTransferSend`
- [\#131](https://github.com/Manta-Network/sdk/pull/131) Add synced ledger count api
- [\#128](https://github.com/Manta-Network/sdk/pull/128) Add total ledger count
- [\#127](https://github.com/Manta-Network/sdk/pull/127) Add ledger sync progress
- [\#126](https://github.com/Manta-Network/sdk/pull/126) Add Reproduce extra balance example && Update SDK example && && Update extension example
- [\#119](https://github.com/Manta-Network/sdk/pull/119) Add HttpProvider && Fix private-transfer.lfs file download failure in Manta Wallet && Fix the error that the download failed on Ledger api
- [\#118](https://github.com/Manta-Network/sdk/pull/118) Add pruning function && Fix initial sync bug && Refactor walletIsBusy logic && Add get transactionDatas from posts
- [\#115](https://github.com/Manta-Network/sdk/pull/115) Add the reading and writing of JsValue related to authorization_context && Add sync SBT function, without Merkle tree && getZkAddress and toPrivate do not need load_accounts, only authorization_context is required
- [\#114](https://github.com/Manta-Network/sdk/pull/114) Refactor SDK logic && Add build SBT posts method, and getIdentityProof && Add docs and examples on how to connect Manta Wallet && Add how to use SDK docs and examples
- [\#108](https://github.com/Manta-Network/sdk/pull/108) Added initial sync method.
- [\#105](https://github.com/Manta-Network/sdk/pull/105) Save while syncing.
- [\#85](https://github.com/Manta-Network/sdk/pull/85) Key-dependent signer function APIs.
- [\#71](https://github.com/Manta-Network/sdk/pull/71) Update to dense pull ledger diff
- [\#51](https://github.com/Manta-Network/sdk/pull/51) Update to MantaPay v1

### Changed
- [\#124](https://github.com/Manta-Network/sdk/pull/124) Upgrade manta-rs dependencies to v0.5.15.
- [\#103](https://github.com/Manta-Network/sdk/pull/103) Update manta-rs to v0.5.12.
- [\#102](https://github.com/Manta-Network/sdk/pull/102) Include sink accounts in ToPublic. Removes `assetIdToUInt8Array` function as it encodes values < 255 incorrectly, now changed to use polkadot.js utility function.
- [\#88](https://github.com/Manta-Network/sdk/pull/88) Update API wording to be consistent with company-wide language.

### Deprecated
- [\#125](https://github.com/Manta-Network/sdk/pull/125) Disable pruning feature.
### Removed

### Fixed
- [\#136](https://github.com/Manta-Network/sdk/pull/136) Asset selection fix
- [\#129](https://github.com/Manta-Network/sdk/pull/129) Signer bug fix.

### Security
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The SDK includes Javascript bindings to the Wallet API.

## Javascript Wallet Bindings

- [`wallet`](wallet)
- [`wallet`](./manta-js/package/src/wallet)

The core logic of the wallet is written in Rust and built from [`manta-rs`](https://github.com/manta-network/manta-rs). To integrate it into Javascript we use the `wasm-bindgen` crate to build the WASM Foreign-Function Interface and then call the WASM functions from Javascript.

Expand Down
23 changes: 0 additions & 23 deletions manta-js/CHANGELOG.md

This file was deleted.

Loading