@privy-io/js-sdk-core 0.61.3 → 0.62.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.
Files changed (72) hide show
  1. package/dist/cjs/client/EmbeddedWalletApi.js +1 -1
  2. package/dist/cjs/client/EmbeddedWalletApi.js.map +1 -1
  3. package/dist/cjs/client/Privy.js +1 -1
  4. package/dist/cjs/client/Privy.js.map +1 -1
  5. package/dist/cjs/client/PrivyInternal.js +1 -1
  6. package/dist/cjs/client/PrivyInternal.js.map +1 -1
  7. package/dist/cjs/client/auth/OAuthApi.js +1 -1
  8. package/dist/cjs/client/auth/OAuthApi.js.map +1 -1
  9. package/dist/cjs/client/recovery/RecoveryApi.js.map +1 -1
  10. package/dist/cjs/client/recovery/RecoveryOAuthApi.js +1 -1
  11. package/dist/cjs/client/recovery/RecoveryOAuthApi.js.map +1 -1
  12. package/dist/cjs/crypto/resolve.js +2 -0
  13. package/dist/cjs/crypto/resolve.js.map +1 -0
  14. package/dist/cjs/embedded/EmbeddedSolanaWalletProvider.js +1 -1
  15. package/dist/cjs/embedded/EmbeddedSolanaWalletProvider.js.map +1 -1
  16. package/dist/cjs/embedded/EmbeddedWalletProvider.js +1 -1
  17. package/dist/cjs/embedded/EmbeddedWalletProvider.js.map +1 -1
  18. package/dist/cjs/embedded/index.js +1 -1
  19. package/dist/cjs/embedded/stack/wallet-api-eth-transaction.js +1 -1
  20. package/dist/cjs/embedded/stack/wallet-api-eth-transaction.js.map +1 -1
  21. package/dist/cjs/embedded/stack/walletRpc.js +1 -1
  22. package/dist/cjs/embedded/stack/walletRpc.js.map +1 -1
  23. package/dist/cjs/embedded/types.js.map +1 -1
  24. package/dist/cjs/embedded/utils/index.js +1 -1
  25. package/dist/cjs/embedded/utils/index.js.map +1 -1
  26. package/dist/cjs/index.js +1 -1
  27. package/dist/cjs/index.js.map +1 -1
  28. package/dist/cjs/pkce.js +1 -1
  29. package/dist/cjs/pkce.js.map +1 -1
  30. package/dist/cjs/smart-wallets.js +1 -1
  31. package/dist/cjs/smart-wallets.js.map +1 -1
  32. package/dist/cjs/solana/client.js +1 -1
  33. package/dist/cjs/solana/client.js.map +1 -1
  34. package/dist/dts/index.d.mts +41 -7
  35. package/dist/dts/index.d.ts +41 -7
  36. package/dist/dts/smart-wallets.d.mts +2 -1
  37. package/dist/dts/smart-wallets.d.ts +2 -1
  38. package/dist/esm/client/EmbeddedWalletApi.mjs +1 -1
  39. package/dist/esm/client/EmbeddedWalletApi.mjs.map +1 -1
  40. package/dist/esm/client/Privy.mjs +1 -1
  41. package/dist/esm/client/Privy.mjs.map +1 -1
  42. package/dist/esm/client/PrivyInternal.mjs +1 -1
  43. package/dist/esm/client/PrivyInternal.mjs.map +1 -1
  44. package/dist/esm/client/auth/OAuthApi.mjs +1 -1
  45. package/dist/esm/client/auth/OAuthApi.mjs.map +1 -1
  46. package/dist/esm/client/recovery/RecoveryApi.mjs.map +1 -1
  47. package/dist/esm/client/recovery/RecoveryOAuthApi.mjs +1 -1
  48. package/dist/esm/client/recovery/RecoveryOAuthApi.mjs.map +1 -1
  49. package/dist/esm/crypto/resolve.mjs +2 -0
  50. package/dist/esm/crypto/resolve.mjs.map +1 -0
  51. package/dist/esm/embedded/EmbeddedSolanaWalletProvider.mjs +1 -1
  52. package/dist/esm/embedded/EmbeddedSolanaWalletProvider.mjs.map +1 -1
  53. package/dist/esm/embedded/EmbeddedWalletProvider.mjs +1 -1
  54. package/dist/esm/embedded/EmbeddedWalletProvider.mjs.map +1 -1
  55. package/dist/esm/embedded/index.mjs +1 -1
  56. package/dist/esm/embedded/stack/wallet-api-eth-transaction.mjs +1 -1
  57. package/dist/esm/embedded/stack/wallet-api-eth-transaction.mjs.map +1 -1
  58. package/dist/esm/embedded/stack/walletRpc.mjs +1 -1
  59. package/dist/esm/embedded/stack/walletRpc.mjs.map +1 -1
  60. package/dist/esm/embedded/types.mjs.map +1 -1
  61. package/dist/esm/embedded/utils/index.mjs +1 -1
  62. package/dist/esm/embedded/utils/index.mjs.map +1 -1
  63. package/dist/esm/index.mjs +1 -1
  64. package/dist/esm/index.mjs.map +1 -1
  65. package/dist/esm/pkce.mjs +1 -1
  66. package/dist/esm/pkce.mjs.map +1 -1
  67. package/dist/esm/smart-wallets.mjs +1 -1
  68. package/dist/esm/smart-wallets.mjs.map +1 -1
  69. package/dist/esm/solana/client.mjs +1 -1
  70. package/dist/esm/solana/client.mjs.map +1 -1
  71. package/dist/esm/toAbortSignalTimeout.mjs.map +1 -1
  72. package/package.json +8 -10
