-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #44 from metastellar-io/main
Docs update
- Loading branch information
Showing
16 changed files
with
959 additions
and
514 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,79 @@ | ||
(function (Prism) { | ||
|
||
Prism.languages.typescript = Prism.languages.extend('javascript', { | ||
'internalType': /walletAsset|NativeBalance|DataPacket|AssetBalance/, | ||
'keywords': { | ||
pattern: /(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?|(?<=\n).*?(?=:)/, | ||
lookbehind: true, | ||
greedy: true, | ||
inside: null // see below | ||
}, | ||
'builtin': /\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown|String)\b/, | ||
|
||
|
||
}); | ||
|
||
// The keywords TypeScript adds to JavaScript | ||
Prism.languages.typescript.keyword.push( | ||
/\b(?:abstract|declare|is|keyof|readonly|require)\b/, | ||
// keywords that have to be followed by an identifier | ||
/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/, | ||
// This is for `import type *, {}` | ||
/\btype\b(?=\s*(?:[\{*]|$))/, | ||
|
||
); | ||
|
||
// doesn't work with TS because TS is too complex | ||
delete Prism.languages.typescript['parameter']; | ||
delete Prism.languages.typescript['literal-property']; | ||
|
||
// a version of typescript specifically for highlighting types | ||
var typeInside = Prism.languages.extend('typescript', {}); | ||
delete typeInside['class-name']; | ||
|
||
Prism.languages.typescript['class-name'].inside = typeInside; | ||
|
||
Prism.languages.insertBefore('typescript', 'function', { | ||
'decorator': { | ||
pattern: /@[$\w\xA0-\uFFFF]+/, | ||
inside: { | ||
'at': { | ||
pattern: /^@/, | ||
alias: 'operator' | ||
}, | ||
'function': /^[\s\S]+/ | ||
} | ||
}, | ||
'generic-function': { | ||
// e.g. foo<T extends "bar" | "baz">( ... | ||
pattern: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/, | ||
greedy: true, | ||
inside: { | ||
'function': /^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/, | ||
'generic': { | ||
pattern: /<[\s\S]+/, // everything after the first < | ||
alias: 'class-name', | ||
inside: typeInside | ||
} | ||
} | ||
} | ||
}); | ||
|
||
Prism.languages.ts = Prism.languages.typescript; | ||
(function (){ | ||
let typelinks = [...document.getElementsByClassName('token internalType')]; | ||
console.log("typelinks"); | ||
console.log(typelinks); | ||
console.log("typelinks.length"); | ||
console.log(typelinks.length); | ||
for (let i = 0; i < typelinks.length; i++) { | ||
console.log("typelinks[i]"); | ||
console.log(typelinks[i]); | ||
let type = typelinks[i].innerText; | ||
console.log(type); | ||
typelinks[i].innerHTML = `<a href="/#/?id=${type}">${type}</a>`; | ||
} | ||
}()); | ||
|
||
}(Prism)); | ||
|
Empty file.
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,100 @@ | ||
# Metastellar FAQ | ||
Please See if your question is anwsered by the FAQ | ||
|
||
|
||
|
||
<div style="width:50%; height:0; padding-bottom:100%; position:relative;"><div style="width:100%;height:0;padding-bottom:100%;position:relative;"><iframe src="https://giphy.com/embed/XZyZJCtQHo7dPGWjG2" width="100%" height="100%" style="position:absolute" frameBorder="0" class="giphy-embed" allowFullScreen></iframe></div><p><a href="https://giphy.com/gifs/netflix-duncan-trussell-midnight-gospel-the-XZyZJCtQHo7dPGWjG2">via GIPHY</a></p> | ||
</div> | ||
|
||
|
||
# MetaStellar Wallet | ||
|
||
[github](https://github.com/paulfears/StellarSnap) [discord](https://discord.gg/ETQk4UcYyc) | ||
|
||
Metastellar wallet is a Stellar wallet for Metamask. This allows you to interact with the stellar blockchain and hold XLM with Metamask. | ||
Metastellar can hold your XLM, stellar, and stellar assets, as well as interact with stellar web3 applications. At the current time, <b>we do not recommend using metastellar as your primary stellar wallet</b>, but my team and I are constantly working to improve the wallet. If you are having a problem, with the wallet please contact | ||
|
||
<b>support@metastellar.io</b> | ||
|
||
and we will work to get it resolved. This is open-source software and is provided as-is. We are not responsible for anything loss of funds that results from the use or misuse of this software. | ||
|
||
------------------------------------------- | ||
|
||
## Install | ||
|
||
to install the Stellar-Snap | ||
|
||
1. Make sure you have the latest version of the <b>Metamask Browser extension</b>, it can be installed [here](https://metamask.io/download/) | ||
2. After metamask is installed | ||
|
||
<button id="installButton">Install MetaStellar</button> | ||
|
||
<br> | ||
<div class="appearOnConnected"> | ||
<p>You can test you're installation with</p> | ||
<br> | ||
<button id="viewAddress">Test Install</button> | ||
</div> | ||
|
||
<div class="spacer"></div> | ||
|
||
|
||
<script> | ||
console.log("script live"); | ||
let metastellarButton = document.getElementById("installButton"); | ||
metastellarButton.addEventListener('click', async ()=>await connectSnap()); | ||
|
||
let viewAddress = document.getElementById('viewAddress'); | ||
viewAddress.addEventListener('click', async ()=>await displayAddress()); | ||
|
||
function setConnected(connected){ | ||
let display = connected? 'block' : 'none' | ||
let elements = document.getElementsByClassName('appearOnConnected'); | ||
for(let i = 0; i<elements.length; i++){ | ||
elements[i].style.display = display | ||
} | ||
} | ||
|
||
setConnected(false); | ||
|
||
async function connectSnap(){ | ||
try{ | ||
console.log("here") | ||
const connected = await ethereum.request({ | ||
method: 'wallet_requestSnaps', | ||
params: { | ||
['npm:stellar-snap']: {} | ||
}, | ||
}); | ||
console.log(connected) | ||
setConnected(true) | ||
return true; | ||
}catch(e){ | ||
if (e.toString() === "ReferenceError: ethereum is not defined"){ | ||
alert("Install Metamask") | ||
} | ||
alert(e); | ||
setConnected(false); | ||
return false; | ||
} | ||
} | ||
|
||
|
||
async function displayAddress(){ | ||
try{ | ||
const request = { | ||
method: 'wallet_invokeSnap', | ||
params: {snapId:`npm:stellar-snap`, | ||
request:{ | ||
method: `${'showAddress'}` | ||
} | ||
} | ||
} | ||
let address = await ethereum.request(request); | ||
} | ||
catch(e){ | ||
alert(e); | ||
} | ||
} | ||
|
||
</script> |
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"> | ||
<title>Document</title> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> | ||
<meta name="description" content="Description"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0"> | ||
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify@4/lib/themes/vue.css"> | ||
</head> | ||
<body> | ||
<div id="app"></div> | ||
<script> | ||
window.$docsify = { | ||
name: 'Metastellar FAQ', | ||
repo: '', | ||
executeScript: true, | ||
} | ||
</script> | ||
<!-- Docsify v4 --> | ||
<script src="//cdn.jsdelivr.net/npm/docsify@4"></script> | ||
<style> | ||
|
||
|
||
|
||
.spacer{ | ||
display: flex; | ||
height: 15vh; | ||
width:100%; | ||
} | ||
|
||
button{ | ||
display: inline-block; | ||
outline: none; | ||
cursor: pointer; | ||
font-weight: 600; | ||
border-radius: 3px; | ||
padding: 12px 24px; | ||
border: 0; | ||
color: #fff; | ||
background: #ff5000; | ||
line-height: 1.15; | ||
font-size: 16px; | ||
|
||
} | ||
button:hover { | ||
transition: all .2s ease; | ||
background: #da4601; | ||
} | ||
|
||
</style> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export const snapId = import.meta.env.DEV? "local:http://localhost:8080/" : "npm:stellar-snap" | ||
export const snapId = "npm:stellar-snap" |
File renamed without changes.
This file was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.