@domino-sdk/relay 1.67.0 → 1.68.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.
Files changed (72) hide show
  1. package/CHANGELOG.md +43 -0
  2. package/dist/{accounts-C2O8mpB8.d.ts → accounts-DnpKoJCo.d.ts} +210 -3
  3. package/dist/{attempt-captures-ClHAoo_n.d.ts → attempt-captures-DMNFMYFb.d.ts} +9 -1
  4. package/dist/authoring.d.ts +349 -38
  5. package/dist/authoring.js +125 -18
  6. package/dist/{automatic-outcomes-BEnPn4Uh.d.ts → automatic-outcomes-CQ3vpiQl.d.ts} +2 -2
  7. package/dist/avatar.d.ts +1 -1
  8. package/dist/browser.d.ts +10 -9
  9. package/dist/browser.js +12 -13
  10. package/dist/{catalog-CbiftcxQ.d.ts → catalog-BLGie8Lh.d.ts} +60 -2
  11. package/dist/chunk-4JSPMFO2.js +427 -0
  12. package/dist/{chunk-5DZNMLDM.js → chunk-55WJVFWC.js} +2 -2
  13. package/dist/{chunk-Q5QVAF7R.js → chunk-5AKD4ZF3.js} +37 -25
  14. package/dist/{chunk-DSJ46QLB.js → chunk-6UBFSMCM.js} +1 -1
  15. package/dist/{chunk-P33ZAJMS.js → chunk-6YTSRWRB.js} +1199 -677
  16. package/dist/{chunk-RDUSFUXX.js → chunk-75KF633N.js} +9 -1
  17. package/dist/{chunk-Q6KTTVOI.js → chunk-7YSVZA7A.js} +1 -1
  18. package/dist/{chunk-BMJHFWVT.js → chunk-CZ7NQ7W7.js} +10 -43
  19. package/dist/{chunk-X3FMVRMM.js → chunk-DDJN2T5A.js} +1 -1
  20. package/dist/{chunk-KUNPCDN6.js → chunk-DNPDR4Z7.js} +16 -9
  21. package/dist/{chunk-RWR2LOPA.js → chunk-EXZVWQOQ.js} +2 -2
  22. package/dist/{chunk-MVQQDPQX.js → chunk-HXTKI34N.js} +14 -2
  23. package/dist/{chunk-FGXLXENM.js → chunk-IW46TW3A.js} +21 -1
  24. package/dist/{chunk-5SBA6X5X.js → chunk-KKHENO57.js} +2 -2
  25. package/dist/{chunk-U66GUVSG.js → chunk-LZXDYSUH.js} +2 -0
  26. package/dist/{chunk-QYC3CZVD.js → chunk-MEUAJIVO.js} +2 -2
  27. package/dist/{chunk-BQXRCJ3N.js → chunk-P4TPW4SY.js} +1 -1
  28. package/dist/{chunk-NRMQVK2W.js → chunk-R3MNZKNJ.js} +1 -1
  29. package/dist/{chunk-Z2Z5DBNW.js → chunk-SD74HD75.js} +45 -9
  30. package/dist/{chunk-JK3XV2CR.js → chunk-TYZFVL73.js} +50 -8
  31. package/dist/chunk-VAGGGB6B.js +87 -0
  32. package/dist/{chunk-2HHZV7U3.js → chunk-VRZZB7CQ.js} +1 -1
  33. package/dist/{client-CZPewB9h.d.ts → client-BMif22WQ.d.ts} +133 -7
  34. package/dist/{dashboards-jGPM3AxF.d.ts → dashboards-DMk-vL1q.d.ts} +4 -4
  35. package/dist/{deployments-BVFd7ddA.d.ts → deployments-BCr418BX.d.ts} +582 -173
  36. package/dist/{identity-integration-W1Vo3Ql9.d.ts → identity-integration-r76xaAax.d.ts} +1 -1
  37. package/dist/index.d.ts +10 -10
  38. package/dist/index.js +10 -10
  39. package/dist/internal.d.ts +137 -14
  40. package/dist/internal.js +240 -19
  41. package/dist/{limits-C4RzrOV4.d.ts → limits-ByVRQePO.d.ts} +6 -1
  42. package/dist/{offers-BpYenB9i.d.ts → offers-xcPbYaEv.d.ts} +2 -2
  43. package/dist/portal-proxy.d.ts +2 -2
  44. package/dist/portal-proxy.js +11 -11
  45. package/dist/react/index.d.ts +37 -15
  46. package/dist/react/index.js +12 -13
  47. package/dist/{reward-deliveries-BOWpMytr.d.ts → reward-deliveries-0VvT6LMj.d.ts} +1 -1
  48. package/dist/runtime/authoring.js +1 -1
  49. package/dist/runtime/chunks/2UDZ6TPL.js +1 -0
  50. package/dist/runtime/manifest.json +3 -3
  51. package/dist/runtime/schema.js +1 -1
  52. package/dist/schema.d.ts +398 -104
  53. package/dist/schema.js +62 -8
  54. package/dist/server/index.d.ts +12 -12
  55. package/dist/server/index.js +2046 -886
  56. package/dist/{sign-in-providers-BRYVOSlG.d.ts → sign-in-providers-C5_753DZ.d.ts} +2 -2
  57. package/dist/solana.d.ts +171 -0
  58. package/dist/solana.js +364 -0
  59. package/dist/{submission-input-C152xIdn.d.ts → submission-input-CaL8drIh.d.ts} +2 -2
  60. package/dist/{telegram-browser-657QqiQl.d.ts → telegram-browser-DLtHPRBI.d.ts} +6 -108
  61. package/dist/telegram.d.ts +8 -8
  62. package/dist/telegram.js +2 -2
  63. package/dist/testing.d.ts +85 -13
  64. package/dist/testing.js +101 -11
  65. package/dist/{tracker-data-BqY-9Vu-.d.ts → tracker-data-CAK942sx.d.ts} +298 -1
  66. package/dist/{transport-CthYgZXK.d.ts → transport-CkidqTOk.d.ts} +5250 -1226
  67. package/dist/{wallet-Btng186v.d.ts → wallet-DQtJelQQ.d.ts} +367 -13
  68. package/dist/wallet-browser-dpmr22Xv.d.ts +106 -0
  69. package/package.json +16 -1
  70. package/dist/chunk-UWUS4OOV.js +0 -59
  71. package/dist/chunk-UYVJZR33.js +0 -34
  72. package/dist/runtime/chunks/C2MGLQXC.js +0 -1
