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

Fix: fetch missing access permission #851

Merged
merged 8 commits into from
Apr 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
19 changes: 13 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,22 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
_Security_ in case of vulnerabilities.
-->

## [Unreleased](https://github.com/o1-labs/snarkyjs/compare/1a984089...HEAD)
## [Unreleased](https://github.com/o1-labs/snarkyjs/compare/97e393ed...HEAD)

> No unreleased changes yet
> No unreleased changes

## [0.9.8](https://github.com/o1-labs/snarkyjs/compare/1a984089...97e393ed)

### Fixed

- Fix fetching the `access` permission on accounts https://github.com/o1-labs/snarkyjs/pull/851
- Fix `fetchActions` https://github.com/o1-labs/snarkyjs/pull/844 https://github.com/o1-labs/snarkyjs/pull/854 [@Comdex](https://github.com/Comdex)

## [0.9.7](https://github.com/o1-labs/snarkyjs/compare/0b7a9ad...1a984089)

### Added

- `smartContract.fetchActions()` and `Mina.fetchActions()`, asynchronous methods to fetch actions directly from an archive node https://github.com/o1-labs/snarkyjs/pull/843 @Comdex
- `smartContract.fetchActions()` and `Mina.fetchActions()`, asynchronous methods to fetch actions directly from an archive node https://github.com/o1-labs/snarkyjs/pull/843 [@Comdex](https://github.com/Comdex)

### Changed

Expand All @@ -50,7 +57,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm

### Added

- `zkProgram.analyzeMethods()` to obtain metadata about a ZkProgram's methods https://github.com/o1-labs/snarkyjs/pull/829 @maht0rz
- `zkProgram.analyzeMethods()` to obtain metadata about a ZkProgram's methods https://github.com/o1-labs/snarkyjs/pull/829 [@maht0rz](https://github.com/maht0rz)

### Fixed

Expand Down Expand Up @@ -96,7 +103,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
### Fixed

- Added the missing export of `Mina.TransactionId` https://github.com/o1-labs/snarkyjs/pull/785
- Added an option to specify `tokenId` as `Field` in `fetchAccount()` https://github.com/o1-labs/snarkyjs/pull/787
- Added an option to specify `tokenId` as `Field` in `fetchAccount()` https://github.com/o1-labs/snarkyjs/pull/787 [@rpanic](https://github.com/rpanic)

## [0.9.2](https://github.com/o1-labs/snarkyjs/compare/9c44b9c2...1abdfb70)

Expand Down Expand Up @@ -318,7 +325,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm

### Fixed

- Infinite loop when compiling in web version https://github.com/o1-labs/snarkyjs/issues/379, by @maht0rz
- Infinite loop when compiling in web version https://github.com/o1-labs/snarkyjs/issues/379, by [@maht0rz](https://github.com/maht0rz)

## [0.5.2](https://github.com/o1-labs/snarkyjs/compare/55c8ea0...4f0dd40)

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "snarkyjs",
"description": "JavaScript bindings for SnarkyJS",
"version": "0.9.7",
"version": "0.9.8",
"license": "Apache-2.0",
"type": "module",
"main": "./dist/web/index.js",
Expand Down
3 changes: 2 additions & 1 deletion src/examples/fetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
shutdown,
fetchLastBlock,
PublicKey,
Types,
} from 'snarkyjs';

await isReady;
Expand All @@ -16,7 +17,7 @@ let zkappAddress = PublicKey.fromBase58(
let { account, error } = await fetchAccount({
publicKey: zkappAddress,
});
console.log('account', JSON.stringify(account, null, 2));
console.log('account', Types.Account.toJSON(account!));
console.log('error', error);

let block = await fetchLastBlock();
Expand Down
1 change: 1 addition & 0 deletions src/lib/mina/account.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ const accountQuery = (publicKey: string, tokenId: string) => `{
}
permissions {
editState
access
send
receive
setDelegate
Expand Down