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

build: bump agent-js v0.20.2 #4067

Closed
wants to merge 4 commits into from
Closed

Conversation

krpeacock
Copy link

Motivation

Bump agent-js v0.20.2 without breaking changes - i.e. by disabling per default verifyQuerySignatures

PRs

Changes

Tests

Todos

  • Add entry to changelog (if necessary).

@krpeacock krpeacock changed the title Build/agent js v0 20 2 secp build: bump agent-js v0.20.2 Dec 19, 2023
@krpeacock krpeacock mentioned this pull request Dec 19, 2023
2 tasks
@krpeacock
Copy link
Author

As it turns out, two changes were required:

I also have included the following optional suggestions:

  • make use of bufEquals and concat utils from agent-js
  • add a from constructor on Secp256k1PublicKey
  • Use the Secp256k1PublicKey.from constructor instead of casting using as
  • Inject the __derEncodedPublicKey__ value for DerEncodedPublicKeys instead of relying on just the typing

@peterpeterparker
Copy link
Member

Due to the timezone difference and the fact that this PR originates from a fork, I took the liberty to open a new PR to complete the implementation based on your code. I copied your key implementation without making any further changes. I hope this makes sense.

This continues there 👉 #4068

github-merge-queue bot pushed a commit that referenced this pull request Dec 19, 2023
# Motivation

Bump agent-js v0.20.2 without breaking changes - i.e. by disabling per
default `verifyQuerySignatures`

# PR

ic-js:

- [x] dfinity/ic-js#499

This PR follow-up:

- [x] #4002
- [x] #4067

# Changes

- bump ic-js
- replace few `new HttpAgent` with `createAgent` utils and set the
remaining contructor to not use `verifyQuerySignatures`
- adapt `secp256k1.ts` as provided by @krpeacock in #4067 (see
[description](#4067 (comment)))
(except principal JSON)
- adapt `utils.stringifyJson` to parse principals in a backwards
compatible manner given that we display those in proposal rendering
- mock agent-js in two tests that were trying to use global.fetch

# Tests

<!-- Please provide any information or screenshots about the tests that
have been done -->

# Todos

- [ ] Add entry to changelog (if necessary).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants