Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
210 commits
Select commit Hold shift + click to select a range
b8f5fdd
Init. Swap stampers by passing in enum
amircheikh Jun 6, 2025
6c1650d
Cross platform session management init
amircheikh Jun 9, 2025
b92a65b
Platform specific stampers (WIP)
amircheikh Jun 9, 2025
d62efe1
Multi session and multi keypair storage (web only)
amircheikh Jun 10, 2025
fdeeb22
Modified session storage. Added mobile storage manager
amircheikh Jun 11, 2025
8cd232e
Mobile keychain stamper
amircheikh Jun 11, 2025
448886e
Cross platform passkey stamper
amircheikh Jun 12, 2025
19dc82a
added swagger type gen to sdk-types
ethankonk Jun 12, 2025
9b06172
fixed type generation for request base types
ethankonk Jun 16, 2025
546c102
Small fixes for mismatched orgid
amircheikh Jun 16, 2025
3774ebd
Renames and retypes
amircheikh Jun 16, 2025
51298ca
added custom activity responses
ethankonk Jun 16, 2025
6164501
rebased
ethankonk Jun 16, 2025
1d48c8c
fixed sdk-types api Response and Request type generation
ethankonk Jun 16, 2025
c33778f
updated typing in sdk-js
ethankonk Jun 17, 2025
be90958
added sugared wallet functions and started auth stuff
ethankonk Jun 18, 2025
5558026
added signup with passkey
ethankonk Jun 20, 2025
86db731
added otp auth
ethankonk Jun 23, 2025
8a90571
change init otp response
moe-dev Jun 24, 2025
30bd34c
conditionally sign up or login for otp
ethankonk Jun 24, 2025
84928b2
fixed everything
ethankonk Jun 24, 2025
e48f548
added google oauth
ethankonk Jun 24, 2025
961ed59
fix double oauth providers
moe-dev Jun 24, 2025
f10985c
fixed sdk side oauth
ethankonk Jun 25, 2025
ff97a45
fixed auth keypair cleanup in one tap passkey sign up and failed auth…
ethankonk Jun 25, 2025
895adbb
React wallet kit init. Modal init
amircheikh Jun 23, 2025
f1469d0
More modal upgrades
amircheikh Jun 24, 2025
524b615
Refactored modal. Icon button started
amircheikh Jun 25, 2025
24e754a
Iconbutton dark/light mode functionality
amircheikh Jun 25, 2025
0d0fe8c
added react providers to react-wallet-kit
ethankonk Jun 26, 2025
2038632
fixed sdk-type type generation to match sdk-server and sdk-browser
ethankonk Jun 27, 2025
8fe90c7
Polished colors and buttons
amircheikh Jun 26, 2025
a897501
Auth component started. Google oAuth
amircheikh Jun 26, 2025
eb969e7
added all sugared functions from core to react-wallet-kit provider, a…
ethankonk Jun 27, 2025
62413ce
added new beforeSessionExpiry callback
ethankonk Jun 30, 2025
f1a002a
Proper oauth flow in auth component. Spinners and design
amircheikh Jun 27, 2025
4b352ee
added session expiration management
ethankonk Jun 30, 2025
42eb637
re-synced sdk, added user, wallets, and proxyAuthConfig to the context
ethankonk Jul 1, 2025
4b1d43a
re-synced sdk, added user, wallets, and proxyAuthConfig to the context
ethankonk Jul 1, 2025
f4ed70a
Email flow in auth component
amircheikh Jun 30, 2025
f95dec4
Auth component functionally complete. Need more mork
amircheikh Jul 1, 2025
fdbf36c
better errors and error handling
ethankonk Jul 2, 2025
761fb37
updated auth proxy type generation
ethankonk Jul 2, 2025
ab3b826
updated auth proxy type generation
ethankonk Jul 2, 2025
3572b3b
Better buttons, started customization
amircheikh Jul 2, 2025
502da6a
added session token to session object, added updateUser method
ethankonk Jul 2, 2025
1a67aac
Auth component ordering
amircheikh Jul 2, 2025
4cd2c4e
more customization. Apple and facebbok oauth
amircheikh Jul 7, 2025
0893319
fixed error bubbling up issue
ethankonk Jul 7, 2025
4169f50
added import and export modals
ethankonk Jul 8, 2025
e63ff30
refactored wallet stamper and added to sdk-js, and ewk
moeodeh3 Jul 8, 2025
4b80afa
Signing modal. Modal changes. Customization
amircheikh Jul 8, 2025
639ee70
fixed import wallet logic, added success modal to it as well
ethankonk Jul 8, 2025
dc70ccf
More customization in provider
amircheikh Jul 9, 2025
a78b439
implemented adding oauth providers and updating email and phone number
ethankonk Jul 9, 2025
10d7ca4
added user name update modal and adding passkey
ethankonk Jul 9, 2025
f919c7c
added remove passkey, email, phone, oauth provider methods and modals
ethankonk Jul 10, 2025
1de1db0
added loginOrSignupWithWallet
moeodeh3 Jul 10, 2025
e9a69f6
fixed issue with eth publicKey derivation
moeodeh3 Jul 10, 2025
33e33c8
rebase
moeodeh3 Jul 10, 2025
2c3a545
Portal and tailwind fixes. new demo added
amircheikh Jul 10, 2025
6edeaa4
fixed issue with atob
moeodeh3 Jul 10, 2025
8c12ded
fix wallet fetch failing
moeodeh3 Jul 10, 2025
ea2ec1f
added passkey remove and add modal, and oauth remove modal
ethankonk Jul 11, 2025
959a0ee
Wallet login in auth component
amircheikh Jul 11, 2025
0b826ed
updated fetchWallets to include linked wallets
moeodeh3 Jul 11, 2025
557b670
cleaned up
moeodeh3 Jul 11, 2025
c0decf7
prettier
moeodeh3 Jul 11, 2025
17376f9
Createsuborg params fix
amircheikh Jul 11, 2025
f51b209
added ability to link a wallet
moeodeh3 Jul 14, 2025
e492051
Demo ewk config panel started
amircheikh Jul 14, 2025
8d5d7cb
handeLinkWallet modal
amircheikh Jul 15, 2025
2ba4bc0
refresh wallets when user links wallets, add wallet unlinking
moeodeh3 Jul 16, 2025
c548d12
beginning core-js clean up
ethankonk Jul 11, 2025
fd2eeaa
started adding proto gen auth proxy methods
ethankonk Jul 15, 2025
a434a4d
fixed session refresh bug and new wallet accounts type issues
ethankonk Jul 21, 2025
5037011
Demo wallet continued
amircheikh Jul 16, 2025
4117acf
Cleanup, bug fixes, ease of use
amircheikh Jul 21, 2025
dda8736
added a wallet accounts auto gen option and added stamp with option t…
ethankonk Jul 22, 2025
6aaa5ce
added custom params for sign message to allow for encoding type and h…
ethankonk Jul 22, 2025
1cbb32e
add disconnect listeners for eth and solana wallets
moeodeh3 Jul 22, 2025
38081f7
Mobile modals support. Modal polish
amircheikh Jul 22, 2025
4de9059
fixed intellisense issues and type exporting
ethankonk Jul 23, 2025
9a3594e
added back refreshing users and wallets
ethankonk Jul 23, 2025
c2498eb
Dev facing errors and session/state consistacny
amircheikh Jul 23, 2025
de49902
add ability to sign with connected wallets in signMessage
moeodeh3 Jul 24, 2025
3aff198
fixed solana/web3.js dependency issue
moeodeh3 Jul 24, 2025
07dfe34
fixed circular dependencies and type issues
ethankonk Jul 24, 2025
69647f4
fixed circular dependencies and type issues
ethankonk Jul 24, 2025
3b95cf7
added jsdocs comments to all provider and core methods
ethankonk Jul 25, 2025
fd91783
added ability to sign with connected wallets in signTransaction
moeodeh3 Jul 25, 2025
e9e23d6
rebased
moeodeh3 Jul 25, 2025
81cac89
fixed comments, and refactored some of the modal implementations
ethankonk Jul 28, 2025
3a8c75b
cleaned up wallet manager
moeodeh3 Jul 28, 2025
df6b291
renamed signer to connector
moeodeh3 Jul 28, 2025
1d26bd2
reverted changes to wallet-stamper
moeodeh3 Jul 28, 2025
3b6b6ec
removed wallet-stamper from react-wallet-kit
moeodeh3 Jul 28, 2025
a7cf393
fixed jsdocs for provider exported functions
ethankonk Jul 28, 2025
d3c603f
fixed bad import
ethankonk Jul 28, 2025
fdbb063
Modal reworked to remove dialogs. Demo app continued
amircheikh Jul 25, 2025
281c55a
Demo app lookin nice.
amircheikh Jul 28, 2025
08611ae
updated types
moe-dev Jul 29, 2025
d75163a
added gen docs for sdk-js and react-wallet-kit
ethankonk Jul 30, 2025
0c53242
polishing js-doc comments
ethankonk Jul 30, 2025
9a353c9
Compat fixes for react
amircheikh Jul 30, 2025
918ae90
Modals now prevent scroll on page
amircheikh Aug 4, 2025
6bf75fa
added walletConnect for ethereum
moeodeh3 Jul 31, 2025
3941130
fixed some race conditions and cleaned up
moeodeh3 Aug 1, 2025
a1ef37c
rebased
moeodeh3 Aug 1, 2025
a116634
start adding solana support for walletConnect
moeodeh3 Aug 1, 2025
8074d05
got solana connect to work
moeodeh3 Aug 2, 2025
adb46a0
finished solana walletConnect
moeodeh3 Aug 3, 2025
a7b66e1
consolidated ethereum and solana walletConnect
moeodeh3 Aug 4, 2025
bb021be
clean up walletConnect
moeodeh3 Aug 5, 2025
2a968e8
added signAndSendTransaction
moeodeh3 Aug 5, 2025
33cb24c
added a bunch to the demo and resynced sdk for new auth proxy changes
ethankonk Aug 5, 2025
b95236e
added toastify and fixed some auth proxy issues
ethankonk Aug 5, 2025
e3a290d
fixed mobile responsiveness for demo
ethankonk Aug 5, 2025
51b36f1
cleaned up hydration errors for mobile demo view
ethankonk Aug 5, 2025
49e050d
more demo polish
ethankonk Aug 5, 2025
eba0a98
fix signMessage in react-wallet-kit
moeodeh3 Aug 6, 2025
2709e4a
Fixed sign verification issue for connected wallets and session refre…
ethankonk Aug 7, 2025
a2876f1
Added wallet connect screen
amircheikh Aug 6, 2025
1cd9649
Node >18 fix
amircheikh Aug 7, 2025
bcc577d
Mega rebase
amircheikh Aug 7, 2025
66fb9a0
added ability to switch chains for ethereum wallets
moeodeh3 Aug 7, 2025
c781686
add walletConnect config
moeodeh3 Aug 7, 2025
946c7d8
fixed WalletConnect chain switching, and signAndSendTransaction
moeodeh3 Aug 7, 2025
a161851
Demo fixes and email uniqueness patch
amircheikh Aug 7, 2025
10094da
cleaned up solana signing
moeodeh3 Aug 7, 2025
06c9ba7
fixed build linting issues and tweaked colour select logic
ethankonk Aug 7, 2025
5824deb
added tsconfig.typecheck.json for sdk-js
ethankonk Aug 8, 2025
b29e95a
Demo styling
amircheikh Aug 8, 2025
ae8eed0
Mega rebase
amircheikh Aug 8, 2025
5597f94
Demo mobile fix
amircheikh Aug 8, 2025
83421bd
made primary bg picker change theme for the whole demo
ethankonk Aug 11, 2025
23d41d4
renamed sdk-js to core
ethankonk Aug 11, 2025
b203ddb
Remove deps from wallet demo
amircheikh Aug 11, 2025
63f934a
Demo button fix
amircheikh Aug 11, 2025
d435ef4
made email social linking a google accounts only thing
ethankonk Aug 11, 2025
b00658f
fixed comments made by bryce and andrew for demo
ethankonk Aug 12, 2025
86c8233
enable mobile
moeodeh3 Aug 12, 2025
67344e2
wallet config fix
moeodeh3 Aug 12, 2025
b61a105
Resolved comments
amircheikh Aug 12, 2025
97a8988
Rebase fixes
amircheikh Aug 12, 2025
feda809
remove use of Buffer
moeodeh3 Aug 12, 2025
429d838
add comment headers
moeodeh3 Aug 12, 2025
ebe878b
add error codes
moeodeh3 Aug 12, 2025
0770ea5
Renamed config params and fetch masterconfig first
amircheikh Aug 12, 2025
40acaa4
regenerated core and react-wallet-kit docs
ethankonk Aug 12, 2025
e924895
Otp fix
amircheikh Aug 12, 2025
654d8a3
fixed package lock issues
ethankonk Aug 12, 2025
829b0bb
fixed js build error
ethankonk Aug 12, 2025
1161aca
prettier
ethankonk Aug 12, 2025
ac2fe6b
Config init fixes. More reliable
amircheikh Aug 13, 2025
58fcabb
reverted changelog changes
ethankonk Aug 13, 2025
60120ef
fixed changeset
ethankonk Aug 13, 2025
8dd22ad
Basic readmes
amircheikh Aug 13, 2025
2946c58
initial beta.0 release
turnekybc Aug 13, 2025
907316c
updated codegen, added util function to abstract core client try catc…
ethankonk Aug 15, 2025
bd069e3
fix not being able to override chains
moeodeh3 Aug 16, 2025
087263c
add console logs
moeodeh3 Aug 16, 2025
b2fe806
fix wallet chain initialization
moeodeh3 Aug 16, 2025
930ab9c
fix initializeProviders
moeodeh3 Aug 16, 2025
f3327b7
debug logs
moeodeh3 Aug 16, 2025
cbc92f4
remove logs
moeodeh3 Aug 17, 2025
0afb495
fixed sessions persisting on page close and reopen after session has …
ethankonk Aug 18, 2025
c44aad1
added exporting wallet accounts and exporting private keys
ethankonk Aug 18, 2025
838d7f1
fixed issues with tailwind 3
ethankonk Aug 19, 2025
6294064
Fix for turnkey styles are missing
amircheikh Aug 19, 2025
de1f5ba
Supress style error option
amircheikh Aug 19, 2025
e6d562d
cleaup and address comments
moeodeh3 Aug 19, 2025
06e05b8
add beta version 2
turnekybc Aug 19, 2025
05b948d
Update readme
amircheikh Aug 19, 2025
1d24683
add beta version 4
turnekybc Aug 19, 2025
3061ea0
fixed whats being exposed in our gen docs and added more comment headers
ethankonk Aug 20, 2025
7576942
fix initialization of event listeners for connected wallet providers
moeodeh3 Aug 20, 2025
cefd324
add chain switch listeners
moeodeh3 Aug 21, 2025
0131784
made chain switching tied to the wallet account instead of the provider
moeodeh3 Aug 21, 2025
adc7fd2
add chainInfo to walletAccount
moeodeh3 Aug 21, 2025
faf995a
nit
moeodeh3 Aug 21, 2025
5dd81a8
add WalletConnect listeners
moeodeh3 Aug 21, 2025
e8667e6
Added viem and other support for new packages
amircheikh Aug 21, 2025
cc918a9
wrap all function we export in the hook in useCallbacks
moeodeh3 Aug 22, 2025
2cbe445
updated the sdk reference generation to generate nice pages
ethankonk Aug 21, 2025
fd9102e
Fixed modal getting stuck if spammed
amircheikh Aug 22, 2025
6926a62
resynced core with mono
ethankonk Aug 22, 2025
1aade90
fixed pnpm lock
ethankonk Aug 22, 2025
575dba4
chore: prerelease (beta) @turnkey/react-wallet-kit @turnkey/core
turnekybc Aug 22, 2025
f4a4e1c
React wallet kit init. Modal init
amircheikh Jun 23, 2025
60f2328
Mega rebase
amircheikh Aug 8, 2025
004150a
fixed js build error
ethankonk Aug 12, 2025
5acb5ee
initial beta.0 release
turnekybc Aug 13, 2025
3918cb0
Revert "initial beta.0 release"
turnekybc Aug 13, 2025
efdcbc1
initial beta.0 release
turnekybc Aug 13, 2025
70b1c53
run prettier
turnekybc Aug 13, 2025
7881f7f
update tsconfig
turnekybc Aug 13, 2025
5610cdb
update package versions
turnekybc Aug 13, 2025
2272b10
updated codegen, added util function to abstract core client try catc…
ethankonk Aug 15, 2025
51d29b0
add beta version 4
turnekybc Aug 19, 2025
c4ecf20
initial commit to implement fiat onramp into @turnkey/core and @turnk…
turnekybc Aug 21, 2025
bd4669e
moonpay and coinbase ewk demo
turnekybc Aug 22, 2025
9a05ac6
moonpay URL signing
turnekybc Aug 23, 2025
2c42e4f
update import
turnekybc Aug 23, 2025
09dda76
add url signing for MoonPay SDK generated URLs
turnekybc Aug 27, 2025
2be5fa0
implement MoonPay SDK URL signing
turnekybc Sep 5, 2025
dcfc3c6
Merge remote-tracking branch 'origin/amir/sdk-js' into bc-implement-f…
turnekybc Sep 5, 2025
f74eb59
rebase
turnekybc Sep 5, 2025
e98874e
Merge remote-tracking branch 'origin/amir/sdk-js' into bc-implement-f…
turnekybc Sep 5, 2025
33fddcf
Merge remote-tracking branch 'origin/main' into bc-implement-fiat-onramp
turnekybc Sep 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 30 additions & 2 deletions examples/delegated-access/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,36 @@

