@aephia/atlas-kit 0.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +202 -0
- package/README.md +124 -0
- package/dist/bindings.d.ts +11 -0
- package/dist/bindings.d.ts.map +1 -0
- package/dist/bindings.js +11 -0
- package/dist/bindings.js.map +1 -0
- package/dist/cargo/actions/index.d.ts +122 -0
- package/dist/cargo/actions/index.d.ts.map +1 -0
- package/dist/cargo/actions/index.js +526 -0
- package/dist/cargo/actions/index.js.map +1 -0
- package/dist/cargo/index.d.ts +77 -0
- package/dist/cargo/index.d.ts.map +1 -0
- package/dist/cargo/index.js +102 -0
- package/dist/cargo/index.js.map +1 -0
- package/dist/claim-stakes/index.d.ts +64 -0
- package/dist/claim-stakes/index.d.ts.map +1 -0
- package/dist/claim-stakes/index.js +97 -0
- package/dist/claim-stakes/index.js.map +1 -0
- package/dist/client/context.d.ts +21 -0
- package/dist/client/context.d.ts.map +1 -0
- package/dist/client/context.js +1374 -0
- package/dist/client/context.js.map +1 -0
- package/dist/client/contracts.d.ts +671 -0
- package/dist/client/contracts.d.ts.map +1 -0
- package/dist/client/contracts.js +2 -0
- package/dist/client/contracts.js.map +1 -0
- package/dist/client/deployments.d.ts +3 -0
- package/dist/client/deployments.d.ts.map +1 -0
- package/dist/client/deployments.js +2 -0
- package/dist/client/deployments.js.map +1 -0
- package/dist/client/errors.d.ts +227 -0
- package/dist/client/errors.d.ts.map +1 -0
- package/dist/client/errors.js +288 -0
- package/dist/client/errors.js.map +1 -0
- package/dist/client/index.d.ts +7 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +5 -0
- package/dist/client/index.js.map +1 -0
- package/dist/client/lifecycle.d.ts +4 -0
- package/dist/client/lifecycle.d.ts.map +1 -0
- package/dist/client/lifecycle.js +10 -0
- package/dist/client/lifecycle.js.map +1 -0
- package/dist/client/provider-errors.d.ts +9 -0
- package/dist/client/provider-errors.d.ts.map +1 -0
- package/dist/client/provider-errors.js +12 -0
- package/dist/client/provider-errors.js.map +1 -0
- package/dist/client/reconciliation.d.ts +10 -0
- package/dist/client/reconciliation.d.ts.map +1 -0
- package/dist/client/reconciliation.js +9 -0
- package/dist/client/reconciliation.js.map +1 -0
- package/dist/client/refs.d.ts +23 -0
- package/dist/client/refs.d.ts.map +1 -0
- package/dist/client/refs.js +12 -0
- package/dist/client/refs.js.map +1 -0
- package/dist/combat/index.d.ts +256 -0
- package/dist/combat/index.d.ts.map +1 -0
- package/dist/combat/index.js +222 -0
- package/dist/combat/index.js.map +1 -0
- package/dist/crafting/index.d.ts +308 -0
- package/dist/crafting/index.d.ts.map +1 -0
- package/dist/crafting/index.js +400 -0
- package/dist/crafting/index.js.map +1 -0
- package/dist/factions/index.d.ts +292 -0
- package/dist/factions/index.d.ts.map +1 -0
- package/dist/factions/index.js +334 -0
- package/dist/factions/index.js.map +1 -0
- package/dist/fleets/actions/index.d.ts +200 -0
- package/dist/fleets/actions/index.d.ts.map +1 -0
- package/dist/fleets/actions/index.js +854 -0
- package/dist/fleets/actions/index.js.map +1 -0
- package/dist/fleets/index.d.ts +100 -0
- package/dist/fleets/index.d.ts.map +1 -0
- package/dist/fleets/index.js +124 -0
- package/dist/fleets/index.js.map +1 -0
- package/dist/identity/index.d.ts +225 -0
- package/dist/identity/index.d.ts.map +1 -0
- package/dist/identity/index.js +341 -0
- package/dist/identity/index.js.map +1 -0
- package/dist/index.d.ts +401 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +519 -0
- package/dist/index.js.map +1 -0
- package/dist/internal/c4/adapter.d.ts +6 -0
- package/dist/internal/c4/adapter.d.ts.map +1 -0
- package/dist/internal/c4/adapter.js +2 -0
- package/dist/internal/c4/adapter.js.map +1 -0
- package/dist/internal/c4/bindings.d.ts +4 -0
- package/dist/internal/c4/bindings.d.ts.map +1 -0
- package/dist/internal/c4/bindings.js +4 -0
- package/dist/internal/c4/bindings.js.map +1 -0
- package/dist/internal/c4/character-modifier.d.ts +5 -0
- package/dist/internal/c4/character-modifier.d.ts.map +1 -0
- package/dist/internal/c4/character-modifier.js +100 -0
- package/dist/internal/c4/character-modifier.js.map +1 -0
- package/dist/internal/c4/claim-stake.d.ts +140 -0
- package/dist/internal/c4/claim-stake.d.ts.map +1 -0
- package/dist/internal/c4/claim-stake.js +205 -0
- package/dist/internal/c4/claim-stake.js.map +1 -0
- package/dist/internal/c4/combat.d.ts +98 -0
- package/dist/internal/c4/combat.d.ts.map +1 -0
- package/dist/internal/c4/combat.js +232 -0
- package/dist/internal/c4/combat.js.map +1 -0
- package/dist/internal/c4/crafting.d.ts +170 -0
- package/dist/internal/c4/crafting.d.ts.map +1 -0
- package/dist/internal/c4/crafting.js +387 -0
- package/dist/internal/c4/crafting.js.map +1 -0
- package/dist/internal/c4/factions.d.ts +248 -0
- package/dist/internal/c4/factions.d.ts.map +1 -0
- package/dist/internal/c4/factions.js +589 -0
- package/dist/internal/c4/factions.js.map +1 -0
- package/dist/internal/c4/fleet-crew-binding.d.ts +12 -0
- package/dist/internal/c4/fleet-crew-binding.d.ts.map +1 -0
- package/dist/internal/c4/fleet-crew-binding.js +51 -0
- package/dist/internal/c4/fleet-crew-binding.js.map +1 -0
- package/dist/internal/c4/fleet.d.ts +310 -0
- package/dist/internal/c4/fleet.d.ts.map +1 -0
- package/dist/internal/c4/fleet.js +393 -0
- package/dist/internal/c4/fleet.js.map +1 -0
- package/dist/internal/c4/game.d.ts +192 -0
- package/dist/internal/c4/game.d.ts.map +1 -0
- package/dist/internal/c4/game.js +396 -0
- package/dist/internal/c4/game.js.map +1 -0
- package/dist/internal/c4/identity.d.ts +193 -0
- package/dist/internal/c4/identity.d.ts.map +1 -0
- package/dist/internal/c4/identity.js +180 -0
- package/dist/internal/c4/identity.js.map +1 -0
- package/dist/internal/c4/loot-layout.d.ts +20 -0
- package/dist/internal/c4/loot-layout.d.ts.map +1 -0
- package/dist/internal/c4/loot-layout.js +29 -0
- package/dist/internal/c4/loot-layout.js.map +1 -0
- package/dist/internal/c4/loyalty.d.ts +102 -0
- package/dist/internal/c4/loyalty.d.ts.map +1 -0
- package/dist/internal/c4/loyalty.js +318 -0
- package/dist/internal/c4/loyalty.js.map +1 -0
- package/dist/internal/c4/market.d.ts +112 -0
- package/dist/internal/c4/market.d.ts.map +1 -0
- package/dist/internal/c4/market.js +247 -0
- package/dist/internal/c4/market.js.map +1 -0
- package/dist/internal/c4/pda.d.ts +6 -0
- package/dist/internal/c4/pda.d.ts.map +1 -0
- package/dist/internal/c4/pda.js +45 -0
- package/dist/internal/c4/pda.js.map +1 -0
- package/dist/internal/c4/profile-faction.d.ts +14 -0
- package/dist/internal/c4/profile-faction.d.ts.map +1 -0
- package/dist/internal/c4/profile-faction.js +69 -0
- package/dist/internal/c4/profile-faction.js.map +1 -0
- package/dist/internal/c4/rewards.d.ts +135 -0
- package/dist/internal/c4/rewards.d.ts.map +1 -0
- package/dist/internal/c4/rewards.js +305 -0
- package/dist/internal/c4/rewards.js.map +1 -0
- package/dist/internal/c4/scanning.d.ts +85 -0
- package/dist/internal/c4/scanning.d.ts.map +1 -0
- package/dist/internal/c4/scanning.js +180 -0
- package/dist/internal/c4/scanning.js.map +1 -0
- package/dist/internal/c4/starbase.d.ts +186 -0
- package/dist/internal/c4/starbase.d.ts.map +1 -0
- package/dist/internal/c4/starbase.js +259 -0
- package/dist/internal/c4/starbase.js.map +1 -0
- package/dist/internal/c4/world.d.ts +294 -0
- package/dist/internal/c4/world.d.ts.map +1 -0
- package/dist/internal/c4/world.js +417 -0
- package/dist/internal/c4/world.js.map +1 -0
- package/dist/internal/cargo.d.ts +65 -0
- package/dist/internal/cargo.d.ts.map +1 -0
- package/dist/internal/cargo.js +46 -0
- package/dist/internal/cargo.js.map +1 -0
- package/dist/internal/claim-stake.d.ts +31 -0
- package/dist/internal/claim-stake.d.ts.map +1 -0
- package/dist/internal/claim-stake.js +20 -0
- package/dist/internal/claim-stake.js.map +1 -0
- package/dist/internal/fleet.d.ts +165 -0
- package/dist/internal/fleet.d.ts.map +1 -0
- package/dist/internal/fleet.js +179 -0
- package/dist/internal/fleet.js.map +1 -0
- package/dist/internal/game-context.d.ts +4 -0
- package/dist/internal/game-context.d.ts.map +1 -0
- package/dist/internal/game-context.js +9 -0
- package/dist/internal/game-context.js.map +1 -0
- package/dist/internal/immutable-tree.d.ts +5 -0
- package/dist/internal/immutable-tree.d.ts.map +1 -0
- package/dist/internal/immutable-tree.js +47 -0
- package/dist/internal/immutable-tree.js.map +1 -0
- package/dist/internal/json.d.ts +7 -0
- package/dist/internal/json.d.ts.map +1 -0
- package/dist/internal/json.js +33 -0
- package/dist/internal/json.js.map +1 -0
- package/dist/internal/planning/authorization-adapter.d.ts +63 -0
- package/dist/internal/planning/authorization-adapter.d.ts.map +1 -0
- package/dist/internal/planning/authorization-adapter.js +222 -0
- package/dist/internal/planning/authorization-adapter.js.map +1 -0
- package/dist/internal/read-meta.d.ts +84 -0
- package/dist/internal/read-meta.d.ts.map +1 -0
- package/dist/internal/read-meta.js +28 -0
- package/dist/internal/read-meta.js.map +1 -0
- package/dist/internal/resolved-snapshot.d.ts +3 -0
- package/dist/internal/resolved-snapshot.d.ts.map +1 -0
- package/dist/internal/resolved-snapshot.js +11 -0
- package/dist/internal/resolved-snapshot.js.map +1 -0
- package/dist/internal/zink/provider.d.ts +9 -0
- package/dist/internal/zink/provider.d.ts.map +1 -0
- package/dist/internal/zink/provider.js +213 -0
- package/dist/internal/zink/provider.js.map +1 -0
- package/dist/loyalty/index.d.ts +195 -0
- package/dist/loyalty/index.d.ts.map +1 -0
- package/dist/loyalty/index.js +289 -0
- package/dist/loyalty/index.js.map +1 -0
- package/dist/markets/index.d.ts +195 -0
- package/dist/markets/index.d.ts.map +1 -0
- package/dist/markets/index.js +232 -0
- package/dist/markets/index.js.map +1 -0
- package/dist/mining/index.d.ts +156 -0
- package/dist/mining/index.d.ts.map +1 -0
- package/dist/mining/index.js +236 -0
- package/dist/mining/index.js.map +1 -0
- package/dist/planning/assembly.d.ts +42 -0
- package/dist/planning/assembly.d.ts.map +1 -0
- package/dist/planning/assembly.js +141 -0
- package/dist/planning/assembly.js.map +1 -0
- package/dist/planning/composition.d.ts +4 -0
- package/dist/planning/composition.d.ts.map +1 -0
- package/dist/planning/composition.js +76 -0
- package/dist/planning/composition.js.map +1 -0
- package/dist/planning/execution.d.ts +93 -0
- package/dist/planning/execution.d.ts.map +1 -0
- package/dist/planning/execution.js +549 -0
- package/dist/planning/execution.js.map +1 -0
- package/dist/planning/index.d.ts +219 -0
- package/dist/planning/index.d.ts.map +1 -0
- package/dist/planning/index.js +375 -0
- package/dist/planning/index.js.map +1 -0
- package/dist/planning/plan-instances.d.ts +3 -0
- package/dist/planning/plan-instances.d.ts.map +1 -0
- package/dist/planning/plan-instances.js +8 -0
- package/dist/planning/plan-instances.js.map +1 -0
- package/dist/planning/plan-sequence-checkpoint.d.ts +154 -0
- package/dist/planning/plan-sequence-checkpoint.d.ts.map +1 -0
- package/dist/planning/plan-sequence-checkpoint.js +449 -0
- package/dist/planning/plan-sequence-checkpoint.js.map +1 -0
- package/dist/planning/plan-sequence-execution.d.ts +72 -0
- package/dist/planning/plan-sequence-execution.d.ts.map +1 -0
- package/dist/planning/plan-sequence-execution.js +410 -0
- package/dist/planning/plan-sequence-execution.js.map +1 -0
- package/dist/planning/plan-sequence.d.ts +244 -0
- package/dist/planning/plan-sequence.d.ts.map +1 -0
- package/dist/planning/plan-sequence.js +264 -0
- package/dist/planning/plan-sequence.js.map +1 -0
- package/dist/planning/simulation.d.ts +50 -0
- package/dist/planning/simulation.d.ts.map +1 -0
- package/dist/planning/simulation.js +69 -0
- package/dist/planning/simulation.js.map +1 -0
- package/dist/registry/combat.d.ts +5 -0
- package/dist/registry/combat.d.ts.map +1 -0
- package/dist/registry/combat.js +7 -0
- package/dist/registry/combat.js.map +1 -0
- package/dist/registry/index.d.ts +138 -0
- package/dist/registry/index.d.ts.map +1 -0
- package/dist/registry/index.js +397 -0
- package/dist/registry/index.js.map +1 -0
- package/dist/rewards/index.d.ts +202 -0
- package/dist/rewards/index.d.ts.map +1 -0
- package/dist/rewards/index.js +290 -0
- package/dist/rewards/index.js.map +1 -0
- package/dist/scanning/index.d.ts +185 -0
- package/dist/scanning/index.d.ts.map +1 -0
- package/dist/scanning/index.js +207 -0
- package/dist/scanning/index.js.map +1 -0
- package/dist/starbases/actions/index.d.ts +60 -0
- package/dist/starbases/actions/index.d.ts.map +1 -0
- package/dist/starbases/actions/index.js +245 -0
- package/dist/starbases/actions/index.js.map +1 -0
- package/dist/starbases/index.d.ts +165 -0
- package/dist/starbases/index.d.ts.map +1 -0
- package/dist/starbases/index.js +213 -0
- package/dist/starbases/index.js.map +1 -0
- package/dist/world/index.d.ts +180 -0
- package/dist/world/index.d.ts.map +1 -0
- package/dist/world/index.js +265 -0
- package/dist/world/index.js.map +1 -0
- package/package.json +140 -0
|
@@ -0,0 +1,671 @@
|
|
|
1
|
+
import type { Address as KitAddress, Commitment as KitCommitment, GetAccountInfoApi, GetBlockHeightApi, GetLatestBlockhashApi, GetMultipleAccountsApi, GetProgramAccountsApi, GetSignatureStatusesApi, Rpc, SendTransactionApi, SimulateTransactionApi } from '@solana/kit';
|
|
2
|
+
import type { RegistrySnapshotStore } from '../registry/index.js';
|
|
3
|
+
import type { SageSdkError } from './errors.js';
|
|
4
|
+
/** A z.ink/Solana account address represented by `@solana/kit`.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```ts
|
|
8
|
+
* declare const profileAddress: Address;
|
|
9
|
+
* ```
|
|
10
|
+
*/
|
|
11
|
+
export type Address = KitAddress;
|
|
12
|
+
/** A z.ink/Solana RPC commitment level.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* const commitment: Commitment = 'confirmed';
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export type Commitment = KitCommitment;
|
|
20
|
+
/** The minimal Kit RPC surface used by the read-only z.ink provider.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* declare const rpc: SageRpc;
|
|
25
|
+
* const ctx = createSageContext({ cluster: 'zink-ptr', rpc });
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export type SageRpc = Rpc<GetAccountInfoApi & GetMultipleAccountsApi & GetProgramAccountsApi>;
|
|
29
|
+
/** The minimal Kit RPC surface used for explicit write-side operations.
|
|
30
|
+
*
|
|
31
|
+
* Context creation only retains this transport; it never invokes it. Assembly
|
|
32
|
+
* uses it for blockhash lifetime, signer-free simulation, submission, and
|
|
33
|
+
* confirmation during explicit Plan operations.
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```ts
|
|
37
|
+
* declare const rpc: SageRpc;
|
|
38
|
+
* declare const writeRpc: SageWriteRpc;
|
|
39
|
+
* const ctx = createSageContext({ cluster: 'zink-ptr', rpc, writeRpc });
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
export type SageWriteRpc = Rpc<GetBlockHeightApi & GetLatestBlockhashApi & SimulateTransactionApi & SendTransactionApi & GetSignatureStatusesApi>;
|
|
43
|
+
/** Stable account and gameplay entity identifiers used by cache keys and references.
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```ts
|
|
47
|
+
* const type: EntityType = 'fleet';
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
export type EntityType = 'game' | 'profile' | 'profileFaction' | 'character' | 'fleet' | 'fleetCrewBinding' | 'starSystem' | 'celestialBody' | 'starbasePlayer' | 'starbaseUpgradeProcess' | 'cargoPod' | 'claimStakeInstance' | 'recipe' | 'craftingHabInstance' | 'craftingProcess' | 'market' | 'marketOrder' | 'scanPattern' | 'loot' | 'outlawFlag' | 'atlasRewardRegistry' | 'atlasRewardConfig' | 'atlasRewardTreasury' | 'faction' | 'factionConfig' | 'factionEconomicsConfig' | 'factionRelationTracker' | 'factionStanding' | 'factionTreasury' | 'factionOwnership' | 'kingSystemTracker' | 'regionTracker' | 'loyaltyEpoch' | 'loyaltyContribution' | 'loyaltyAtlasBank';
|
|
51
|
+
/** A known deployment preset supported by the installed SDK version.
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* ```ts
|
|
55
|
+
* const cluster: KnownCluster = 'zink-ptr';
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
58
|
+
export type KnownCluster = 'zink-ptr';
|
|
59
|
+
/** An application-defined cluster identity.
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* ```ts
|
|
63
|
+
* const cluster: CustomClusterIdentity = { name: 'local-fixture' };
|
|
64
|
+
* ```
|
|
65
|
+
*/
|
|
66
|
+
export interface CustomClusterIdentity {
|
|
67
|
+
readonly name: string;
|
|
68
|
+
}
|
|
69
|
+
/** Identity used to isolate context-owned caches and providers.
|
|
70
|
+
*
|
|
71
|
+
* @example
|
|
72
|
+
* ```ts
|
|
73
|
+
* const cluster: ClusterIdentity = { name: 'local-fixture' };
|
|
74
|
+
* ```
|
|
75
|
+
*/
|
|
76
|
+
export type ClusterIdentity = KnownCluster | CustomClusterIdentity;
|
|
77
|
+
/** The source that supplied a raw account or translated snapshot.
|
|
78
|
+
*
|
|
79
|
+
* @example
|
|
80
|
+
* ```ts
|
|
81
|
+
* const source: DataSourceIdentity = { kind: 'fixture', name: 'unit-test' };
|
|
82
|
+
* ```
|
|
83
|
+
*/
|
|
84
|
+
export interface DataSourceIdentity {
|
|
85
|
+
readonly kind: 'rpc' | 'websocket' | 'indexer' | 'fixture' | 'application';
|
|
86
|
+
readonly name: string;
|
|
87
|
+
}
|
|
88
|
+
/** Raw, untrusted account bytes returned by a provider.
|
|
89
|
+
*
|
|
90
|
+
* @example
|
|
91
|
+
* ```ts
|
|
92
|
+
* declare const rawAccount: RawAccount;
|
|
93
|
+
* const bytes = rawAccount.data;
|
|
94
|
+
* ```
|
|
95
|
+
*/
|
|
96
|
+
export interface RawAccount {
|
|
97
|
+
readonly address: Address;
|
|
98
|
+
readonly owner: Address;
|
|
99
|
+
readonly lamports: bigint;
|
|
100
|
+
readonly data: Uint8Array;
|
|
101
|
+
readonly executable: boolean;
|
|
102
|
+
readonly slot: bigint;
|
|
103
|
+
readonly commitment: Commitment;
|
|
104
|
+
}
|
|
105
|
+
/** Options shared by direct and batched raw-account reads.
|
|
106
|
+
*
|
|
107
|
+
* @example
|
|
108
|
+
* ```ts
|
|
109
|
+
* const options: ReadAccountOptions = { commitment: 'confirmed' };
|
|
110
|
+
* ```
|
|
111
|
+
*/
|
|
112
|
+
export interface ReadAccountOptions {
|
|
113
|
+
readonly commitment?: Commitment;
|
|
114
|
+
readonly signal?: AbortSignal;
|
|
115
|
+
}
|
|
116
|
+
/** A verified byte comparison used for targeted program-account discovery.
|
|
117
|
+
*
|
|
118
|
+
* @example
|
|
119
|
+
* ```ts
|
|
120
|
+
* const filter: ProgramAccountFilter = { offset: 0, bytes: new Uint8Array([1]) };
|
|
121
|
+
* ```
|
|
122
|
+
*/
|
|
123
|
+
export interface ProgramAccountFilter {
|
|
124
|
+
readonly offset: number;
|
|
125
|
+
readonly bytes: Uint8Array;
|
|
126
|
+
}
|
|
127
|
+
/** A targeted program-account request using only adapter-verified offsets.
|
|
128
|
+
*
|
|
129
|
+
* @example
|
|
130
|
+
* ```ts
|
|
131
|
+
* declare const programAddress: Address;
|
|
132
|
+
* const request: ProgramAccountRequest = { programAddress, filters: [] };
|
|
133
|
+
* ```
|
|
134
|
+
*/
|
|
135
|
+
export interface ProgramAccountRequest extends ReadAccountOptions {
|
|
136
|
+
readonly programAddress: Address;
|
|
137
|
+
readonly filters: readonly ProgramAccountFilter[];
|
|
138
|
+
}
|
|
139
|
+
/** Address-only discovery request accepted by a replaceable indexer.
|
|
140
|
+
*
|
|
141
|
+
* Indexers return candidate addresses, never decoded domain state. The context
|
|
142
|
+
* validates every candidate through its direct account provider before a
|
|
143
|
+
* finder can expose it.
|
|
144
|
+
*
|
|
145
|
+
* @example
|
|
146
|
+
* ```ts
|
|
147
|
+
* declare const programAddress: Address;
|
|
148
|
+
* const request: IndexerDiscoveryRequest = {
|
|
149
|
+
* accountType: 'fleet',
|
|
150
|
+
* programAddress,
|
|
151
|
+
* filters: [],
|
|
152
|
+
* };
|
|
153
|
+
* ```
|
|
154
|
+
*/
|
|
155
|
+
export interface IndexerDiscoveryRequest extends ProgramAccountRequest {
|
|
156
|
+
readonly accountType: EntityType;
|
|
157
|
+
}
|
|
158
|
+
/** Optional address-only provider for reverse and high-cardinality discovery.
|
|
159
|
+
*
|
|
160
|
+
* Implementations must treat `signal` as cancellation, preserve candidate
|
|
161
|
+
* order, and sanitize transport failures before throwing a `SageSdkError`.
|
|
162
|
+
* Duplicate addresses are allowed; the context deduplicates them before direct
|
|
163
|
+
* validation. A configured provider must support every account type and stable
|
|
164
|
+
* filter request that its context may issue. An empty result means the request
|
|
165
|
+
* is supported and has no candidates; it does not trigger RPC fallback. Use a
|
|
166
|
+
* separate context or the `direct`/`derived` strategies when indexer coverage is
|
|
167
|
+
* intentionally partial.
|
|
168
|
+
*
|
|
169
|
+
* @example
|
|
170
|
+
* ```ts
|
|
171
|
+
* const indexer: IndexerProvider = {
|
|
172
|
+
* identity: { kind: 'indexer', name: 'application-indexer' },
|
|
173
|
+
* discoverAddresses: async () => [],
|
|
174
|
+
* };
|
|
175
|
+
* ```
|
|
176
|
+
*/
|
|
177
|
+
export interface IndexerProvider {
|
|
178
|
+
readonly identity: DataSourceIdentity & {
|
|
179
|
+
readonly kind: 'indexer';
|
|
180
|
+
};
|
|
181
|
+
discoverAddresses(request: IndexerDiscoveryRequest): Promise<readonly Address[]>;
|
|
182
|
+
}
|
|
183
|
+
/** Address-only request accepted by a wallet-to-Profile discovery provider.
|
|
184
|
+
*
|
|
185
|
+
* The provider returns hints only. The identity domain directly reads every
|
|
186
|
+
* candidate Profile and verifies that its decoded key list contains the
|
|
187
|
+
* requested wallet before exposing it.
|
|
188
|
+
*
|
|
189
|
+
* @example
|
|
190
|
+
* ```ts
|
|
191
|
+
* declare const wallet: Address;
|
|
192
|
+
* const request: WalletProfileDiscoveryRequest = { wallet };
|
|
193
|
+
* ```
|
|
194
|
+
*/
|
|
195
|
+
export interface WalletProfileDiscoveryRequest extends ReadAccountOptions {
|
|
196
|
+
readonly wallet: Address;
|
|
197
|
+
}
|
|
198
|
+
/** Replaceable address-only provider for wallet-to-Profile discovery.
|
|
199
|
+
*
|
|
200
|
+
* Implementations may use an application index, service, or recorded mapping,
|
|
201
|
+
* but their output is never authoritative. They return Profile addresses only;
|
|
202
|
+
* the SDK validates account ownership, discriminator, shape, and the stored
|
|
203
|
+
* wallet-key relationship through its direct account provider. Duplicate and
|
|
204
|
+
* stale addresses are permitted and reported through finder metadata.
|
|
205
|
+
* Concurrent requests for the same wallet and commitment are single-flighted
|
|
206
|
+
* per context; cancelling one caller does not cancel the shared provider call.
|
|
207
|
+
* Shared operations are in-flight only: a settled failure is removed so a
|
|
208
|
+
* later request can retry the provider.
|
|
209
|
+
* Implementations must sanitize transport-specific causes before throwing a
|
|
210
|
+
* typed `SageSdkError`; unknown exceptions are normalized without their cause.
|
|
211
|
+
*
|
|
212
|
+
* @example
|
|
213
|
+
* ```ts
|
|
214
|
+
* const walletProfiles: WalletProfileDiscoveryProvider = {
|
|
215
|
+
* identity: { kind: 'indexer', name: 'application-wallet-index' },
|
|
216
|
+
* discoverProfileAddresses: async () => [],
|
|
217
|
+
* };
|
|
218
|
+
* ```
|
|
219
|
+
*/
|
|
220
|
+
export interface WalletProfileDiscoveryProvider {
|
|
221
|
+
readonly identity: DataSourceIdentity;
|
|
222
|
+
discoverProfileAddresses(request: WalletProfileDiscoveryRequest): Promise<readonly Address[]>;
|
|
223
|
+
}
|
|
224
|
+
/** Provider contract for raw z.ink account access.
|
|
225
|
+
*
|
|
226
|
+
* Provider results remain untrusted until an account definition validates and
|
|
227
|
+
* decodes them. Provider implementations must sanitize transport-specific
|
|
228
|
+
* causes before wrapping them in a typed `SageSdkError`; unknown exceptions are
|
|
229
|
+
* normalized by the data plane without retaining their raw cause.
|
|
230
|
+
*
|
|
231
|
+
* @example
|
|
232
|
+
* ```ts
|
|
233
|
+
* const provider: AccountProvider = {
|
|
234
|
+
* identity: { kind: 'fixture', name: 'unit-test' },
|
|
235
|
+
* readAccount: async () => undefined,
|
|
236
|
+
* discoverAccounts: async () => [],
|
|
237
|
+
* };
|
|
238
|
+
* ```
|
|
239
|
+
*/
|
|
240
|
+
export interface AccountProvider {
|
|
241
|
+
readonly identity: DataSourceIdentity;
|
|
242
|
+
readAccount(address: Address, options?: ReadAccountOptions): Promise<RawAccount | undefined>;
|
|
243
|
+
/** Optional provider batching capability.
|
|
244
|
+
*
|
|
245
|
+
* Implementations preserve input order. Callers can fall back to ordered
|
|
246
|
+
* `readAccount` calls when a provider does not expose this transport method.
|
|
247
|
+
* Large reads can span multiple source slots because every RPC chunk records
|
|
248
|
+
* its own response context.
|
|
249
|
+
*/
|
|
250
|
+
readAccounts?(addresses: readonly Address[], options?: ReadAccountOptions): Promise<readonly (RawAccount | undefined)[]>;
|
|
251
|
+
discoverAccounts(request: ProgramAccountRequest): Promise<readonly RawAccount[]>;
|
|
252
|
+
}
|
|
253
|
+
/** A context-owned raw-account subscription request.
|
|
254
|
+
*
|
|
255
|
+
* @example
|
|
256
|
+
* ```ts
|
|
257
|
+
* declare const address: Address;
|
|
258
|
+
* const request: AccountSubscriptionRequest = { address, commitment: 'confirmed' };
|
|
259
|
+
* ```
|
|
260
|
+
*/
|
|
261
|
+
export interface AccountSubscriptionRequest extends ReadAccountOptions {
|
|
262
|
+
readonly address: Address;
|
|
263
|
+
}
|
|
264
|
+
/** A raw account update or a transport reconnection boundary.
|
|
265
|
+
*
|
|
266
|
+
* Providers emit `reconnected` before post-reconnect account events so the
|
|
267
|
+
* context can close the missed-update gap through its direct provider.
|
|
268
|
+
*
|
|
269
|
+
* @example
|
|
270
|
+
* ```ts
|
|
271
|
+
* declare const account: RawAccount;
|
|
272
|
+
* const event: AccountSubscriptionEvent = { kind: 'account', account };
|
|
273
|
+
* ```
|
|
274
|
+
*/
|
|
275
|
+
export type AccountSubscriptionEvent = {
|
|
276
|
+
readonly kind: 'account';
|
|
277
|
+
readonly account: RawAccount;
|
|
278
|
+
} | {
|
|
279
|
+
readonly kind: 'reconnected';
|
|
280
|
+
};
|
|
281
|
+
/** Provider-owned handle for one raw WebSocket registration.
|
|
282
|
+
*
|
|
283
|
+
* @example
|
|
284
|
+
* ```ts
|
|
285
|
+
* declare const registration: AccountSubscriptionRegistration;
|
|
286
|
+
* await registration.unsubscribe();
|
|
287
|
+
* ```
|
|
288
|
+
*/
|
|
289
|
+
export interface AccountSubscriptionRegistration {
|
|
290
|
+
unsubscribe(): Promise<void>;
|
|
291
|
+
}
|
|
292
|
+
/** Replaceable WebSocket provider used by a `SageContext`.
|
|
293
|
+
*
|
|
294
|
+
* The provider owns transport reconnection and emits a `reconnected` event
|
|
295
|
+
* after each successful re-registration. The context owns validation, cache
|
|
296
|
+
* updates, consumer notification, cancellation, and final disposal. Providers
|
|
297
|
+
* must apply bounded exponential backoff with jitter between reconnect attempts
|
|
298
|
+
* and must not emit `reconnected` for a failed attempt.
|
|
299
|
+
*
|
|
300
|
+
* @example
|
|
301
|
+
* ```ts
|
|
302
|
+
* const subscriptions: AccountSubscriptionProvider = {
|
|
303
|
+
* identity: { kind: 'websocket', name: 'zink-ptr' },
|
|
304
|
+
* subscribeAccount: async () => ({ unsubscribe: async () => undefined }),
|
|
305
|
+
* };
|
|
306
|
+
* ```
|
|
307
|
+
*/
|
|
308
|
+
export interface AccountSubscriptionProvider {
|
|
309
|
+
readonly identity: DataSourceIdentity;
|
|
310
|
+
subscribeAccount(request: AccountSubscriptionRequest, listener: (event: AccountSubscriptionEvent) => void): Promise<AccountSubscriptionRegistration>;
|
|
311
|
+
}
|
|
312
|
+
/** Adapter-owned definition for validating and decoding one account type.
|
|
313
|
+
*
|
|
314
|
+
* Decoded snapshots may contain primitives, arrays, and plain objects. Account
|
|
315
|
+
* definitions must normalize mutation-capable built-ins such as typed arrays,
|
|
316
|
+
* `Date`, `Map`, and `Set` to immutable domain values before returning them.
|
|
317
|
+
* The returned value must be an acyclic JSON-safe tree without `undefined`,
|
|
318
|
+
* symbol-keyed properties, accessors, or functions. Acyclic repeated object
|
|
319
|
+
* references are allowed and retain their identity in the frozen runtime tree.
|
|
320
|
+
* Each decoder receives an isolated copy of the untrusted provider account, so
|
|
321
|
+
* decoder mutation cannot affect another concurrent decoder or raw read.
|
|
322
|
+
* Decoders return plain data without methods. Public domain layers attach their
|
|
323
|
+
* required `toJSON()` method after reading through this port; returning a
|
|
324
|
+
* method from `decode` violates the immutable plain-data contract.
|
|
325
|
+
* A context reuses decoded cache entries only for the same definition object;
|
|
326
|
+
* distinct definitions cannot consume or overwrite each other's typed data.
|
|
327
|
+
* Keep definitions as stable module-level singletons. Reconstructing an
|
|
328
|
+
* equivalent definition for each call deliberately creates independent cache
|
|
329
|
+
* slots and prevents cache reuse.
|
|
330
|
+
*
|
|
331
|
+
* @example
|
|
332
|
+
* ```ts
|
|
333
|
+
* declare const programAddress: Address;
|
|
334
|
+
* const definition: AccountDefinition<{ name: string }> = {
|
|
335
|
+
* type: 'fleet',
|
|
336
|
+
* programAddress,
|
|
337
|
+
* discriminator: new Uint8Array([1]),
|
|
338
|
+
* minimumDataLength: 128,
|
|
339
|
+
* decode: () => ({ name: 'Ravager' }),
|
|
340
|
+
* };
|
|
341
|
+
* ```
|
|
342
|
+
*/
|
|
343
|
+
export interface AccountDefinition<TSnapshot> {
|
|
344
|
+
readonly type: EntityType;
|
|
345
|
+
readonly programAddress: Address;
|
|
346
|
+
readonly discriminator: Uint8Array | readonly number[];
|
|
347
|
+
/** Optional positive safe-integer byte minimum enforced before decoding. */
|
|
348
|
+
readonly minimumDataLength?: number;
|
|
349
|
+
decode(account: RawAccount): Readonly<TSnapshot>;
|
|
350
|
+
}
|
|
351
|
+
/** A fully described immutable account snapshot plus its read provenance.
|
|
352
|
+
*
|
|
353
|
+
* @example
|
|
354
|
+
* ```ts
|
|
355
|
+
* declare const envelope: SnapshotEnvelope<unknown>;
|
|
356
|
+
* const slot = envelope.slot;
|
|
357
|
+
* const snapshot = envelope.data;
|
|
358
|
+
* ```
|
|
359
|
+
*/
|
|
360
|
+
export interface SnapshotEnvelope<TSnapshot> {
|
|
361
|
+
readonly data: Readonly<TSnapshot>;
|
|
362
|
+
readonly address: Address;
|
|
363
|
+
readonly programAddress: Address;
|
|
364
|
+
readonly accountType: EntityType;
|
|
365
|
+
readonly slot: bigint;
|
|
366
|
+
readonly commitment: Commitment;
|
|
367
|
+
readonly fetchedAt: number;
|
|
368
|
+
readonly source: DataSourceIdentity;
|
|
369
|
+
/** Returns a JSON-safe copy with every bigint represented as a decimal string. */
|
|
370
|
+
toJSON(): unknown;
|
|
371
|
+
}
|
|
372
|
+
/** Cache-first read controls for account and finder operations.
|
|
373
|
+
*
|
|
374
|
+
* @example
|
|
375
|
+
* ```ts
|
|
376
|
+
* const options: ReadOptions = { refresh: true, commitment: 'confirmed' };
|
|
377
|
+
* ```
|
|
378
|
+
*/
|
|
379
|
+
export interface ReadOptions extends ReadAccountOptions {
|
|
380
|
+
/** Bypasses a completed cache entry.
|
|
381
|
+
*
|
|
382
|
+
* A refresh may share a compatible provider request that is already in
|
|
383
|
+
* flight, because that request has not yet produced cached state.
|
|
384
|
+
*/
|
|
385
|
+
readonly refresh?: boolean;
|
|
386
|
+
/** Maximum age of a completed cache entry in milliseconds.
|
|
387
|
+
*
|
|
388
|
+
* Overrides the context's `defaultMaxAgeMs`. Use `0` to always revalidate or
|
|
389
|
+
* `Infinity` to reuse completed cache entries until explicit invalidation.
|
|
390
|
+
*/
|
|
391
|
+
readonly maxAgeMs?: number;
|
|
392
|
+
readonly policy?: 'cache-first' | 'no-store';
|
|
393
|
+
}
|
|
394
|
+
/** Strategies supported by generic account discovery requests.
|
|
395
|
+
*
|
|
396
|
+
* @example
|
|
397
|
+
* ```ts
|
|
398
|
+
* const strategy: AccountDiscoveryStrategy = 'targeted-program-accounts';
|
|
399
|
+
* ```
|
|
400
|
+
*/
|
|
401
|
+
export type AccountDiscoveryStrategy = 'direct' | 'derived' | 'indexer' | 'targeted-program-accounts' | 'broad-scan';
|
|
402
|
+
/** Every strategy name exposed through public read metadata and errors.
|
|
403
|
+
*
|
|
404
|
+
* @example
|
|
405
|
+
* ```ts
|
|
406
|
+
* const strategy: DiscoveryStrategy = 'wallet-profile-provider';
|
|
407
|
+
* ```
|
|
408
|
+
*/
|
|
409
|
+
export type DiscoveryStrategy = AccountDiscoveryStrategy | 'known-addresses' | 'wallet-profile-provider';
|
|
410
|
+
/** A discovery request supplied to the shared data port.
|
|
411
|
+
*
|
|
412
|
+
* Discovery always consults the provider, so direct-read freshness controls
|
|
413
|
+
* such as `refresh` and `maxAgeMs` are intentionally unavailable.
|
|
414
|
+
*
|
|
415
|
+
* @example
|
|
416
|
+
* ```ts
|
|
417
|
+
* const request: DiscoveryRequest = {
|
|
418
|
+
* strategy: 'targeted-program-accounts',
|
|
419
|
+
* filters: [],
|
|
420
|
+
* };
|
|
421
|
+
* ```
|
|
422
|
+
*/
|
|
423
|
+
export interface DiscoveryRequest extends ReadAccountOptions {
|
|
424
|
+
/** Controls whether validated discoveries populate the account cache. */
|
|
425
|
+
readonly policy?: 'cache-first' | 'no-store';
|
|
426
|
+
/** Selects the discovery behavior when no indexer takes precedence.
|
|
427
|
+
*
|
|
428
|
+
* When an indexer is configured, `targeted-program-accounts`, `broad-scan`,
|
|
429
|
+
* and `indexer` are advisory and use the indexer. Use `direct` or `derived`
|
|
430
|
+
* to bypass the indexer for a request.
|
|
431
|
+
*/
|
|
432
|
+
readonly strategy: AccountDiscoveryStrategy;
|
|
433
|
+
readonly filters: readonly ProgramAccountFilter[];
|
|
434
|
+
}
|
|
435
|
+
/** Observer for validated snapshots and recoverable subscription errors.
|
|
436
|
+
*
|
|
437
|
+
* Malformed account events call `onError` without replacing the last valid
|
|
438
|
+
* cache entry or ending the subscription.
|
|
439
|
+
*
|
|
440
|
+
* @example
|
|
441
|
+
* ```ts
|
|
442
|
+
* const observer: SubscriptionObserver<{ name: string }> = {
|
|
443
|
+
* onSnapshot: snapshot => console.log(snapshot.data.name),
|
|
444
|
+
* onError: error => console.error(error),
|
|
445
|
+
* };
|
|
446
|
+
* ```
|
|
447
|
+
*/
|
|
448
|
+
export interface SubscriptionObserver<TSnapshot> {
|
|
449
|
+
readonly onSnapshot: (snapshot: SnapshotEnvelope<TSnapshot>) => void | Promise<void>;
|
|
450
|
+
readonly onError: (error: SageSdkError) => void | Promise<void>;
|
|
451
|
+
/** Observes bounded-delivery coalescing without treating it as an error. */
|
|
452
|
+
readonly onDiagnostic?: (event: SubscriptionDiagnosticEvent) => void;
|
|
453
|
+
}
|
|
454
|
+
/** A bounded-delivery diagnostic emitted by one account subscription.
|
|
455
|
+
*
|
|
456
|
+
* `coalescedCount` is cumulative for the currently pending observer delivery.
|
|
457
|
+
* Coalescing is expected under burst traffic and is never reported to
|
|
458
|
+
* `SubscriptionObserver.onError`.
|
|
459
|
+
*
|
|
460
|
+
* @example
|
|
461
|
+
* ```ts
|
|
462
|
+
* declare const address: Address;
|
|
463
|
+
* const event: SubscriptionDiagnosticEvent = {
|
|
464
|
+
* kind: 'subscription-snapshot-coalesced',
|
|
465
|
+
* accountType: 'fleet',
|
|
466
|
+
* address,
|
|
467
|
+
* coalescedCount: 2,
|
|
468
|
+
* };
|
|
469
|
+
* ```
|
|
470
|
+
*/
|
|
471
|
+
export type SubscriptionDiagnosticEvent = {
|
|
472
|
+
readonly kind: 'subscription-snapshot-coalesced';
|
|
473
|
+
readonly accountType: EntityType;
|
|
474
|
+
readonly address: Address;
|
|
475
|
+
readonly coalescedCount: number;
|
|
476
|
+
} | {
|
|
477
|
+
readonly kind: 'subscription-error-coalesced';
|
|
478
|
+
readonly accountType: EntityType;
|
|
479
|
+
readonly address: Address;
|
|
480
|
+
readonly coalescedCount: number;
|
|
481
|
+
readonly errorCode: SageSdkError['code'];
|
|
482
|
+
};
|
|
483
|
+
/** Options for one context-owned subscription.
|
|
484
|
+
*
|
|
485
|
+
* @example
|
|
486
|
+
* ```ts
|
|
487
|
+
* const options: SubscriptionOptions = { commitment: 'confirmed' };
|
|
488
|
+
* ```
|
|
489
|
+
*/
|
|
490
|
+
export type SubscriptionOptions = ReadAccountOptions;
|
|
491
|
+
/** Consumer handle for one context-owned subscription.
|
|
492
|
+
*
|
|
493
|
+
* Unsubscription is asynchronous, idempotent, and automatically performed by
|
|
494
|
+
* `SageContext.dispose()`. Teardown does not wait for an observer callback that
|
|
495
|
+
* is already running, so that callback may finish after teardown resolves.
|
|
496
|
+
*
|
|
497
|
+
* @example
|
|
498
|
+
* ```ts
|
|
499
|
+
* declare const subscription: SageSubscription;
|
|
500
|
+
* await subscription.unsubscribe();
|
|
501
|
+
* ```
|
|
502
|
+
*/
|
|
503
|
+
export interface SageSubscription {
|
|
504
|
+
unsubscribe(): Promise<void>;
|
|
505
|
+
}
|
|
506
|
+
/** Public read and discovery boundary shared by built-in domains and extensions.
|
|
507
|
+
*
|
|
508
|
+
* Cache entries are partitioned by stable account-definition object identity
|
|
509
|
+
* and may retain one view per commitment. They remain in memory until replaced,
|
|
510
|
+
* explicitly removed with `invalidate()`, or released when the owning context
|
|
511
|
+
* is disposed. The context rejects new cache keys above `maxCacheEntries`;
|
|
512
|
+
* callers can use `no-store` for intentional reads beyond that bound.
|
|
513
|
+
* Reconstructing definitions per call can therefore exhaust the configured
|
|
514
|
+
* capacity. Invalidation retains lightweight per-key generation barriers until
|
|
515
|
+
* context disposal so older in-flight reads and discoveries cannot repopulate
|
|
516
|
+
* a removed entry.
|
|
517
|
+
*
|
|
518
|
+
* @example
|
|
519
|
+
* ```ts
|
|
520
|
+
* declare const ctx: SageContext;
|
|
521
|
+
* declare const definition: AccountDefinition<unknown>;
|
|
522
|
+
* declare const address: Address;
|
|
523
|
+
* const data: SageDataPort = ctx.data;
|
|
524
|
+
* const envelope = await data.read(definition, address);
|
|
525
|
+
* data.invalidate(definition, address);
|
|
526
|
+
* ```
|
|
527
|
+
*/
|
|
528
|
+
export interface SageDataPort {
|
|
529
|
+
/** Removes the exact cached account generation.
|
|
530
|
+
*
|
|
531
|
+
* Operations that started before invalidation may still resolve to their
|
|
532
|
+
* original callers, but cannot repopulate this cache entry or satisfy reads
|
|
533
|
+
* that start after invalidation.
|
|
534
|
+
*/
|
|
535
|
+
invalidate<TSnapshot>(definition: AccountDefinition<TSnapshot>, address: Address): void;
|
|
536
|
+
read<TSnapshot>(definition: AccountDefinition<TSnapshot>, address: Address, options?: ReadOptions): Promise<SnapshotEnvelope<TSnapshot>>;
|
|
537
|
+
/** Reads addresses in input order.
|
|
538
|
+
*
|
|
539
|
+
* Context reads remain individually deduplicated. Uncached unique addresses
|
|
540
|
+
* use provider batching when available; direct-only providers use a bounded
|
|
541
|
+
* fallback worker pool.
|
|
542
|
+
*/
|
|
543
|
+
readMany<TSnapshot>(definition: AccountDefinition<TSnapshot>, addresses: readonly Address[], options?: ReadOptions): Promise<readonly (SnapshotEnvelope<TSnapshot> | undefined)[]>;
|
|
544
|
+
discover<TSnapshot>(definition: AccountDefinition<TSnapshot>, request: DiscoveryRequest): Promise<readonly SnapshotEnvelope<TSnapshot>[]>;
|
|
545
|
+
/** Subscribes to one typed account and emits the selected cache view.
|
|
546
|
+
*
|
|
547
|
+
* Registration establishes the WebSocket listener first, then performs one
|
|
548
|
+
* direct read to close the registration race and emit current state. Valid
|
|
549
|
+
* stream updates use the same validation and cache path as direct reads. A
|
|
550
|
+
* failed initial read is reported through `onError`; it does not reject the
|
|
551
|
+
* subscription handle or end the registered stream.
|
|
552
|
+
*/
|
|
553
|
+
subscribe<TSnapshot>(definition: AccountDefinition<TSnapshot>, address: Address, observer: SubscriptionObserver<TSnapshot>, options?: SubscriptionOptions): Promise<SageSubscription>;
|
|
554
|
+
readRaw(address: Address, options?: ReadAccountOptions): Promise<RawAccount | undefined>;
|
|
555
|
+
}
|
|
556
|
+
/** Immutable context passed as the first argument to every domain function.
|
|
557
|
+
*
|
|
558
|
+
* Disposing the context releases its cache and in-flight read registries.
|
|
559
|
+
*
|
|
560
|
+
* @example
|
|
561
|
+
* ```ts
|
|
562
|
+
* declare const rpc: SageRpc;
|
|
563
|
+
* const ctx: SageContext = createSageContext({ cluster: 'zink-ptr', rpc });
|
|
564
|
+
* ```
|
|
565
|
+
*/
|
|
566
|
+
export interface SageContext {
|
|
567
|
+
readonly cluster: ClusterIdentity;
|
|
568
|
+
readonly game?: Address;
|
|
569
|
+
readonly data: SageDataPort;
|
|
570
|
+
readonly registrySnapshotStore?: RegistrySnapshotStore;
|
|
571
|
+
readonly writeRpc?: SageWriteRpc;
|
|
572
|
+
dispose(): Promise<void>;
|
|
573
|
+
}
|
|
574
|
+
interface SharedContextOptions {
|
|
575
|
+
readonly commitment?: Commitment;
|
|
576
|
+
/** Default completed-cache freshness window in milliseconds.
|
|
577
|
+
*
|
|
578
|
+
* Defaults to 30,000. Individual reads can override it with
|
|
579
|
+
* `ReadOptions.maxAgeMs`; use `Infinity` to retain cache entries until
|
|
580
|
+
* explicit invalidation.
|
|
581
|
+
*/
|
|
582
|
+
readonly defaultMaxAgeMs?: number;
|
|
583
|
+
readonly discovery?: {
|
|
584
|
+
readonly indexer?: IndexerProvider;
|
|
585
|
+
readonly walletProfiles?: WalletProfileDiscoveryProvider;
|
|
586
|
+
};
|
|
587
|
+
readonly game?: Address;
|
|
588
|
+
/** Maximum decoded bytes accepted for one untrusted account payload. */
|
|
589
|
+
readonly maxAccountDataBytes?: number;
|
|
590
|
+
/** Maximum number of address-keyed snapshots retained by this context. */
|
|
591
|
+
readonly maxCacheEntries?: number;
|
|
592
|
+
/** Maximum entries accepted from one RPC or indexer discovery response. */
|
|
593
|
+
readonly maxDiscoveryResults?: number;
|
|
594
|
+
/** Maximum input addresses accepted by one `readMany` call. */
|
|
595
|
+
readonly maxReadManyAccounts?: number;
|
|
596
|
+
readonly registrySnapshotStore?: RegistrySnapshotStore;
|
|
597
|
+
readonly subscriptions?: AccountSubscriptionProvider;
|
|
598
|
+
readonly writeRpc?: SageWriteRpc;
|
|
599
|
+
}
|
|
600
|
+
type ContextTransport = {
|
|
601
|
+
readonly rpc: SageRpc;
|
|
602
|
+
readonly provider?: never;
|
|
603
|
+
} | {
|
|
604
|
+
readonly provider: AccountProvider;
|
|
605
|
+
readonly rpc?: never;
|
|
606
|
+
};
|
|
607
|
+
/** Configuration accepted by the synchronous context and client factories.
|
|
608
|
+
*
|
|
609
|
+
* Custom clusters require an explicit canonical Game address.
|
|
610
|
+
*
|
|
611
|
+
* @example
|
|
612
|
+
* ```ts
|
|
613
|
+
* declare const rpc: SageRpc;
|
|
614
|
+
* const options: SageContextOptions = { cluster: 'zink-ptr', rpc };
|
|
615
|
+
* ```
|
|
616
|
+
*/
|
|
617
|
+
export type SageContextOptions = (SharedContextOptions & ContextTransport & {
|
|
618
|
+
readonly cluster: KnownCluster;
|
|
619
|
+
}) | (SharedContextOptions & ContextTransport & {
|
|
620
|
+
readonly cluster: CustomClusterIdentity;
|
|
621
|
+
readonly game: Address;
|
|
622
|
+
});
|
|
623
|
+
/** Address-keyed cache identity scoped to one context.
|
|
624
|
+
*
|
|
625
|
+
* @example
|
|
626
|
+
* ```ts
|
|
627
|
+
* declare const programAddress: Address;
|
|
628
|
+
* declare const address: Address;
|
|
629
|
+
* const key: CacheKey = { cluster: 'zink-ptr', programAddress, accountType: 'fleet', address };
|
|
630
|
+
* ```
|
|
631
|
+
*/
|
|
632
|
+
export interface CacheKey {
|
|
633
|
+
readonly cluster: ClusterIdentity;
|
|
634
|
+
readonly programAddress: Address;
|
|
635
|
+
readonly accountType: EntityType;
|
|
636
|
+
readonly address: Address;
|
|
637
|
+
}
|
|
638
|
+
/** Compatibility prototype; not the runtime cache representation.
|
|
639
|
+
*
|
|
640
|
+
* The shipped context owns its cache internally and does not expose cache
|
|
641
|
+
* records for inspection or mutation.
|
|
642
|
+
*
|
|
643
|
+
* @example
|
|
644
|
+
* ```ts
|
|
645
|
+
* declare const record: CacheRecord<unknown>;
|
|
646
|
+
* const snapshot = record.invalidated ? undefined : record.snapshot;
|
|
647
|
+
* ```
|
|
648
|
+
*/
|
|
649
|
+
export interface CacheRecord<TSnapshot> {
|
|
650
|
+
readonly key: CacheKey;
|
|
651
|
+
readonly snapshot: SnapshotEnvelope<TSnapshot>;
|
|
652
|
+
readonly invalidated: boolean;
|
|
653
|
+
}
|
|
654
|
+
/** Compatibility prototype; no context-wide diagnostic emitter ships.
|
|
655
|
+
*
|
|
656
|
+
* Shipped diagnostics are limited to finder provenance through `readMeta()` and
|
|
657
|
+
* subscription delivery events through `SubscriptionObserver.onDiagnostic`.
|
|
658
|
+
*
|
|
659
|
+
* @example
|
|
660
|
+
* ```ts
|
|
661
|
+
* const event: DiagnosticEvent = { kind: 'cache-hit', cluster: 'zink-ptr' };
|
|
662
|
+
* ```
|
|
663
|
+
*/
|
|
664
|
+
export interface DiagnosticEvent {
|
|
665
|
+
readonly kind: 'cache-hit' | 'cache-miss' | 'provider-read' | 'validation' | 'discovery';
|
|
666
|
+
readonly cluster: ClusterIdentity;
|
|
667
|
+
readonly address?: Address;
|
|
668
|
+
readonly accountType?: EntityType;
|
|
669
|
+
}
|
|
670
|
+
export {};
|
|
671
|
+
//# sourceMappingURL=contracts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contracts.d.ts","sourceRoot":"","sources":["../../src/client/contracts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,IAAI,UAAU,EACrB,UAAU,IAAI,aAAa,EAC3B,iBAAiB,EACjB,iBAAiB,EACjB,qBAAqB,EACrB,sBAAsB,EACtB,qBAAqB,EACrB,uBAAuB,EACvB,GAAG,EACH,kBAAkB,EAClB,sBAAsB,EACvB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sBAAs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