@@ -1 +1 @@
1
- {"version":3,"file":"walletRpc.js","sources":["../../../../src/embedded/stack/walletRpc.ts"],"names":["async","context","account","rpcRequest","chainType","method","message","params","response","walletApiRpc","signRequest","chain_type","wallet_id","id","startsWith","slice","encoding","Error","data","signature","transactionRequest","transaction","toWalletApiUnsignedEthTransaction","signed_transaction","typedData","typed_data","toWalletApiTypedData","hash","isHexEncoded","bytesToHex","utf8ToBytes","ethereumWalletRpc","request","messageBase64","solanaWalletRpc"],"mappings":"wZA+BOA,gBACLC,QAAAA,EACAC,QAAAA,EACAC,WAAAA,IAEA,OAAQA,EAAWC,WACjB,IAAK,WACH,OAYNJ,gBACEC,QAAAA,EACAC,QAAAA,EACAC,WAAAA,IAEA,OAAQA,EAAWE,QACjB,IAAK,gBAAiB,CACpB,IAAOC,GAAWH,EAAWI,OACvBC,QAAiBC,EAAAA,IAAaR,EAASA,EAAQS,YAAa,CAChEC,WAAY,WACZN,OAAQ,gBACRO,UAAWV,EAAQW,GACnBN,OAAQD,EAAQQ,WAAW,MACvB,CAACR,QAASA,EAAQS,MAAM,GAAIC,SAAU,OACtC,CAACV,QAAAA,EAASU,SAAU,WAG1B,GAAIR,kBAAAA,EAASH,OACX,MAAMY,MAAU,0BAGlB,MAAO,CAACC,KAAMV,EAASU,KAAKC,UAC9B,CACA,IAAK,sBAAuB,CAC1B,IAAOC,GAAsBjB,EAAWI,OAElCC,QAAiBC,MAAaR,EAASA,EAAQS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AE7E,CA5Ga0B,CAAkB,CAAC9B,QAAAA,EAASC,QAAAA,EAASC,WAAYA,EAAW6B,UACrE,IAAK,SACH,OAkHNhC,gBACEC,QAAAA,EACAC,QAAAA,EACAC,WAAAA,IAEA,GACO,gBADCA,EAAWE,OACG,CAClB,IAAOC,QAAS2B,GAAiB9B,EAAWI,OAEtCC,QAAiBC,EAAAA,IAAaR,EAASA,EAAQS,YAAa,CAChEC,WAAY,SACZN,OAAQ,cACRO,UAAWV,EAAQW,GACnBN,OAAQ,CAACD,QAAS2B,EAAejB,SAAU,YAG7C,GAAIR,gBAAAA,EAASH,OACX,MAAMY,MAAU,0BAGlB,MAAO,CAACC,KAAMV,EAASU,KAAKC,UAC9B,CAEJ,CAzIae,CAAgB,CAACjC,QAAAA,EAASC,QAAAA,EAASC,WAAYA,EAAW6B,UAEvE"}
1
+ {"version":3,"file":"walletRpc.js","sources":["../../../../src/embedded/stack/walletRpc.ts"],"names":["async","context","account","rpcRequest","chainType","method","message","params","response","walletApiRpc","signRequest","chain_type","wallet_id","id","startsWith","slice","encoding","Error","data","signature","transactionRequest","transaction","toWalletApiUnsignedEthTransaction","signed_transaction","typedData","typed_data","toWalletApiTypedData","hash","isHexEncoded","bytesToHex","utf8ToBytes","ethereumWalletRpc","request","messageBase64","solanaWalletRpc"],"mappings":"sbA+BOA,gBACLC,QAAAA,EACAC,QAAAA,EACAC,WAAAA,IAEA,OAAQA,EAAWC,WACjB,IAAK,WACH,OAYNJ,gBACEC,QAAAA,EACAC,QAAAA,EACAC,WAAAA,IAEA,OAAQA,EAAWE,QACjB,IAAK,gBAAiB,CACpB,IAAOC,GAAWH,EAAWI,OACvBC,QAAiBC,EAAAA,IAAaR,EAASA,EAAQS,YAAa,CAChEC,WAAY,WACZN,OAAQ,gBACRO,UAAWV,EAAQW,GACnBN,OAAQD,EAAQQ,WAAW,MACvB,CAACR,QAASA,EAAQS,MAAM,GAAIC,SAAU,OACtC,CAACV,QAAAA,EAASU,SAAU,WAG1B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AAYxB,OAInE,GAAIE,mBAAAA,EAASH,OACX,MAAMY,MAAU,0BAGlB,MAAO,CAACC,KAAMV,EAASU,KAAKC,UAC9B,CACA,IAAK,wBACL,IAAK,sBACL,IAAK,iCACH,MAAMF,MAAU,4CAA4Cd,EAAWE,UAE7E,CA5Ga0B,CAAkB,CAAC9B,QAAAA,EAASC,QAAAA,EAASC,WAAYA,EAAW6B,UACrE,IAAK,SACH,OAkHNhC,gBACEC,QAAAA,EACAC,QAAAA,EACAC,WAAAA,IAEA,GACO,gBADCA,EAAWE,OACG,CAClB,IAAOC,QAAS2B,GAAiB9B,EAAWI,OAEtCC,QAAiBC,EAAAA,IAAaR,EAASA,EAAQS,YAAa,CAChEC,WAAY,SACZN,OAAQ,cACRO,UAAWV,EAAQW,GACnBN,OAAQ,CAACD,QAAS2B,EAAejB,SAAU,YAG7C,GAAIR,gBAAAA,EAASH,OACX,MAAMY,MAAU,0BAGlB,MAAO,CAACC,KAAMV,EAASU,KAAKC,UAC9B,CAEJ,CAzIae,CAAgB,CAACjC,QAAAA,EAASC,QAAAA,EAASC,WAAYA,EAAW6B,UAEvE"}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sources":["../../../src/embedded/types.ts"],"names":["SUPPORTED_JSON_RPC_METHODS","SUPPORTED_SOLANA_RPC_METHODS","method","includes","t"],"mappings":"aAwBO,MAAMA,EAA6B,CACxC,WACA,iCACA,sBACA,gBACA,uBACA,wBACA,kBAqNF,IAAMC,EAA+B,CAAC,6CAwxBD,CACnC,QACA,4BACA,uBACA,uBACA,qBACA,cACA,yBACA,2GAj/BmCC,GAC5BF,EAA2BG,SAASD,sCAmNHE,GACjCH,EAA6BE,SAASD"}
1
+ {"version":3,"file":"types.js","sources":["../../../src/embedded/types.ts"],"names":["SUPPORTED_JSON_RPC_METHODS","SUPPORTED_SOLANA_RPC_METHODS","method","includes","t"],"mappings":"aA2BO,MAAMA,EAA6B,CACxC,WACA,iCACA,sBACA,gBACA,uBACA,wBACA,kBAiOF,IAAMC,EAA+B,CAAC,6CAwxBD,CACnC,QACA,4BACA,uBACA,uBACA,qBACA,cACA,yBACA,2GA7/BmCC,GAC5BF,EAA2BG,SAASD,sCA+NHE,GACjCH,EAA6BE,SAASD"}
@@ -1,2 +1,2 @@
1
- "use strict";var r=require("viem"),e=require("../errors.js");require("../types.js");const t=(r,t,p)=>{let o,i=r.id,c=Number(r.id);if(r.rpcUrls.privyWalletOverride&&r.rpcUrls.privyWalletOverride.http[0])o=r.rpcUrls.privyWalletOverride.http[0];else if(t.rpcUrls&&t.rpcUrls[c])o=t.rpcUrls[c];else if(r.rpcUrls.privy?.http[0]){let e=new URL(r.rpcUrls.privy.http[0]);e.searchParams.append("privyAppId",p),o=e.toString()}else o=r.rpcUrls.public?.http[0]?r.rpcUrls.public.http[0]:r.rpcUrls.default?.http[0];if(!o)throw new e.PrivyConnectorError(`No RPC url found for ${i}`);return o};exports.getJsonRpcEndpointFromChain=t,exports.getPublicClient=(p,o,i,c)=>{let s=Number(p),n=o.find((r=>r.id===s));if(!n)throw new e.PrivyConnectorError(`Unsupported chainId ${p}`,4901);return r.createPublicClient({transport:r.http(t(n,i,c.appId)),chain:n})},exports.throwIfInvalidRecoveryUpgradePath=function({currentRecoveryMethod:r,upgradeToRecoveryMethod:e}){switch(r){case"privy":case"user-passcode":case"recovery-encryption-key":return!0;case"icloud":case"google-drive":if(r===e)throw Error("Cannot upgrade to the existing cloud platform");return!0;default:throw Error("Unknown recovery method")}};
1
+ "use strict";var r=require("viem"),e=require("viem/chains"),t=require("../errors.js");require("../types.js");const o=(r,e,o)=>{let i,p=r.id,c=Number(r.id);if(r.rpcUrls.privyWalletOverride&&r.rpcUrls.privyWalletOverride.http[0])i=r.rpcUrls.privyWalletOverride.http[0];else if(e.rpcUrls&&e.rpcUrls[c])i=e.rpcUrls[c];else if(r.rpcUrls.privy?.http[0]){let e=new URL(r.rpcUrls.privy.http[0]);e.searchParams.append("privyAppId",o),i=e.toString()}else i=r.rpcUrls.public?.http[0]?r.rpcUrls.public.http[0]:r.rpcUrls.default?.http[0];if(!i)throw new t.PrivyConnectorError(`No RPC url found for ${p}`);return i};exports.getJsonRpcEndpointFromChain=o,exports.getPublicClient=(e,i,p,c)=>{let n=Number(e),l=i.find((r=>r.id===n));if(!l)throw new t.PrivyConnectorError(`Unsupported chainId ${e}`,4901);return r.createPublicClient({transport:r.http(o(l,p,c.appId)),chain:l})},exports.getTempoPublicClient=(i,p,c,n)=>{let l=Number(i),s=l===e.tempo.id?e.tempo:l===e.tempoModerato.id?e.tempoModerato:void 0;if(!s)throw new t.PrivyConnectorError(`Not a Tempo chainId: ${i}`,4901);let a=p.find((r=>r.id===l));return r.createPublicClient({transport:r.http(a?o(a,c,n.appId):s.rpcUrls.default.http[0]),chain:s})},exports.throwIfInvalidRecoveryUpgradePath=function({currentRecoveryMethod:r,upgradeToRecoveryMethod:e}){switch(r){case"privy":case"user-passcode":case"recovery-encryption-key":return!0;case"icloud":case"google-drive":if(r===e)throw Error("Cannot upgrade to the existing cloud platform");return!0;default:throw Error("Unknown recovery method")}};
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/embedded/utils/index.ts"],"names":["getJsonRpcEndpointFromChain","chain","rpcConfig","privyAppId","rpcUrl","chainId","id","chainIdInt","Number","rpcUrls","privyWalletOverride","http","privy","tempUrl","URL","searchParams","append","toString","public","default","PrivyConnectorError","chains","options","find","r","createPublicClient","transport","appId","currentRecoveryMethod","upgradeToRecoveryMethod","Error"],"mappings":"0FAsCaA,EAA8B,CACzCC,EACAC,EACAC,KAAAA,IAKIC,EAHEC,EAAUJ,EAAMK,GAChBC,EAAaC,OAAOP,EAAMK,IAGhC,GAAIL,EAAMQ,QAAQC,qBAAuBT,EAAMQ,QAAQC,oBAAoBC,KAAK,GAC9EP,EAASH,EAAMQ,QAAQC,oBAAoBC,KAAK,QAC3C,GAAIT,EAAUO,SAAWP,EAAUO,QAAQF,GAChDH,EAASF,EAAUO,QAAQF,QACtB,GAAIN,EAAMQ,QAAQG,OAAUD,KAAK,GAAI,CAC1C,IAAME,EAAU,IAAIC,IAAIb,EAAMQ,QAAQG,MAASD,KAAK,IACpDE,EAAQE,aAAaC,OAAO,aAAcb,GAC1CC,EAASS,EAAQI,UACnB,MACEb,EADSH,EAAMQ,QAAQS,QAAWP,KAAK,GAC9BV,EAAMQ,QAAQS,OAAUP,KAAK,GAE7BV,EAAMQ,QAAQU,SAAYR,KAAK,GAG1C,IAAKP,EACH,MAAM,IAAIgB,EAAAA,oBAAoB,wBAAwBf,KAExD,OAAOD,iEApDsB,CAC7BC,EACAgB,EACAnB,EACAoB,KAEA,IAAMf,EAAaC,OAAOH,GACpBJ,EAAQoB,EAAOE,MAAKC,GAAWvB,EAAMK,KAAOC,IAClD,IAAKN,EACH,MAAM,IAAImB,EAAAA,oBAAoB,uBAAuBf,IAAW,MAIlE,OAAOoB,EAAAA,mBAA6D,CAClEC,UAAWf,EAAAA,KAFDX,EAA4BC,EAAOC,EAAWoB,EAAQK,QAGhE1B,MAAAA,GACF,4CA6CK,UACL2B,sBAAAA,EACAC,wBAAAA,IAKA,OAAQD,GAIN,IAAK,QACL,IAAK,gBACL,IAAK,0BACH,OAAO,EAET,IAAK,SACL,IAAK,eACH,GAAIA,IAA0BC,EAC5B,MAAMC,MAAU,iDAElB,OAAO,EACT,QACE,MAAMA,MAAU,2BAEtB"}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/embedded/utils/index.ts"],"names":["getJsonRpcEndpointFromChain","chain","rpcConfig","privyAppId","rpcUrl","chainId","id","chainIdInt","Number","rpcUrls","privyWalletOverride","http","privy","tempUrl","URL","searchParams","append","toString","public","default","PrivyConnectorError","chains","options","find","r","createPublicClient","transport","appId","tempoChain","tempo","tempoModerato","undefined","privyChain","currentRecoveryMethod","upgradeToRecoveryMethod","Error"],"mappings":"mHA0FaA,EAA8B,CACzCC,EACAC,EACAC,KAAAA,IAKIC,EAHEC,EAA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EAAAA,KALDqB,EACRhC,EAA4BgC,EAAY9B,EAAWoB,EAAQK,OAC3DC,EAAWnB,QAAQU,QAAQR,KAAK,IAIlCV,MAAO2B,GACT,4CA2CK,UACLK,sBAAAA,EACAC,wBAAAA,IAKA,OAAQD,GAIN,IAAK,QACL,IAAK,gBACL,IAAK,0BACH,OAAO,EAET,IAAK,SACL,IAAK,eACH,GAAIA,IAA0BC,EAC5B,MAAMC,MAAU,iDAElB,OAAO,EACT,QACE,MAAMA,MAAU,2BAEtB"}
package/dist/cjs/index.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./client/Privy.js"),r=require("./storage/LocalStorage.js"),t=require("./storage/InMemoryStorage.js"),s=require("./Error.js"),i=require("./embedded/errors.js"),o=require("./utils/getUserEmbeddedEthereumWallet.js"),a=require("./utils/getAllUserEmbeddedEthereumWallets.js"),l=require("./utils/getAllUserEmbeddedSolanaWallets.js"),n=require("./utils/getAllUserEmbeddedBitcoinWallets.js"),d=require("./utils/embedded-wallets.js"),u=require("./utils/entropy.js"),p=require("./utils/getUserSmartWallet.js"),c=require("./embedded/utils/index.js"),m=require("./utils/phoneNumberUtils.js"),q=require("./utils/getUserEmbeddedSolanaWallet.js"),j=require("./utils/toObjectKeys.js"),g=require("./utils/getIsTokenUsdc.js"),A=require("./utils/generateWalletIdempotencyKey.js"),x=require("./funding/moonpay.js"),b=require("./funding/coinbase.js"),y=require("./solana/client.js"),E=require("./solana/createSiwsMessage.js"),h=require("./solana/getSolanaRpcEndpointForCluster.js"),C=require("./solana/getSolanaUsdcMintAddressForCluster.js"),S=require("./solana/getSolanaClusterDisplayName.js"),W=require("./types.js"),f=require("@privy-io/chains"),P=require("./utils/formatters.js"),v=require("./wallet-api/generate-authorization-signature.js"),M=require("./wallet-api/create.js"),I=require("./wallet-api/rpc.js"),U=require("./wallet-api/raw-sign.js"),w=require("./wallet-api/get-wallet.js"),T=require("./wallet-api/update-wallet.js"),R=require("./wallet-api/unified-wallet.js"),F=require("./embedded/stack/session-signers.js"),N=require("./solana/ConnectedStandardSolanaWallet.js"),O=require("./index-DzfqDJJ9.js"),k=require("./index-BDWdfIuK.js"),L=require("libphonenumber-js/min");require("./client/AppApi.js"),require("@privy-io/routes"),require("./client/CrossAppApi.js"),require("./Token.js"),require("jose"),require("./client/DelegatedWalletsApi.js"),require("./client/EmbeddedWalletApi.js"),require("./embedded/EmbeddedBitcoinWalletProvider.js"),require("./embedded/stack/walletCreate.js"),require("./embedded/EmbeddedWalletProxy.js"),require("./utils/sleep.js"),require("./embedded/EventCallbackQueue.js"),require("./embedded/withMfa.js"),require("./embedded/EmbeddedWalletProvider.js"),require("eventemitter3"),require("viem"),require("@privy-io/ethereum"),require("./embedded/stack/walletRpc.js"),require("./utils/encodings.js"),require("./embedded/stack/wallet-api-eth-transaction.js"),require("./embedded/stack/wallet-api-eth-typed-data.js"),require("./embedded/EmbeddedSolanaWalletProvider.js"),require("./solana/getWalletPublicKeyFromTransaction.js"),require("./solana/isVersionedTransaction.js"),require("./client/MfaPromises.js"),require("./client/PrivyInternal.js"),require("fetch-retry"),require("uuid"),require("@privy-io/api-base"),require("./Session.js"),require("js-cookie"),require("./utils/allSettled.js"),require("./toAbortSignalTimeout.js"),require("./utils/toSearchParams.js"),require("./client/logger.js"),require("./utils/noop.js"),require("./client/UserApi.js"),require("./client/auth/AuthApi.js"),require("./client/auth/CustomProviderApi.js"),require("./client/auth/maybeCreateWalletOnLogin.js"),require("./utils/shouldCreateEmbeddedEthWallet.js"),require("./utils/shouldCreateEmbeddedSolWallet.js"),require("./client/auth/EmailApi.js"),require("./client/auth/FarcasterApi.js"),require("./client/auth/FarcasterV2Api.js"),require("./client/auth/GuestApi.js"),require("./client/auth/OAuthApi.js"),require("./pkce.js"),require("./client/auth/PasskeyApi.js"),require("./client/auth/PhoneApi.js"),require("./client/auth/SiweApi.js"),require("./client/auth/SiwsApi.js"),require("./client/auth/SmartWalletApi.js"),require("./client/funding/FundingApi.js"),require("./client/funding/CoinbaseOnRampApi.js"),require("./client/funding/MoonpayOnRampApi.js"),require("./client/mfa/MfaApi.js"),require("./client/mfa/MfaPasskeyApi.js"),require("./client/mfa/MfaSmsApi.js"),require("./client/recovery/RecoveryApi.js"),require("./client/recovery/RecoveryICloudApi.js"),require("./client/recovery/RecoveryOAuthApi.js"),require("./embedded/types.js"),require("libphonenumber-js/examples.mobile.json"),require("canonicalize"),require("@privy-io/encoding"),require("./wallet-api/types.js"),require("./action/delegatedActions/utils.js"),require("./action/crossApp/loginWithCrossAppAuth.js"),require("./action/crossApp/linkWithCrossAppAuth.js"),require("./index-CARkJvRM.js"),require("./action/crossApp/wallet/signMessage.js"),require("./action/crossApp/wallet/utils/isCrossAppWalletSmart.js"),require("./action/crossApp/wallet/utils/sendCrossAppRequest.js"),require("./action/crossApp/wallet/utils/getCrossAppAccountByWalletAddress.js"),require("./action/crossApp/wallet/utils/getProviderAccessTokenOrRelink.js"),require("./action/crossApp/wallet/utils/throwIfNotLoggedIn.js"),require("./action/crossApp/wallet/signTypedData.js"),require("./utils/typedData/generateDomainType.js"),require("./action/crossApp/wallet/sendTransaction.js"),require("./action/delegatedActions/delegateWallet.js"),require("./action/delegatedActions/revokeWallets.js");exports.default=e.default,exports.LocalStorage=r.LocalStorage,exports.InMemoryCache=t.InMemoryCache,exports.MoonpayApiError=s.MoonpayApiError,exports.PrivyApiError=s.PrivyApiError,exports.PrivyClientError=s.PrivyClientError,exports.createErrorFormatter=s.createErrorFormatter,exports.errorIndicatesMfaCanceled=s.errorIndicatesMfaCanceled,exports.EmbeddedProviderError=i.EmbeddedProviderError,exports.PrivyConnectorError=i.PrivyConnectorError,exports.PrivyEmbeddedWalletErrorCode=i.PrivyEmbeddedWalletErrorCode,exports.PrivyProviderRpcError=i.PrivyProviderRpcError,exports.ProviderErrors=i.ProviderErrors,exports.errorIndicatesMaxMfaRetries=i.errorIndicatesMaxMfaRetries,exports.errorIndicatesMfaRateLimit=i.errorIndicatesMfaRateLimit,exports.errorIndicatesMfaTimeout=i.errorIndicatesMfaTimeout,exports.errorIndicatesMfaVerificationFailed=i.errorIndicatesMfaVerificationFailed,exports.errorIndicatesRecoveryIsNeeded=i.errorIndicatesRecoveryIsNeeded,exports.getUserEmbeddedEthereumWallet=o.getUserEmbeddedEthereumWallet,exports.getUserEmbeddedWallet=o.getUserEmbeddedWallet,exports.getAllUserEmbeddedEthereumWallets=a.getAllUserEmbeddedEthereumWallets,exports.getAllUserEmbeddedSolanaWallets=l.getAllUserEmbeddedSolanaWallets,exports.getAllUserEmbeddedBitcoinWallets=n.getAllUserEmbeddedBitcoinWallets,exports.isEmbeddedWalletAccount=d.isEmbeddedWalletAccount,exports.getEntropyDetailsFromAccount=u.getEntropyDetailsFromAccount,exports.getEntropyDetailsFromUser=u.getEntropyDetailsFromUser,exports.getUserSmartWallet=p.getUserSmartWallet,exports.getJsonRpcEndpointFromChain=c.getJsonRpcEndpointFromChain,exports.throwIfInvalidRecoveryUpgradePath=c.throwIfInvalidRecoveryUpgradePath,exports.countryCodesAndNumbers=m.countryCodesAndNumbers,exports.formatPhoneNumber=m.formatPhoneNumber,exports.getPhoneCountryCodeAndNumber=m.getPhoneCountryCodeAndNumber,exports.getPlaceholderPhoneNumber=m.getPlaceholderPhoneNumber,exports.lastFourDigits=m.lastFourDigits,exports.phoneNumberTypingFormatter=m.phoneNumberTypingFormatter,exports.validatePhoneNumber=m.validatePhoneNumber,exports.getUserEmbeddedSolanaWallet=q.getUserEmbeddedSolanaWallet,exports.toObjectKeys=j.toObjectKeys,exports.SolanaUsdcAddressMap=g.SolanaUsdcAddressMap,exports.UsdcAddressMap=g.UsdcAddressMap,exports.getIsTokenUsdc=g.getIsTokenUsdc,exports.generateWalletIdempotencyKey=A.generateWalletIdempotencyKey,exports.chainToMoonpayCurrency=x.chainToMoonpayCurrency,exports.fundingMethodToMoonpayPaymentMethod=x.fundingMethodToMoonpayPaymentMethod,exports.isSupportedChainIdForMoonpay=x.isSupportedChainIdForMoonpay,exports.getCoinbaseOnRampUrl=b.getCoinbaseOnRampUrl,exports.isSupportedChainIdForCoinbaseOnramp=b.isSupportedChainIdForCoinbaseOnramp,exports.toCoinbaseAssetId=b.toCoinbaseAssetId,exports.toCoinbaseBlockchainFromChainId=b.toCoinbaseBlockchainFromChainId,exports.SolanaClient=y.SolanaClient,exports.createSiwsMessage=E.createSiwsMessage,exports.getSolanaRpcEndpointForCluster=h.getSolanaRpcEndpointForCluster,exports.getSolanaUsdcMintAddressForCluster=C.getSolanaUsdcMintAddressForCluster,exports.getSolanaClusterDisplayName=S.getSolanaClusterDisplayName,exports.ALL_WALLET_CLIENT_TYPES=W.ALL_WALLET_CLIENT_TYPES,exports.SUPPORTED_CONNECTOR_TYPES=W.SUPPORTED_CONNECTOR_TYPES,exports.formatLamportsAmount=P.formatLamportsAmount,exports.formatTokenAmount=P.formatTokenAmount,exports.formatWalletAddress=P.formatWalletAddress,exports.formatWeiAmount=P.formatWeiAmount,exports.generateAuthorizationSignature=v.generateAuthorizationSignature,exports.create=M.create,exports.rpc=I.rpc,exports.rawSign=U.rawSign,exports.getWallet=w.getWallet,exports.updateWallet=T.updateWallet,exports.isUnifiedWallet=R.isUnifiedWallet,exports.addSessionSigners=F.addSessionSigners,exports.removeSessionSigners=F.removeSessionSigners,exports.ConnectedStandardSolanaWallet=N.ConnectedStandardSolanaWallet,exports.crossApp=O.index,exports.delegatedActions=k.index,Object.defineProperty(exports,"getCountryCallingCode",{enumerable:!0,get:function(){return L.getCountryCallingCode}}),exports.BICONOMY="biconomy",exports.COINBASE_SMART_WALLET="coinbase_smart_wallet",exports.KERNEL="kernel",exports.LIGHT_ACCOUNT="light_account",exports.SAFE="safe",exports.THIRDWEB="thirdweb",Object.keys(f).forEach((function(e){"default"===e||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return f[e]}})}));
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./client/Privy.js"),r=require("./storage/LocalStorage.js"),t=require("./storage/InMemoryStorage.js"),s=require("./Error.js"),i=require("./embedded/errors.js"),o=require("./utils/getUserEmbeddedEthereumWallet.js"),a=require("./utils/getAllUserEmbeddedEthereumWallets.js"),l=require("./utils/getAllUserEmbeddedSolanaWallets.js"),n=require("./utils/getAllUserEmbeddedBitcoinWallets.js"),d=require("./utils/embedded-wallets.js"),u=require("./utils/entropy.js"),p=require("./utils/getUserSmartWallet.js"),c=require("./embedded/utils/index.js"),m=require("./utils/phoneNumberUtils.js"),q=require("./utils/getUserEmbeddedSolanaWallet.js"),j=require("./utils/toObjectKeys.js"),g=require("./utils/getIsTokenUsdc.js"),A=require("./utils/generateWalletIdempotencyKey.js"),x=require("./funding/moonpay.js"),b=require("./funding/coinbase.js"),y=require("./solana/client.js"),E=require("./solana/createSiwsMessage.js"),h=require("./solana/getSolanaRpcEndpointForCluster.js"),C=require("./solana/getSolanaUsdcMintAddressForCluster.js"),S=require("./solana/getSolanaClusterDisplayName.js"),W=require("./types.js"),f=require("@privy-io/chains"),P=require("./utils/formatters.js"),v=require("./wallet-api/generate-authorization-signature.js"),M=require("./wallet-api/create.js"),I=require("./wallet-api/rpc.js"),U=require("./wallet-api/raw-sign.js"),w=require("./wallet-api/get-wallet.js"),T=require("./wallet-api/update-wallet.js"),R=require("./wallet-api/unified-wallet.js"),F=require("./embedded/stack/session-signers.js"),N=require("./solana/ConnectedStandardSolanaWallet.js"),O=require("./index-DzfqDJJ9.js"),k=require("./index-BDWdfIuK.js"),L=require("libphonenumber-js/min");require("./crypto/resolve.js"),require("./client/AppApi.js"),require("@privy-io/routes"),require("./client/CrossAppApi.js"),require("./Token.js"),require("jose"),require("./client/DelegatedWalletsApi.js"),require("./client/EmbeddedWalletApi.js"),require("./embedded/EmbeddedBitcoinWalletProvider.js"),require("./embedded/stack/walletCreate.js"),require("./embedded/EmbeddedWalletProxy.js"),require("./utils/sleep.js"),require("./embedded/EventCallbackQueue.js"),require("./embedded/withMfa.js"),require("./embedded/EmbeddedWalletProvider.js"),require("eventemitter3"),require("viem"),require("@privy-io/ethereum"),require("./embedded/stack/walletRpc.js"),require("./utils/encodings.js"),require("./embedded/stack/wallet-api-eth-transaction.js"),require("./embedded/stack/wallet-api-eth-typed-data.js"),require("./embedded/EmbeddedSolanaWalletProvider.js"),require("./solana/getWalletPublicKeyFromTransaction.js"),require("./solana/isVersionedTransaction.js"),require("./client/MfaPromises.js"),require("./client/PrivyInternal.js"),require("fetch-retry"),require("@privy-io/api-base"),require("./Session.js"),require("js-cookie"),require("./utils/allSettled.js"),require("./toAbortSignalTimeout.js"),require("./utils/toSearchParams.js"),require("./client/logger.js"),require("./utils/noop.js"),require("./client/UserApi.js"),require("./client/auth/AuthApi.js"),require("./client/auth/CustomProviderApi.js"),require("./client/auth/maybeCreateWalletOnLogin.js"),require("./utils/shouldCreateEmbeddedEthWallet.js"),require("./utils/shouldCreateEmbeddedSolWallet.js"),require("./client/auth/EmailApi.js"),require("./client/auth/FarcasterApi.js"),require("./client/auth/FarcasterV2Api.js"),require("./client/auth/GuestApi.js"),require("./client/auth/OAuthApi.js"),require("./pkce.js"),require("./client/auth/PasskeyApi.js"),require("./client/auth/PhoneApi.js"),require("./client/auth/SiweApi.js"),require("./client/auth/SiwsApi.js"),require("./client/auth/SmartWalletApi.js"),require("./client/funding/FundingApi.js"),require("./client/funding/CoinbaseOnRampApi.js"),require("./client/funding/MoonpayOnRampApi.js"),require("./client/mfa/MfaApi.js"),require("./client/mfa/MfaPasskeyApi.js"),require("./client/mfa/MfaSmsApi.js"),require("./client/recovery/RecoveryApi.js"),require("./client/recovery/RecoveryICloudApi.js"),require("./client/recovery/RecoveryOAuthApi.js"),require("./embedded/types.js"),require("viem/chains"),require("libphonenumber-js/examples.mobile.json"),require("canonicalize"),require("@privy-io/encoding"),require("./wallet-api/types.js"),require("./action/delegatedActions/utils.js"),require("./action/crossApp/loginWithCrossAppAuth.js"),require("./action/crossApp/linkWithCrossAppAuth.js"),require("./index-CARkJvRM.js"),require("./action/crossApp/wallet/signMessage.js"),require("./action/crossApp/wallet/utils/isCrossAppWalletSmart.js"),require("./action/crossApp/wallet/utils/sendCrossAppRequest.js"),require("./action/crossApp/wallet/utils/getCrossAppAccountByWalletAddress.js"),require("./action/crossApp/wallet/utils/getProviderAccessTokenOrRelink.js"),require("./action/crossApp/wallet/utils/throwIfNotLoggedIn.js"),require("./action/crossApp/wallet/signTypedData.js"),require("./utils/typedData/generateDomainType.js"),require("./action/crossApp/wallet/sendTransaction.js"),require("./action/delegatedActions/delegateWallet.js"),require("./action/delegatedActions/revokeWallets.js");exports.default=e.default,exports.LocalStorage=r.LocalStorage,exports.InMemoryCache=t.InMemoryCache,exports.MoonpayApiError=s.MoonpayApiError,exports.PrivyApiError=s.PrivyApiError,exports.PrivyClientError=s.PrivyClientError,exports.createErrorFormatter=s.createErrorFormatter,exports.errorIndicatesMfaCanceled=s.errorIndicatesMfaCanceled,exports.EmbeddedProviderError=i.EmbeddedProviderError,exports.PrivyConnectorError=i.PrivyConnectorError,exports.PrivyEmbeddedWalletErrorCode=i.PrivyEmbeddedWalletErrorCode,exports.PrivyProviderRpcError=i.PrivyProviderRpcError,exports.ProviderErrors=i.ProviderErrors,exports.errorIndicatesMaxMfaRetries=i.errorIndicatesMaxMfaRetries,exports.errorIndicatesMfaRateLimit=i.errorIndicatesMfaRateLimit,exports.errorIndicatesMfaTimeout=i.errorIndicatesMfaTimeout,exports.errorIndicatesMfaVerificationFailed=i.errorIndicatesMfaVerificationFailed,exports.errorIndicatesRecoveryIsNeeded=i.errorIndicatesRecoveryIsNeeded,exports.getUserEmbeddedEthereumWallet=o.getUserEmbeddedEthereumWallet,exports.getUserEmbeddedWallet=o.getUserEmbeddedWallet,exports.getAllUserEmbeddedEthereumWallets=a.getAllUserEmbeddedEthereumWallets,exports.getAllUserEmbeddedSolanaWallets=l.getAllUserEmbeddedSolanaWallets,exports.getAllUserEmbeddedBitcoinWallets=n.getAllUserEmbeddedBitcoinWallets,exports.isEmbeddedWalletAccount=d.isEmbeddedWalletAccount,exports.getEntropyDetailsFromAccount=u.getEntropyDetailsFromAccount,exports.getEntropyDetailsFromUser=u.getEntropyDetailsFromUser,exports.getUserSmartWallet=p.getUserSmartWallet,exports.getJsonRpcEndpointFromChain=c.getJsonRpcEndpointFromChain,exports.throwIfInvalidRecoveryUpgradePath=c.throwIfInvalidRecoveryUpgradePath,exports.countryCodesAndNumbers=m.countryCodesAndNumbers,exports.formatPhoneNumber=m.formatPhoneNumber,exports.getPhoneCountryCodeAndNumber=m.getPhoneCountryCodeAndNumber,exports.getPlaceholderPhoneNumber=m.getPlaceholderPhoneNumber,exports.lastFourDigits=m.lastFourDigits,exports.phoneNumberTypingFormatter=m.phoneNumberTypingFormatter,exports.validatePhoneNumber=m.validatePhoneNumber,exports.getUserEmbeddedSolanaWallet=q.getUserEmbeddedSolanaWallet,exports.toObjectKeys=j.toObjectKeys,exports.SolanaUsdcAddressMap=g.SolanaUsdcAddressMap,exports.UsdcAddressMap=g.UsdcAddressMap,exports.getIsTokenUsdc=g.getIsTokenUsdc,exports.generateWalletIdempotencyKey=A.generateWalletIdempotencyKey,exports.chainToMoonpayCurrency=x.chainToMoonpayCurrency,exports.fundingMethodToMoonpayPaymentMethod=x.fundingMethodToMoonpayPaymentMethod,exports.isSupportedChainIdForMoonpay=x.isSupportedChainIdForMoonpay,exports.getCoinbaseOnRampUrl=b.getCoinbaseOnRampUrl,exports.isSupportedChainIdForCoinbaseOnramp=b.isSupportedChainIdForCoinbaseOnramp,exports.toCoinbaseAssetId=b.toCoinbaseAssetId,exports.toCoinbaseBlockchainFromChainId=b.toCoinbaseBlockchainFromChainId,exports.SolanaClient=y.SolanaClient,exports.createSiwsMessage=E.createSiwsMessage,exports.getSolanaRpcEndpointForCluster=h.getSolanaRpcEndpointForCluster,exports.getSolanaUsdcMintAddressForCluster=C.getSolanaUsdcMintAddressForCluster,exports.getSolanaClusterDisplayName=S.getSolanaClusterDisplayName,exports.ALL_WALLET_CLIENT_TYPES=W.ALL_WALLET_CLIENT_TYPES,exports.SUPPORTED_CONNECTOR_TYPES=W.SUPPORTED_CONNECTOR_TYPES,exports.formatLamportsAmount=P.formatLamportsAmount,exports.formatTokenAmount=P.formatTokenAmount,exports.formatWalletAddress=P.formatWalletAddress,exports.formatWeiAmount=P.formatWeiAmount,exports.generateAuthorizationSignature=v.generateAuthorizationSignature,exports.create=M.create,exports.rpc=I.rpc,exports.rawSign=U.rawSign,exports.getWallet=w.getWallet,exports.updateWallet=T.updateWallet,exports.isUnifiedWallet=R.isUnifiedWallet,exports.addSessionSigners=F.addSessionSigners,exports.removeSessionSigners=F.removeSessionSigners,exports.ConnectedStandardSolanaWallet=N.ConnectedStandardSolanaWallet,exports.crossApp=O.index,exports.delegatedActions=k.index,Object.defineProperty(exports,"getCountryCallingCode",{enumerable:!0,get:function(){return L.getCountryCallingCode}}),exports.BICONOMY="biconomy",exports.COINBASE_SMART_WALLET="coinbase_smart_wallet",exports.KERNEL="kernel",exports.LIGHT_ACCOUNT="light_account",exports.NEXUS="nexus",exports.SAFE="safe",exports.THIRDWEB="thirdweb",Object.keys(f).forEach((function(e){"default"===e||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return f[e]}})}));
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../src/index.ts"],"names":[],"mappings":"68RAcwB,yCAEa,uCAEf,+BAEO,6BAET,wBAEI"}
1
+ {"version":3,"file":"index.js","sources":["../../src/index.ts"],"names":[],"mappings":"m/RAewB,yCAEa,uCAEf,+BAEO,8BAMR,qBAJD,wBAEI"}
package/dist/cjs/pkce.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("jose");async function r(e,r){let t=(new TextEncoder).encode(e);return new Uint8Array(await r("SHA-256",t))}function t(e){return crypto.getRandomValues(new Uint8Array(e))}function n(){return e.base64url.encode(t(36))}exports.CODE_VERIFIER_KEY="privy:code_verifier",exports.STATE_CODE_KEY="privy:state_code",exports.createCodeVerifier=n,exports.createHashBuffer=r,exports.createStateCode=function(){return n()},exports.deriveCodeChallengeFromCodeVerifier=async function({codeVerifier:t,method:n="S256",digest:o=crypto.subtle.digest.bind(crypto.subtle)}){if("S256"!=n)return t;{let n=await r(t,o);return e.base64url.encode(n)}},exports.randomBytes=t;
1
+ "use strict";var e=require("jose");async function r(e,r){let t=(new TextEncoder).encode(e);return new Uint8Array(await r("SHA-256",t))}function t(e){return crypto.getRandomValues(new Uint8Array(e))}function n(){return e.base64url.encode(t(36))}exports.CODE_VERIFIER_KEY="privy:code_verifier",exports.STATE_CODE_KEY="privy:state_code",exports.createCodeVerifier=n,exports.createHashBuffer=r,exports.createStateCode=function(){return n()},exports.deriveCodeChallengeFromCodeVerifier=async function({codeVerifier:t,method:n="S256",digest:o}){if("S256"!=n)return t;{let n=await r(t,o);return e.base64url.encode(n)}},exports.randomBytes=t;
2
2
  //# sourceMappingURL=pkce.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pkce.js","sources":["../../src/pkce.ts"],"names":["async","createHashBuffer","message","digest","data","TextEncoder","encode","Uint8Array","randomBytes","size","crypto","getRandomValues","createCodeVerifier","base64url","codeVerifier","method","subtle","bind","hashBuffer"],"mappings":"mCAYOA,eAAeC,EAAiBC,EAAiBC,GACtD,IAAMC,GAAO,IAAIC,aAAcC,OAAOJ,GAEtC,OAAO,IAAIK,iBADQJ,EAAO,UAAWC,GAEvC,CAEO,SAASI,EAAYC,GAC1B,OAAOC,OAAOC,gBAAgB,IAAIJ,WAAWE,GAC/C,CAOO,SAASG,IASd,OAAOC,EAAAA,UAAUP,OAAOE,EAAY,IACtC,2BA5BiC,6CADH,mGAwCvB,WAIL,OAAOI,GACT,8CAOOZ,gBACLc,aAAAA,EACAC,OAAAA,EAzDoC,OA0DpCZ,OAAAA,EAASO,OAAOM,OAAOb,OAAOc,KAAKP,OAAOM,UAM1C,GAAID,QAAAA,EAQF,OAAOD,GANP,IAAMI,QAAmBjB,EAAiBa,EAAcX,GACxD,OAAOU,EAAAA,UAAUP,OAAOY,EAC1B,CAMF"}