### Patch Changes

- Updated dependencies [[`5d8be2d`](https://github.com/tkhq/sdk/commit/5d8be2d0329070c7aa025dddb1b28f04257ae4e6)]:
- @turnkey/sdk-server@4.7.0
- Updated dependencies []:
- @turnkey/sdk-server@4.7.0-beta.1

## 0.0.15-beta.3

### Patch Changes

- Updated dependencies []:
- @turnkey/sdk-server@4.7.0-beta.0

## 0.0.15-beta.2

### Patch Changes

- Updated dependencies []:
- @turnkey/sdk-server@4.5.1-beta.2

## 0.0.15-beta.1

### Patch Changes

- Updated dependencies []:
- @turnkey/sdk-server@4.5.1-beta.1

## 0.0.15-beta.0

### Patch Changes

- Updated dependencies []:
- @turnkey/sdk-server@4.5.1-beta.0

## 0.0.15-beta.4

Expand Down
89 changes: 75 additions & 14 deletions examples/react-components/src/app/dashboard/OnRamp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,21 @@ interface OnRampProps {
ethAddress: string;
}

type DisplayOption = "iframe" | "popup" | "newTab";

const displayOptions = ["iframe", "popup", "newTab"] as const;

export const OnRamp = ({ ethAddress }: OnRampProps) => {
const { turnkey, indexedDbClient } = useTurnkey();
const [isSignModalOpen, setSignModalOpen] = useState(false);
const [isOnrampModalOpen, setIsOnrampModalOpen] = useState(false);
const [onrampDisplayOption, setOnrampDisplayOption] =
useState<DisplayOption>("popup");

const [moonpayUrl, setMoonpayUrl] = useState<string | null>(null);
const [coinbaseUrl, setCoinbaseUrl] = useState<string | null>(null);

const handleModalOpen = () => setSignModalOpen(true);
const handleModalClose = () => setSignModalOpen(false);
const handleModalOpen = () => setIsOnrampModalOpen(true);
const handleModalClose = () => setIsOnrampModalOpen(false);

const generateCoinbaseUrl = async () => {
try {
Expand All @@ -39,11 +48,20 @@ export const OnRamp = ({ ethAddress }: OnRampProps) => {
});

if (response?.onRampUrl) {
window.open(
response.onRampUrl,
"_blank",
"popup,width=500,height=700,scrollbars=yes,resizable=yes",
);
if (onrampDisplayOption === "iframe") {
setCoinbaseUrl(response.onRampUrl);
return;
} else if (onrampDisplayOption === "popup") {
window.open(
response.onRampUrl,
"_blank",
"popup,width=500,height=700,scrollbars=yes,resizable=yes",
);
return;
} else if (onrampDisplayOption === "newTab") {
window.open(response.onRampUrl, "_blank", "noopener,noreferrer");
return;
}
}
} catch (error) {
console.error("Failed to init Coinbase on-ramp:", error);
Expand All @@ -67,11 +85,20 @@ export const OnRamp = ({ ethAddress }: OnRampProps) => {
});

if (response?.onRampUrl) {
window.open(
response.onRampUrl,
"_blank",
"popup,width=500,height=700,scrollbars=yes,resizable=yes",
);
if (onrampDisplayOption === "iframe") {
setMoonpayUrl(response.onRampUrl);
return;
} else if (onrampDisplayOption === "popup") {
window.open(
response.onRampUrl,
"_blank",
"popup,width=500,height=700,scrollbars=yes,resizable=yes",
);
return;
} else if (onrampDisplayOption === "newTab") {
window.open(response.onRampUrl, "_blank", "noopener,noreferrer");
return;
}
}
} catch (error) {
console.error("Failed to init MoonPay on-ramp:", error);
Expand All @@ -96,7 +123,7 @@ export const OnRamp = ({ ethAddress }: OnRampProps) => {
Add Funds
</button>

<Modal open={isSignModalOpen} onClose={handleModalClose}>
<Modal open={isOnrampModalOpen} onClose={handleModalClose}>
<Box
sx={{
outline: "none",
Expand Down Expand Up @@ -133,6 +160,28 @@ export const OnRamp = ({ ethAddress }: OnRampProps) => {
<Typography variant="subtitle2" sx={{ color: "#6C727E", mb: 2 }}>
Your crypto will be deposited directly into your Turnkey wallet
</Typography>
{displayOptions.map((displayOption) => {
const id = `plan-${displayOption}`;
return (
<label
key={displayOption}
htmlFor={id}
style={{ display: "block" }}
>
<input
id={id}
type="radio"
name="plan"
value={displayOption}
checked={onrampDisplayOption === displayOption}
onChange={(e) =>
setOnrampDisplayOption(e.target.value as DisplayOption)
}
/>
{displayOption}
</label>
);
})}
<div className="purchaseButtons">
<button className="whiteButton" onClick={generateMoonPayUrl}>
<img src="/images/moonpay.jpg" alt="MoonPay" />
Expand All @@ -143,6 +192,18 @@ export const OnRamp = ({ ethAddress }: OnRampProps) => {
Buy with Coinbase
</button>
</div>
{moonpayUrl && (
<iframe
src={moonpayUrl}
title="MoonPay OnRamp"
style={{
width: "100%",
height: "500px",
border: "none",
marginTop: "20px",
}}
></iframe>
)}
</Box>
</Modal>
</>
Expand Down
3 changes: 0 additions & 3 deletions examples/react-components/src/app/dashboard/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@ import Navbar from "../components/Navbar";
import { Toaster, toast } from "sonner";
import { jwtDecode } from "jwt-decode";
import { useSessionExpiry } from "../providers/SessionExpiryProvider";
import { MoonPayBuyWidget } from "@moonpay/moonpay-react";
import { loadMoonPay } from "@moonpay/moonpay-js";
import crypto from "crypto";

import { OnRamp } from "./OnRamp";

Expand Down
1 change: 1 addition & 0 deletions examples/react-wallet-kit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"@fortawesome/react-fontawesome": "^0.2.2",
"@headlessui/react": "^2.2.4",
"@hello-pangea/dnd": "^17.0.0",
"@moonpay/moonpay-js": "^0.7.0",
"@noble/hashes": "1.4.0",
"@react-three/drei": "^10.6.1",
"@react-three/fiber": "^8.18.0",
Expand Down
Binary file added examples/react-wallet-kit/public/coinbase.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions examples/react-wallet-kit/public/coinbase.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added examples/react-wallet-kit/public/moonpay.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions examples/react-wallet-kit/public/moonpay.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
43 changes: 43 additions & 0 deletions examples/react-wallet-kit/src/components/Svg.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -348,3 +348,46 @@ export function ImportSVG(props: SVGProps) {
</svg>
);
}

export function MoonPaySVG(props: SVGProps) {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
width="16"
height="16"
viewBox="0 0 16 16"
fill="currentColor"
{...props}
>
<rect x="0" y="0" width="16" height="16" fill="none" />
<rect x="12" y="0" width="3" height="1" fill="#7d00ff" />
<rect x="11" y="1" width="5" height="1" fill="#7d00ff" />
<rect x="10" y="2" width="6" height="1" fill="#7d00ff" />
<rect x="11" y="3" width="5" height="1" fill="#7d00ff" />
<rect x="3" y="4" width="6" height="1" fill="#7d00ff" />
<rect x="11" y="4" width="4" height="1" fill="#7d00ff" />
<rect x="2" y="5" width="8" height="1" fill="#7d00ff" />
<rect x="1" y="6" width="10" height="1" fill="#7d00ff" />
<rect x="0" y="7" width="12" height="5" fill="#7d00ff" />
<rect x="1" y="12" width="10" height="2" fill="#7d00ff" />
<rect x="2" y="14" width="8" height="1" fill="#7d00ff" />
<rect x="4" y="15" width="4" height="1" fill="#7d00ff" />
</svg>
);
}

export function CoinbaseSVG(props: SVGProps) {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
fill="currentColor"
viewBox="0 0 32 32"
{...props}
>
<path
fill="#0052FF"
d="M16 23c-3.867 0-7-3.133-7-7s3.133-7 7-7c3.465 0 6.34 2.526 6.895 5.833h7.053C29.352 7.647 23.338 2 16 2 8.27 2 2 8.27 2 16s6.27 14 14 14 13.352-5.647 13.948-12.833h-7.053A6.993 6.993 0 0 1 16 23Z"
/>
</svg>
);
}
21 changes: 21 additions & 0 deletions examples/react-wallet-kit/src/components/demo/DemoPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ import {
} from "@/utils";
import SignatureVerification from "./SignatureVerification";
import Image from "next/image";
import OnrampSelector from "./OnrampSelector";

export default function DemoPanel() {
const {
Expand Down Expand Up @@ -361,6 +362,26 @@ export default function DemoPanel() {
>
Sign Message
</Button>

<Button
onClick={async () => {
if (!selectedWalletAccount) return;
pushPage({
key: "Add funds to your wallet",
content: (
<OnrampSelector
selectedWalletAccount={selectedWalletAccount}
/>
),
preventBack: true,
showTitle: true,
});
}}
className="bg-primary-light dark:bg-primary-dark text-primary-text-light dark:text-primary-text-dark rounded-lg px-4 py-2 active:scale-95 transition-transform cursor-pointer"
>
<FontAwesomeIcon icon={faPlus} className="w-4 h-4 mr-2" /> Add Funds
</Button>

{selectedWallet?.source === WalletSource.Embedded && (
<>
<hr className="border-draggable-background-light dark:border-draggable-background-dark" />
Expand Down
Loading
Loading