-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ea52749
commit 881b420
Showing
1 changed file
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Jupiter Swap</title> | ||
<style> | ||
body { | ||
background-color: black; | ||
color: white; | ||
font-family: Verdana, Geneva, Tahoma, sans-serif; | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
justify-content: center; | ||
} | ||
|
||
#jupiter-terminal { | ||
width: 600px; | ||
height: 1200px; | ||
} | ||
</style> | ||
<script src="https://terminal.jup.ag/main-v2.js" data-preload defer></script> | ||
</head> | ||
|
||
<body> | ||
<h1>Jupiter Swap Demo</h1> | ||
<div id="jupiter-terminal"></div> | ||
<script> | ||
document.addEventListener("DOMContentLoaded", function () { | ||
|
||
console.log('LOADED') | ||
|
||
//create jupiter-terminal div | ||
const jupiterTerminal = document.createElement('div') | ||
jupiterTerminal.id = 'jupiter-terminal' | ||
document.body.appendChild(jupiterTerminal) | ||
|
||
// initialize the terminal | ||
window.Jupiter.init({ | ||
displayMode: "integrated", | ||
integratedTargetId: "jupiter-terminal", | ||
endpoint: "https://mainnet.helius-rpc.com/?api-key=YOUR_API_KEY_HERE", | ||
formProps: { | ||
fixedOutputMint: false | ||
} | ||
}); | ||
}); | ||
</script> | ||
</body> | ||
|
||
</html> |