1
+ {"version":3,"file":"pkce.js","sources":["../../src/pkce.ts"],"names":["async","createHashBuffer","message","digest","data","TextEncoder","encode","Uint8Array","randomBytes","size","crypto","getRandomValues","createCodeVerifier","base64url","codeVerifier","method","hashBuffer"],"mappings":"mCAYOA,eAAeC,EAAiBC,EAAiBC,GACtD,IAAMC,GAAO,IAAIC,aAAcC,OAAOJ,GAEtC,OAAO,IAAIK,iBADQJ,EAAO,UAAWC,GAEvC,CAEO,SAASI,EAAYC,GAC1B,OAAOC,OAAOC,gBAAgB,IAAIJ,WAAWE,GAC/C,CAOO,SAASG,IASd,OAAOC,EAAAA,UAAUP,OAAOE,EAAY,IACtC,2BA5BiC,6CADH,mGAwCvB,WAIL,OAAOI,GACT,8CAOOZ,gBACLc,aAAAA,EACAC,OAAAA,EAzDoC,OA0DpCZ,OAAAA,IAMA,GAAIY,QAAAA,EAQF,OAAOD,GANP,IAAME,QAAmBf,EAAiBa,EAAcX,GACxD,OAAOU,EAAAA,UAAUP,OAAOU,EAC1B,CAMF"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("permissionless"),t=require("permissionless/accounts"),r=require("permissionless/clients/pimlico"),n=require("viem"),a=require("viem/account-abstraction");let i={address:a.entryPoint06Address,version:"0.6"},s={address:a.entryPoint07Address,version:"0.7"},o=({owner:e,smartWalletType:r,smartWalletVersion:n,publicClient:o})=>{switch(r){case"safe":return t.toSafeSmartAccount({client:o,entryPoint:s,owners:[e],version:"1.4.1"});case"kernel":return t.toKernelSmartAccount({client:o,version:"0.3.1",entryPoint:s,useMetaFactory:"optional",owners:[e]});case"biconomy":return t.toBiconomySmartAccount({client:o,owners:[e],entryPoint:i});case"light_account":return t.toLightSmartAccount({client:o,entryPoint:i,owner:e,version:"1.1.0"});case"coinbase_smart_wallet":return async function({client:e,owner:t,version:r}){let[n]=await t.request({method:"eth_accounts"});if(!n)throw Error("Unable to request embedded owner for eth_accounts");return await a.toCoinbaseSmartAccount({client:e,owners:[{type:"local",source:"privy",address:n,sign:async({hash:e})=>await t.request({method:"secp256k1_sign",params:[e]})}],version:r})}({client:o,owner:e,version:n??"1"});case"thirdweb":return t.toThirdwebSmartAccount({client:o,entryPoint:s,owner:e});default:throw Error(`Invalid smart account type: ${r}.`)}};exports.signerToSmartAccountClient=async({owner:t,smartWalletType:a,smartWalletVersion:i,chain:s,publicClient:c,bundlerUrl:l,paymasterUrl:m,paymasterContext:u})=>{let p=await o({owner:t,smartWalletType:a,smartWalletVersion:i,publicClient:c}),y=r.createPimlicoClient({transport:n.http(l),entryPoint:p.entryPoint}),d=m?r.createPimlicoClient({transport:n.http(m),entryPoint:p.entryPoint}):void 0;return e.createSmartAccountClient({account:p,chain:s,paymaster:d,paymasterContext:u,bundlerTransport:n.http(l),userOperation:{estimateFeesPerGas:async()=>{if(["public.pimlico.io","api.pimlico.io"].some((e=>l.includes(e))))return await y.getUserOperationGasPrice().then((e=>e.fast));if(["rpc.zerodev.app"].some((e=>l.includes(e))))return(await y.request({method:"zd_getUserOperationGasPrice",params:[]})).fast;if(["g.alchemy.com"].some((e=>l.includes(e)))){let[e,t]=await Promise.all([c.getBlock({blockTag:"latest"}),y.request({method:"rundler_maxPriorityFeePerGas",params:[]})]);if(!e.baseFeePerGas||!t)throw Error("Failed to get block or maxPriorityFeePerGasEstimate");return{maxFeePerGas:150n*e.baseFeePerGas/100n+BigInt(t.toString()),maxPriorityFeePerGas:BigInt(t.toString())}}{let e=await c.estimateFeesPerGas(),t=l.includes("api.developer.coinbase.com")?175n:150n;return{...e,maxFeePerGas:e.maxFeePerGas*t/100n,maxPriorityFeePerGas:e.maxPriorityFeePerGas*t/100n}}}}})};
1
+ "use strict";var e=require("permissionless"),t=require("permissionless/accounts"),r=require("permissionless/clients/pimlico"),n=require("viem"),a=require("viem/account-abstraction");let i={address:a.entryPoint06Address,version:"0.6"},s={address:a.entryPoint07Address,version:"0.7"},o=({owner:e,smartWalletType:r,smartWalletVersion:n,publicClient:o})=>{switch(r){case"safe":return t.toSafeSmartAccount({client:o,entryPoint:s,owners:[e],version:"1.4.1"});case"kernel":return t.toKernelSmartAccount({client:o,version:"0.3.1",entryPoint:s,useMetaFactory:"optional",owners:[e]});case"biconomy":return t.toBiconomySmartAccount({client:o,owners:[e],entryPoint:i});case"light_account":return t.toLightSmartAccount({client:o,entryPoint:i,owner:e,version:"1.1.0"});case"coinbase_smart_wallet":return async function({client:e,owner:t,version:r}){let[n]=await t.request({method:"eth_accounts"});if(!n)throw Error("Unable to request embedded owner for eth_accounts");return await a.toCoinbaseSmartAccount({client:e,owners:[{type:"local",source:"privy",address:n,sign:async({hash:e})=>await t.request({method:"secp256k1_sign",params:[e]})}],version:r})}({client:o,owner:e,version:n??"1"});case"thirdweb":return t.toThirdwebSmartAccount({client:o,entryPoint:s,owner:e});case"nexus":return t.toNexusSmartAccount({client:o,owners:[e],version:"1.0.0",entryPoint:s});default:throw Error(`Invalid smart account type: ${r}.`)}};exports.signerToSmartAccountClient=async({owner:t,smartWalletType:a,smartWalletVersion:i,chain:s,publicClient:c,bundlerUrl:l,paymasterUrl:m,paymasterContext:u})=>{let p=await o({owner:t,smartWalletType:a,smartWalletVersion:i,publicClient:c}),y=r.createPimlicoClient({transport:n.http(l),entryPoint:p.entryPoint}),P=m?r.createPimlicoClient({transport:n.http(m),entryPoint:p.entryPoint}):void 0;return e.createSmartAccountClient({account:p,chain:s,paymaster:P,paymasterContext:u,bundlerTransport:n.http(l),userOperation:{estimateFeesPerGas:async()=>{if(["public.pimlico.io","api.pimlico.io"].some((e=>l.includes(e))))return await y.getUserOperationGasPrice().then((e=>e.fast));if(["rpc.zerodev.app"].some((e=>l.includes(e))))return(await y.request({method:"zd_getUserOperationGasPrice",params:[]})).fast;if(["g.alchemy.com"].some((e=>l.includes(e)))){let[e,t]=await Promise.all([c.getBlock({blockTag:"latest"}),y.request({method:"rundler_maxPriorityFeePerGas",params:[]})]);if(!e.baseFeePerGas||!t)throw Error("Failed to get block or maxPriorityFeePerGasEstimate");return{maxFeePerGas:150n*e.baseFeePerGas/100n+BigInt(t.toString()),maxPriorityFeePerGas:BigInt(t.toString())}}{let e=await c.estimateFeesPerGas(),t=l.includes("api.developer.coinbase.com")?175n:150n;return{...e,maxFeePerGas:e.maxFeePerGas*t/100n,maxPriorityFeePerGas:e.maxPriorityFeePerGas*t/100n}}}}})};
2
2
  //# sourceMappingURL=smart-wallets.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"smart-wallets.js","sources":["../../src/smart-wallets.ts"],"names":["ENTRYPOINT_V06","address","entryPoint06Address","version","ENTRYPOINT_V07","entryPoint07Address","getAccount","owner","smartWalletType","smartWalletVersion","publicClient","toSafeSmartAccount","client","entryPoint","owners","toKernelSmartAccount","useMetaFactory","toBiconomySmartAccount","toLightSmartAccount","async","request","method","Error","viemToCoinbaseSmartAccount","type","source","sign","hash","params","toCoinbaseSmartAccount","s","toThirdwebSmartAccount","chain","bundlerUrl","paymasterUrl","paymasterContext","account","pimlicoClient","createPimlicoClient","transport","http","paymaster","undefined","createSmartAccountClient","bundlerTransport","userOperation","estimateFeesPerGas","some","e","includes","supportedBundler","getUserOperationGasPrice","then","x","fast","block","maxPriorityFeePerGasEstimate","Promise","all","getBlock","blockTag","baseFeePerGas","maxFeePerGas","BigInt","toString","maxPriorityFeePerGas","gasFees","multiplier"],"mappings":"sLA2CA,IAAMA,EAAiB,CACrBC,QAASC,EAAAA,oBACTC,QAAS,OAGLC,EAAiB,CACrBH,QAASI,sBACTF,QAAS,OAGLG,EAAa,EACjBC,MAAAA,EACAC,gBAAAA,EACAC,mBAAAA,EACAC,aAAAA,MAOA,OAAQF,GACN,IAAK,OACH,OAAOG,EAAAA,mBAAmB,CACxBC,OAAQF,EACRG,WAAYT,EACZU,OAAQ,CAACP,GACTJ,QAAS,UAEb,IAAK,SACH,OAAOY,EAAAA,qBAAq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,OAAOC,EAAAA,yBAAyB,CAC9BP,QAAAA,EACAJ,MAAAA,EACAS,UAAAA,EACAN,iBAAAA,EACAS,iBAAkBJ,OAAKP,GACvBY,cAAe,CACbC,mBAAoB3B,UAClB,GACE,CAAC,oBAAqB,kBAAkB4B,MAAKC,GAC3Cf,EAAWgB,SAASC,KAItB,aAAab,EAAcc,2BAA2BC,MAAKJ,GAAOK,EAAEC,OAC/D,GACL,CAAC,mBAAmBP,MAAKC,GAAsBf,EAAWgB,SAASC,KAOnE,aAL0Db,EAAcjB,QAAQ,CAE9EC,OAAQ,8BACRO,OAAQ,MAEK0B,KACV,GACL,CAAC,iBAAiBP,MAAMG,GAAqBjB,EAAWgB,SAASC,KACjE,CACA,IAAOK,EAAOC,SAAsCC,QAAQC,IAAI,CAC9DhD,EAAaiD,SAAS,CAACC,SAAU,WACjCvB,EAAcjB,QAAQ,CAEpBC,OAAQ,+BACRO,OAAQ,OAGZ,IAAK2B,EAAMM,gBAAkBL,EAC3B,MAAMlC,MAAU,uDAElB,MAAO,CACLwC,aACE,KAACP,EAAMM,cAAwB,KAAOE,OAAOP,EAA6BQ,YAC5EC,qBAAsBF,OAAOP,EAA6BQ,YAE9D,CAAO,CAGL,IAAME,QAAgBxD,EAAaoC,qBAC7BqB,EAAalC,EAAWgB,SAAS,8BAAgC,KAAO,KAC9E,MAAO,IACFiB,EACHJ,aAAcd,EAASc,aAAeK,EAAc,KACpDF,qBAAuBC,EAAQD,qBAAuBE,EAAc,KAExE,KAGN"}
1
+ {"version":3,"file":"smart-wallets.js","sources":["../../src/smart-wallets.ts"],"names":["ENTRYPOINT_V06","address","entryPoint06Address","version","ENTRYPOINT_V07","entryPoint07Address","getAccount","owner","smartWalletType","smartWalletVersion","publicClient","toSafeSmartAccount","client","entryPoint","owners","toKernelSmartAccount","useMetaFactory","toBiconomySmartAccount","toLightSmartAccount","async","request","method","Error","viemToCoinbaseSmartAccount","type","source","sign","hash","params","toCoinbaseSmartAccount","c","toThirdwebSmartAccount","toNexusSmartAccount","chain","bundlerUrl","paymasterUrl","paymasterContext","account","pimlicoClient","createPimlicoClient","transport","http","paymaster","shouldSponsor","undefined","createSmartAccountClient","bundlerTransport","userOperation","estimateFeesPerGas","some","supportedBundler","includes","getUserOperationGasPrice","then","e","x","fast","block","maxPriorityFeePerGasEstimate","Promise","all","getBlock","blockTag","baseFeePerGas","maxFeePerGas","BigInt","toString","maxPriorityFeePerGas","gasFees","multiplier"],"mappings":"sLA+CA,IAAMA,EAAiB,CACrBC,QAASC,EAAAA,oBACTC,QAAS,OAGLC,EAAiB,CACrBH,QAASI,sBACTF,QAAS,OAGLG,EAAa,EACjBC,MAAAA,EACAC,gBAAAA,EACAC,mBAAAA,EACAC,aAAAA,MAOA,OAAQF,GACN,IAAK,OACH,OAAOG,EAAAA,mBAAmB,CACxBC,OAAQF,EACRG,WAAYT,EACZU,OAAQ,CAACP,GACTJ,QAAS,UAEb,IAAK,SACH,OAAOY,EAAAA,qBAAqB,CAC1BH,OAAQF,EAGRP,QAAS,QACTU,WAAYT,EACZY,eAAgB,WAChBF,OAAQ,CAACP,SAER,WACH,OAAOU,EAAAA,uBAAuB,CAC5BL,OAAQF,EACRI,OAAQ,CAACP,GACTM,WAAYb,IAEhB,IAAK,gBACH,OAAOkB,EAAAA,oBAAoB,CACzBN,OAAQF,EACRG,WAAYb,EACZO,MAAOA,EACPJ,QAAS,UAEb,IAAK,wBACH,OAmINgB,gBACEP,OAAAA,EACAL,MAAAA,EACAJ,QAAAA,IAMA,IAAOF,SAAkBM,EAAMa,QAAQ,CAACC,OAAQ,iBAChD,IAAKpB,EACH,MAAMqB,MAAU,qDAsBlB,aAAaC,EAAAA,uBAA2B,CAACX,OAAAA,EAAQE,OAAQ,CAfpC,CACnBU,KAAM,QACNC,OAAQ,QACRxB,QAASA,EACTyB,KAAMP,OAAQQ,KAAAA,WAGYpB,EAAMa,QAAQ,CACpCC,OAAQ,iBACRO,OAAQ,CAACD,OAM0DxB,QAASA,GACpF,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AAclB,QAAQ,CAEpBC,OAAQ,+BACRO,OAAQ,OAGZ,IAAK6B,EAAMM,gBAAkBL,EAC3B,MAAMpC,MAAU,uDAElB,MAAO,CACL0C,aACE,KAACP,EAAMM,cAAwB,KAAOE,OAAOP,EAA6BQ,YAC5EC,qBAAsBF,OAAOP,EAA6BQ,YAE9D,CAAO,CAGL,IAAME,QAAgB1D,EAAasC,qBAC7BqB,EAAanC,EAAWiB,SAAS,8BAAgC,KAAO,KAC9E,MAAO,IACFiB,EACHJ,aAAcV,EAASU,aAAeK,EAAc,KACpDF,qBAAuBC,EAAQD,qBAAuBE,EAAc,KAExE,KAGN"}
@@ -1,2 +1,2 @@
1
- "use strict";var t=require("uuid");exports.SolanaClient=class{async invokeRpc({method:e,params:n}){let r=await fetch(this.cluster.rpcUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:t.v4(),method:e,params:n})});return await r.json()}async getBalance(t){try{let e=await this.invokeRpc({method:"getBalance",params:[t]});return e.error?null:BigInt(e.result.value)}catch(t){return null}}async getTokenAccountsByOwner(t,e){try{let n=await this.invokeRpc({method:"getTokenAccountsByOwner",params:[t,{mint:e},{encoding:"jsonParsed"}]});if(n.error)return null;let r=n.result.value.at(0)?.account?.data?.parsed?.info?.tokenAmount;return r?{amount:BigInt(r.amount),decimals:r.decimals}:null}catch(t){return null}}async getAccountInfo(t){try{let e=await this.invokeRpc({method:"getAccountInfo",params:[t,{encoding:"jsonParsed"}]});if(e.error)return null;let n=e.result.value?.data?.parsed?.info;return n?{decimals:n.decimals}:null}catch(t){return null}}constructor(t){this.cluster=t}};
1
+ "use strict";var t=require("../crypto/resolve.js");exports.SolanaClient=class{async invokeRpc({method:t,params:e}){let n=await fetch(this.cluster.rpcUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:this._crypto.randomUUID(),method:t,params:e})});return await n.json()}async getBalance(t){try{let e=await this.invokeRpc({method:"getBalance",params:[t]});return e.error?null:BigInt(e.result.value)}catch(t){return null}}async getTokenAccountsByOwner(t,e){try{let n=await this.invokeRpc({method:"getTokenAccountsByOwner",params:[t,{mint:e},{encoding:"jsonParsed"}]});if(n.error)return null;let r=n.result.value.at(0)?.account?.data?.parsed?.info?.tokenAmount;return r?{amount:BigInt(r.amount),decimals:r.decimals}:null}catch(t){return null}}async getAccountInfo(t){try{let e=await this.invokeRpc({method:"getAccountInfo",params:[t,{encoding:"jsonParsed"}]});if(e.error)return null;let n=e.result.value?.data?.parsed?.info;return n?{decimals:n.decimals}:null}catch(t){return null}}constructor(e,n){this.cluster=e,this._crypto=t.resolveCryptoFns(n)}};
2
2
  //# sourceMappingURL=client.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","sources":["../../../src/solana/client.ts"],"names":["invokeRpc","method","params","response","fetch","this","cluster","rpcUrl","headers","body","JSON","stringify","jsonrpc","id","uuid","json","getBalance","address","error","BigInt","result","value","getTokenAccountsByOwner","mintAddress","mint","encoding","tokenAmount","at","account","data","parsed","info","amount","decimals","getAccountInfo","tokenInfo","constructor"],"mappings":"wDAuBO,MAOL,eAAcA,EAAcC,OAAAA,EAAQC,OAAAA,IAClC,IAAMC,QAAiBC,MAAMC,KAAKC,QAAQC,OAAQ,CAChDN,OAAQ,OACRO,QAAS,CAAC,eAAgB,oBAC1BC,KAAMC,KAAKC,UAAU,CAACC,QAAS,MAAOC,GAAIC,OAAQb,OAAAA,EAAQC,OAAAA,MAI5D,aADmBC,EAASY,MAE9B,CAEA,gBAAMC,CAAWC,GACf,IACE,IAAMd,QAAiBE,KAAKL,UAAkB,CAACC,OAAQ,aAAcC,OAAQ,CAACe,KAE9E,OAAId,EAASe,MACJ,KAGFC,OAAOhB,EAASiB,OAAOC,MAChC,CAAE,MAAOH,GACP,OAAO,IACT,CACF,CAEA,6BAAMI,CAAwBL,EAAiBM,GAC7C,IACE,IAAMpB,QAAiBE,KAAKL,UAI1B,CACAC,OAAQ,0BACRC,OAAQ,CAACe,EAAS,CAACO,KAAMD,GAAc,CAACE,SAAU,iBAGpD,GAAItB,EAASe,MACX,OAAO,KAGT,IAAMQ,EAAcvB,EAASiB,OAAOC,MAAMM,GAAG,IAAIC,SAASC,MAAMC,QAAQC,MAAML,YAC9E,OAAKA,EAIE,CACLM,OAAQb,OAAOO,EAAYM,QAC3BC,SAAUP,EAAYO,UALf,IAOX,CAAE,MAAOf,GACP,OAAO,IACT,CACF,CAEA,oBAAMgB,CAAejB,GACnB,IACE,IAAMd,QAAiBE,KAAKL,UAEzB,CACDC,OAAQ,iBACRC,OAAQ,CAACe,EAAS,CAACQ,SAAU,iBAG/B,GAAItB,EAASe,MACX,OAAO,KAGT,IAAMiB,EAAYhC,EAASiB,OAAOC,OAAOQ,MAAMC,QAAQC,KACvD,OAAKI,EAIE,CACLF,SAAUE,EAAUF,UAJb,IAMX,CAAE,MAAOf,GACP,OAAO,IACT,CACF,CAlFAkB,WAAAA,CAAY9B,GACVD,KAAKC,QAAUA,CACjB"}
