@stackedapp/types 1.15.11 → 1.16.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.
@@ -130,6 +130,16 @@ interface IBaseCondition {
130
130
  /** Maximum total balance allowed */
131
131
  max?: number;
132
132
  }>;
133
+ /** Stacked account conditions */
134
+ stackedAccount?: {
135
+ /** Has a linked stacked account */
136
+ hasLinkedAccount?: boolean;
137
+ /** Number of linked crypto wallets */
138
+ cryptoWallets?: {
139
+ min?: number;
140
+ max?: number;
141
+ };
142
+ };
133
143
  }
134
144
 
135
145
  /** conditions that must be met for an already surfaced offer to be claimable */
@@ -774,6 +784,10 @@ type StackedSocialTrackerAccumulate = ISocialTrackerAccumulate;
774
784
  type StackedSocialTrackerAttach = ISocialTrackerAttach;
775
785
  type StackedDynamicGroup = IDynamicGroup;
776
786
  type StackedClaimableConditions = IOffer['claimableConditions'];
787
+ /** Keys for nested stackedAccount conditions (e.g., 'stackedAccount.cryptoWallets') */
788
+ type StackedAccountConditionKeys = `stackedAccount.${keyof NonNullable<StackedBaseConditions['stackedAccount']>}`;
789
+ /** All possible condition kind values for base + completion conditions */
790
+ type StackedConditionKind = keyof StackedCompletionConditions | StackedAccountConditionKeys | 'context';
777
791
  type StackedClaimableTrackers = IPlayerOffer['claimableTrackers'];
778
792
  /** Stripped sibling offer data for client rendering */
