93 lines
2.2 KiB
Markdown
93 lines
2.2 KiB
Markdown
<!-- file: crates/ksp-program-api/README.md -->
|
|
<!-- version: 1 -->
|
|
|
|
# ksp-program-api
|
|
|
|
`ksp-program-api` est la façade publique ouverte du domaine Program KSP. Elle est destinée aux implémentations officielles futures comme aux crates Program externes et ne possède pas les implémentations concrètes.
|
|
|
|
La tranche initiale `0.2.14-pre.002` matérialise uniquement le scaffold et les types déjà possédés par les couches fondatrices. Aucun trait decoder n'est encore publié.
|
|
|
|
## Ownership
|
|
|
|
La crate dépend uniquement de :
|
|
|
|
```text
|
|
ksp-program-api
|
|
├── ksp-core-lib
|
|
└── ksp-interface-lib
|
|
└── ksp-core-lib
|
|
```
|
|
|
|
Core reste propriétaire de :
|
|
|
|
```text
|
|
Error
|
|
ErrorCode
|
|
ErrorContext
|
|
Result
|
|
Pubkey
|
|
```
|
|
|
|
Interface reste propriétaire de :
|
|
|
|
```text
|
|
ProgramAccountMeta
|
|
ProgramInstruction
|
|
```
|
|
|
|
`ksp-program-api` les réexporte depuis son crate-root pour offrir une façade de consommation stable sans dupliquer leurs types ni transférer leur ownership.
|
|
|
|
## Surface de scaffold
|
|
|
|
La façade `pre.002` expose exactement :
|
|
|
|
```text
|
|
Error
|
|
ErrorCode
|
|
ErrorContext
|
|
Result
|
|
Pubkey
|
|
ProgramAccountMeta
|
|
ProgramInstruction
|
|
```
|
|
|
|
Aucun module interne n'est public.
|
|
|
|
Les contrats suivants restent réservés aux tranches suivantes :
|
|
|
|
```text
|
|
ProgramInstructionRecognition pre.003
|
|
ProgramInstructionDecodeOutcome<T> pre.003
|
|
ProgramInstructionDecoder pre.004
|
|
```
|
|
|
|
## Frontières
|
|
|
|
La foundation ne contient pas :
|
|
|
|
```text
|
|
ksp-program-lib
|
|
registry runtime
|
|
identity/version/coverage de decoder
|
|
payload canonique D3
|
|
ProgramAccountDecoder
|
|
ProgramEventDecoder
|
|
ProgramReturnDataDecoder
|
|
ProgramExecutionPreparer
|
|
serde / serde_json
|
|
borsh / wincode / bincode
|
|
solana-instruction
|
|
network / async runtime
|
|
logging / tracing
|
|
Wallet / Transport / Store / Materializer / Config / Tauri
|
|
```
|
|
|
|
L'absence de ces surfaces est volontaire : `ksp-program-api` reste une API déclarative, ouverte et indépendante des implémentations/runtime supérieurs.
|
|
|
|
## Références
|
|
|
|
- [Usage public](USAGE.md)
|
|
- [Plan `0.2.14`](../../docs/plans/021-V0_2_14_PROGRAM_API_PLAN.md)
|
|
- [Validation `0.2.14`](../../docs/validation/017-V0_2_14_PROGRAM_API.md)
|
|
- [Architecture Wire + Program](../../docs/architecture/006-WIRE_AND_PROGRAM.md)
|