1
+ {"version":3,"file":"client.js","sources":["../../../src/solana/client.ts"],"names":["invokeRpc","method","params","response","fetch","this","cluster","rpcUrl","headers","body","JSON","stringify","jsonrpc","id","_crypto","randomUUID","json","getBalance","address","error","BigInt","result","value","getTokenAccountsByOwner","mintAddress","mint","encoding","tokenAmount","at","account","data","parsed","info","amount","decimals","getAccountInfo","tokenInfo","constructor","crypto","resolveCryptoFns"],"mappings":"wEAuBO,MAUL,eAAcA,EAAcC,OAAAA,EAAQC,OAAAA,IAClC,IAAMC,QAAiBC,MAAMC,KAAKC,QAAQC,OAAQ,CAChDN,OAAQ,OACRO,QAAS,CAAC,eAAgB,oBAC1BC,KAAMC,KAAKC,UAAU,CAACC,QAAS,MAAOC,GAAIR,KAAKS,QAAQC,aAAcd,OAAAA,EAAQC,OAAAA,MAI/E,aADmBC,EAASa,MAE9B,CAEA,gBAAMC,CAAWC,GACf,IACE,IAAMf,QAAiBE,KAAKL,UAAkB,CAACC,OAAQ,aAAcC,OAAQ,CAACgB,KAE9E,OAAIf,EAASgB,MACJ,KAGFC,OAAOjB,EAASkB,OAAOC,MAChC,CAAE,MAAOH,GACP,OAAO,IACT,CACF,CAEA,6BAAMI,CAAwBL,EAAiBM,GAC7C,IACE,IAAMrB,QAAiBE,KAAKL,UAI1B,CACAC,OAAQ,0BACRC,OAAQ,CAACgB,EAAS,CAACO,KAAMD,GAAc,CAACE,SAAU,iBAGpD,GAAIvB,EAASgB,MACX,OAAO,KAGT,IAAMQ,EAAcxB,EAASkB,OAAOC,MAAMM,GAAG,IAAIC,SAASC,MAAMC,QAAQC,MAAML,YAC9E,OAAKA,EAIE,CACLM,OAAQb,OAAOO,EAAYM,QAC3BC,SAAUP,EAAYO,UALf,IAOX,CAAE,MAAOf,GACP,OAAO,IACT,CACF,CAEA,oBAAMgB,CAAejB,GACnB,IACE,IAAMf,QAAiBE,KAAKL,UAEzB,CACDC,OAAQ,iBACRC,OAAQ,CAACgB,EAAS,CAACQ,SAAU,iBAG/B,GAAIvB,EAASgB,MACX,OAAO,KAGT,IAAMiB,EAAYjC,EAASkB,OAAOC,OAAOQ,MAAMC,QAAQC,KACvD,OAAKI,EAIE,CACLF,SAAUE,EAAUF,UAJb,IAMX,CAAE,MAAOf,GACP,OAAO,IACT,CACF,CAnFAkB,WAAAA,CAAY/B,EAA2CgC,GACrDjC,KAAKC,QAAUA,EACfD,KAAKS,QAAUyB,mBAAiBD,EAClC"}
@@ -1,6 +1,6 @@
1
1
  import * as _privy_io_api_types from '@privy-io/api-types';
