@stridge/kit 0.1.0-alpha.37 → 0.1.0-alpha.39

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 (42) hide show
  1. package/dist/_internal/drivers/stridge/index.d.ts +2 -1
  2. package/dist/_internal/drivers/stridge/index.js +1 -1
  3. package/dist/drivers/stridge/catalog.d.ts +54 -0
  4. package/dist/drivers/stridge/catalog.js +1 -0
  5. package/dist/drivers/stridge/createStridgeDepositDriver.d.ts +9 -0
  6. package/dist/drivers/stridge/createStridgeDepositDriver.js +1 -1
  7. package/dist/drivers/stridge/createStridgeWithdrawDriver.d.ts +8 -0
  8. package/dist/drivers/stridge/createStridgeWithdrawDriver.js +1 -1
  9. package/dist/drivers/stridge/internal/retry.js +1 -0
  10. package/dist/drivers/stridge-mock/createStridgeMockDriver.js +1 -1
  11. package/dist/drivers/stridge-mock/createStridgeMockWithdrawDriver.js +1 -1
  12. package/dist/flows/deposit/dialog/DepositDialog.js +1 -1
  13. package/dist/flows/deposit/dialog/WalletRequiredState.js +1 -0
  14. package/dist/flows/deposit/dialog/WalletRequiredState.styles.js +1 -0
  15. package/dist/flows/deposit/driver/types.d.ts +11 -0
  16. package/dist/flows/deposit/orchestrator/controller.js +1 -1
  17. package/dist/flows/deposit/orchestrator/useDeposit.d.ts +28 -1
  18. package/dist/flows/deposit/orchestrator/useDeposit.js +1 -1
  19. package/dist/flows/withdraw/driver/types.d.ts +7 -0
  20. package/dist/flows/withdraw/orchestrator/controller.js +1 -1
  21. package/dist/flows/withdraw/orchestrator/index.d.ts +1 -1
  22. package/dist/flows/withdraw/orchestrator/useWithdraw.d.ts +19 -1
  23. package/dist/flows/withdraw/orchestrator/useWithdraw.js +1 -1
  24. package/dist/i18n/locales/ar.js +1 -1
  25. package/dist/i18n/locales/es.js +1 -1
  26. package/dist/i18n/locales/source-keys.d.ts +1 -1
  27. package/dist/index.d.ts +5 -5
  28. package/dist/index.js +1 -1
  29. package/dist/package.js +1 -1
  30. package/dist/shared/utils/useDeepMemo.js +1 -0
  31. package/dist/shared/wallet/ConnectWalletContext.d.ts +17 -0
  32. package/dist/shared/wallet/ConnectWalletContext.js +1 -0
  33. package/dist/shared/widgets/asset-picker/compound/components/Asset.d.ts +7 -1
  34. package/dist/shared/widgets/asset-picker/compound/components/Asset.js +1 -1
  35. package/dist/stridge/StridgeProvider.d.ts +65 -89
  36. package/dist/stridge/StridgeProvider.js +1 -1
  37. package/dist/stridge/depositOwner.js +1 -0
  38. package/dist/stridge/stubs.js +1 -1
  39. package/dist/styles/index.css +12 -0
  40. package/package.json +1 -1
  41. package/dist/stridge/StridgeContext.d.ts +0 -29
  42. package/dist/stridge/StridgeContext.js +0 -1
