feat(core-sdk): add "None" fallback strategy to transfer authorization queue (BPIP-12)#1033
Open
Copilot wants to merge 3 commits into
Open
feat(core-sdk): add "None" fallback strategy to transfer authorization queue (BPIP-12)#1033Copilot wants to merge 3 commits into
Copilot wants to merge 3 commits into
Conversation
|
|
…n queue Agent-Logs-Url: https://github.com/bosonprotocol/core-components/sessions/9f5b1c35-69c8-447b-8c01-2d5abcff5321 Co-authored-by: levalleux-ludo <7184124+levalleux-ludo@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add support for fallback entries in token-transfer-authorization queues
feat(core-sdk): add "None" fallback strategy to transfer authorization queue (BPIP-12)
May 26, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a "None" fallback strategy to the transfer authorization queue used by BPIP-12 commit-time meta-tx flows. This allows consumers to express empty/skip slots (encoded as "0x") directly via the SDK rather than hand-rolling queue encoding.
Changes:
- Extracts
SignableTransferAuthorizationbase type and adds{ strategy: "None" }variant toUnsignedTransferAuthorization/TransferAuthorizationdiscriminated unions encodeTransferAuthorizationEntryearly-returns"0x"for theNonestrategy- Adds unit tests for the
Noneencoding and a[None, ERC3009]round-trip
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/core-sdk/src/erc20/handler.ts | Introduces None strategy in transfer authorization types and encodeTransferAuthorizationEntry |
| packages/core-sdk/tests/erc20/handler.test.ts | Adds tests for the new None strategy encoding behavior |
| package-lock.json | Lockfile churn (removes some peer deps, marks build/test deps as dev) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
encodeTransferAuthorizationEntryandexecuteMetaTransactionWithTokenTransferAuthorizationhad no way to express empty/fallback (0x) queue slots, forcing consumers of BPIP-12 commit-time meta-tx flows (createOfferAndCommit,createOfferCommitAndRedeem) to hand-roll queue encoding outside the SDK.Changes
src/erc20/handler.tsSignableTransferAuthorizationas an internal base type for the four signable strategies{ strategy: "None" }toUnsignedTransferAuthorizationTransferAuthorizationas an explicit discriminated union —Nonerequires no signature fields; all other strategies retain{ r, s, v, signature }encodeTransferAuthorizationEntryearly-returns"0x"forstrategy: "None", matching on-chainTokenTransferAuthorizationLib.discardNextsemanticstests/erc20/handler.test.ts{ strategy: "None" }encodes to"0x"[None, ERC3009]asserting encoded output is["0x", <strategy-1 entry>]Usage