779
793
  interface StackedSnapshotProgress {
@@ -808,7 +822,7 @@ type StackedOffer = StackedBaseOffer & StackedUserOffer & {
808
822
  } & StackedOfferHelpers;
809
823
  type ConditionDetail = {
810
824
  isMet: boolean;
811
- kind?: keyof StackedCompletionConditions | 'context';
825
+ kind?: StackedConditionKind;
812
826
  /** @deprecated Use percentCompleted instead */
813
827
  trackerAmount?: number;
814
828
  /** @deprecated Use percentCompleted instead */
@@ -851,6 +865,7 @@ interface StackedBaseUserExtra {
851
865
  cryptoWallets?: Array<IUserCryptoWallet & {
852
866
  balances?: Record<string, number>;
853
867
  }>;
868
+ hasStackedAccount: boolean;
854
869
  }
855
870
  /** Base stacked user that includes their id, app connections connected to their stacked account, crypto wallets
856
871
  * information
@@ -1283,145 +1298,13 @@ interface IAppState {
1283
1298
  type StackedThirdPartyApp = Pick<IThirdPartyApp, 'id' | 'displayName' | 'image' | 'showLinkable' | 'unlinkable' | 'autoAdd' | 'url' | 'tagline' | 'description' | 'genres' | 'trailerUrl' | 'gameThumbnail' | 'logo' | 'squareLogo' | 'headerImage' | 'squareScreenshot' | 'screenshots' | 'appStoreUrl' | 'playStoreUrl' | 'webUrl' | 'landingPageUrl' | 'appStoreRating' | 'appStoreRatingCount' | 'playStoreRating' | 'playStoreRatingCount'>;
1284
1299
  type StackedAppState = Pick<IAppState, 'featureFlags' | 'maxCryptoWallets' | 'maxOfferSlots' | 'restrictedCountryCodes' | 'deleteWalletThresholdDays'>;
1285
1300
 
1286
- declare const SupportedNetworks: readonly [
1287
- 'ethereum',
1288
- 'sepolia',
1289
- 'ronin',
1290
- 'saigon',
1291
- 'worldChainMainnet',
1292
- 'worldChainSepolia',
1293
- 'shapeMainnet',
1294
- 'shapeSepolia',
1295
- 'ethereumHolešky',
1296
- 'ethereumHoodi',
1297
- 'ethereumMainnetBeacon',
1298
- 'ethereumSepoliaBeacon',
1299
- 'ethereumHoleškyBeacon',
1300
- 'ethereumHoodiBeacon',
1301
- 'zksyncMainnet',
1302
- 'zksyncSepolia',
1303
- 'opMainnetMainnet',
1304
- 'opMainnetSepolia',
1305
- 'polygonMainnet',
1306
- 'polygonAmoy',
1307
- 'arbitrumMainnet',
1308
- 'arbitrumSepolia',
1309
- 'starknetMainnet',
1310
- 'starknetSepolia',
1311
- 'arbitrumNovaMainnet',
1312
- 'astarMainnet',
1313
- 'polygonZkevmMainnet',
1314
- 'polygonZkevmCardona',
1315
- 'zetachainMainnet',
1316
- 'zetachainTestnet',
1317
- 'mantleMainnet',
1318
- 'mantleSepolia',
1319
- 'berachainMainnet',
1320
- 'berachainBepolia',
1321
- 'blastMainnet',
1322
- 'blastSepolia',
1323
- 'lineaMainnet',
1324
- 'lineaSepolia',
1325
- 'zoraMainnet',
1326
- 'zoraSepolia',
1327
- 'plasmaMainnet',
1328
- 'plasmaTestnet',
1329
- 'settlusMainnet',
1330
- 'settlusSepolia',
1331
- 'bobMainnet',
1332
- 'bobSepolia',
1333
- 'megaethTestnet',
1334
- 'rootstockMainnet',
1335
- 'rootstockTestnet',
1336
- 'citreaTestnet',
1337
- 'teaSepolia',
1338
- 'solanaMainnet',
1339
- 'solanaDevnet',
1340
- 'gensynTestnet',
1341
- 'arcTestnet',
1342
- 'storyMainnet',
1343
- 'storyAeneid',
1344
- 'clankermonMainnet',
1345
- 'humanityMainnet',
1346
- 'humanityTestnet',
1347
- 'baseMainnet',
1348
- 'baseSepolia',
1349
- 'hyperliquidMainnet',
1350
- 'hyperliquidTestnet',
1351
- 'galacticaMainnet',
1352
- 'galacticaCassiopeia',
1353
- 'lensMainnet',
1354
- 'lensSepolia',
1355
- 'worldmobilechainMainnet',
1356
- 'fraxMainnet',
1357
- 'fraxSepolia',
1358
- 'inkMainnet',
1359
- 'inkSepolia',
1360
- 'avalancheMainnet',
1361
- 'avalancheFuji',
1362
- 'botanixMainnet',
1363
- 'botanixTestnet',
1364
- 'gnosisMainnet',
1365
- 'gnosisChiado',
1366
- 'celestiabridgeMainnet',
1367
- 'celestiabridgeMocha',
1368
- 'bnbSmartChainMainnet',
1369
- 'bnbSmartChainTestnet',
1370
- 'bobaMainnet',
1371
- 'bobaSepolia',
1372
- 'lumiaPrism',
1373
- 'lumiaBeam',
1374
- 'unichainMainnet',
1375
- 'unichainSepolia',
1376
- 'syndicateMainnet',
1377
- 'superseedMainnet',
1378
- 'superseedSepolia',
1379
- 'riseTestnet',
1380
- 'monadTestnet',
1381
- 'monadMainnet',
1382
- 'flowEvmMainnet',
1383
- 'flowEvmTestnet',
1384
- 'worldmobileTestnet',
1385
- 'tronMainnet',
1386
- 'tronTestnet',
1387
- 'degenMainnet',
1388
- 'bitcoinMainnet',
1389
- 'bitcoinTestnet',
1390
- 'bitcoinSignet',
1391
- 'polynomialMainnet',
1392
- 'polynomialSepolia',
1393
- 'modeMainnet',
1394
- 'modeSepolia',
1395
- 'moonbeamMainnet',
1396
- 'apechainMainnet',
1397
- 'apechainCurtis',
1398
- 'celoMainnet',
1399
- 'celoSepolia',
1400
- 'aptosMainnet',
1401
- 'aptosTestnet',
1402
- 'animeMainnet',
1403
- 'animeSepolia',
1404
- 'metisMainnet',
1405
- 'sonicMainnet',
1406
- 'sonicTestnet',
1407
- 'sonicBlaze',
1408
- 'seiMainnet',
1409
- 'seiTestnet',
1410
- 'xmtpRopsten',
1411
- 'adiTestnetAb',
1412
- 'scrollMainnet',
1413
- 'scrollSepolia',
1414
- 'opbnbMainnet',
1415
- 'opbnbTestnet',
1416
- 'crossfiTestnet',
1417
- 'crossfiMainnet',
1418
- 'abstractMainnet'
1419
- ];
1301
+ declare const SupportedNetworks: readonly ["ethereum", "sepolia", "ronin", "saigon", "worldChainMainnet", "worldChainSepolia", "shapeMainnet", "shapeSepolia", "ethereumHolešky", "ethereumHoodi", "ethereumMainnetBeacon", "ethereumSepoliaBeacon", "ethereumHoleškyBeacon", "ethereumHoodiBeacon", "zksyncMainnet", "zksyncSepolia", "opMainnetMainnet", "opMainnetSepolia", "polygonMainnet", "polygonAmoy", "arbitrumMainnet", "arbitrumSepolia", "starknetMainnet", "starknetSepolia", "arbitrumNovaMainnet", "astarMainnet", "polygonZkevmMainnet", "polygonZkevmCardona", "zetachainMainnet", "zetachainTestnet", "mantleMainnet", "mantleSepolia", "berachainMainnet", "berachainBepolia", "blastMainnet", "blastSepolia", "lineaMainnet", "lineaSepolia", "zoraMainnet", "zoraSepolia", "plasmaMainnet", "plasmaTestnet", "settlusMainnet", "settlusSepolia", "bobMainnet", "bobSepolia", "megaethTestnet", "rootstockMainnet", "rootstockTestnet", "citreaTestnet", "teaSepolia", "solanaMainnet", "solanaDevnet", "gensynTestnet", "arcTestnet", "storyMainnet", "storyAeneid", "clankermonMainnet", "humanityMainnet", "humanityTestnet", "baseMainnet", "baseSepolia", "hyperliquidMainnet", "hyperliquidTestnet", "galacticaMainnet", "galacticaCassiopeia", "lensMainnet", "lensSepolia", "worldmobilechainMainnet", "fraxMainnet", "fraxSepolia", "inkMainnet", "inkSepolia", "avalancheMainnet", "avalancheFuji", "botanixMainnet", "botanixTestnet", "gnosisMainnet", "gnosisChiado", "celestiabridgeMainnet", "celestiabridgeMocha", "bnbSmartChainMainnet", "bnbSmartChainTestnet", "bobaMainnet", "bobaSepolia", "lumiaPrism", "lumiaBeam", "unichainMainnet", "unichainSepolia", "syndicateMainnet", "superseedMainnet", "superseedSepolia", "riseTestnet", "monadTestnet", "monadMainnet", "flowEvmMainnet", "flowEvmTestnet", "worldmobileTestnet", "tronMainnet", "tronTestnet", "degenMainnet", "bitcoinMainnet", "bitcoinTestnet", "bitcoinSignet", "polynomialMainnet", "polynomialSepolia", "modeMainnet", "modeSepolia", "moonbeamMainnet", "apechainMainnet", "apechainCurtis", "celoMainnet", "celoSepolia", "aptosMainnet", "aptosTestnet", "animeMainnet", "animeSepolia", "metisMainnet", "sonicMainnet", "sonicTestnet", "sonicBlaze", "seiMainnet", "seiTestnet", "xmtpRopsten", "adiTestnetAb", "scrollMainnet", "scrollSepolia", "opbnbMainnet", "opbnbTestnet", "crossfiTestnet", "crossfiMainnet", "abstractMainnet"];
1420
1302
  type SupportedNetwork = (typeof SupportedNetworks)[number];
1421
1303
  interface ICurrency {
1422
1304
  _id: Stringable;
1423
1305
  /** if true, then this currency can be used as a reward currency from offerwall/neo */
1424
1306
  rewardable?: boolean;
1307
+ symbol?: string;
1425
1308
  /**
1426
1309
  * id of the currency: cur_pixel, cur_berry, cur_gold, etc.
1427
1310
  */
@@ -1595,4 +1478,4 @@ type StackedCurrencyPrice = ILibraryCurrencyPrice;
1595
1478
 
1596
1479
  type StackedEnv = IEnv;
1597
1480
 
1598
- export type { CompleteCryptoAuthResponse, CompleteOAuthResponse, CompleteOneTimeAuthResponse, ConditionDetail, ConditionResult, CurrencyUnit, DeleteAccountResponse, ExchangeOneTimeTokenForSessionTokenResponse, ExchangeStackedLinkTokenResponse, GenerateStackedLinkTokenResponse, GetOneTimeAuthTokenResponse, IClientPlayerData, InitializeUnifiedUserResponse, LinkExternalGameToUnifiedAccountResponse, RemoveAuthMethodResponse, RemoveOAuthProviderResponse, SignOutUnifiedUserResponse, StackedAppConnection, StackedAppState, StackedBaseConditions, StackedBaseOffer, StackedBaseUser, StackedBaseUserExtra, StackedCampaignsResponse, StackedCampaignsServerResponse, StackedClaimableConditions, StackedClaimableTrackers, StackedCompletionConditions, StackedCompletionDynamicTracker, StackedCompletionTrackers, StackedContentItem, StackedContentResponse, StackedContentStats, StackedCurrency, StackedCurrencyPrice, StackedDynamicCondition, StackedDynamicGroup, StackedEntityCurrencies, StackedEntityData, StackedEnv, StackedOffer, StackedOfferHelpers, StackedOfferTrackers, StackedPlayerDelta, StackedReward, StackedRewardKind, StackedSnapshot, StackedSnapshotProgress, StackedSocialTrackerAccumulate, StackedSocialTrackerAttach, StackedSupportedNetwork, StackedThirdPartyApp, StackedUser, StackedUserComplete, StackedUserOffer, StackedUserResponse, StackedUserWithApps, StartCryptoAuthResponse, StartOAuthAttachResponse, StartOAuthResponse, StartOneTimeAuthResponse, TeamProgress, UnlinkExternalGameFromUnifiedAccountResponse, UserOfferStatus };
1481
+ export type { CompleteCryptoAuthResponse, CompleteOAuthResponse, CompleteOneTimeAuthResponse, ConditionDetail, ConditionResult, CurrencyUnit, DeleteAccountResponse, ExchangeOneTimeTokenForSessionTokenResponse, ExchangeStackedLinkTokenResponse, GenerateStackedLinkTokenResponse, GetOneTimeAuthTokenResponse, IClientPlayerData, InitializeUnifiedUserResponse, LinkExternalGameToUnifiedAccountResponse, RemoveAuthMethodResponse, RemoveOAuthProviderResponse, SignOutUnifiedUserResponse, StackedAccountConditionKeys, StackedAppConnection, StackedAppState, StackedBaseConditions, StackedBaseOffer, StackedBaseUser, StackedBaseUserExtra, StackedCampaignsResponse, StackedCampaignsServerResponse, StackedClaimableConditions, StackedClaimableTrackers, StackedCompletionConditions, StackedCompletionDynamicTracker, StackedCompletionTrackers, StackedConditionKind, StackedContentItem, StackedContentResponse, StackedContentStats, StackedCurrency, StackedCurrencyPrice, StackedDynamicCondition, StackedDynamicGroup, StackedEntityCurrencies, StackedEntityData, StackedEnv, StackedOffer, StackedOfferHelpers, StackedOfferTrackers, StackedPlayerDelta, StackedReward, StackedRewardKind, StackedSnapshot, StackedSnapshotProgress, StackedSocialTrackerAccumulate, StackedSocialTrackerAttach, StackedSupportedNetwork, StackedThirdPartyApp, StackedUser, StackedUserComplete, StackedUserOffer, StackedUserResponse, StackedUserWithApps, StartCryptoAuthResponse, StartOAuthAttachResponse, StartOAuthResponse, StartOneTimeAuthResponse, TeamProgress, UnlinkExternalGameFromUnifiedAccountResponse, UserOfferStatus };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stackedapp/types",
3
- "version": "1.15.11",
3
+ "version": "1.16.0",
4
4
  "description": "Public types for Stacked platform SDK",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/stacked-types.d.ts",