forked from crackedstudio/tikka
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.write.ts
More file actions
70 lines (63 loc) · 3.36 KB
/
Copy pathindex.write.ts
File metadata and controls
70 lines (63 loc) · 3.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/**
* @packageDocumentation
* **@tikka/sdk/write** — Write (signing + submission) sub-path export for @tikka/sdk.
*
* Contains everything needed to build, sign, and submit Soroban transactions.
* Consumers who only need read-only queries should import from `@tikka/sdk/read`
* instead to avoid pulling in wallet adapter and signing overhead.
*
* ## Included
* - `ContractService` — full invoke / simulate / buildUnsigned / submitSigned
* - `TransactionLifecycle` — four-phase lifecycle (simulate → sign → submit → poll)
* - All wallet adapters (Freighter, XBull, Albedo, LOBSTR, Rabet, Mock)
* - `WalletAdapter` interface
* - `sep10` auth helpers (`buildChallenge`, `verifyResponse`, `createInMemoryNonceStore`)
* - `FeeEstimatorService`
* - Write-side service classes (`RaffleService`, `TicketService`, `UserService`)
* - All write-side types (`RaffleParams`, `BuyTicketParams`, `RefundTicketParams`, etc.)
* - Re-exports everything from `@tikka/sdk/read` for convenience
*
* @example
* ```ts
* import { ContractService, FreighterAdapter } from '@tikka/sdk/write';
* ```
*/
// ── Re-export the full read surface ─────────────────────────────────────────
export * from './index.read';
// ── Contract service & lifecycle ────────────────────────────────────────────
export { ContractService } from './contract/contract.service';
export type { InvokeOptions, UnsignedTxResult, TxMemo } from './contract/contract.service';
export { TransactionLifecycle } from './contract/lifecycle';
export type {
SimulateResult,
SubmitResult,
PollConfig,
InvokeLifecycleOptions,
} from './contract/lifecycle';
// ── Wallet adapters ──────────────────────────────────────────────────────────
export * from './wallet';
// ── Auth (SEP-10) ────────────────────────────────────────────────────────────
export * from './auth/sep10';
// ── Fee estimation ───────────────────────────────────────────────────────────
export * from './fee-estimator';
// ── Write-side service classes ───────────────────────────────────────────────
export { RaffleService } from './modules/raffle/raffle.service';
export { TicketService } from './modules/ticket/ticket.service';
export { UserService } from './modules/user/user.service';
// ── Write-side types ─────────────────────────────────────────────────────────
export type {
RaffleParams,
CreateRaffleResult,
CancelRaffleResult,
CancelRaffleParams,
} from './modules/raffle/raffle.types';
export type {
BuyTicketParams,
BuyTicketResult,
RefundTicketParams,
RefundTicketResult,
BuyBatchParams,
BuyBatchResult,
BatchPurchaseResult,
BatchTicketPurchase,
} from './modules/ticket/ticket.types';