2
- import { PasskeyAuthenticatorVerifyResponse, LinkedAccountEmbeddedWallet, LinkedAccountEthereumEmbeddedWallet, LinkedAccountSolanaEmbeddedWallet, User, SmartWalletConfiguration, OAuthTokens, LinkedAccountBitcoinSegwitEmbeddedWallet, LinkedAccountBitcoinTaprootEmbeddedWallet, AuthenticatedUser, OAuthProviderID, SmartWalletType, CoinbaseOnRampInitInput, MoonpayOnRampSignInput, MfaPasskeyInitRequestBody, MfaSMSInitRequestBody, LinkedAccount, LinkedAccountSmartWallet, CoinbaseOnRampInitResponse, WalletCreateParams, Wallet, WalletRpcParams, WalletRpcResponse, WalletRawSignParams, RawSignResponse, WalletUpdateParams, LinkedAccountEmbeddedWalletWithID } from '@privy-io/api-types';
3
- export { OAuthProviderID, SmartWalletType } from '@privy-io/api-types';
2
+ import { PasskeyAuthenticatorVerifyResponse, LinkedAccountEmbeddedWallet, LinkedAccountEthereumEmbeddedWallet, LinkedAccountSolanaEmbeddedWallet, User, SmartWalletConfiguration, OAuthTokens, LinkedAccountBitcoinSegwitEmbeddedWallet, LinkedAccountBitcoinTaprootEmbeddedWallet, AuthenticatedUser, OAuthProviderID, SmartWalletType as SmartWalletType$1, CoinbaseOnRampInitInput, MoonpayOnRampSignInput, MfaPasskeyInitRequestBody, MfaSMSInitRequestBody, LinkedAccount, LinkedAccountSmartWallet, CoinbaseOnRampInitResponse, WalletCreateParams, Wallet, WalletRpcParams, WalletRpcResponse, WalletRawSignParams, RawSignResponse, WalletUpdateParams, LinkedAccountEmbeddedWalletWithID } from '@privy-io/api-types';
3
+ export { OAuthProviderID } from '@privy-io/api-types';
4
4
  import { Chain, RpcConfig } from '@privy-io/chains';
5
5
  export * from '@privy-io/chains';
6
6
  import { Route } from '@privy-io/routes';
@@ -430,6 +430,20 @@ type UnsignedTransactionRequest = {
430
430
  }> | Array<[string, Array<string>]> | Record<string, Array<string>>;
431
431
  maxPriorityFeePerGas?: Quantity;
432
432
  maxFeePerGas?: Quantity;
433
+ /** Batch of calls to execute atomically. Required for Tempo transactions. */
434
+ calls?: Array<{
435
+ to: string;
436
+ data?: string;
437
+ value?: Quantity;
438
+ }>;
439
+ /** Token used to pay gas fees for Tempo transactions. */
440
+ feeToken?: string;
441
+ /** 2D nonce key for Tempo transactions (0 = protocol nonce, >0 = user nonces). */
442
+ nonceKey?: Quantity;
443
+ /** Earliest inclusion timestamp for Tempo transactions (seconds since epoch). */
444
+ validAfter?: Quantity;
445
+ /** Expiration timestamp for Tempo transactions (seconds since epoch). */
446
+ validBefore?: Quantity;
433
447
  };
434
448
  /**
435
449
  * {@link UnsignedTransactionRequest} specifies the `chainId` field as optional,
@@ -738,7 +752,17 @@ type PreparedTransactionRequestLegacy = UnsignedTransactionRequest & {
738
752
  type: 0 | 1;
739
753
  gasPrice: Quantity;
740
754
  };
741
- type PreparedTransactionRequest = PreparedTransactionRequestEIP1559 | PreparedTransactionRequestLegacy;
755
+ type PreparedTransactionRequestTempo = UnsignedTransactionRequest & {
756
+ from: string;
757
+ chainId: number;
758
+ type: 118;
759
+ calls: Array<{
760
+ to: string;
761
+ data?: string;
762
+ value?: Quantity;
763
+ }>;
764
+ };
765
+ type PreparedTransactionRequest = PreparedTransactionRequestEIP1559 | PreparedTransactionRequestLegacy | PreparedTransactionRequestTempo;
742
766
 
743
767
  interface Storage {
744
768
  get(key: string): unknown | Promise<unknown>;
@@ -1609,7 +1633,7 @@ declare class SmartWalletApi {
1609
1633
  /**
1610
1634
  * Signature generated against standard [Sign-In With Ethereum](https://eips.ethereum.org/EIPS/eip-4361) message
1611
1635
  */
1612
- message: string, signature: string, smartWalletType: SmartWalletType, smartWalletVersion?: string): Promise<{
1636
+ message: string, signature: string, smartWalletType: SmartWalletType$1, smartWalletVersion?: string): Promise<{
1613
1637
  user: _privy_io_api_types.User;
1614
1638
  identity_token: string | undefined;
1615
1639
  }>;
@@ -2311,13 +2335,20 @@ declare const isSupportedChainIdForCoinbaseOnramp: (chainId: number, asset: "nat
2311
2335
  declare function toCoinbaseBlockchainFromChainId(chainId: number): SupportedBlockchains | undefined;
2312
2336
  declare function toCoinbaseAssetId(chainId: number, asset: 'USDC' | 'native-currency'): CoinbaseAssetId;
2313
2337
 
2338
+ /**
2339
+ * Optional overrides accepted at the public API boundary so callers can
2340
+ * supply partial implementations (e.g. only `randomUUID` on React Native).
2341
+ */
2342
+ type CryptoOverrides = Partial<CryptoFns>;
2343
+
2314
2344
  declare class SolanaClient {
2315
2345
  cluster: SolanaCluster & {
2316
2346
  rpcUrl: string;
2317
2347
  };
2348
+ private readonly _crypto;
2318
2349
  constructor(cluster: SolanaCluster & {
2319
2350
  rpcUrl: string;
2320
- });
2351
+ }, crypto?: CryptoOverrides);
2321
2352
  private invokeRpc;
2322
2353
  getBalance(address: string): Promise<bigint | null>;
2323
2354
  getTokenAccountsByOwner(address: string, mintAddress: string): Promise<{
@@ -2799,6 +2830,7 @@ declare class ConnectedStandardSolanaWallet {
2799
2830
  /** @deprecated Use OAuthProviderID instead */
2800
2831
  type OAuthProviderType = OAuthProviderID;
2801
2832
 
2833
+ type SmartWalletType = SmartWalletType$1 | 'nexus';
2802
2834
  /** @deprecated {@link SmartWalletType} is a well-typed union, use the `'biconomy'` literal instead */
2803
2835
  declare const BICONOMY: "biconomy";
2804
2836
  /** @deprecated {@link SmartWalletType} is a well-typed union, use the `'coinbase_smart_wallet'` literal instead */
@@ -2811,6 +2843,8 @@ declare const LIGHT_ACCOUNT: "light_account";
2811
2843
  declare const SAFE: "safe";
2812
2844
  /** @deprecated {@link SmartWalletType} is a well-typed union, use the `'thirdweb'` literal instead */
2813
2845
  declare const THIRDWEB: "thirdweb";
2846
+ /** @deprecated {@link SmartWalletType} is a well-typed union, use the `'nexus'` literal instead */
2847
+ declare const NEXUS: "nexus";
2814
2848
 
2815
- export { ALL_WALLET_CLIENT_TYPES, BICONOMY, COINBASE_SMART_WALLET, ConnectedStandardSolanaWallet, EmbeddedBitcoinWalletProvider, EmbeddedProviderError, InMemoryCache, KERNEL, LIGHT_ACCOUNT, LocalStorage, MoonpayApiError, PrivyApiError, PrivyClientError, PrivyConnectorError, PrivyEmbeddedWalletErrorCode, PrivyProviderRpcError, ProviderErrors, SAFE, SUPPORTED_CONNECTOR_TYPES, SolanaClient, SolanaUsdcAddressMap, THIRDWEB, UsdcAddressMap, addSessionSigners, chainToMoonpayCurrency, countryCodesAndNumbers, create, createErrorFormatter, createSiwsMessage, index as crossApp, Privy as default, index$2 as delegatedActions, errorIndicatesMaxMfaRetries, errorIndicatesMfaCanceled, errorIndicatesMfaRateLimit, errorIndicatesMfaTimeout, errorIndicatesMfaVerificationFailed, errorIndicatesRecoveryIsNeeded, formatLamportsAmount, formatPhoneNumber, formatTokenAmount, formatWalletAddress, formatWeiAmount, fundingMethodToMoonpayPaymentMethod, generateAuthorizationSignature, generateWalletIdempotencyKey, getAllUserEmbeddedBitcoinWallets, getAllUserEmbeddedEthereumWallets, getAllUserEmbeddedSolanaWallets, getCoinbaseOnRampUrl, getEntropyDetailsFromAccount, getEntropyDetailsFromUser, getIsTokenUsdc, getJsonRpcEndpointFromChain, getPhoneCountryCodeAndNumber, getPlaceholderPhoneNumber, getSolanaClusterDisplayName, getSolanaRpcEndpointForCluster, getSolanaUsdcMintAddressForCluster, getUserEmbeddedEthereumWallet, getUserEmbeddedSolanaWallet, getUserEmbeddedWallet, getUserSmartWallet, getWallet, isEmbeddedWalletAccount, isSupportedChainIdForCoinbaseOnramp, isSupportedChainIdForMoonpay, isUnifiedWallet, lastFourDigits, phoneNumberTypingFormatter, rawSign, removeSessionSigners, rpc, throwIfInvalidRecoveryUpgradePath, toCoinbaseAssetId, toCoinbaseBlockchainFromChainId, toObjectKeys, updateWallet, validatePhoneNumber };
2816
- export type { Cluster, CoinbaseAssetId, CoinbaseWalletClientType, ConnectorType, CreateSiwsMessageOpts, EIP1193Provider, EmbeddedWalletClientType, EmbeddedWalletConfig, EmbeddedWalletRecoveryOptions, EntropyIdVerifier, ErrorMessageMap, ExternalWallet, ExternalWalletMetadata, FundingMethod, FundingProvider, GenerateAuthorizationSignatureInput, GenerateAuthorizationSignatureOutput, IdentifierString, InjectedWalletClientType, LogLevel, Logger, MfaMethod, MfaPromise, MfaSubmitArgs, MfaSubmitPromise, MoonpayTransactionStatus, MoonpayTransactionStatusResponse, OAuthProviderType, OnNeedsRecovery, PaymentOption, PreparedTransactionRequest, PrivyEmbeddedSolanaWalletProvider, PrivyEmbeddedWalletProvider, Quantity, SetRecoveryInput, SolanaCluster, SolanaSignAndSendTransactionInput, SolanaSignAndSendTransactionMode, SolanaSignAndSendTransactionOptions, SolanaSignAndSendTransactionOutput, SolanaSignMessageInput, SolanaSignMessageOutput, SolanaSignTransactionInput, SolanaSignTransactionOptions, SolanaSignTransactionOutput, SolanaStandardWallet, SolanaTransactionCommitment, Storage, UnknownWalletClientType, UnsignedTransactionRequest, UnsignedTransactionRequestWithChainId, WalletBranding, WalletClientType, WalletConnectWalletClientType };
2849
+ export { ALL_WALLET_CLIENT_TYPES, BICONOMY, COINBASE_SMART_WALLET, ConnectedStandardSolanaWallet, EmbeddedBitcoinWalletProvider, EmbeddedProviderError, InMemoryCache, KERNEL, LIGHT_ACCOUNT, LocalStorage, MoonpayApiError, NEXUS, PrivyApiError, PrivyClientError, PrivyConnectorError, PrivyEmbeddedWalletErrorCode, PrivyProviderRpcError, ProviderErrors, SAFE, SUPPORTED_CONNECTOR_TYPES, SolanaClient, SolanaUsdcAddressMap, THIRDWEB, UsdcAddressMap, addSessionSigners, chainToMoonpayCurrency, countryCodesAndNumbers, create, createErrorFormatter, createSiwsMessage, index as crossApp, Privy as default, index$2 as delegatedActions, errorIndicatesMaxMfaRetries, errorIndicatesMfaCanceled, errorIndicatesMfaRateLimit, errorIndicatesMfaTimeout, errorIndicatesMfaVerificationFailed, errorIndicatesRecoveryIsNeeded, formatLamportsAmount, formatPhoneNumber, formatTokenAmount, formatWalletAddress, formatWeiAmount, fundingMethodToMoonpayPaymentMethod, generateAuthorizationSignature, generateWalletIdempotencyKey, getAllUserEmbeddedBitcoinWallets, getAllUserEmbeddedEthereumWallets, getAllUserEmbeddedSolanaWallets, getCoinbaseOnRampUrl, getEntropyDetailsFromAccount, getEntropyDetailsFromUser, getIsTokenUsdc, getJsonRpcEndpointFromChain, getPhoneCountryCodeAndNumber, getPlaceholderPhoneNumber, getSolanaClusterDisplayName, getSolanaRpcEndpointForCluster, getSolanaUsdcMintAddressForCluster, getUserEmbeddedEthereumWallet, getUserEmbeddedSolanaWallet, getUserEmbeddedWallet, getUserSmartWallet, getWallet, isEmbeddedWalletAccount, isSupportedChainIdForCoinbaseOnramp, isSupportedChainIdForMoonpay, isUnifiedWallet, lastFourDigits, phoneNumberTypingFormatter, rawSign, removeSessionSigners, rpc, throwIfInvalidRecoveryUpgradePath, toCoinbaseAssetId, toCoinbaseBlockchainFromChainId, toObjectKeys, updateWallet, validatePhoneNumber };
2850
+ export type { Cluster, CoinbaseAssetId, CoinbaseWalletClientType, ConnectorType, CreateSiwsMessageOpts, EIP1193Provider, EmbeddedWalletClientType, EmbeddedWalletConfig, EmbeddedWalletRecoveryOptions, EntropyIdVerifier, ErrorMessageMap, ExternalWallet, ExternalWalletMetadata, FundingMethod, FundingProvider, GenerateAuthorizationSignatureInput, GenerateAuthorizationSignatureOutput, IdentifierString, InjectedWalletClientType, LogLevel, Logger, MfaMethod, MfaPromise, MfaSubmitArgs, MfaSubmitPromise, MoonpayTransactionStatus, MoonpayTransactionStatusResponse, OAuthProviderType, OnNeedsRecovery, PaymentOption, PreparedTransactionRequest, PrivyEmbeddedSolanaWalletProvider, PrivyEmbeddedWalletProvider, Quantity, SetRecoveryInput, SmartWalletType, SolanaCluster, SolanaSignAndSendTransactionInput, SolanaSignAndSendTransactionMode, SolanaSignAndSendTransactionOptions, SolanaSignAndSendTransactionOutput, SolanaSignMessageInput, SolanaSignMessageOutput, SolanaSignTransactionInput, SolanaSignTransactionOptions, SolanaSignTransactionOutput, SolanaStandardWallet, SolanaTransactionCommitment, Storage, UnknownWalletClientType, UnsignedTransactionRequest, UnsignedTransactionRequestWithChainId, WalletBranding, WalletClientType, WalletConnectWalletClientType };
@@ -1,6 +1,6 @@
1
1
  import * as _privy_io_api_types from '@privy-io/api-types';
2
- import { PasskeyAuthenticatorVerifyResponse, LinkedAccountEmbeddedWallet, LinkedAccountEthereumEmbeddedWallet, LinkedAccountSolanaEmbeddedWallet, User, SmartWalletConfiguration, OAuthTokens, LinkedAccountBitcoinSegwitEmbeddedWallet, LinkedAccountBitcoinTaprootEmbeddedWallet, AuthenticatedUser, OAuthProviderID, SmartWalletType, CoinbaseOnRampInitInput, MoonpayOnRampSignInput, MfaPasskeyInitRequestBody, MfaSMSInitRequestBody, LinkedAccount, LinkedAccountSmartWallet, CoinbaseOnRampInitResponse, WalletCreateParams, Wallet, WalletRpcParams, WalletRpcResponse, WalletRawSignParams, RawSignResponse, WalletUpdateParams, LinkedAccountEmbeddedWalletWithID } from '@privy-io/api-types';
3
- export { OAuthProviderID, SmartWalletType } from '@privy-io/api-types';
2
+ import { PasskeyAuthenticatorVerifyResponse, LinkedAccountEmbeddedWallet, LinkedAccountEthereumEmbeddedWallet, LinkedAccountSolanaEmbeddedWallet, User, SmartWalletConfiguration, OAuthTokens, LinkedAccountBitcoinSegwitEmbeddedWallet, LinkedAccountBitcoinTaprootEmbeddedWallet, AuthenticatedUser, OAuthProviderID, SmartWalletType as SmartWalletType$1, CoinbaseOnRampInitInput, MoonpayOnRampSignInput, MfaPasskeyInitRequestBody, MfaSMSInitRequestBody, LinkedAccount, LinkedAccountSmartWallet, CoinbaseOnRampInitResponse, WalletCreateParams, Wallet, WalletRpcParams, WalletRpcResponse, WalletRawSignParams, RawSignResponse, WalletUpdateParams, LinkedAccountEmbeddedWalletWithID } from '@privy-io/api-types';
3
+ export { OAuthProviderID } from '@privy-io/api-types';
4
4
  import { Chain, RpcConfig } from '@privy-io/chains';
5
5
  export * from '@privy-io/chains';
6
6
  import { Route } from '@privy-io/routes';
@@ -430,6 +430,20 @@ type UnsignedTransactionRequest = {
430
430
  }> | Array<[string, Array<string>]> | Record<string, Array<string>>;
431
431
  maxPriorityFeePerGas?: Quantity;
432
432
  maxFeePerGas?: Quantity;
433
+ /** Batch of calls to execute atomically. Required for Tempo transactions. */
434
+ calls?: Array<{
435
+ to: string;
436
+ data?: string;
437
+ value?: Quantity;
438
+ }>;
439
+ /** Token used to pay gas fees for Tempo transactions. */
440
+ feeToken?: string;
441
+ /** 2D nonce key for Tempo transactions (0 = protocol nonce, >0 = user nonces). */
442
+ nonceKey?: Quantity;
443
+ /** Earliest inclusion timestamp for Tempo transactions (seconds since epoch). */
444
+ validAfter?: Quantity;
445
+ /** Expiration timestamp for Tempo transactions (seconds since epoch). */
446
+ validBefore?: Quantity;
433
447
  };
434
448
  /**
435
449
  * {@link UnsignedTransactionRequest} specifies the `chainId` field as optional,
@@ -738,7 +752,17 @@ type PreparedTransactionRequestLegacy = UnsignedTransactionRequest & {
738
752
  type: 0 | 1;
739
753
  gasPrice: Quantity;
740
754
  };
741
- type PreparedTransactionRequest = PreparedTransactionRequestEIP1559 | PreparedTransactionRequestLegacy;
755
+ type PreparedTransactionRequestTempo = UnsignedTransactionRequest & {
756
+ from: string;
757
+ chainId: number;
758
+ type: 118;
759
+ calls: Array<{
760
+ to: string;
761
+ data?: string;
762
+ value?: Quantity;
763
+ }>;
764
+ };
765
+ type PreparedTransactionRequest = PreparedTransactionRequestEIP1559 | PreparedTransactionRequestLegacy | PreparedTransactionRequestTempo;
742
766
 
743
767
  interface Storage {
744
768
  get(key: string): unknown | Promise<unknown>;
@@ -1609,7 +1633,7 @@ declare class SmartWalletApi {
1609
1633
  /**
1610
1634
  * Signature generated against standard [Sign-In With Ethereum](https://eips.ethereum.org/EIPS/eip-4361) message
1611
1635
  */
1612
- message: string, signature: string, smartWalletType: SmartWalletType, smartWalletVersion?: string): Promise<{
1636
+ message: string, signature: string, smartWalletType: SmartWalletType$1, smartWalletVersion?: string): Promise<{
1613
1637
  user: _privy_io_api_types.User;
1614
1638
  identity_token: string | undefined;
1615
1639
  }>;
