solana-labs/solana-program-library

transfer hook: Add JS support for managing hook programs

Offen

#5.974 geöffnet am 10.12.2023

 (5 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Rust (2.401 Forks)auto 404
good first issuejavascript

Repository-Metriken

Stars
 (4.236 Sterne)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

Problem

Currently, we've got some of the minimally necessary "extra account metas" support within @solana/spl-token. However, the toolset isn't complete for those who wish to create and test a transfer hook program against the interface.

For example, the instructions one would use to hit their hook program and initialize or update extra account metas is not present in @solana/spl-token, nor is there support for creating ExtraAccountMeta types with packed seed configurations, etc.

Solution

I believe the best way to do this is to roll a @solana/spl-transfer-hook package and provide all of the necessary off-chain tooling from the Rust libraries.

Then, @solana/spl-token can use this package to offer it's various tooling that matches Token2022's crate.

Contributor Guide