aboutsummaryrefslogtreecommitdiffstats
path: root/static/images/badge.png
blob: 1cf21c9a84f198dc3a13f56973de994fd0f36bba (plain)
ofshex dumpascii
0000 89 50 4e 47 0d 0a 1a 0a 00 00 00 0d 49 48 44 52 00 00 00 48 00 00 00 48 08 06 00 00 00 55 ed b3 .PNG........IHDR...H...H.....U..
0020 47 00 00 00 09 70 48 59 73 00 00 0e c3 00 00 0e c3 01 c7 6f a8 64 00 00 00 19 74 45 58 74 53 6f G....pHYs..........o.d....tEXtSo
0040 66 74 77 61 72 65 00 77 77 77 2e 69 6e 6b 73 63 61 70 65 2e 6f 72 67 9b ee 3c 1a 00 00 09 df 49 ftware.www.inkscape.org..<.....I
0060 44 41 54 78 9c c5 9c 7d 90 57 55 19 c7 3f f7 b7 0b ec 0e 6f e2 ae bd 91 05 ae ec ca ca 58 81 8e DATx...}.WU..?.....o.........X..
0080 26 4b 1a a0 48 c8 30 93 e1 8c 96 fd 53 84 08 85 e5 54 66 8d e3 34 d5 df 0a 62 fc 65 93 a6 a1 53 &K..H.0.....S....Tf..4...b.e...S
00a0 6a 3a 93 f2 62 8e c9 44 29 96 44 4a ac bc 89 ca eb c2 f2 5a d0 fe 76 4f 7f 3c e7 07 77 cf 7d ee j:..b..D).DJ.......Z..vO.<..w.}.
00c0 bd e7 fe ee fd fd f6 99 39 b3 b3 e7 77 9e 97 fb bd e7 e5 39 cf 79 ce 0d 8c 31 d4 8b 82 20 68 00 ........9...w......9.y...1....h.
pre { line-height: 125%; } td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } .highlight .hll { background-color: #ffffcc } .highlight .c { color: #888 } /* Comment */ .highlight .err { color: #A61717; background-color: #E3D2D2 } /* Error */ .highlight .k { color: #080; font-weight: bold } /* Keyword */ .highlight .ch { color: #888 } /* Comment.Hashbang */ .highlight .cm { color: #888 } /* Comment.Multiline */ .highlight .cp { color: #C00; font-weight: bold } /* Comment.Preproc */ .highlight .cpf { color: #888 } /* Comment.PreprocFile */ .highlight .c1 { color: #888 } /* Comment.Single */ .highlight .cs { color: #C00; font-weight: bold; background-color: #FFF0F0 } /* Comment.Special */ .highlight .gd { color: #000; background-color: #FDD } /* Generic.Deleted */ .highlight .ge { font-style: italic } /* Generic.Emph */ .highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */ .highlight .gr { color: #A00 } /* Generic.Error */ .highlight .gh { color: #333 } /* Generic.Heading */ .highlight .gi { color: #000; background-color: #DFD } /* Generic.Inserted */ .highlight .go { color: #888 } /* Generic.Output */ .highlight .gp { color: #555 } /* Generic.Prompt */ .highlight .gs { font-weight: bold } /* Generic.Strong */ .highlight .gu { color: #666 } /* Generic.Subheading */ .highlight .gt { color: #A00 } /* Generic.Traceback */ .highlight .kc { color: #080; font-weight: bold } /* Keyword.Constant */ .highlight .kd { color: #080; font-weight: bold } /* Keyword.Declaration */ .highlight .kn { color: #080; font-weight: bold } /* Keyword.Namespace */ .highlight .kp { color: #080 } /* Keyword.Pseudo */ .highlight .kr { color: #080; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #00D; font-weight: bold } /* Literal.Number */ .highlight .s { color: #D20; background-color: #FFF0F0 } /* Literal.String */ .highlight .na { color: #369 } /* Name.Attribute */ .highlight .nb { color: #038 } /* Name.Builtin */ .highlight .nc { color: #B06; font-weight: bold } /* Name.Class */ .highlight .no { color: #036; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555 } /* Name.Decorator */ .highlight .ne { color: #B06; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #06B; font-weight: bold } /* Name.Function */ .highlight .nl { color: #369; font-style: italic } /* Name.Label */ .highlight .nn { color: #B06; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #369; font-weight: bold } /* Name.Property */ .highlight .nt { color: #B06; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #369 } /* Name.Variable */ .highlight .ow { color: #080 } /* Operator.Word */ .highlight .w { color: #BBB } /* Text.Whitespace */ .highlight .mb { color: #00D; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #00D; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #00D; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #00D; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #00D; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #D20; background-color: #FFF0F0 } /* Literal.String.Affix */ .highlight .sb { color: #D20; background-color: #FFF0F0 } /* Literal.String.Backtick */ .highlight .sc { color: #D20; background-color: #FFF0F0 } /* Literal.String.Char */ .highlight .dl { color: #D20; background-color: #FFF0F0 } /* Literal.String.Delimiter */ .highlight .sd { color: #D20; background-color: #FFF0F0 } /* Literal.String.Doc */ .highlight .s2 { color: #D20; background-color: #FFF0F0 } /* Literal.String.Double */ .highlight .se { color: #04D; background-color: #FFF0F0 } /* Literal.String.Escape */ .highlight .sh { color: #D20; background-color: #FFF0F0 } /* Literal.String.Heredoc */ .highlight .si { color: #33B; background-color: #FFF0F0 } /* Literal.String.Interpol */ .highlight .sx { color: #2B2; background-color: #F0FFF0 } /* Literal.String.Other */ .highlight .sr { color: #080; background-color: #FFF0FF } /* Literal.String.Regex */ .highlight .s1 { color: #D20; background-color: #FFF0F0 } /* Literal.String.Single */ .highlight .ss { color: #A60; background-color: #FFF0F0 } /* Literal.String.Symbol */ .highlight .bp { color: #038 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #06B; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #369 } /* Name.Variable.Class */ .highlight .vg { color: #D70 } /* Name.Variable.Global */ .highlight .vi { color: #33B } /* Name.Variable.Instance */ .highlight .vm { color: #369 } /* Name.Variable.Magic */ .highlight .il { color: #00D; font-weight: bold } /* Literal.Number.Integer.Long */
// import bolt11 from 'bolt11';
import validate from 'bitcoin-address-validation';
import bip21 from 'bip21';
import { get } from '$lib/utils';
import { goto } from '$app/navigation';

let debounce;
export default async (text) => {
	if (!text) return;
	console.log('parsing');

	// lightning
	if (text.startsWith('ln')) {
		try {
			console.log('lightning');
		} catch (e) {}
	}

	// bitcoin
	if (validate(text)) {
		console.log('bitcoin');
		goto(`/send/bitcoin/${text}`);
	}

	// ln address
	if (text.includes('@') && text.includes('.')) {
		console.log('ln address');
		let [name, domain] = text.split('@');
		try {
			clearTimeout(debounce);
			await new Promise((r) => (debounce = setTimeout(r, 1500)));
			let lnurl = await get(`/encode?domain=${domain}&name=${name}`);
			console.log('lnurl', lnurl);
		} catch (e) {}
	}

	// user
	console.log('username');
};
a4 bb 04 3c ad c8 7e 3d e9 a5 a7 5d 66 69 43 d2 d3 dc c3 c5 d5 c8 ...(...)q<...<..~=...]fiC....... 08a0 5e 25 ef 65 96 09 48 78 b4 1d 99 98 2b 31 e1 93 c8 10 ea 46 2e b3 ec c9 a9 a7 84 d8 bc c8 f9 e9 ^%.e..Hx....+1.....F............ 08c0 18 92 09 b7 3b 96 d9 03 f9 eb d1 1d b2 67 a8 d1 65 fe 22 0b b2 2a ae 51 ec 3f 0b dc 90 ca ef a9 ....;........g..e."..*.Q.?...... 08e0 64 21 ba ff b1 81 8c 13 77 9d c1 b9 08 7d ce 29 03 b7 78 c9 c8 a0 6c 51 0c 48 7b 81 ae a1 06 43 d!......w....}.)..x...lQ.H{....C 0900 b1 77 06 12 37 d7 c0 f1 77 28 33 2a 5d 88 7e fb b0 0f b9 fb d0 9c 45 5e 8d 80 69 46 9c c0 b8 4b .w..7...w(3*].~.......E^..iF...K 0920 bd 5e 3d a7 2a 80 ac 01 33 89 f7 92 77 02 f3 86 10 9c f9 88 87 ae d9 d6 0b 5c 9f 59 66 95 86 7c .^=.*...3...w............\.Yf..| 0940 1a f1 60 e3 96 e5 8d d6 58 ef fd 56 4e 60 ba 88 df c0 1a c4 5d c9 74 65 2a 17 40 d6 a8 11 88 33 ..`.....X..VN`......].te*.@....3 0960 99 f4 69 8a 37 91 88 63 a6 8b 78 9e fa 5b 91 48 a0 1b ec 0a 97 01 e0 41 72 5c 3e 2e ea ed fd 33 ..i.7..c..x..[.H.......Ar\>....3 0980 c1 c8 ca 92 fa bc 7d a0 ce 1c ba 2e 47 d2 75 5f 40 ff c0 41 b8 bc 45 c6 fd a3 56 8a fa 3c 4e a3 ......}.....G.u_@..A..E...V..<N. 09a0 35 fc 3e fc ce f6 0f 21 c9 a2 95 4f 6f 1d 46 32 41 2a d9 20 a3 10 a7 b1 95 f3 9f f2 9a 82 2c db 5.>....!...Oo.F2A*............,. 09c0 69 d4 83 4c d2 ab 8c df 69 46 32 15 dc ed 47 22 27 24 da f2 5a eb 72 10 f9 24 45 ea d5 83 ba 0e i..L....iF2...G"'$..Z.r..$E..... 09e0 b1 18 a0 9a 90 58 ce 4b c4 07 cf 8a 28 65 e4 a2 de ed d4 c8 ab af c7 47 de 3e 8e 5c b6 9b 85 7c .....X.K....(e.........G.>.\...| 0a00 8c 69 5c 4e 91 bd 48 52 c4 06 e0 f7 c6 98 03 39 e5 25 52 cd 01 1a a4 4c 3e 13 f8 19 e0 b3 9c ff .i\N..HR.......9.%R....L>....... 0a20 f4 d6 44 24 1c 72 01 e7 b3 db 4e 21 be d6 09 24 9a 58 f9 94 d7 16 60 8b a9 e3 67 02 ff 0f 2f d8 ..D$.r....N!...$.X....`...g.../. 0a40 c6 10 d7 be bf 36 00 00 00 00 49 45 4e 44 ae 42 60 82 .....6....IEND.B`.