@@ -1,21 +1,21 @@
1
- import { _ as EngagementBudget, $ as leaderboardDefinitionSchema, Z as AuthoringIdentity, a0 as pointLedgerDeclarationSchema, a1 as referralAuthoringSchema, a2 as discordMessagesSourceSchema, a3 as DiscordMessageData, a4 as DiscordMessageTextData, a5 as discordReactionsSourceSchema, a6 as DiscordReactionData, a7 as KnownIntegrationModule, P as PointBalance, C as CampaignDefinition, a8 as TextReviewInput, a9 as TextResult, aa as PhotoResult, ab as DiscordReader, ac as Decision, ad as rewardSchema, ae as triggerSchema, af as IntegrationModule, D as QuestPresentation, d as AvailabilityWindow, F as QuestProfile, G as QuizEvidence, W as IntegrationModuleProvider, ag as TieredRewardDefinition } from './accounts-C2O8mpB8.js';
2
- export { ah as KnownIntegrationModuleProvider, ai as defineCampaign, aj as defineGroup } from './accounts-C2O8mpB8.js';
3
- import { x as xContentBodySchema, I as IdentityKind, j as customSourceSchema, W as WithRecordData, k as WithContent, l as WithAccountRoles, R as ResourceHandle, Q as QuestHandle, L as LedgerReference, G as GroupHandle, m as TrackerSource, n as trackerDefinitionSchema, o as Tracker, p as TrackerData, q as SourceRoles, r as LedgerHandle, i as TrackerDataSchema, u as xSearchSourceSchema, X as XTweet, v as XContentMetric, y as TrackerTriggerPolicy, z as Where, M as MemberIdentity, A as ReferralHandle, B as TrackerTriggerContext, C as TrackerReader, D as TrackerTriggerMode, E as RoleOf, F as WhereSetting, H as ContentBody, J as BadgeHandle, N as ContentMetricName } from './tracker-data-BqY-9Vu-.js';
4
- export { P as LedgerSetting, U as TrackerPage, V as TrackerReadQuery, Y as trackerDataSchema, Z as trackerTriggerContextSchema } from './tracker-data-BqY-9Vu-.js';
1
+ import { $ as EngagementBudget, a0 as leaderboardDefinitionSchema, _ as AuthoringIdentity, a1 as pointLedgerDeclarationSchema, a2 as referralAuthoringSchema, a3 as discordMessagesSourceSchema, a4 as DiscordMessageData, a5 as DiscordMessageTextData, a6 as discordReactionsSourceSchema, a7 as DiscordReactionData, a8 as KnownIntegrationModule, P as PointBalance, C as CampaignDefinition, a9 as SolanaTransactionAction, aa as TextReviewInput, ab as TextResult, ac as PhotoResult, ad as DiscordReader, ae as Decision, af as rewardSchema, ag as triggerSchema, ah as IntegrationModule, D as QuestPresentation, d as AvailabilityWindow, F as QuestProfile, ai as QuestStation, G as QuizEvidence, X as IntegrationModuleProvider, aj as TieredRewardDefinition } from './accounts-DnpKoJCo.js';
2
+ export { ak as KnownIntegrationModuleProvider, al as defineCampaign, am as defineGroup } from './accounts-DnpKoJCo.js';
3
+ import { x as xContentBodySchema, I as IdentityKind, c as customSourceSchema, W as WithRecordData, d as WithContent, e as WithAccountRoles, R as ResourceHandle, Q as QuestHandle, L as LedgerReference, G as GroupHandle, f as TrackerSource, t as trackerDefinitionSchema, g as Tracker, h as TrackerData, i as SourceRoles, j as LedgerHandle, b as TrackerDataSchema, k as xSearchSourceSchema, X as XTweet, l as XContentMetric, m as TrackerTriggerPolicy, n as Where, M as MemberIdentity, o as ReferralHandle, p as TrackerTriggerContext, q as TrackerReader, r as TrackerTriggerMode, s as RoleOf, u as WhereSetting, C as ContentBody, B as BadgeHandle, v as ContentMetricName } from './tracker-data-CAK942sx.js';
4
+ export { w as LedgerSetting, y as TrackerPage, z as TrackerReadQuery, A as trackerDataSchema, D as trackerTriggerContextSchema } from './tracker-data-CAK942sx.js';
5
5
  import { R as ResourceSource, M as MemberCompletion, B as Budget, A as AuthorBudget, a as Announcement } from './capability-error-CuI_F7yM.js';
6
6
  export { C as CapabilityError, b as CapabilityErrorCode, T as TikTokVideoBody, c as TikTokVideoMetric, Y as YouTubeShortBody, d as YouTubeShortMetric, e as capabilityErrorCodes } from './capability-error-CuI_F7yM.js';
