Repository navigation
Expand file tree
/
Copy pathdocs.html
More file actions
1228 lines (1084 loc) · 51.4 KB
/
Copy pathdocs.html
File metadata and controls
1228 lines (1084 loc) · 51.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Magic Money Wallet Docs | ChainLens</title>
<link rel="icon" href="/favicon/favicon.ico">
<link rel="apple-touch-icon" sizes="180x180" href="/favicon/apple-touch-icon.png">
<link rel="manifest" href="/favicon/site.webmanifest">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;700&family=Syne:wght@700;800&display=swap" rel="stylesheet">
<style>
:root {
color-scheme: dark;
--bg: #020617;
--panel: rgba(15, 23, 42, 0.78);
--panel-strong: #0f172a;
--line: rgba(148, 163, 184, 0.22);
--text: #f8fafc;
--muted: #94a3b8;
--soft: #cbd5e1;
--cyan: #22d3ee;
--blue: #3b82f6;
--emerald: #34d399;
--amber: #fbbf24;
--rose: #fb7185;
--code: #050816;
--shadow: 0 24px 90px rgba(0, 0, 0, 0.36);
--sidebar-width: 298px;
}
[data-theme="light"] {
color-scheme: light;
--bg: #f8fafc;
--panel: rgba(255, 255, 255, 0.9);
--panel-strong: #ffffff;
--line: rgba(15, 23, 42, 0.12);
--text: #0f172a;
--muted: #64748b;
--soft: #334155;
--code: #0f172a;
--shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
margin: 0;
min-height: 100vh;
background:
radial-gradient(circle at top left, rgba(34, 211, 238, 0.12), transparent 34rem),
radial-gradient(circle at 85% 12%, rgba(52, 211, 153, 0.1), transparent 26rem),
var(--bg);
color: var(--text);
font-family: "Space Grotesk", sans-serif;
-webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
.font-heading { font-family: "Syne", sans-serif; }
.shell {
width: min(1180px, calc(100% - 32px));
margin: 0 auto;
}
.site-sidebar {
position: fixed;
inset: 0 auto 0 0;
z-index: 50;
width: var(--sidebar-width);
display: flex;
flex-direction: column;
background: var(--panel-strong);
border-right: 1px solid var(--line);
}
.sidebar-logo { display: block; padding: 28px 28px 24px; }
.sidebar-close { display: none; }
.sidebar-logo img { display: block; width: 230px; max-width: 100%; height: 96px; object-fit: contain; }
.site-nav { overflow-y: auto; padding: 0 20px 24px; }
.site-nav a { display: flex; align-items: center; gap: 16px; min-height: 58px; padding: 0 24px; border-radius: 14px; color: var(--soft); font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.site-nav a:hover, .site-nav a.active { background: color-mix(in srgb, var(--cyan) 12%, transparent); color: var(--cyan); }
.site-nav a.active { box-shadow: inset 4px 0 var(--cyan); }
.site-nav svg { width: 23px; height: 23px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.site-nav hr { margin: 28px 8px; border: 0; border-top: 1px solid var(--line); }
.docs-main { margin-left: var(--sidebar-width); min-width: 0; }
.menu-button, .menu-backdrop { display: none; }
.topbar {
position: sticky;
top: 0;
z-index: 20;
backdrop-filter: blur(20px);
-webkit-backdrop-filter: blur(20px);
background: color-mix(in srgb, var(--bg) 78%, transparent);
border-bottom: 1px solid var(--line);
}
.topbar-inner {
min-height: 76px;
display: flex;
align-items: center;
justify-content: space-between;
gap: 18px;
}
.brand {
display: flex;
align-items: center;
gap: 12px;
min-width: 0;
}
.brand img {
width: 42px;
height: 42px;
object-fit: contain;
}
.brand-title {
display: flex;
flex-direction: column;
line-height: 1.1;
min-width: 0;
}
.brand-title strong {
font-family: "Syne", sans-serif;
font-size: 1rem;
letter-spacing: 0;
white-space: nowrap;
}
.brand-title span {
color: var(--muted);
font-size: 0.72rem;
font-weight: 800;
letter-spacing: 0.12em;
text-transform: uppercase;
}
.top-actions {
display: flex;
align-items: center;
gap: 10px;
flex-wrap: wrap;
justify-content: flex-end;
}
.pill,
.theme-picker-button,
.copy-btn {
border: 1px solid var(--line);
background: var(--panel);
color: var(--text);
border-radius: 14px;
min-height: 42px;
padding: 0 14px;
display: inline-flex;
align-items: center;
justify-content: center;
gap: 8px;
font-size: 0.72rem;
font-weight: 900;
letter-spacing: 0.12em;
text-transform: uppercase;
cursor: pointer;
transition: transform 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.pill:hover,
.theme-picker-button:hover,
.copy-btn:hover {
transform: translateY(-1px);
border-color: var(--cyan);
color: var(--cyan);
}
.theme-picker { position: relative; }
.theme-picker-button { letter-spacing: .04em; text-transform: none; white-space: nowrap; }
.theme-swatch { width: 16px; height: 16px; flex: none; border-radius: 50%; border: 1px solid var(--line); }
.theme-menu { position: absolute; top: calc(100% + 8px); right: 0; z-index: 30; width: 230px; max-height: min(70vh, 620px); overflow-y: auto; padding: 7px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel-strong); box-shadow: var(--shadow); }
.theme-menu[hidden], .theme-dialog[hidden] { display: none; }
.theme-heading { margin: 9px 10px 5px; color: var(--muted); font-size: 10px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.theme-design-section {margin:5px 0;}
.theme-design-section summary {display:flex;align-items:center;min-height:40px;margin:4px 8px;cursor:pointer;list-style:none;}
.theme-design-section summary::-webkit-details-marker {display:none;}
.theme-design-section summary:focus-visible {outline:2px solid #fff;outline-offset:3px;border-radius:999px;}
.theme-design-label {padding:8px 10px;border:1px solid #fff;border-radius:999px;background:#fff;color:#000;font-size:10px;font-weight:900;text-transform:uppercase;white-space:nowrap;}
.theme-design-line {flex:1;height:1px;background:#fff;}
.theme-design-chevron {color:#fff;font-size:18px;line-height:1;padding-left:6px;}
.theme-design-section[open] .theme-design-chevron {transform:rotate(180deg);padding-left:0;padding-right:6px;}
.theme-row { display: flex; align-items: center; border-radius: 10px; }
.theme-row:hover, .theme-row.selected { background: color-mix(in srgb, var(--cyan) 12%, transparent); }
.theme-row button, .theme-create { border: 0; background: none; color: var(--text); cursor: pointer; font: inherit; }
.theme-choice { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 9px 10px; text-align: left; font-size: 12px; font-weight: 700; }
.theme-choice span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.theme-edit { padding: 8px; color: var(--muted) !important; }
.theme-edit:hover { color: var(--cyan) !important; }
.theme-create { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 10px; text-align: left; font-size: 12px; font-weight: 700; border-radius: 10px; }
.theme-create:hover { background: color-mix(in srgb, var(--cyan) 12%, transparent); }
.theme-create .plus { width: 16px; height: 16px; border: 1px solid var(--cyan); border-radius: 50%; color: var(--cyan); line-height: 13px; text-align: center; }
.theme-hint { margin: 5px 10px 10px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.theme-dialog { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(2, 6, 23, .75); }
.theme-dialog form { width: min(420px, 100%); max-height: 90vh; overflow: auto; padding: 24px; border: 1px solid var(--line); border-radius: 22px; background: var(--panel-strong); box-shadow: var(--shadow); }
.theme-dialog h2 { font-size: 1.3rem; margin-bottom: 20px; }
.theme-dialog label { display: block; margin: 12px 0; color: var(--soft); font-size: 12px; font-weight: 700; }
.theme-dialog input[type="text"] { width: 100%; margin-top: 6px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--text); font: inherit; }
.theme-color-row { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.theme-dialog .theme-color-row input[type="color"] { width: 42px; height: 42px; flex: none; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); cursor: pointer; }
.theme-dialog .theme-color-row input[type="text"] { margin: 0; font-family: ui-monospace, monospace; }
.theme-preview { margin-top: 12px; padding: 15px; border: 1px solid; border-radius: 12px; }
.theme-preview span { display: inline-block; margin-top: 9px; padding: 5px 10px; border-radius: 8px; font-size: 11px; font-weight: 800; }
.theme-dialog-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.theme-dialog-actions button { padding: 9px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--text); font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.theme-dialog-actions button[type="submit"] { background: var(--cyan); color: var(--bg); }
.theme-error { color: var(--rose); font-size: 12px; }
.hero {
padding: 48px 0 30px;
display: grid;
grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
gap: 34px;
align-items: end;
}
.eyebrow {
display: inline-flex;
align-items: center;
gap: 10px;
color: var(--emerald);
font-size: 0.72rem;
font-weight: 900;
letter-spacing: 0.16em;
text-transform: uppercase;
margin-bottom: 18px;
}
.eyebrow::before {
content: "";
width: 8px;
height: 8px;
border-radius: 99px;
background: var(--emerald);
box-shadow: 0 0 24px var(--emerald);
}
h1 {
margin: 0;
max-width: 820px;
font-family: "Syne", sans-serif;
font-size: clamp(2.5rem, 5.5vw, 5rem);
line-height: 0.96;
letter-spacing: 0;
text-transform: uppercase;
}
.hero-copy {
color: var(--soft);
font-size: clamp(1rem, 1.8vw, 1.2rem);
line-height: 1.75;
max-width: 760px;
margin: 24px 0 0;
}
.status-card {
border: 1px solid var(--line);
background: var(--panel);
border-radius: 24px;
padding: 22px;
box-shadow: var(--shadow);
}
.status-card img {
width: 70px;
height: 70px;
object-fit: contain;
display: block;
margin-bottom: 16px;
}
.status-grid {
display: grid;
grid-template-columns: 1fr;
gap: 10px;
margin-top: 18px;
}
.metric {
border: 1px solid var(--line);
border-radius: 16px;
padding: 14px;
background: color-mix(in srgb, var(--panel-strong) 70%, transparent);
}
.metric span {
display: block;
color: var(--muted);
font-size: 0.66rem;
font-weight: 900;
letter-spacing: 0.13em;
text-transform: uppercase;
margin-bottom: 7px;
}
.metric strong {
font-family: "Syne", sans-serif;
font-size: 1.5rem;
}
.layout {
display: grid;
grid-template-columns: 260px minmax(0, 1fr);
gap: 28px;
align-items: start;
padding: 24px 0 80px;
}
.toc {
position: sticky;
top: 96px;
border: 1px solid var(--line);
background: var(--panel);
border-radius: 22px;
padding: 14px;
}
.toc strong {
display: block;
color: var(--muted);
font-size: 0.68rem;
font-weight: 900;
letter-spacing: 0.16em;
text-transform: uppercase;
padding: 8px 10px 12px;
}
.toc a {
display: block;
color: var(--soft);
border-radius: 12px;
padding: 10px;
font-size: 0.88rem;
font-weight: 700;
}
.toc a:hover {
background: color-mix(in srgb, var(--cyan) 12%, transparent);
color: var(--cyan);
}
.content {
display: flex;
flex-direction: column;
gap: 22px;
min-width: 0;
}
section {
border: 1px solid var(--line);
background: var(--panel);
border-radius: 24px;
padding: clamp(22px, 4vw, 34px);
box-shadow: 0 18px 60px rgba(0, 0, 0, 0.12);
scroll-margin-top: 96px;
}
h2 {
margin: 0 0 16px;
font-family: "Syne", sans-serif;
font-size: clamp(1.65rem, 3vw, 2.45rem);
line-height: 1;
letter-spacing: 0;
text-transform: uppercase;
}
h3 {
margin: 26px 0 10px;
font-size: 1rem;
color: var(--text);
}
p {
color: var(--soft);
line-height: 1.7;
margin: 0 0 14px;
}
ul {
margin: 12px 0 0;
padding-left: 20px;
color: var(--soft);
line-height: 1.75;
}
li + li { margin-top: 6px; }
code {
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
font-size: 0.9em;
}
:not(pre) > code {
color: var(--cyan);
background: color-mix(in srgb, var(--cyan) 12%, transparent);
border: 1px solid color-mix(in srgb, var(--cyan) 18%, transparent);
border-radius: 7px;
padding: 0.12rem 0.35rem;
}
.code-head {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
margin-top: 16px;
border: 1px solid rgba(148, 163, 184, 0.2);
border-bottom: 0;
border-radius: 16px 16px 0 0;
background: color-mix(in srgb, var(--code) 92%, white 8%);
color: #cbd5e1;
padding: 10px 12px;
}
.code-head span {
font-size: 0.68rem;
font-weight: 900;
letter-spacing: 0.13em;
text-transform: uppercase;
}
.copy-btn {
min-height: 30px;
padding: 0 10px;
background: rgba(255, 255, 255, 0.04);
color: #cbd5e1;
}
pre {
margin: 0;
overflow-x: auto;
border: 1px solid rgba(148, 163, 184, 0.2);
border-radius: 0 0 16px 16px;
background: var(--code);
color: #e2e8f0;
padding: 18px;
line-height: 1.65;
}
.cards {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 14px;
margin-top: 18px;
}
.mini-card {
border: 1px solid var(--line);
background: color-mix(in srgb, var(--panel-strong) 68%, transparent);
border-radius: 18px;
padding: 18px;
}
.mini-card span {
color: var(--muted);
display: block;
font-size: 0.66rem;
font-weight: 900;
letter-spacing: 0.13em;
text-transform: uppercase;
margin-bottom: 8px;
}
.mini-card strong {
display: block;
font-size: 1.02rem;
margin-bottom: 8px;
}
.mini-card p {
font-size: 0.9rem;
margin: 0;
}
.table-wrap {
overflow-x: auto;
border: 1px solid var(--line);
border-radius: 18px;
margin-top: 16px;
}
table {
width: 100%;
border-collapse: collapse;
min-width: 720px;
background: color-mix(in srgb, var(--panel-strong) 70%, transparent);
}
th,
td {
text-align: left;
padding: 13px 15px;
border-bottom: 1px solid var(--line);
vertical-align: top;
color: var(--soft);
font-size: 0.92rem;
}
th {
color: var(--muted);
font-size: 0.68rem;
font-weight: 900;
letter-spacing: 0.14em;
text-transform: uppercase;
}
tr:last-child td { border-bottom: 0; }
.tag-row {
display: flex;
flex-wrap: wrap;
gap: 8px;
margin-top: 14px;
}
.tag {
border: 1px solid var(--line);
border-radius: 999px;
padding: 7px 10px;
color: var(--soft);
font-size: 0.72rem;
font-weight: 800;
}
.callout {
border: 1px solid color-mix(in srgb, var(--amber) 36%, transparent);
background: color-mix(in srgb, var(--amber) 10%, transparent);
border-radius: 18px;
padding: 16px;
color: var(--soft);
margin-top: 16px;
}
.callout strong { color: var(--amber); }
footer {
border-top: 1px solid var(--line);
padding: 28px 0 40px;
color: var(--muted);
font-size: 0.9rem;
}
@media (max-width: 920px) {
.hero,
.layout {
grid-template-columns: 1fr;
}
.toc {
position: static;
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.toc strong { grid-column: 1 / -1; }
.cards { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
.site-sidebar { width: min(298px, 85vw); transform: translateX(-100%); transition: transform .25s ease; }
.site-sidebar.open { transform: translateX(0); }
.sidebar-close { display: block; position: absolute; top: 28px; right: 12px; border: 0; background: none; color: var(--text); font-size: 24px; cursor: pointer; }
.docs-main { margin-left: 0; }
.menu-button { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; margin-right: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--text); font-size: 22px; cursor: pointer; }
.menu-backdrop.open { display: block; position: fixed; inset: 0; z-index: 45; border: 0; background: rgba(2, 6, 23, .7); }
}
@media (max-width: 620px) {
.topbar-inner {
align-items: flex-start;
flex-direction: column;
padding: 14px 0;
}
.top-actions {
width: 100%;
justify-content: stretch;
}
.pill,
.theme-picker-button {
flex: 1;
}
.hero { padding-top: 42px; }
.toc { grid-template-columns: 1fr; }
section { border-radius: 18px; }
pre { font-size: 0.82rem; }
}
</style>
</head>
<body class="cl-art-app">
<svg xmlns="http://www.w3.org/2000/svg" style="display:none" aria-hidden="true">
<symbol id="icon-search" viewBox="0 0 24 24"><circle cx="11" cy="11" r="7"/><path d="m16 16 5 5"/></symbol>
<symbol id="icon-scanner" viewBox="0 0 24 24"><path d="m12 2 9 5-9 5-9-5 9-5ZM3 7v10l9 5 9-5V7M12 12v10"/></symbol>
<symbol id="icon-apps" viewBox="0 0 24 24"><rect x="3" y="3" width="7" height="7" rx="1"/><rect x="14" y="3" width="7" height="7" rx="1"/><rect x="3" y="14" width="7" height="7" rx="1"/><rect x="14" y="14" width="7" height="7" rx="1"/></symbol>
<symbol id="icon-market" viewBox="0 0 24 24"><path d="M4 21V11h4v10M10 21V3h4v18M16 21v-7h4v7"/></symbol>
<symbol id="icon-profile" viewBox="0 0 24 24"><circle cx="12" cy="7" r="4"/><path d="M4 21v-2a8 8 0 0 1 16 0v2"/></symbol>
<symbol id="icon-chat" viewBox="0 0 24 24"><path d="M3 4h18v13H8l-5 4V4ZM7 9h10M7 13h7"/></symbol>
<symbol id="icon-swap" viewBox="0 0 24 24"><path d="M4 7h16m-4-4 4 4-4 4M20 17H4m4-4-4 4 4 4"/></symbol>
<symbol id="icon-docs" viewBox="0 0 24 24"><path d="M6 2h9l4 4v16H6V2ZM15 2v5h4M9 12h7M9 16h7"/></symbol>
<symbol id="icon-wallet" viewBox="0 0 24 24"><rect x="2" y="5" width="20" height="16" rx="2"/><path d="M2 9h20M17 15h1"/></symbol>
<symbol id="icon-donate" viewBox="0 0 24 24"><path d="M12 21S3 15 3 8a5 5 0 0 1 9-3 5 5 0 0 1 9 3c0 7-9 13-9 13Z"/></symbol>
</svg>
<button class="menu-backdrop" id="menuBackdrop" aria-label="Close menu"></button>
<aside class="cl-sidebar site-sidebar" id="siteSidebar" aria-label="ChainLens navigation">
<button class="sidebar-close" id="sidebarClose" type="button" aria-label="Close menu">×</button>
<a class="sidebar-logo" href="/?tab=search"><img id="sidebarLogo" src="/ChainLens (dark).png" alt="ChainLens"></a>
<nav class="site-nav" aria-label="Main navigation">
<a href="/?tab=search"><svg><use href="#icon-search"/></svg>Search</a>
<a href="/?tab=portfolio"><svg><use href="#icon-scanner"/></svg>Scanner</a>
<a href="/magic-swap"><svg><use href="#icon-swap"/></svg>Magic Swap</a>
<a href="/?tab=swap"><svg><use href="#icon-apps"/></svg>App Hub</a>
<a href="/?tab=market"><svg><use href="#icon-market"/></svg>Market</a>
<a href="/?tab=chat"><svg><use href="#icon-chat"/></svg>Chat</a>
<a href="/?tab=profile"><svg><use href="#icon-profile"/></svg>Profile</a>
<hr>
<a href="/docs" class="active" aria-current="page"><svg><use href="#icon-docs"/></svg>Docs</a>
<a href="/?tab=wallet"><svg><use href="#icon-wallet"/></svg>Wallet</a>
<a href="/?tab=donate"><svg><use href="#icon-donate"/></svg>Donate</a>
</nav>
</aside>
<div class="docs-main">
<header class="topbar">
<div class="shell topbar-inner">
<button class="menu-button" id="menuButton" type="button" aria-label="Open menu" aria-expanded="false">☰</button>
<a class="brand" href="/docs" aria-label="Magic Money developer docs home">
<img src="/MagicMoney_icon.svg" alt="Magic Money Wallet">
<span class="brand-title">
<strong>Magic Money Wallet</strong>
<span>Developer Docs</span>
</span>
</a>
<nav class="top-actions" aria-label="Docs actions">
<a class="pill" href="https://github.com/M2AF/Magic-Money-Wallet" target="_blank" rel="noopener noreferrer">GitHub</a>
<a class="pill" href="/audit/FINAL-AUDIT.html">Audit</a>
<div class="theme-picker" id="themePicker">
<button class="theme-picker-button" type="button" id="themePickerButton" aria-label="Choose theme" aria-haspopup="menu" aria-expanded="false"><span class="theme-swatch" id="themeSwatch"></span><span id="themeLabel">Dark</span><span aria-hidden="true">▾</span></button>
<div class="theme-menu" id="themeMenu" role="menu" hidden></div>
</div>
</nav>
</div>
</header>
<main class="shell">
<div class="hero">
<div>
<div class="eyebrow">Developer documentation</div>
<h1>Build with Magic Money</h1>
<p class="hero-copy">
Connect a dApp to Magic Money across desktop, the browser extension, Android, and iOS. Start with standard wallet discovery, request only the permissions you need, and keep signing tied to the user's selected account and network.
</p>
</div>
<aside class="status-card" aria-label="Magic Money Wallet status">
<img src="/MagicMoney_icon.svg" alt="">
<p><strong>One wallet surface for many ecosystems.</strong></p>
<p>One self-custody wallet for web and in-app dApps across EVM, Solana, Cardano, Bitcoin, and more.</p>
<div class="status-grid">
<div class="metric"><span>Default portfolio networks</span><strong>24</strong></div>
</div>
</aside>
</div>
<div class="layout">
<aside class="toc" aria-label="Documentation sections">
<strong>On This Page</strong>
<a href="#overview">Overview</a>
<a href="#quick-start">Quick Start</a>
<a href="#detect">Detect Wallet</a>
<a href="#evm">EVM Provider</a>
<a href="#solana">Solana Provider</a>
<a href="#cardano">Cardano CIP-30</a>
<a href="#bitcoin">Bitcoin Provider</a>
<a href="#more-providers">More Providers</a>
<a href="#walletconnect">WalletConnect</a>
<a href="#networks">Networks</a>
<a href="#platforms">Platforms</a>
<a href="#security">Security</a>
<a href="#proxy">API Proxy</a>
<a href="#build">Build Notes</a>
<a href="#troubleshooting">Troubleshooting</a>
</aside>
<div class="content">
<section id="overview">
<h2>Overview</h2>
<p>
Magic Money Wallet exposes standard wallet interfaces. EVM dApps use EIP-1193 and EIP-6963, Solana dApps use the Wallet Standard and legacy <code>window.solana</code>, Cardano dApps use <code>window.cardano.magicmoney</code>, Bitcoin and Ordinals dApps use <code>window.unisat</code> or <code>window.btc_providers</code>, and URI based flows use WalletConnect v2. The desktop browser and Android/iOS in-app browsers inject these providers into dApp pages.
</p>
<div class="cards">
<div class="mini-card">
<span>EVM</span>
<strong>EIP-1193 + EIP-6963</strong>
<p>Detect Magic Money alongside MetaMask, Rabby, Coinbase Wallet, and other injected wallets.</p>
</div>
<div class="mini-card">
<span>Solana</span>
<strong>Wallet Standard</strong>
<p>Supports connect, message signing, transaction signing, and sign-and-send flows.</p>
</div>
<div class="mini-card">
<span>Cardano</span>
<strong>CIP-30</strong>
<p>Connect at <code>window.cardano.magicmoney</code> with UTxO, balance, signing, and submit methods.</p>
</div>
<div class="mini-card">
<span>Bitcoin</span>
<strong>UniSat + WBIP</strong>
<p>Connect payment and ordinals addresses, sign messages, sign PSBTs, broadcast, and send BTC.</p>
</div>
<div class="mini-card">
<span>Polkadot</span>
<strong>Injected Web3</strong>
<p>Discover <code>window.injectedWeb3.magicmoney</code> for accounts and signer requests.</p>
</div>
<div class="mini-card">
<span>Midnight</span>
<strong>DApp Connector</strong>
<p>Discover Magic Money in the Midnight provider registry for account state and supported signing flows.</p>
</div>
</div>
</section>
<section id="quick-start">
<h2>Quick Start</h2>
<p>
Discover the wallet through the ecosystem standard first. For EVM, retain the provider announced by EIP-6963 rather than assuming <code>window.ethereum</code> belongs to Magic Money.
</p>
<div class="code-head">
<span>EVM connect</span>
<button class="copy-btn" type="button" data-copy="evm-connect">Copy</button>
</div>
<pre><code id="evm-connect">async function connectMagicMoneyEvm() {
const provider = await new Promise((resolve, reject) => {
const onAnnounce = (event) => {
if (event.detail.info.rdns !== "info.chainlens.magicmoney") return;
window.removeEventListener("eip6963:announceProvider", onAnnounce);
resolve(event.detail.provider);
};
window.addEventListener("eip6963:announceProvider", onAnnounce);
window.dispatchEvent(new Event("eip6963:requestProvider"));
setTimeout(() => {
window.removeEventListener("eip6963:announceProvider", onAnnounce);
reject(new Error("Magic Money Wallet was not found"));
}, 1500);
});
const accounts = await provider.request({
method: "eth_requestAccounts"
});
const chainId = await provider.request({ method: "eth_chainId" });
return { address: accounts[0], chainId };
}</code></pre>
<div class="code-head">
<span>Cardano connect</span>
<button class="copy-btn" type="button" data-copy="cardano-connect">Copy</button>
</div>
<pre><code id="cardano-connect">async function connectMagicMoneyCardano() {
const wallet = window.cardano?.magicmoney;
if (!wallet) throw new Error("Magic Money Cardano provider not found");
const api = await wallet.enable();
const networkId = await api.getNetworkId();
const changeAddressHex = await api.getChangeAddress();
return { api, networkId, changeAddressHex };
}</code></pre>
<div class="code-head">
<span>Bitcoin connect</span>
<button class="copy-btn" type="button" data-copy="bitcoin-connect">Copy</button>
</div>
<pre><code id="bitcoin-connect">async function connectMagicMoneyBitcoin() {
const provider = window.unisat;
if (!provider?.isMagicMoney) throw new Error("Magic Money Bitcoin provider not found");
const [paymentAddress] = await provider.requestAccounts();
const publicKey = await provider.getPublicKey();
const balance = await provider.getBalance();
return { paymentAddress, publicKey, balance };
}</code></pre>
</section>
<section id="detect">
<h2>Detect Wallet</h2>
<p>
On EVM pages, prefer EIP-6963. Magic Money announces with the reverse DNS identifier <code>info.chainlens.magicmoney</code>. If multiple wallets are installed, show the user a picker.
</p>
<div class="code-head">
<span>EIP-6963 discovery</span>
<button class="copy-btn" type="button" data-copy="eip6963">Copy</button>
</div>
<pre><code id="eip6963">const discoveredWallets = [];
window.addEventListener("eip6963:announceProvider", (event) => {
const { info, provider } = event.detail;
discoveredWallets.push({ info, provider });
if (info.rdns === "info.chainlens.magicmoney") {
console.log("Magic Money Wallet found", info.name);
}
});
window.dispatchEvent(new Event("eip6963:requestProvider"));</code></pre>
<div class="callout">
<strong>Tip:</strong> Do not assume <code>window.ethereum</code> belongs to Magic Money. Browser users may have several wallets installed, and another extension can own that global.
</div>
</section>
<section id="evm">
<h2>EVM Provider</h2>
<p>
Magic Money implements the common EIP-1193 request shape. User consent is required for account access and signing requests.
</p>
<div class="table-wrap">
<table>
<thead>
<tr><th>Method</th><th>Use</th><th>Notes</th></tr>
</thead>
<tbody>
<tr><td><code>eth_requestAccounts</code></td><td>Connect wallet</td><td>Prompts the user for origin approval.</td></tr>
<tr><td><code>eth_accounts</code></td><td>Read connected accounts</td><td>Returns an empty array until approved.</td></tr>
<tr><td><code>eth_chainId</code></td><td>Read active chain</td><td>Returns a hex chain ID such as <code>0x1</code>.</td></tr>
<tr><td><code>wallet_switchEthereumChain</code></td><td>Switch chain</td><td>Supports configured EVM chains in Magic Money.</td></tr>
<tr><td><code>wallet_addEthereumChain</code></td><td>Select supported chain</td><td>Unsupported chains return <code>4902</code>; configure custom networks in the wallet first.</td></tr>
<tr><td><code>personal_sign</code></td><td>Message signing</td><td>Shown to the user before signing.</td></tr>
<tr><td><code>eth_signTypedData_v4</code></td><td>EIP-712 typed data</td><td>Use this for structured login and permit flows.</td></tr>
<tr><td><code>eth_sendTransaction</code></td><td>Send transaction</td><td>Transaction is reviewed, signed locally, then broadcast.</td></tr>
</tbody>
</table>
</div>
<div class="code-head">
<span>Switch chain</span>
<button class="copy-btn" type="button" data-copy="switch-chain">Copy</button>
</div>
<pre><code id="switch-chain">await provider.request({
method: "wallet_switchEthereumChain",
params: [{ chainId: "0x2105" }] // Base mainnet
});</code></pre>
</section>
<section id="solana">
<h2>Solana Provider</h2>
<p>
Magic Money supports Solana dApps through Wallet Standard discovery and a legacy provider shape compatible with common Solana wallet adapter flows.
</p>
<div class="code-head">
<span>Legacy Solana connect</span>
<button class="copy-btn" type="button" data-copy="solana-connect">Copy</button>
</div>
<pre><code id="solana-connect">async function connectMagicMoneySolana() {
const provider = window.solana;
if (!provider) throw new Error("No Solana wallet found");
const result = await provider.connect();
const publicKey = result.publicKey.toString();
const message = new TextEncoder().encode("Sign in to my dApp");
const signed = await provider.signMessage(message, "utf8");
return { publicKey, signature: signed.signature };
}</code></pre>
<p>
Transaction flows should use <code>signTransaction</code>, <code>signAllTransactions</code>, or <code>signAndSendTransaction</code> depending on whether your app or the wallet should broadcast.
</p>
</section>
<section id="cardano">
<h2>Cardano CIP-30</h2>
<p>
Cardano is exposed at <code>window.cardano.magicmoney</code>. The provider follows the CIP-30 pattern where <code>enable()</code> returns the full API object after user approval.
</p>
<div class="table-wrap">
<table>
<thead>
<tr><th>Method</th><th>Purpose</th></tr>
</thead>
<tbody>
<tr><td><code>isEnabled()</code></td><td>Check if the current origin has permission.</td></tr>
<tr><td><code>enable()</code></td><td>Request access and return the full wallet API.</td></tr>
<tr><td><code>getNetworkId()</code></td><td>Returns <code>1</code> for mainnet.</td></tr>
<tr><td><code>getBalance()</code></td><td>Returns balance CBOR hex.</td></tr>
<tr><td><code>getUtxos()</code></td><td>Returns UTxO CBOR hex values.</td></tr>
<tr><td><code>getChangeAddress()</code></td><td>Returns the change address as hex.</td></tr>
<tr><td><code>getRewardAddresses()</code></td><td>Returns staking reward addresses as hex.</td></tr>
<tr><td><code>signTx(txHex, partialSign)</code></td><td>Returns witness set CBOR hex.</td></tr>
<tr><td><code>signData(addressHex, payloadHex)</code></td><td>Returns a signed data payload.</td></tr>
<tr><td><code>submitTx(txHex)</code></td><td>Submits a signed transaction.</td></tr>
</tbody>
</table>
</div>
<div class="code-head">
<span>CIP-30 signing</span>
<button class="copy-btn" type="button" data-copy="cip30-sign">Copy</button>
</div>
<pre><code id="cip30-sign">const wallet = window.cardano?.magicmoney;
const api = await wallet.enable();
const txHex = "84a4..."; // unsigned transaction CBOR hex
const witnessSetHex = await api.signTx(txHex, true);
console.log({ witnessSetHex });</code></pre>
</section>
<section id="bitcoin">
<h2>Bitcoin Provider</h2>
<p>
Magic Money exposes Bitcoin dApp connectivity for payment, Ordinals, Runes, and BRC-20 style apps. It supports a UniSat-compatible <code>window.unisat</code> surface and a sats-connect/WBIP style provider through <code>window.btc_providers</code>.
</p>
<p>
Bitcoin access is approval-gated by origin. The wallet returns a native SegWit payment address for BTC transfers and a Taproot address for ordinals workflows.
</p>
<div class="table-wrap">
<table>
<thead>
<tr><th>Address</th><th>Purpose</th><th>Type</th></tr>
</thead>
<tbody>
<tr><td>Payment</td><td>BTC send/receive, PSBT payment inputs</td><td><code>p2wpkh</code> native SegWit, <code>bc1q...</code></td></tr>
<tr><td>Ordinals</td><td>Ordinals, inscriptions, Runes, BRC-20</td><td><code>p2tr</code> Taproot, <code>bc1p...</code></td></tr>
</tbody>
</table>
</div>
<h3>UniSat-compatible API</h3>
<p>
Use <code>window.unisat</code> when your dApp already supports UniSat-style Bitcoin wallets. Magic Money only claims this global when another Bitcoin wallet has not already locked it, so dApps should still allow wallet selection when multiple wallets are available.
</p>
<div class="table-wrap">
<table>
<thead>
<tr><th>Method</th><th>Purpose</th></tr>
</thead>
<tbody>
<tr><td><code>requestAccounts()</code></td><td>Prompt the user and return the payment address array.</td></tr>
<tr><td><code>getAccounts()</code></td><td>Return connected payment accounts after approval.</td></tr>
<tr><td><code>getPublicKey()</code></td><td>Return the payment public key as hex.</td></tr>
<tr><td><code>getNetwork()</code></td><td>Returns <code>livenet</code>.</td></tr>
<tr><td><code>getBalance()</code></td><td>Returns confirmed, unconfirmed, and total satoshi balances.</td></tr>
<tr><td><code>signMessage(message, type)</code></td><td>Sign a message after user approval. Default type is <code>ecdsa</code>.</td></tr>
<tr><td><code>signPsbt(psbtHex, options)</code></td><td>Sign one PSBT and return signed PSBT hex.</td></tr>
<tr><td><code>signPsbts(psbtHexArray, options)</code></td><td>Sign multiple PSBTs.</td></tr>
<tr><td><code>pushPsbt(psbtHex)</code></td><td>Broadcast an extracted raw transaction hex.</td></tr>
<tr><td><code>pushTx(rawtx)</code></td><td>Broadcast a raw transaction hex.</td></tr>
<tr><td><code>sendBitcoin(to, satoshis)</code></td><td>Build, sign, and broadcast a BTC transfer from the payment address.</td></tr>
</tbody>
</table>
</div>
<div class="code-head">
<span>Bitcoin message signing</span>
<button class="copy-btn" type="button" data-copy="bitcoin-message">Copy</button>
</div>
<pre><code id="bitcoin-message">const provider = window.unisat;
const [address] = await provider.requestAccounts();
const signature = await provider.signMessage(
"Sign in to my Bitcoin dApp",
"ecdsa"
);
console.log({ address, signature });</code></pre>
<div class="code-head">
<span>Bitcoin PSBT signing</span>
<button class="copy-btn" type="button" data-copy="bitcoin-psbt">Copy</button>