-
Notifications
You must be signed in to change notification settings - Fork 8
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
Showing
20 changed files
with
554 additions
and
227 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
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 |
---|---|---|
|
@@ -4,7 +4,6 @@ | |
<meta charset="UTF-8" /> | ||
<link rel="icon" type="image/svg+xml" href="/vite.svg" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r134/three.min.js"></script> | ||
<script src="https://bundle.run/[email protected]"></script> | ||
<script> | ||
/** | ||
|
@@ -20,11 +19,6 @@ | |
<div id="app"></div> | ||
<script type="module" src="/src/main.ts"></script> | ||
</div> | ||
<script src="https://cdn.jsdelivr.net/npm/vanta@latest/dist/vanta.rings.min.js"></script> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/soroban-client/1.0.0-beta.2/soroban-client.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/stellar-sdk.min.js"></script> | ||
<script> | ||
|
||
</script> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/stellar-sdk/11.1.0/stellar-sdk.js"></script> | ||
</body> | ||
</html> |
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
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
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
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
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 |
---|---|---|
@@ -1,10 +1,25 @@ | ||
<script> | ||
import {address} from '../store' | ||
import {Card} from 'flowbite-svelte' | ||
import {Card, Button} from 'flowbite-svelte' | ||
import {snapId} from '../constants' | ||
async function fund(){ | ||
const fundResult = await window.ethereum.request({ | ||
method: 'wallet_invokeSnap', | ||
params: { | ||
snapId: snapId, | ||
request: { | ||
method: 'fund', | ||
}, | ||
}, | ||
}); | ||
} | ||
</script> | ||
|
||
<div class="w-fit flex-col justify-start p-6 bg-white border border-gray-200 rounded-lg shadow dark:bg-gray-800 dark:border-gray-700"> | ||
<h2>Metamask Account</h2> | ||
{$address} | ||
<br> | ||
<Button on:click={fund}>Fund Wallet</Button> | ||
</div> | ||
<br/> |
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,42 @@ | ||
<script lang="ts"> | ||
import FunctionContainer from "./functionContainer.svelte"; | ||
import {snapId} from '../constants'; | ||
import {testnet} from '../store'; | ||
import FunctionButton from "./functionButton.svelte"; | ||
function genreateCode(method:string, params:any){ | ||
return ` | ||
window.ethereum.request({ | ||
method: 'wallet_invokeSnap', | ||
params: { | ||
snapId: '${snapId}', | ||
request: { | ||
method: '${method}', | ||
params: ${JSON.stringify(params)} | ||
}, | ||
}, | ||
}) | ||
.then((result)=>alert(JSON.stringify(result))) | ||
` | ||
} | ||
</script> | ||
|
||
<FunctionContainer method="listAccounts" code={genreateCode("listAccounts", {})} params={{}}> | ||
<p slot="title">list the wallet Accounts</p> | ||
</FunctionContainer> | ||
<FunctionContainer method="setCurrentAccount" code={genreateCode("setCurrentAccount", {"address":"ADDRESS"})} params={{"address":"string"}}> | ||
<p slot="title">set The currentAccount</p> | ||
</FunctionContainer> | ||
<FunctionContainer method="getCurrentAccount" code={genreateCode("getCurrentAccount", {})}> | ||
<p slot="title">get the current Account</p> | ||
</FunctionContainer> | ||
<FunctionContainer method="importAccount" code={genreateCode("getCurrentAccount", {})} params={{"name":"string","privateKey":"string"}}> | ||
<p slot="title">import An Account</p> | ||
</FunctionContainer> | ||
<FunctionContainer method="createAccount" code={genreateCode("getCurrentAccount", {})} params={{"name":"string"}}> | ||
<p slot="title">Create A new Account</p> | ||
</FunctionContainer> | ||
<FunctionContainer method="renameAccount" code={genreateCode("getCurrentAccount", {})} params={{"address":"string","name":"string"}}> | ||
<p slot="title">rename an Account</p> | ||
</FunctionContainer> | ||
<FunctionButton method="clearState">Clear All Accounts</FunctionButton> |
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
Oops, something went wrong.