@@ -1 +1 @@
1
- const e=JSON.parse(`{"--OGth":["Depósito exitoso"],"-I_tc5":["Max ",["formattedCap"]],"-nuEh_":["Tiempo estimado"],"-tu7Q8":["Más sobre ",["0"]],"02NghK":["Close this dialog and try again in a moment. If the problem persists, double-check the gateway key on your integration."],"0eg2g7":["Estimando gas…"],"0lHlRj":["En tránsito"],"2Eoi_a":["Ver detalles"],"3dqPLT":["Transferir cripto"],"3eKjkO":["Depósito mínimo de ",["formattedMin"]],"3kg1gB":["Depósito completado"],"3yd3IL":["The deposit driver failed to load gateway configuration."],"5AApJw":["Conecta una billetera para continuar"],"5joj8M":["Desglose de la transacción"],"60ahSE":["Tx del retiro"],"69Gavs":["Technical details"],"6D8qH6":["Envía el token seleccionado en la red elegida a esta dirección. Los fondos aparecerán en tu cuenta cuando la red confirme la transferencia."],"6RDwJM":["Tokens"],"7Bj3x9":["Fallido"],"7evBec":["Tiempo de procesamiento: ",["resolvedProcessingTime"]],"88cUW-":["Recibes"],"9JHY2T":["Tu depósito se acreditó en tu cuenta."],"9XIJb8":["T…"],"9cCjMJ":["Depositar saldo máximo"],"< 1 min":["< 1 min"],"AHyker":["Max ",["0"]],"AO44G_":["Ver recibo"],"AOPSKq":["Depositar ",["0"]],"AWtGgd":["Obtener ayuda"],"AeXO77":["Cuenta"],"AeZIvT":["Recibirás"],"AikETk":["Mín ",["minDeposit"]],"BhQhbU":["Usar la dirección sugerida del destinatario"],"CK1KXz":["Máx"],"Ck1xL4":["Envías"],"D79cZK":["Instantáneo"],"DPfwMq":["Listo"],"Dd7jP5":["¿Tienes problemas?"],"DoS2vD":["Ocultar detalles técnicos"],"ELhVSL":["Failed to submit deposit."],"Ej5HL9":["Signature declined. Please try again."],"Enslfm":["Destino"],"G-SK3q":["El kit encontró un error inesperado y no pudo terminar de renderizar. Vuelve a intentarlo, o cierra este diálogo y reinténtalo desde la aplicación."],"GX8GKD":["Activos"],"GZPxmc":["Enter Valid Recipient Address"],"GcuGHR":["Acreditado a ",["captionSuffix"]],"GwkmPx":["Cambiar el importe mostrado"],"IDt4jm":[["0","plural",{"one":["#"," second"],"other":["#"," seconds"]}]," left on quote"],"IRogzB":["Tu depósito se acreditó a ",["brand"],"."],"KDw4GX":["Reintentar"],"KGoAE6":["Auto · ",["value"]],"KTNWsg":["El retiro falló"],"KuqCAK":["~ 2 min"],"LEbOpR":["Más detalles"],"Ly6geA":["Regenerando cotización…"],"MZ_nQf":["Dirección del destinatario"],"N2DUxS":["Insufficient Balance"],"OLF0i7":["Couldn't load deposit options"],"Offl0a":["Tu depósito se acreditará en tu cuenta."],"Oi8TiZ":["Ver progreso"],"OsyKSt":["Retirar"],"P9fBwv":["Stack"],"PiH3UR":["¡Copiado!"],"Q12Rrs":["Tx depósito"],"QU2cIs":["¿Tienes preguntas?"],"Rxjdjn":["El depósito no se completó"],"SOVBoe":["Copiar dirección de depósito"],"SZRUQ4":["Deslizamiento máximo"],"Sjplg3":["Ver en el explorador"],"SlfejT":["Error"],"TG4WOd":["Tu depósito se acreditará a ",["brand"],"."],"TT0aVH":["Orden enviada"],"Uevt3L":["Estimando cotización"],"UqHbdz":["Descartar aviso de depósito pendiente"],"V1fa9u":["Ver más"],"VAZUpd":["Orden fallida"],"WkRH60":["Mín ",["0"]],"Wqz0SO":["Saldo bajo"],"Z1WbO6":["Los fondos están seguros en la red de origen — contacta a soporte para recuperarlos."],"ZqugiS":["Saldo: ",["0"]," ",["1"]],"_girqu":["Retiro exitoso"],"_kXBrK":["Tiempo total"],"a2WllD":["Token a recibir"],"aiEUrg":["Mostrar detalles técnicos"],"bOZXx5":["Actualizar orden"],"bZnukT":["Costo de red"],"c6Bl9M":["Toggle technical details"],"cGYrpE":["Aplican términos"],"cHPbBJ":["El puente no pudo financiar la transacción de destino (presupuesto de gas agotado)."],"cxR5Qy":["Tx liquidación"],"e3xU5E":["Depósito recibido"],"fKSGnu":["Cantidad mínima requerida para que esta red cubra las tarifas y el enrutamiento."],"fWsBTs":["Algo salió mal. Vuelve a intentarlo."],"flMR3h":["Tus fondos fueron retirados con éxito."],"g2UNkE":["Con tecnología de"],"gfh8CC":["Redes"],"hKMHs1":["Diferencia entre el resultado esperado de la ruta y el precio medio de mercado subyacente."],"he3ygx":["Copiar"],"hehnjM":["Monto"],"i-4Fbp":["Depósito fallido"],"i-EgW-":["El costo estimado para emitir esta transacción en la red de destino."],"iH8pgl":["Atrás"],"junZX6":["Depósito recibido y procesando…"],"kH6wUX":["Impacto en precio"],"kR8ayx":["Al hacer clic en Confirmar depósito, aceptas nuestros <0>términos</0>."],"kUFhUv":["Withdrawal failed."],"kj3M8S":["Depositar"],"kjrq_8":["Más información"],"lOEm_1":["Orden completada"],"ldK3jJ":["Failed to submit withdrawal."],"lxjao1":["La ruta de liquidez seleccionada para liquidar este retiro."],"mgLWEL":["La transacción del tramo de destino se revirtió en cadena."],"mvYQx_":["Detectado"],"njn4bC":["Confirma la transacción en tu billetera"],"nr03QI":["Ingresa la dirección del destinatario"],"nwtY4N":["Algo salió mal"],"oBNGNc":["The route's expected output drifted while your transaction was pending."],"oFmN8a":["Depositar ",["symbol"]],"oW1G8i":["Tus fondos se depositaron correctamente."],"ob8R_m":["Inténtalo nuevamente o contáctanos si el problema persiste."],"ogD_nm":["Depositar a ",["0"]],"olEUh2":["Exitoso"],"pCzTTC":["Tu dirección de depósito"],"q32Nt8":["Retiro completado"],"qQ5VJt":["We can't reach the gateway right now"],"qj0vvX":["Confirmar depósito"],"qtoOYG":["Sin límite"],"rT8e1f":["Ruta"],"rZdp61":["Tx finalización"],"sSiLKx":["Red a recibir"],"sb9Y58":["Billetera"],"sbwbC0":["Método de pago"],"srsA0x":["Withdrawal declined."],"uPo3PQ":["Ver menos"],"vrnnn9":["Procesando"],"w-2VR9":["Retiro en curso…"],"wdxz7K":["Origen"],"xDAtGP":["Message"],"xGVfLh":["Continuar"],"yH9V_J":["Ingresa el monto"],"yrvWai":["Tx origen"],"yxnt3y":["Estado de ejecución"],"yy2rkt":["0x…"],"yz7wBu":["Cerrar"],"zYD5xm":["Acreditando"],"zbtijb":["Depositar ",["0"]," a ",["1"]],"znqB4T":["Saldo insuficiente"],"{hours} hr":[["hours"]," h"],"{minutes} min":[["minutes"]," min"],"{n}h":[["n"],"h"],"{n}m":[["n"],"m"],"{n}s":[["n"],"s"]}`);export{e as messages};
1
+ const e=JSON.parse(`{"--OGth":["Depósito exitoso"],"-I_tc5":["Max ",["formattedCap"]],"-nuEh_":["Tiempo estimado"],"-tu7Q8":["Más sobre ",["0"]],"02NghK":["Close this dialog and try again in a moment. If the problem persists, double-check the gateway key on your integration."],"0eg2g7":["Estimando gas…"],"0lHlRj":["En tránsito"],"2Eoi_a":["Ver detalles"],"3dqPLT":["Transferir cripto"],"3eKjkO":["Depósito mínimo de ",["formattedMin"]],"3kg1gB":["Depósito completado"],"3yd3IL":["The deposit driver failed to load gateway configuration."],"5AApJw":["Conecta una billetera para continuar"],"5joj8M":["Desglose de la transacción"],"60ahSE":["Tx del retiro"],"69Gavs":["Technical details"],"6D8qH6":["Envía el token seleccionado en la red elegida a esta dirección. Los fondos aparecerán en tu cuenta cuando la red confirme la transferencia."],"6RDwJM":["Tokens"],"7Bj3x9":["Fallido"],"7evBec":["Tiempo de procesamiento: ",["resolvedProcessingTime"]],"88cUW-":["Recibes"],"9JHY2T":["Tu depósito se acreditó en tu cuenta."],"9XIJb8":["T…"],"9cCjMJ":["Depositar saldo máximo"],"< 1 min":["< 1 min"],"AHyker":["Max ",["0"]],"AO44G_":["Ver recibo"],"AOPSKq":["Depositar ",["0"]],"AWtGgd":["Obtener ayuda"],"AeXO77":["Cuenta"],"AeZIvT":["Recibirás"],"AikETk":["Mín ",["minDeposit"]],"BhQhbU":["Usar la dirección sugerida del destinatario"],"BoQOH3":["Se requiere una billetera para depositar"],"CK1KXz":["Máx"],"Ck1xL4":["Envías"],"D79cZK":["Instantáneo"],"DPfwMq":["Listo"],"Dd7jP5":["¿Tienes problemas?"],"DoS2vD":["Ocultar detalles técnicos"],"ELhVSL":["Failed to submit deposit."],"Ej5HL9":["Signature declined. Please try again."],"Enslfm":["Destino"],"G-SK3q":["El kit encontró un error inesperado y no pudo terminar de renderizar. Vuelve a intentarlo, o cierra este diálogo y reinténtalo desde la aplicación."],"GX8GKD":["Activos"],"GZPxmc":["Enter Valid Recipient Address"],"GcuGHR":["Acreditado a ",["captionSuffix"]],"GwkmPx":["Cambiar el importe mostrado"],"IDt4jm":[["0","plural",{"one":["#"," second"],"other":["#"," seconds"]}]," left on quote"],"IRogzB":["Tu depósito se acreditó a ",["brand"],"."],"KDw4GX":["Reintentar"],"KGoAE6":["Auto · ",["value"]],"KTNWsg":["El retiro falló"],"KuqCAK":["~ 2 min"],"LEbOpR":["Más detalles"],"Ly6geA":["Regenerando cotización…"],"MZ_nQf":["Dirección del destinatario"],"N2DUxS":["Insufficient Balance"],"OLF0i7":["Couldn't load deposit options"],"Offl0a":["Tu depósito se acreditará en tu cuenta."],"Oi8TiZ":["Ver progreso"],"OsyKSt":["Retirar"],"P9fBwv":["Stack"],"PiH3UR":["¡Copiado!"],"Q12Rrs":["Tx depósito"],"QU2cIs":["¿Tienes preguntas?"],"Rxjdjn":["El depósito no se completó"],"SOVBoe":["Copiar dirección de depósito"],"SZRUQ4":["Deslizamiento máximo"],"Sjplg3":["Ver en el explorador"],"SlfejT":["Error"],"TG4WOd":["Tu depósito se acreditará a ",["brand"],"."],"TT0aVH":["Orden enviada"],"Uevt3L":["Estimando cotización"],"UqHbdz":["Descartar aviso de depósito pendiente"],"V1fa9u":["Ver más"],"VAZUpd":["Orden fallida"],"VHOVEJ":["Conectar billetera"],"WkRH60":["Mín ",["0"]],"Wqz0SO":["Saldo bajo"],"Z1WbO6":["Los fondos están seguros en la red de origen — contacta a soporte para recuperarlos."],"ZqugiS":["Saldo: ",["0"]," ",["1"]],"_girqu":["Retiro exitoso"],"_kXBrK":["Tiempo total"],"a2WllD":["Token a recibir"],"aiEUrg":["Mostrar detalles técnicos"],"bOZXx5":["Actualizar orden"],"bZnukT":["Costo de red"],"c6Bl9M":["Toggle technical details"],"cGYrpE":["Aplican términos"],"cHPbBJ":["El puente no pudo financiar la transacción de destino (presupuesto de gas agotado)."],"cxR5Qy":["Tx liquidación"],"e3xU5E":["Depósito recibido"],"fKSGnu":["Cantidad mínima requerida para que esta red cubra las tarifas y el enrutamiento."],"fWsBTs":["Algo salió mal. Vuelve a intentarlo."],"flMR3h":["Tus fondos fueron retirados con éxito."],"g2UNkE":["Con tecnología de"],"gfh8CC":["Redes"],"hKMHs1":["Diferencia entre el resultado esperado de la ruta y el precio medio de mercado subyacente."],"he3ygx":["Copiar"],"hehnjM":["Monto"],"i-4Fbp":["Depósito fallido"],"i-EgW-":["El costo estimado para emitir esta transacción en la red de destino."],"iH8pgl":["Atrás"],"junZX6":["Depósito recibido y procesando…"],"kH6wUX":["Impacto en precio"],"kR8ayx":["Al hacer clic en Confirmar depósito, aceptas nuestros <0>términos</0>."],"kUFhUv":["Withdrawal failed."],"kj3M8S":["Depositar"],"kjrq_8":["Más información"],"lOEm_1":["Orden completada"],"ldK3jJ":["Failed to submit withdrawal."],"lxjao1":["La ruta de liquidez seleccionada para liquidar este retiro."],"mF_ucv":["Conecta una billetera para que el gateway pueda provisionar una dirección de depósito y enrutar tu transferencia."],"mgLWEL":["La transacción del tramo de destino se revirtió en cadena."],"mvYQx_":["Detectado"],"njn4bC":["Confirma la transacción en tu billetera"],"nr03QI":["Ingresa la dirección del destinatario"],"nwtY4N":["Algo salió mal"],"oBNGNc":["The route's expected output drifted while your transaction was pending."],"oFmN8a":["Depositar ",["symbol"]],"oW1G8i":["Tus fondos se depositaron correctamente."],"ob8R_m":["Inténtalo nuevamente o contáctanos si el problema persiste."],"ogD_nm":["Depositar a ",["0"]],"olEUh2":["Exitoso"],"pCzTTC":["Tu dirección de depósito"],"q32Nt8":["Retiro completado"],"qQ5VJt":["We can't reach the gateway right now"],"qj0vvX":["Confirmar depósito"],"qtoOYG":["Sin límite"],"rT8e1f":["Ruta"],"rZdp61":["Tx finalización"],"sSiLKx":["Red a recibir"],"sb9Y58":["Billetera"],"sbwbC0":["Método de pago"],"srsA0x":["Withdrawal declined."],"uPo3PQ":["Ver menos"],"vrnnn9":["Procesando"],"w-2VR9":["Retiro en curso…"],"wdxz7K":["Origen"],"xDAtGP":["Message"],"xGVfLh":["Continuar"],"yH9V_J":["Ingresa el monto"],"yrvWai":["Tx origen"],"yxnt3y":["Estado de ejecución"],"yy2rkt":["0x…"],"yz7wBu":["Cerrar"],"zYD5xm":["Acreditando"],"zbtijb":["Depositar ",["0"]," a ",["1"]],"znqB4T":["Saldo insuficiente"],"{hours} hr":[["hours"]," h"],"{minutes} min":[["minutes"]," min"],"{n}h":[["n"],"h"],"{n}m":[["n"],"m"],"{n}s":[["n"],"s"]}`);export{e as messages};
@@ -7,6 +7,6 @@
7
7
  * as the typed contract for {@link defineMessages}: callers get autocomplete on every key the
8
8
  * kit translates, and unknown keys fail at compile time via excess-property checks.
9
9
  */
