Skip to content

Kiosk SDK: resolve transfer policy by object type instead of TransferPolicyCreated event #245

Description

@begonaalvarezd

Part of #246

Context

queryTransferPolicy in sdk/kiosk/src/query/transfer-policy.ts discovers TransferPolicy objects via queryEvents({ MoveEventType: TransferPolicyCreated<T> }). After the v1.27 retention cut, policies created more than 30 days ago are no longer discoverable through events, so kiosk item transfers that depend on resolving the policy can fail.

This is consumed through @iota/kiosk KioskClient by the wallet extension and iota-names (and available to the dashboard), so it is the one true functional regression from pruning.

Per the Indexer doc, the fix is to resolve the TransferPolicy object by type instead of via the event: https://iotafoundation.atlassian.net/wiki/spaces/LSC/pages/3073572866

Tasks

  • Rewrite queryTransferPolicy to resolve the TransferPolicy<T> object by type (GraphQL / object-by-type lookup) rather than the TransferPolicyCreated<T> event. Keep the existing return shape (id, type, owner, rules, balance).
  • Confirm KioskClient.getTransferPolicies and any other queryTransferPolicy callers still behave correctly.
  • Bump @iota/kiosk, update consumers (wallet, names) to the new version.
  • E2E verify the kiosk NFT transfer flow in the wallet against a pruned environment, using a policy created before the retention window.

Verification

  • Transfer of a kiosk item whose TransferPolicy was created >30 days ago succeeds.
  • Changesets for @iota/kiosk and consuming apps.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingts-sdk

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions