@playmos/sdk 0.3.10 → 0.3.12
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/CHANGELOG.md +197 -0
- package/README.md +6 -2
- package/dist/chunk-2CW4U5YB.js +445 -0
- package/dist/{errors-Chizbb96.d.cts → errors-CYKgt2VU.d.cts} +112 -6
- package/dist/{errors-Chizbb96.d.ts → errors-CYKgt2VU.d.ts} +112 -6
- package/dist/index.cjs +1412 -24
- package/dist/index.d.cts +688 -21
- package/dist/index.d.ts +688 -21
- package/dist/index.js +1202 -189
- package/dist/server.cjs +117 -0
- package/dist/server.d.cts +26 -2
- package/dist/server.d.ts +26 -2
- package/dist/server.js +110 -2
- package/package.json +7 -11
- package/dist/chunk-UZECDT6F.js +0 -83
|
@@ -24,11 +24,19 @@ interface GasConfig {
|
|
|
24
24
|
paymasterUrl?: string;
|
|
25
25
|
}
|
|
26
26
|
interface WalletConfig {
|
|
27
|
+
/**
|
|
28
|
+
* Which connector name to use when {@link WalletConfig.provider} is omitted.
|
|
29
|
+
* - `"injected"` — requires `globalThis.ethereum` (wallet browser / extension).
|
|
30
|
+
* - `"base-account"` (default) — **not** a built-in Base Account package inside
|
|
31
|
+
* `@playmos/sdk`. Resolution: use injected ethereum if present; otherwise you
|
|
32
|
+
* must install `@base-org/account` yourself, construct a provider, and pass
|
|
33
|
+
* it as `wallet.provider` (sdk#512). No hard dependency on `@base-org/account`.
|
|
34
|
+
*/
|
|
27
35
|
connector?: WalletConnector;
|
|
28
36
|
/**
|
|
29
|
-
* Pre-built EIP-1193 provider.
|
|
30
|
-
*
|
|
31
|
-
*
|
|
37
|
+
* Pre-built EIP-1193 provider (host-owned). Always preferred when set.
|
|
38
|
+
* For Base Account / passkey hosts: construct with `@base-org/account` (or the
|
|
39
|
+
* Base App injection) and pass it here. Still **timeout-wrapped** on resolve (#462).
|
|
32
40
|
*/
|
|
33
41
|
provider?: Eip1193Provider;
|
|
34
42
|
}
|
|
@@ -38,6 +46,8 @@ interface ContractConfig {
|
|
|
38
46
|
usdc?: `0x${string}`;
|
|
39
47
|
playmosPay?: `0x${string}`;
|
|
40
48
|
prizePool?: `0x${string}`;
|
|
49
|
+
/** EpochPrizePool (rolling-epoch reads — sdk#629). Live PrizePool stays on prizePool. */
|
|
50
|
+
epochPrizePool?: `0x${string}`;
|
|
41
51
|
}
|
|
42
52
|
/**
|
|
43
53
|
* @deprecated Unused — agent routes are enabled server-side (SERVICE_MASTER_SECRET +
|
|
@@ -129,6 +139,10 @@ interface PayInput {
|
|
|
129
139
|
sku: string;
|
|
130
140
|
/** Your opaque user id. */
|
|
131
141
|
playerId: string;
|
|
142
|
+
/** sdk#508 — max wait for server-settle poll (ms). Default 60_000. */
|
|
143
|
+
settleTimeoutMs?: number;
|
|
144
|
+
/** sdk#508 — abort server-settle polling. */
|
|
145
|
+
signal?: AbortSignal;
|
|
132
146
|
/**
|
|
133
147
|
* The game this IAP belongs to. Optional: when your API key maps to exactly
|
|
134
148
|
* one game the service resolves it for you (the quickstart). Supply it
|
|
@@ -150,6 +164,13 @@ interface EnterRoundInput {
|
|
|
150
164
|
amount: string;
|
|
151
165
|
playerId: string;
|
|
152
166
|
idempotencyKey?: string;
|
|
167
|
+
/**
|
|
168
|
+
* sdk#508 — max wait for server-settle poll (ms). Default 60_000.
|
|
169
|
+
* Only applies to no-wallet sandbox server-settle path.
|
|
170
|
+
*/
|
|
171
|
+
settleTimeoutMs?: number;
|
|
172
|
+
/** sdk#508 — abort server-settle polling. */
|
|
173
|
+
signal?: AbortSignal;
|
|
153
174
|
metadata?: Record<string, string>;
|
|
154
175
|
/**
|
|
155
176
|
* Exact on-chain round key for Path B / entryProvider (#201 / #204 / #210).
|
|
@@ -385,12 +406,34 @@ interface Payment {
|
|
|
385
406
|
/** `pay_…` (IAP) or `entry_…` (prize-pool) — ULID, server-issued, unique. */
|
|
386
407
|
id: string;
|
|
387
408
|
status: PaymentStatus;
|
|
388
|
-
/** "iap" (1% external) or "entry" (60/30/10
|
|
409
|
+
/** "iap" (1% external) or "entry" (prize-pool; `split` is a first-party 60/30/10 projection). */
|
|
389
410
|
kind: "iap" | "entry";
|
|
411
|
+
/**
|
|
412
|
+
* Requested amount (USD string). For prize-pool **server-settle**, this may
|
|
413
|
+
* differ from what moved on chain — see {@link Payment.chainAmount} (sdk#507).
|
|
414
|
+
*/
|
|
390
415
|
amount: string;
|
|
391
416
|
fee: string;
|
|
392
417
|
net: string;
|
|
393
|
-
/**
|
|
418
|
+
/**
|
|
419
|
+
* On-chain entry amount (USD) when the service observed it (server-settle entry).
|
|
420
|
+
* PrizePool charges the **round open price**, not necessarily {@link Payment.amount}.
|
|
421
|
+
* Reconcile economics against this field (or a chain `getRound` read), not `amount` alone.
|
|
422
|
+
*/
|
|
423
|
+
chainAmount?: string;
|
|
424
|
+
/** On-chain entry amount in micro-USDC (6 dp integer string), when known. */
|
|
425
|
+
chainAmountMicro?: string;
|
|
426
|
+
/**
|
|
427
|
+
* First-party **60/30/10 projection** (pool/seed/rake USD strings) for prize-pool
|
|
428
|
+
* entries — bookkeeping preview, **not** a studio 60/30/9+1% split and **not** a
|
|
429
|
+
* chain-derived settlement observation (sdk#514). Numbers come from SDK constants
|
|
430
|
+
* (`POOL_BPS`/`SEED_BPS`/`RAKE_BPS`), not from reading the deployed pool’s
|
|
431
|
+
* constructor bps. On-chain, entry only takes the fee off the top; pool/seed
|
|
432
|
+
* split at **lock**; payable pot also includes inherited seedBank — so
|
|
433
|
+
* `split.pool` is **not** “what this round pays.” Reconcile money with
|
|
434
|
+
* {@link Payment.chainAmount} / pool `getRound`.
|
|
435
|
+
* Field name kept for compatibility (no rename in V1).
|
|
436
|
+
*/
|
|
394
437
|
split?: {
|
|
395
438
|
pool: string;
|
|
396
439
|
seed: string;
|
|
@@ -427,9 +470,17 @@ interface Payment {
|
|
|
427
470
|
interface VerifyResult {
|
|
428
471
|
id: string;
|
|
429
472
|
status: PaymentStatus;
|
|
473
|
+
/** Requested amount (USD). May differ from {@link VerifyResult.chainAmount} on server-settle entry. */
|
|
430
474
|
amount: string;
|
|
431
475
|
fee: string;
|
|
432
476
|
net: string;
|
|
477
|
+
/**
|
|
478
|
+
* On-chain settled entry amount (USD) when known — distinct from {@link VerifyResult.amount}
|
|
479
|
+
* (sdk#507 / Vault Pop DX-05b). Prefer this for pot/split economics on shared rounds.
|
|
480
|
+
*/
|
|
481
|
+
chainAmount?: string;
|
|
482
|
+
/** On-chain settled entry amount in micro-USDC, when known. */
|
|
483
|
+
chainAmountMicro?: string;
|
|
433
484
|
txHash?: `0x${string}`;
|
|
434
485
|
playerId: string;
|
|
435
486
|
sku?: string;
|
|
@@ -440,6 +491,8 @@ interface VerifyResult {
|
|
|
440
491
|
* service can never confirm on-chain. */
|
|
441
492
|
verifiedVia?: "chain" | "cache" | "degraded";
|
|
442
493
|
chainReads?: "enabled" | "degraded";
|
|
494
|
+
/** Echo of on-chain identity when the service returns it (server-settle). */
|
|
495
|
+
identity?: string;
|
|
443
496
|
}
|
|
444
497
|
type WebhookEventType = "payment.confirmed" | "payment.failed" | "payout.settled" | "refund.processed";
|
|
445
498
|
interface WebhookEvent {
|
|
@@ -587,6 +640,22 @@ interface CancelRoundResult {
|
|
|
587
640
|
status: "cancelling" | "cancelled";
|
|
588
641
|
round?: RoundState;
|
|
589
642
|
}
|
|
643
|
+
/** L34 / sdk#610 — a win is funded only after the push tx, else claimable. */
|
|
644
|
+
type PayoutNoticeStatus = "funded" | "claimable";
|
|
645
|
+
interface PayoutNotice {
|
|
646
|
+
roundId: string;
|
|
647
|
+
wallet: `0x${string}`;
|
|
648
|
+
amountMicro: string;
|
|
649
|
+
status: PayoutNoticeStatus;
|
|
650
|
+
/** Present only when status === "funded". */
|
|
651
|
+
txHash?: `0x${string}`;
|
|
652
|
+
reason?: string;
|
|
653
|
+
}
|
|
654
|
+
interface PayoutNoticesResult {
|
|
655
|
+
roundId?: string;
|
|
656
|
+
status?: string;
|
|
657
|
+
notices: PayoutNotice[];
|
|
658
|
+
}
|
|
590
659
|
/** What `rounds.prize({ … })` returns — claimable pull-payment balance (issue #41). */
|
|
591
660
|
interface PrizeBalance {
|
|
592
661
|
roundId: string;
|
|
@@ -657,6 +726,43 @@ interface SettleRoundResult {
|
|
|
657
726
|
status: "settled" | "settling";
|
|
658
727
|
}
|
|
659
728
|
|
|
729
|
+
/**
|
|
730
|
+
* EIP-5792 batch primitives — ported from the proven game-hub `payEntryOnchain`
|
|
731
|
+
* path (`OnchainEntry.ts`). One `wallet_sendCalls` sends `approve` + the settling
|
|
732
|
+
* call as ONE atomic confirmation; the paymaster sponsors gas when configured.
|
|
733
|
+
* The player sees a single Apple-Pay-style sheet.
|
|
734
|
+
*/
|
|
735
|
+
|
|
736
|
+
interface Call {
|
|
737
|
+
to: `0x${string}`;
|
|
738
|
+
data: `0x${string}`;
|
|
739
|
+
}
|
|
740
|
+
type OnchainStatus = "PENDING" | "CONFIRMED" | "FAILED";
|
|
741
|
+
|
|
742
|
+
/**
|
|
743
|
+
* Calldata builders. IAP / PrizePool entry stay on `toBytes32` (keccak of
|
|
744
|
+
* UTF-8 via toBytes) because live paid entries were written with it.
|
|
745
|
+
* Epoch execute uses `seriesToBytes32` — hex-shaped series must not drift.
|
|
746
|
+
*/
|
|
747
|
+
|
|
748
|
+
/** The server derives these identically (keccak256 of UTF-8 bytes) so the
|
|
749
|
+
* off-chain record and the on-chain call line up. */
|
|
750
|
+
declare const toBytes32: (s: string) => `0x${string}`;
|
|
751
|
+
interface EpochExecuteSettlementCallArgs {
|
|
752
|
+
epochPrizePool: `0x${string}`;
|
|
753
|
+
series: string;
|
|
754
|
+
epochId: bigint;
|
|
755
|
+
winners: `0x${string}`[];
|
|
756
|
+
amounts: bigint[];
|
|
757
|
+
signature: `0x${string}`;
|
|
758
|
+
}
|
|
759
|
+
/**
|
|
760
|
+
* EpochPrizePool.executeSignedSettlement — permissionless relay of an
|
|
761
|
+
* operator-signed podium (sdk#664 E1b). Series hashed with seriesToBytes32
|
|
762
|
+
* (not this file's toBytes32) so hex-shaped series cannot drift from the chain.
|
|
763
|
+
*/
|
|
764
|
+
declare function buildEpochExecuteSettlementCall(args: EpochExecuteSettlementCallArgs): Call;
|
|
765
|
+
|
|
660
766
|
/**
|
|
661
767
|
* Typed, actionable errors — the Stripe bar (spec §11).
|
|
662
768
|
*
|
|
@@ -728,4 +834,4 @@ declare class NothingToWithdrawError extends PlaymosError {
|
|
|
728
834
|
constructor(detail?: Record<string, unknown>);
|
|
729
835
|
}
|
|
730
836
|
|
|
731
|
-
export { type
|
|
837
|
+
export { type PaymentStatus as $, type ActiveSeriesRound as A, AuthError as B, type Call as C, ConfigError as D, type EscrowHoldInput as E, type ContractConfig as F, type Eip1193Provider as G, type GasConfig as H, type GasMode as I, InsufficientGasError as J, InvalidAmountError as K, type Listing as L, type MarketplaceListInput as M, type Network as N, type OnchainStatus as O, type PlaymosConfig as P, type ListingStatus as Q, type RoundOpenInput as R, type SettleRoundResult as S, type TransferResult as T, type MarketplaceItem as U, type VerifyResult as V, type WebhookEvent as W, type MarketplaceSale as X, MissingFieldError as Y, NothingToWithdrawError as Z, PaymentFailedError as _, type RoundState as a, type PayoutNotice as a0, type PayoutNoticeStatus as a1, PlaymosError as a2, type PlaymosErrorCode as a3, type RetryOptions as a4, type RoundGetVia as a5, type RoundStatus as a6, type WalletConfig as a7, WalletConnectionError as a8, type WalletConnector as a9, WalletTimeoutError as aa, type WebhookEventType as ab, buildEpochExecuteSettlementCall as ac, toBytes32 as ad, type RoundSettleInput as b, type RoundCancelInput as c, type CancelRoundResult as d, type RoundGetResult as e, type PayoutNoticesResult as f, type PrizeBalance as g, type WithdrawResult as h, type AgentWallet as i, type AgentFundResult as j, type EscrowHoldResult as k, type EscrowResolveResult as l, type MarketplaceSaleResult as m, type MarketplaceGetResult as n, type PayInput as o, type Payment as p, type EnterRoundInput as q, type TransferReconcile as r, type WaitOptions as s, type TransferInput as t, type TransferConfirmOptions as u, type PayoutRule as v, type ActiveForSeriesResult as w, type AgentEconomyConfig as x, AlreadyEnteredError as y, ApiError as z };
|
|
@@ -24,11 +24,19 @@ interface GasConfig {
|
|
|
24
24
|
paymasterUrl?: string;
|
|
25
25
|
}
|
|
26
26
|
interface WalletConfig {
|
|
27
|
+
/**
|
|
28
|
+
* Which connector name to use when {@link WalletConfig.provider} is omitted.
|
|
29
|
+
* - `"injected"` — requires `globalThis.ethereum` (wallet browser / extension).
|
|
30
|
+
* - `"base-account"` (default) — **not** a built-in Base Account package inside
|
|
31
|
+
* `@playmos/sdk`. Resolution: use injected ethereum if present; otherwise you
|
|
32
|
+
* must install `@base-org/account` yourself, construct a provider, and pass
|
|
33
|
+
* it as `wallet.provider` (sdk#512). No hard dependency on `@base-org/account`.
|
|
34
|
+
*/
|
|
27
35
|
connector?: WalletConnector;
|
|
28
36
|
/**
|
|
29
|
-
* Pre-built EIP-1193 provider.
|
|
30
|
-
*
|
|
31
|
-
*
|
|
37
|
+
* Pre-built EIP-1193 provider (host-owned). Always preferred when set.
|
|
38
|
+
* For Base Account / passkey hosts: construct with `@base-org/account` (or the
|
|
39
|
+
* Base App injection) and pass it here. Still **timeout-wrapped** on resolve (#462).
|
|
32
40
|
*/
|
|
33
41
|
provider?: Eip1193Provider;
|
|
34
42
|
}
|
|
@@ -38,6 +46,8 @@ interface ContractConfig {
|
|
|
38
46
|
usdc?: `0x${string}`;
|
|
39
47
|
playmosPay?: `0x${string}`;
|
|
40
48
|
prizePool?: `0x${string}`;
|
|
49
|
+
/** EpochPrizePool (rolling-epoch reads — sdk#629). Live PrizePool stays on prizePool. */
|
|
50
|
+
epochPrizePool?: `0x${string}`;
|
|
41
51
|
}
|
|
42
52
|
/**
|
|
43
53
|
* @deprecated Unused — agent routes are enabled server-side (SERVICE_MASTER_SECRET +
|
|
@@ -129,6 +139,10 @@ interface PayInput {
|
|
|
129
139
|
sku: string;
|
|
130
140
|
/** Your opaque user id. */
|
|
131
141
|
playerId: string;
|
|
142
|
+
/** sdk#508 — max wait for server-settle poll (ms). Default 60_000. */
|
|
143
|
+
settleTimeoutMs?: number;
|
|
144
|
+
/** sdk#508 — abort server-settle polling. */
|
|
145
|
+
signal?: AbortSignal;
|
|
132
146
|
/**
|
|
133
147
|
* The game this IAP belongs to. Optional: when your API key maps to exactly
|
|
134
148
|
* one game the service resolves it for you (the quickstart). Supply it
|
|
@@ -150,6 +164,13 @@ interface EnterRoundInput {
|
|
|
150
164
|
amount: string;
|
|
151
165
|
playerId: string;
|
|
152
166
|
idempotencyKey?: string;
|
|
167
|
+
/**
|
|
168
|
+
* sdk#508 — max wait for server-settle poll (ms). Default 60_000.
|
|
169
|
+
* Only applies to no-wallet sandbox server-settle path.
|
|
170
|
+
*/
|
|
171
|
+
settleTimeoutMs?: number;
|
|
172
|
+
/** sdk#508 — abort server-settle polling. */
|
|
173
|
+
signal?: AbortSignal;
|
|
153
174
|
metadata?: Record<string, string>;
|
|
154
175
|
/**
|
|
155
176
|
* Exact on-chain round key for Path B / entryProvider (#201 / #204 / #210).
|
|
@@ -385,12 +406,34 @@ interface Payment {
|
|
|
385
406
|
/** `pay_…` (IAP) or `entry_…` (prize-pool) — ULID, server-issued, unique. */
|
|
386
407
|
id: string;
|
|
387
408
|
status: PaymentStatus;
|
|
388
|
-
/** "iap" (1% external) or "entry" (60/30/10
|
|
409
|
+
/** "iap" (1% external) or "entry" (prize-pool; `split` is a first-party 60/30/10 projection). */
|
|
389
410
|
kind: "iap" | "entry";
|
|
411
|
+
/**
|
|
412
|
+
* Requested amount (USD string). For prize-pool **server-settle**, this may
|
|
413
|
+
* differ from what moved on chain — see {@link Payment.chainAmount} (sdk#507).
|
|
414
|
+
*/
|
|
390
415
|
amount: string;
|
|
391
416
|
fee: string;
|
|
392
417
|
net: string;
|
|
393
|
-
/**
|
|
418
|
+
/**
|
|
419
|
+
* On-chain entry amount (USD) when the service observed it (server-settle entry).
|
|
420
|
+
* PrizePool charges the **round open price**, not necessarily {@link Payment.amount}.
|
|
421
|
+
* Reconcile economics against this field (or a chain `getRound` read), not `amount` alone.
|
|
422
|
+
*/
|
|
423
|
+
chainAmount?: string;
|
|
424
|
+
/** On-chain entry amount in micro-USDC (6 dp integer string), when known. */
|
|
425
|
+
chainAmountMicro?: string;
|
|
426
|
+
/**
|
|
427
|
+
* First-party **60/30/10 projection** (pool/seed/rake USD strings) for prize-pool
|
|
428
|
+
* entries — bookkeeping preview, **not** a studio 60/30/9+1% split and **not** a
|
|
429
|
+
* chain-derived settlement observation (sdk#514). Numbers come from SDK constants
|
|
430
|
+
* (`POOL_BPS`/`SEED_BPS`/`RAKE_BPS`), not from reading the deployed pool’s
|
|
431
|
+
* constructor bps. On-chain, entry only takes the fee off the top; pool/seed
|
|
432
|
+
* split at **lock**; payable pot also includes inherited seedBank — so
|
|
433
|
+
* `split.pool` is **not** “what this round pays.” Reconcile money with
|
|
434
|
+
* {@link Payment.chainAmount} / pool `getRound`.
|
|
435
|
+
* Field name kept for compatibility (no rename in V1).
|
|
436
|
+
*/
|
|
394
437
|
split?: {
|
|
395
438
|
pool: string;
|
|
396
439
|
seed: string;
|
|
@@ -427,9 +470,17 @@ interface Payment {
|
|
|
427
470
|
interface VerifyResult {
|
|
428
471
|
id: string;
|
|
429
472
|
status: PaymentStatus;
|
|
473
|
+
/** Requested amount (USD). May differ from {@link VerifyResult.chainAmount} on server-settle entry. */
|
|
430
474
|
amount: string;
|
|
431
475
|
fee: string;
|
|
432
476
|
net: string;
|
|
477
|
+
/**
|
|
478
|
+
* On-chain settled entry amount (USD) when known — distinct from {@link VerifyResult.amount}
|
|
479
|
+
* (sdk#507 / Vault Pop DX-05b). Prefer this for pot/split economics on shared rounds.
|
|
480
|
+
*/
|
|
481
|
+
chainAmount?: string;
|
|
482
|
+
/** On-chain settled entry amount in micro-USDC, when known. */
|
|
483
|
+
chainAmountMicro?: string;
|
|
433
484
|
txHash?: `0x${string}`;
|
|
434
485
|
playerId: string;
|
|
435
486
|
sku?: string;
|
|
@@ -440,6 +491,8 @@ interface VerifyResult {
|
|
|
440
491
|
* service can never confirm on-chain. */
|
|
441
492
|
verifiedVia?: "chain" | "cache" | "degraded";
|
|
442
493
|
chainReads?: "enabled" | "degraded";
|
|
494
|
+
/** Echo of on-chain identity when the service returns it (server-settle). */
|
|
495
|
+
identity?: string;
|
|
443
496
|
}
|
|
444
497
|
type WebhookEventType = "payment.confirmed" | "payment.failed" | "payout.settled" | "refund.processed";
|
|
445
498
|
interface WebhookEvent {
|
|
@@ -587,6 +640,22 @@ interface CancelRoundResult {
|
|
|
587
640
|
status: "cancelling" | "cancelled";
|
|
588
641
|
round?: RoundState;
|
|
589
642
|
}
|
|
643
|
+
/** L34 / sdk#610 — a win is funded only after the push tx, else claimable. */
|
|
644
|
+
type PayoutNoticeStatus = "funded" | "claimable";
|
|
645
|
+
interface PayoutNotice {
|
|
646
|
+
roundId: string;
|
|
647
|
+
wallet: `0x${string}`;
|
|
648
|
+
amountMicro: string;
|
|
649
|
+
status: PayoutNoticeStatus;
|
|
650
|
+
/** Present only when status === "funded". */
|
|
651
|
+
txHash?: `0x${string}`;
|
|
652
|
+
reason?: string;
|
|
653
|
+
}
|
|
654
|
+
interface PayoutNoticesResult {
|
|
655
|
+
roundId?: string;
|
|
656
|
+
status?: string;
|
|
657
|
+
notices: PayoutNotice[];
|
|
658
|
+
}
|
|
590
659
|
/** What `rounds.prize({ … })` returns — claimable pull-payment balance (issue #41). */
|
|
591
660
|
interface PrizeBalance {
|
|
592
661
|
roundId: string;
|
|
@@ -657,6 +726,43 @@ interface SettleRoundResult {
|
|
|
657
726
|
status: "settled" | "settling";
|
|
658
727
|
}
|
|
659
728
|
|
|
729
|
+
/**
|
|
730
|
+
* EIP-5792 batch primitives — ported from the proven game-hub `payEntryOnchain`
|
|
731
|
+
* path (`OnchainEntry.ts`). One `wallet_sendCalls` sends `approve` + the settling
|
|
732
|
+
* call as ONE atomic confirmation; the paymaster sponsors gas when configured.
|
|
733
|
+
* The player sees a single Apple-Pay-style sheet.
|
|
734
|
+
*/
|
|
735
|
+
|
|
736
|
+
interface Call {
|
|
737
|
+
to: `0x${string}`;
|
|
738
|
+
data: `0x${string}`;
|
|
739
|
+
}
|
|
740
|
+
type OnchainStatus = "PENDING" | "CONFIRMED" | "FAILED";
|
|
741
|
+
|
|
742
|
+
/**
|
|
743
|
+
* Calldata builders. IAP / PrizePool entry stay on `toBytes32` (keccak of
|
|
744
|
+
* UTF-8 via toBytes) because live paid entries were written with it.
|
|
745
|
+
* Epoch execute uses `seriesToBytes32` — hex-shaped series must not drift.
|
|
746
|
+
*/
|
|
747
|
+
|
|
748
|
+
/** The server derives these identically (keccak256 of UTF-8 bytes) so the
|
|
749
|
+
* off-chain record and the on-chain call line up. */
|
|
750
|
+
declare const toBytes32: (s: string) => `0x${string}`;
|
|
751
|
+
interface EpochExecuteSettlementCallArgs {
|
|
752
|
+
epochPrizePool: `0x${string}`;
|
|
753
|
+
series: string;
|
|
754
|
+
epochId: bigint;
|
|
755
|
+
winners: `0x${string}`[];
|
|
756
|
+
amounts: bigint[];
|
|
757
|
+
signature: `0x${string}`;
|
|
758
|
+
}
|
|
759
|
+
/**
|
|
760
|
+
* EpochPrizePool.executeSignedSettlement — permissionless relay of an
|
|
761
|
+
* operator-signed podium (sdk#664 E1b). Series hashed with seriesToBytes32
|
|
762
|
+
* (not this file's toBytes32) so hex-shaped series cannot drift from the chain.
|
|
763
|
+
*/
|
|
764
|
+
declare function buildEpochExecuteSettlementCall(args: EpochExecuteSettlementCallArgs): Call;
|
|
765
|
+
|
|
660
766
|
/**
|
|
661
767
|
* Typed, actionable errors — the Stripe bar (spec §11).
|
|
662
768
|
*
|
|
@@ -728,4 +834,4 @@ declare class NothingToWithdrawError extends PlaymosError {
|
|
|
728
834
|
constructor(detail?: Record<string, unknown>);
|
|
729
835
|
}
|
|
730
836
|
|
|
731
|
-
export { type
|
|
837
|
+
export { type PaymentStatus as $, type ActiveSeriesRound as A, AuthError as B, type Call as C, ConfigError as D, type EscrowHoldInput as E, type ContractConfig as F, type Eip1193Provider as G, type GasConfig as H, type GasMode as I, InsufficientGasError as J, InvalidAmountError as K, type Listing as L, type MarketplaceListInput as M, type Network as N, type OnchainStatus as O, type PlaymosConfig as P, type ListingStatus as Q, type RoundOpenInput as R, type SettleRoundResult as S, type TransferResult as T, type MarketplaceItem as U, type VerifyResult as V, type WebhookEvent as W, type MarketplaceSale as X, MissingFieldError as Y, NothingToWithdrawError as Z, PaymentFailedError as _, type RoundState as a, type PayoutNotice as a0, type PayoutNoticeStatus as a1, PlaymosError as a2, type PlaymosErrorCode as a3, type RetryOptions as a4, type RoundGetVia as a5, type RoundStatus as a6, type WalletConfig as a7, WalletConnectionError as a8, type WalletConnector as a9, WalletTimeoutError as aa, type WebhookEventType as ab, buildEpochExecuteSettlementCall as ac, toBytes32 as ad, type RoundSettleInput as b, type RoundCancelInput as c, type CancelRoundResult as d, type RoundGetResult as e, type PayoutNoticesResult as f, type PrizeBalance as g, type WithdrawResult as h, type AgentWallet as i, type AgentFundResult as j, type EscrowHoldResult as k, type EscrowResolveResult as l, type MarketplaceSaleResult as m, type MarketplaceGetResult as n, type PayInput as o, type Payment as p, type EnterRoundInput as q, type TransferReconcile as r, type WaitOptions as s, type TransferInput as t, type TransferConfirmOptions as u, type PayoutRule as v, type ActiveForSeriesResult as w, type AgentEconomyConfig as x, AlreadyEnteredError as y, ApiError as z };
|