10
- type KitTranslatableKey = "0x…" | "< 1 min" | "Account" | "Amount" | "Assets" | "Auto · {value}" | "Back" | "Balance: {0} {1}" | "By clicking Confirm Deposit, you agree to our <0>terms</0>." | "Chains" | "Close" | "Close this dialog and try again in a moment. If the problem persists, double-check the gateway key on your integration." | "Completion tx" | "Confirm Deposit" | "Confirm transaction in your wallet" | "Connect a wallet to continue" | "Continue" | "Copied!" | "Copy" | "Copy deposit address" | "Couldn't load deposit options" | "Credited to {captionSuffix}" | "Crediting" | "Deposit" | "Deposit completed" | "Deposit didn't complete" | "Deposit failed" | "Deposit max balance" | "Deposit received" | "Deposit received and processing…" | "Deposit successful" | "Deposit to {0}" | "Deposit tx" | "Deposit {0}" | "Deposit {0} to {1}" | "Deposit {symbol}" | "Destination" | "Detected" | "Difference between the route's expected output and the underlying market mid-price." | "Dismiss pending deposit notice" | "Done" | "Enter Amount" | "Enter Recipient Address" | "Enter Valid Recipient Address" | "Error" | "Estimated time" | "Estimating gas…" | "Estimating quote" | "Experiencing problems?" | "Failed" | "Failed to submit deposit." | "Failed to submit withdrawal." | "Fill status" | "Funds are safe on the source chain — contact support to recover." | "Get help" | "Have questions?" | "Hide technical details" | "In transit" | "Instant" | "Insufficient Balance" | "Insufficient balance" | "Low Balance" | "Max" | "Max slippage" | "Max {0}" | "Max {formattedCap}" | "Message" | "Min {0}" | "Min {minDeposit}" | "More about {0}" | "More details" | "More information" | "Network cost" | "No limit" | "Order failed" | "Order filled" | "Order submitted" | "Payment Method" | "Please try again or contact us if the issue persists." | "Powered by" | "Price impact" | "Processing" | "Processing time: {resolvedProcessingTime}" | "Receive chain" | "Receive token" | "Recipient address" | "Regenerating quote…" | "Route" | "See less" | "See more" | "Send the selected token on the selected chain to this address. Funds appear in your account once the network confirms the transfer." | "Settlement tx" | "Show technical details" | "Signature declined. Please try again." | "Something went wrong" | "Something went wrong. Please try again." | "Source" | "Source tx" | "Stack" | "Successful" | "Swap displayed amount" | "Technical details" | "Terms apply" | "The bridge could not fund the destination transaction (gas budget exhausted)." | "The deposit driver failed to load gateway configuration." | "The destination-leg transaction reverted on-chain." | "The estimated cost to broadcast this transaction on the destination chain." | "The kit hit an unexpected error and could not finish rendering. Try again, or close this dialog and retry from the host." | "The minimum amount required for this chain to cover network fees and routing." | "The route's expected output drifted while your transaction was pending." | "The selected liquidity route used to settle this withdrawal." | "Toggle technical details" | "Tokens" | "Total time" | "Transaction breakdown" | "Transfer Crypto" | "Try again" | "T…" | "Update order" | "Use suggested recipient address" | "View details" | "View on Explorer" | "View progress" | "View receipt" | "Wallet" | "We can't reach the gateway right now" | "Withdraw" | "Withdrawal complete" | "Withdrawal declined." | "Withdrawal failed" | "Withdrawal failed." | "Withdrawal in progress…" | "Withdrawal successful" | "Withdrawal tx" | "You receive" | "You send" | "You will receive" | "Your deposit address" | "Your deposit has been credited to your account." | "Your deposit has been credited to {brand}." | "Your deposit will be credited to your account." | "Your deposit will be credited to {brand}." | "Your funds were successfully deposited." | "Your funds were successfully withdrawn." | "{0, plural, one {# second} other {# seconds}} left on quote" | "{formattedMin} minimum deposit" | "{hours} hr" | "{minutes} min" | "{n}h" | "{n}m" | "{n}s" | "~ 2 min";
10
+ type KitTranslatableKey = "0x…" | "< 1 min" | "A wallet is required to deposit" | "Account" | "Amount" | "Assets" | "Auto · {value}" | "Back" | "Balance: {0} {1}" | "By clicking Confirm Deposit, you agree to our <0>terms</0>." | "Chains" | "Close" | "Close this dialog and try again in a moment. If the problem persists, double-check the gateway key on your integration." | "Completion tx" | "Confirm Deposit" | "Confirm transaction in your wallet" | "Connect a wallet so the gateway can provision a deposit address and route your transfer." | "Connect a wallet to continue" | "Connect wallet" | "Continue" | "Copied!" | "Copy" | "Copy deposit address" | "Couldn't load deposit options" | "Credited to {captionSuffix}" | "Crediting" | "Deposit" | "Deposit completed" | "Deposit didn't complete" | "Deposit failed" | "Deposit max balance" | "Deposit received" | "Deposit received and processing…" | "Deposit successful" | "Deposit to {0}" | "Deposit tx" | "Deposit {0}" | "Deposit {0} to {1}" | "Deposit {symbol}" | "Destination" | "Detected" | "Difference between the route's expected output and the underlying market mid-price." | "Dismiss pending deposit notice" | "Done" | "Enter Amount" | "Enter Recipient Address" | "Enter Valid Recipient Address" | "Error" | "Estimated time" | "Estimating gas…" | "Estimating quote" | "Experiencing problems?" | "Failed" | "Failed to submit deposit." | "Failed to submit withdrawal." | "Fill status" | "Funds are safe on the source chain — contact support to recover." | "Get help" | "Have questions?" | "Hide technical details" | "In transit" | "Instant" | "Insufficient Balance" | "Insufficient balance" | "Low Balance" | "Max" | "Max slippage" | "Max {0}" | "Max {formattedCap}" | "Message" | "Min {0}" | "Min {minDeposit}" | "More about {0}" | "More details" | "More information" | "Network cost" | "No limit" | "Order failed" | "Order filled" | "Order submitted" | "Payment Method" | "Please try again or contact us if the issue persists." | "Powered by" | "Price impact" | "Processing" | "Processing time: {resolvedProcessingTime}" | "Receive chain" | "Receive token" | "Recipient address" | "Regenerating quote…" | "Route" | "See less" | "See more" | "Send the selected token on the selected chain to this address. Funds appear in your account once the network confirms the transfer." | "Settlement tx" | "Show technical details" | "Signature declined. Please try again." | "Something went wrong" | "Something went wrong. Please try again." | "Source" | "Source tx" | "Stack" | "Successful" | "Swap displayed amount" | "Technical details" | "Terms apply" | "The bridge could not fund the destination transaction (gas budget exhausted)." | "The deposit driver failed to load gateway configuration." | "The destination-leg transaction reverted on-chain." | "The estimated cost to broadcast this transaction on the destination chain." | "The kit hit an unexpected error and could not finish rendering. Try again, or close this dialog and retry from the host." | "The minimum amount required for this chain to cover network fees and routing." | "The route's expected output drifted while your transaction was pending." | "The selected liquidity route used to settle this withdrawal." | "Toggle technical details" | "Tokens" | "Total time" | "Transaction breakdown" | "Transfer Crypto" | "Try again" | "T…" | "Update order" | "Use suggested recipient address" | "View details" | "View on Explorer" | "View progress" | "View receipt" | "Wallet" | "We can't reach the gateway right now" | "Withdraw" | "Withdrawal complete" | "Withdrawal declined." | "Withdrawal failed" | "Withdrawal failed." | "Withdrawal in progress…" | "Withdrawal successful" | "Withdrawal tx" | "You receive" | "You send" | "You will receive" | "Your deposit address" | "Your deposit has been credited to your account." | "Your deposit has been credited to {brand}." | "Your deposit will be credited to your account." | "Your deposit will be credited to {brand}." | "Your funds were successfully deposited." | "Your funds were successfully withdrawn." | "{0, plural, one {# second} other {# seconds}} left on quote" | "{formattedMin} minimum deposit" | "{hours} hr" | "{minutes} min" | "{n}h" | "{n}m" | "{n}s" | "~ 2 min";
11
11
  //#endregion
12
12
  export { KitTranslatableKey };
package/dist/index.d.ts CHANGED
@@ -30,9 +30,9 @@ import { ChainLogoInput, TokenLogoInput } from "./shared/utils/logos/types.js";
30
30
  import { LogosNamespace, logos } from "./shared/utils/logos/api.js";
31
31
  import { BannerAckBucket, bannerAckStorageKey, bucketFromSettlement, useBannerAck, useBannerAckForSettlement } from "./banners/useBannerAck.js";
32
32
  import { useDepositState } from "./flows/deposit/orchestrator/controller.js";
33
- import { useDeposit, useOptionalDeposit } from "./flows/deposit/orchestrator/useDeposit.js";
33
+ import { useDeposit, useOptionalDeposit, usePrefetchDeposit } from "./flows/deposit/orchestrator/useDeposit.js";
34
34
  import { useWithdrawState } from "./flows/withdraw/orchestrator/controller.js";
