@domino-sdk/relay 1.67.0 → 1.69.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/CHANGELOG.md +65 -0
- package/dist/{accounts-C2O8mpB8.d.ts → accounts-DD4gAOCe.d.ts} +232 -3
- package/dist/{action-9Xl0StBg.d.ts → action-BDFKqGlH.d.ts} +3 -2
- package/dist/{attempt-captures-ClHAoo_n.d.ts → attempt-captures-CbuCmthd.d.ts} +11 -2
- package/dist/authoring.d.ts +534 -48
- package/dist/authoring.js +192 -29
- package/dist/{automatic-outcomes-BEnPn4Uh.d.ts → automatic-outcomes-DE3vfi8g.d.ts} +11 -3
- package/dist/avatar.d.ts +2 -1
- package/dist/browser.d.ts +15 -13
- package/dist/browser.js +12 -13
- package/dist/{capability-error-CuI_F7yM.d.ts → capability-error-db7kO8-P.d.ts} +2 -1
- package/dist/{catalog-CbiftcxQ.d.ts → catalog-Cf3fHDNn.d.ts} +69 -3
- package/dist/{chunk-5DZNMLDM.js → chunk-2A3BJ262.js} +2 -2
- package/dist/{chunk-BQXRCJ3N.js → chunk-5RLIPTL7.js} +1 -1
- package/dist/{chunk-MVQQDPQX.js → chunk-AZDZEQFK.js} +14 -2
- package/dist/{chunk-JK3XV2CR.js → chunk-BRROI4CH.js} +50 -8
- package/dist/{chunk-P33ZAJMS.js → chunk-CQVKOD3B.js} +1266 -677
- package/dist/{chunk-QYC3CZVD.js → chunk-CZ23KRVK.js} +2 -2
- package/dist/{chunk-X3FMVRMM.js → chunk-DIXYVGXO.js} +1 -1
- package/dist/{chunk-RDUSFUXX.js → chunk-GEVARKEV.js} +9 -1
- package/dist/{chunk-2HHZV7U3.js → chunk-LDO5GP7G.js} +1 -1
- package/dist/{chunk-Z2Z5DBNW.js → chunk-LGGD7S5T.js} +45 -9
- package/dist/{chunk-U66GUVSG.js → chunk-LZXDYSUH.js} +2 -0
- package/dist/{chunk-NRMQVK2W.js → chunk-ME2KUAVJ.js} +1 -1
- package/dist/{chunk-KUNPCDN6.js → chunk-ODJGTFPY.js} +16 -9
- package/dist/{chunk-DSJ46QLB.js → chunk-PO2ZDY27.js} +1 -1
- package/dist/{chunk-RWR2LOPA.js → chunk-RKTMSTT7.js} +2 -2
- package/dist/{chunk-5SBA6X5X.js → chunk-SWLW4VN3.js} +2 -2
- package/dist/{chunk-BMJHFWVT.js → chunk-TCREFRPK.js} +10 -43
- package/dist/{chunk-Q5QVAF7R.js → chunk-UGM6DUB2.js} +42 -25
- package/dist/chunk-VAGGGB6B.js +87 -0
- package/dist/{chunk-FGXLXENM.js → chunk-VNEJH4NT.js} +47 -3
- package/dist/chunk-WNEQEDMU.js +427 -0
- package/dist/{chunk-Q6KTTVOI.js → chunk-WVK3G2J2.js} +1 -1
- package/dist/{client-CZPewB9h.d.ts → client-6eSYOl8h.d.ts} +159 -11
- package/dist/{dashboards-jGPM3AxF.d.ts → dashboards-DCOAXL54.d.ts} +6 -5
- package/dist/{deployments-BVFd7ddA.d.ts → deployments-BIfdCMd5.d.ts} +911 -309
- package/dist/{host-environment-FN4zg3hw.d.ts → host-environment-DUw5-Cvj.d.ts} +2 -1
- package/dist/{identity-integration-W1Vo3Ql9.d.ts → identity-integration-BlfOn8rc.d.ts} +3 -2
- package/dist/index.d.ts +16 -15
- package/dist/index.js +10 -10
- package/dist/internal.d.ts +155 -17
- package/dist/internal.js +266 -19
- package/dist/{limits-C4RzrOV4.d.ts → limits-Ctaeq23J.d.ts} +8 -2
- package/dist/{offers-BpYenB9i.d.ts → offers-COqHGbHm.d.ts} +4 -3
- package/dist/{participant-activity-DXRq4s6K.d.ts → participant-activity-BznrcePT.d.ts} +2 -1
- package/dist/{participant-rewards-BcWkBRn_.d.ts → participant-rewards-s5Gn23qb.d.ts} +23 -1
- package/dist/portal-proxy.d.ts +7 -4
- package/dist/portal-proxy.js +14 -18
- package/dist/profiles-CLDKZVFx.d.ts +370 -0
- package/dist/react/index.d.ts +71 -30
- package/dist/react/index.js +12 -13
- package/dist/{request-error-D_dUPLwo.d.ts → request-error-C24SY7n9.d.ts} +2 -1
- package/dist/{reward-deliveries-BOWpMytr.d.ts → reward-deliveries-DFhYGJdx.d.ts} +3 -2
- package/dist/runtime/authoring.js +1 -1
- package/dist/runtime/chunks/HKAI5OQA.js +1 -0
- package/dist/runtime/manifest.json +3 -3
- package/dist/runtime/schema.js +1 -1
- package/dist/schema.d.ts +556 -180
- package/dist/schema.js +70 -8
- package/dist/server/index.d.ts +15 -14
- package/dist/server/index.js +2053 -893
- package/dist/{sign-in-providers-BRYVOSlG.d.ts → sign-in-providers-C97mRNbG.d.ts} +4 -3
- package/dist/solana.d.ts +287 -0
- package/dist/solana.js +699 -0
- package/dist/{streaks-0YuipsUQ.d.ts → streaks-MAqKHbHC.d.ts} +2 -1
- package/dist/{submission-input-C152xIdn.d.ts → submission-input-BD7nORuh.d.ts} +4 -3
- package/dist/{telegram-browser-657QqiQl.d.ts → telegram-browser-gRMgGs7B.d.ts} +8 -109
- package/dist/telegram.d.ts +14 -12
- package/dist/telegram.js +2 -2
- package/dist/testing.d.ts +99 -18
- package/dist/testing.js +101 -11
- package/dist/{tracker-data-BqY-9Vu-.d.ts → tracker-data-DQgX3FIc.d.ts} +493 -1
- package/dist/{transport-CthYgZXK.d.ts → transport-BLU8jrhg.d.ts} +7340 -2134
- package/dist/vite.d.ts +2 -1
- package/dist/{wallet-Btng186v.d.ts → wallet-CPAjrW4k.d.ts} +339 -308
- package/dist/wallet-browser-BzPt_Qb5.d.ts +107 -0
- package/package.json +21 -3
- package/dist/chunk-UWUS4OOV.js +0 -59
- package/dist/chunk-UYVJZR33.js +0 -34
- package/dist/runtime/chunks/C2MGLQXC.js +0 -1
package/dist/authoring.d.ts
CHANGED
|
@@ -1,21 +1,31 @@
|
|
|
1
|
-
import { _ as
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
export {
|
|
5
|
-
import { R as
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { _ as AuthoringIdentity, a4 as DiscordMessageData, a5 as DiscordMessageTextData, a7 as DiscordReactionData, a8 as KnownIntegrationModule, P as PointBalance, a9 as SolanaTransactionAction, ad as DiscordReader, ah as IntegrationModule, ai as QuestStation, X as IntegrationModuleProvider } from './accounts-DD4gAOCe.js';
|
|
2
|
+
import { CampaignDefinition, QuestPresentation, AvailabilityWindow, QuestProfile, QuizEvidence } from './index.js';
|
|
3
|
+
import { EngagementBudget, leaderboardDefinitionSchema, pointLedgerDeclarationSchema, referralAuthoringSchema, discordMessagesSourceSchema, discordReactionsSourceSchema, TextReviewInput, TextResult, PhotoResult, Decision, rewardSchema, triggerSchema, TieredRewardDefinition } from './schema.js';
|
|
4
|
+
export { ak as KnownIntegrationModuleProvider, al as defineCampaign, am as defineGroup } from './accounts-DD4gAOCe.js';
|
|
5
|
+
import { I as IdentityKind, R as ResourceHandle, Q as QuestHandle, L as LedgerReference, G as GroupHandle, g as Tracker, h as TrackerData, j as LedgerHandle, b as TrackerDataSchema, n as Where, M as MemberIdentity, o as ReferralHandle, p as TrackerTriggerContext, q as TrackerReader, s as RoleOf, C as ContentBody, B as BadgeHandle, v as ContentMetricName } from './tracker-data-DQgX3FIc.js';
|
|
6
|
+
import { xContentBodySchema, customSourceSchema, WithRecordData, WithContent, WithAccountRoles, TrackerSource, trackerDefinitionSchema, SourceRoles, xSearchSourceSchema, XTweet, XContentMetric, TrackerTriggerPolicy, TrackerTriggerMode, WhereSetting } from './schema.js';
|
|
7
|
+
export { w as LedgerSetting, y as TrackerPage, z as TrackerReadQuery, A as trackerDataSchema, D as trackerTriggerContextSchema } from './tracker-data-DQgX3FIc.js';
|
|
8
|
+
import { M as MemberCompletion } from './capability-error-db7kO8-P.js';
|
|
9
|
+
import { ResourceSource, Budget, AuthorBudget, Announcement } from './schema.js';
|
|
10
|
+
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-db7kO8-P.js';
|
|
11
|
+
import { e as ProfileReferral } from './profiles-CLDKZVFx.js';
|
|
12
|
+
import { N as NftCollection, o as ContractCall, p as ContractEvent, q as SolanaProgram, n as SolanaSeed, r as WalletBalanceSourceQuery, t as WalletProgramActivitySourceQuery, u as WalletNftSourceQuery, v as WalletStakeSourceQuery, w as WalletProgramAccountSourceQuery, x as WalletTransaction, y as WalletInstruction, z as WalletReader } from './wallet-CPAjrW4k.js';
|
|
13
|
+
import { SolanaIdlSource } from './schema.js';
|
|
14
|
+
export { A as ContractCallParts, B as ContractCallReturnType, D as ContractEventInput, E as ContractEventParts, F as ContractFunction, G as CosmosDenom, a as CosmosNetwork, H as EvmChainId, I as NftCollectionParts, J as NftStandard, K as SolanaSeedInteger, M as WalletBalance, O as WalletBalanceChange, k as WalletBalanceQuery, P as WalletBalanceSample, Q as WalletCall, R as WalletCallArgument, T as WalletCallQuery, U as WalletDelegations, V as WalletDelegationsQuery, X as WalletEventCondition, Y as WalletEventValue, Z as WalletEvents, _ as WalletEventsQuery, $ as WalletNftSample, a0 as WalletNfts, a1 as WalletNftsQuery, a2 as WalletProgramAccount, a3 as WalletProgramAccountQuery, a4 as WalletProgramAccountSample, a5 as WalletProgramActivity, a6 as WalletStake, a7 as WalletStakeQuery, a8 as WalletStakeSample, a9 as WalletTransactions, aa as WalletTransactionsQuery, ab as cosmosDenomSchema, ac as cosmosNetworkSchema, ad as isContractCall, ae as isContractEvent, af as isEvmChainId, ag as isNftCollection, ah as isSolanaProgram, ai as maxWalletEventLogs, aj as maxWalletEventLookback, ak as maxWalletTransactionLookback, al as maxWalletTransactions, am as parseContractCall, an as parseContractEvent, ao as parseContractFunction, ap as parseNftCollection } from './wallet-CPAjrW4k.js';
|
|
9
15
|
import * as z from 'zod';
|
|
10
16
|
export { z } from 'zod';
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
import {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
import { Badge } from './index.js';
|
|
18
|
+
import { badgeDeclarationSchema, OfferAuthoring } from './schema.js';
|
|
19
|
+
import { QuizContent } from './index.js';
|
|
20
|
+
import { StreakPolicy } from './schema.js';
|
|
21
|
+
import { S as Setting, A as AmountSetting, B as BalanceChain } from './dashboards-DCOAXL54.js';
|
|
22
|
+
import { BoundSettings } from './schema.js';
|
|
23
|
+
export { D as DashboardInput, b as DashboardPanelInput, d as defineDashboard } from './dashboards-DCOAXL54.js';
|
|
24
|
+
import { e as TelegramReader } from './submission-input-BD7nORuh.js';
|
|
25
|
+
import { Prerequisite, TextEvidence, UrlEvidence, TextOptions, UrlOptions } from './index.js';
|
|
26
|
+
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-BD7nORuh.js';
|
|
27
|
+
import { I as ImageReader, X as XReader } from './limits-Ctaeq23J.js';
|
|
28
|
+
export { L as Limits, l as limits } from './limits-Ctaeq23J.js';
|
|
19
29
|
export { f as formatUnits, p as parseUnits } from './units-CwgsPB_r.js';
|
|
20
30
|
|
|
21
31
|
declare function defineBadge(input: z.input<typeof badgeDeclarationSchema>): {
|
|
@@ -245,7 +255,6 @@ declare function defineReferral(input: Omit<ReferralInput, "qualification" | "in
|
|
|
245
255
|
} | {
|
|
246
256
|
kind: "external";
|
|
247
257
|
};
|
|
248
|
-
enabled: boolean;
|
|
249
258
|
milestones: {
|
|
250
259
|
id: string;
|
|
251
260
|
count: number;
|
|
@@ -276,6 +285,7 @@ declare function defineReferral(input: Omit<ReferralInput, "qualification" | "in
|
|
|
276
285
|
amount: number;
|
|
277
286
|
})[];
|
|
278
287
|
}[];
|
|
288
|
+
enabled: boolean;
|
|
279
289
|
bonuses: {
|
|
280
290
|
id: string;
|
|
281
291
|
balance: string;
|
|
@@ -345,7 +355,7 @@ declare function defineLeaderboard(input: Omit<LeaderboardInput, "key" | "id" |
|
|
|
345
355
|
}): {
|
|
346
356
|
title: string;
|
|
347
357
|
balance: string;
|
|
348
|
-
access: "
|
|
358
|
+
access: "public" | "participants";
|
|
349
359
|
score: {
|
|
350
360
|
kind: "balance";
|
|
351
361
|
} | {
|
|
@@ -590,7 +600,7 @@ declare const telegram: {
|
|
|
590
600
|
messages(): {
|
|
591
601
|
kind: "custom";
|
|
592
602
|
namespace: string;
|
|
593
|
-
identities?: ("
|
|
603
|
+
identities?: ("member" | "discord" | "x" | "wallet" | `app:${string}`)[] | undefined;
|
|
594
604
|
accounts?: string[] | undefined;
|
|
595
605
|
data?: TrackerDataSchema | undefined;
|
|
596
606
|
content?: {
|
|
@@ -600,6 +610,33 @@ declare const telegram: {
|
|
|
600
610
|
chain: string;
|
|
601
611
|
token: string | null;
|
|
602
612
|
} | undefined;
|
|
613
|
+
activity?: {
|
|
614
|
+
chain: string;
|
|
615
|
+
program: string;
|
|
616
|
+
instruction: string | null;
|
|
617
|
+
mint: string | null;
|
|
618
|
+
minAmount: string | null;
|
|
619
|
+
anySigner: boolean;
|
|
620
|
+
} | undefined;
|
|
621
|
+
nfts?: {
|
|
622
|
+
collection: string;
|
|
623
|
+
} | undefined;
|
|
624
|
+
stake?: {
|
|
625
|
+
chain: string;
|
|
626
|
+
voteAccount: string | null;
|
|
627
|
+
} | undefined;
|
|
628
|
+
programAccount?: {
|
|
629
|
+
chain: string;
|
|
630
|
+
program: string;
|
|
631
|
+
account: string;
|
|
632
|
+
seeds: SolanaSeed[];
|
|
633
|
+
field: string;
|
|
634
|
+
idl?: {
|
|
635
|
+
program: string;
|
|
636
|
+
source: SolanaIdlSource;
|
|
637
|
+
idl: Record<string, z.core.util.JSONType>;
|
|
638
|
+
} | undefined;
|
|
639
|
+
} | undefined;
|
|
603
640
|
} & WithRecordData<{
|
|
604
641
|
chatId: string;
|
|
605
642
|
chatType: string;
|
|
@@ -610,7 +647,7 @@ declare const telegram: {
|
|
|
610
647
|
reactions(): {
|
|
611
648
|
kind: "custom";
|
|
612
649
|
namespace: string;
|
|
613
|
-
identities?: ("
|
|
650
|
+
identities?: ("member" | "discord" | "x" | "wallet" | `app:${string}`)[] | undefined;
|
|
614
651
|
accounts?: string[] | undefined;
|
|
615
652
|
data?: TrackerDataSchema | undefined;
|
|
616
653
|
content?: {
|
|
@@ -620,6 +657,33 @@ declare const telegram: {
|
|
|
620
657
|
chain: string;
|
|
621
658
|
token: string | null;
|
|
622
659
|
} | undefined;
|
|
660
|
+
activity?: {
|
|
661
|
+
chain: string;
|
|
662
|
+
program: string;
|
|
663
|
+
instruction: string | null;
|
|
664
|
+
mint: string | null;
|
|
665
|
+
minAmount: string | null;
|
|
666
|
+
anySigner: boolean;
|
|
667
|
+
} | undefined;
|
|
668
|
+
nfts?: {
|
|
669
|
+
collection: string;
|
|
670
|
+
} | undefined;
|
|
671
|
+
stake?: {
|
|
672
|
+
chain: string;
|
|
673
|
+
voteAccount: string | null;
|
|
674
|
+
} | undefined;
|
|
675
|
+
programAccount?: {
|
|
676
|
+
chain: string;
|
|
677
|
+
program: string;
|
|
678
|
+
account: string;
|
|
679
|
+
seeds: SolanaSeed[];
|
|
680
|
+
field: string;
|
|
681
|
+
idl?: {
|
|
682
|
+
program: string;
|
|
683
|
+
source: SolanaIdlSource;
|
|
684
|
+
idl: Record<string, z.core.util.JSONType>;
|
|
685
|
+
} | undefined;
|
|
686
|
+
} | undefined;
|
|
623
687
|
} & WithRecordData<{
|
|
624
688
|
chatId: string;
|
|
625
689
|
chatType: string;
|
|
@@ -649,7 +713,7 @@ declare const youtube: {
|
|
|
649
713
|
shorts(): {
|
|
650
714
|
kind: "custom";
|
|
651
715
|
namespace: string;
|
|
652
|
-
identities?: ("
|
|
716
|
+
identities?: ("member" | "discord" | "x" | "wallet" | `app:${string}`)[] | undefined;
|
|
653
717
|
accounts?: string[] | undefined;
|
|
654
718
|
data?: TrackerDataSchema | undefined;
|
|
655
719
|
content?: {
|
|
@@ -659,6 +723,33 @@ declare const youtube: {
|
|
|
659
723
|
chain: string;
|
|
660
724
|
token: string | null;
|
|
661
725
|
} | undefined;
|
|
726
|
+
activity?: {
|
|
727
|
+
chain: string;
|
|
728
|
+
program: string;
|
|
729
|
+
instruction: string | null;
|
|
730
|
+
mint: string | null;
|
|
731
|
+
minAmount: string | null;
|
|
732
|
+
anySigner: boolean;
|
|
733
|
+
} | undefined;
|
|
734
|
+
nfts?: {
|
|
735
|
+
collection: string;
|
|
736
|
+
} | undefined;
|
|
737
|
+
stake?: {
|
|
738
|
+
chain: string;
|
|
739
|
+
voteAccount: string | null;
|
|
740
|
+
} | undefined;
|
|
741
|
+
programAccount?: {
|
|
742
|
+
chain: string;
|
|
743
|
+
program: string;
|
|
744
|
+
account: string;
|
|
745
|
+
seeds: SolanaSeed[];
|
|
746
|
+
field: string;
|
|
747
|
+
idl?: {
|
|
748
|
+
program: string;
|
|
749
|
+
source: SolanaIdlSource;
|
|
750
|
+
idl: Record<string, z.core.util.JSONType>;
|
|
751
|
+
} | undefined;
|
|
752
|
+
} | undefined;
|
|
662
753
|
} & WithRecordData<ContentData<{
|
|
663
754
|
title: string;
|
|
664
755
|
description: string;
|
|
@@ -691,7 +782,7 @@ declare const tiktok: {
|
|
|
691
782
|
videos(): {
|
|
692
783
|
kind: "custom";
|
|
693
784
|
namespace: string;
|
|
694
|
-
identities?: ("
|
|
785
|
+
identities?: ("member" | "discord" | "x" | "wallet" | `app:${string}`)[] | undefined;
|
|
695
786
|
accounts?: string[] | undefined;
|
|
696
787
|
data?: TrackerDataSchema | undefined;
|
|
697
788
|
content?: {
|
|
@@ -701,6 +792,33 @@ declare const tiktok: {
|
|
|
701
792
|
chain: string;
|
|
702
793
|
token: string | null;
|
|
703
794
|
} | undefined;
|
|
795
|
+
activity?: {
|
|
796
|
+
chain: string;
|
|
797
|
+
program: string;
|
|
798
|
+
instruction: string | null;
|
|
799
|
+
mint: string | null;
|
|
800
|
+
minAmount: string | null;
|
|
801
|
+
anySigner: boolean;
|
|
802
|
+
} | undefined;
|
|
803
|
+
nfts?: {
|
|
804
|
+
collection: string;
|
|
805
|
+
} | undefined;
|
|
806
|
+
stake?: {
|
|
807
|
+
chain: string;
|
|
808
|
+
voteAccount: string | null;
|
|
809
|
+
} | undefined;
|
|
810
|
+
programAccount?: {
|
|
811
|
+
chain: string;
|
|
812
|
+
program: string;
|
|
813
|
+
account: string;
|
|
814
|
+
seeds: SolanaSeed[];
|
|
815
|
+
field: string;
|
|
816
|
+
idl?: {
|
|
817
|
+
program: string;
|
|
818
|
+
source: SolanaIdlSource;
|
|
819
|
+
idl: Record<string, z.core.util.JSONType>;
|
|
820
|
+
} | undefined;
|
|
821
|
+
} | undefined;
|
|
704
822
|
} & WithRecordData<ContentData<{
|
|
705
823
|
title: string;
|
|
706
824
|
description: string;
|
|
@@ -735,15 +853,57 @@ declare const tiktok: {
|
|
|
735
853
|
* Cosmos chain with a bank denomination. A day whose reads all fail has no sample: Relay never
|
|
736
854
|
* writes a balance it didn't read. Reward holding for days with
|
|
737
855
|
* `automatic({ tracker, where: { path: "amount", gte: ... } })` and `streak({ days })`.
|
|
856
|
+
* - `wallet.nfts({ collection })`: a tracker source of daily NFT holding samples, sampled as
|
|
857
|
+
* `wallet.balances()` samples balances: once per project-calendar day, every wallet of the
|
|
858
|
+
* collection's family, one pinned EVM block or (on Solana) the slot every read must reach. `data`
|
|
859
|
+
* is `WalletNftSample`: how many of the collection's NFTs the wallet held, counted as
|
|
860
|
+
* `ctx.wallet.nfts()` counts them, except compressed NFTs: samples don't count a Token Metadata
|
|
861
|
+
* collection's, and refuse a Core collection with the `BubblegumV2` plugin. Each run first checks the collection as publication checks a
|
|
862
|
+
* `settings.nft()` value, and shows a wrong contract or mint on the tracker. Reward holding for
|
|
863
|
+
* days with `automatic({ tracker, where: { path: "count", gte: 1 } })` and `streak({ days })`.
|
|
864
|
+
* - `wallet.programActivity({ chain, program, instruction, mint, minAmount, signer })`: a tracker
|
|
865
|
+
* source of members' Solana transactions that call `program`. Relay reads the finalized,
|
|
866
|
+
* successful transactions of every Solana wallet linked by a member who joined the project, from
|
|
867
|
+
* the later of when the wallet was linked and the tracker's window start (at most 30 days before
|
|
868
|
+
* its first read), every 10 minutes. Reads are shared by the project's program activity trackers,
|
|
869
|
+
* so one published while another already reads the cluster records from its publication. Each
|
|
870
|
+
* record is one transaction, keyed by its signature, authored by the wallet's CAIP-10 account on
|
|
871
|
+
* `chain`, with the block time as `occurredAt` and `WalletProgramActivity` as `data`. By default
|
|
872
|
+
* only transactions the wallet signed count (`signer: "any"` counts others that name it).
|
|
873
|
+
* `instruction` narrows to one instruction of the program's IDL, and `mint` to
|
|
874
|
+
* transactions that change the wallet's balance of an SPL mint, by at least `minAmount` base
|
|
875
|
+
* units when set. Pay per transaction with `automatic({ tracker })` and a keyed completion, feed
|
|
876
|
+
* a leaderboard with its points, or count active days with `streak({ days })`.
|
|
738
877
|
*
|
|
739
|
-
*
|
|
740
|
-
*
|
|
878
|
+
* - `wallet.stake({ chain, voteAccount })`: a tracker source of daily native stake samples on
|
|
879
|
+
* Solana (`chain` `"solana"` for mainnet, the default, or devnet), sampled as `wallet.balances()`
|
|
880
|
+
* samples balances: once per project-calendar day, every linked Solana wallet, each read
|
|
881
|
+
* reaching the run's pinned slot. `data` is `WalletStakeSample`: the lamports the wallet
|
|
882
|
+
* delegates through the stake accounts it controls as staker or withdrawer, to `voteAccount`
|
|
883
|
+
* only when set, counted as `ctx.wallet.stake({ address })` counts that one wallet's (`amount`
|
|
884
|
+
* is active stake; `activating` and `deactivating` are apart). Reward keeping stake delegated
|
|
885
|
+
* with `automatic({ tracker, where: { path: "amount", gte: ... } })` and `streak({ days })`.
|
|
886
|
+
*
|
|
887
|
+
* - `wallet.programAccounts({ program, account, seeds, field, chain, idl })`: a tracker source of
|
|
888
|
+
* daily samples of one integer field of each linked Solana wallet's program account, sampled as
|
|
889
|
+
* `wallet.stake()` samples stake. Each wallet's account is the program-derived address of
|
|
890
|
+
* `seeds`, `{ wallet: true }` standing for the wallet, read and decoded as
|
|
891
|
+
* `ctx.wallet.programAccount({ address })` reads it, with the IDL Relay stores when the tracker
|
|
892
|
+
* is published: `idl` when given, else the one the program publishes. `data` is
|
|
893
|
+
* `WalletProgramAccountSample`: `amount` is the field as a decimal string, null when the wallet
|
|
894
|
+
* has no account. Publication refuses an account type the IDL lacks and a field that is not an
|
|
895
|
+
* integer. Reward keeping a position with `streak({ days })` and a `where` on `amount`.
|
|
896
|
+
*
|
|
897
|
+
* In SDK 1.x each source is a custom source whose namespace Relay reserves: only Relay writes its
|
|
898
|
+
* records. A project and environment can have at most 5 `wallet.balances()` trackers, 5
|
|
899
|
+
* `wallet.nfts()` trackers, 5 `wallet.stake()` trackers, 10 `wallet.programAccounts()` trackers
|
|
900
|
+
* and 20 `wallet.programActivity()` trackers.
|
|
741
901
|
*/
|
|
742
902
|
declare const wallet: {
|
|
743
903
|
balances(query: WalletBalanceSourceQuery): ({
|
|
744
904
|
kind: "custom";
|
|
745
905
|
namespace: string;
|
|
746
|
-
identities?: ("
|
|
906
|
+
identities?: ("member" | "discord" | "x" | "wallet" | `app:${string}`)[] | undefined;
|
|
747
907
|
accounts?: string[] | undefined;
|
|
748
908
|
data?: TrackerDataSchema | undefined;
|
|
749
909
|
content?: {
|
|
@@ -753,6 +913,33 @@ declare const wallet: {
|
|
|
753
913
|
chain: string;
|
|
754
914
|
token: string | null;
|
|
755
915
|
} | undefined;
|
|
916
|
+
activity?: {
|
|
917
|
+
chain: string;
|
|
918
|
+
program: string;
|
|
919
|
+
instruction: string | null;
|
|
920
|
+
mint: string | null;
|
|
921
|
+
minAmount: string | null;
|
|
922
|
+
anySigner: boolean;
|
|
923
|
+
} | undefined;
|
|
924
|
+
nfts?: {
|
|
925
|
+
collection: string;
|
|
926
|
+
} | undefined;
|
|
927
|
+
stake?: {
|
|
928
|
+
chain: string;
|
|
929
|
+
voteAccount: string | null;
|
|
930
|
+
} | undefined;
|
|
931
|
+
programAccount?: {
|
|
932
|
+
chain: string;
|
|
933
|
+
program: string;
|
|
934
|
+
account: string;
|
|
935
|
+
seeds: SolanaSeed[];
|
|
936
|
+
field: string;
|
|
937
|
+
idl?: {
|
|
938
|
+
program: string;
|
|
939
|
+
source: SolanaIdlSource;
|
|
940
|
+
idl: Record<string, z.core.util.JSONType>;
|
|
941
|
+
} | undefined;
|
|
942
|
+
} | undefined;
|
|
756
943
|
} & WithRecordData<{
|
|
757
944
|
amount: string;
|
|
758
945
|
decimals: number | null;
|
|
@@ -763,6 +950,221 @@ declare const wallet: {
|
|
|
763
950
|
token: string | null;
|
|
764
951
|
};
|
|
765
952
|
};
|
|
953
|
+
programActivity(query: WalletProgramActivitySourceQuery): ({
|
|
954
|
+
kind: "custom";
|
|
955
|
+
namespace: string;
|
|
956
|
+
identities?: ("member" | "discord" | "x" | "wallet" | `app:${string}`)[] | undefined;
|
|
957
|
+
accounts?: string[] | undefined;
|
|
958
|
+
data?: TrackerDataSchema | undefined;
|
|
959
|
+
content?: {
|
|
960
|
+
metrics: string[];
|
|
961
|
+
} | undefined;
|
|
962
|
+
balance?: {
|
|
963
|
+
chain: string;
|
|
964
|
+
token: string | null;
|
|
965
|
+
} | undefined;
|
|
966
|
+
activity?: {
|
|
967
|
+
chain: string;
|
|
968
|
+
program: string;
|
|
969
|
+
instruction: string | null;
|
|
970
|
+
mint: string | null;
|
|
971
|
+
minAmount: string | null;
|
|
972
|
+
anySigner: boolean;
|
|
973
|
+
} | undefined;
|
|
974
|
+
nfts?: {
|
|
975
|
+
collection: string;
|
|
976
|
+
} | undefined;
|
|
977
|
+
stake?: {
|
|
978
|
+
chain: string;
|
|
979
|
+
voteAccount: string | null;
|
|
980
|
+
} | undefined;
|
|
981
|
+
programAccount?: {
|
|
982
|
+
chain: string;
|
|
983
|
+
program: string;
|
|
984
|
+
account: string;
|
|
985
|
+
seeds: SolanaSeed[];
|
|
986
|
+
field: string;
|
|
987
|
+
idl?: {
|
|
988
|
+
program: string;
|
|
989
|
+
source: SolanaIdlSource;
|
|
990
|
+
idl: Record<string, z.core.util.JSONType>;
|
|
991
|
+
} | undefined;
|
|
992
|
+
} | undefined;
|
|
993
|
+
} & WithRecordData<{
|
|
994
|
+
signature: string;
|
|
995
|
+
slot: string;
|
|
996
|
+
timestamp: number;
|
|
997
|
+
signer: boolean;
|
|
998
|
+
instruction: string | null;
|
|
999
|
+
amount: string | null;
|
|
1000
|
+
delta: string | null;
|
|
1001
|
+
}> & WithAccountRoles<"author">) & {
|
|
1002
|
+
activity: {
|
|
1003
|
+
chain: string;
|
|
1004
|
+
program: string;
|
|
1005
|
+
instruction: string | null;
|
|
1006
|
+
mint: string | null;
|
|
1007
|
+
minAmount: string | null;
|
|
1008
|
+
anySigner: boolean;
|
|
1009
|
+
};
|
|
1010
|
+
};
|
|
1011
|
+
nfts(query: WalletNftSourceQuery): ({
|
|
1012
|
+
kind: "custom";
|
|
1013
|
+
namespace: string;
|
|
1014
|
+
identities?: ("member" | "discord" | "x" | "wallet" | `app:${string}`)[] | undefined;
|
|
1015
|
+
accounts?: string[] | undefined;
|
|
1016
|
+
data?: TrackerDataSchema | undefined;
|
|
1017
|
+
content?: {
|
|
1018
|
+
metrics: string[];
|
|
1019
|
+
} | undefined;
|
|
1020
|
+
balance?: {
|
|
1021
|
+
chain: string;
|
|
1022
|
+
token: string | null;
|
|
1023
|
+
} | undefined;
|
|
1024
|
+
activity?: {
|
|
1025
|
+
chain: string;
|
|
1026
|
+
program: string;
|
|
1027
|
+
instruction: string | null;
|
|
1028
|
+
mint: string | null;
|
|
1029
|
+
minAmount: string | null;
|
|
1030
|
+
anySigner: boolean;
|
|
1031
|
+
} | undefined;
|
|
1032
|
+
nfts?: {
|
|
1033
|
+
collection: string;
|
|
1034
|
+
} | undefined;
|
|
1035
|
+
stake?: {
|
|
1036
|
+
chain: string;
|
|
1037
|
+
voteAccount: string | null;
|
|
1038
|
+
} | undefined;
|
|
1039
|
+
programAccount?: {
|
|
1040
|
+
chain: string;
|
|
1041
|
+
program: string;
|
|
1042
|
+
account: string;
|
|
1043
|
+
seeds: SolanaSeed[];
|
|
1044
|
+
field: string;
|
|
1045
|
+
idl?: {
|
|
1046
|
+
program: string;
|
|
1047
|
+
source: SolanaIdlSource;
|
|
1048
|
+
idl: Record<string, z.core.util.JSONType>;
|
|
1049
|
+
} | undefined;
|
|
1050
|
+
} | undefined;
|
|
1051
|
+
} & WithRecordData<{
|
|
1052
|
+
count: string;
|
|
1053
|
+
block: string;
|
|
1054
|
+
}> & WithAccountRoles<"author">) & {
|
|
1055
|
+
nfts: {
|
|
1056
|
+
collection: NftCollection;
|
|
1057
|
+
};
|
|
1058
|
+
};
|
|
1059
|
+
stake(query?: WalletStakeSourceQuery): ({
|
|
1060
|
+
kind: "custom";
|
|
1061
|
+
namespace: string;
|
|
1062
|
+
identities?: ("member" | "discord" | "x" | "wallet" | `app:${string}`)[] | undefined;
|
|
1063
|
+
accounts?: string[] | undefined;
|
|
1064
|
+
data?: TrackerDataSchema | undefined;
|
|
1065
|
+
content?: {
|
|
1066
|
+
metrics: string[];
|
|
1067
|
+
} | undefined;
|
|
1068
|
+
balance?: {
|
|
1069
|
+
chain: string;
|
|
1070
|
+
token: string | null;
|
|
1071
|
+
} | undefined;
|
|
1072
|
+
activity?: {
|
|
1073
|
+
chain: string;
|
|
1074
|
+
program: string;
|
|
1075
|
+
instruction: string | null;
|
|
1076
|
+
mint: string | null;
|
|
1077
|
+
minAmount: string | null;
|
|
1078
|
+
anySigner: boolean;
|
|
1079
|
+
} | undefined;
|
|
1080
|
+
nfts?: {
|
|
1081
|
+
collection: string;
|
|
1082
|
+
} | undefined;
|
|
1083
|
+
stake?: {
|
|
1084
|
+
chain: string;
|
|
1085
|
+
voteAccount: string | null;
|
|
1086
|
+
} | undefined;
|
|
1087
|
+
programAccount?: {
|
|
1088
|
+
chain: string;
|
|
1089
|
+
program: string;
|
|
1090
|
+
account: string;
|
|
1091
|
+
seeds: SolanaSeed[];
|
|
1092
|
+
field: string;
|
|
1093
|
+
idl?: {
|
|
1094
|
+
program: string;
|
|
1095
|
+
source: SolanaIdlSource;
|
|
1096
|
+
idl: Record<string, z.core.util.JSONType>;
|
|
1097
|
+
} | undefined;
|
|
1098
|
+
} | undefined;
|
|
1099
|
+
} & WithRecordData<{
|
|
1100
|
+
amount: string;
|
|
1101
|
+
activating: string;
|
|
1102
|
+
deactivating: string;
|
|
1103
|
+
block: string;
|
|
1104
|
+
}> & WithAccountRoles<"author">) & {
|
|
1105
|
+
stake: {
|
|
1106
|
+
chain: string;
|
|
1107
|
+
voteAccount: string | null;
|
|
1108
|
+
};
|
|
1109
|
+
};
|
|
1110
|
+
programAccounts(query: WalletProgramAccountSourceQuery): ({
|
|
1111
|
+
kind: "custom";
|
|
1112
|
+
namespace: string;
|
|
1113
|
+
identities?: ("member" | "discord" | "x" | "wallet" | `app:${string}`)[] | undefined;
|
|
1114
|
+
accounts?: string[] | undefined;
|
|
1115
|
+
data?: TrackerDataSchema | undefined;
|
|
1116
|
+
content?: {
|
|
1117
|
+
metrics: string[];
|
|
1118
|
+
} | undefined;
|
|
1119
|
+
balance?: {
|
|
1120
|
+
chain: string;
|
|
1121
|
+
token: string | null;
|
|
1122
|
+
} | undefined;
|
|
1123
|
+
activity?: {
|
|
1124
|
+
chain: string;
|
|
1125
|
+
program: string;
|
|
1126
|
+
instruction: string | null;
|
|
1127
|
+
mint: string | null;
|
|
1128
|
+
minAmount: string | null;
|
|
1129
|
+
anySigner: boolean;
|
|
1130
|
+
} | undefined;
|
|
1131
|
+
nfts?: {
|
|
1132
|
+
collection: string;
|
|
1133
|
+
} | undefined;
|
|
1134
|
+
stake?: {
|
|
1135
|
+
chain: string;
|
|
1136
|
+
voteAccount: string | null;
|
|
1137
|
+
} | undefined;
|
|
1138
|
+
programAccount?: {
|
|
1139
|
+
chain: string;
|
|
1140
|
+
program: string;
|
|
1141
|
+
account: string;
|
|
1142
|
+
seeds: SolanaSeed[];
|
|
1143
|
+
field: string;
|
|
1144
|
+
idl?: {
|
|
1145
|
+
program: string;
|
|
1146
|
+
source: SolanaIdlSource;
|
|
1147
|
+
idl: Record<string, z.core.util.JSONType>;
|
|
1148
|
+
} | undefined;
|
|
1149
|
+
} | undefined;
|
|
1150
|
+
} & WithRecordData<{
|
|
1151
|
+
amount: string | null;
|
|
1152
|
+
pda: string;
|
|
1153
|
+
block: string;
|
|
1154
|
+
}> & WithAccountRoles<"author">) & {
|
|
1155
|
+
programAccount: {
|
|
1156
|
+
chain: string;
|
|
1157
|
+
program: string;
|
|
1158
|
+
account: string;
|
|
1159
|
+
seeds: SolanaSeed[];
|
|
1160
|
+
field: string;
|
|
1161
|
+
idl?: {
|
|
1162
|
+
program: string;
|
|
1163
|
+
source: SolanaIdlSource;
|
|
1164
|
+
idl: Record<string, z.core.util.JSONType>;
|
|
1165
|
+
} | undefined;
|
|
1166
|
+
};
|
|
1167
|
+
};
|
|
766
1168
|
};
|
|
767
1169
|
declare const pointLedgers: () => ResourceSource;
|
|
768
1170
|
type Label = {
|
|
@@ -833,12 +1235,12 @@ declare const settings: {
|
|
|
833
1235
|
/**
|
|
834
1236
|
* An NFT collection `ctx.wallet.nfts()` reads, as a CAIP-19 asset type: an EVM chain, the
|
|
835
1237
|
* 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
|
|
837
|
-
* `"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp/nft:<
|
|
838
|
-
* `"solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1/nft:<
|
|
839
|
-
* published or edited: an EVM chain must be one `ctx.wallet.balance()`
|
|
840
|
-
* must report the standard through ERC-165 `supportsInterface`; a Solana
|
|
841
|
-
* collection NFT on its cluster. Typed as the query's collection, so it passes to
|
|
1238
|
+
* one ERC-1155 token ID; or a Solana cluster and a Metaplex Core collection's address or a Token
|
|
1239
|
+
* Metadata collection NFT's mint there, `"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp/nft:<address>"`
|
|
1240
|
+
* on mainnet or `"solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1/nft:<address>"` on devnet. Relay checks
|
|
1241
|
+
* it when the collection is published or edited: an EVM chain must be one `ctx.wallet.balance()`
|
|
1242
|
+
* reads and the contract must report the standard through ERC-165 `supportsInterface`; a Solana
|
|
1243
|
+
* address must be a Core collection, a Metaplex collection NFT or a Token-2022 token group's mint on its cluster. Typed as the query's collection, so it passes to
|
|
842
1244
|
* `ctx.wallet.nfts({ collection })` as it is.
|
|
843
1245
|
*/
|
|
844
1246
|
nft(options: Label & {
|
|
@@ -868,9 +1270,10 @@ declare const settings: {
|
|
|
868
1270
|
default: ContractEvent;
|
|
869
1271
|
}): Setting<"text", z.ZodDefault<z.ZodPipe<z.ZodString, z.ZodTransform<`eip155:${number}:0x${string} ${string}`, string>>>>;
|
|
870
1272
|
/**
|
|
871
|
-
* A Solana program `ctx.wallet.transactions()` reads: its base58
|
|
872
|
-
* `"JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4"`. Relay checks it when
|
|
873
|
-
* edited: the account must be an executable program on Solana mainnet or
|
|
1273
|
+
* A Solana program `ctx.wallet.transactions()` or `ctx.wallet.programAccount()` reads: its base58
|
|
1274
|
+
* address, such as Jupiter's `"JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4"`. Relay checks it when
|
|
1275
|
+
* it is published or edited: the account must be an executable program on Solana mainnet or
|
|
1276
|
+
* devnet. Its IDL (Anchor, Codama or Shank), stored then, decodes the program's instructions and accounts.
|
|
874
1277
|
*/
|
|
875
1278
|
solanaProgram(options: Label & {
|
|
876
1279
|
default: SolanaProgram;
|
|
@@ -916,7 +1319,7 @@ declare function swapped(tx: WalletTransaction, options?: {
|
|
|
916
1319
|
declare function invoked(tx: WalletTransaction, program: string): boolean;
|
|
917
1320
|
/**
|
|
918
1321
|
* The arguments of the first instruction of the program in `tx` named `name`, as the program's
|
|
919
|
-
*
|
|
1322
|
+
* IDL spells it, or `null` when there is none, or the program's setting has no IDL.
|
|
920
1323
|
*/
|
|
921
1324
|
declare function instruction(tx: WalletTransaction, name: string): WalletInstruction["args"] | null;
|
|
922
1325
|
|
|
@@ -1053,8 +1456,9 @@ type TrackerTriggerInput<T extends Tracker = Tracker, W extends Where<TrackerDat
|
|
|
1053
1456
|
tracker: T;
|
|
1054
1457
|
/**
|
|
1055
1458
|
* Which observations fire. `"new-record"`: each record's first observation (the default for X,
|
|
1056
|
-
* Discord and
|
|
1057
|
-
* so a removed and re-added Telegram reaction does not
|
|
1459
|
+
* Discord, Telegram and `wallet.programActivity()` trackers, where it means each newly collected
|
|
1460
|
+
* post, message, reaction or transaction, so a removed and re-added Telegram reaction does not
|
|
1461
|
+
* fire again). `"new-observation"`: each
|
|
1058
1462
|
* observation that becomes its record's current one (the default for other custom trackers,
|
|
1059
1463
|
* YouTube and TikTok included, where every refresh observes each video again). `"data-changed"`: a
|
|
1060
1464
|
* new record, or a current observation whose `data` differs from the previous one.
|
|
@@ -1182,6 +1586,14 @@ type KeyedContext = {
|
|
|
1182
1586
|
};
|
|
1183
1587
|
/** The pinned tracker observation of a tracker-triggered quest; null for other triggers. */
|
|
1184
1588
|
tracker: TrackerTriggerContext | null;
|
|
1589
|
+
/**
|
|
1590
|
+
* The signed Solana transaction that started the attempt, with its memo's `reference`; null or
|
|
1591
|
+
* absent for any other attempt. `keyed((ctx) => ctx.action?.reference ?? "app")` completes once per
|
|
1592
|
+
* reference.
|
|
1593
|
+
*
|
|
1594
|
+
* @experimental A minor release can change quest actions.
|
|
1595
|
+
*/
|
|
1596
|
+
action?: SolanaTransactionAction | null;
|
|
1185
1597
|
eligibleAt: number;
|
|
1186
1598
|
/** The evaluation run's pinned project calendar. */
|
|
1187
1599
|
calendar: EvaluationCalendar;
|
|
@@ -1228,6 +1640,18 @@ declare const keyed: (key: (ctx: KeyedContext) => string, options?: KeyedOptions
|
|
|
1228
1640
|
kind: "keyed";
|
|
1229
1641
|
key: (ctx: KeyedContext) => string;
|
|
1230
1642
|
};
|
|
1643
|
+
/**
|
|
1644
|
+
* The completion of a quest with `stations`: each member completes it once per station, keyed by
|
|
1645
|
+
* the station the signed transaction's memo names. Relay refuses a transaction for an unknown or
|
|
1646
|
+
* closed station before the quest runs, and a member's own submission of the quest.
|
|
1647
|
+
*
|
|
1648
|
+
* @experimental A minor release can change check-in stations.
|
|
1649
|
+
*/
|
|
1650
|
+
declare const perStation: () => {
|
|
1651
|
+
across?: "members" | undefined;
|
|
1652
|
+
kind: "keyed";
|
|
1653
|
+
key: (ctx: KeyedContext) => string;
|
|
1654
|
+
};
|
|
1231
1655
|
type ProgressDefinition<C> = {
|
|
1232
1656
|
distinct: (ctx: C) => string;
|
|
1233
1657
|
goal: ReturnType<typeof count>;
|
|
@@ -1484,6 +1908,14 @@ type EvaluationContext<T, I = {
|
|
|
1484
1908
|
* body type.
|
|
1485
1909
|
*/
|
|
1486
1910
|
tracker: ContextTracker<G>;
|
|
1911
|
+
/**
|
|
1912
|
+
* The action that started this attempt: the Solana transaction the member signed, which an app's
|
|
1913
|
+
* server submitted with `management.attempts.submitSolanaTransaction()`, with the signing wallet
|
|
1914
|
+
* and the memo's `reference`. Null or absent for any other attempt.
|
|
1915
|
+
*
|
|
1916
|
+
* @experimental A minor release can change quest actions.
|
|
1917
|
+
*/
|
|
1918
|
+
action?: SolanaTransactionAction | null;
|
|
1487
1919
|
/**
|
|
1488
1920
|
* When the activity happened, in epoch milliseconds: the tracker record's occurrence time, else
|
|
1489
1921
|
* when the attempt was admitted. Budgets and daily keys use it.
|
|
@@ -1561,6 +1993,7 @@ type CompletionPolicies<S, G> = {
|
|
|
1561
1993
|
keyed: (key: (ctx: QuestKeyedContext<S, G>) => string, options?: KeyedOptions) => ReturnType<typeof keyed>;
|
|
1562
1994
|
streak: typeof streak;
|
|
1563
1995
|
progress: (definition: ProgressDefinition<QuestKeyedContext<S, G>>) => ReturnType<typeof progress>;
|
|
1996
|
+
perStation: typeof perStation;
|
|
1564
1997
|
};
|
|
1565
1998
|
/** How a quest completes: a content quest once per content item, so it takes no `completion`. */
|
|
1566
1999
|
type CompletionFor<G, S> = IsContent<G> extends true ? {
|
|
@@ -1636,6 +2069,18 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
|
|
|
1636
2069
|
* Omit it for no cooldown.
|
|
1637
2070
|
*/
|
|
1638
2071
|
completionCooldownMs?: number;
|
|
2072
|
+
/**
|
|
2073
|
+
* Check-in stations, up to 200: `{ key, label, opensAt?, closesAt? }`, with each key the
|
|
2074
|
+
* `reference` of a station's memo (`solanaActionMemo({ quest, reference })`) and the window
|
|
2075
|
+
* in epoch milliseconds. A signed transaction completes the quest only when its memo names
|
|
2076
|
+
* a station that was open at the transaction's block time; complete it once per station
|
|
2077
|
+
* with `perStation()`. Only on a member-submitted `manual()` quest without input. Keep a
|
|
2078
|
+
* station's key once its codes are printed: to rotate codes, add a station and close the
|
|
2079
|
+
* old one.
|
|
2080
|
+
*
|
|
2081
|
+
* @experimental A minor release can change check-in stations.
|
|
2082
|
+
*/
|
|
2083
|
+
stations?: readonly QuestStation[];
|
|
1639
2084
|
/**
|
|
1640
2085
|
* Whether staff can review this quest's attempts. Human review is on unless this returns
|
|
1641
2086
|
* `{ enabled: false }`. With it off, `decision.review(...)` becomes a reject that keeps the
|
|
@@ -1732,7 +2177,7 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
|
|
|
1732
2177
|
imageAlt?: string | undefined;
|
|
1733
2178
|
requirements?: ({
|
|
1734
2179
|
kind: "account";
|
|
1735
|
-
provider: "discord" | "
|
|
2180
|
+
provider: "discord" | "google" | "apple" | "x";
|
|
1736
2181
|
} | {
|
|
1737
2182
|
kind: "wallet";
|
|
1738
2183
|
chain?: "solana" | "eip155" | "cosmos" | undefined;
|
|
@@ -1877,7 +2322,7 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
|
|
|
1877
2322
|
minLength: number;
|
|
1878
2323
|
maxLength: number;
|
|
1879
2324
|
};
|
|
1880
|
-
actor?: "
|
|
2325
|
+
actor?: "member" | "staff" | undefined;
|
|
1881
2326
|
} | {
|
|
1882
2327
|
kind: "manual";
|
|
1883
2328
|
input: "url";
|
|
@@ -1885,11 +2330,11 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
|
|
|
1885
2330
|
required: boolean;
|
|
1886
2331
|
allowedHosts?: string[] | undefined;
|
|
1887
2332
|
};
|
|
1888
|
-
actor?: "
|
|
2333
|
+
actor?: "member" | "staff" | undefined;
|
|
1889
2334
|
} | {
|
|
1890
2335
|
kind: "manual";
|
|
1891
2336
|
input: "none" | "quiz" | "photo";
|
|
1892
|
-
actor?: "
|
|
2337
|
+
actor?: "member" | "staff" | undefined;
|
|
1893
2338
|
} | {
|
|
1894
2339
|
kind: "automatic";
|
|
1895
2340
|
tracker?: {
|
|
@@ -1933,7 +2378,7 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
|
|
|
1933
2378
|
equals: string | number | boolean;
|
|
1934
2379
|
})[] | undefined;
|
|
1935
2380
|
enrollment?: "none" | "required" | undefined;
|
|
1936
|
-
since?: "
|
|
2381
|
+
since?: "window" | "activation" | "enrollment" | undefined;
|
|
1937
2382
|
historical?: "staff" | "claim" | "automatic" | undefined;
|
|
1938
2383
|
content?: true | undefined;
|
|
1939
2384
|
} | undefined;
|
|
@@ -2037,6 +2482,12 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
|
|
|
2037
2482
|
}[] | undefined;
|
|
2038
2483
|
retryCooldownMs?: number | undefined;
|
|
2039
2484
|
completionCooldownMs?: number | undefined;
|
|
2485
|
+
stations?: {
|
|
2486
|
+
key: string;
|
|
2487
|
+
label: string;
|
|
2488
|
+
opensAt?: number | undefined;
|
|
2489
|
+
closesAt?: number | undefined;
|
|
2490
|
+
}[] | undefined;
|
|
2040
2491
|
};
|
|
2041
2492
|
evaluate(ctx: {
|
|
2042
2493
|
settings: unknown;
|
|
@@ -2049,6 +2500,14 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
|
|
|
2049
2500
|
* body type.
|
|
2050
2501
|
*/
|
|
2051
2502
|
tracker: TrackerTriggerContext | null;
|
|
2503
|
+
/**
|
|
2504
|
+
* The action that started this attempt: the Solana transaction the member signed, which an app's
|
|
2505
|
+
* server submitted with `management.attempts.submitSolanaTransaction()`, with the signing wallet
|
|
2506
|
+
* and the memo's `reference`. Null or absent for any other attempt.
|
|
2507
|
+
*
|
|
2508
|
+
* @experimental A minor release can change quest actions.
|
|
2509
|
+
*/
|
|
2510
|
+
action?: SolanaTransactionAction | null;
|
|
2052
2511
|
/**
|
|
2053
2512
|
* When the activity happened, in epoch milliseconds: the tracker record's occurrence time, else
|
|
2054
2513
|
* when the attempt was admitted. Budgets and daily keys use it.
|
|
@@ -2137,6 +2596,18 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
|
|
|
2137
2596
|
* Omit it for no cooldown.
|
|
2138
2597
|
*/
|
|
2139
2598
|
completionCooldownMs?: number;
|
|
2599
|
+
/**
|
|
2600
|
+
* Check-in stations, up to 200: `{ key, label, opensAt?, closesAt? }`, with each key the
|
|
2601
|
+
* `reference` of a station's memo (`solanaActionMemo({ quest, reference })`) and the window
|
|
2602
|
+
* in epoch milliseconds. A signed transaction completes the quest only when its memo names
|
|
2603
|
+
* a station that was open at the transaction's block time; complete it once per station
|
|
2604
|
+
* with `perStation()`. Only on a member-submitted `manual()` quest without input. Keep a
|
|
2605
|
+
* station's key once its codes are printed: to rotate codes, add a station and close the
|
|
2606
|
+
* old one.
|
|
2607
|
+
*
|
|
2608
|
+
* @experimental A minor release can change check-in stations.
|
|
2609
|
+
*/
|
|
2610
|
+
stations?: readonly QuestStation[];
|
|
2140
2611
|
/**
|
|
2141
2612
|
* Whether staff can review this quest's attempts. Human review is on unless this returns
|
|
2142
2613
|
* `{ enabled: false }`. With it off, `decision.review(...)` becomes a reject that keeps the
|
|
@@ -2233,7 +2704,7 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
|
|
|
2233
2704
|
imageAlt?: string | undefined;
|
|
2234
2705
|
requirements?: ({
|
|
2235
2706
|
kind: "account";
|
|
2236
|
-
provider: "discord" | "
|
|
2707
|
+
provider: "discord" | "google" | "apple" | "x";
|
|
2237
2708
|
} | {
|
|
2238
2709
|
kind: "wallet";
|
|
2239
2710
|
chain?: "solana" | "eip155" | "cosmos" | undefined;
|
|
@@ -2378,7 +2849,7 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
|
|
|
2378
2849
|
minLength: number;
|
|
2379
2850
|
maxLength: number;
|
|
2380
2851
|
};
|
|
2381
|
-
actor?: "
|
|
2852
|
+
actor?: "member" | "staff" | undefined;
|
|
2382
2853
|
} | {
|
|
2383
2854
|
kind: "manual";
|
|
2384
2855
|
input: "url";
|
|
@@ -2386,11 +2857,11 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
|
|
|
2386
2857
|
required: boolean;
|
|
2387
2858
|
allowedHosts?: string[] | undefined;
|
|
2388
2859
|
};
|
|
2389
|
-
actor?: "
|
|
2860
|
+
actor?: "member" | "staff" | undefined;
|
|
2390
2861
|
} | {
|
|
2391
2862
|
kind: "manual";
|
|
2392
2863
|
input: "none" | "quiz" | "photo";
|
|
2393
|
-
actor?: "
|
|
2864
|
+
actor?: "member" | "staff" | undefined;
|
|
2394
2865
|
} | {
|
|
2395
2866
|
kind: "automatic";
|
|
2396
2867
|
tracker?: {
|
|
@@ -2434,7 +2905,7 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
|
|
|
2434
2905
|
equals: string | number | boolean;
|
|
2435
2906
|
})[] | undefined;
|
|
2436
2907
|
enrollment?: "none" | "required" | undefined;
|
|
2437
|
-
since?: "
|
|
2908
|
+
since?: "window" | "activation" | "enrollment" | undefined;
|
|
2438
2909
|
historical?: "staff" | "claim" | "automatic" | undefined;
|
|
2439
2910
|
content?: true | undefined;
|
|
2440
2911
|
} | undefined;
|
|
@@ -2538,6 +3009,12 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
|
|
|
2538
3009
|
}[] | undefined;
|
|
2539
3010
|
retryCooldownMs?: number | undefined;
|
|
2540
3011
|
completionCooldownMs?: number | undefined;
|
|
3012
|
+
stations?: {
|
|
3013
|
+
key: string;
|
|
3014
|
+
label: string;
|
|
3015
|
+
opensAt?: number | undefined;
|
|
3016
|
+
closesAt?: number | undefined;
|
|
3017
|
+
}[] | undefined;
|
|
2541
3018
|
};
|
|
2542
3019
|
evaluate(ctx: {
|
|
2543
3020
|
settings: unknown;
|
|
@@ -2550,6 +3027,14 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
|
|
|
2550
3027
|
* body type.
|
|
2551
3028
|
*/
|
|
2552
3029
|
tracker: TrackerTriggerContext | null;
|
|
3030
|
+
/**
|
|
3031
|
+
* The action that started this attempt: the Solana transaction the member signed, which an app's
|
|
3032
|
+
* server submitted with `management.attempts.submitSolanaTransaction()`, with the signing wallet
|
|
3033
|
+
* and the memo's `reference`. Null or absent for any other attempt.
|
|
3034
|
+
*
|
|
3035
|
+
* @experimental A minor release can change quest actions.
|
|
3036
|
+
*/
|
|
3037
|
+
action?: SolanaTransactionAction | null;
|
|
2553
3038
|
/**
|
|
2554
3039
|
* When the activity happened, in epoch milliseconds: the tracker record's occurrence time, else
|
|
2555
3040
|
* when the attempt was admitted. Budgets and daily keys use it.
|
|
@@ -2599,4 +3084,5 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
|
|
|
2599
3084
|
}): Promise<Decision>;
|
|
2600
3085
|
} & ResourceHandle<"quest">;
|
|
2601
3086
|
|
|
2602
|
-
export { AmountSetting, BalanceChain, ContentBody,
|
|
3087
|
+
export { AmountSetting, BalanceChain, ContentBody, ContentMetricName, ContractCall, ContractEvent, DiscordMessageData, DiscordMessageTextData, DiscordReactionData, DiscordReader, GroupHandle, IdentityKind, ImageReader, IntegrationModule, IntegrationModuleProvider, KnownIntegrationModule, LedgerHandle, LedgerReference, MemberCompletion, MemberIdentity, NftCollection, PointBalance, ProfileReferral, QuestHandle, QuestStation, ReferralHandle, RoleOf, Setting, SolanaProgram, SolanaSeed, SolanaTransactionAction, TelegramReader, Tracker, TrackerData, TrackerDataSchema, TrackerReader, TrackerTriggerContext, WalletBalanceSourceQuery, WalletInstruction, WalletNftSourceQuery, WalletProgramAccountSourceQuery, WalletProgramActivitySourceQuery, WalletReader, WalletStakeSourceQuery, WalletTransaction, Where, 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 };
|
|
3088
|
+
export type { ContentData, ContentTrigger, ContentTriggerInput, EvaluationCalendar, EvaluationCalendarDay, EvaluationContext, EvaluationMember, KeyedContext, KeyedOptions, MemberCompletionQuery, Outcome, PerformanceContext, PerformanceOutcome, QuestKeyedContext, TrackerTrigger, TrackerTriggerInput, TriggerAdmission, XContentBody };
|