@domino-sdk/relay 1.56.0 → 1.59.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 +74 -0
- package/dist/{accounts-DRPENuZe.d.ts → accounts-CVonEkdb.d.ts} +18 -7
- package/dist/{attempt-captures-CxxO7DeD.d.ts → attempt-captures-DBj-rxak.d.ts} +1 -1
- package/dist/authoring.d.ts +180 -28
- package/dist/authoring.js +236 -11
- package/dist/{automatic-outcomes-DxW_v5Wc.d.ts → automatic-outcomes-FS9okvBP.d.ts} +1 -1
- package/dist/avatar.d.ts +1 -2
- package/dist/browser.d.ts +8 -9
- package/dist/browser.js +10 -10
- package/dist/{capability-error-DSd8EMQC.d.ts → capability-error-DDJl0LY-.d.ts} +0 -6
- package/dist/{chunk-OTITLABX.js → chunk-2LKGAL63.js} +2 -2
- package/dist/{chunk-NK6EER33.js → chunk-577DG2IT.js} +8 -8
- package/dist/{chunk-RBPMT53S.js → chunk-6U5WWH3W.js} +19 -4
- package/dist/{chunk-BHHUSBSD.js → chunk-AWWCEP7F.js} +1402 -881
- package/dist/{chunk-QNQNKIAA.js → chunk-EQF4ID47.js} +1 -1
- package/dist/{chunk-CK7HO32Z.js → chunk-IBROKMFV.js} +2 -2
- package/dist/{chunk-MNU6UPXY.js → chunk-KBCTII6C.js} +1 -1
- package/dist/{chunk-INSWI2VZ.js → chunk-KYUQEZZA.js} +1 -1
- package/dist/{chunk-G6XVBYH7.js → chunk-LDLOB2UZ.js} +4 -4
- package/dist/{chunk-CXKXPB7K.js → chunk-M2JQPDUX.js} +34 -9
- package/dist/{chunk-KBVH4XZC.js → chunk-R4S6BFOH.js} +1 -1
- package/dist/{chunk-ABJ4G47X.js → chunk-TZJT5CRF.js} +1 -1
- package/dist/{chunk-BJYMTCWG.js → chunk-UEMLYPKJ.js} +7 -4
- package/dist/{chunk-ULQU7KC4.js → chunk-W42KMMH5.js} +1 -5
- package/dist/{chunk-VSHV7FEA.js → chunk-XGXDINGM.js} +16 -3
- package/dist/{chunk-H2MD6E7Z.js → chunk-YMWRLAAP.js} +1 -1
- package/dist/{chunk-W5U2WXG3.js → chunk-YRSU2X2P.js} +2 -2
- package/dist/{client-bX3oTpRu.d.ts → client-3b9HjSzZ.d.ts} +115 -116
- package/dist/{deployments-D3lxfQMB.d.ts → deployments-BydFVj4Q.d.ts} +314 -175
- package/dist/{groups-DPE004_V.d.ts → groups-CFuTfFqG.d.ts} +11 -7
- package/dist/index.d.ts +9 -10
- package/dist/index.js +9 -9
- package/dist/{integrations-CcD5NPEA.d.ts → integrations-DrbKQSTD.d.ts} +3 -32
- package/dist/internal.d.ts +10 -10
- package/dist/internal.js +8 -8
- package/dist/{offers-CtzMeB7O.d.ts → offers-DAfe1O3_.d.ts} +6 -2
- package/dist/{pages-BlLqB8ZQ.d.ts → pages-ChDVLrgR.d.ts} +39 -10
- package/dist/portal-proxy.js +3 -3
- package/dist/react/index.d.ts +71 -72
- package/dist/react/index.js +10 -10
- package/dist/runtime/authoring.js +1 -1
- package/dist/runtime/chunks/BG43KQ2T.js +1 -0
- package/dist/runtime/chunks/EWU4OKSY.js +62 -0
- package/dist/runtime/manifest.json +5 -5
- package/dist/runtime/schema.js +1 -1
- package/dist/runtime/zod.js +1 -1
- package/dist/{schema-C4m9RhCR.d.ts → schema-BA0nRRlt.d.ts} +184 -35
- package/dist/schema.d.ts +754 -432
- package/dist/schema.js +77 -13
- package/dist/server/index.d.ts +10 -10
- package/dist/server/index.js +434 -55
- package/dist/{submission-input-wTiYGdgA.d.ts → submission-input-DxQ6RnKo.d.ts} +2 -2
- package/dist/{telegram-browser-Bh3i0HiH.d.ts → telegram-browser-o3OIxGrJ.d.ts} +3 -3
- package/dist/testing.d.ts +89 -9
- package/dist/testing.js +215 -10
- package/dist/{transport-CnKA-_RL.d.ts → transport-D_Eqf78J.d.ts} +3997 -2030
- package/dist/wallet-B06zvDXp.d.ts +972 -0
- package/dist/{x-1czZFVUW.d.ts → x-C28SNifw.d.ts} +2 -2
- package/package.json +2 -2
- package/dist/profiles-BoOK03cR.d.ts +0 -299
- package/dist/runtime/chunks/IDOMZWRY.js +0 -40
- package/dist/runtime/chunks/NDB42VFF.js +0 -1
- package/dist/util.d-w9f9t3ua.d.ts +0 -5
- package/dist/wallet-Ac7OFpOr.d.ts +0 -228
package/dist/authoring.js
CHANGED
|
@@ -6,11 +6,9 @@ import {
|
|
|
6
6
|
defineDashboard,
|
|
7
7
|
tiktokVideoBodySchema,
|
|
8
8
|
tiktokVideoMetrics,
|
|
9
|
-
tiktokVideosNamespace,
|
|
10
9
|
youtubeShortBodySchema,
|
|
11
|
-
youtubeShortMetrics
|
|
12
|
-
|
|
13
|
-
} from "./chunk-ULQU7KC4.js";
|
|
10
|
+
youtubeShortMetrics
|
|
11
|
+
} from "./chunk-W42KMMH5.js";
|
|
14
12
|
import {
|
|
15
13
|
CapabilityError,
|
|
16
14
|
capabilityErrorCodes
|
|
@@ -19,7 +17,7 @@ import {
|
|
|
19
17
|
sourceDataSchema,
|
|
20
18
|
sourceRoles,
|
|
21
19
|
validateQuestShape
|
|
22
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-YMWRLAAP.js";
|
|
23
21
|
import {
|
|
24
22
|
badgeDeclarationSchema,
|
|
25
23
|
defineOffer,
|
|
@@ -28,12 +26,12 @@ import {
|
|
|
28
26
|
engagementScoreSchema,
|
|
29
27
|
leaderboardAuthoringSchema,
|
|
30
28
|
referralAuthoringSchema
|
|
31
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-UEMLYPKJ.js";
|
|
32
30
|
import {
|
|
33
31
|
pointLedgerDeclarationSchema,
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
} from "./chunk-
|
|
32
|
+
telegramMessageDataSchema,
|
|
33
|
+
telegramReactionDataSchema
|
|
34
|
+
} from "./chunk-XGXDINGM.js";
|
|
37
35
|
import {
|
|
38
36
|
authoringKey,
|
|
39
37
|
badgeReward,
|
|
@@ -64,9 +62,21 @@ import {
|
|
|
64
62
|
isAmount,
|
|
65
63
|
isBalanceChain,
|
|
66
64
|
isBoundSetting,
|
|
65
|
+
isContractCall,
|
|
66
|
+
isContractEvent,
|
|
67
67
|
isEvmChainId,
|
|
68
|
+
isNftCollection,
|
|
69
|
+
isSolanaProgram,
|
|
68
70
|
ledgerKey,
|
|
69
71
|
ledgerSettingSchema,
|
|
72
|
+
maxWalletEventLogs,
|
|
73
|
+
maxWalletEventLookback,
|
|
74
|
+
maxWalletTransactionLookback,
|
|
75
|
+
maxWalletTransactions,
|
|
76
|
+
parseContractCall,
|
|
77
|
+
parseContractEvent,
|
|
78
|
+
parseContractFunction,
|
|
79
|
+
parseNftCollection,
|
|
70
80
|
parseSettings,
|
|
71
81
|
pointsRewardSchema,
|
|
72
82
|
questDescriptionSchema,
|
|
@@ -81,23 +91,31 @@ import {
|
|
|
81
91
|
settingFieldSchema,
|
|
82
92
|
settingInstant,
|
|
83
93
|
settingResourceId,
|
|
94
|
+
solanaAddressSchema,
|
|
95
|
+
solanaMainnet,
|
|
84
96
|
sourceContent,
|
|
85
97
|
sourceIdentities,
|
|
86
98
|
streakPolicySchema,
|
|
99
|
+
telegramMessagesNamespace,
|
|
100
|
+
telegramReactionsNamespace,
|
|
87
101
|
textOptionsSchema,
|
|
88
102
|
textSettingSchema,
|
|
89
103
|
tierRewardSchema,
|
|
90
104
|
tieredRewardDefinitionSchema,
|
|
105
|
+
tiktokVideosNamespace,
|
|
91
106
|
trackerDataIssue,
|
|
92
107
|
trackerDataSchema,
|
|
93
108
|
trackerDefinitionSchema,
|
|
94
109
|
trackerTriggerContextSchema,
|
|
95
110
|
trackerTriggerPolicySchema,
|
|
96
111
|
urlOptionsSchema,
|
|
112
|
+
walletBalanceSampleSchema,
|
|
113
|
+
walletBalancesNamespace,
|
|
97
114
|
whereSchemaIssue,
|
|
98
115
|
whereSettings,
|
|
99
|
-
xSearchSourceSchema
|
|
100
|
-
|
|
116
|
+
xSearchSourceSchema,
|
|
117
|
+
youtubeShortsNamespace
|
|
118
|
+
} from "./chunk-AWWCEP7F.js";
|
|
101
119
|
|
|
102
120
|
// src/builders.ts
|
|
103
121
|
import * as z from "zod";
|
|
@@ -292,6 +310,12 @@ var discord = {
|
|
|
292
310
|
}
|
|
293
311
|
};
|
|
294
312
|
var telegram = {
|
|
313
|
+
messages() {
|
|
314
|
+
return customSource(telegramMessagesNamespace, {
|
|
315
|
+
identities: ["member"],
|
|
316
|
+
data: telegramMessageDataSchema
|
|
317
|
+
});
|
|
318
|
+
},
|
|
295
319
|
reactions() {
|
|
296
320
|
return customSource(telegramReactionsNamespace, {
|
|
297
321
|
identities: ["member"],
|
|
@@ -322,6 +346,50 @@ var tiktok = {
|
|
|
322
346
|
});
|
|
323
347
|
}
|
|
324
348
|
};
|
|
349
|
+
function walletBalanceSource(query) {
|
|
350
|
+
const { chain, token } = query;
|
|
351
|
+
const given = token === void 0 ? null : token;
|
|
352
|
+
if (given !== null && typeof given !== "string") {
|
|
353
|
+
throw new Error("wallet.balances() takes the token as a string");
|
|
354
|
+
}
|
|
355
|
+
if (chain === "solana" || chain === solanaMainnet) {
|
|
356
|
+
if (given !== null && !solanaAddressSchema.safeParse(given).success) {
|
|
357
|
+
throw new Error(
|
|
358
|
+
"wallet.balances() on Solana takes an SPL or Token-2022 mint address (base58)"
|
|
359
|
+
);
|
|
360
|
+
}
|
|
361
|
+
return { chain: solanaMainnet, token: given };
|
|
362
|
+
}
|
|
363
|
+
if (typeof chain === "string" && isEvmChainId(chain)) {
|
|
364
|
+
if (given !== null && !/^0x[0-9a-fA-F]{40}$/.test(given)) {
|
|
365
|
+
throw new Error(
|
|
366
|
+
"wallet.balances() on an EVM chain takes an ERC-20 contract address: 0x and 40 hex digits"
|
|
367
|
+
);
|
|
368
|
+
}
|
|
369
|
+
return { chain, token: given };
|
|
370
|
+
}
|
|
371
|
+
if (typeof chain === "string" && /^cosmos:[-_a-zA-Z0-9]{1,32}$/.test(chain)) {
|
|
372
|
+
if (given === null || !cosmosDenomSchema.safeParse(given).success) {
|
|
373
|
+
throw new Error(
|
|
374
|
+
"wallet.balances() on a Cosmos chain takes a bank denomination such as uatom"
|
|
375
|
+
);
|
|
376
|
+
}
|
|
377
|
+
return { chain, token: given };
|
|
378
|
+
}
|
|
379
|
+
throw new Error(
|
|
380
|
+
'wallet.balances() reads "solana", an EVM chain such as "eip155:8453" or a Cosmos network such as "cosmos:cosmoshub-4"'
|
|
381
|
+
);
|
|
382
|
+
}
|
|
383
|
+
var wallet = {
|
|
384
|
+
balances(query) {
|
|
385
|
+
const balance = walletBalanceSource(query);
|
|
386
|
+
const source = customSource(walletBalancesNamespace, {
|
|
387
|
+
identities: ["wallet"],
|
|
388
|
+
data: walletBalanceSampleSchema
|
|
389
|
+
});
|
|
390
|
+
return customSourceSchema.parse({ ...source, balance });
|
|
391
|
+
}
|
|
392
|
+
};
|
|
325
393
|
var pointLedgers = () => ({
|
|
326
394
|
provider: "domino",
|
|
327
395
|
resource: "point-ledger"
|
|
@@ -451,6 +519,114 @@ var settings = {
|
|
|
451
519
|
textSettingSchema(field).transform((value) => value).default(field.default).meta(field)
|
|
452
520
|
);
|
|
453
521
|
},
|
|
522
|
+
/**
|
|
523
|
+
* An NFT collection `ctx.wallet.nfts()` reads, as a CAIP-19 asset type: an EVM chain, the
|
|
524
|
+
* standard and the contract, such as `"eip155:1/erc721:0x…"`, or `"eip155:8453/erc1155:0x…/1"` for
|
|
525
|
+
* one ERC-1155 token ID; or a Metaplex collection NFT's mint on Solana mainnet,
|
|
526
|
+
* `"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp/nft:<mint>"`. Relay checks it when the collection is
|
|
527
|
+
* published or edited: an EVM chain must be one `ctx.wallet.balance()` reads and the contract
|
|
528
|
+
* must report the standard through ERC-165 `supportsInterface`; a Solana mint must be a Metaplex
|
|
529
|
+
* collection NFT. Typed as the query's collection, so it passes to
|
|
530
|
+
* `ctx.wallet.nfts({ collection })` as it is.
|
|
531
|
+
*/
|
|
532
|
+
nft(options) {
|
|
533
|
+
if (!isNftCollection(options.default)) {
|
|
534
|
+
throw new Error(
|
|
535
|
+
`settings.nft() takes an NFT collection such as "eip155:1/erc721:0x\u2026" as its default, not "${options.default}"`
|
|
536
|
+
);
|
|
537
|
+
}
|
|
538
|
+
const field = {
|
|
539
|
+
...options,
|
|
540
|
+
kind: "text",
|
|
541
|
+
minLength: 1,
|
|
542
|
+
maxLength: 200,
|
|
543
|
+
multiline: false,
|
|
544
|
+
picker: "nft"
|
|
545
|
+
};
|
|
546
|
+
return setting(
|
|
547
|
+
"text",
|
|
548
|
+
textSettingSchema(field).transform((value) => value).default(field.default).meta(field)
|
|
549
|
+
);
|
|
550
|
+
},
|
|
551
|
+
/**
|
|
552
|
+
* A contract function `ctx.wallet.call()` reads: the contract's CAIP-10 account ID on an EVM
|
|
553
|
+
* chain, a space, and the function's human-readable signature, such as
|
|
554
|
+
* `"eip155:8453:0x… function stakedOf(address) view returns (uint256)"`. Only `view` and `pure`
|
|
555
|
+
* functions with elementary parameters that return one `uint`, `int`, `bool` or `address` are
|
|
556
|
+
* accepted; publication and Console edits also check that Relay reads the chain. Typed as the
|
|
557
|
+
* query's call, so it passes to `ctx.wallet.call({ call })` as it is.
|
|
558
|
+
*/
|
|
559
|
+
contractCall(options) {
|
|
560
|
+
if (!isContractCall(options.default)) {
|
|
561
|
+
throw new Error(
|
|
562
|
+
`settings.contractCall() takes a contract call such as "eip155:8453:0x\u2026 function stakedOf(address) view returns (uint256)" as its default, not "${options.default}"`
|
|
563
|
+
);
|
|
564
|
+
}
|
|
565
|
+
const field = {
|
|
566
|
+
...options,
|
|
567
|
+
kind: "text",
|
|
568
|
+
minLength: 1,
|
|
569
|
+
maxLength: 400,
|
|
570
|
+
multiline: false,
|
|
571
|
+
picker: "contract-call"
|
|
572
|
+
};
|
|
573
|
+
return setting(
|
|
574
|
+
"text",
|
|
575
|
+
textSettingSchema(field).transform((value) => value).default(field.default).meta(field)
|
|
576
|
+
);
|
|
577
|
+
},
|
|
578
|
+
/**
|
|
579
|
+
* An EVM contract event `ctx.wallet.events()` reads: the contract as a CAIP-10 account ID and
|
|
580
|
+
* the event's Solidity signature, with argument names and `indexed` markers, such as
|
|
581
|
+
* `"eip155:8453:0x… Transfer(address indexed from, address indexed to, uint256 value)"`. The event
|
|
582
|
+
* needs an indexed `address` argument, the one matched against the member's wallets. Relay checks
|
|
583
|
+
* it when the event is published or edited: the chain must be one `ctx.wallet.balance()` reads
|
|
584
|
+
* and report a finalized or safe block, and the address must hold a contract. Typed as the query's
|
|
585
|
+
* event, so it passes to `ctx.wallet.events({ event })` as it is.
|
|
586
|
+
*/
|
|
587
|
+
contractEvent(options) {
|
|
588
|
+
if (!isContractEvent(options.default)) {
|
|
589
|
+
throw new Error(
|
|
590
|
+
`settings.contractEvent() takes a contract event such as "eip155:1:0x\u2026 Transfer(address indexed from, address indexed to, uint256 value)" as its default, not "${options.default}"`
|
|
591
|
+
);
|
|
592
|
+
}
|
|
593
|
+
const field = {
|
|
594
|
+
...options,
|
|
595
|
+
kind: "text",
|
|
596
|
+
minLength: 1,
|
|
597
|
+
maxLength: 1e3,
|
|
598
|
+
multiline: false,
|
|
599
|
+
picker: "contract-event"
|
|
600
|
+
};
|
|
601
|
+
return setting(
|
|
602
|
+
"text",
|
|
603
|
+
textSettingSchema(field).transform((value) => value).default(field.default).meta(field)
|
|
604
|
+
);
|
|
605
|
+
},
|
|
606
|
+
/**
|
|
607
|
+
* A Solana mainnet program `ctx.wallet.transactions()` reads: its base58 address, such as
|
|
608
|
+
* Jupiter's `"JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4"`. Relay checks it when it is published
|
|
609
|
+
* or edited: the account must exist and be an executable program.
|
|
610
|
+
*/
|
|
611
|
+
solanaProgram(options) {
|
|
612
|
+
if (!isSolanaProgram(options.default)) {
|
|
613
|
+
throw new Error(
|
|
614
|
+
`settings.solanaProgram() takes a Solana program address such as "JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4" as its default, not "${options.default}"`
|
|
615
|
+
);
|
|
616
|
+
}
|
|
617
|
+
const field = {
|
|
618
|
+
...options,
|
|
619
|
+
kind: "text",
|
|
620
|
+
minLength: 32,
|
|
621
|
+
maxLength: 44,
|
|
622
|
+
multiline: false,
|
|
623
|
+
picker: "solana-program"
|
|
624
|
+
};
|
|
625
|
+
return setting(
|
|
626
|
+
"text",
|
|
627
|
+
textSettingSchema(field).transform((value) => value).default(field.default).meta(field)
|
|
628
|
+
);
|
|
629
|
+
},
|
|
454
630
|
integer(options) {
|
|
455
631
|
return setting(
|
|
456
632
|
"integer",
|
|
@@ -478,6 +654,37 @@ var settings = {
|
|
|
478
654
|
// src/authoring.ts
|
|
479
655
|
import { z as z2 } from "zod";
|
|
480
656
|
import * as z3 from "zod";
|
|
657
|
+
|
|
658
|
+
// src/solana-transactions.ts
|
|
659
|
+
function delta(tx, mint) {
|
|
660
|
+
const change = tx.balanceChanges.find((entry) => entry.mint === mint);
|
|
661
|
+
return change ? BigInt(change.delta) : 0n;
|
|
662
|
+
}
|
|
663
|
+
function received(tx, mint) {
|
|
664
|
+
const change = delta(tx, mint);
|
|
665
|
+
return change > 0n ? change.toString() : "0";
|
|
666
|
+
}
|
|
667
|
+
function spent(tx, mint) {
|
|
668
|
+
const change = delta(tx, mint);
|
|
669
|
+
return change < 0n ? (-change).toString() : "0";
|
|
670
|
+
}
|
|
671
|
+
function swapped(tx, options = {}) {
|
|
672
|
+
const up = tx.balanceChanges.filter((change) => BigInt(change.delta) > 0n);
|
|
673
|
+
const down = tx.balanceChanges.filter((change) => BigInt(change.delta) < 0n);
|
|
674
|
+
return up.some(
|
|
675
|
+
(gained) => (options.into === void 0 || gained.mint === options.into) && down.some(
|
|
676
|
+
(gave) => gave.mint !== gained.mint && (options.from === void 0 || gave.mint === options.from)
|
|
677
|
+
)
|
|
678
|
+
);
|
|
679
|
+
}
|
|
680
|
+
function invoked(tx, program) {
|
|
681
|
+
return tx.programs.includes(program);
|
|
682
|
+
}
|
|
683
|
+
function instruction(tx, name) {
|
|
684
|
+
return tx.instructions?.find((entry) => entry.name === name)?.args ?? null;
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
// src/authoring.ts
|
|
481
688
|
var badge = (definition) => badgeReward(definition.key, definition.name);
|
|
482
689
|
var groupMembership = (group) => groupReward(group.key, group.title);
|
|
483
690
|
var points = (ledger, amount) => pointsRewardSchema.parse({
|
|
@@ -985,24 +1192,42 @@ export {
|
|
|
985
1192
|
formatUnits,
|
|
986
1193
|
groupMembership,
|
|
987
1194
|
inGroup,
|
|
1195
|
+
instruction,
|
|
1196
|
+
invoked,
|
|
1197
|
+
isContractCall,
|
|
1198
|
+
isContractEvent,
|
|
988
1199
|
isEvmChainId,
|
|
1200
|
+
isNftCollection,
|
|
1201
|
+
isSolanaProgram,
|
|
989
1202
|
keyed,
|
|
990
1203
|
manual,
|
|
1204
|
+
maxWalletEventLogs,
|
|
1205
|
+
maxWalletEventLookback,
|
|
1206
|
+
maxWalletTransactionLookback,
|
|
1207
|
+
maxWalletTransactions,
|
|
991
1208
|
once,
|
|
1209
|
+
parseContractCall,
|
|
1210
|
+
parseContractEvent,
|
|
1211
|
+
parseContractFunction,
|
|
1212
|
+
parseNftCollection,
|
|
992
1213
|
parseUnits,
|
|
993
1214
|
pointLedgers,
|
|
994
1215
|
points,
|
|
995
1216
|
progress,
|
|
996
1217
|
questCompleted,
|
|
1218
|
+
received,
|
|
997
1219
|
rolling,
|
|
998
1220
|
settings,
|
|
1221
|
+
spent,
|
|
999
1222
|
staffHandover,
|
|
1000
1223
|
streak,
|
|
1224
|
+
swapped,
|
|
1001
1225
|
telegram,
|
|
1002
1226
|
tiktok,
|
|
1003
1227
|
trackerDataSchema,
|
|
1004
1228
|
trackerTriggerContextSchema,
|
|
1005
1229
|
untracked,
|
|
1230
|
+
wallet,
|
|
1006
1231
|
x,
|
|
1007
1232
|
youtube,
|
|
1008
1233
|
z2 as z
|
package/dist/avatar.d.ts
CHANGED
package/dist/browser.d.ts
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import { o as SubmissionStore, f as RelayClientOptions, R as RelayClient } from './client-
|
|
2
|
-
export { C as CosmosChains, D as DiscoveredWallet, E as Eip1193Provider, a as EmailSignInOption, K as KeplrLike, O as OAuthSignInOption, S as SignInClient, b as SignInIcon, c as SignInMethods, d as SignInOption, e as SignInOptions, f as SignInUnavailable, g as SignInWallet, h as SolanaInjectedProvider, i as StandardWallet, j as StandardWalletAccount, T as TelegramSignInOption, W as WalletSignInOption, k as cosmosChainList, l as cosmosSigner, m as discoverCosmosWallets, n as discoverEvmWallets, o as discoverSignInWallets, p as discoverSolanaWallets, q as evmSigner, s as signInOptions, r as solanaSigner, t as telegramMiniAppInitData, w as walletStandardSolanaSigner } from './telegram-browser-
|
|
1
|
+
import { o as SubmissionStore, f as RelayClientOptions, R as RelayClient } from './client-3b9HjSzZ.js';
|
|
2
|
+
export { C as CosmosChains, D as DiscoveredWallet, E as Eip1193Provider, a as EmailSignInOption, K as KeplrLike, O as OAuthSignInOption, S as SignInClient, b as SignInIcon, c as SignInMethods, d as SignInOption, e as SignInOptions, f as SignInUnavailable, g as SignInWallet, h as SolanaInjectedProvider, i as StandardWallet, j as StandardWalletAccount, T as TelegramSignInOption, W as WalletSignInOption, k as cosmosChainList, l as cosmosSigner, m as discoverCosmosWallets, n as discoverEvmWallets, o as discoverSignInWallets, p as discoverSolanaWallets, q as evmSigner, s as signInOptions, r as solanaSigner, t as telegramMiniAppInitData, w as walletStandardSolanaSigner } from './telegram-browser-o3OIxGrJ.js';
|
|
3
3
|
export { H as HostEnvironment, g as getHostEnvironment } from './host-environment-FN4zg3hw.js';
|
|
4
|
-
import './schema-
|
|
4
|
+
import './schema-BA0nRRlt.js';
|
|
5
5
|
import 'zod';
|
|
6
|
-
import './
|
|
7
|
-
import './
|
|
8
|
-
import './
|
|
6
|
+
import './wallet-B06zvDXp.js';
|
|
7
|
+
import './pages-ChDVLrgR.js';
|
|
8
|
+
import './submission-input-DxQ6RnKo.js';
|
|
9
|
+
import './groups-CFuTfFqG.js';
|
|
9
10
|
import './action-DBzILFx9.js';
|
|
10
11
|
import './participant-activity-iciCEs_8.js';
|
|
11
|
-
import './accounts-
|
|
12
|
-
import './profiles-BoOK03cR.js';
|
|
13
|
-
import './wallet-Ac7OFpOr.js';
|
|
12
|
+
import './accounts-CVonEkdb.js';
|
|
14
13
|
|
|
15
14
|
/** Browser client with durable submission recovery; safe to construct during SSR. */
|
|
16
15
|
declare function createBrowserRelayClient(options: RelayClientOptions): RelayClient;
|
package/dist/browser.js
CHANGED
|
@@ -12,19 +12,19 @@ import {
|
|
|
12
12
|
solanaSigner,
|
|
13
13
|
telegramMiniAppInitData,
|
|
14
14
|
walletStandardSolanaSigner
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
15
|
+
} from "./chunk-2LKGAL63.js";
|
|
16
|
+
import "./chunk-577DG2IT.js";
|
|
17
|
+
import "./chunk-KYUQEZZA.js";
|
|
18
|
+
import "./chunk-6U5WWH3W.js";
|
|
19
|
+
import "./chunk-UEMLYPKJ.js";
|
|
20
|
+
import "./chunk-XGXDINGM.js";
|
|
21
21
|
import {
|
|
22
22
|
getHostEnvironment
|
|
23
23
|
} from "./chunk-KDR2VAJP.js";
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-R4S6BFOH.js";
|
|
25
|
+
import "./chunk-TZJT5CRF.js";
|
|
26
|
+
import "./chunk-EQF4ID47.js";
|
|
27
|
+
import "./chunk-AWWCEP7F.js";
|
|
28
28
|
export {
|
|
29
29
|
browserSubmissionStore,
|
|
30
30
|
cosmosChainList,
|
|
@@ -100,12 +100,6 @@ type CapabilityErrorCode = KnownCapabilityErrorCode | (string & {});
|
|
|
100
100
|
declare const capabilityFailureSchema: z.ZodObject<{
|
|
101
101
|
code: z.ZodString;
|
|
102
102
|
message: z.ZodString;
|
|
103
|
-
/**
|
|
104
|
-
* True when Relay retries the attempt if the error reaches it uncaught, and calls the provider
|
|
105
|
-
* again. A failure that is not retryable is captured (or follows from the attempt's pinned
|
|
106
|
-
* inputs), so every run of the attempt sees it again. A retryable failure that quest code
|
|
107
|
-
* handles and moves past is final for the attempt; one that escapes the evaluation is retried.
|
|
108
|
-
*/
|
|
109
103
|
retryable: z.ZodBoolean;
|
|
110
104
|
}, z.core.$loose>;
|
|
111
105
|
type CapabilityFailure = z.infer<typeof capabilityFailureSchema>;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createRelayClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-577DG2IT.js";
|
|
4
4
|
import {
|
|
5
5
|
RelayErrorCode,
|
|
6
6
|
asRelayError,
|
|
7
7
|
clientError,
|
|
8
8
|
cosmosChain
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-AWWCEP7F.js";
|
|
10
10
|
|
|
11
11
|
// src/base58.ts
|
|
12
12
|
var alphabet = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createRelayAction,
|
|
3
3
|
withActionId
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-KYUQEZZA.js";
|
|
5
5
|
import {
|
|
6
6
|
collectionPassSchema,
|
|
7
7
|
creatorAccountProviderSchema,
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
questOutcomeSchema,
|
|
20
20
|
rewardDeliveriesSchema,
|
|
21
21
|
rewardDeliveryQuerySchema
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-6U5WWH3W.js";
|
|
23
23
|
import {
|
|
24
24
|
badgeSchema,
|
|
25
25
|
engagementBoundaryPageSchema,
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
referralDefinitionSchema,
|
|
39
39
|
referralHistorySchema,
|
|
40
40
|
referralSummarySchema
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-UEMLYPKJ.js";
|
|
42
42
|
import {
|
|
43
43
|
AVATAR_UPLOAD_LIMIT,
|
|
44
44
|
avatarUploadTypes,
|
|
@@ -55,24 +55,24 @@ import {
|
|
|
55
55
|
telegramAccountConnectionSchema,
|
|
56
56
|
telegramMiniAppSignInSchema,
|
|
57
57
|
telegramSignInMethodsSchema
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-XGXDINGM.js";
|
|
59
59
|
import {
|
|
60
60
|
PARTICIPANT_TIMEOUT,
|
|
61
61
|
lifetime,
|
|
62
62
|
retryAfter,
|
|
63
63
|
retrying,
|
|
64
64
|
validTimeout
|
|
65
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-R4S6BFOH.js";
|
|
66
66
|
import {
|
|
67
67
|
clientIdentity
|
|
68
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-TZJT5CRF.js";
|
|
69
69
|
import {
|
|
70
70
|
exchangeResultSchema,
|
|
71
71
|
exchangeSchema,
|
|
72
72
|
memberSummarySchema,
|
|
73
73
|
participantSessionSchema,
|
|
74
74
|
sessionMember
|
|
75
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-EQF4ID47.js";
|
|
76
76
|
import {
|
|
77
77
|
RelayError,
|
|
78
78
|
RelayErrorCode,
|
|
@@ -111,7 +111,7 @@ import {
|
|
|
111
111
|
walletSignInNetworksSchema,
|
|
112
112
|
walletSignatureSchema,
|
|
113
113
|
walletUnlinkInputSchema
|
|
114
|
-
} from "./chunk-
|
|
114
|
+
} from "./chunk-AWWCEP7F.js";
|
|
115
115
|
|
|
116
116
|
// src/legacy-submissions.ts
|
|
117
117
|
import * as z from "zod";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
badgeSchema
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-UEMLYPKJ.js";
|
|
4
4
|
import {
|
|
5
5
|
pointLedgerReferenceSchema
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-XGXDINGM.js";
|
|
7
7
|
import {
|
|
8
8
|
authoringIdentityShape,
|
|
9
9
|
entitlementSchema,
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
storedQuestDescriptionSchema,
|
|
26
26
|
storedReviewModeSchema,
|
|
27
27
|
tieredRewardReferenceSchema
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-AWWCEP7F.js";
|
|
29
29
|
|
|
30
30
|
// src/participant-activity.ts
|
|
31
31
|
import * as z from "zod";
|
|
@@ -526,6 +526,19 @@ var rewardDeliveryQuerySchema = z7.strictObject({
|
|
|
526
526
|
cursor: pageCursorSchema.optional(),
|
|
527
527
|
limit: z7.coerce.number().int().min(1).max(500).optional()
|
|
528
528
|
});
|
|
529
|
+
var discordRoleRewardSchema = z7.object({
|
|
530
|
+
roleId: z7.string(),
|
|
531
|
+
quests: z7.array(z7.string()),
|
|
532
|
+
/** Delivery records of this role by `RewardDelivery.status`. */
|
|
533
|
+
deliveries: z7.object({
|
|
534
|
+
pending: z7.number().int(),
|
|
535
|
+
delivered: z7.number().int(),
|
|
536
|
+
failed: z7.number().int()
|
|
537
|
+
})
|
|
538
|
+
});
|
|
539
|
+
var discordRoleRewardsSchema = z7.object({
|
|
540
|
+
roles: z7.array(discordRoleRewardSchema)
|
|
541
|
+
});
|
|
529
542
|
|
|
530
543
|
export {
|
|
531
544
|
knownRelayEventSchema,
|
|
@@ -578,5 +591,7 @@ export {
|
|
|
578
591
|
knownRewardDeliverySchema,
|
|
579
592
|
rewardDeliverySchema,
|
|
580
593
|
rewardDeliveriesSchema,
|
|
581
|
-
rewardDeliveryQuerySchema
|
|
594
|
+
rewardDeliveryQuerySchema,
|
|
595
|
+
discordRoleRewardSchema,
|
|
596
|
+
discordRoleRewardsSchema
|
|
582
597
|
};
|