35
- import { useOptionalWithdraw, useWithdraw } from "./flows/withdraw/orchestrator/useWithdraw.js";
36
- import { useOptionalStridge, useStridge } from "./stridge/StridgeContext.js";
37
- import { StridgeAppearance, StridgeAsset, StridgeDepositDestination, StridgeDepositFlowConfig, StridgeDepositMethodConfig, StridgeDepositMethodsConfig, StridgeFlowOwner, StridgeProvider, StridgeStorageConfig, StridgeWithdrawFlowConfig } from "./stridge/StridgeProvider.js";
38
- export { type BannerAckBucket, type ChainLogoInput, type ChainLogoMeta, type ChainType, DEFAULT_KIT_STORAGE_NAMESPACE, type DepositActions, type DepositController, type DepositMethod, type DepositMethodConfig, type DepositMethodsConfig, type OpenInput as DepositOpenInput, type DepositSnapshot, type DepositState, type DepositStateName, type FailureInfo, type FlowEvent, type FlowIdKey, type IntercomMerchantContext, KitPortalScope, KitStorageProvider, type LogosNamespace, type PublicStridgeEventBus, type StridgeAppearance, type StridgeAsset, type StridgeDepositDestination, type StridgeDepositFlowConfig, type StridgeDepositMethodConfig, type StridgeDepositMethodsConfig, type StridgeEnvironment, type StridgeEvent, type StridgeFlowOwner, StridgeProvider, type StridgeStorageConfig, type StridgeWithdrawFlowConfig, type SupportConfig, type SupportOpenContext, type TermsConfig, type TermsSelectContext, type TokenLogoInput, type TxRef, type UiEvent, type WithdrawActions, type WithdrawBalanceInput, type WithdrawBindings, type WithdrawController, type WithdrawSnapshot, type WithdrawState, type WithdrawStateName, type WithdrawSubmitActions, type WithdrawSubmitCallback, type WithdrawSubmitInput, type WithdrawSuggestedRecipient, type WithdrawalFormSnapshot, bannerAckStorageKey, bucketFromSettlement, createKitStorage, createLocalStorageAdapter, createMemoryStorageAdapter, createSessionStorageAdapter, isValidAddressForChainType, isValidEvmAddress, isValidTronAddress, logos, resolveStorageAdapter, toChainType, useBannerAck, useBannerAckForSettlement, useCurrentFlowId, useDeposit, useDepositSnapshot, useDepositState, useKitConfig, useKitStorage, useKitStorageValue, useOptionalDeposit, useOptionalStridge, useOptionalWithdraw, useStridge, useStridgeEvent, useStridgeEventBus, useStridgeEvents, useStridgeFlowEvent, useStridgeFlowEvents, useWithdraw, useWithdrawBindings, useWithdrawSnapshot, useWithdrawState };
35
+ import { useOptionalWithdraw, usePrefetchWithdraw, useWithdraw } from "./flows/withdraw/orchestrator/useWithdraw.js";
36
+ import { ConnectWalletConfig } from "./shared/wallet/ConnectWalletContext.js";
37
+ import { StridgeAppearance, StridgeAsset, StridgeDepositDestination, StridgeDepositFlowConfig, StridgeDepositMethodConfig, StridgeDepositMethodsConfig, StridgeFlowOwner, StridgePrefetchConfig, StridgeProvider, StridgeStorageConfig, StridgeWithdrawFlowConfig } from "./stridge/StridgeProvider.js";
38
+ export { type BannerAckBucket, type ChainLogoInput, type ChainLogoMeta, type ChainType, type ConnectWalletConfig, DEFAULT_KIT_STORAGE_NAMESPACE, type DepositActions, type DepositController, type DepositMethod, type DepositMethodConfig, type DepositMethodsConfig, type OpenInput as DepositOpenInput, type DepositSnapshot, type DepositState, type DepositStateName, type FailureInfo, type FlowEvent, type FlowIdKey, type IntercomMerchantContext, KitPortalScope, KitStorageProvider, type LogosNamespace, type PublicStridgeEventBus, type StridgeAppearance, type StridgeAsset, type StridgeDepositDestination, type StridgeDepositFlowConfig, type StridgeDepositMethodConfig, type StridgeDepositMethodsConfig, type StridgeEnvironment, type StridgeEvent, type StridgeFlowOwner, type StridgePrefetchConfig, StridgeProvider, type StridgeStorageConfig, type StridgeWithdrawFlowConfig, type SupportConfig, type SupportOpenContext, type TermsConfig, type TermsSelectContext, type TokenLogoInput, type TxRef, type UiEvent, type WithdrawActions, type WithdrawBalanceInput, type WithdrawBindings, type WithdrawController, type WithdrawSnapshot, type WithdrawState, type WithdrawStateName, type WithdrawSubmitActions, type WithdrawSubmitCallback, type WithdrawSubmitInput, type WithdrawSuggestedRecipient, type WithdrawalFormSnapshot, bannerAckStorageKey, bucketFromSettlement, createKitStorage, createLocalStorageAdapter, createMemoryStorageAdapter, createSessionStorageAdapter, isValidAddressForChainType, isValidEvmAddress, isValidTronAddress, logos, resolveStorageAdapter, toChainType, useBannerAck, useBannerAckForSettlement, useCurrentFlowId, useDeposit, useDepositSnapshot, useDepositState, useKitConfig, useKitStorage, useKitStorageValue, useOptionalDeposit, useOptionalWithdraw, usePrefetchDeposit, usePrefetchWithdraw, useStridgeEvent, useStridgeEventBus, useStridgeEvents, useStridgeFlowEvent, useStridgeFlowEvents, useWithdraw, useWithdrawBindings, useWithdrawSnapshot, useWithdrawState };
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import{isValidAddressForChainType as e,isValidEvmAddress as t,isValidTronAddress as n,toChainType as r}from"./shared/chains/index.js";import{logos as i}from"./shared/utils/logos/api.js";import"./shared/utils/logos/index.js";import{createLocalStorageAdapter as a,createMemoryStorageAdapter as o,createSessionStorageAdapter as s,resolveStorageAdapter as c}from"./storage/adapters.js";import{createKitStorage as l}from"./storage/createKitStorage.js";import{DEFAULT_KIT_STORAGE_NAMESPACE as u,KitStorageProvider as d,useKitStorage as f,useKitStorageValue as p}from"./storage/context.js";import"./storage/index.js";import{bannerAckStorageKey as m,bucketFromSettlement as h,useBannerAck as g,useBannerAckForSettlement as _}from"./banners/useBannerAck.js";import"./banners/index.js";import{useCurrentFlowId as v}from"./events/hooks/useCurrentFlowId.js";import{useStridgeEvent as y}from"./events/hooks/useStridgeEvent.js";import{useStridgeEventBus as b}from"./events/hooks/useStridgeEventBus.js";import{useStridgeEvents as x}from"./events/hooks/useStridgeEvents.js";import{useStridgeFlowEvent as S}from"./events/hooks/useStridgeFlowEvent.js";import{useStridgeFlowEvents as C}from"./events/hooks/useStridgeFlowEvents.js";import"./events/index.js";import{useDepositSnapshot as w}from"./flows/deposit/driver/context.js";import{useDepositState as T}from"./flows/deposit/orchestrator/controller.js";import{useDeposit as E,useOptionalDeposit as D}from"./flows/deposit/orchestrator/useDeposit.js";import{useWithdrawBindings as O}from"./flows/withdraw/bindings/WithdrawBindings.js";import"./flows/withdraw/bindings/index.js";import{useWithdrawSnapshot as k}from"./flows/withdraw/driver/context.js";import{useWithdrawState as A}from"./flows/withdraw/orchestrator/controller.js";import{useOptionalWithdraw as j,useWithdraw as M}from"./flows/withdraw/orchestrator/useWithdraw.js";import"./flows/withdraw/orchestrator/index.js";import{useKitConfig as N}from"./scope/context.js";import{KitPortalScope as P}from"./scope/KitPortalScope.js";import{useOptionalStridge as F,useStridge as I}from"./stridge/StridgeContext.js";import{StridgeProvider as L}from"./stridge/StridgeProvider.js";export{u as DEFAULT_KIT_STORAGE_NAMESPACE,P as KitPortalScope,d as KitStorageProvider,L as StridgeProvider,m as bannerAckStorageKey,h as bucketFromSettlement,l as createKitStorage,a as createLocalStorageAdapter,o as createMemoryStorageAdapter,s as createSessionStorageAdapter,e as isValidAddressForChainType,t as isValidEvmAddress,n as isValidTronAddress,i as logos,c as resolveStorageAdapter,r as toChainType,g as useBannerAck,_ as useBannerAckForSettlement,v as useCurrentFlowId,E as useDeposit,w as useDepositSnapshot,T as useDepositState,N as useKitConfig,f as useKitStorage,p as useKitStorageValue,D as useOptionalDeposit,F as useOptionalStridge,j as useOptionalWithdraw,I as useStridge,y as useStridgeEvent,b as useStridgeEventBus,x as useStridgeEvents,S as useStridgeFlowEvent,C as useStridgeFlowEvents,M as useWithdraw,O as useWithdrawBindings,k as useWithdrawSnapshot,A as useWithdrawState};
1
+ import{isValidAddressForChainType as e,isValidEvmAddress as t,isValidTronAddress as n,toChainType as r}from"./shared/chains/index.js";import{logos as i}from"./shared/utils/logos/api.js";import"./shared/utils/logos/index.js";import{createLocalStorageAdapter as a,createMemoryStorageAdapter as o,createSessionStorageAdapter as s,resolveStorageAdapter as c}from"./storage/adapters.js";import{createKitStorage as l}from"./storage/createKitStorage.js";import{DEFAULT_KIT_STORAGE_NAMESPACE as u,KitStorageProvider as d,useKitStorage as f,useKitStorageValue as p}from"./storage/context.js";import"./storage/index.js";import{bannerAckStorageKey as m,bucketFromSettlement as h,useBannerAck as g,useBannerAckForSettlement as _}from"./banners/useBannerAck.js";import"./banners/index.js";import{useCurrentFlowId as v}from"./events/hooks/useCurrentFlowId.js";import{useStridgeEvent as y}from"./events/hooks/useStridgeEvent.js";import{useStridgeEventBus as b}from"./events/hooks/useStridgeEventBus.js";import{useStridgeEvents as x}from"./events/hooks/useStridgeEvents.js";import{useStridgeFlowEvent as S}from"./events/hooks/useStridgeFlowEvent.js";import{useStridgeFlowEvents as C}from"./events/hooks/useStridgeFlowEvents.js";import"./events/index.js";import{useDepositSnapshot as w}from"./flows/deposit/driver/context.js";import{useDepositState as T}from"./flows/deposit/orchestrator/controller.js";import{useDeposit as E,useOptionalDeposit as D,usePrefetchDeposit as O}from"./flows/deposit/orchestrator/useDeposit.js";import{useWithdrawBindings as k}from"./flows/withdraw/bindings/WithdrawBindings.js";import"./flows/withdraw/bindings/index.js";import{useWithdrawSnapshot as A}from"./flows/withdraw/driver/context.js";import{useWithdrawState as j}from"./flows/withdraw/orchestrator/controller.js";import{useOptionalWithdraw as M,usePrefetchWithdraw as N,useWithdraw as P}from"./flows/withdraw/orchestrator/useWithdraw.js";import"./flows/withdraw/orchestrator/index.js";import{useKitConfig as F}from"./scope/context.js";import{KitPortalScope as I}from"./scope/KitPortalScope.js";import{StridgeProvider as L}from"./stridge/StridgeProvider.js";export{u as DEFAULT_KIT_STORAGE_NAMESPACE,I as KitPortalScope,d as KitStorageProvider,L as StridgeProvider,m as bannerAckStorageKey,h as bucketFromSettlement,l as createKitStorage,a as createLocalStorageAdapter,o as createMemoryStorageAdapter,s as createSessionStorageAdapter,e as isValidAddressForChainType,t as isValidEvmAddress,n as isValidTronAddress,i as logos,c as resolveStorageAdapter,r as toChainType,g as useBannerAck,_ as useBannerAckForSettlement,v as useCurrentFlowId,E as useDeposit,w as useDepositSnapshot,T as useDepositState,F as useKitConfig,f as useKitStorage,p as useKitStorageValue,D as useOptionalDeposit,M as useOptionalWithdraw,O as usePrefetchDeposit,N as usePrefetchWithdraw,y as useStridgeEvent,b as useStridgeEventBus,x as useStridgeEvents,S as useStridgeFlowEvent,C as useStridgeFlowEvents,P as useWithdraw,k as useWithdrawBindings,A as useWithdrawSnapshot,j as useWithdrawState};
package/dist/package.js CHANGED
@@ -1 +1 @@
1
- var e=`0.1.0-alpha.37`;export{e as version};
1
+ var e=`0.1.0-alpha.39`;export{e as version};
@@ -0,0 +1 @@
1
+ import{useRef as e}from"react";function t(t){let r=e(null),i=n(t);return(r.current===null||r.current.serialized!==i)&&(r.current={value:t,serialized:i}),r.current.value}function n(e){return JSON.stringify(e,(e,t)=>t&&typeof t==`object`&&!Array.isArray(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}export{t as useDeepMemo};
@@ -0,0 +1,17 @@
1
+ //#region src/shared/wallet/ConnectWalletContext.d.ts
2
+ /**
3
+ * Host-supplied "Connect a wallet" affordance. When the user opens the deposit dialog without a
4
+ * resolvable owner (no `flows.deposit.owner`, no wagmi connection, no `dev.userAddressOverride`),
5
+ * the dialog renders `<WalletRequiredState>` with the `onClick` CTA labeled with `label` (or the
6
+ * kit's default copy when omitted). When the host doesn't supply this config, the state still
7
+ * renders — just without an actionable button, leaving the host to surface the connect affordance
8
+ * elsewhere on the page.
9
+ */
10
+ interface ConnectWalletConfig {
11
+ /** Click handler invoked by the dialog's "Connect wallet" button. */
12
+ onClick: () => void;
13
+ /** Optional override for the button label. Defaults to the kit's localized "Connect wallet" copy. */
14
+ label?: string;
15
+ }
16
+ //#endregion
17
+ export { ConnectWalletConfig };
@@ -0,0 +1 @@
1
+ "use client";import{createContext as e,use as t}from"react";const n=e(null);n.displayName=`ConnectWalletContext`;function r(){return t(n)}export{n as ConnectWalletContext,r as useConnectWallet};
@@ -6,7 +6,13 @@ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
6
6
  * A single row inside `AssetPicker.List`, laid out as:
7
7
  *
8
8
  * [icon + chain badge] [symbol] [low balance?] [fiat]
9
- * [balance]
9
+ * [chain · balance]
10
+ *
11
+ * The chain prefix on the secondary line disambiguates same-symbol rows on multi-chain
12
+ * pickers (e.g. `BSC · 5.7166 USDC` next to `Ethereum · 4 USDC`) so sighted users don't
13
+ * have to decode the small chain badge on the token logo to tell rows apart. The screen-
14
+ * reader announcement still comes from the row's `aria-label` (`"USDC on BSC"`) because the
15
+ * native concat of icon `alt`s + dual symbol text + chain badge `alt` is verbose and stutters.
10
16
  *
11
17
  * Selection state is read from context, so consumers only manage a single `selectedId` on the root rather than
12
18
  * threading `isSelected` onto each row.
@@ -1 +1 @@
1
- "use client";import{useLingui as e}from"../../../../i18n/useLingui.js";import"../../../../../i18n/index.js";import{Badge as t}from"../../../../ui/Badge/Badge.js";import"../../../../ui/Badge/index.js";import{SelectableTile as n}from"../../../../ui/SelectableTile/SelectableTile.js";import"../../../../ui/SelectableTile/index.js";import{text as r}from"../../../../ui/Text/Text.js";import{TokenLogo as i}from"../../../../ui/TokenLogo/TokenLogo.js";import"../../../../ui/TokenLogo/index.js";import"../../../../../ui/index.js";import{styles as a}from"../AssetPicker.styles.js";import{useAssetPickerContext as o}from"../context.js";import{jsx as s,jsxs as c}from"react/jsx-runtime";import*as l from"@stylexjs/stylex";function u({id:u,symbol:d,chain:f,balanceFormatted:p,fiatFormatted:m,lowBalance:h=!1,disabled:g=!1,chainId:_,contractAddress:v,isNative:y,logoUrl:b,chainLogoUrl:x,pinnedLogoUrl:S}){let C=o(`AssetPicker.Asset`),{_:w}=e();return c(n,{shape:`card`,value:u,selected:C.selectedId===u,disabled:g,"aria-label":`${d} on ${f}`,"data-asset-id":u,"data-chain":f,...l.props(a.assetRow),children:[s(i,{size:36,symbol:d,..._===void 0?{}:{chainId:_},...v===void 0?{}:{address:v},...y===void 0?{}:{isNative:y},...b===void 0?{}:{logoUrl:b},...x===void 0?{}:{chainLogoUrl:x},...S===void 0?{}:{pinnedLogoUrl:S}}),c(`span`,{...l.props(a.textBlock),children:[s(r.span,{size:`callout`,fontWeight:`semibold`,leading:`tight`,tracking:`tight`,truncate:!0,children:d}),s(r.span,{size:`meta`,fontWeight:`medium`,leading:`tight`,color:`subdued`,truncate:!0,children:p})]}),h?s(t,{variant:`outline`,color:`secondary`,size:`sm`,roundness:`lg`,...l.props(a.lowBalanceBadge),children:w({id:`Wqz0SO`,message:`Low Balance`})}):null,s(r.span,{size:`callout`,fontWeight:`semibold`,leading:`tight`,tracking:`tight`,...l.props(a.fiat),children:m})]})}export{u as AssetPickerAsset};
1
+ "use client";import{useLingui as e}from"../../../../i18n/useLingui.js";import"../../../../../i18n/index.js";import{Badge as t}from"../../../../ui/Badge/Badge.js";import"../../../../ui/Badge/index.js";import{SelectableTile as n}from"../../../../ui/SelectableTile/SelectableTile.js";import"../../../../ui/SelectableTile/index.js";import{text as r}from"../../../../ui/Text/Text.js";import{TokenLogo as i}from"../../../../ui/TokenLogo/TokenLogo.js";import"../../../../ui/TokenLogo/index.js";import"../../../../../ui/index.js";import{styles as a}from"../AssetPicker.styles.js";import{useAssetPickerContext as o}from"../context.js";import{jsx as s,jsxs as c}from"react/jsx-runtime";import*as l from"@stylexjs/stylex";function u({id:u,symbol:d,chain:f,balanceFormatted:p,fiatFormatted:m,lowBalance:h=!1,disabled:g=!1,chainId:_,contractAddress:v,isNative:y,logoUrl:b,chainLogoUrl:x,pinnedLogoUrl:S}){let C=o(`AssetPicker.Asset`),{_:w}=e();return c(n,{shape:`card`,value:u,selected:C.selectedId===u,disabled:g,"aria-label":`${d} on ${f}`,"data-asset-id":u,"data-chain":f,...l.props(a.assetRow),children:[s(i,{size:36,symbol:d,..._===void 0?{}:{chainId:_},...v===void 0?{}:{address:v},...y===void 0?{}:{isNative:y},...b===void 0?{}:{logoUrl:b},...x===void 0?{}:{chainLogoUrl:x},...S===void 0?{}:{pinnedLogoUrl:S}}),c(`span`,{...l.props(a.textBlock),children:[s(r.span,{size:`callout`,fontWeight:`semibold`,leading:`tight`,tracking:`tight`,truncate:!0,children:d}),c(r.span,{size:`xs`,fontWeight:`medium`,leading:`tight`,color:`subdued`,truncate:!0,children:[f,` · `,p]})]}),h?s(t,{variant:`outline`,color:`secondary`,size:`sm`,roundness:`lg`,...l.props(a.lowBalanceBadge),children:w({id:`Wqz0SO`,message:`Low Balance`})}):null,s(r.span,{size:`callout`,fontWeight:`semibold`,leading:`tight`,tracking:`tight`,...l.props(a.fiat),children:m})]})}export{u as AssetPickerAsset};
@@ -3,6 +3,7 @@ import { KitI18nConfig } from "../shared/i18n/createKitI18n.js";
3
3
  import { SupportConfig } from "../shared/support/types.js";
4
4
  import { TermsConfig } from "../shared/terms/types.js";
5
5
  import { StridgeEnvironment } from "../drivers/stridge/types.js";
6
+ import { ConnectWalletConfig } from "../shared/wallet/ConnectWalletContext.js";
6
7
  import { Address } from "viem";
7
8
  import { ReactNode } from "react";
8
9
  import * as _$react_jsx_runtime0 from "react/jsx-runtime";
@@ -31,9 +32,8 @@ interface StridgeAsset {
31
32
  *
32
33
  * @remarks
33
34
  * If the gateway-kit admin config has "Same-owner only" enabled (default), `address` must
34
- * equal {@link StridgeDepositFlowConfig.owner | the deposit owner}. Turn the toggle off — and
35
- * optionally pair it with a destination whitelist — to route funds to an address that differs
36
- * from the owner.
35
+ * equal the deposit owner. Turn the toggle off — and optionally pair it with a destination
36
+ * whitelist — to route funds to an address that differs from the owner.
37
37
  */
38
38
  interface StridgeDepositDestination {
39
39
  address: Address;
@@ -51,74 +51,41 @@ interface StridgeFlowOwner {
51
51
  * Per-flow deposit tuning.
52
52
  */
53
53
  interface StridgeDepositFlowConfig {
54
- /**
55
- * Settlement destination address — where settled brand-currency funds land at completion.
56
- * Required when the deposit flow is enabled.
57
- */
54
+ /** Settlement destination address — where settled brand-currency funds land at completion. */
58
55
  destination: StridgeDepositDestination;
59
56
  /**
60
57
  * Owner used as `gateway/start.owner` for deposit UDAs. Optional — falls back to the
61
- * connected wagmi wallet address, then to `dev.userAddressOverride`. Set explicitly when
62
- * the customer is identified by something other than their wagmi address (e.g. a derived
63
- * per-user identifier, or a shared business owner that is not the wagmi-connected EOA).
58
+ * connected wagmi wallet address, then to `dev.userAddressOverride`.
64
59
  */
65
60
  owner?: StridgeFlowOwner;
66
61
  /**
67
62
  * Lower USD bound on the deposit amount. Drives the asset-picker's "Low Balance" pill,
68
- * prefills the amount-entry hero, and gates the confirm CTA — typing below the floor flips
69
- * the footer to "Update order" and snaps the amount up on click. The kit ships no default:
70
- * omit to leave the deposit without a host-configured floor (the picker still surfaces any
71
- * per-chain `min_deposit_usd` the gateway publishes).
63
+ * prefills the amount-entry hero, and gates the confirm CTA.
72
64
  */
73
65
  minAmountUsd?: number;
74
66
  /**
75
67
  * Upper USD bound on the deposit amount. When set, the effective ceiling is
76
- * `min(walletBalanceUsd, maxAmountUsd)`. Typing above it surfaces an inline notice and the
77
- * footer CTA snaps the amount down to the cap on click. Omit to let the wallet balance be
78
- * the only ceiling.
68
+ * `min(walletBalanceUsd, maxAmountUsd)`.
79
69
  */
80
70
  maxAmountUsd?: number;
81
71
  /**
82
72
  * Metadata persisted on the UDA at `gateway/start` time. Echoed back on `gateway/{owner}`
83
- * and webhook payloads. Treat as untrusted display data.
73
+ * and webhook payloads.
84
74
  */
85
75
  metadata?: Record<string, unknown>;
86
76
  /**
87
- * Per-method host disable lever for the deposit-method picker. The kit ships no built-in
88
- * inference (embedded-wallet detection, KYC tier, region, …) — the host decides eligibility
89
- * and passes `{ disabled: true, disabledHint: "…" }` per method. Disabled tiles stay in the
77
+ * Per-method host disable lever for the deposit-method picker. Disabled tiles stay in the
90
78
  * picker (preserves "I can see my options" UX), render natively disabled, and show
91
- * `disabledHint` inline as the tile's meta line — replacing the address+balance reading on
92
- * the wallet tile and the `"No limit · Instant"` reading on the transfer tile so the
93
- * explanation is unmissable. Omitting the field keeps both methods enabled.
94
- *
95
- * @example
96
- * ```tsx
97
- * <StridgeProvider
98
- * flows={{
99
- * deposit: {
100
- * destination: { address: treasuryAddress },
101
- * methods: {
102
- * wallet: isEmbeddedWallet
103
- * ? { disabled: true, disabledHint: "Use Transfer Crypto, or connect an external wallet to pay from a wallet balance." }
104
- * : undefined,
105
- * },
106
- * },
107
- * }}
108
- * >
109
- * ```
79
+ * `disabledHint` inline as the tile's meta line.
110
80
  */
111
81
  methods?: StridgeDepositMethodsConfig;
112
82
  }
113
83
  /**
114
- * Host-supplied disable lever for a single payment method on the deposit-method picker. Identical
115
- * shape to the kit-internal {@link DepositMethodConfig} — re-exported under a Stridge-prefixed
116
- * name so all `flows.deposit.*` types live alongside the provider.
84
+ * Host-supplied disable lever for a single payment method on the deposit-method picker.
117
85
  */
118
86
  type StridgeDepositMethodConfig = DepositMethodConfig;
119
87
  /**
120
88
  * Per-method host configuration for the deposit picker. Omitting a method keeps default behavior.
121
- * Re-export of {@link DepositMethodsConfig} under a Stridge-prefixed name.
122
89
  */
123
90
  type StridgeDepositMethodsConfig = DepositMethodsConfig;
124
91
  /**
@@ -133,19 +100,16 @@ interface StridgeWithdrawFlowConfig {
133
100
  owner: StridgeFlowOwner;
134
101
  /**
135
102
  * Lower USD bound on the withdraw amount. When set, the form blocks submit with a localized
136
- * "Min $X" CTA while the typed amount sits below the floor. Omit to leave the form without a
137
- * lower bound (only the wallet balance / non-zero gate apply).
103
+ * "Min $X" CTA while the typed amount sits below the floor.
138
104
  */
139
105
  minAmountUsd?: number;
140
106
  /**
141
107
  * Upper USD bound on the withdraw amount. When set, the form blocks submit with a localized
142
- * "Max $X" CTA while the typed amount sits above the cap. Omit to let the brand-currency
143
- * balance be the only ceiling.
108
+ * "Max $X" CTA while the typed amount sits above the cap.
144
109
  */
145
110
  maxAmountUsd?: number;
146
111
  /**
147
- * Metadata persisted on every UDA the withdraw flow provisions. Merged under the kit-set
148
- * `kit_flow` / `kit_version` / `source` keys (kit keys win).
112
+ * Metadata persisted on every UDA the withdraw flow provisions.
149
113
  */
150
114
  metadata?: Record<string, unknown>;
151
115
  }
@@ -160,56 +124,56 @@ interface StridgeAppearance {
160
124
  accent?: string;
161
125
  /** Border-radius preset. `"sharp" | "subtle" | "rounded" | "pill"`. */
162
126
  radius?: "sharp" | "subtle" | "rounded" | "pill";
163
- /**
164
- * Text direction the kit's primitives render with. Falls back to a locale-derived default
165
- * (`"rtl"` for Arabic, Hebrew, Persian, Urdu) when omitted.
166
- */
127
+ /** Text direction the kit's primitives render with. */
167
128
  direction?: "ltr" | "rtl";
168
129
  /**
169
130
  * Controls the "Powered by Stridge" attribution row inside every gateway widget frame.
170
- * `"visible"` (default) auto-mounts the brand row at the bottom of every step; `"hidden"`
171
- * suppresses the auto-mount for white-label installs.
172
131
  */
173
132
  attribution?: "visible" | "hidden";
174
133
  }
175
134
  /**
176
135
  * Development / preview-only knobs. Grouped under a single `dev` prop so production integrations
177
- * never reach for these accidentally and `Cmd-F dev` finds every preview-only escape hatch in one
178
- * place. Read-only paths under `dev.userAddressOverride` (gateway/start, balances, addresses,
179
- * brand) work end-to-end; signing still requires a real wagmi connector.
136
+ * never reach for these accidentally.
180
137
  */
181
138
  interface StridgeDevConfig {
182
139
  /**
183
- * Address-only override used when no wagmi account is connected. Lets demos, sample apps, and
184
- * read-only previews bootstrap the kit (gateway/start, balances, deposit addresses, brand)
185
- * against a pasted EOA without firing up a wallet. The wagmi-connected account always wins —
186
- * the override only fills in when `useAccount()` returns no address.
187
- *
188
- * Signing still requires a real connector. The submit and broadcast paths call into
189
- * `createWagmiSigner`, which surfaces a user-readable "Connect a wallet to sign and submit
190
- * the deposit." error if it's invoked without an active connector. Read-only paths
191
- * (balances, addresses, brand, quotes) work end-to-end under the override.
140
+ * Address-only override used when no wagmi account is connected. Lets demos, sample apps,
141
+ * and read-only previews bootstrap the kit against a pasted EOA without firing up a wallet.
142
+ * The wagmi-connected account always wins — the override only fills in when `useAccount()`
143
+ * returns no address.
192
144
  */
193
145
  userAddressOverride?: Address;
194
146
  }
195
147
  /**
196
- * Persistence configuration for the kit's per-tab state (settlement banner acks, future
197
- * kit-wide features).
148
+ * Persistence configuration for the kit's per-tab state (settlement banner acks, future kit-wide
149
+ * features).
198
150
  */
199
151
  interface StridgeStorageConfig {
200
152
  /**
201
153
  * Storage backend. `"session"` (default — `sessionStorage`, forgotten on tab close),
202
- * `"local"` (`localStorage`, survives restarts), or `"memory"` (in-process only, ideal for
203
- * tests).
154
+ * `"local"` (`localStorage`, survives restarts), or `"memory"` (in-process only).
204
155
  */
205
156
  driver?: "session" | "local" | "memory";
206
157
  /**
207
- * Prefix every key the kit writes under. Two `<StridgeProvider />` instances on the same
208
- * page sharing a backend should pick distinct namespaces to keep state isolated. Defaults
209
- * to `stridge-kit:storage:v1`.
158
+ * Prefix every key the kit writes under. Defaults to `stridge-kit:storage:v1`.
210
159
  */
211
160
  namespace?: string;
212
161
  }
162
+ /**
163
+ * Eager-bootstrap opt-in. Set on `<StridgeProvider prefetch={…}>` to fire the driver `arm()` at
164
+ * mount instead of waiting for `useDeposit().open()` / `usePrefetchDeposit()` to do it. Two
165
+ * shapes:
166
+ *
167
+ * - `true` — arm every enabled flow at mount.
168
+ * - `("deposit" | "withdraw")[]` — arm only the listed flows.
169
+ *
170
+ * Default is unset (no eager arm). Reach for this only when the host KNOWS the dialog will
171
+ * open (e.g. a checkout page whose entire purpose is the gateway widget). The default trade —
172
+ * pay bootstrap cost when the user actually opens the dialog — is the right call for every
173
+ * other integration; flipping the prop "just to be safe" re-creates the eager-load problem at
174
+ * a different layer.
175
+ */
176
+ type StridgePrefetchConfig = true | ReadonlyArray<"deposit" | "withdraw">;
213
177
  declare namespace StridgeProvider {
214
178
  interface Props {
215
179
  /**
@@ -220,13 +184,11 @@ declare namespace StridgeProvider {
220
184
  /**
221
185
  * Which Stridge API host the kit talks to. Defaults to `"production"`
222
186
  * (`api.stridge.com`). Pass `"staging"` (`api.stridge.dev`) for integration testing.
223
- * Note that gateway keys are environment-scoped — a staging key won't authenticate
224
- * against production and vice versa.
225
187
  */
226
188
  environment?: StridgeEnvironment;
227
189
  /**
228
190
  * Settlement asset — the single source of truth for which `(networkId, symbol)` the
229
- * gateway operates in. Deposit settles to this asset; withdraw sources from this asset.
191
+ * gateway operates in.
230
192
  */
231
193
  asset: StridgeAsset;
232
194
  /**
@@ -244,9 +206,8 @@ declare namespace StridgeProvider {
244
206
  /** Persistence configuration for kit-internal state. */
245
207
  storage?: StridgeStorageConfig;
246
208
  /**
247
- * Development / preview-only knobs. Grouped under `dev` so production integrations never
248
- * reach for them accidentally — every preview escape hatch surfaces with the same `dev.`
249
- * prefix at the call site.
209
+ * Development / preview-only knobs. Grouped under `dev` so production integrations
210
+ * never reach for them accidentally.
250
211
  */
251
212
  dev?: StridgeDevConfig;
252
213
  /**
@@ -257,13 +218,21 @@ declare namespace StridgeProvider {
257
218
  */
258
219
  support?: SupportConfig;
259
220
  /**
260
- * Terms link configuration.
261
- *
262
- * Omit to point the kit's "terms" links at Stridge's terms page. Provide `url`,
263
- * `onSelect`, or both to swap in merchant-owned legal copy. Covers both the
264
- * confirm-deposit disclaimer and the transfer-crypto address row.
221
+ * Terms link configuration. Omit to point the kit's terms links at Stridge's terms page.
265
222
  */
266
223
  terms?: TermsConfig;
224
+ /**
225
+ * Eager-bootstrap opt-in. See {@link StridgePrefetchConfig}.
226
+ */
227
+ prefetch?: StridgePrefetchConfig;
228
+ /**
229
+ * Host-supplied "Connect a wallet" CTA. Rendered by the dialog's wallet-required state
230
+ * when the deposit flow is enabled but no owner can be resolved (no `flows.deposit.owner`,
231
+ * no wagmi connection, no `dev.userAddressOverride`). Omit to show the prompt without an
232
+ * actionable button — useful when the host surfaces the connect affordance elsewhere on
233
+ * the page.
234
+ */
235
+ connectWallet?: ConnectWalletConfig;
267
236
  /** Optional className applied to the kit's scope root `<div>`. */
268
237
  className?: string;
269
238
  children?: ReactNode;
@@ -278,6 +247,11 @@ declare namespace StridgeProvider {
278
247
  * from the per-flow `/dialog` subpaths anywhere inside; open them with `useDeposit().open()` /
279
248
  * `useWithdraw().open()`.
280
249
  *
250
+ * Bootstrap is lazy — no Stridge requests fire at provider mount. The driver instances stay
251
+ * idle until the user opens a dialog or the headless `usePrefetchDeposit()` /
252
+ * `usePrefetchWithdraw()` hook is called. Pass `prefetch` to opt into eager bootstrap when the
253
+ * host knows the dialog will open (rare).
254
+ *
281
255
  * @example
282
256
  * ```tsx
283
257
  * import { StridgeProvider } from "@stridge/kit";
@@ -286,8 +260,8 @@ declare namespace StridgeProvider {
286
260
  * <StridgeProvider
287
261
  * gatewayKey={process.env.NEXT_PUBLIC_STRIDGE_GATEWAY_KEY!}
288
262
  * asset={{ networkId: "9006", symbol: "USDC" }}
289
- * flows={{ deposit: {} }}
290
- * appearance={{ theme: "dark", accent: "oklch(78% 0.15 240)", radius: "rounded" }}
263
+ * flows={{ deposit: { destination: { address: treasury } } }}
264
+ * connectWallet={{ onClick: openConnectModal }}
291
265
  * >
292
266
  * <YourApp />
293
267
  * <DepositDialog />
@@ -305,8 +279,10 @@ declare function StridgeProvider({
305
279
  dev,
306
280
  support,
307
281
  terms,
282
+ prefetch,
283
+ connectWallet,
308
284
  className,
309
285
  children
310
286
  }: StridgeProvider.Props): _$react_jsx_runtime0.JSX.Element;
311
287
  //#endregion
312
- export { StridgeAppearance, StridgeAsset, StridgeDepositDestination, StridgeDepositFlowConfig, StridgeDepositMethodConfig, StridgeDepositMethodsConfig, StridgeFlowOwner, StridgeProvider, StridgeStorageConfig, StridgeWithdrawFlowConfig };
288
+ export { StridgeAppearance, StridgeAsset, StridgeDepositDestination, StridgeDepositFlowConfig, StridgeDepositMethodConfig, StridgeDepositMethodsConfig, StridgeFlowOwner, StridgePrefetchConfig, StridgeProvider, StridgeStorageConfig, StridgeWithdrawFlowConfig };
@@ -1 +1 @@
1
- "use client";import{StridgeEventsContext as e}from"../events/context.js";import{createKitI18n as t}from"../shared/i18n/createKitI18n.js";import"../i18n/index.js";import{StridgeContext as n}from"./StridgeContext.js";import{createStridgeDepositDriver as r}from"../drivers/stridge/createStridgeDepositDriver.js";import{createStridgeWithdrawDriver as i}from"../drivers/stridge/createStridgeWithdrawDriver.js";import"../_internal/drivers/stridge/index.js";import{createBus as a}from"../events/bus/createBus.js";import{createFlowIdRegistry as o}from"../events/bus/flowIdRegistry.js";import{createMetadataStore as s}from"../events/bus/metadata.js";import"../events/bus/index.js";import{KitProvider as c}from"../KitProvider.js";import{resolveMerchantLink as l}from"../shared/merchant-link/resolveMerchantLink.js";import"../shared/merchant-link/index.js";import{useIntercomMerchantContext as u}from"../shared/support/useIntercomMerchantContext.js";import{useMerchantContext as d}from"../shared/support/useMerchantContext.js";import"../shared/support/index.js";import{useOptionalWagmi as f}from"./optionalWagmi.js";import{createStubDepositDriver as p,createStubWithdrawDriver as m}from"./stubs.js";import{useMemo as h,useRef as g,useSyncExternalStore as _}from"react";import{jsx as v}from"react/jsx-runtime";function y({gatewayKey:y,environment:b,asset:x,flows:S,appearance:C,i18n:w,storage:T,dev:E,support:D,terms:O,className:k,children:A}){if(!S.deposit&&!S.withdraw)throw Error("<StridgeProvider /> requires at least one of `flows.deposit` or `flows.withdraw`.");if(!x)throw Error("<StridgeProvider /> requires `asset: { networkId, symbol }`.");let{config:j,address:M}=f(),N=h(()=>t(w??{}),[w?.locale,w?.messages]),P=g(N);P.current=N;let F=x.networkId,I=x.symbol,L=S.deposit,R=S.withdraw,z=L?.owner?.address??M??E?.userAddressOverride,B=R?.owner.address,V=h(()=>{if(!(!L||!z))return r({userAddress:z,projectKey:y,destination:{network_id:F,asset_symbol:I,to_address:L.destination.address},wagmiConfig:j,getI18n:()=>P.current,...b?{environment:b}:{},...L.minAmountUsd===void 0?{}:{minAmountUsd:L.minAmountUsd},...L.maxAmountUsd===void 0?{}:{maxAmountUsd:L.maxAmountUsd},...L.metadata?{metadata:L.metadata}:{}})},[L,z,y,b,F,I,j]),H=h(()=>p(),[]),U=L?V??H:void 0,W=h(()=>{if(!(!R||!B))return i({userAddress:B,projectKey:y,currency:{networkId:F,assetSymbol:I},wagmiConfig:j,getI18n:()=>P.current,...b?{environment:b}:{},...R.minAmountUsd===void 0?{}:{minAmountUsd:R.minAmountUsd},...R.maxAmountUsd===void 0?{}:{maxAmountUsd:R.maxAmountUsd},...R.metadata?{metadata:R.metadata}:{}})},[R,B,y,b,F,I,j]),G=h(()=>m(),[]),K=R?W??G:void 0,q=V??W,J=_(e=>q?.subscribe(e)??(()=>{}),()=>{if(V){let e=V.getSnapshot();return e.brand.status===`ready`&&e.target.status===`ready`}return W?W.getSnapshot().receiveOptions.status===`ready`:!1},()=>!1),Y=z??B,X=d({gatewayKey:y,environment:b??`production`,assetChain:F,assetSymbol:I,...Y?{userAddress:Y}:{},...V?{depositDriver:V}:{}});u(l(D?{url:D.url,onSelect:D.onOpen}:void 0).kind===`default`?X:null);let Z=h(()=>({isReady:J,driver:V}),[J,V]);return v(e,{value:h(()=>({bus:a(),flowIds:o(),metadata:s()}),[]),children:v(n,{value:Z,children:v(c,{theme:C?.theme,accent:C?.accent,radius:C?.radius,direction:C?.direction,attribution:C?.attribution,i18n:w,storage:T?.driver,storageNamespace:T?.namespace,className:k,support:D,merchantContext:X,terms:O,...U?{deposit:U}:{},...L?.methods?{depositMethods:L.methods}:{},...K?{withdraw:K}:{},children:A})})})}export{y as StridgeProvider};
1
+ "use client";import{StridgeEventsContext as e}from"../events/context.js";import{createKitI18n as t}from"../shared/i18n/createKitI18n.js";import"../i18n/index.js";import{createStridgeCatalog as n}from"../drivers/stridge/catalog.js";import{createStridgeDepositDriver as r}from"../drivers/stridge/createStridgeDepositDriver.js";import{createStridgeWithdrawDriver as i}from"../drivers/stridge/createStridgeWithdrawDriver.js";import"../_internal/drivers/stridge/index.js";import{createBus as a}from"../events/bus/createBus.js";import{createFlowIdRegistry as o}from"../events/bus/flowIdRegistry.js";import{createMetadataStore as s}from"../events/bus/metadata.js";import"../events/bus/index.js";import{KitProvider as c}from"../KitProvider.js";import{resolveMerchantLink as l}from"../shared/merchant-link/resolveMerchantLink.js";import"../shared/merchant-link/index.js";import{useIntercomMerchantContext as u}from"../shared/support/useIntercomMerchantContext.js";import{useMerchantContext as ee}from"../shared/support/useMerchantContext.js";import"../shared/support/index.js";import{useDeepMemo as d}from"../shared/utils/useDeepMemo.js";import{ConnectWalletContext as f}from"../shared/wallet/ConnectWalletContext.js";import{DepositOwnerContext as p}from"./depositOwner.js";import{useOptionalWagmi as m}from"./optionalWagmi.js";import{createStubDepositDriver as h,createStubWithdrawDriver as g}from"./stubs.js";import{useEffect as _,useMemo as v,useRef as y}from"react";import{jsx as b}from"react/jsx-runtime";function x({gatewayKey:x,environment:S,asset:C,flows:w,appearance:T,i18n:E,storage:D,dev:O,support:k,terms:te,prefetch:A,connectWallet:j,className:M,children:N}){if(!w.deposit&&!w.withdraw)throw Error("<StridgeProvider /> requires at least one of `flows.deposit` or `flows.withdraw`.");if(!C)throw Error("<StridgeProvider /> requires `asset: { networkId, symbol }`.");let{config:P,address:F}=m(),I=v(()=>t(E??{}),[E?.locale,E?.messages]),L=y(I);L.current=I;let R=d(C),z=d(w.deposit),B=d(w.withdraw),V=R.networkId,H=R.symbol,U=z?.owner?.address??F??O?.userAddressOverride,W=B?.owner.address,G=v(()=>n({projectKey:x,...S?{environment:S}:{}}),[x,S]),K=v(()=>{if(!(!z||!U))return r({userAddress:U,projectKey:x,destination:{network_id:V,asset_symbol:H,to_address:z.destination.address},wagmiConfig:P,catalog:G,getI18n:()=>L.current,...S?{environment:S}:{},...z.minAmountUsd===void 0?{}:{minAmountUsd:z.minAmountUsd},...z.maxAmountUsd===void 0?{}:{maxAmountUsd:z.maxAmountUsd},...z.metadata?{metadata:z.metadata}:{}})},[z,U,x,S,V,H,P,G]),q=v(()=>h(),[]),J=z?K??q:void 0,Y=v(()=>{if(!(!B||!W))return i({userAddress:W,projectKey:x,currency:{networkId:V,assetSymbol:H},wagmiConfig:P,catalog:G,getI18n:()=>L.current,...S?{environment:S}:{},...B.minAmountUsd===void 0?{}:{minAmountUsd:B.minAmountUsd},...B.maxAmountUsd===void 0?{}:{maxAmountUsd:B.maxAmountUsd},...B.metadata?{metadata:B.metadata}:{}})},[B,W,x,S,V,H,P,G]),X=v(()=>g(),[]),Z=B?Y??X:void 0;_(()=>{if(!A)return;let e=A===!0||A.includes(`deposit`),t=A===!0||A.includes(`withdraw`);e&&K?.arm(),t&&Y?.arm()},[A,K,Y]);let ne=v(()=>z?{resolved:U!==void 0}:null,[z,U]),re=v(()=>j?{onClick:j.onClick,...j.label===void 0?{}:{label:j.label}}:null,[j?.onClick,j?.label]),Q=U??W,$=ee({gatewayKey:x,environment:S??`production`,assetChain:V,assetSymbol:H,...Q?{userAddress:Q}:{},...K?{depositDriver:K}:{}});return u(l(k?{url:k.url,onSelect:k.onOpen}:void 0).kind===`default`?$:null),b(e,{value:v(()=>({bus:a(),flowIds:o(),metadata:s()}),[]),children:b(f,{value:re,children:b(p,{value:ne,children:b(c,{theme:T?.theme,accent:T?.accent,radius:T?.radius,direction:T?.direction,attribution:T?.attribution,i18n:E,storage:D?.driver,storageNamespace:D?.namespace,className:M,support:k,merchantContext:$,terms:te,...J?{deposit:J}:{},...z?.methods?{depositMethods:z.methods}:{},...Z?{withdraw:Z}:{},children:N})})})})}export{x as StridgeProvider};
@@ -0,0 +1 @@
1
+ "use client";import{createContext as e,use as t}from"react";const n=e(null);n.displayName=`DepositOwnerContext`;function r(){return t(n)}export{n as DepositOwnerContext,r as useDepositOwnerContext};
@@ -1 +1 @@
1
- const e=Object.freeze({status:`idle`}),t=Object.freeze({brand:e,target:e,addresses:e,balances:e,quote:e,settlement:e,wallet:e}),n=Object.freeze({withdrawableBalances:e,receiveOptions:e,quote:e,settlement:e}),r=()=>{};function i(){if(typeof DOMException==`function`)return new DOMException(`Aborted`,`AbortError`);let e=Error(`Aborted`);return e.name=`AbortError`,e}function a(e){return new Promise((t,n)=>{if(e.aborted){n(i());return}e.addEventListener(`abort`,()=>n(i()),{once:!0})})}function o(){return{getSnapshot:()=>t,subscribe:()=>r,requestQuote:(e,t)=>a(t),submitDeposit:(e,t)=>a(t),watchSettlement:()=>{},fetchActiveSettlement:async()=>null}}function s(){return{getSnapshot:()=>n,subscribe:()=>r,requestQuote:(e,t)=>a(t),prepareWithdrawal:(e,t)=>a(t),watchSettlement:()=>{}}}export{o as createStubDepositDriver,s as createStubWithdrawDriver};
1
+ const e=Object.freeze({status:`idle`}),t=Object.freeze({brand:e,target:e,addresses:e,balances:e,quote:e,settlement:e,wallet:e}),n=Object.freeze({withdrawableBalances:e,receiveOptions:e,quote:e,settlement:e}),r=()=>{};function i(){if(typeof DOMException==`function`)return new DOMException(`Aborted`,`AbortError`);let e=Error(`Aborted`);return e.name=`AbortError`,e}function a(e){return new Promise((t,n)=>{if(e.aborted){n(i());return}e.addEventListener(`abort`,()=>n(i()),{once:!0})})}function o(){return{getSnapshot:()=>t,subscribe:()=>r,arm:()=>{},requestQuote:(e,t)=>a(t),submitDeposit:(e,t)=>a(t),watchSettlement:()=>{},fetchActiveSettlement:async()=>null}}function s(){return{getSnapshot:()=>n,subscribe:()=>r,arm:()=>{},requestQuote:(e,t)=>a(t),prepareWithdrawal:(e,t)=>a(t),watchSettlement:()=>{}}}export{o as createStubDepositDriver,s as createStubWithdrawDriver};
@@ -1604,6 +1604,10 @@
1604
1604
  inset-inline-start: 0;
1605
1605
  }
1606
1606
 
1607
+ .xbudbmw {
1608
+ inset-inline-start: 50%;
1609
+ }
1610
+
1607
1611
  .xc8icb0 {
1608
1612
  isolation: isolate;
1609
1613
  }
@@ -2016,6 +2020,10 @@
2016
2020
  transform: rotate(90deg);
2017
2021
  }
2018
2022
 
2023
+ .x11lhmoz {
2024
+ transform: translate(-50%, -50%);
2025
+ }
2026
+
2019
2027
  .xx6bhzk {
2020
2028
  transition-duration: .15s;
2021
2029
  }
@@ -2957,6 +2965,10 @@
2957
2965
  top: 14px;
2958
2966
  }
2959
2967
 
2968
+ .xwa60dl {
2969
+ top: 50%;
2970
+ }
2971
+
2960
2972
  .xh8yej3 {
2961
2973
  width: 100%;
2962
2974
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stridge/kit",
3
- "version": "0.1.0-alpha.37",
3
+ "version": "0.1.0-alpha.39",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "files": [
@@ -1,29 +0,0 @@
1
- import { DepositDriver } from "../flows/deposit/driver/types.js";
2
- //#region src/stridge/StridgeContext.d.ts
3
- /**
4
- * Slim Stridge-specific context published by `<StridgeProvider />`. The driver itself is the
5
- * single source of entity data — components reach for `useDepositSnapshot()` to read brand / target /
6
- * addresses / balances / quote / settlement / wallet entities. This context exposes only the
7
- * driver instance + a readiness flag so consumers can branch on bootstrap state.
8
- */
9
- interface StridgeContextValue {
10
- /** `true` once the driver's bootstrap (`gateway/start` + `supportedAssets`) has resolved. */
11
- isReady: boolean;
12
- /** The active {@link DepositDriver} instance, when bootstrap completed. */
13
- driver: DepositDriver | undefined;
14
- }
15
- /**
16
- * Read the {@link StridgeContextValue} from the nearest `<StridgeProvider />`. Throws when no
17
- * provider is mounted. For BYO-driver hosts using `<KitProvider deposit={…} />` directly,
18
- * `useStridge` is not applicable — use {@link useOptionalStridge} when the same component may
19
- * render under either provider.
20
- */
21
- declare function useStridge(): StridgeContextValue;
22
- /**
23
- * Non-throwing variant of {@link useStridge}. Returns the context value when a
24
- * `<StridgeProvider />` is mounted above, or `null` when the component renders under a plain
25
- * `<KitProvider />`.
26
- */
27
- declare function useOptionalStridge(): StridgeContextValue | null;
28
- //#endregion
29
- export { useOptionalStridge, useStridge };
@@ -1 +0,0 @@
1
- "use client";import{createContext as e,use as t}from"react";const n=e(null);n.displayName=`StridgeContext`;function r(){let e=t(n);if(!e)throw Error(`useStridge: must be used inside a <StridgeProvider />. Hosts assembling a custom driver against <KitProvider /> should not call useStridge.`);return e}function i(){return t(n)}export{n as StridgeContext,i as useOptionalStridge,r as useStridge};