140 lines
7.1 KiB
XML
140 lines
7.1 KiB
XML
<svg xmlns="http://www.w3.org/2000/svg" width="1400" height="900" viewBox="0 0 1400 900" role="img" aria-labelledby="title desc">
|
|
<title id="title">Архитектура Solana-программ SHiNE</title>
|
|
<desc id="desc">Схема трех программ, DAO, PDA-счетов и движения денег.</desc>
|
|
<defs>
|
|
<marker id="arrow" markerWidth="10" markerHeight="10" refX="8" refY="3" orient="auto" markerUnits="strokeWidth">
|
|
<path d="M0,0 L0,6 L9,3 z" fill="#2f3a45"/>
|
|
</marker>
|
|
<marker id="moneyArrow" markerWidth="10" markerHeight="10" refX="8" refY="3" orient="auto" markerUnits="strokeWidth">
|
|
<path d="M0,0 L0,6 L9,3 z" fill="#0a7f62"/>
|
|
</marker>
|
|
<style>
|
|
.bg { fill: #f7f8fa; }
|
|
.title { font: 700 30px Arial, sans-serif; fill: #1f2933; }
|
|
.subtitle { font: 400 16px Arial, sans-serif; fill: #52606d; }
|
|
.box { fill: #ffffff; stroke: #9aa5b1; stroke-width: 2; rx: 8; }
|
|
.program { fill: #e8f1ff; stroke: #3465a4; }
|
|
.dao { fill: #fff3d6; stroke: #b7791f; }
|
|
.pda { fill: #edf7ed; stroke: #2f855a; }
|
|
.actor { fill: #f3e8ff; stroke: #805ad5; }
|
|
.txt { font: 700 17px Arial, sans-serif; fill: #1f2933; }
|
|
.small { font: 400 13px Arial, sans-serif; fill: #3e4c59; }
|
|
.line { stroke: #2f3a45; stroke-width: 2.2; fill: none; marker-end: url(#arrow); }
|
|
.money { stroke: #0a7f62; stroke-width: 3; fill: none; marker-end: url(#moneyArrow); }
|
|
.dashed { stroke-dasharray: 8 7; }
|
|
.legend { font: 400 14px Arial, sans-serif; fill: #3e4c59; }
|
|
</style>
|
|
</defs>
|
|
|
|
<rect class="bg" x="0" y="0" width="1400" height="900"/>
|
|
<text class="title" x="52" y="54">SHiNE Solana: программы, DAO, счета и движение денег</text>
|
|
<text class="subtitle" x="52" y="82">Текущая модель: три Anchor-программы, DAO/authority как управляющий слой, inflow vault и DAO treasury.</text>
|
|
|
|
<rect class="box actor" x="52" y="150" width="210" height="78"/>
|
|
<text class="txt" x="72" y="181">Пользователь</text>
|
|
<text class="small" x="72" y="206">signer, root_key, client_key</text>
|
|
|
|
<rect class="box actor" x="52" y="310" width="210" height="78"/>
|
|
<text class="txt" x="72" y="341">Покупатель тикета</text>
|
|
<text class="small" x="72" y="366">buy_ticket*</text>
|
|
|
|
<rect class="box actor" x="52" y="470" width="210" height="78"/>
|
|
<text class="txt" x="72" y="501">Менеджер</text>
|
|
<text class="small" x="72" y="526">manager_add_ticket</text>
|
|
|
|
<rect class="box actor" x="52" y="630" width="210" height="78"/>
|
|
<text class="txt" x="72" y="661">Любой caller</text>
|
|
<text class="small" x="72" y="686">step_payout</text>
|
|
|
|
<rect class="box program" x="360" y="126" width="270" height="96"/>
|
|
<text class="txt" x="382" y="160">1. shine_login_guard</text>
|
|
<text class="small" x="382" y="186">classify_login</text>
|
|
<text class="small" x="382" y="205">free / premium / trademark</text>
|
|
|
|
<rect class="box program" x="360" y="286" width="270" height="112"/>
|
|
<text class="txt" x="382" y="320">2. shine_users</text>
|
|
<text class="small" x="382" y="346">create_user_pda</text>
|
|
<text class="small" x="382" y="365">update_user_pda</text>
|
|
<text class="small" x="382" y="384">economy config</text>
|
|
|
|
<rect class="box program" x="360" y="518" width="270" height="122"/>
|
|
<text class="txt" x="382" y="552">3. shine_payments</text>
|
|
<text class="small" x="382" y="578">vault, tickets, queues</text>
|
|
<text class="small" x="382" y="597">grant_manager_limits</text>
|
|
<text class="small" x="382" y="616">step_payout</text>
|
|
|
|
<rect class="box dao" x="776" y="126" width="270" height="122"/>
|
|
<text class="txt" x="798" y="160">SHiNE DAO</text>
|
|
<text class="small" x="798" y="186">governance / authority</text>
|
|
<text class="small" x="798" y="205">treasury dao_wallet</text>
|
|
<text class="small" x="798" y="224">ключи через голосование</text>
|
|
|
|
<rect class="box pda" x="776" y="306" width="270" height="84"/>
|
|
<text class="txt" x="798" y="340">shine_users PDA</text>
|
|
<text class="small" x="798" y="365">user_pda, economy_config</text>
|
|
|
|
<rect class="box pda" x="776" y="500" width="270" height="150"/>
|
|
<text class="txt" x="798" y="534">shine_payments PDA</text>
|
|
<text class="small" x="798" y="560">config_pda, coef_limit_pda</text>
|
|
<text class="small" x="798" y="579">queues_pda</text>
|
|
<text class="small" x="798" y="598">inflow_vault_pda</text>
|
|
<text class="small" x="798" y="617">ticket_pda, manager_allowance</text>
|
|
|
|
<rect class="box pda" x="1134" y="500" width="214" height="88"/>
|
|
<text class="txt" x="1156" y="534">inflow_vault</text>
|
|
<text class="small" x="1156" y="560">деньги регистрации</text>
|
|
|
|
<rect class="box dao" x="1134" y="170" width="214" height="88"/>
|
|
<text class="txt" x="1156" y="204">DAO treasury</text>
|
|
<text class="small" x="1156" y="230">dao_wallet</text>
|
|
|
|
<path class="line" d="M262 189 C300 189, 318 334, 360 334"/>
|
|
<text class="small" x="270" y="286">регистрация / update</text>
|
|
|
|
<path class="line" d="M360 314 C322 250, 320 176, 360 174"/>
|
|
<text class="small" x="330" y="250">CPI login</text>
|
|
|
|
<path class="line" d="M630 342 L776 342"/>
|
|
<text class="small" x="646" y="329">создает/обновляет</text>
|
|
|
|
<path class="money" d="M262 205 C438 432, 1010 390, 1134 530"/>
|
|
<text class="small" x="430" y="430">регистрация и лимит -> inflow_vault</text>
|
|
|
|
<path class="money" d="M262 349 C540 260, 870 244, 1134 214"/>
|
|
<text class="small" x="538" y="270">покупка тикета -> DAO treasury</text>
|
|
|
|
<path class="line" d="M262 509 L360 579"/>
|
|
<text class="small" x="276" y="540">создать тикет</text>
|
|
|
|
<path class="line" d="M630 579 L776 575"/>
|
|
<text class="small" x="648" y="562">PDA состояния</text>
|
|
|
|
<path class="line" d="M1046 575 L1134 548"/>
|
|
|
|
<path class="money" d="M1134 560 C970 700, 580 728, 262 669"/>
|
|
<text class="small" x="650" y="720">call reward caller</text>
|
|
|
|
<path class="money" d="M1134 536 C860 754, 426 238, 262 194"/>
|
|
<text class="small" x="632" y="760">выплата получателю тикета</text>
|
|
|
|
<path class="money" d="M1241 500 L1241 258"/>
|
|
<text class="small" x="1254" y="380">DAO-часть выплат</text>
|
|
|
|
<path class="line" d="M776 188 L630 342"/>
|
|
<text class="small" x="642" y="250">update economy</text>
|
|
|
|
<path class="line" d="M776 216 C690 290, 666 516, 630 558"/>
|
|
<text class="small" x="654" y="438">settings / managers</text>
|
|
|
|
<path class="line dashed" d="M910 248 C850 702, 620 720, 520 640"/>
|
|
<text class="small" x="690" y="690">upgrade-authority: users/payments; login_guard позже</text>
|
|
|
|
<rect class="box" x="52" y="808" width="1296" height="54"/>
|
|
<line x1="74" y1="835" x2="132" y2="835" class="line"/>
|
|
<text class="legend" x="146" y="840">логические вызовы и управление</text>
|
|
<line x1="374" y1="835" x2="432" y2="835" class="money"/>
|
|
<text class="legend" x="446" y="840">движение SOL/lamports</text>
|
|
<line x1="682" y1="835" x2="740" y2="835" class="line dashed"/>
|
|
<text class="legend" x="754" y="840">будущая передача upgrade-authority DAO</text>
|
|
</svg>
|