7
- import { N as NftCollection, q as ContractCall, r as ContractEvent, s as SolanaProgram, t as WalletBalanceSourceQuery, u as WalletTransaction, v as WalletInstruction, e as ProfileReferral, w as WalletReader } from './wallet-Btng186v.js';
8
- export { x as ContractCallParts, y as ContractCallReturnType, z as ContractEventInput, B as ContractEventParts, D as ContractFunction, E as CosmosDenom, a as CosmosNetwork, F as EvmChainId, G as NftCollectionParts, H as NftStandard, I as WalletBalance, J as WalletBalanceChange, o as WalletBalanceQuery, K as WalletBalanceSample, M as WalletCall, Q as WalletCallArgument, R as WalletCallQuery, T as WalletDelegations, U as WalletDelegationsQuery, V as WalletEventCondition, X as WalletEventValue, Y as WalletEvents, Z as WalletEventsQuery, _ as WalletNfts, $ as WalletNftsQuery, a0 as WalletTransactions, a1 as WalletTransactionsQuery, a2 as cosmosDenomSchema, a3 as cosmosNetworkSchema, a4 as isContractCall, a5 as isContractEvent, a6 as isEvmChainId, a7 as isNftCollection, a8 as isSolanaProgram, a9 as maxWalletEventLogs, aa as maxWalletEventLookback, ab as maxWalletTransactionLookback, ac as maxWalletTransactions, ad as parseContractCall, ae as parseContractEvent, af as parseContractFunction, ag as parseNftCollection } from './wallet-Btng186v.js';
7
+ import { N as NftCollection, w as ContractCall, x as ContractEvent, y as SolanaProgram, z as WalletBalanceSourceQuery, B as WalletProgramActivitySourceQuery, D as WalletNftSourceQuery, E as WalletStakeSourceQuery, F as WalletTransaction, G as WalletInstruction, f as ProfileReferral, H as WalletReader } from './wallet-DQtJelQQ.js';
8
+ export { I as ContractCallParts, J as ContractCallReturnType, K as ContractEventInput, M as ContractEventParts, Q as ContractFunction, R as CosmosDenom, a as CosmosNetwork, T as EvmChainId, U as NftCollectionParts, V as NftStandard, X as SolanaSeed, Y as SolanaSeedInteger, Z as WalletBalance, _ as WalletBalanceChange, v as WalletBalanceQuery, $ as WalletBalanceSample, a0 as WalletCall, a1 as WalletCallArgument, a2 as WalletCallQuery, a3 as WalletDelegations, a4 as WalletDelegationsQuery, a5 as WalletEventCondition, a6 as WalletEventValue, a7 as WalletEvents, a8 as WalletEventsQuery, a9 as WalletNftSample, aa as WalletNfts, ab as WalletNftsQuery, ac as WalletProgramAccount, ad as WalletProgramAccountQuery, ae as WalletProgramActivity, af as WalletStake, ag as WalletStakeQuery, ah as WalletStakeSample, ai as WalletTransactions, aj as WalletTransactionsQuery, ak as cosmosDenomSchema, al as cosmosNetworkSchema, am as isContractCall, an as isContractEvent, ao as isEvmChainId, ap as isNftCollection, aq as isSolanaProgram, ar as maxWalletEventLogs, as as maxWalletEventLookback, at as maxWalletTransactionLookback, au as maxWalletTransactions, av as parseContractCall, aw as parseContractEvent, ax as parseContractFunction, ay as parseNftCollection } from './wallet-DQtJelQQ.js';
9
9
  import * as z from 'zod';
10
10
  export { z } from 'zod';
11
- import { g as badgeDeclarationSchema, h as OfferAuthoring, B as Badge } from './offers-BpYenB9i.js';
11
+ import { g as badgeDeclarationSchema, h as OfferAuthoring, B as Badge } from './offers-xcPbYaEv.js';
12
12
  import { a as StreakPolicy, Q as QuizContent } from './streaks-0YuipsUQ.js';
13
- import { S as Setting, A as AmountSetting, B as BalanceChain, a as BoundSettings } from './dashboards-jGPM3AxF.js';
14
- export { D as DashboardInput, b as DashboardPanelInput, e as defineDashboard } from './dashboards-jGPM3AxF.js';
15
- import { e as TelegramReader, P as Prerequisite, b as TextEvidence, U as UrlEvidence, c as TextOptions, d as UrlOptions } from './submission-input-C152xIdn.js';
16
- export { f as TelegramChatMember, g as TelegramChatMemberStatus, h as TelegramConnection, i as TelegramMessageData, j as TelegramReactionData, k as balanceAtLeast, l as completed, m as inGroup } from './submission-input-C152xIdn.js';
17
- import { I as ImageReader, X as XReader } from './limits-C4RzrOV4.js';
18
- export { L as Limits, l as limits } from './limits-C4RzrOV4.js';
13
+ import { S as Setting, A as AmountSetting, B as BalanceChain, a as BoundSettings } from './dashboards-DMk-vL1q.js';
14
+ export { D as DashboardInput, b as DashboardPanelInput, d as defineDashboard } from './dashboards-DMk-vL1q.js';
15
+ import { e as TelegramReader, P as Prerequisite, b as TextEvidence, U as UrlEvidence, c as TextOptions, d as UrlOptions } from './submission-input-CaL8drIh.js';
16
+ export { f as TelegramChatMember, g as TelegramChatMemberStatus, h as TelegramConnection, i as TelegramMessageData, j as TelegramReactionData, k as balanceAtLeast, l as completed, m as inGroup } from './submission-input-CaL8drIh.js';
17
+ import { I as ImageReader, X as XReader } from './limits-ByVRQePO.js';
18
+ export { L as Limits, l as limits } from './limits-ByVRQePO.js';
19
19
  export { f as formatUnits, p as parseUnits } from './units-CwgsPB_r.js';
20
20
 
