@domino-sdk/relay 1.55.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 +85 -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 +306 -72
- package/dist/authoring.js +264 -9
- 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-IZRITLVV.js → chunk-2LKGAL63.js} +2 -2
- package/dist/{chunk-GL43VQ5D.js → chunk-577DG2IT.js} +38 -8
- package/dist/{chunk-UY6KMLQG.js → chunk-6U5WWH3W.js} +141 -100
- package/dist/{chunk-YCOKTQ4E.js → chunk-AWWCEP7F.js} +1403 -882
- package/dist/{chunk-56DBFNR2.js → chunk-EQF4ID47.js} +1 -1
- package/dist/{chunk-YEVD4A5X.js → chunk-IBROKMFV.js} +2 -2
- package/dist/{chunk-XALIFNMD.js → chunk-KBCTII6C.js} +1 -1
- package/dist/{chunk-WHG5WE43.js → chunk-KYUQEZZA.js} +1 -1
- package/dist/{chunk-WUEQOKJH.js → chunk-LDLOB2UZ.js} +4 -4
- package/dist/{chunk-IUF7DW76.js → chunk-M2JQPDUX.js} +39 -9
- package/dist/{chunk-MLIXJPKL.js → chunk-MHPKEVEW.js} +1 -0
- package/dist/{chunk-TLK2MD4S.js → chunk-R4S6BFOH.js} +1 -1
- package/dist/{chunk-VFBQVY4X.js → chunk-TZJT5CRF.js} +1 -1
- package/dist/{chunk-C7QZ4UBB.js → chunk-UEMLYPKJ.js} +21 -5
- package/dist/{chunk-F6HECAXA.js → chunk-W42KMMH5.js} +140 -101
- package/dist/{chunk-WHMXXHPX.js → chunk-XGXDINGM.js} +16 -3
- package/dist/{chunk-SABMNPF2.js → chunk-YMWRLAAP.js} +1 -1
- package/dist/{chunk-YE3XYB2F.js → chunk-YRSU2X2P.js} +2 -2
- package/dist/{client-C4zUZKpj.d.ts → client-3b9HjSzZ.d.ts} +191 -117
- package/dist/{deployments-B32QS1CI.d.ts → deployments-BydFVj4Q.d.ts} +798 -235
- package/dist/{groups-O6onGPmC.d.ts → groups-CFuTfFqG.d.ts} +15 -9
- package/dist/index.d.ts +9 -10
- package/dist/index.js +9 -9
- package/dist/{integrations-C6_uUh-s.d.ts → integrations-DrbKQSTD.d.ts} +42 -22
- package/dist/internal.d.ts +10 -10
- package/dist/internal.js +9 -9
- package/dist/{offers-BMDNcvwB.d.ts → offers-DAfe1O3_.d.ts} +211 -2
- package/dist/{pages-BFloMpyQ.d.ts → pages-ChDVLrgR.d.ts} +95 -10
- package/dist/portal-proxy.js +4 -4
- package/dist/react/index.d.ts +149 -72
- package/dist/react/index.js +65 -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 +1265 -697
- package/dist/schema.js +96 -12
- package/dist/server/index.d.ts +10 -10
- package/dist/server/index.js +1644 -1105
- package/dist/{submission-input-BbdawqVy.d.ts → submission-input-DxQ6RnKo.d.ts} +2 -2
- package/dist/{telegram-browser-CwaxROAZ.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-CZJOW5Sr.d.ts → transport-D_Eqf78J.d.ts} +8592 -4384
- 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/WKATKZXE.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
|
@@ -3,8 +3,12 @@ import {
|
|
|
3
3
|
parseUnits
|
|
4
4
|
} from "./chunk-V7UKZLHA.js";
|
|
5
5
|
import {
|
|
6
|
-
defineDashboard
|
|
7
|
-
|
|
6
|
+
defineDashboard,
|
|
7
|
+
tiktokVideoBodySchema,
|
|
8
|
+
tiktokVideoMetrics,
|
|
9
|
+
youtubeShortBodySchema,
|
|
10
|
+
youtubeShortMetrics
|
|
11
|
+
} from "./chunk-W42KMMH5.js";
|
|
8
12
|
import {
|
|
9
13
|
CapabilityError,
|
|
10
14
|
capabilityErrorCodes
|
|
@@ -13,7 +17,7 @@ import {
|
|
|
13
17
|
sourceDataSchema,
|
|
14
18
|
sourceRoles,
|
|
15
19
|
validateQuestShape
|
|
16
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-YMWRLAAP.js";
|
|
17
21
|
import {
|
|
18
22
|
badgeDeclarationSchema,
|
|
19
23
|
defineOffer,
|
|
@@ -22,12 +26,12 @@ import {
|
|
|
22
26
|
engagementScoreSchema,
|
|
23
27
|
leaderboardAuthoringSchema,
|
|
24
28
|
referralAuthoringSchema
|
|
25
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-UEMLYPKJ.js";
|
|
26
30
|
import {
|
|
27
31
|
pointLedgerDeclarationSchema,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
} from "./chunk-
|
|
32
|
+
telegramMessageDataSchema,
|
|
33
|
+
telegramReactionDataSchema
|
|
34
|
+
} from "./chunk-XGXDINGM.js";
|
|
31
35
|
import {
|
|
32
36
|
authoringKey,
|
|
33
37
|
badgeReward,
|
|
@@ -58,9 +62,21 @@ import {
|
|
|
58
62
|
isAmount,
|
|
59
63
|
isBalanceChain,
|
|
60
64
|
isBoundSetting,
|
|
65
|
+
isContractCall,
|
|
66
|
+
isContractEvent,
|
|
61
67
|
isEvmChainId,
|
|
68
|
+
isNftCollection,
|
|
69
|
+
isSolanaProgram,
|
|
62
70
|
ledgerKey,
|
|
63
71
|
ledgerSettingSchema,
|
|
72
|
+
maxWalletEventLogs,
|
|
73
|
+
maxWalletEventLookback,
|
|
74
|
+
maxWalletTransactionLookback,
|
|
75
|
+
maxWalletTransactions,
|
|
76
|
+
parseContractCall,
|
|
77
|
+
parseContractEvent,
|
|
78
|
+
parseContractFunction,
|
|
79
|
+
parseNftCollection,
|
|
64
80
|
parseSettings,
|
|
65
81
|
pointsRewardSchema,
|
|
66
82
|
questDescriptionSchema,
|
|
@@ -75,23 +91,31 @@ import {
|
|
|
75
91
|
settingFieldSchema,
|
|
76
92
|
settingInstant,
|
|
77
93
|
settingResourceId,
|
|
94
|
+
solanaAddressSchema,
|
|
95
|
+
solanaMainnet,
|
|
78
96
|
sourceContent,
|
|
79
97
|
sourceIdentities,
|
|
80
98
|
streakPolicySchema,
|
|
99
|
+
telegramMessagesNamespace,
|
|
100
|
+
telegramReactionsNamespace,
|
|
81
101
|
textOptionsSchema,
|
|
82
102
|
textSettingSchema,
|
|
83
103
|
tierRewardSchema,
|
|
84
104
|
tieredRewardDefinitionSchema,
|
|
105
|
+
tiktokVideosNamespace,
|
|
85
106
|
trackerDataIssue,
|
|
86
107
|
trackerDataSchema,
|
|
87
108
|
trackerDefinitionSchema,
|
|
88
109
|
trackerTriggerContextSchema,
|
|
89
110
|
trackerTriggerPolicySchema,
|
|
90
111
|
urlOptionsSchema,
|
|
112
|
+
walletBalanceSampleSchema,
|
|
113
|
+
walletBalancesNamespace,
|
|
91
114
|
whereSchemaIssue,
|
|
92
115
|
whereSettings,
|
|
93
|
-
xSearchSourceSchema
|
|
94
|
-
|
|
116
|
+
xSearchSourceSchema,
|
|
117
|
+
youtubeShortsNamespace
|
|
118
|
+
} from "./chunk-AWWCEP7F.js";
|
|
95
119
|
|
|
96
120
|
// src/builders.ts
|
|
97
121
|
import * as z from "zod";
|
|
@@ -286,6 +310,12 @@ var discord = {
|
|
|
286
310
|
}
|
|
287
311
|
};
|
|
288
312
|
var telegram = {
|
|
313
|
+
messages() {
|
|
314
|
+
return customSource(telegramMessagesNamespace, {
|
|
315
|
+
identities: ["member"],
|
|
316
|
+
data: telegramMessageDataSchema
|
|
317
|
+
});
|
|
318
|
+
},
|
|
289
319
|
reactions() {
|
|
290
320
|
return customSource(telegramReactionsNamespace, {
|
|
291
321
|
identities: ["member"],
|
|
@@ -294,6 +324,72 @@ var telegram = {
|
|
|
294
324
|
});
|
|
295
325
|
}
|
|
296
326
|
};
|
|
327
|
+
var youtube = {
|
|
328
|
+
shorts() {
|
|
329
|
+
return customSource(youtubeShortsNamespace, {
|
|
330
|
+
identities: ["member"],
|
|
331
|
+
content: {
|
|
332
|
+
body: youtubeShortBodySchema,
|
|
333
|
+
metrics: youtubeShortMetrics
|
|
334
|
+
}
|
|
335
|
+
});
|
|
336
|
+
}
|
|
337
|
+
};
|
|
338
|
+
var tiktok = {
|
|
339
|
+
videos() {
|
|
340
|
+
return customSource(tiktokVideosNamespace, {
|
|
341
|
+
identities: ["member"],
|
|
342
|
+
content: {
|
|
343
|
+
body: tiktokVideoBodySchema,
|
|
344
|
+
metrics: tiktokVideoMetrics
|
|
345
|
+
}
|
|
346
|
+
});
|
|
347
|
+
}
|
|
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
|
+
};
|
|
297
393
|
var pointLedgers = () => ({
|
|
298
394
|
provider: "domino",
|
|
299
395
|
resource: "point-ledger"
|
|
@@ -423,6 +519,114 @@ var settings = {
|
|
|
423
519
|
textSettingSchema(field).transform((value) => value).default(field.default).meta(field)
|
|
424
520
|
);
|
|
425
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
|
+
},
|
|
426
630
|
integer(options) {
|
|
427
631
|
return setting(
|
|
428
632
|
"integer",
|
|
@@ -450,6 +654,37 @@ var settings = {
|
|
|
450
654
|
// src/authoring.ts
|
|
451
655
|
import { z as z2 } from "zod";
|
|
452
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
|
|
453
688
|
var badge = (definition) => badgeReward(definition.key, definition.name);
|
|
454
689
|
var groupMembership = (group) => groupReward(group.key, group.title);
|
|
455
690
|
var points = (ledger, amount) => pointsRewardSchema.parse({
|
|
@@ -957,23 +1192,43 @@ export {
|
|
|
957
1192
|
formatUnits,
|
|
958
1193
|
groupMembership,
|
|
959
1194
|
inGroup,
|
|
1195
|
+
instruction,
|
|
1196
|
+
invoked,
|
|
1197
|
+
isContractCall,
|
|
1198
|
+
isContractEvent,
|
|
960
1199
|
isEvmChainId,
|
|
1200
|
+
isNftCollection,
|
|
1201
|
+
isSolanaProgram,
|
|
961
1202
|
keyed,
|
|
962
1203
|
manual,
|
|
1204
|
+
maxWalletEventLogs,
|
|
1205
|
+
maxWalletEventLookback,
|
|
1206
|
+
maxWalletTransactionLookback,
|
|
1207
|
+
maxWalletTransactions,
|
|
963
1208
|
once,
|
|
1209
|
+
parseContractCall,
|
|
1210
|
+
parseContractEvent,
|
|
1211
|
+
parseContractFunction,
|
|
1212
|
+
parseNftCollection,
|
|
964
1213
|
parseUnits,
|
|
965
1214
|
pointLedgers,
|
|
966
1215
|
points,
|
|
967
1216
|
progress,
|
|
968
1217
|
questCompleted,
|
|
1218
|
+
received,
|
|
969
1219
|
rolling,
|
|
970
1220
|
settings,
|
|
1221
|
+
spent,
|
|
971
1222
|
staffHandover,
|
|
972
1223
|
streak,
|
|
1224
|
+
swapped,
|
|
973
1225
|
telegram,
|
|
1226
|
+
tiktok,
|
|
974
1227
|
trackerDataSchema,
|
|
975
1228
|
trackerTriggerContextSchema,
|
|
976
1229
|
untracked,
|
|
1230
|
+
wallet,
|
|
977
1231
|
x,
|
|
1232
|
+
youtube,
|
|
978
1233
|
z2 as z
|
|
979
1234
|
};
|
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,9 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createRelayAction,
|
|
3
3
|
withActionId
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-KYUQEZZA.js";
|
|
5
5
|
import {
|
|
6
6
|
collectionPassSchema,
|
|
7
|
+
creatorAccountProviderSchema,
|
|
8
|
+
creatorAccountsSchema,
|
|
7
9
|
participantActivityQuerySchema,
|
|
8
10
|
participantActivitySchema,
|
|
9
11
|
participantDeliveriesSchema,
|
|
@@ -17,7 +19,7 @@ import {
|
|
|
17
19
|
questOutcomeSchema,
|
|
18
20
|
rewardDeliveriesSchema,
|
|
19
21
|
rewardDeliveryQuerySchema
|
|
20
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-6U5WWH3W.js";
|
|
21
23
|
import {
|
|
22
24
|
badgeSchema,
|
|
23
25
|
engagementBoundaryPageSchema,
|
|
@@ -36,7 +38,7 @@ import {
|
|
|
36
38
|
referralDefinitionSchema,
|
|
37
39
|
referralHistorySchema,
|
|
38
40
|
referralSummarySchema
|
|
39
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-UEMLYPKJ.js";
|
|
40
42
|
import {
|
|
41
43
|
AVATAR_UPLOAD_LIMIT,
|
|
42
44
|
avatarUploadTypes,
|
|
@@ -53,24 +55,24 @@ import {
|
|
|
53
55
|
telegramAccountConnectionSchema,
|
|
54
56
|
telegramMiniAppSignInSchema,
|
|
55
57
|
telegramSignInMethodsSchema
|
|
56
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-XGXDINGM.js";
|
|
57
59
|
import {
|
|
58
60
|
PARTICIPANT_TIMEOUT,
|
|
59
61
|
lifetime,
|
|
60
62
|
retryAfter,
|
|
61
63
|
retrying,
|
|
62
64
|
validTimeout
|
|
63
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-R4S6BFOH.js";
|
|
64
66
|
import {
|
|
65
67
|
clientIdentity
|
|
66
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-TZJT5CRF.js";
|
|
67
69
|
import {
|
|
68
70
|
exchangeResultSchema,
|
|
69
71
|
exchangeSchema,
|
|
70
72
|
memberSummarySchema,
|
|
71
73
|
participantSessionSchema,
|
|
72
74
|
sessionMember
|
|
73
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-EQF4ID47.js";
|
|
74
76
|
import {
|
|
75
77
|
RelayError,
|
|
76
78
|
RelayErrorCode,
|
|
@@ -109,7 +111,7 @@ import {
|
|
|
109
111
|
walletSignInNetworksSchema,
|
|
110
112
|
walletSignatureSchema,
|
|
111
113
|
walletUnlinkInputSchema
|
|
112
|
-
} from "./chunk-
|
|
114
|
+
} from "./chunk-AWWCEP7F.js";
|
|
113
115
|
|
|
114
116
|
// src/legacy-submissions.ts
|
|
115
117
|
import * as z from "zod";
|
|
@@ -2114,6 +2116,34 @@ function relayClient(options) {
|
|
|
2114
2116
|
})
|
|
2115
2117
|
}
|
|
2116
2118
|
},
|
|
2119
|
+
/**
|
|
2120
|
+
* The member's creator accounts: the platform accounts they publish from, such as a YouTube
|
|
2121
|
+
* channel, which managed tracker sources read. A creator account is linked only to a
|
|
2122
|
+
* signed-in member, never used to sign in, and linking another one on the same platform
|
|
2123
|
+
* replaces it.
|
|
2124
|
+
*/
|
|
2125
|
+
creatorAccounts: {
|
|
2126
|
+
/** One entry per creator-account provider the platform configured. */
|
|
2127
|
+
list: (requestOptions) => request("/v1/auth/creator-accounts", creatorAccountsSchema, {
|
|
2128
|
+
options: requestOptions
|
|
2129
|
+
}),
|
|
2130
|
+
/**
|
|
2131
|
+
* Leaves for the provider's consent screen to link an account to the signed-in member.
|
|
2132
|
+
* Answers the URL to open; the browser comes back to the app linked.
|
|
2133
|
+
*/
|
|
2134
|
+
connect: async (provider, requestOptions) => request("/v1/auth/start", z2.object({ url: z2.string() }), {
|
|
2135
|
+
json: {
|
|
2136
|
+
provider: parseInput(creatorAccountProviderSchema, provider),
|
|
2137
|
+
mode: "connect"
|
|
2138
|
+
},
|
|
2139
|
+
options: requestOptions
|
|
2140
|
+
}),
|
|
2141
|
+
/** Unlinks the member's account on `provider`. Records it authored stay. */
|
|
2142
|
+
disconnect: async (provider, requestOptions) => request("/v1/auth/accounts/disconnect", acknowledged, {
|
|
2143
|
+
json: { provider: parseInput(creatorAccountProviderSchema, provider) },
|
|
2144
|
+
options: requestOptions
|
|
2145
|
+
})
|
|
2146
|
+
},
|
|
2117
2147
|
/** The member's connected sign-in accounts, one per provider. */
|
|
2118
2148
|
accounts: (requestOptions) => request("/v1/auth/accounts", z2.array(accountConnectionSchema), {
|
|
2119
2149
|
options: requestOptions
|