@metatrongg/sdk 0.8.0-dev.4fc3172 → 0.8.0-dev.59008a3

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.
@@ -249,7 +249,15 @@ type OauthPaymentIntentContext = {
249
249
  };
250
250
  } | null;
251
251
  environment: "development" | "production";
252
+ onramp?: {
253
+ kind: "bridge";
254
+ from: PaymentNetwork;
255
+ to: PaymentNetwork;
256
+ } | {
257
+ kind: "insufficient";
258
+ };
252
259
  };
260
+ type PaymentNetwork = "ethereum" | "base" | "solana";
253
261
  type OauthPaymentIntentSignResponse = {
254
262
  chain: string;
255
263
  chainId: number;
@@ -279,6 +287,13 @@ type OauthPaymentIntentCompleteSigned = {
279
287
  type OauthPaymentIntentCompleteOffline = {
280
288
  method: "offline";
281
289
  };
290
+ type OauthPaymentIntentSolanaPrepareResponse = {
291
+ transaction: string;
292
+ payer: string;
293
+ };
294
+ type OauthPaymentIntentSolanaCompleteRequest = {
295
+ signedTransaction: string;
296
+ };
282
297
  type ListAppPaymentAuthorizationsResponse = {
283
298
  authorizations: Array<AppPaymentAuthorizationItem>;
284
299
  };
@@ -1205,12 +1220,15 @@ type WalletListResponse = {
1205
1220
  wallets: Array<WalletItem>;
1206
1221
  };
1207
1222
  type WalletChainList = Array<{
1208
- id: "ethereum-mainnet" | "base-mainnet" | "ethereum-sepolia";
1223
+ id: "ethereum-mainnet" | "base-mainnet" | "ethereum-sepolia" | "base-sepolia" | "solana-mainnet" | "solana-devnet";
1209
1224
  displayName: string;
1210
- chainId: number;
1225
+ family: "evm" | "solana";
1226
+ nativeSymbol: string;
1227
+ chainId?: number;
1211
1228
  }>;
1212
1229
  type WalletItem = {
1213
- address: string;
1230
+ address: string | string;
1231
+ family: "evm" | "solana";
1214
1232
  label: WalletLabel;
1215
1233
  kind: "personal" | "app";
1216
1234
  app: WalletAppLink;
@@ -1227,6 +1245,9 @@ type WalletBalances = {
1227
1245
  "ethereum-mainnet"?: WalletChainBalance;
1228
1246
  "base-mainnet"?: WalletChainBalance;
1229
1247
  "ethereum-sepolia"?: WalletChainBalance;
1248
+ "base-sepolia"?: WalletChainBalance;
1249
+ "solana-mainnet"?: WalletChainBalance;
1250
+ "solana-devnet"?: WalletChainBalance;
1230
1251
  };
1231
1252
  type WalletChainBalance = {
1232
1253
  native: string;
@@ -1236,12 +1257,14 @@ type WalletDelegationStatus = {
1236
1257
  mode: WalletDelegationMode;
1237
1258
  caps: WalletDelegationCaps;
1238
1259
  policyId: string | null;
1260
+ slippageBps: DelegationSlippageBps;
1239
1261
  };
1240
1262
  type WalletDelegationMode = "infinite" | "custom" | "scoped" | null;
1241
1263
  type WalletDelegationCaps = {
1242
1264
  native: string;
1243
1265
  usdc: string;
1244
1266
  } | null;
1267
+ type DelegationSlippageBps = number | null;
1245
1268
  type WalletLabelUpdateResponse = {
1246
1269
  address: string;
1247
1270
  label: WalletLabel;
@@ -2150,12 +2173,14 @@ type UpdateDeveloperApp = {
2150
2173
  redirectUris?: Array<string>;
2151
2174
  embedOrigins?: Array<EmbedOrigin>;
2152
2175
  acceptedCurrencies?: AcceptedCurrencies;
2176
+ acceptedNetworks?: AcceptedNetworks;
2153
2177
  paymentStatusWebhookUrl?: string | null;
2154
2178
  paymentStatusWebhookUrlTest?: string | null;
2155
2179
  };
2156
2180
  type EmbedOrigin = string;
2157
2181
  type AcceptedCurrencies = Array<PlatformCurrency>;
2158
2182
  type PlatformCurrency = "eth" | "tron";
2183
+ type AcceptedNetworks = Array<PaymentNetwork> | null;
2159
2184
  type DeveloperLogoUploadResponse = {
2160
2185
  logoUrl: string | null;
2161
2186
  };
@@ -2402,6 +2427,7 @@ type DeveloperAppItem = {
2402
2427
  redirectUris: Array<string>;
2403
2428
  embedOrigins: Array<EmbedOrigin>;
2404
2429
  acceptedCurrencies: AcceptedCurrencies;
2430
+ acceptedNetworks: AcceptedNetworks;
2405
2431
  payoutAddresses: Array<DeveloperAppPayoutAddressItem>;
2406
2432
  keys: Array<DeveloperAppKeyItem>;
2407
2433
  pendingProductionRequestId: string | null;
@@ -2860,6 +2886,13 @@ type AppealResolveRequest = {
2860
2886
  decision: "refund" | "dismiss";
2861
2887
  notes?: string;
2862
2888
  };
2889
+ type PaymentRatesResponse = {
2890
+ asOf: string;
2891
+ ethUsd: number | null;
2892
+ solUsd: number | null;
2893
+ solLamportsPerCent: number | null;
2894
+ tronUsdPerToken: number;
2895
+ };
2863
2896
  type AppealFileResponse = {
2864
2897
  appealId: string;
2865
2898
  paymentId: string;
@@ -3451,6 +3484,9 @@ declare function getPaymentHistory(context: TransportContext, input: {
3451
3484
  readonly before?: string;
3452
3485
  }): Promise<PaymentHistoryResponse>;
3453
3486
  //#endregion
3487
+ //#region src/dashboard/rates.d.ts
3488
+ declare function getPaymentRates(context: TransportContext): Promise<PaymentRatesResponse>;
3489
+ //#endregion
3454
3490
  //#region src/developer/api-keys.d.ts
3455
3491
  declare function createDeveloperApiKey(context: TransportContext, input: {
3456
3492
  readonly bearer: string;
@@ -4077,6 +4113,15 @@ declare function denyPaymentIntent(context: TransportContext, input: {
4077
4113
  readonly bearer: string;
4078
4114
  readonly intentId: string;
4079
4115
  }): Promise<OauthPaymentIntentResolveResponse>;
4116
+ declare function preparePaymentIntentSolana(context: TransportContext, input: {
4117
+ readonly bearer: string;
4118
+ readonly intentId: string;
4119
+ }): Promise<OauthPaymentIntentSolanaPrepareResponse>;
4120
+ declare function completePaymentIntentSolana(context: TransportContext, input: {
4121
+ readonly bearer: string;
4122
+ readonly intentId: string;
4123
+ readonly body: OauthPaymentIntentSolanaCompleteRequest;
4124
+ }): Promise<OauthPaymentIntentResolveResponse>;
4080
4125
  //#endregion
4081
4126
  //#region src/payments/limits.d.ts
4082
4127
  declare function getPaymentLimits(context: TransportContext, input: {
@@ -4581,4 +4626,4 @@ type CookieTokenStoreOptions = {
4581
4626
  };
4582
4627
  declare function createCookieTokenStore(options?: CookieTokenStoreOptions): TokenStore;
4583
4628
  //#endregion
4584
- export { AuthorizeUrl, type BrowserClientConfig, BuildAuthorizeUrlInput, ChargeResult, CookieTokenStoreOptions, type FetchLike, InflightDedup, type Logger, MountPresenceWidgetOptions, NOOP_RATE_LIMITER, OauthErrorCode, OauthPaymentWebhookBody, type OauthScope, PkcePair, PresenceStatus, PresenceWidgetHandle, RateLimitOptions, RateLimiter, SERVER_RATE_LIMIT_MAX_MUTATING, SERVER_RATE_LIMIT_MAX_READ, SERVER_RATE_LIMIT_WINDOW_MS, type SdkBaseConfig, TRON_WS_CLOSE_CODES, type TokenSet, type TokenStore, TronBrowserClient, TronError, TronOauthError, TronWsCloseCode, TronWsCloseError, VerifyWebhookFailure, VerifyWebhookInput, VerifyWebhookResult, VerifyWebhookSuccess, WEBHOOK_SIGNATURE_HEADER, WEBHOOK_TIMESTAMP_HEADER, acceptDeveloperInvite, addAdmin, addAppealBlacklist, addReaction, approveTronCashout, batchThreadDmKeys, bindReferral, buildAuthorizeUrl, cancelFriendRequest, charge, commentOnBipUpdate, commentOnGameReview, completePaymentIntent, consolidateDeveloperAppWallet, createBipUpdate, createConsoleLogger, createCookieTokenStore, createDelegation, createDeveloperApiKey, createDeveloperApp, createDeveloperAppMintPermit, createDeveloperVaultPermit, createDeveloperWithdrawPermit, createDirectThread, createInMemoryTokenStore, createInflightDedup, createNoopLogger, createRateLimiter, createReferralCode, createTronCashout, createTronConnectOnboarding, createTronDeposit, createTronTransfer, createTronTransferChallenge, decideFriendRequest, declineDeveloperInvite, defaultEndpoints, deleteAppPageBanner, deleteAppPageThumbnail, deleteAppPageThumbnailVideo, deleteAvatar, deleteBipUpdate, deleteBipUpdateComment, deleteDelegation, deleteDeveloperApp, deleteDeveloperAppLogo, deleteDeveloperProfileLogo, deleteDeveloperRequestLogo, deleteGameReviewComment, deleteGameReviewReply, deleteMessage, deleteMyGameReview, deleteThread, deleteThreadLogo, denyPaymentIntent, editMessage, exchangeAuthorizationCode, executeNftTransfer, fetchAuthorizationServerMetadata, fetchUserInfo, fileAppeal, fileAppealPotLeg, followUser, forceWithdrawVaultCustody, generatePkce, generateState, getActivity, getActivityGroup, getAdminAppealRoom, getAppFeeConfig, getAppPage, getAppPageChanges, getAppealRoom, getBipDirectory, getBipInterestCount, getBipPage, getDelegation, getDeveloperAppActivity, getDeveloperAppBalances, getDeveloperAppEarnings, getDeveloperAppInventoryItemHolders, getDeveloperAppOverview, getDeveloperAppPage, getDeveloperAppPlaytime, getDeveloperAppTronBalance, getDeveloperAppWallets, getDeveloperPaymentAppeals, getDeveloperPaymentPendingDeposits, getDeveloperStatus, getDeveloperTronBalanceSummary, getDmKeyBackupStatus, getEarningsTimeseries, getIntentStatus, getLibrary, getMeStats, getMoonpayAvailability, getMyBipEngagement, getMyBipUpdateReactions, getMyDmKey, getMyGameReview, getMyGameReviewReactions, getOutstanding, getPaymentChains, getPaymentHistory, getPaymentIntent, getPaymentLimits, getPaymentPrice, getPlatformFees, getPlaytime, getPlaytimeTimeseries, getPublicProfile, getReferral, getThreadDmKey, getTronBalance, getTronSecurity, hideAppPage, hideAppPageBip, hideThread, inviteDeveloperAppParticipant, inviteParticipants, leaveThread, listActivePlayers, listAdminContentReports, listAdmins, listAppPages, listAppealBlacklist, listAppealQueue, listAudit, listBipUpdateComments, listBipUpdates, listDeveloperApiKeys, listDeveloperAppContentReports, listDeveloperAppInventoryCollections, listDeveloperAppInventoryItems, listDeveloperAppParticipants, listDeveloperAppReviews, listDeveloperBipUpdates, listDeveloperInvites, listDeveloperRequests, listDevelopers, listFriends, listFriendsForApp, listGameReviewComments, listGameReviews, listInventory, listInventoryForApp, listInventoryMintPermits, listInventoryVaultPermits, listInventoryVaulted, listNotifications, listOauthInventoryVaulted, listPaymentAuthorizations, listSocials, listThreadMessages, listThreads, listTronCashoutQueue, listTronCashouts, listTronLedger, listUsers, listWalletManager, listWallets, markAllNotificationsRead, markThreadRead, mintMoonpayBuyUrl, mintMoonpaySellUrl, mountPresenceWidget, oauthPaymentWebhookBodySchema, pinThread, postAdminAppealRoomMessage, postAppealRoomMessage, previewReferral, provisionDeveloperAppWallet, publishDmKey, quoteDeveloperAppInventoryRegistration, quoteNftTransfer, quoteRelayedVaultPermit, redeemInventoryMintPermit, refreshAccessToken, registerBipInterest, registerDeveloperAppInventoryItem, rejectTronCashout, removeAdmin, removeAppealBlacklist, removeFriend, removeParticipant, removeReaction, replyToGameReview, requestDeveloperAppProduction, requestMint, resolveAppeal, reviewAppPage, reviewAppPageBip, reviewAppPageChanges, reviewDeveloperRequest, revokeDeveloperApiKey, revokeDeveloperAppParticipant, revokePaymentAuthorization, revokeToken, rotateDeveloperAppKey, rotateDeveloperAppPaymentWebhookSecret, rotateProcessorTreasury, searchGiphy, searchUsers, sendFriendRequest, sendMessage, sendPresenceHeartbeat, setAppPageBip, setBipUpdateReaction, setMyGameReviewReaction, setProcessorWhitelist, setTronSecurity, setVaultOperator, setVaultPause, setVaultWithdrawLockDefault, setVaultWithdrawLockOverride, setupDmKeyBackup, sha256Base64Url, signInventoryVaultPermit, signPaymentIntent, submitAppContentReport, submitAppPageBipForReview, submitAppPageForReview, submitDeveloperRequest, submitRelayedVaultPermit, subscribeBipUpdates, tipGameReview, toTokenSet, triageAdminContentReport, unfollowUser, unhideAppPage, unhideAppPageBip, unlockDmKeyBackup, unpinThread, unpublishAppPage, unpublishAppPageBip, updateAdminRole, updateAppFeeConfig, updateAppPage, updateBipUpdate, updateDeveloperApp, updateDeveloperAppAutoSweep, updateDeveloperAppContentReportStatus, updateDeveloperProfile, updateNotification, updateParticipantRole, updatePaymentAuthorization, updatePlatformFees, updateProfile, updateThreadSettings, updateUserBan, updateWalletLabel, uploadAdminAppealRoomAttachment, uploadAppPageBanner, uploadAppPageGallery, uploadAppPageThumbnail, uploadAppPageThumbnailVideo, uploadAppealRoomAttachment, uploadAttachment, uploadAvatar, uploadBipUpdateMedia, uploadDeveloperAppInventoryItemBanner, uploadDeveloperAppInventoryItemImage, uploadDeveloperAppLogo, uploadDeveloperProfileLogo, uploadDeveloperRequestLogo, uploadMultipart, uploadThreadLogo, upsertMyGameReview, verifyWebhook, withdrawDeveloperAppWallet };
4629
+ export { AuthorizeUrl, type BrowserClientConfig, BuildAuthorizeUrlInput, ChargeResult, CookieTokenStoreOptions, type FetchLike, InflightDedup, type Logger, MountPresenceWidgetOptions, NOOP_RATE_LIMITER, OauthErrorCode, OauthPaymentWebhookBody, type OauthScope, PkcePair, PresenceStatus, PresenceWidgetHandle, RateLimitOptions, RateLimiter, SERVER_RATE_LIMIT_MAX_MUTATING, SERVER_RATE_LIMIT_MAX_READ, SERVER_RATE_LIMIT_WINDOW_MS, type SdkBaseConfig, TRON_WS_CLOSE_CODES, type TokenSet, type TokenStore, TronBrowserClient, TronError, TronOauthError, TronWsCloseCode, TronWsCloseError, VerifyWebhookFailure, VerifyWebhookInput, VerifyWebhookResult, VerifyWebhookSuccess, WEBHOOK_SIGNATURE_HEADER, WEBHOOK_TIMESTAMP_HEADER, acceptDeveloperInvite, addAdmin, addAppealBlacklist, addReaction, approveTronCashout, batchThreadDmKeys, bindReferral, buildAuthorizeUrl, cancelFriendRequest, charge, commentOnBipUpdate, commentOnGameReview, completePaymentIntent, completePaymentIntentSolana, consolidateDeveloperAppWallet, createBipUpdate, createConsoleLogger, createCookieTokenStore, createDelegation, createDeveloperApiKey, createDeveloperApp, createDeveloperAppMintPermit, createDeveloperVaultPermit, createDeveloperWithdrawPermit, createDirectThread, createInMemoryTokenStore, createInflightDedup, createNoopLogger, createRateLimiter, createReferralCode, createTronCashout, createTronConnectOnboarding, createTronDeposit, createTronTransfer, createTronTransferChallenge, decideFriendRequest, declineDeveloperInvite, defaultEndpoints, deleteAppPageBanner, deleteAppPageThumbnail, deleteAppPageThumbnailVideo, deleteAvatar, deleteBipUpdate, deleteBipUpdateComment, deleteDelegation, deleteDeveloperApp, deleteDeveloperAppLogo, deleteDeveloperProfileLogo, deleteDeveloperRequestLogo, deleteGameReviewComment, deleteGameReviewReply, deleteMessage, deleteMyGameReview, deleteThread, deleteThreadLogo, denyPaymentIntent, editMessage, exchangeAuthorizationCode, executeNftTransfer, fetchAuthorizationServerMetadata, fetchUserInfo, fileAppeal, fileAppealPotLeg, followUser, forceWithdrawVaultCustody, generatePkce, generateState, getActivity, getActivityGroup, getAdminAppealRoom, getAppFeeConfig, getAppPage, getAppPageChanges, getAppealRoom, getBipDirectory, getBipInterestCount, getBipPage, getDelegation, getDeveloperAppActivity, getDeveloperAppBalances, getDeveloperAppEarnings, getDeveloperAppInventoryItemHolders, getDeveloperAppOverview, getDeveloperAppPage, getDeveloperAppPlaytime, getDeveloperAppTronBalance, getDeveloperAppWallets, getDeveloperPaymentAppeals, getDeveloperPaymentPendingDeposits, getDeveloperStatus, getDeveloperTronBalanceSummary, getDmKeyBackupStatus, getEarningsTimeseries, getIntentStatus, getLibrary, getMeStats, getMoonpayAvailability, getMyBipEngagement, getMyBipUpdateReactions, getMyDmKey, getMyGameReview, getMyGameReviewReactions, getOutstanding, getPaymentChains, getPaymentHistory, getPaymentIntent, getPaymentLimits, getPaymentPrice, getPaymentRates, getPlatformFees, getPlaytime, getPlaytimeTimeseries, getPublicProfile, getReferral, getThreadDmKey, getTronBalance, getTronSecurity, hideAppPage, hideAppPageBip, hideThread, inviteDeveloperAppParticipant, inviteParticipants, leaveThread, listActivePlayers, listAdminContentReports, listAdmins, listAppPages, listAppealBlacklist, listAppealQueue, listAudit, listBipUpdateComments, listBipUpdates, listDeveloperApiKeys, listDeveloperAppContentReports, listDeveloperAppInventoryCollections, listDeveloperAppInventoryItems, listDeveloperAppParticipants, listDeveloperAppReviews, listDeveloperBipUpdates, listDeveloperInvites, listDeveloperRequests, listDevelopers, listFriends, listFriendsForApp, listGameReviewComments, listGameReviews, listInventory, listInventoryForApp, listInventoryMintPermits, listInventoryVaultPermits, listInventoryVaulted, listNotifications, listOauthInventoryVaulted, listPaymentAuthorizations, listSocials, listThreadMessages, listThreads, listTronCashoutQueue, listTronCashouts, listTronLedger, listUsers, listWalletManager, listWallets, markAllNotificationsRead, markThreadRead, mintMoonpayBuyUrl, mintMoonpaySellUrl, mountPresenceWidget, oauthPaymentWebhookBodySchema, pinThread, postAdminAppealRoomMessage, postAppealRoomMessage, preparePaymentIntentSolana, previewReferral, provisionDeveloperAppWallet, publishDmKey, quoteDeveloperAppInventoryRegistration, quoteNftTransfer, quoteRelayedVaultPermit, redeemInventoryMintPermit, refreshAccessToken, registerBipInterest, registerDeveloperAppInventoryItem, rejectTronCashout, removeAdmin, removeAppealBlacklist, removeFriend, removeParticipant, removeReaction, replyToGameReview, requestDeveloperAppProduction, requestMint, resolveAppeal, reviewAppPage, reviewAppPageBip, reviewAppPageChanges, reviewDeveloperRequest, revokeDeveloperApiKey, revokeDeveloperAppParticipant, revokePaymentAuthorization, revokeToken, rotateDeveloperAppKey, rotateDeveloperAppPaymentWebhookSecret, rotateProcessorTreasury, searchGiphy, searchUsers, sendFriendRequest, sendMessage, sendPresenceHeartbeat, setAppPageBip, setBipUpdateReaction, setMyGameReviewReaction, setProcessorWhitelist, setTronSecurity, setVaultOperator, setVaultPause, setVaultWithdrawLockDefault, setVaultWithdrawLockOverride, setupDmKeyBackup, sha256Base64Url, signInventoryVaultPermit, signPaymentIntent, submitAppContentReport, submitAppPageBipForReview, submitAppPageForReview, submitDeveloperRequest, submitRelayedVaultPermit, subscribeBipUpdates, tipGameReview, toTokenSet, triageAdminContentReport, unfollowUser, unhideAppPage, unhideAppPageBip, unlockDmKeyBackup, unpinThread, unpublishAppPage, unpublishAppPageBip, updateAdminRole, updateAppFeeConfig, updateAppPage, updateBipUpdate, updateDeveloperApp, updateDeveloperAppAutoSweep, updateDeveloperAppContentReportStatus, updateDeveloperProfile, updateNotification, updateParticipantRole, updatePaymentAuthorization, updatePlatformFees, updateProfile, updateThreadSettings, updateUserBan, updateWalletLabel, uploadAdminAppealRoomAttachment, uploadAppPageBanner, uploadAppPageGallery, uploadAppPageThumbnail, uploadAppPageThumbnailVideo, uploadAppealRoomAttachment, uploadAttachment, uploadAvatar, uploadBipUpdateMedia, uploadDeveloperAppInventoryItemBanner, uploadDeveloperAppInventoryItemImage, uploadDeveloperAppLogo, uploadDeveloperProfileLogo, uploadDeveloperRequestLogo, uploadMultipart, uploadThreadLogo, upsertMyGameReview, verifyWebhook, withdrawDeveloperAppWallet };