@@ -2311,13 +2335,20 @@ declare const isSupportedChainIdForCoinbaseOnramp: (chainId: number, asset: "nat
2311
2335
  declare function toCoinbaseBlockchainFromChainId(chainId: number): SupportedBlockchains | undefined;
2312
2336
  declare function toCoinbaseAssetId(chainId: number, asset: 'USDC' | 'native-currency'): CoinbaseAssetId;
2313
2337
 
2338
+ /**
2339
+ * Optional overrides accepted at the public API boundary so callers can
2340
+ * supply partial implementations (e.g. only `randomUUID` on React Native).
2341
+ */
2342
+ type CryptoOverrides = Partial<CryptoFns>;
2343
+
2314
2344
  declare class SolanaClient {
2315
2345
  cluster: SolanaCluster & {
2316
2346
  rpcUrl: string;
2317
2347
  };
2348
+ private readonly _crypto;
2318
2349
  constructor(cluster: SolanaCluster & {
2319
2350
  rpcUrl: string;
2320
- });
2351
+ }, crypto?: CryptoOverrides);
2321
2352
  private invokeRpc;
2322
2353
  getBalance(address: string): Promise<bigint | null>;
2323
2354
  getTokenAccountsByOwner(address: string, mintAddress: string): Promise<{
@@ -2799,6 +2830,7 @@ declare class ConnectedStandardSolanaWallet {
2799
2830
  /** @deprecated Use OAuthProviderID instead */
2800
2831
  type OAuthProviderType = OAuthProviderID;
2801
2832
 
2833
+ type SmartWalletType = SmartWalletType$1 | 'nexus';
2802
2834
  /** @deprecated {@link SmartWalletType} is a well-typed union, use the `'biconomy'` literal instead */
2803
2835
  declare const BICONOMY: "biconomy";
2804
2836
  /** @deprecated {@link SmartWalletType} is a well-typed union, use the `'coinbase_smart_wallet'` literal instead */
@@ -2811,6 +2843,8 @@ declare const LIGHT_ACCOUNT: "light_account";
2811
2843
  declare const SAFE: "safe";
2812
2844
  /** @deprecated {@link SmartWalletType} is a well-typed union, use the `'thirdweb'` literal instead */
2813
2845
  declare const THIRDWEB: "thirdweb";
2846
+ /** @deprecated {@link SmartWalletType} is a well-typed union, use the `'nexus'` literal instead */
2847
+ declare const NEXUS: "nexus";
2814
2848
 
2815
- export { ALL_WALLET_CLIENT_TYPES, BICONOMY, COINBASE_SMART_WALLET, ConnectedStandardSolanaWallet, EmbeddedBitcoinWalletProvider, EmbeddedProviderError, InMemoryCache, KERNEL, LIGHT_ACCOUNT, LocalStorage, MoonpayApiError, PrivyApiError, PrivyClientError, PrivyConnectorError, PrivyEmbeddedWalletErrorCode, PrivyProviderRpcError, ProviderErrors, SAFE, SUPPORTED_CONNECTOR_TYPES, SolanaClient, SolanaUsdcAddressMap, THIRDWEB, UsdcAddressMap, addSessionSigners, chainToMoonpayCurrency, countryCodesAndNumbers, create, createErrorFormatter, createSiwsMessage, index as crossApp, Privy as default, index$2 as delegatedActions, errorIndicatesMaxMfaRetries, errorIndicatesMfaCanceled, errorIndicatesMfaRateLimit, errorIndicatesMfaTimeout, errorIndicatesMfaVerificationFailed, errorIndicatesRecoveryIsNeeded, formatLamportsAmount, formatPhoneNumber, formatTokenAmount, formatWalletAddress, formatWeiAmount, fundingMethodToMoonpayPaymentMethod, generateAuthorizationSignature, generateWalletIdempotencyKey, getAllUserEmbeddedBitcoinWallets, getAllUserEmbeddedEthereumWallets, getAllUserEmbeddedSolanaWallets, getCoinbaseOnRampUrl, getEntropyDetailsFromAccount, getEntropyDetailsFromUser, getIsTokenUsdc, getJsonRpcEndpointFromChain, getPhoneCountryCodeAndNumber, getPlaceholderPhoneNumber, getSolanaClusterDisplayName, getSolanaRpcEndpointForCluster, getSolanaUsdcMintAddressForCluster, getUserEmbeddedEthereumWallet, getUserEmbeddedSolanaWallet, getUserEmbeddedWallet, getUserSmartWallet, getWallet, isEmbeddedWalletAccount, isSupportedChainIdForCoinbaseOnramp, isSupportedChainIdForMoonpay, isUnifiedWallet, lastFourDigits, phoneNumberTypingFormatter, rawSign, removeSessionSigners, rpc, throwIfInvalidRecoveryUpgradePath, toCoinbaseAssetId, toCoinbaseBlockchainFromChainId, toObjectKeys, updateWallet, validatePhoneNumber };
2816
- export type { Cluster, CoinbaseAssetId, CoinbaseWalletClientType, ConnectorType, CreateSiwsMessageOpts, EIP1193Provider, EmbeddedWalletClientType, EmbeddedWalletConfig, EmbeddedWalletRecoveryOptions, EntropyIdVerifier, ErrorMessageMap, ExternalWallet, ExternalWalletMetadata, FundingMethod, FundingProvider, GenerateAuthorizationSignatureInput, GenerateAuthorizationSignatureOutput, IdentifierString, InjectedWalletClientType, LogLevel, Logger, MfaMethod, MfaPromise, MfaSubmitArgs, MfaSubmitPromise, MoonpayTransactionStatus, MoonpayTransactionStatusResponse, OAuthProviderType, OnNeedsRecovery, PaymentOption, PreparedTransactionRequest, PrivyEmbeddedSolanaWalletProvider, PrivyEmbeddedWalletProvider, Quantity, SetRecoveryInput, SolanaCluster, SolanaSignAndSendTransactionInput, SolanaSignAndSendTransactionMode, SolanaSignAndSendTransactionOptions, SolanaSignAndSendTransactionOutput, SolanaSignMessageInput, SolanaSignMessageOutput, SolanaSignTransactionInput, SolanaSignTransactionOptions, SolanaSignTransactionOutput, SolanaStandardWallet, SolanaTransactionCommitment, Storage, UnknownWalletClientType, UnsignedTransactionRequest, UnsignedTransactionRequestWithChainId, WalletBranding, WalletClientType, WalletConnectWalletClientType };
2849
+ export { ALL_WALLET_CLIENT_TYPES, BICONOMY, COINBASE_SMART_WALLET, ConnectedStandardSolanaWallet, EmbeddedBitcoinWalletProvider, EmbeddedProviderError, InMemoryCache, KERNEL, LIGHT_ACCOUNT, LocalStorage, MoonpayApiError, NEXUS, PrivyApiError, PrivyClientError, PrivyConnectorError, PrivyEmbeddedWalletErrorCode, PrivyProviderRpcError, ProviderErrors, SAFE, SUPPORTED_CONNECTOR_TYPES, SolanaClient, SolanaUsdcAddressMap, THIRDWEB, UsdcAddressMap, addSessionSigners, chainToMoonpayCurrency, countryCodesAndNumbers, create, createErrorFormatter, createSiwsMessage, index as crossApp, Privy as default, index$2 as delegatedActions, errorIndicatesMaxMfaRetries, errorIndicatesMfaCanceled, errorIndicatesMfaRateLimit, errorIndicatesMfaTimeout, errorIndicatesMfaVerificationFailed, errorIndicatesRecoveryIsNeeded, formatLamportsAmount, formatPhoneNumber, formatTokenAmount, formatWalletAddress, formatWeiAmount, fundingMethodToMoonpayPaymentMethod, generateAuthorizationSignature, generateWalletIdempotencyKey, getAllUserEmbeddedBitcoinWallets, getAllUserEmbeddedEthereumWallets, getAllUserEmbeddedSolanaWallets, getCoinbaseOnRampUrl, getEntropyDetailsFromAccount, getEntropyDetailsFromUser, getIsTokenUsdc, getJsonRpcEndpointFromChain, getPhoneCountryCodeAndNumber, getPlaceholderPhoneNumber, getSolanaClusterDisplayName, getSolanaRpcEndpointForCluster, getSolanaUsdcMintAddressForCluster, getUserEmbeddedEthereumWallet, getUserEmbeddedSolanaWallet, getUserEmbeddedWallet, getUserSmartWallet, getWallet, isEmbeddedWalletAccount, isSupportedChainIdForCoinbaseOnramp, isSupportedChainIdForMoonpay, isUnifiedWallet, lastFourDigits, phoneNumberTypingFormatter, rawSign, removeSessionSigners, rpc, throwIfInvalidRecoveryUpgradePath, toCoinbaseAssetId, toCoinbaseBlockchainFromChainId, toObjectKeys, updateWallet, validatePhoneNumber };
2850
+ export type { Cluster, CoinbaseAssetId, CoinbaseWalletClientType, ConnectorType, CreateSiwsMessageOpts, EIP1193Provider, EmbeddedWalletClientType, EmbeddedWalletConfig, EmbeddedWalletRecoveryOptions, EntropyIdVerifier, ErrorMessageMap, ExternalWallet, ExternalWalletMetadata, FundingMethod, FundingProvider, GenerateAuthorizationSignatureInput, GenerateAuthorizationSignatureOutput, IdentifierString, InjectedWalletClientType, LogLevel, Logger, MfaMethod, MfaPromise, MfaSubmitArgs, MfaSubmitPromise, MoonpayTransactionStatus, MoonpayTransactionStatusResponse, OAuthProviderType, OnNeedsRecovery, PaymentOption, PreparedTransactionRequest, PrivyEmbeddedSolanaWalletProvider, PrivyEmbeddedWalletProvider, Quantity, SetRecoveryInput, SmartWalletType, SolanaCluster, SolanaSignAndSendTransactionInput, SolanaSignAndSendTransactionMode, SolanaSignAndSendTransactionOptions, SolanaSignAndSendTransactionOutput, SolanaSignMessageInput, SolanaSignMessageOutput, SolanaSignTransactionInput, SolanaSignTransactionOptions, SolanaSignTransactionOutput, SolanaStandardWallet, SolanaTransactionCommitment, Storage, UnknownWalletClientType, UnsignedTransactionRequest, UnsignedTransactionRequestWithChainId, WalletBranding, WalletClientType, WalletConnectWalletClientType };
@@ -1,8 +1,9 @@
1
1
  import { SmartAccountClient } from 'permissionless';
2
2
  import { Transport, Chain, SendTransactionParameters, Hash, SignMessageParameters, Hex, TypedData, SignTypedDataParameters, EIP1193Provider, PublicClient, HttpTransport } from 'viem';
3
3
  import { SmartAccount, SendUserOperationParameters } from 'viem/account-abstraction';
4
- import { SmartWalletType } from '@privy-io/api-types';
4
+ import { SmartWalletType as SmartWalletType$1 } from '@privy-io/api-types';
5
5
 
6
+ type SmartWalletType = SmartWalletType$1 | 'nexus';
6
7
  type Call = {
7
8
  readonly to?: any;
8
9
  readonly value?: any;
@@ -1,8 +1,9 @@
1
1
  import { SmartAccountClient } from 'permissionless';
2
2
  import { Transport, Chain, SendTransactionParameters, Hash, SignMessageParameters, Hex, TypedData, SignTypedDataParameters, EIP1193Provider, PublicClient, HttpTransport } from 'viem';
3
3
  import { SmartAccount, SendUserOperationParameters } from 'viem/account-abstraction';
4
- import { SmartWalletType } from '@privy-io/api-types';
4
+ import { SmartWalletType as SmartWalletType$1 } from '@privy-io/api-types';
5
5
 
6
+ type SmartWalletType = SmartWalletType$1 | 'nexus';
6
7
  type Call = {
7
8
  readonly to?: any;
8
9
  readonly value?: any;
@@ -1,2 +1,2 @@
1
- import{DEFAULT_SUPPORTED_CHAINS as e,dedupeSupportedChains as r}from"@privy-io/chains";import{PrivyClientError as t}from"../Error.mjs";import{EmbeddedBitcoinWalletProvider as o}from"../embedded/EmbeddedBitcoinWalletProvider.mjs";import{errorIndicatesRecoveryIsNeeded as i}from"../embedded/errors.mjs";import{walletCreate as d}from"../embedded/stack/walletCreate.mjs";import{throwIfInvalidRecoveryUpgradePath as a}from"../embedded/utils/index.mjs";import{isUnifiedWallet as s}from"../wallet-api/unified-wallet.mjs";import{EmbeddedWalletProxy as n}from"../embedded/EmbeddedWalletProxy.mjs";import{EmbeddedWalletProvider as c}from"../embedded/EmbeddedWalletProvider.mjs";import{EmbeddedSolanaWalletProvider as l}from"../embedded/EmbeddedSolanaWalletProvider.mjs";import"../embedded/types.mjs";import"../wallet-api/create.mjs";import"@privy-io/routes";import"viem";import"../utils/sleep.mjs";import"../embedded/EventCallbackQueue.mjs";import"../embedded/withMfa.mjs";import"eventemitter3";import"@privy-io/ethereum";import"../embedded/stack/walletRpc.mjs";import"../utils/encodings.mjs";import"../wallet-api/rpc.mjs";import"../wallet-api/generate-authorization-signature.mjs";import"canonicalize";import"@privy-io/encoding";import"../wallet-api/types.mjs";import"../embedded/stack/wallet-api-eth-transaction.mjs";import"../embedded/stack/wallet-api-eth-typed-data.mjs";import"../solana/getWalletPublicKeyFromTransaction.mjs";import"../solana/isVersionedTransaction.mjs";class y{setMessagePoster(e){this._proxy=new n(e,this._mfaPromises),this._mfa.setProxy(this._proxy)}async signWithUserSigner(e){if(!this._proxy)throw Error("Embedded wallet proxy not initialized");let r=await this._privyInternal.getAccessTokenInternal();if(!r)throw new t({error:"User must be logged in to sign a message with the user signer",code:"user_signer_sign_error"});let{signature:o}=await this._proxy.signWithUserSigner({accessToken:r,message:e.message});return{signature:o}}async add(e){if(!this._proxy)throw Error("Embedded wallet proxy not initialized");if("user-controlled-server-wallets-only"===this._privyInternal.config?.embedded_wallet_config.mode)await d({context:{app:this._appApi,fetchPrivyRoute:(...e)=>this._privyInternal.fetch(...e),getCompiledPath:(...e)=>this._privyInternal.getPath(...e)},chainType:e.chainType});else{let r=await this._privyInternal.getAccessTokenInternal();if(!r)throw new t({error:"User must be logged in to create an embedded wallet",code:"embedded_wallet_creation_error"});await this._proxy.addWallet({accessToken:r,...e})}let{user:r}=await this._privyInternal.refreshSession();return{user:r}}async getBitcoinProvider({wallet:e,entropyId:r,entropyIdVerifier:t,recoveryPassword:i,recoveryAccessToken:d,recoverySecretOverride:a}){if(!this._proxy)throw Error("Embedded wallet proxy not initialized");if(!await this._privyInternal.getAccessTokenInternal())throw Error("User must be logged in to create an embedded wallet");return s(e)||await this._load({entropyId:r,entropyIdVerifier:t,wallet:e,recoveryPassword:i,recoveryAccessToken:d,recoverySecretOverride:a}),new o({account:e,privyInternal:this._privyInternal,proxy:this._proxy,entropyId:r,entropyIdVerifier:t})}async create({password:e,recoveryMethod:r,recoveryToken:o,recoveryKey:i,recoverySecretOverride:a,iCloudRecordNameOverride:s,solanaAccount:n,skipCallbacks:c,idempotencyKey:l}){if(!this._proxy)throw Error("Embedded wallet proxy not initialized");if("user-controlled-server-wallets-only"===this._privyInternal.config?.embedded_wallet_config.mode){if(r&&!r.startsWith("privy"))throw new t({error:"User-controlled server wallets do not support custom recovery methods",code:"embedded_wallet_creation_error"});await d({context:{app:this._appApi,fetchPrivyRoute:(...e)=>this._privyInternal.fetch(...e),getCompiledPath:(...e)=>this._privyInternal.getPath(...e)},chainType:"ethereum",idempotencyKey:l})}else{let t;if(t=r||(e?"user-passcode":"privy"),e&&"string"!=typeof e)throw Error("Invalid recovery password, must be a string");if("privy"===t&&this._privyInternal.config?.embedded_wallet_config.require_user_password_on_create)throw Error("Password not provided yet is required by App configuration");let d=await this._privyInternal.getAccessTokenInternal();if(!d)throw Error("User must be logged in to create an embedded wallet");let{address:c}=await this._proxy.create({accessToken:d,recoveryMethod:t,recoveryKey:i,recoveryPassword:e,recoveryAccessToken:o,recoverySecretOverride:a,iCloudRecordNameOverride:s,solanaAddress:n?.address});if(!c)throw Error("Failed to create wallet")}return await this._privyInternal.refreshSession(c)}async createSolana(e){if(!this._proxy)throw new t({error:"Embedded wallet proxy not initialized",code:"embedded_wallet_creation_error"});if("user-controlled-server-wallets-only"===this._privyInternal.config?.embedded_wallet_config.mode)await d({context:{app:this._appApi,fetchPrivyRoute:(...e)=>this._privyInternal.fetch(...e),getCompiledPath:(...e)=>this._privyInternal.getPath(...e)},chainType:"solana",idempotencyKey:e?.idempotencyKey});else{let r=await this._privyInternal.getAccessTokenInternal();if(!r)throw new t({error:"User must be logged in to create an embedded wallet",code:"embedded_wallet_creation_error"});e?.ethereumAccount&&await this.getProvider(e.ethereumAccount);let{publicKey:o}=await this._proxy.createSolana({accessToken:r,ethereumAddress:e?.ethereumAccount?.address});if(!o)throw new t({error:"Failed to create wallet",code:"embedded_wallet_creation_error"})}return await this._privyInternal.refreshSession()}async delegateWallets({delegatedWallets:e,rootWallet:r}){if(!this._proxy)throw new t({error:"Embedded wallet proxy not initialized",code:"embedded_wallet_creation_error"});let o=await this._privyInternal.getAccessTokenInternal();if(!o)throw new t({error:"User must be logged in to create an embedded wallet",code:"embedded_wallet_creation_error"});await this._proxy.delegateWallets({accessToken:o,delegatedWallets:e,rootWallet:r})}async getProvider(e,r,t,o,i){if(!this._proxy)throw Error("Embedded wallet proxy not initialized");return s(e)||await this._load({wallet:e,entropyId:e.address,entropyIdVerifier:"ethereum-address-verifier",recoveryPassword:r,recoveryKey:i,recoveryAccessToken:t,recoverySecretOverride:o}),new c({account:e,entropyId:e.address,entropyIdVerifier:"ethereum-address-verifier",privyInternal:this._privyInternal,chains:this._chains,walletProxy:this._proxy,appApi:this._appApi})}async getEthereumProvider({wallet:e,entropyId:r,entropyIdVerifier:t,recoveryPassword:o,recoveryAccessToken:i,recoverySecretOverride:d,recoveryKey:a,onNeedsRecovery:n}){if(!this._proxy)throw Error("Embedded wallet proxy not initialized");if(!await this._privyInternal.getAccessTokenInternal())throw Error("User must be logged in to create an embedded wallet");return s(e)||(!n||o||i||d||a)&&await this._load({entropyId:r,entropyIdVerifier:t,wallet:e,recoveryPassword:o,recoveryAccessToken:i,recoverySecretOverride:d,recoveryKey:a}),new c({account:e,entropyId:r,entropyIdVerifier:"ethereum-address-verifier",privyInternal:this._privyInternal,chains:this._chains,walletProxy:this._proxy,onNeedsRecovery:n,appApi:this._appApi})}async getSolanaProvider(e,r,o,i,d,a,n){if(!this._proxy)throw new t({error:"Embedded wallet proxy not initialized",code:"embedded_wallet_webview_not_loaded"});return s(e)||(!n||i||d||a)&&await this._load({wallet:e,entropyId:r,entropyIdVerifier:o,recoveryPassword:i,recoveryAccessToken:d,recoverySecretOverride:a}),new l({account:e,privyInternal:this._privyInternal,proxy:this._proxy,entropyId:r,entropyIdVerifier:o,onNeedsRecovery:n,app:this._appApi})}async setRecovery(e){let{wallet:r,...o}=e;if(!this._proxy)throw Error("Embedded wallet proxy not initialized");if(s(r))throw new t({error:"This wallet does not support setting recovery methods",code:"unsupported_recovery_method"});a({currentRecoveryMethod:r.recovery_method,upgradeToRecoveryMethod:"icloud-native"===o.recoveryMethod?"icloud":o.recoveryMethod}),await this._load("solana"===r.chain_type?{wallet:r,entropyId:r.address,entropyIdVerifier:"solana-address-verifier"}:{wallet:r,entropyId:r.address,entropyIdVerifier:"ethereum-address-verifier"});let i=await this._privyInternal.getAccessTokenInternal();if(!i)throw Error("User must be logged in to interact with embedded wallets");let d=r.recovery_method;this._privyInternal.createAnalyticsEvent("embedded_wallet_sdk_set_recovery_started",{address:r.address,target_recovery_method:o.recoveryMethod,existing_recovery_method:d});try{let e;if("user-passcode"===o.recoveryMethod)e={recoveryMethod:"user-passcode",recoveryPassword:o.password};else if("google-drive"===o.recoveryMethod)e={recoveryMethod:"google-drive",recoveryAccessToken:o.recoveryAccessToken};else if("icloud"===o.recoveryMethod)e={recoveryMethod:"icloud",recoveryAccessToken:o.recoveryAccessToken};else if("icloud-native"===o.recoveryMethod)e={recoveryMethod:"icloud-native",iCloudRecordNameOverride:o.iCloudRecordNameOverride,recoverySecretOverride:o.recoverySecretOverride};else if("recovery-encryption-key"===o.recoveryMethod)e={recoveryMethod:"recovery-encryption-key",recoveryKey:o.recoveryKey};else{if("privy"!==o.recoveryMethod)throw Error(`Unknown recovery method: ${o.recoveryMethod}`);e={recoveryMethod:"privy"}}await this._proxy.setRecovery({accessToken:i,entropyId:r.address,entropyIdVerifier:"solana"===r.chain_type?"solana-address-verifier":"ethereum-address-verifier",...e}),this._privyInternal.createAnalyticsEvent("embedded_wallet_sdk_set_recovery_completed",{address:r.address,target_recovery_method:o.recoveryMethod,existing_recovery_method:d});let{user:t}=await this._privyInternal.refreshSession();return{user:t,provider:"ethereum"!==r.chain_type?null:new c({account:r,entropyId:r.address,entropyIdVerifier:"ethereum-address-verifier",privyInternal:this._privyInternal,chains:this._chains,walletProxy:this._proxy,appApi:this._appApi})}}catch(e){throw this._privyInternal.createAnalyticsEvent("embedded_wallet_sdk_set_recovery_failed",{address:r.address,recovery_method:r.recovery_method,error:e instanceof Error?e.message:"Unable to recover wallet"}),e}}getURL(){let e=new URL(`${this._privyInternal.baseUrl}/apps/${this._privyInternal.appId}/embedded-wallets`);return this._privyInternal.caid&&e.searchParams.append("caid",this._privyInternal.caid),this._privyInternal.appClientId&&e.searchParams.append("client_id",this._privyInternal.appClientId),e.href}get chains(){return this._chains}onMessage(e){if(!this._proxy)throw Error("Embedded wallet proxy not initialized");return this._proxy.handleEmbeddedWalletMessages(e)}reload(){this._proxy?this._proxy.reload():this._privyInternal.logger.warn("Attempted to reload proxy before initialized")}async ping(e){try{if(!this._proxy)throw Error("Embedded wallet proxy not initialized");return await this._proxy.ping(e),!0}catch(e){return this._privyInternal.logger.debug(e),!1}}async _load({entropyId:e,entropyIdVerifier:r,wallet:t,recoveryPassword:o,recoveryKey:d,recoveryAccessToken:a,recoverySecretOverride:s}){if(!this._proxy)throw Error("Embedded wallet proxy not initialized");let n=await this._privyInternal.getAccessTokenInternal();if(!n)throw Error("User must be logged in to interact with embedded wallets");try{return await this._proxy.connect({accessToken:n,entropyId:e,entropyIdVerifier:r}),e}catch(c){if(i(c))try{if("privy"===t.recovery_method){this._privyInternal.createAnalyticsEvent("embedded_wallet_sdk_recovery_started",{address:t.address,recovery_method:t.recovery_method});let o=await this._proxy.recover({accessToken:n,entropyId:e,entropyIdVerifier:r});return this._privyInternal.createAnalyticsEvent("embedded_wallet_sdk_recovery_completed",{address:t.address,recovery_method:t.recovery_method}),o.entropyId}if("user-passcode"===t.recovery_method&&o){this._privyInternal.createAnalyticsEvent("embedded_wallet_sdk_recovery_started",{address:t.address,recovery_method:t.recovery_method});let i=await this._proxy.recover({accessToken:n,recoveryPassword:o,entropyId:e,entropyIdVerifier:r});return this._privyInternal.createAnalyticsEvent("embedded_wallet_sdk_recovery_completed",{address:t.address,recovery_method:t.recovery_method}),i.entropyId}if(["google-drive","icloud"].includes(t.recovery_method)&&a){this._privyInternal.createAnalyticsEvent("embedded_wallet_sdk_recovery_started",{address:t.address,recovery_method:t.recovery_method});let o=await this._proxy.recover({accessToken:n,recoveryAccessToken:a,entropyId:e,entropyIdVerifier:r});return this._privyInternal.createAnalyticsEvent("embedded_wallet_sdk_recovery_completed",{address:t.address,recovery_method:t.recovery_method}),o.entropyId}if("icloud"===t.recovery_method&&s){this._privyInternal.createAnalyticsEvent("embedded_wallet_sdk_recovery_started",{address:t.address,recovery_method:"icloud-native"});let o=await this._proxy.recover({accessToken:n,recoverySecretOverride:s,entropyId:e,entropyIdVerifier:r});return this._privyInternal.createAnalyticsEvent("embedded_wallet_sdk_recovery_completed",{address:t.address,recovery_method:"icloud-native"}),o.entropyId}if("recovery-encryption-key"===t.recovery_method&&d){this._privyInternal.createAnalyticsEvent("embedded_wallet_sdk_recovery_started",{address:t.address,recovery_method:t.recovery_method});let o=await this._proxy.recover({accessToken:n,recoveryKey:d,entropyId:e,entropyIdVerifier:r});return this._privyInternal.createAnalyticsEvent("embedded_wallet_sdk_recovery_completed",{address:t.address,recovery_method:t.recovery_method}),o.entropyId}}catch(r){throw this._privyInternal.createAnalyticsEvent("embedded_wallet_sdk_recovery_failed",{address:t.address,recovery_method:t.recovery_method,error:r instanceof Error?r.message:`Unable to recover wallet: ${e}`}),r}throw c}}constructor(t,o,i,d,a,s){if(this._chains=Array.from(e),this._privyInternal=t,o&&(this._proxy=new n(o,a),d.setProxy(this._proxy)),i){let e=r(i);this._chains=e}this._mfa=d,this._mfaPromises=a,this._appApi=s}}export{y as default};
1
+ import{DEFAULT_SUPPORTED_CHAINS as e,dedupeSupportedChains as r}from"@privy-io/chains";import{PrivyClientError as t}from"../Error.mjs";import{EmbeddedBitcoinWalletProvider as o}from"../embedded/EmbeddedBitcoinWalletProvider.mjs";import{errorIndicatesRecoveryIsNeeded as i}from"../embedded/errors.mjs";import{walletCreate as d}from"../embedded/stack/walletCreate.mjs";import{throwIfInvalidRecoveryUpgradePath as a}from"../embedded/utils/index.mjs";import{isUnifiedWallet as s}from"../wallet-api/unified-wallet.mjs";import{EmbeddedWalletProxy as n}from"../embedded/EmbeddedWalletProxy.mjs";import{EmbeddedWalletProvider as c}from"../embedded/EmbeddedWalletProvider.mjs";import{EmbeddedSolanaWalletProvider as l}from"../embedded/EmbeddedSolanaWalletProvider.mjs";import"../embedded/types.mjs";import"../wallet-api/create.mjs";import"@privy-io/routes";import"viem";import"viem/chains";import"../utils/sleep.mjs";import"../embedded/EventCallbackQueue.mjs";import"../embedded/withMfa.mjs";import"eventemitter3";import"@privy-io/ethereum";import"../embedded/stack/walletRpc.mjs";import"../utils/encodings.mjs";import"../wallet-api/rpc.mjs";import"../wallet-api/generate-authorization-signature.mjs";import"canonicalize";import"@privy-io/encoding";import"../wallet-api/types.mjs";import"../embedded/stack/wallet-api-eth-transaction.mjs";import"../embedded/stack/wallet-api-eth-typed-data.mjs";import"../solana/getWalletPublicKeyFromTransaction.mjs";import"../solana/isVersionedTransaction.mjs";class y{setMessagePoster(e){this._proxy=new n(e,this._mfaPromises),this._mfa.setProxy(this._proxy)}async signWithUserSigner(e){if(!this._proxy)throw Error("Embedded wallet proxy not initialized");let r=await this._privyInternal.getAccessTokenInternal();if(!r)throw new t({error:"User must be logged in to sign a message with the user signer",code:"user_signer_sign_error"});let{signature:o}=await this._proxy.signWithUserSigner({accessToken:r,message:e.message});return{signature:o}}async add(e){if(!this._proxy)throw Error("Embedded wallet proxy not initialized");if("user-controlled-server-wallets-only"===this._privyInternal.config?.embedded_wallet_config.mode)await d({context:{app:this._appApi,fetchPrivyRoute:(...e)=>this._privyInternal.fetch(...e),getCompiledPath:(...e)=>this._privyInternal.getPath(...e)},chainType:e.chainType});else{let r=await this._privyInternal.getAccessTokenInternal();if(!r)throw new t({error:"User must be logged in to create an embedded wallet",code:"embedded_wallet_creation_error"});await this._proxy.addWallet({accessToken:r,...e})}let{user:r}=await this._privyInternal.refreshSession();return{user:r}}async getBitcoinProvider({wallet:e,entropyId:r,entropyIdVerifier:t,recoveryPassword:i,recoveryAccessToken:d,recoverySecretOverride:a}){if(!this._proxy)throw Error("Embedded wallet proxy not initialized");if(!await this._privyInternal.getAccessTokenInternal())throw Error("User must be logged in to create an embedded wallet");return s(e)||await this._load({entropyId:r,entropyIdVerifier:t,wallet:e,recoveryPassword:i,recoveryAccessToken:d,recoverySecretOverride:a}),new o({account:e,privyInternal:this._privyInternal,proxy:this._proxy,entropyId:r,entropyIdVerifier:t})}async create({password:e,recoveryMethod:r,recoveryToken:o,recoveryKey:i,recoverySecretOverride:a,iCloudRecordNameOverride:s,solanaAccount:n,skipCallbacks:c,idempotencyKey:l}){if(!this._proxy)throw Error("Embedded wallet proxy not initialized");if("user-controlled-server-wallets-only"===this._privyInternal.config?.embedded_wallet_config.mode){if(r&&!r.startsWith("privy"))throw new t({error:"User-controlled server wallets do not support custom recovery methods",code:"embedded_wallet_creation_error"});await d({context:{app:this._appApi,fetchPrivyRoute:(...e)=>this._privyInternal.fetch(...e),getCompiledPath:(...e)=>this._privyInternal.getPath(...e)},chainType:"ethereum",idempotencyKey:l})}else{let t;if(t=r||(e?"user-passcode":"privy"),e&&"string"!=typeof e)throw Error("Invalid recovery password, must be a string");if("privy"===t&&this._privyInternal.config?.embedded_wallet_config.require_user_password_on_create)throw Error("Password not provided yet is required by App configuration");let d=await this._privyInternal.getAccessTokenInternal();if(!d)throw Error("User must be logged in to create an embedded wallet");let{address:c}=await this._proxy.create({accessToken:d,recoveryMethod:t,recoveryKey:i,recoveryPassword:e,recoveryAccessToken:o,recoverySecretOverride:a,iCloudRecordNameOverride:s,solanaAddress:n?.address});if(!c)throw Error("Failed to create wallet")}return await this._privyInternal.refreshSession(c)}async createSolana(e){if(!this._proxy)throw new t({error:"Embedded wallet proxy not initialized",code:"embedded_wallet_creation_error"});if("user-controlled-server-wallets-only"===this._privyInternal.config?.embedded_wallet_config.mode)await d({context:{app:this._appApi,fetchPrivyRoute:(...e)=>this._privyInternal.fetch(...e),getCompiledPath:(...e)=>this._privyInternal.getPath(...e)},chainType:"solana",idempotencyKey:e?.idempotencyKey});else{let r=await this._privyInternal.getAccessTokenInternal();if(!r)throw new t({error:"User must be logged in to create an embedded wallet",code:"embedded_wallet_creation_error"});e?.ethereumAccount&&await this.getProvider(e.ethereumAccount);let{publicKey:o}=await this._proxy.createSolana({accessToken:r,ethereumAddress:e?.ethereumAccount?.address});if(!o)throw new t({error:"Failed to create wallet",code:"embedded_wallet_creation_error"})}return await this._privyInternal.refreshSession()}async delegateWallets({delegatedWallets:e,rootWallet:r}){if(!this._proxy)throw new t({error:"Embedded wallet proxy not initialized",code:"embedded_wallet_creation_error"});let o=await this._privyInternal.getAccessTokenInternal();if(!o)throw new t({error:"User must be logged in to create an embedded wallet",code:"embedded_wallet_creation_error"});await this._proxy.delegateWallets({accessToken:o,delegatedWallets:e,rootWallet:r})}async getProvider(e,r,t,o,i){if(!this._proxy)throw Error("Embedded wallet proxy not initialized");return s(e)||await this._load({wallet:e,entropyId:e.address,entropyIdVerifier:"ethereum-address-verifier",recoveryPassword:r,recoveryKey:i,recoveryAccessToken:t,recoverySecretOverride:o}),new c({account:e,entropyId:e.address,entropyIdVerifier:"ethereum-address-verifier",privyInternal:this._privyInternal,chains:this._chains,walletProxy:this._proxy,appApi:this._appApi})}async getEthereumProvider({wallet:e,entropyId:r,entropyIdVerifier:t,recoveryPassword:o,recoveryAccessToken:i,recoverySecretOverride:d,recoveryKey:a,onNeedsRecovery:n}){if(!this._proxy)throw Error("Embedded wallet proxy not initialized");if(!await this._privyInternal.getAccessTokenInternal())throw Error("User must be logged in to create an embedded wallet");return s(e)||(!n||o||i||d||a)&&await this._load({entropyId:r,entropyIdVerifier:t,wallet:e,recoveryPassword:o,recoveryAccessToken:i,recoverySecretOverride:d,recoveryKey:a}),new c({account:e,entropyId:r,entropyIdVerifier:"ethereum-address-verifier",privyInternal:this._privyInternal,chains:this._chains,walletProxy:this._proxy,onNeedsRecovery:n,appApi:this._appApi})}async getSolanaProvider(e,r,o,i,d,a,n){if(!this._proxy)throw new t({error:"Embedded wallet proxy not initialized",code:"embedded_wallet_webview_not_loaded"});return s(e)||(!n||i||d||a)&&await this._load({wallet:e,entropyId:r,entropyIdVerifier:o,recoveryPassword:i,recoveryAccessToken:d,recoverySecretOverride:a}),new l({account:e,privyInternal:this._privyInternal,proxy:this._proxy,entropyId:r,entropyIdVerifier:o,onNeedsRecovery:n,app:this._appApi})}async setRecovery(e){let{wallet:r,...o}=e;if(!this._proxy)throw Error("Embedded wallet proxy not initialized");if(s(r))throw new t({error:"This wallet does not support setting recovery methods",code:"unsupported_recovery_method"});a({currentRecoveryMethod:r.recovery_method,upgradeToRecoveryMethod:"icloud-native"===o.recoveryMethod?"icloud":o.recoveryMethod}),await this._load("solana"===r.chain_type?{wallet:r,entropyId:r.address,entropyIdVerifier:"solana-address-verifier"}:{wallet:r,entropyId:r.address,entropyIdVerifier:"ethereum-address-verifier"});let i=await this._privyInternal.getAccessTokenInternal();if(!i)throw Error("User must be logged in to interact with embedded wallets");let d=r.recovery_method;this._privyInternal.createAnalyticsEvent("embedded_wallet_sdk_set_recovery_started",{address:r.address,target_recovery_method:o.recoveryMethod,existing_recovery_method:d});try{let e;if("user-passcode"===o.recoveryMethod)e={recoveryMethod:"user-passcode",recoveryPassword:o.password};else if("google-drive"===o.recoveryMethod)e={recoveryMethod:"google-drive",recoveryAccessToken:o.recoveryAccessToken};else if("icloud"===o.recoveryMethod)e={recoveryMethod:"icloud",recoveryAccessToken:o.recoveryAccessToken};else if("icloud-native"===o.recoveryMethod)e={recoveryMethod:"icloud-native",iCloudRecordNameOverride:o.iCloudRecordNameOverride,recoverySecretOverride:o.recoverySecretOverride};else if("recovery-encryption-key"===o.recoveryMethod)e={recoveryMethod:"recovery-encryption-key",recoveryKey:o.recoveryKey};else{if("privy"!==o.recoveryMethod)throw Error(`Unknown recovery method: ${o.recoveryMethod}`);e={recoveryMethod:"privy"}}await this._proxy.setRecovery({accessToken:i,entropyId:r.address,entropyIdVerifier:"solana"===r.chain_type?"solana-address-verifier":"ethereum-address-verifier",...e}),this._privyInternal.createAnalyticsEvent("embedded_wallet_sdk_set_recovery_completed",{address:r.address,target_recovery_method:o.recoveryMethod,existing_recovery_method:d});let{user:t}=await this._privyInternal.refreshSession();return{user:t,provider:"ethereum"!==r.chain_type?null:new c({account:r,entropyId:r.address,entropyIdVerifier:"ethereum-address-verifier",privyInternal:this._privyInternal,chains:this._chains,walletProxy:this._proxy,appApi:this._appApi})}}catch(e){throw this._privyInternal.createAnalyticsEvent("embedded_wallet_sdk_set_recovery_failed",{address:r.address,recovery_method:r.recovery_method,error:e instanceof Error?e.message:"Unable to recover wallet"}),e}}getURL(){let e=new URL(`${this._privyInternal.baseUrl}/apps/${this._privyInternal.appId}/embedded-wallets`);return this._privyInternal.caid&&e.searchParams.append("caid",this._privyInternal.caid),this._privyInternal.appClientId&&e.searchParams.append("client_id",this._privyInternal.appClientId),e.href}get chains(){return this._chains}onMessage(e){if(!this._proxy)throw Error("Embedded wallet proxy not initialized");return this._proxy.handleEmbeddedWalletMessages(e)}reload(){this._proxy?this._proxy.reload():this._privyInternal.logger.warn("Attempted to reload proxy before initialized")}async ping(e){try{if(!this._proxy)throw Error("Embedded wallet proxy not initialized");return await this._proxy.ping(e),!0}catch(e){return this._privyInternal.logger.debug(e),!1}}async _load({entropyId:e,entropyIdVerifier:r,wallet:t,recoveryPassword:o,recoveryKey:d,recoveryAccessToken:a,recoverySecretOverride:s}){if(!this._proxy)throw Error("Embedded wallet proxy not initialized");let n=await this._privyInternal.getAccessTokenInternal();if(!n)throw Error("User must be logged in to interact with embedded wallets");try{return await this._proxy.connect({accessToken:n,entropyId:e,entropyIdVerifier:r}),e}catch(c){if(i(c))try{if("privy"===t.recovery_method){this._privyInternal.createAnalyticsEvent("embedded_wallet_sdk_recovery_started",{address:t.address,recovery_method:t.recovery_method});let o=await this._proxy.recover({accessToken:n,entropyId:e,entropyIdVerifier:r});return this._privyInternal.createAnalyticsEvent("embedded_wallet_sdk_recovery_completed",{address:t.address,recovery_method:t.recovery_method}),o.entropyId}if("user-passcode"===t.recovery_method&&o){this._privyInternal.createAnalyticsEvent("embedded_wallet_sdk_recovery_started",{address:t.address,recovery_method:t.recovery_method});let i=await this._proxy.recover({accessToken:n,recoveryPassword:o,entropyId:e,entropyIdVerifier:r});return this._privyInternal.createAnalyticsEvent("embedded_wallet_sdk_recovery_completed",{address:t.address,recovery_method:t.recovery_method}),i.entropyId}if(["google-drive","icloud"].includes(t.recovery_method)&&a){this._privyInternal.createAnalyticsEvent("embedded_wallet_sdk_recovery_started",{address:t.address,recovery_method:t.recovery_method});let o=await this._proxy.recover({accessToken:n,recoveryAccessToken:a,entropyId:e,entropyIdVerifier:r});return this._privyInternal.createAnalyticsEvent("embedded_wallet_sdk_recovery_completed",{address:t.address,recovery_method:t.recovery_method}),o.entropyId}if("icloud"===t.recovery_method&&s){this._privyInternal.createAnalyticsEvent("embedded_wallet_sdk_recovery_started",{address:t.address,recovery_method:"icloud-native"});let o=await this._proxy.recover({accessToken:n,recoverySecretOverride:s,entropyId:e,entropyIdVerifier:r});return this._privyInternal.createAnalyticsEvent("embedded_wallet_sdk_recovery_completed",{address:t.address,recovery_method:"icloud-native"}),o.entropyId}if("recovery-encryption-key"===t.recovery_method&&d){this._privyInternal.createAnalyticsEvent("embedded_wallet_sdk_recovery_started",{address:t.address,recovery_method:t.recovery_method});let o=await this._proxy.recover({accessToken:n,recoveryKey:d,entropyId:e,entropyIdVerifier:r});return this._privyInternal.createAnalyticsEvent("embedded_wallet_sdk_recovery_completed",{address:t.address,recovery_method:t.recovery_method}),o.entropyId}}catch(r){throw this._privyInternal.createAnalyticsEvent("embedded_wallet_sdk_recovery_failed",{address:t.address,recovery_method:t.recovery_method,error:r instanceof Error?r.message:`Unable to recover wallet: ${e}`}),r}throw c}}constructor(t,o,i,d,a,s){if(this._chains=Array.from(e),this._privyInternal=t,o&&(this._proxy=new n(o,a),d.setProxy(this._proxy)),i){let e=r(i);this._chains=e}this._mfa=d,this._mfaPromises=a,this._appApi=s}}export{y as default};
2
2
  //# sourceMappingURL=EmbeddedWalletApi.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"EmbeddedWalletApi.mjs","sources":["../../../src/client/EmbeddedWalletApi.ts"],"names":["EmbeddedWalletApi","setMessagePoster","poster","this","_proxy","EmbeddedWalletProxy","_mfaPromises","_mfa","setProxy","signWithUserSigner","opts","Error","accessToken","_privyInternal","getAccessTokenInternal","PrivyClientError","error","code","signature","message","add","config","embedded_wallet_config","mode","walletCreate","context","app","_appApi","fetchPrivyRoute","args","fetch","getCompiledPath","getPath","chainType","addWallet","user","refreshSession","getBitcoinProvider","wallet","entropyId","entropyIdVerifier","recoveryPassword","recoveryAccessToken","recoverySecretOverride","isUnifiedWallet","_load","EmbeddedBitcoinWalletProvider","account","privyInternal","proxy","create","password","recoveryMethod","recoveryToken","recoveryKey","iCloudRecordNameOverride","solanaAccount","skipCallbacks","idempotencyKey","walletMode","startsWith","parsedRecoveryMethod","require_user_password_on_create","address","solanaAddress","createSolana","ethereumAccount","getProvider","publicKey","ethereumAddress","delegateWallets","delegatedWallets","rootWallet","EmbeddedWalletProvider","chains","_chains","walletProxy","appApi","getEthereumProvider","onNeedsRecovery","getSolanaProvider","EmbeddedSolanaWalletProvider","setRecovery","setRecoveryInput","recoveryArgs","throwIfInvalidRecoveryUpgradePath","currentRecoveryMethod","recovery_method","upgradeToRecoveryMethod","chain_type","existingRecoveryMethod","createAnalyticsEvent","target_recovery_method","existing_recovery_method","recoveryOnlyArgs","provider","e","getURL","url","URL","baseUrl","appId","caid","searchParams","append","appClientId","href","onMessage","event","handleEmbeddedWalletMessages","reload","logger","warn","ping","timeoutMs","debug","connect","err","errorIndicatesRecoveryIsNeeded","recovered","recover","includes","constructor","embeddedWalletMessagePoster","mfa","mfaPromises","Array","from","DEFAULT_SUPPORTED_CHAINS","dedupedChains","dedupeSupportedChains"],"mappings":"07CAmEe,MAAMA,EAoEZC,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EAAOyB,QAChBwB,gBAAiBjD,EAAOiD,gBACxBvE,MAAOgF,aAAarF,MAAQqF,EAAE7E,QAAU,6BAA6BoB,MAEjEyD,CACR,CAKA,MAAMqB,CAEV,CACF,CAz6BAK,WAAAA,CACE1E,EACA2E,EACAjD,EACAkD,EACAC,EACAhD,GASA,GAtCD1E,KACOwE,QAAgCmD,MAAMC,KAC5CC,GA6BA7H,KAAKU,eAAiBmC,EAElB2E,IACFxH,KAAKC,OAAS,IAAIC,EAAoBsH,EAA6BE,GACnED,EAAIpH,SAASL,KAAKC,SAGhBsE,EAAQ,CACV,IAAMuD,EAAgBC,EAAsBxD,GAC5CvE,KAAKwE,QAAUsD,CACjB,CAEA9H,KAAKI,KAAOqH,EACZzH,KAAKG,aAAeuH,EACpB1H,KAAKwB,QAAUkD,CACjB"}
1
+ {"version":3,"file":"EmbeddedWalletApi.mjs","sources":["../../../src/client/EmbeddedWalletApi.ts"],"names":["EmbeddedWalletApi","setMessagePoster","poster","this","_proxy","EmbeddedWalletProxy","_mfaPromises","_mfa","setProxy","signWithUserSigner","opts","Error","accessToken","_privyInternal","getAccessTokenInternal","PrivyClientError","error","code","signature","message","add","config","embedded_wallet_config","mode","walletCreate","context","app","_appApi","fetchPrivyRoute","args","fetch","getCompiledPath","getPath","chainType","addWallet","user","refreshSession","getBitcoinProvider","wallet","entropyId","entropyIdVerifier","recoveryPassword","recoveryAccessToken","recoverySecretOverride","isUnifiedWallet","_load","EmbeddedBitcoinWalletProvider","account","privyInternal","proxy","create","password","recoveryMethod","recoveryToken","recoveryKey","iCloudRecordNameOverride","solanaAccount","skipCallbacks","idempotencyKey","walletMode","startsWith","parsedRecoveryMethod","require_user_password_on_create","address","solanaAddress","createSolana","ethereumAccount","getProvider","publicKey","ethereumAddress","delegateWallets","delegatedWallets","rootWallet","EmbeddedWalletProvider","chains","_chains","walletProxy","appApi","getEthereumProvider","onNeedsRecovery","getSolanaProvider","EmbeddedSolanaWalletProvider","setRecovery","setRecoveryInput","recoveryArgs","throwIfInvalidRecoveryUpgradePath","currentRecoveryMethod","recovery_method","upgradeToRecoveryMethod","chain_type","existingRecoveryMethod","createAnalyticsEvent","target_recovery_method","existing_recovery_method","recoveryOnlyArgs","provider","e","getURL","url","URL","baseUrl","appId","caid","searchParams","append","appClientId","href","onMessage","event","handleEmbeddedWalletMessages","reload","logger","warn","ping","timeoutMs","debug","connect","err","errorIndicatesRecoveryIsNeeded","recovered","recover","includes","constructor","embeddedWalletMessagePoster","mfa","mfaPromises","Array","from","DEFAULT_SUPPORTED_CHAINS","dedupedChains","dedupeSupportedChains"],"mappings":"88CAmEe,MAAMA,EAoEZC,gBAAAA,CAAiBC,GACtBC,KAAKC,OAAS,IAAIC,EAAoBH,EAAQC,KAAKG,cACnDH,KAAKI,KAAKC,SAASL,KAAKC,OAC1B,CAWA,wBAAaK,CAAmBC,GAC9B,IAAKP,KAAKC,OACR,MAAMO,MAAU,yCAGlB,IAAMC,QAAoBT,KAAKU,eAAeC,yBAC9C,IAAKF,EACH,MAAM,IAAIG,EAAiB,CACzBC,MAAO,gEACPC,KAAM,2BAIV,IAAOC,UAAAA,SAAmBf,KAAKC,OAAOK,mBAAmB,CACvDG,YAAAA,EACAO,QAAST,EAAKS,UAGhB,MAAO,CAACD,UAAAA,EACV,CAeA,SAAaE,CAAIV,GAMf,IAAKP,KAAKC,OACR,MAAMO,MAAU,yCAIlB,GAAmB,wCADAR,KAAKU,eAAeQ,QAAQC,uBAAuBC,WAE9DC,EAAa,CACjBC,QAAS,CACPC,IAAKvB,KAAKwB,QACVC,gBAAiB,IAAIC,IAAS1B,KAAKU,eAAeiB,SAASD,GAC3DE,gBAAiB,IAAIF,IAAS1B,KAAKU,eAAemB,WAAWH,IAE/DI,UAAWvB,EAAKuB,gBAEb,CACL,IAAMrB,QAAoBT,KAAKU,eAAeC,yBAC9C,IAAKF,EACH,MAAM,IAAIG,EAAiB,CACzBC,MAAO,sDACPC,KAAM,yCAIJd,KAAKC,OAAO8B,UAAU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