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

feat(AuthWit): API for signing structured message #5075

Closed
Tracked by #2199
LHerskind opened this issue Mar 8, 2024 · 0 comments · Fixed by #5132
Closed
Tracked by #2199

feat(AuthWit): API for signing structured message #5075

LHerskind opened this issue Mar 8, 2024 · 0 comments · Fixed by #5132
Assignees

Comments

@LHerskind
Copy link
Contributor

LHerskind commented Mar 8, 2024

The createAuthWitness is currently taking in a raw buffer or Field. This makes it hard to know what is actually being signed.

Make a createRawAuthWitness that is using the single buffer or field
Make a createAuthWitness that takes a request and caller, such that a frontend can provide this to the user, and the signing is done using those values for better visibility.

@github-project-automation github-project-automation bot moved this to Todo in A3 Mar 8, 2024
@LHerskind LHerskind changed the title feat(AuthWit): Request to sign structured message feat(AuthWit): API for signing structured message Mar 8, 2024
@LHerskind LHerskind added this to the Developer Facing Aztec.nr milestone Mar 8, 2024
@LHerskind LHerskind self-assigned this Mar 11, 2024
@LHerskind LHerskind linked a pull request Mar 11, 2024 that will close this issue
LHerskind added a commit that referenced this issue Mar 18, 2024
Fixes #4821 and #5075. 

Renames the functions related to `AuthWit` to use a similar naming scheme.

Extends the `createAuthWit`, `setPublicAuthWit` and `cancelAuthWit` functions such that they can now take an object 
```typescript
{
  caller: AztecAddress;
  action: ContractFunctionInteraction | FunctionCall;
},
```

Allowing for adding a new authwit more simply.

Example:
```typescript
await user1Wallet.createAuthWit({
  caller: l2Bridge.address,
  action: l2Token.methods.burn(ownerAddress, withdrawAmount, nonce)
});
```
@github-project-automation github-project-automation bot moved this from Todo to Done in A3 Mar 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant