@domino-sdk/relay 1.67.0 → 1.68.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +43 -0
- package/dist/{accounts-C2O8mpB8.d.ts → accounts-DnpKoJCo.d.ts} +210 -3
- package/dist/{attempt-captures-ClHAoo_n.d.ts → attempt-captures-DMNFMYFb.d.ts} +9 -1
- package/dist/authoring.d.ts +349 -38
- package/dist/authoring.js +125 -18
- package/dist/{automatic-outcomes-BEnPn4Uh.d.ts → automatic-outcomes-CQ3vpiQl.d.ts} +2 -2
- package/dist/avatar.d.ts +1 -1
- package/dist/browser.d.ts +10 -9
- package/dist/browser.js +12 -13
- package/dist/{catalog-CbiftcxQ.d.ts → catalog-BLGie8Lh.d.ts} +60 -2
- package/dist/chunk-4JSPMFO2.js +427 -0
- package/dist/{chunk-5DZNMLDM.js → chunk-55WJVFWC.js} +2 -2
- package/dist/{chunk-Q5QVAF7R.js → chunk-5AKD4ZF3.js} +37 -25
- package/dist/{chunk-DSJ46QLB.js → chunk-6UBFSMCM.js} +1 -1
- package/dist/{chunk-P33ZAJMS.js → chunk-6YTSRWRB.js} +1199 -677
- package/dist/{chunk-RDUSFUXX.js → chunk-75KF633N.js} +9 -1
- package/dist/{chunk-Q6KTTVOI.js → chunk-7YSVZA7A.js} +1 -1
- package/dist/{chunk-BMJHFWVT.js → chunk-CZ7NQ7W7.js} +10 -43
- package/dist/{chunk-X3FMVRMM.js → chunk-DDJN2T5A.js} +1 -1
- package/dist/{chunk-KUNPCDN6.js → chunk-DNPDR4Z7.js} +16 -9
- package/dist/{chunk-RWR2LOPA.js → chunk-EXZVWQOQ.js} +2 -2
- package/dist/{chunk-MVQQDPQX.js → chunk-HXTKI34N.js} +14 -2
- package/dist/{chunk-FGXLXENM.js → chunk-IW46TW3A.js} +21 -1
- package/dist/{chunk-5SBA6X5X.js → chunk-KKHENO57.js} +2 -2
- package/dist/{chunk-U66GUVSG.js → chunk-LZXDYSUH.js} +2 -0
- package/dist/{chunk-QYC3CZVD.js → chunk-MEUAJIVO.js} +2 -2
- package/dist/{chunk-BQXRCJ3N.js → chunk-P4TPW4SY.js} +1 -1
- package/dist/{chunk-NRMQVK2W.js → chunk-R3MNZKNJ.js} +1 -1
- package/dist/{chunk-Z2Z5DBNW.js → chunk-SD74HD75.js} +45 -9
- package/dist/{chunk-JK3XV2CR.js → chunk-TYZFVL73.js} +50 -8
- package/dist/chunk-VAGGGB6B.js +87 -0
- package/dist/{chunk-2HHZV7U3.js → chunk-VRZZB7CQ.js} +1 -1
- package/dist/{client-CZPewB9h.d.ts → client-BMif22WQ.d.ts} +133 -7
- package/dist/{dashboards-jGPM3AxF.d.ts → dashboards-DMk-vL1q.d.ts} +4 -4
- package/dist/{deployments-BVFd7ddA.d.ts → deployments-BCr418BX.d.ts} +582 -173
- package/dist/{identity-integration-W1Vo3Ql9.d.ts → identity-integration-r76xaAax.d.ts} +1 -1
- package/dist/index.d.ts +10 -10
- package/dist/index.js +10 -10
- package/dist/internal.d.ts +137 -14
- package/dist/internal.js +240 -19
- package/dist/{limits-C4RzrOV4.d.ts → limits-ByVRQePO.d.ts} +6 -1
- package/dist/{offers-BpYenB9i.d.ts → offers-xcPbYaEv.d.ts} +2 -2
- package/dist/portal-proxy.d.ts +2 -2
- package/dist/portal-proxy.js +11 -11
- package/dist/react/index.d.ts +37 -15
- package/dist/react/index.js +12 -13
- package/dist/{reward-deliveries-BOWpMytr.d.ts → reward-deliveries-0VvT6LMj.d.ts} +1 -1
- package/dist/runtime/authoring.js +1 -1
- package/dist/runtime/chunks/2UDZ6TPL.js +1 -0
- package/dist/runtime/manifest.json +3 -3
- package/dist/runtime/schema.js +1 -1
- package/dist/schema.d.ts +398 -104
- package/dist/schema.js +62 -8
- package/dist/server/index.d.ts +12 -12
- package/dist/server/index.js +2046 -886
- package/dist/{sign-in-providers-BRYVOSlG.d.ts → sign-in-providers-C5_753DZ.d.ts} +2 -2
- package/dist/solana.d.ts +171 -0
- package/dist/solana.js +364 -0
- package/dist/{submission-input-C152xIdn.d.ts → submission-input-CaL8drIh.d.ts} +2 -2
- package/dist/{telegram-browser-657QqiQl.d.ts → telegram-browser-DLtHPRBI.d.ts} +6 -108
- package/dist/telegram.d.ts +8 -8
- package/dist/telegram.js +2 -2
- package/dist/testing.d.ts +85 -13
- package/dist/testing.js +101 -11
- package/dist/{tracker-data-BqY-9Vu-.d.ts → tracker-data-CAK942sx.d.ts} +298 -1
- package/dist/{transport-CthYgZXK.d.ts → transport-CkidqTOk.d.ts} +5250 -1226
- package/dist/{wallet-Btng186v.d.ts → wallet-DQtJelQQ.d.ts} +367 -13
- package/dist/wallet-browser-dpmr22Xv.d.ts +106 -0
- package/package.json +16 -1
- package/dist/chunk-UWUS4OOV.js +0 -59
- package/dist/chunk-UYVJZR33.js +0 -34
- package/dist/runtime/chunks/C2MGLQXC.js +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
export { B as Badge, a as BadgeCatalog, M as ManagedBadge, b as MemberBadge, c as MemberBadges, O as Offer, d as OfferDefinition, e as OfferPrice, R as RedeemOfferInput, f as Redemption } from './offers-
|
|
1
|
+
export { B as Badge, a as BadgeCatalog, M as ManagedBadge, b as MemberBadge, c as MemberBadges, O as Offer, d as OfferDefinition, e as OfferPrice, R as RedeemOfferInput, f as Redemption } from './offers-xcPbYaEv.js';
|
|
2
2
|
export { R as RelayAction, c as createRelayAction } from './action-9Xl0StBg.js';
|
|
3
|
-
export { A as AuthStartInput, C as ClaimSubmission, E as EmailVerification, K as KnownRelayErrorCode, P as PhotoSubmission, a as ProgressObservation, b as ProgressObserver, Q as QuestActionResult, c as QuestController, d as QuestUpdatedError, e as QuizSubmission, R as RelayClient, f as RelayClientOptions, g as RelayError, h as RelayErrorCode, i as RelayErrorDetails, j as RelayErrorKind, k as RelayRequestOptions, l as RelayResponseOptions, S as SubmissionCallOptions, m as SubmissionDraft, n as SubmissionStatus, o as SubmissionStore, V as ValueSubmission, p as createRelayClient, q as isRelayError } from './client-
|
|
3
|
+
export { A as AuthStartInput, C as ClaimSubmission, E as EmailVerification, K as KnownRelayErrorCode, P as PhotoSubmission, a as ProgressObservation, b as ProgressObserver, Q as QuestActionResult, c as QuestController, d as QuestUpdatedError, e as QuizSubmission, R as RelayClient, f as RelayClientOptions, g as RelayError, h as RelayErrorCode, i as RelayErrorDetails, j as RelayErrorKind, k as RelayRequestOptions, l as RelayResponseOptions, S as SubmissionCallOptions, m as SubmissionDraft, n as SubmissionStatus, o as SubmissionStore, V as ValueSubmission, p as createRelayClient, q as isRelayError } from './client-BMif22WQ.js';
|
|
4
4
|
export { R as RequestError, a as RequestErrorDetails, b as RequestErrorKind, c as RequestRecovery, i as isRequestError } from './request-error-D_dUPLwo.js';
|
|
5
|
-
export { A as AccountConnection, a as Attempt, b as AttemptStatus, c as AuthProvider, d as AvailabilityWindow, C as CampaignDefinition, e as CampaignEnrollment, f as CampaignEnrollmentInput, g as CampaignView, h as CampaignWithdrawalInput, E as Entitlement, i as EvaluatorProgress, K as KnownAttemptStatus, j as KnownPointEntryKind, k as KnownSignInAccountStatus, l as KnownSignInProvider, L as LeaderboardDefinition, m as LeaderboardHistoryPage, n as LeaderboardHistoryQuery, o as LeaderboardPage, p as LeaderboardPlacement, q as LeaderboardQuery, M as MemberCampaignEnrollmentInput, r as MemberCampaignWithdrawalInput, s as MemberProgress, P as PointBalance, t as PointBalances, u as PointEntry, v as PointEntryKind, w as PointHistoryPage, x as PointHistoryQuery, y as PointLedgerReference, z as ProjectGroup, B as ProjectGroupReference, Q as QuestBudgetView, D as QuestPresentation, F as QuestProfile, G as QuizEvidence, R as ReferralDefinition, H as Reward, S as SignInAccount, I as SignInAccountStatus, J as SignInProvider, N as SignInProviderOption, O as SubmissionEvidence, T as SubmitInput, U as TieredRewardReference } from './accounts-
|
|
5
|
+
export { A as AccountConnection, a as Attempt, b as AttemptStatus, c as AuthProvider, d as AvailabilityWindow, C as CampaignDefinition, e as CampaignEnrollment, f as CampaignEnrollmentInput, g as CampaignView, h as CampaignWithdrawalInput, E as Entitlement, i as EvaluatorProgress, K as KnownAttemptStatus, j as KnownPointEntryKind, k as KnownSignInAccountStatus, l as KnownSignInProvider, L as LeaderboardDefinition, m as LeaderboardHistoryPage, n as LeaderboardHistoryQuery, o as LeaderboardPage, p as LeaderboardPlacement, q as LeaderboardQuery, M as MemberCampaignEnrollmentInput, r as MemberCampaignWithdrawalInput, s as MemberProgress, P as PointBalance, t as PointBalances, u as PointEntry, v as PointEntryKind, w as PointHistoryPage, x as PointHistoryQuery, y as PointLedgerReference, z as ProjectGroup, B as ProjectGroupReference, Q as QuestBudgetView, D as QuestPresentation, F as QuestProfile, G as QuizEvidence, R as ReferralDefinition, H as Reward, S as SignInAccount, I as SignInAccountStatus, J as SignInProvider, N as SignInProviderOption, O as SubmissionEvidence, T as SubmitInput, U as TieredRewardReference } from './accounts-DnpKoJCo.js';
|
|
6
6
|
export { f as formatUnits, p as parseUnits } from './units-CwgsPB_r.js';
|
|
7
|
-
export { C as ConsentChannel, a as ConsentInput, b as ConsentSource, c as ConsentState, d as CreatorAccount, e as CreatorAccountProvider, f as CreatorAccounts, K as KnownConsentChannel, g as KnownConsentSource, h as KnownConsentState, M as MemberConsent, P as Page, i as PageQuery, Q as QuestClaimInput, j as QuestEnrollment, k as QuestEnrollmentInput, l as QuestOutcome, m as QuestOutcomePage, n as QuestOutcomeQuery, o as QuestOutcomeState, R as ResponseResult, U as UnsupportedResponse, p as paginate } from './reward-deliveries-
|
|
8
|
-
export { M as MissingPrerequisite, P as Prerequisite, T as TelegramAccountConnection, a as TelegramSignInMethods, b as TextEvidence, c as TextOptions, U as UrlEvidence, d as UrlOptions, V as ValueEvidence } from './submission-input-
|
|
7
|
+
export { C as ConsentChannel, a as ConsentInput, b as ConsentSource, c as ConsentState, d as CreatorAccount, e as CreatorAccountProvider, f as CreatorAccounts, K as KnownConsentChannel, g as KnownConsentSource, h as KnownConsentState, M as MemberConsent, P as Page, i as PageQuery, Q as QuestClaimInput, j as QuestEnrollment, k as QuestEnrollmentInput, l as QuestOutcome, m as QuestOutcomePage, n as QuestOutcomeQuery, o as QuestOutcomeState, R as ResponseResult, U as UnsupportedResponse, p as paginate } from './reward-deliveries-0VvT6LMj.js';
|
|
8
|
+
export { M as MissingPrerequisite, P as Prerequisite, T as TelegramAccountConnection, a as TelegramSignInMethods, b as TextEvidence, c as TextOptions, U as UrlEvidence, d as UrlOptions, V as ValueEvidence } from './submission-input-CaL8drIh.js';
|
|
9
9
|
export { E as ExchangeInput, M as MemberSummary, P as ParticipantActivity, a as ParticipantPrincipal, b as ParticipantSession, R as RelayEvent, S as Session, s as sessionMember } from './participant-activity-DXRq4s6K.js';
|
|
10
|
-
export { Q as QuestInteraction, a as QuestRewardView, b as QuestView } from './catalog-
|
|
11
|
-
export { A as AutomaticCatchUpPreview, a as AutomaticEvent, b as AutomaticOutcome, C as CollectionPass, c as CounterAchievement, d as CounterPolicy, e as CounterProgress } from './automatic-outcomes-
|
|
12
|
-
export { K as KnownSkipEnrollment, a as KnownTrackerSkipCode, S as SkipEnrollment, T as TrackerSkipCode } from './tracker-data-
|
|
13
|
-
export { A as AvatarProvider, C as CosmosChain, a as CosmosNetwork, L as LinkedWallet, O as OwnProfile, P as ProfileAvatar, b as ProfileCompletion, c as ProfileCompletionPage, d as ProfileCompletionQuery, e as
|
|
10
|
+
export { Q as QuestInteraction, a as QuestRewardView, b as QuestView } from './catalog-BLGie8Lh.js';
|
|
11
|
+
export { A as AutomaticCatchUpPreview, a as AutomaticEvent, b as AutomaticOutcome, C as CollectionPass, c as CounterAchievement, d as CounterPolicy, e as CounterProgress } from './automatic-outcomes-CQ3vpiQl.js';
|
|
12
|
+
export { K as KnownSkipEnrollment, a as KnownTrackerSkipCode, S as SkipEnrollment, T as TrackerSkipCode } from './tracker-data-CAK942sx.js';
|
|
13
|
+
export { A as AvatarProvider, C as CosmosChain, a as CosmosNetwork, L as LinkedWallet, O as OwnProfile, P as ProfileAvatar, b as ProfileCompletion, c as ProfileCompletionPage, d as ProfileCompletionQuery, e as ProfileNameSource, f as ProfileReferral, g as ProfileSummary, h as ProfileUpdate, i as ProfileVisibility, W as WalletAddressInput, j as WalletChain, k as WalletMessageChallenge, l as WalletProofKind, m as WalletSignInNetwork, n as WalletSignature, o as WalletSigner, p as WalletTransactionChallenge, q as WalletTransactionProof, r as WalletUnlinkInput } from './wallet-DQtJelQQ.js';
|
|
14
14
|
export { Q as QuizContent, S as StreakProgress } from './streaks-0YuipsUQ.js';
|
|
15
15
|
export { P as ParticipantDelivery } from './participant-rewards-BcWkBRn_.js';
|
|
16
16
|
import 'zod';
|
|
17
|
-
import './sign-in-providers-
|
|
17
|
+
import './sign-in-providers-C5_753DZ.js';
|
package/dist/index.js
CHANGED
|
@@ -5,32 +5,32 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
QuestUpdatedError,
|
|
7
7
|
createRelayClient
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-SD74HD75.js";
|
|
9
9
|
import {
|
|
10
10
|
createRelayAction
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-P4TPW4SY.js";
|
|
12
|
+
import "./chunk-VRZZB7CQ.js";
|
|
13
|
+
import "./chunk-7YSVZA7A.js";
|
|
14
|
+
import "./chunk-KKHENO57.js";
|
|
15
15
|
import {
|
|
16
16
|
QuestOutcomeState
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-R3MNZKNJ.js";
|
|
18
18
|
import {
|
|
19
19
|
sessionMember
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
import "./chunk-
|
|
20
|
+
} from "./chunk-6UBFSMCM.js";
|
|
21
|
+
import "./chunk-55WJVFWC.js";
|
|
22
22
|
import {
|
|
23
23
|
AttemptStatus,
|
|
24
24
|
PointEntryKind,
|
|
25
25
|
paginate
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-6YTSRWRB.js";
|
|
27
27
|
import {
|
|
28
28
|
RelayError,
|
|
29
29
|
RelayErrorCode,
|
|
30
30
|
RequestError,
|
|
31
31
|
isRelayError,
|
|
32
32
|
isRequestError
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-IW46TW3A.js";
|
|
34
34
|
export {
|
|
35
35
|
AttemptStatus,
|
|
36
36
|
PointEntryKind,
|
package/dist/internal.d.ts
CHANGED
|
@@ -1,20 +1,22 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export { A as AccountVouchedBy, b as IdentityIntegration, c as IdentityIntegrationAccountVouchingInput, d as IdentityIntegrationAppSecret, I as IdentityIntegrationKey, e as IdentityKindClaim, K as KnownIdentityIntegrationEnvironment, P as ParticipantExchangeAccountResult, f as ParticipantExchangeInput, a as ParticipantExchangeResult, g as accountVouchedBySchema, h as appLoginOriginSchema, i as httpsOriginSchema, j as identityIntegrationAccountVouchingInputSchema, k as identityIntegrationAppSecretSchema, l as identityIntegrationInputSchema, m as identityIntegrationKeySchema, n as identityIntegrationSchema, o as identityIntegrationSecretSchema, p as identityKindClaimSchema, q as participantExchangeAccountResultSchema, r as participantExchangeAccountsSchema, s as participantExchangeResultSchema, t as participantExchangeSchema } from './identity-integration-
|
|
3
|
-
export { E as Extracted } from './limits-
|
|
4
|
-
export {
|
|
1
|
+
export { a as ManagementTransportOptions, P as ParticipantRoute, R as REFERRAL_INTEGRATION_REWARD_ERROR, c as containsReferralIntegrationReward, i as isIntegrationParticipantPath, b as isParticipantRoute, m as managementTransport, n as nextScheduleRun, p as parseImageExtraction, d as parseImageResult, e as participantRoutePattern, f as participantRoutes, q as questConfiguration, s as sequenceCursorSchema, g as sourceDataSchema, h as sourceRoles, v as validateQuestShape } from './transport-CkidqTOk.js';
|
|
2
|
+
export { A as AccountVouchedBy, b as IdentityIntegration, c as IdentityIntegrationAccountVouchingInput, d as IdentityIntegrationAppSecret, I as IdentityIntegrationKey, e as IdentityKindClaim, K as KnownIdentityIntegrationEnvironment, P as ParticipantExchangeAccountResult, f as ParticipantExchangeInput, a as ParticipantExchangeResult, g as accountVouchedBySchema, h as appLoginOriginSchema, i as httpsOriginSchema, j as identityIntegrationAccountVouchingInputSchema, k as identityIntegrationAppSecretSchema, l as identityIntegrationInputSchema, m as identityIntegrationKeySchema, n as identityIntegrationSchema, o as identityIntegrationSecretSchema, p as identityKindClaimSchema, q as participantExchangeAccountResultSchema, r as participantExchangeAccountsSchema, s as participantExchangeResultSchema, t as participantExchangeSchema } from './identity-integration-r76xaAax.js';
|
|
3
|
+
export { E as Extracted } from './limits-ByVRQePO.js';
|
|
4
|
+
export { ar as stationRefusal } from './accounts-DnpKoJCo.js';
|
|
5
|
+
import { b as StandardWallet, c as StandardWalletAccount } from './wallet-browser-dpmr22Xv.js';
|
|
6
|
+
import { S as SolanaNetwork, X as SolanaSeed } from './wallet-DQtJelQQ.js';
|
|
7
|
+
export { aD as evmWalletOn } from './wallet-DQtJelQQ.js';
|
|
5
8
|
import { b as RequestErrorKind } from './request-error-D_dUPLwo.js';
|
|
6
|
-
export {
|
|
9
|
+
export { E as TrackerDataBudget, F as schemaCheckedReader, H as sourceContent, J as trackerDataBatchSteps, N as trackerDataIssue, P as trackerDataIssues, U as trackerDataPathTypes, V as trackerDataRecordSteps, Y as whereSchemaIssue, Z as whereSettings } from './tracker-data-CAK942sx.js';
|
|
7
10
|
export { H as HostEnvironment, h as hostEnvironmentPath, a as hostEnvironmentSchema } from './host-environment-FN4zg3hw.js';
|
|
8
|
-
export { c as compatibleSettingKinds,
|
|
11
|
+
export { c as compatibleSettingKinds, e as dashboardIssue, i as isBoundSetting, n as normalizeDashboard } from './dashboards-DMk-vL1q.js';
|
|
9
12
|
import 'zod';
|
|
10
|
-
import './
|
|
11
|
-
import './reward-deliveries-BOWpMytr.js';
|
|
13
|
+
import './reward-deliveries-0VvT6LMj.js';
|
|
12
14
|
import './action-9Xl0StBg.js';
|
|
13
|
-
import './automatic-outcomes-
|
|
14
|
-
import './deployments-
|
|
15
|
-
import './offers-
|
|
16
|
-
import './catalog-
|
|
17
|
-
import './attempt-captures-
|
|
15
|
+
import './automatic-outcomes-CQ3vpiQl.js';
|
|
16
|
+
import './deployments-BCr418BX.js';
|
|
17
|
+
import './offers-xcPbYaEv.js';
|
|
18
|
+
import './catalog-BLGie8Lh.js';
|
|
19
|
+
import './attempt-captures-DMNFMYFb.js';
|
|
18
20
|
|
|
19
21
|
/** The hosts a developer machine serves over plain HTTP: browser tests, `vite` dev and the local stack. */
|
|
20
22
|
declare const loopbackHosts: readonly string[];
|
|
@@ -47,6 +49,127 @@ declare function walletSignatureValid(input: {
|
|
|
47
49
|
signature: string;
|
|
48
50
|
}): Promise<boolean>;
|
|
49
51
|
|
|
52
|
+
/**
|
|
53
|
+
* The Solana Pay link a station's QR code encodes: `solana:` and the URL-encoded app URL that
|
|
54
|
+
* serves the quest with `defineStationAction`, with `?station=<key>` added.
|
|
55
|
+
*/
|
|
56
|
+
declare function stationPayLink(url: string | URL, station: string): string;
|
|
57
|
+
/**
|
|
58
|
+
* An SVG of `link`'s QR code, black modules on white with the four-module quiet zone scanners
|
|
59
|
+
* need, and `label` centred under it.
|
|
60
|
+
*/
|
|
61
|
+
declare function stationQrSvg(link: string, label: string): Promise<string>;
|
|
62
|
+
|
|
63
|
+
type Window = {
|
|
64
|
+
from?: number;
|
|
65
|
+
until?: number;
|
|
66
|
+
};
|
|
67
|
+
/** Whether `time` falls in the window: `from <= time < until`, with a missing bound open. */
|
|
68
|
+
declare const inWindow: (window: Window, time: number) => boolean;
|
|
69
|
+
|
|
70
|
+
/** Base58 (Bitcoin alphabet), the encoding Solana uses for addresses and signatures. */
|
|
71
|
+
declare function base58(bytes: Uint8Array): string;
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* The Wallet Standard wallets registered with `target`, the page's window: wallets loaded before
|
|
75
|
+
* this call answer `wallet-standard:app-ready`, and wallets loading during it dispatch
|
|
76
|
+
* `wallet-standard:register-wallet`.
|
|
77
|
+
*/
|
|
78
|
+
declare function registeredWallets(target: EventTarget): StandardWallet[];
|
|
79
|
+
/**
|
|
80
|
+
* Connects a Wallet Standard wallet and returns the account it shares on Solana, or its first
|
|
81
|
+
* account. Throws when the wallet lacks `standard:connect` or shares no account.
|
|
82
|
+
*/
|
|
83
|
+
declare function connectSolanaAccount(wallet: StandardWallet): Promise<StandardWalletAccount>;
|
|
84
|
+
|
|
85
|
+
/** Each cluster's public JSON-RPC endpoint, which Console sends payout batches through. */
|
|
86
|
+
declare const solanaPublicEndpoints: Record<SolanaNetwork, string>;
|
|
87
|
+
/** Calls `method` on a Solana JSON-RPC endpoint; a node's error rejects with its message. */
|
|
88
|
+
declare function solanaRpc<T>(url: string, method: string, params: unknown[]): Promise<T>;
|
|
89
|
+
/**
|
|
90
|
+
* Waits until `signature` is confirmed through `url`. Resolves false when it failed, or when the
|
|
91
|
+
* cluster passed `lastValidBlockHeight` without it.
|
|
92
|
+
*/
|
|
93
|
+
declare function confirmedSignature(url: string, signature: string, lastValidBlockHeight: number): Promise<boolean>;
|
|
94
|
+
|
|
95
|
+
/** The largest program IDL Relay stores, as JSON. */
|
|
96
|
+
declare const maxAnchorIdlBytes: number;
|
|
97
|
+
/** Whether `idl`, as minified JSON, is larger than Relay stores. */
|
|
98
|
+
declare const idlTooLarge: (idl: unknown) => boolean;
|
|
99
|
+
/**
|
|
100
|
+
* Whether an IDL account type is zero-copy, which Relay doesn't decode: only a 0.30+ IDL marks
|
|
101
|
+
* one, with a `serialization` other than `borsh` on the account or on the type of its name.
|
|
102
|
+
*/
|
|
103
|
+
declare const zeroCopyAccount: (account: {
|
|
104
|
+
serialization?: unknown;
|
|
105
|
+
}, declared?: {
|
|
106
|
+
serialization?: unknown;
|
|
107
|
+
}) => boolean;
|
|
108
|
+
/**
|
|
109
|
+
* `value` as an integer of `bits` bits, or why it is not one: not a safe integer number or decimal
|
|
110
|
+
* string, or out of the type's range.
|
|
111
|
+
*/
|
|
112
|
+
declare function checkedInteger(value: unknown, signed: boolean, bits: number): bigint | "not-an-integer" | {
|
|
113
|
+
min: bigint;
|
|
114
|
+
max: bigint;
|
|
115
|
+
};
|
|
116
|
+
/** `value` as `bits / 8` little-endian bytes, two's complement when negative, as `to_le_bytes()`. */
|
|
117
|
+
declare function littleEndianBytes(value: bigint, bits: number): Uint8Array;
|
|
118
|
+
/**
|
|
119
|
+
* A program-account seed's bytes, `"wallet"` where each wallet's address goes, or why the seed
|
|
120
|
+
* doesn't fit: text over 32 bytes, no Solana address, or an integer out of its type's range.
|
|
121
|
+
* Relay's program-account reader and `domino quests from-idl --account` check seeds alike.
|
|
122
|
+
*/
|
|
123
|
+
declare function solanaSeedBytes(seed: SolanaSeed, position: number): Uint8Array | "wallet" | {
|
|
124
|
+
problem: string;
|
|
125
|
+
};
|
|
126
|
+
/** How an on-chain IDL account compresses the IDL's JSON. */
|
|
127
|
+
type IdlCompression = "none" | "gzip" | "zlib";
|
|
128
|
+
/** Node's `gunzipSync` and `inflateSync`, or decompressors that take the same output limit. */
|
|
129
|
+
type IdlDecompressors = Record<"gunzip" | "inflate", (bytes: Uint8Array, options: {
|
|
130
|
+
maxOutputLength: number;
|
|
131
|
+
}) => Uint8Array>;
|
|
132
|
+
/**
|
|
133
|
+
* The JSON value `bytes` hold, decompressed and parsed as UTF-8, or null when they hold none:
|
|
134
|
+
* corrupt data, data that decompresses past four times the stored limit, or text that is not JSON.
|
|
135
|
+
*/
|
|
136
|
+
declare function storedIdlJson(bytes: Uint8Array, compression: IdlCompression, decompress: IdlDecompressors): unknown;
|
|
137
|
+
/** The 32 bytes of a base58 Solana address; throws for anything else. */
|
|
138
|
+
declare function solanaAddressBytes(address: string): Uint8Array;
|
|
139
|
+
/** Solana's `find_program_address`: the first off-curve address from bump seed 255 down. */
|
|
140
|
+
declare function solanaProgramAddress(seeds: Uint8Array[], program: string): string;
|
|
141
|
+
/**
|
|
142
|
+
* The address of `program`'s Anchor IDL account: `create_with_seed` from the program's signer
|
|
143
|
+
* address (`find_program_address([], program)`) with seed `"anchor:idl"`, owned by the program.
|
|
144
|
+
*/
|
|
145
|
+
declare function anchorIdlAddress(program: string): string;
|
|
146
|
+
/**
|
|
147
|
+
* The zlib-compressed IDL JSON in an Anchor IDL account's data: an 8-byte discriminator, the 32-byte
|
|
148
|
+
* authority, a u32 length, then that many bytes. Null when the data holds none.
|
|
149
|
+
*/
|
|
150
|
+
declare function anchorIdlAccountBytes(data: Uint8Array): Uint8Array | null;
|
|
151
|
+
/** The Program Metadata Program, where Anchor 1.0 and later and Codama publish a program's IDL. */
|
|
152
|
+
declare const programMetadataProgram = "ProgM6JCCvbYkfKqJYHePx4xxSUSqJp7rh8Lyv7nk7S";
|
|
153
|
+
/**
|
|
154
|
+
* The address of `program`'s canonical IDL metadata account, the one its upgrade authority wrote:
|
|
155
|
+
* `find_program_address([program, "idl" padded to 16 bytes], ProgM6…)`. A third party's metadata
|
|
156
|
+
* account for the program also derives from its authority, and is not read.
|
|
157
|
+
*/
|
|
158
|
+
declare function programMetadataIdlAddress(program: string): string;
|
|
159
|
+
/**
|
|
160
|
+
* The IDL bytes in a canonical Program Metadata `idl` account's data, and how they are compressed.
|
|
161
|
+
* The 96-byte header holds the discriminator, the program, the authority, the mutable and canonical
|
|
162
|
+
* flags, the seed, the data's encoding, compression, format and source, then a u32 data length at
|
|
163
|
+
* byte 87. Only data stored in the account itself, as UTF-8 JSON, is read: Anchor writes it that
|
|
164
|
+
* way, and a URL or another account as the source would let the IDL change without the account
|
|
165
|
+
* changing. A format of none reads as JSON too, as Codama's own IDL and some Anchor ones are
|
|
166
|
+
* written. Null when the account holds no IDL for `program` this way.
|
|
167
|
+
*/
|
|
168
|
+
declare function programMetadataIdlBytes(data: Uint8Array, program: string): {
|
|
169
|
+
bytes: Uint8Array;
|
|
170
|
+
compression: IdlCompression;
|
|
171
|
+
} | null;
|
|
172
|
+
|
|
50
173
|
/** The management client's and the CLI's default deadline per call. */
|
|
51
174
|
declare const MANAGEMENT_TIMEOUT = 30000;
|
|
52
175
|
/** One call's deadline and the caller's signal, shared by every attempt and the body read. */
|
|
@@ -92,4 +215,4 @@ type Rules = {
|
|
|
92
215
|
*/
|
|
93
216
|
declare function retrying<T>(life: Lifetime, rules: Rules, attempt: () => Promise<T>): Promise<T>;
|
|
94
217
|
|
|
95
|
-
export { type AttemptFailure, type Lifetime, MANAGEMENT_TIMEOUT, bareOrigin, canonicalWalletAddress, lifetime, loopbackHosts, retryAfter, retrying, secureOrLoopbackOrigin, walletSignatureValid };
|
|
218
|
+
export { type AttemptFailure, type IdlCompression, type IdlDecompressors, type Lifetime, MANAGEMENT_TIMEOUT, anchorIdlAccountBytes, anchorIdlAddress, bareOrigin, base58, canonicalWalletAddress, checkedInteger, confirmedSignature, connectSolanaAccount, idlTooLarge, inWindow, lifetime, littleEndianBytes, loopbackHosts, maxAnchorIdlBytes, programMetadataIdlAddress, programMetadataIdlBytes, programMetadataProgram, registeredWallets, retryAfter, retrying, secureOrLoopbackOrigin, solanaAddressBytes, solanaProgramAddress, solanaPublicEndpoints, solanaRpc, solanaSeedBytes, stationPayLink, stationQrSvg, storedIdlJson, walletSignatureValid, zeroCopyAccount };
|
package/dist/internal.js
CHANGED
|
@@ -1,21 +1,24 @@
|
|
|
1
1
|
import {
|
|
2
2
|
REFERRAL_INTEGRATION_REWARD_ERROR,
|
|
3
3
|
canonicalWalletAddress,
|
|
4
|
+
confirmedSignature,
|
|
4
5
|
containsReferralIntegrationReward,
|
|
5
6
|
managementTransport,
|
|
6
7
|
questConfiguration,
|
|
7
8
|
sequenceCursorSchema,
|
|
9
|
+
solanaPublicEndpoints,
|
|
10
|
+
solanaRpc,
|
|
8
11
|
walletSignatureValid
|
|
9
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-TYZFVL73.js";
|
|
10
13
|
import {
|
|
11
14
|
parseImageExtraction,
|
|
12
15
|
parseImageResult
|
|
13
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-EXZVWQOQ.js";
|
|
14
17
|
import {
|
|
15
18
|
sourceDataSchema,
|
|
16
19
|
sourceRoles,
|
|
17
20
|
validateQuestShape
|
|
18
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-HXTKI34N.js";
|
|
19
22
|
import {
|
|
20
23
|
accountVouchedBySchema,
|
|
21
24
|
appLoginOriginSchema,
|
|
@@ -35,41 +38,46 @@ import {
|
|
|
35
38
|
participantExchangeResultSchema,
|
|
36
39
|
participantExchangeSchema,
|
|
37
40
|
secureOrLoopbackOrigin
|
|
38
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-5AKD4ZF3.js";
|
|
39
42
|
import {
|
|
40
43
|
isIntegrationParticipantPath,
|
|
41
44
|
isParticipantRoute,
|
|
42
45
|
participantRoutePattern,
|
|
43
46
|
participantRoutes
|
|
44
|
-
} from "./chunk-
|
|
45
|
-
import "./chunk-
|
|
46
|
-
import "./chunk-
|
|
47
|
+
} from "./chunk-LZXDYSUH.js";
|
|
48
|
+
import "./chunk-DNPDR4Z7.js";
|
|
49
|
+
import "./chunk-DDJN2T5A.js";
|
|
47
50
|
import {
|
|
48
51
|
dashboardIssue,
|
|
49
52
|
normalizeDashboard
|
|
50
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-MEUAJIVO.js";
|
|
51
54
|
import "./chunk-MWMCQLCG.js";
|
|
52
55
|
import {
|
|
56
|
+
connectSolanaAccount,
|
|
53
57
|
hostEnvironmentPath,
|
|
54
|
-
hostEnvironmentSchema
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
import "./chunk-
|
|
58
|
+
hostEnvironmentSchema,
|
|
59
|
+
registeredWallets
|
|
60
|
+
} from "./chunk-VAGGGB6B.js";
|
|
61
|
+
import "./chunk-7YSVZA7A.js";
|
|
58
62
|
import {
|
|
59
63
|
MANAGEMENT_TIMEOUT,
|
|
60
64
|
lifetime,
|
|
61
65
|
retryAfter,
|
|
62
66
|
retrying
|
|
63
|
-
} from "./chunk-
|
|
64
|
-
import "./chunk-
|
|
65
|
-
import "./chunk-
|
|
66
|
-
import "./chunk-
|
|
67
|
+
} from "./chunk-KKHENO57.js";
|
|
68
|
+
import "./chunk-R3MNZKNJ.js";
|
|
69
|
+
import "./chunk-6UBFSMCM.js";
|
|
70
|
+
import "./chunk-55WJVFWC.js";
|
|
67
71
|
import {
|
|
72
|
+
base58,
|
|
73
|
+
base58Bytes,
|
|
68
74
|
compatibleSettingKinds,
|
|
69
75
|
evmWalletOn,
|
|
76
|
+
inWindow,
|
|
70
77
|
isBoundSetting,
|
|
71
78
|
schemaCheckedReader,
|
|
72
79
|
sourceContent,
|
|
80
|
+
stationRefusal,
|
|
73
81
|
trackerDataBatchSteps,
|
|
74
82
|
trackerDataIssue,
|
|
75
83
|
trackerDataIssues,
|
|
@@ -77,16 +85,211 @@ import {
|
|
|
77
85
|
trackerDataRecordSteps,
|
|
78
86
|
whereSchemaIssue,
|
|
79
87
|
whereSettings
|
|
80
|
-
} from "./chunk-
|
|
81
|
-
import "./chunk-
|
|
88
|
+
} from "./chunk-6YTSRWRB.js";
|
|
89
|
+
import "./chunk-IW46TW3A.js";
|
|
90
|
+
|
|
91
|
+
// src/station-qr.ts
|
|
92
|
+
function stationPayLink(url, station) {
|
|
93
|
+
const target = new URL(url);
|
|
94
|
+
target.searchParams.set("station", station);
|
|
95
|
+
return `solana:${encodeURIComponent(target.href)}`;
|
|
96
|
+
}
|
|
97
|
+
var escapeXml = (text) => text.replace(
|
|
98
|
+
/[&<>"']/g,
|
|
99
|
+
(character) => ({
|
|
100
|
+
"&": "&",
|
|
101
|
+
"<": "<",
|
|
102
|
+
">": ">",
|
|
103
|
+
'"': """,
|
|
104
|
+
"'": "'"
|
|
105
|
+
})[character] ?? character
|
|
106
|
+
);
|
|
107
|
+
async function stationQrSvg(link, label) {
|
|
108
|
+
const { encodeQR } = await import("qr");
|
|
109
|
+
const modules = encodeQR(link, "raw", { ecc: "medium", border: 4 });
|
|
110
|
+
const size = modules.length;
|
|
111
|
+
const scale = 10;
|
|
112
|
+
const width = size * scale;
|
|
113
|
+
const labelHeight = 6 * scale;
|
|
114
|
+
const path = modules.flatMap(
|
|
115
|
+
(row, y) => row.flatMap((dark, x) => dark ? [`M${x} ${y}h1v1h-1z`] : [])
|
|
116
|
+
).join("");
|
|
117
|
+
return `<svg xmlns="http://www.w3.org/2000/svg" width="${width}" height="${width + labelHeight}" viewBox="0 0 ${width} ${width + labelHeight}">
|
|
118
|
+
<rect width="100%" height="100%" fill="#fff"/>
|
|
119
|
+
<path transform="scale(${scale})" fill="#000" shape-rendering="crispEdges" d="${path}"/>
|
|
120
|
+
<text x="${width / 2}" y="${width + labelHeight / 2}" font-family="sans-serif" font-size="${2.4 * scale}" text-anchor="middle" dominant-baseline="middle" fill="#000">${escapeXml(label)}</text>
|
|
121
|
+
</svg>
|
|
122
|
+
`;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
// src/solana-idl-accounts.ts
|
|
126
|
+
import { sha256 } from "@noble/hashes/sha2.js";
|
|
127
|
+
import { concatBytes } from "@noble/hashes/utils.js";
|
|
128
|
+
var encoder = /* @__PURE__ */ (() => new TextEncoder())();
|
|
129
|
+
var maxAnchorIdlBytes = 512 * 1024;
|
|
130
|
+
var idlTooLarge = (idl) => new TextEncoder().encode(JSON.stringify(idl)).length > maxAnchorIdlBytes;
|
|
131
|
+
var zeroCopyAccount = (account, declared) => (declared?.serialization ?? account.serialization ?? "borsh") !== "borsh";
|
|
132
|
+
function checkedInteger(value, signed, bits) {
|
|
133
|
+
const text = typeof value === "number" ? String(value) : value;
|
|
134
|
+
if (typeof text !== "string" || typeof value === "number" && !Number.isSafeInteger(value) || !/^-?(0|[1-9][0-9]{0,77})$/.test(text)) {
|
|
135
|
+
return "not-an-integer";
|
|
136
|
+
}
|
|
137
|
+
const size = BigInt(bits);
|
|
138
|
+
const number = BigInt(text);
|
|
139
|
+
const [min, max] = signed ? [-(2n ** (size - 1n)), 2n ** (size - 1n) - 1n] : [0n, 2n ** size - 1n];
|
|
140
|
+
return number < min || number > max ? { min, max } : number;
|
|
141
|
+
}
|
|
142
|
+
function littleEndianBytes(value, bits) {
|
|
143
|
+
let number = BigInt.asUintN(bits, value);
|
|
144
|
+
return Uint8Array.from({ length: bits / 8 }, () => {
|
|
145
|
+
const byte = Number(number & 0xffn);
|
|
146
|
+
number >>= 8n;
|
|
147
|
+
return byte;
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
var maxSeedBytes = 32;
|
|
151
|
+
function solanaSeedBytes(seed, position) {
|
|
152
|
+
if (typeof seed === "string") {
|
|
153
|
+
const bytes = encoder.encode(seed);
|
|
154
|
+
return bytes.length > maxSeedBytes ? {
|
|
155
|
+
problem: `Seed ${position} is ${bytes.length} bytes: a seed is at most ${maxSeedBytes}`
|
|
156
|
+
} : bytes;
|
|
157
|
+
}
|
|
158
|
+
if ("wallet" in seed) {
|
|
159
|
+
return "wallet";
|
|
160
|
+
}
|
|
161
|
+
if ("pubkey" in seed) {
|
|
162
|
+
return base58Bytes(seed.pubkey, 32) ?? {
|
|
163
|
+
problem: `Seed ${position} is not a Solana address: ${seed.pubkey}`
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
const [type, value] = Object.entries(seed)[0];
|
|
167
|
+
const bits = Number(type.slice(1));
|
|
168
|
+
const checked = checkedInteger(value, type.startsWith("i"), bits);
|
|
169
|
+
return typeof checked === "bigint" ? littleEndianBytes(checked, bits) : {
|
|
170
|
+
problem: `Seed ${position} must be a ${type}: a safe integer number or a decimal string${typeof checked === "object" ? ` from ${checked.min} to ${checked.max}` : ""}`
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
function storedIdlJson(bytes, compression, decompress) {
|
|
174
|
+
const limit = { maxOutputLength: maxAnchorIdlBytes * 4 };
|
|
175
|
+
try {
|
|
176
|
+
const json = compression === "none" ? bytes : compression === "gzip" ? decompress.gunzip(bytes, limit) : decompress.inflate(bytes, limit);
|
|
177
|
+
return JSON.parse(
|
|
178
|
+
new TextDecoder("utf-8", { ignoreBOM: true }).decode(json)
|
|
179
|
+
);
|
|
180
|
+
} catch {
|
|
181
|
+
return null;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
var p = 2n ** 255n - 19n;
|
|
185
|
+
var d = 37095705934669439343138083508754565189542113879843219016388785533085940283555n;
|
|
186
|
+
function power(base, exponent) {
|
|
187
|
+
let result = 1n;
|
|
188
|
+
base %= p;
|
|
189
|
+
while (exponent > 0n) {
|
|
190
|
+
if (exponent & 1n) {
|
|
191
|
+
result = result * base % p;
|
|
192
|
+
}
|
|
193
|
+
base = base * base % p;
|
|
194
|
+
exponent >>= 1n;
|
|
195
|
+
}
|
|
196
|
+
return result;
|
|
197
|
+
}
|
|
198
|
+
function onCurve(bytes) {
|
|
199
|
+
let y = 0n;
|
|
200
|
+
for (let index = 31; index >= 0; index--) {
|
|
201
|
+
y = y << 8n | BigInt(index === 31 ? bytes[index] & 127 : bytes[index]);
|
|
202
|
+
}
|
|
203
|
+
const yy = y * y % p;
|
|
204
|
+
const u = (yy - 1n + p) % p;
|
|
205
|
+
const v = (d * yy + 1n) % p;
|
|
206
|
+
const ratio = u * power(v, p - 2n) % p;
|
|
207
|
+
return ratio === 0n || power(ratio, (p - 1n) / 2n) === 1n;
|
|
208
|
+
}
|
|
209
|
+
function solanaAddressBytes(address) {
|
|
210
|
+
const bytes = base58Bytes(address, 32);
|
|
211
|
+
if (!bytes) {
|
|
212
|
+
throw new Error(`${address} is not a Solana address`);
|
|
213
|
+
}
|
|
214
|
+
return bytes;
|
|
215
|
+
}
|
|
216
|
+
function solanaProgramAddress(seeds, program) {
|
|
217
|
+
const programBytes = solanaAddressBytes(program);
|
|
218
|
+
for (let bump = 255; bump >= 0; bump--) {
|
|
219
|
+
const address = sha256(
|
|
220
|
+
concatBytes(
|
|
221
|
+
...seeds,
|
|
222
|
+
Uint8Array.of(bump),
|
|
223
|
+
programBytes,
|
|
224
|
+
encoder.encode("ProgramDerivedAddress")
|
|
225
|
+
)
|
|
226
|
+
);
|
|
227
|
+
if (!onCurve(address)) {
|
|
228
|
+
return base58(address);
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
throw new Error("No program address for these seeds");
|
|
232
|
+
}
|
|
233
|
+
function anchorIdlAddress(program) {
|
|
234
|
+
return base58(
|
|
235
|
+
sha256(
|
|
236
|
+
concatBytes(
|
|
237
|
+
solanaAddressBytes(solanaProgramAddress([], program)),
|
|
238
|
+
encoder.encode("anchor:idl"),
|
|
239
|
+
solanaAddressBytes(program)
|
|
240
|
+
)
|
|
241
|
+
)
|
|
242
|
+
);
|
|
243
|
+
}
|
|
244
|
+
function anchorIdlAccountBytes(data) {
|
|
245
|
+
if (data.length < 44) {
|
|
246
|
+
return null;
|
|
247
|
+
}
|
|
248
|
+
const length = new DataView(data.buffer, data.byteOffset).getUint32(40, true);
|
|
249
|
+
return length === 0 || 44 + length > data.length ? null : data.subarray(44, 44 + length);
|
|
250
|
+
}
|
|
251
|
+
var programMetadataProgram = "ProgM6JCCvbYkfKqJYHePx4xxSUSqJp7rh8Lyv7nk7S";
|
|
252
|
+
var idlSeed = /* @__PURE__ */ (() => new Uint8Array(16))();
|
|
253
|
+
idlSeed.set(encoder.encode("idl"));
|
|
254
|
+
var metadataHeaderLength = 96;
|
|
255
|
+
var metadataDiscriminator = 2;
|
|
256
|
+
var metadataCompressions = ["none", "gzip", "zlib"];
|
|
257
|
+
function programMetadataIdlAddress(program) {
|
|
258
|
+
return solanaProgramAddress(
|
|
259
|
+
[solanaAddressBytes(program), idlSeed],
|
|
260
|
+
programMetadataProgram
|
|
261
|
+
);
|
|
262
|
+
}
|
|
263
|
+
function programMetadataIdlBytes(data, program) {
|
|
264
|
+
if (data.length < metadataHeaderLength) {
|
|
265
|
+
return null;
|
|
266
|
+
}
|
|
267
|
+
const view = new DataView(data.buffer, data.byteOffset, data.length);
|
|
268
|
+
const compression = metadataCompressions[data[84]];
|
|
269
|
+
const length = view.getUint32(87, true);
|
|
270
|
+
if (data[0] !== metadataDiscriminator || base58(data.subarray(1, 33)) !== program || data[66] !== 1 || !data.subarray(67, 83).every((byte, index) => byte === idlSeed[index]) || // UTF-8 encoding, JSON format or none, data in the account.
|
|
271
|
+
data[83] !== 1 || data[85] > 1 || data[86] !== 0 || compression === void 0 || length === 0 || metadataHeaderLength + length > data.length) {
|
|
272
|
+
return null;
|
|
273
|
+
}
|
|
274
|
+
return {
|
|
275
|
+
bytes: data.subarray(metadataHeaderLength, metadataHeaderLength + length),
|
|
276
|
+
compression
|
|
277
|
+
};
|
|
278
|
+
}
|
|
82
279
|
export {
|
|
83
280
|
MANAGEMENT_TIMEOUT,
|
|
84
281
|
REFERRAL_INTEGRATION_REWARD_ERROR,
|
|
85
282
|
accountVouchedBySchema,
|
|
283
|
+
anchorIdlAccountBytes,
|
|
284
|
+
anchorIdlAddress,
|
|
86
285
|
appLoginOriginSchema,
|
|
87
286
|
bareOrigin,
|
|
287
|
+
base58,
|
|
88
288
|
canonicalWalletAddress,
|
|
289
|
+
checkedInteger,
|
|
89
290
|
compatibleSettingKinds,
|
|
291
|
+
confirmedSignature,
|
|
292
|
+
connectSolanaAccount,
|
|
90
293
|
containsReferralIntegrationReward,
|
|
91
294
|
dashboardIssue,
|
|
92
295
|
evmWalletOn,
|
|
@@ -100,12 +303,16 @@ export {
|
|
|
100
303
|
identityIntegrationSchema,
|
|
101
304
|
identityIntegrationSecretSchema,
|
|
102
305
|
identityKindClaimSchema,
|
|
306
|
+
idlTooLarge,
|
|
307
|
+
inWindow,
|
|
103
308
|
isBoundSetting,
|
|
104
309
|
isIntegrationParticipantPath,
|
|
105
310
|
isParticipantRoute,
|
|
106
311
|
lifetime,
|
|
312
|
+
littleEndianBytes,
|
|
107
313
|
loopbackHosts,
|
|
108
314
|
managementTransport,
|
|
315
|
+
maxAnchorIdlBytes,
|
|
109
316
|
nextScheduleRun,
|
|
110
317
|
normalizeDashboard,
|
|
111
318
|
parseImageExtraction,
|
|
@@ -116,15 +323,28 @@ export {
|
|
|
116
323
|
participantExchangeSchema,
|
|
117
324
|
participantRoutePattern,
|
|
118
325
|
participantRoutes,
|
|
326
|
+
programMetadataIdlAddress,
|
|
327
|
+
programMetadataIdlBytes,
|
|
328
|
+
programMetadataProgram,
|
|
119
329
|
questConfiguration,
|
|
330
|
+
registeredWallets,
|
|
120
331
|
retryAfter,
|
|
121
332
|
retrying,
|
|
122
333
|
schemaCheckedReader,
|
|
123
334
|
secureOrLoopbackOrigin,
|
|
124
335
|
sequenceCursorSchema,
|
|
336
|
+
solanaAddressBytes,
|
|
337
|
+
solanaProgramAddress,
|
|
338
|
+
solanaPublicEndpoints,
|
|
339
|
+
solanaRpc,
|
|
340
|
+
solanaSeedBytes,
|
|
125
341
|
sourceContent,
|
|
126
342
|
sourceDataSchema,
|
|
127
343
|
sourceRoles,
|
|
344
|
+
stationPayLink,
|
|
345
|
+
stationQrSvg,
|
|
346
|
+
stationRefusal,
|
|
347
|
+
storedIdlJson,
|
|
128
348
|
trackerDataBatchSteps,
|
|
129
349
|
trackerDataIssue,
|
|
130
350
|
trackerDataIssues,
|
|
@@ -133,5 +353,6 @@ export {
|
|
|
133
353
|
validateQuestShape,
|
|
134
354
|
walletSignatureValid,
|
|
135
355
|
whereSchemaIssue,
|
|
136
|
-
whereSettings
|
|
356
|
+
whereSettings,
|
|
357
|
+
zeroCopyAccount
|
|
137
358
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as z from 'zod';
|
|
2
|
-
import {
|
|
2
|
+
import { ac as PhotoResult, W as AttemptCodeSource } from './accounts-DnpKoJCo.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Quest code names an image; the platform fetches, decodes and pins it. No bytes or URLs cross the
|
|
@@ -947,6 +947,11 @@ type Limits = {
|
|
|
947
947
|
readonly walletEventLogs: number;
|
|
948
948
|
/** The most transactions one `ctx.wallet.transactions()` read fetches per wallet. */
|
|
949
949
|
readonly walletTransactions: number;
|
|
950
|
+
/**
|
|
951
|
+
* The most signatures one `management.solana.transactionFixture()` call reads. Each is a
|
|
952
|
+
* `getTransaction` call on the platform's Solana RPC, and a quest test needs a handful.
|
|
953
|
+
*/
|
|
954
|
+
readonly transactionFixtureSignatures: number;
|
|
950
955
|
};
|
|
951
956
|
/** Relay's platform limits. A 1.x release can raise them, so read them here at run time. */
|
|
952
957
|
declare const limits: Limits;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as z from 'zod';
|
|
2
|
-
import { R as ResourceHandle } from './tracker-data-
|
|
3
|
-
import {
|
|
2
|
+
import { R as ResourceHandle } from './tracker-data-CAK942sx.js';
|
|
3
|
+
import { _ as AuthoringIdentity } from './accounts-DnpKoJCo.js';
|
|
4
4
|
|
|
5
5
|
declare const badgePropertiesSchema: z.ZodObject<{
|
|
6
6
|
name: z.ZodString;
|
package/dist/portal-proxy.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { M as MemberImportVouchedAccount, P as ParticipantExchangeAccountResult, a as ParticipantExchangeResult, I as IdentityIntegrationKey } from './identity-integration-
|
|
1
|
+
import { M as MemberImportVouchedAccount, P as ParticipantExchangeAccountResult, a as ParticipantExchangeResult, I as IdentityIntegrationKey } from './identity-integration-r76xaAax.js';
|
|
2
2
|
import { R as RequestError } from './request-error-D_dUPLwo.js';
|
|
3
|
-
import './tracker-data-
|
|
3
|
+
import './tracker-data-CAK942sx.js';
|
|
4
4
|
import 'zod';
|
|
5
5
|
|
|
6
6
|
/**
|