21
21
  declare function defineBadge(input: z.input<typeof badgeDeclarationSchema>): {
@@ -590,7 +590,7 @@ declare const telegram: {
590
590
  messages(): {
591
591
  kind: "custom";
592
592
  namespace: string;
593
- identities?: ("discord" | "member" | "wallet" | "x" | `app:${string}`)[] | undefined;
593
+ identities?: ("x" | "discord" | "member" | "wallet" | `app:${string}`)[] | undefined;
594
594
  accounts?: string[] | undefined;
595
595
  data?: TrackerDataSchema | undefined;
596
596
  content?: {
@@ -600,6 +600,21 @@ declare const telegram: {
600
600
  chain: string;
601
601
  token: string | null;
602
602
  } | undefined;
603
+ activity?: {
604
+ chain: string;
605
+ program: string;
606
+ instruction: string | null;
607
+ mint: string | null;
608
+ minAmount: string | null;
609
+ anySigner: boolean;
610
+ } | undefined;
611
+ nfts?: {
612
+ collection: string;
613
+ } | undefined;
614
+ stake?: {
615
+ chain: string;
616
+ voteAccount: string | null;
617
+ } | undefined;
603
618
  } & WithRecordData<{
604
619
  chatId: string;
605
620
  chatType: string;
@@ -610,7 +625,7 @@ declare const telegram: {
610
625
  reactions(): {
611
626
  kind: "custom";
612
627
  namespace: string;
613
- identities?: ("discord" | "member" | "wallet" | "x" | `app:${string}`)[] | undefined;
628
+ identities?: ("x" | "discord" | "member" | "wallet" | `app:${string}`)[] | undefined;
614
629
  accounts?: string[] | undefined;
615
630
  data?: TrackerDataSchema | undefined;
616
631
  content?: {
@@ -620,6 +635,21 @@ declare const telegram: {
620
635
  chain: string;
621
636
  token: string | null;
622
637
  } | undefined;
638
+ activity?: {
639
+ chain: string;
640
+ program: string;
641
+ instruction: string | null;
642
+ mint: string | null;
643
+ minAmount: string | null;
644
+ anySigner: boolean;
645
+ } | undefined;
646
+ nfts?: {
647
+ collection: string;
648
+ } | undefined;
649
+ stake?: {
650
+ chain: string;
651
+ voteAccount: string | null;
652
+ } | undefined;
623
653
  } & WithRecordData<{
624
654
  chatId: string;
625
655
  chatType: string;
@@ -649,7 +679,7 @@ declare const youtube: {
649
679
  shorts(): {
650
680
  kind: "custom";
651
681
  namespace: string;
652
- identities?: ("discord" | "member" | "wallet" | "x" | `app:${string}`)[] | undefined;
682
+ identities?: ("x" | "discord" | "member" | "wallet" | `app:${string}`)[] | undefined;
653
683
  accounts?: string[] | undefined;
654
684
  data?: TrackerDataSchema | undefined;
655
685
  content?: {
@@ -659,6 +689,21 @@ declare const youtube: {
659
689
  chain: string;
660
690
  token: string | null;
661
691
  } | undefined;
692
+ activity?: {
693
+ chain: string;
694
+ program: string;
695
+ instruction: string | null;
696
+ mint: string | null;
697
+ minAmount: string | null;
698
+ anySigner: boolean;
699
+ } | undefined;
700
+ nfts?: {
701
+ collection: string;
702
+ } | undefined;
703
+ stake?: {
704
+ chain: string;
705
+ voteAccount: string | null;
706
+ } | undefined;
662
707
  } & WithRecordData<ContentData<{
663
708
  title: string;
664
709
  description: string;
@@ -691,7 +736,7 @@ declare const tiktok: {
691
736
  videos(): {
692
737
  kind: "custom";
693
738
  namespace: string;
694
- identities?: ("discord" | "member" | "wallet" | "x" | `app:${string}`)[] | undefined;
739
+ identities?: ("x" | "discord" | "member" | "wallet" | `app:${string}`)[] | undefined;
695
740
  accounts?: string[] | undefined;
696
741
  data?: TrackerDataSchema | undefined;
697
742
  content?: {
@@ -701,6 +746,21 @@ declare const tiktok: {
701
746
  chain: string;
702
747
  token: string | null;
703
748
  } | undefined;
749
+ activity?: {
750
+ chain: string;
751
+ program: string;
752
+ instruction: string | null;
753
+ mint: string | null;
754
+ minAmount: string | null;
755
+ anySigner: boolean;
756
+ } | undefined;
757
+ nfts?: {
758
+ collection: string;
759
+ } | undefined;
760
+ stake?: {
761
+ chain: string;
762
+ voteAccount: string | null;
763
+ } | undefined;
704
764
  } & WithRecordData<ContentData<{
705
765
  title: string;
706
766
  description: string;
@@ -735,15 +795,47 @@ declare const tiktok: {
735
795
  * Cosmos chain with a bank denomination. A day whose reads all fail has no sample: Relay never
736
796
  * writes a balance it didn't read. Reward holding for days with
737
797
  * `automatic({ tracker, where: { path: "amount", gte: ... } })` and `streak({ days })`.
798
+ * - `wallet.nfts({ collection })`: a tracker source of daily NFT holding samples, sampled as
799
+ * `wallet.balances()` samples balances: once per project-calendar day, every wallet of the
800
+ * collection's family, one pinned EVM block or (on Solana) the slot every read must reach. `data`
801
+ * is `WalletNftSample`: how many of the collection's NFTs the wallet held, counted as
802
+ * `ctx.wallet.nfts()` counts them, except compressed NFTs: samples don't count a Token Metadata
803
+ * collection's, and refuse a Core collection with the `BubblegumV2` plugin. Each run first checks the collection as publication checks a
804
+ * `settings.nft()` value, and shows a wrong contract or mint on the tracker. Reward holding for
805
+ * days with `automatic({ tracker, where: { path: "count", gte: 1 } })` and `streak({ days })`.
806
+ * - `wallet.programActivity({ chain, program, instruction, mint, minAmount, signer })`: a tracker
807
+ * source of members' Solana transactions that call `program`. Relay reads the finalized,
808
+ * successful transactions of every Solana wallet linked by a member who joined the project, from
809
+ * the later of when the wallet was linked and the tracker's window start (at most 30 days before
810
+ * its first read), every 10 minutes. Reads are shared by the project's program activity trackers,
811
+ * so one published while another already reads the cluster records from its publication. Each
812
+ * record is one transaction, keyed by its signature, authored by the wallet's CAIP-10 account on
813
+ * `chain`, with the block time as `occurredAt` and `WalletProgramActivity` as `data`. By default
814
+ * only transactions the wallet signed count (`signer: "any"` counts others that name it).
815
+ * `instruction` narrows to one instruction of the program's IDL, and `mint` to
816
+ * transactions that change the wallet's balance of an SPL mint, by at least `minAmount` base
817
+ * units when set. Pay per transaction with `automatic({ tracker })` and a keyed completion, feed
818
+ * a leaderboard with its points, or count active days with `streak({ days })`.
738
819
  *
739
- * In SDK 1.x the source is a custom source whose namespace Relay reserves: only Relay writes its
740
- * records. A project and environment can have at most 5 of them.
820
+ * - `wallet.stake({ chain, voteAccount })`: a tracker source of daily native stake samples on
821
+ * Solana (`chain` `"solana"` for mainnet, the default, or devnet), sampled as `wallet.balances()`
822
+ * samples balances: once per project-calendar day, every linked Solana wallet, each read
823
+ * reaching the run's pinned slot. `data` is `WalletStakeSample`: the lamports the wallet
824
+ * delegates through the stake accounts it controls as staker or withdrawer, to `voteAccount`
825
+ * only when set, counted as `ctx.wallet.stake({ address })` counts that one wallet's (`amount`
826
+ * is active stake; `activating` and `deactivating` are apart). Reward keeping stake delegated
827
+ * with `automatic({ tracker, where: { path: "amount", gte: ... } })` and `streak({ days })`.
828
+ *
829
+ * In SDK 1.x each source is a custom source whose namespace Relay reserves: only Relay writes its
830
+ * records. A project and environment can have at most 5 `wallet.balances()` trackers, 5
831
+ * `wallet.nfts()` trackers, 5 `wallet.stake()` trackers and 20 `wallet.programActivity()`
832
+ * trackers.
741
833
  */
742
834
  declare const wallet: {
743
835
  balances(query: WalletBalanceSourceQuery): ({
744
836
  kind: "custom";
745
837
  namespace: string;
746
- identities?: ("discord" | "member" | "wallet" | "x" | `app:${string}`)[] | undefined;
838
+ identities?: ("x" | "discord" | "member" | "wallet" | `app:${string}`)[] | undefined;
747
839
  accounts?: string[] | undefined;
748
840
  data?: TrackerDataSchema | undefined;
749
841
  content?: {
@@ -753,6 +845,21 @@ declare const wallet: {
753
845
  chain: string;
754
846
  token: string | null;
755
847
  } | undefined;
848
+ activity?: {
849
+ chain: string;
850
+ program: string;
851
+ instruction: string | null;
852
+ mint: string | null;
853
+ minAmount: string | null;
854
+ anySigner: boolean;
855
+ } | undefined;
856
+ nfts?: {
857
+ collection: string;
858
+ } | undefined;
859
+ stake?: {
860
+ chain: string;
861
+ voteAccount: string | null;
862
+ } | undefined;
756
863
  } & WithRecordData<{
757
864
  amount: string;
758
865
  decimals: number | null;
@@ -763,6 +870,127 @@ declare const wallet: {
763
870
  token: string | null;
764
871
  };
765
872
  };
873
+ programActivity(query: WalletProgramActivitySourceQuery): ({
874
+ kind: "custom";
875
+ namespace: string;
876
+ identities?: ("x" | "discord" | "member" | "wallet" | `app:${string}`)[] | undefined;
877
+ accounts?: string[] | undefined;
878
+ data?: TrackerDataSchema | undefined;
879
+ content?: {
880
+ metrics: string[];
881
+ } | undefined;
882
+ balance?: {
883
+ chain: string;
884
+ token: string | null;
885
+ } | undefined;
886
+ activity?: {
887
+ chain: string;
888
+ program: string;
889
+ instruction: string | null;
890
+ mint: string | null;
891
+ minAmount: string | null;
892
+ anySigner: boolean;
893
+ } | undefined;
894
+ nfts?: {
895
+ collection: string;
896
+ } | undefined;
897
+ stake?: {
898
+ chain: string;
899
+ voteAccount: string | null;
900
+ } | undefined;
901
+ } & WithRecordData<{
902
+ signature: string;
903
+ slot: string;
904
+ timestamp: number;
905
+ signer: boolean;
906
+ instruction: string | null;
907
+ amount: string | null;
908
+ delta: string | null;
909
+ }> & WithAccountRoles<"author">) & {
910
+ activity: {
911
+ chain: string;
912
+ program: string;
913
+ instruction: string | null;
914
+ mint: string | null;
915
+ minAmount: string | null;
916
+ anySigner: boolean;
917
+ };
918
+ };
919
+ nfts(query: WalletNftSourceQuery): ({
920
+ kind: "custom";
921
+ namespace: string;
922
+ identities?: ("x" | "discord" | "member" | "wallet" | `app:${string}`)[] | undefined;
923
+ accounts?: string[] | undefined;
924
+ data?: TrackerDataSchema | undefined;
925
+ content?: {
926
+ metrics: string[];
927
+ } | undefined;
928
+ balance?: {
929
+ chain: string;
930
+ token: string | null;
931
+ } | undefined;
932
+ activity?: {
933
+ chain: string;
934
+ program: string;
935
+ instruction: string | null;
936
+ mint: string | null;
937
+ minAmount: string | null;
938
+ anySigner: boolean;
939
+ } | undefined;
940
+ nfts?: {
941
+ collection: string;
942
+ } | undefined;
943
+ stake?: {
944
+ chain: string;
945
+ voteAccount: string | null;
946
+ } | undefined;
947
+ } & WithRecordData<{
948
+ count: string;
949
+ block: string;
950
+ }> & WithAccountRoles<"author">) & {
951
+ nfts: {
952
+ collection: NftCollection;
953
+ };
954
+ };
955
+ stake(query?: WalletStakeSourceQuery): ({
956
+ kind: "custom";
957
+ namespace: string;
958
+ identities?: ("x" | "discord" | "member" | "wallet" | `app:${string}`)[] | undefined;
959
+ accounts?: string[] | undefined;
960
+ data?: TrackerDataSchema | undefined;
961
+ content?: {
962
+ metrics: string[];
963
+ } | undefined;
964
+ balance?: {
965
+ chain: string;
966
+ token: string | null;
967
+ } | undefined;
968
+ activity?: {
969
+ chain: string;
970
+ program: string;
971
+ instruction: string | null;
972
+ mint: string | null;
973
+ minAmount: string | null;
974
+ anySigner: boolean;
975
+ } | undefined;
976
+ nfts?: {
977
+ collection: string;
978
+ } | undefined;
979
+ stake?: {
980
+ chain: string;
981
+ voteAccount: string | null;
982
+ } | undefined;
983
+ } & WithRecordData<{
984
+ amount: string;
985
+ activating: string;
986
+ deactivating: string;
987
+ block: string;
988
+ }> & WithAccountRoles<"author">) & {
989
+ stake: {
990
+ chain: string;
991
+ voteAccount: string | null;
992
+ };
993
+ };
766
994
  };
767
995
  declare const pointLedgers: () => ResourceSource;
768
996
  type Label = {
@@ -829,16 +1057,16 @@ declare const settings: {
829
1057
  */
830
1058
  chain(options: Label & {
831
1059
  default: BalanceChain;
832
- }): Setting<"text", z.ZodDefault<z.ZodPipe<z.ZodString, z.ZodTransform<"solana" | "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp" | "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1" | `eip155:${number}`, string>>>>;
1060
+ }): Setting<"text", z.ZodDefault<z.ZodPipe<z.ZodString, z.ZodTransform<"solana" | `eip155:${number}` | "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp" | "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", string>>>>;
833
1061
  /**
834
1062
  * An NFT collection `ctx.wallet.nfts()` reads, as a CAIP-19 asset type: an EVM chain, the
835
1063
  * standard and the contract, such as `"eip155:1/erc721:0x…"`, or `"eip155:8453/erc1155:0x…/1"` for
836
- * one ERC-1155 token ID; or a Solana cluster and a Metaplex collection NFT's mint there,
837
- * `"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp/nft:<mint>"` on mainnet or
838
- * `"solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1/nft:<mint>"` on devnet. Relay checks it when the collection is
839
- * published or edited: an EVM chain must be one `ctx.wallet.balance()` reads and the contract
840
- * must report the standard through ERC-165 `supportsInterface`; a Solana mint must be a Metaplex
841
- * collection NFT on its cluster. Typed as the query's collection, so it passes to
1064
+ * one ERC-1155 token ID; or a Solana cluster and a Metaplex Core collection's address or a Token
1065
+ * Metadata collection NFT's mint there, `"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp/nft:<address>"`
1066
+ * on mainnet or `"solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1/nft:<address>"` on devnet. Relay checks
1067
+ * it when the collection is published or edited: an EVM chain must be one `ctx.wallet.balance()`
1068
+ * reads and the contract must report the standard through ERC-165 `supportsInterface`; a Solana
1069
+ * address must be a Core collection or a Metaplex collection NFT on its cluster. Typed as the query's collection, so it passes to
842
1070
  * `ctx.wallet.nfts({ collection })` as it is.
843
1071
  */
844
1072
  nft(options: Label & {
@@ -868,9 +1096,10 @@ declare const settings: {
868
1096
  default: ContractEvent;
869
1097
  }): Setting<"text", z.ZodDefault<z.ZodPipe<z.ZodString, z.ZodTransform<`eip155:${number}:0x${string} ${string}`, string>>>>;
870
1098
  /**
871
- * A Solana program `ctx.wallet.transactions()` reads: its base58 address, such as Jupiter's
872
- * `"JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4"`. Relay checks it when it is published or
873
- * edited: the account must be an executable program on Solana mainnet or devnet.
1099
+ * A Solana program `ctx.wallet.transactions()` or `ctx.wallet.programAccount()` reads: its base58
1100
+ * address, such as Jupiter's `"JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4"`. Relay checks it when
1101
+ * it is published or edited: the account must be an executable program on Solana mainnet or
1102
+ * devnet. Its IDL (Anchor, Codama or Shank), stored then, decodes the program's instructions and accounts.
874
1103
  */
875
1104
  solanaProgram(options: Label & {
876
1105
  default: SolanaProgram;
@@ -916,7 +1145,7 @@ declare function swapped(tx: WalletTransaction, options?: {
916
1145
  declare function invoked(tx: WalletTransaction, program: string): boolean;
917
1146
  /**
918
1147
  * The arguments of the first instruction of the program in `tx` named `name`, as the program's
919
- * Anchor IDL spells it, or `null` when there is none, or the program's setting has no IDL.
1148
+ * IDL spells it, or `null` when there is none, or the program's setting has no IDL.
920
1149
  */
921
1150
  declare function instruction(tx: WalletTransaction, name: string): WalletInstruction["args"] | null;
922
1151
 
@@ -1053,8 +1282,9 @@ type TrackerTriggerInput<T extends Tracker = Tracker, W extends Where<TrackerDat
1053
1282
  tracker: T;
1054
1283
  /**
1055
1284
  * Which observations fire. `"new-record"`: each record's first observation (the default for X,
1056
- * Discord and Telegram trackers, where it means each newly collected post, message or reaction,
1057
- * so a removed and re-added Telegram reaction does not fire again). `"new-observation"`: each
1285
+ * Discord, Telegram and `wallet.programActivity()` trackers, where it means each newly collected
1286
+ * post, message, reaction or transaction, so a removed and re-added Telegram reaction does not
1287
+ * fire again). `"new-observation"`: each
1058
1288
  * observation that becomes its record's current one (the default for other custom trackers,
1059
1289
  * YouTube and TikTok included, where every refresh observes each video again). `"data-changed"`: a
1060
1290
  * new record, or a current observation whose `data` differs from the previous one.
@@ -1182,6 +1412,14 @@ type KeyedContext = {
1182
1412
  };
1183
1413
  /** The pinned tracker observation of a tracker-triggered quest; null for other triggers. */
1184
1414
  tracker: TrackerTriggerContext | null;
1415
+ /**
1416
+ * The signed Solana transaction that started the attempt, with its memo's `reference`; null or
1417
+ * absent for any other attempt. `keyed((ctx) => ctx.action?.reference ?? "app")` completes once per
1418
+ * reference.
1419
+ *
1420
+ * @experimental A minor release can change quest actions.
1421
+ */
1422
+ action?: SolanaTransactionAction | null;
1185
1423
  eligibleAt: number;
1186
1424
  /** The evaluation run's pinned project calendar. */
1187
1425
  calendar: EvaluationCalendar;
@@ -1228,6 +1466,18 @@ declare const keyed: (key: (ctx: KeyedContext) => string, options?: KeyedOptions
1228
1466
  kind: "keyed";
1229
1467
  key: (ctx: KeyedContext) => string;
1230
1468
  };
1469
+ /**
1470
+ * The completion of a quest with `stations`: each member completes it once per station, keyed by
1471
+ * the station the signed transaction's memo names. Relay refuses a transaction for an unknown or
1472
+ * closed station before the quest runs, and a member's own submission of the quest.
1473
+ *
1474
+ * @experimental A minor release can change check-in stations.
1475
+ */
1476
+ declare const perStation: () => {
1477
+ across?: "members" | undefined;
1478
+ kind: "keyed";
1479
+ key: (ctx: KeyedContext) => string;
1480
+ };
1231
1481
  type ProgressDefinition<C> = {
1232
1482
  distinct: (ctx: C) => string;
1233
1483
  goal: ReturnType<typeof count>;
@@ -1484,6 +1734,14 @@ type EvaluationContext<T, I = {
1484
1734
  * body type.
1485
1735
  */
1486
1736
  tracker: ContextTracker<G>;
1737
+ /**
1738
+ * The action that started this attempt: the Solana transaction the member signed, which an app's
1739
+ * server submitted with `management.attempts.submitSolanaTransaction()`, with the signing wallet
1740
+ * and the memo's `reference`. Null or absent for any other attempt.
1741
+ *
1742
+ * @experimental A minor release can change quest actions.
1743
+ */
1744
+ action?: SolanaTransactionAction | null;
1487
1745
  /**
1488
1746
  * When the activity happened, in epoch milliseconds: the tracker record's occurrence time, else
1489
1747
  * when the attempt was admitted. Budgets and daily keys use it.
@@ -1561,6 +1819,7 @@ type CompletionPolicies<S, G> = {
1561
1819
  keyed: (key: (ctx: QuestKeyedContext<S, G>) => string, options?: KeyedOptions) => ReturnType<typeof keyed>;
1562
1820
  streak: typeof streak;
1563
1821
  progress: (definition: ProgressDefinition<QuestKeyedContext<S, G>>) => ReturnType<typeof progress>;
1822
+ perStation: typeof perStation;
1564
1823
  };
1565
1824
  /** How a quest completes: a content quest once per content item, so it takes no `completion`. */
1566
1825
  type CompletionFor<G, S> = IsContent<G> extends true ? {
@@ -1636,6 +1895,18 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
1636
1895
  * Omit it for no cooldown.
1637
1896
  */
1638
1897
  completionCooldownMs?: number;
1898
+ /**
1899
+ * Check-in stations, up to 200: `{ key, label, opensAt?, closesAt? }`, with each key the
1900
+ * `reference` of a station's memo (`solanaActionMemo({ quest, reference })`) and the window
1901
+ * in epoch milliseconds. A signed transaction completes the quest only when its memo names
1902
+ * a station that was open at the transaction's block time; complete it once per station
1903
+ * with `perStation()`. Only on a member-submitted `manual()` quest without input. Keep a
1904
+ * station's key once its codes are printed: to rotate codes, add a station and close the
1905
+ * old one.
1906
+ *
1907
+ * @experimental A minor release can change check-in stations.
1908
+ */
1909
+ stations?: readonly QuestStation[];
1639
1910
  /**
1640
1911
  * Whether staff can review this quest's attempts. Human review is on unless this returns
1641
1912
  * `{ enabled: false }`. With it off, `decision.review(...)` becomes a reject that keeps the
@@ -1732,7 +2003,7 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
1732
2003
  imageAlt?: string | undefined;
1733
2004
  requirements?: ({
1734
2005
  kind: "account";
1735
- provider: "discord" | "x" | "google" | "apple";
2006
+ provider: "x" | "discord" | "google" | "apple";
1736
2007
  } | {
1737
2008
  kind: "wallet";
1738
2009
  chain?: "solana" | "eip155" | "cosmos" | undefined;
@@ -1756,7 +2027,7 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
1756
2027
  } | undefined;
1757
2028
  } | undefined;
1758
2029
  };
1759
- integrations: ("discord" | "x")[];
2030
+ integrations: ("x" | "discord")[];
1760
2031
  fields: Record<string, {
1761
2032
  kind: "point-ledger";
1762
2033
  default: string;
@@ -2037,6 +2308,12 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
2037
2308
  }[] | undefined;
2038
2309
  retryCooldownMs?: number | undefined;
2039
2310
  completionCooldownMs?: number | undefined;
2311
+ stations?: {
2312
+ key: string;
2313
+ label: string;
2314
+ opensAt?: number | undefined;
2315
+ closesAt?: number | undefined;
2316
+ }[] | undefined;
2040
2317
  };
2041
2318
  evaluate(ctx: {
2042
2319
  settings: unknown;
@@ -2049,6 +2326,14 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
2049
2326
  * body type.
2050
2327
  */
2051
2328
  tracker: TrackerTriggerContext | null;
2329
+ /**
2330
+ * The action that started this attempt: the Solana transaction the member signed, which an app's
2331
+ * server submitted with `management.attempts.submitSolanaTransaction()`, with the signing wallet
2332
+ * and the memo's `reference`. Null or absent for any other attempt.
2333
+ *
2334
+ * @experimental A minor release can change quest actions.
2335
+ */
2336
+ action?: SolanaTransactionAction | null;
2052
2337
  /**
2053
2338
  * When the activity happened, in epoch milliseconds: the tracker record's occurrence time, else
2054
2339
  * when the attempt was admitted. Budgets and daily keys use it.
@@ -2137,6 +2422,18 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
2137
2422
  * Omit it for no cooldown.
2138
2423
  */
2139
2424
  completionCooldownMs?: number;
2425
+ /**
2426
+ * Check-in stations, up to 200: `{ key, label, opensAt?, closesAt? }`, with each key the
2427
+ * `reference` of a station's memo (`solanaActionMemo({ quest, reference })`) and the window
2428
+ * in epoch milliseconds. A signed transaction completes the quest only when its memo names
2429
+ * a station that was open at the transaction's block time; complete it once per station
2430
+ * with `perStation()`. Only on a member-submitted `manual()` quest without input. Keep a
2431
+ * station's key once its codes are printed: to rotate codes, add a station and close the
2432
+ * old one.
2433
+ *
2434
+ * @experimental A minor release can change check-in stations.
2435
+ */
2436
+ stations?: readonly QuestStation[];
2140
2437
  /**
2141
2438
  * Whether staff can review this quest's attempts. Human review is on unless this returns
2142
2439
  * `{ enabled: false }`. With it off, `decision.review(...)` becomes a reject that keeps the
@@ -2233,7 +2530,7 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
2233
2530
  imageAlt?: string | undefined;
2234
2531
  requirements?: ({
2235
2532
  kind: "account";
2236
- provider: "discord" | "x" | "google" | "apple";
2533
+ provider: "x" | "discord" | "google" | "apple";
2237
2534
  } | {
2238
2535
  kind: "wallet";
2239
2536
  chain?: "solana" | "eip155" | "cosmos" | undefined;
@@ -2257,7 +2554,7 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
2257
2554
  } | undefined;
2258
2555
  } | undefined;
2259
2556
  };
2260
- integrations: ("discord" | "x")[];
2557
+ integrations: ("x" | "discord")[];
2261
2558
  fields: Record<string, {
2262
2559
  kind: "point-ledger";
2263
2560
  default: string;
@@ -2538,6 +2835,12 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
2538
2835
  }[] | undefined;
2539
2836
  retryCooldownMs?: number | undefined;
2540
2837
  completionCooldownMs?: number | undefined;
2838
+ stations?: {
2839
+ key: string;
2840
+ label: string;
2841
+ opensAt?: number | undefined;
2842
+ closesAt?: number | undefined;
2843
+ }[] | undefined;
2541
2844
  };
2542
2845
  evaluate(ctx: {
2543
2846
  settings: unknown;
@@ -2550,6 +2853,14 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
2550
2853
  * body type.
2551
2854
  */
2552
2855
  tracker: TrackerTriggerContext | null;
2856
+ /**
2857
+ * The action that started this attempt: the Solana transaction the member signed, which an app's
2858
+ * server submitted with `management.attempts.submitSolanaTransaction()`, with the signing wallet
2859
+ * and the memo's `reference`. Null or absent for any other attempt.
2860
+ *
2861
+ * @experimental A minor release can change quest actions.
2862
+ */
2863
+ action?: SolanaTransactionAction | null;
2553
2864
  /**
2554
2865
  * When the activity happened, in epoch milliseconds: the tracker record's occurrence time, else
2555
2866
  * when the attempt was admitted. Budgets and daily keys use it.
@@ -2599,4 +2910,4 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
2599
2910
  }): Promise<Decision>;
2600
2911
  } & ResourceHandle<"quest">;
2601
2912
 
2602
- export { AmountSetting, BalanceChain, ContentBody, type ContentData, ContentMetricName, type ContentTrigger, type ContentTriggerInput, ContractCall, ContractEvent, DiscordMessageData, DiscordMessageTextData, DiscordReactionData, DiscordReader, type EvaluationCalendar, type EvaluationCalendarDay, type EvaluationContext, type EvaluationMember, GroupHandle, IdentityKind, ImageReader, IntegrationModule, IntegrationModuleProvider, type KeyedContext, type KeyedOptions, KnownIntegrationModule, LedgerHandle, LedgerReference, MemberCompletion, type MemberCompletionQuery, MemberIdentity, NftCollection, type Outcome, type PerformanceContext, type PerformanceOutcome, PointBalance, ProfileReferral, QuestHandle, type QuestKeyedContext, ReferralHandle, RoleOf, Setting, SolanaProgram, TelegramReader, Tracker, TrackerData, TrackerDataSchema, TrackerReader, type TrackerTrigger, TrackerTriggerContext, type TrackerTriggerInput, type TriggerAdmission, WalletBalanceSourceQuery, WalletInstruction, WalletReader, WalletTransaction, Where, type XContentBody, XReader, automatic, automaticFulfillment, badge, budget, calendar, content, count, customSource, decision, defineBadge, defineEngagementReward, defineLeaderboard, defineLedger, defineOffer, defineQuest, defineQuestType, defineReferral, defineTieredReward, defineTracker, discord, earned, evaluators, evidence, groupMembership, instruction, invoked, keyed, leaderboardTiesWarning, manual, once, pointLedgers, points, progress, questCompleted, received, rolling, settings, spent, staffHandover, streak, swapped, telegram, tiktok, untracked, wallet, x, youtube };
2913
+ export { AmountSetting, BalanceChain, ContentBody, type ContentData, ContentMetricName, type ContentTrigger, type ContentTriggerInput, ContractCall, ContractEvent, DiscordMessageData, DiscordMessageTextData, DiscordReactionData, DiscordReader, type EvaluationCalendar, type EvaluationCalendarDay, type EvaluationContext, type EvaluationMember, GroupHandle, IdentityKind, ImageReader, IntegrationModule, IntegrationModuleProvider, type KeyedContext, type KeyedOptions, KnownIntegrationModule, LedgerHandle, LedgerReference, MemberCompletion, type MemberCompletionQuery, MemberIdentity, NftCollection, type Outcome, type PerformanceContext, type PerformanceOutcome, PointBalance, ProfileReferral, QuestHandle, type QuestKeyedContext, QuestStation, ReferralHandle, RoleOf, Setting, SolanaProgram, SolanaTransactionAction, TelegramReader, Tracker, TrackerData, TrackerDataSchema, TrackerReader, type TrackerTrigger, TrackerTriggerContext, type TrackerTriggerInput, type TriggerAdmission, WalletBalanceSourceQuery, WalletInstruction, WalletNftSourceQuery, WalletProgramActivitySourceQuery, WalletReader, WalletStakeSourceQuery, WalletTransaction, Where, type XContentBody, XReader, automatic, automaticFulfillment, badge, budget, calendar, content, count, customSource, decision, defineBadge, defineEngagementReward, defineLeaderboard, defineLedger, defineOffer, defineQuest, defineQuestType, defineReferral, defineTieredReward, defineTracker, discord, earned, evaluators, evidence, groupMembership, instruction, invoked, keyed, leaderboardTiesWarning, manual, once, perStation, pointLedgers, points, progress, questCompleted, received, rolling, settings, spent, staffHandover, streak, swapped, telegram, tiktok, untracked, wallet, x, youtube };