@taker007/crypto-guardian-snap 1.0.5 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/crypto-guardian-icon-small.svg +22 -0
- package/assets/icon.svg +85 -4
- package/assets/store/crypto-guardians-screenshot-1.png +0 -0
- package/assets/store/crypto-guardians-screenshot-2.png +0 -0
- package/assets/store/crypto-guardians-screenshot-3.png +0 -0
- package/assets/store/crypto-guardians-screenshot-4.png +0 -0
- package/assets/store/crypto-guardians-screenshot-5.png +0 -0
- package/dist/bundle.js +1 -1
- package/package.json +2 -2
- package/snap.manifest.json +6 -4
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
|
|
2
|
+
<path d="M16 2 L27 7 V18 C27 25 22 29 16 30 C10 29 5 25 5 18 V7 Z" fill="#1E3A5F"/>
|
|
3
|
+
<path d="M16 4 L25 8 V18 C25 24 21 27 16 28 C11 27 7 24 7 18 V8 Z" fill="#0B1220"/>
|
|
4
|
+
<ellipse cx="16" cy="5.5" rx="4" ry="1" fill="none" stroke="#FACC15" stroke-width="1"/>
|
|
5
|
+
<path d="M5 14 C3 12 1 11 1 13 C1 15 3 16 5 16 Z" fill="#CBD5E1" opacity="0.8"/>
|
|
6
|
+
<path d="M27 14 C29 12 31 11 31 13 C31 15 29 16 27 16 Z" fill="#CBD5E1" opacity="0.8"/>
|
|
7
|
+
<g transform="translate(16, 15)">
|
|
8
|
+
<path d="M0 -6 L5 -2 L4 3 L2 5 L0 6 L-2 5 L-4 3 L-5 -2 Z" fill="#F97316"/>
|
|
9
|
+
<path d="M-5 -2 L-6 -6 L-2 -4 Z" fill="#FDBA74"/>
|
|
10
|
+
<path d="M5 -2 L6 -6 L2 -4 Z" fill="#FDBA74"/>
|
|
11
|
+
<rect x="-3.5" y="-3" width="3" height="2" rx="0.5" fill="#0B1220"/>
|
|
12
|
+
<rect x="0.5" y="-3" width="3" height="2" rx="0.5" fill="#0B1220"/>
|
|
13
|
+
<circle cx="-2" cy="-2" r="1" fill="#38BDF8"/>
|
|
14
|
+
<circle cx="2" cy="-2" r="1" fill="#38BDF8"/>
|
|
15
|
+
<path d="M-1 2 Q0 3 1 2" fill="none" stroke="#0B1220" stroke-width="0.75" stroke-linecap="round"/>
|
|
16
|
+
</g>
|
|
17
|
+
<g transform="translate(16, 24)" opacity="0.7">
|
|
18
|
+
<ellipse cx="0" cy="0" rx="4" ry="2" fill="none" stroke="#38BDF8" stroke-width="0.75"/>
|
|
19
|
+
<circle cx="0" cy="0" r="1.2" fill="#38BDF8"/>
|
|
20
|
+
<circle cx="0" cy="0" r="0.5" fill="#0B1220"/>
|
|
21
|
+
</g>
|
|
22
|
+
</svg>
|
package/assets/icon.svg
CHANGED
|
@@ -1,5 +1,86 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="
|
|
2
|
-
<
|
|
3
|
-
<
|
|
4
|
-
<
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512">
|
|
2
|
+
<defs>
|
|
3
|
+
<linearGradient id="shieldG" x1="0.5" y1="0" x2="0.5" y2="1">
|
|
4
|
+
<stop offset="0%" stop-color="#1E3A5F"/>
|
|
5
|
+
<stop offset="100%" stop-color="#0B1220"/>
|
|
6
|
+
</linearGradient>
|
|
7
|
+
<linearGradient id="foxG" x1="0.5" y1="0" x2="0.5" y2="1">
|
|
8
|
+
<stop offset="0%" stop-color="#FDBA74"/>
|
|
9
|
+
<stop offset="100%" stop-color="#F97316"/>
|
|
10
|
+
</linearGradient>
|
|
11
|
+
<linearGradient id="wingL" x1="1" y1="0.3" x2="0" y2="0.7">
|
|
12
|
+
<stop offset="0%" stop-color="#CBD5E1"/>
|
|
13
|
+
<stop offset="100%" stop-color="#94A3B8"/>
|
|
14
|
+
</linearGradient>
|
|
15
|
+
<linearGradient id="wingR" x1="0" y1="0.3" x2="1" y2="0.7">
|
|
16
|
+
<stop offset="0%" stop-color="#CBD5E1"/>
|
|
17
|
+
<stop offset="100%" stop-color="#94A3B8"/>
|
|
18
|
+
</linearGradient>
|
|
19
|
+
<linearGradient id="haloG" x1="0.5" y1="0" x2="0.5" y2="1">
|
|
20
|
+
<stop offset="0%" stop-color="#FACC15"/>
|
|
21
|
+
<stop offset="100%" stop-color="#EAB308"/>
|
|
22
|
+
</linearGradient>
|
|
23
|
+
</defs>
|
|
24
|
+
<path d="M256 52 L408 124 V280 C408 388 336 448 256 472 C176 448 104 388 104 280 V124 Z" fill="url(#shieldG)" stroke="#1E3A5F" stroke-width="4"/>
|
|
25
|
+
<path d="M256 68 L396 136 V280 C396 380 328 436 256 458 C184 436 116 380 116 280 V136 Z" fill="#0B1220" stroke="#1E3A5F" stroke-width="1.5"/>
|
|
26
|
+
<path d="M256 84 L384 148 V280 C384 372 320 424 256 444 C192 424 128 372 128 280 V148 Z" fill="none" stroke="#1E3A5F" stroke-width="0.75" opacity="0.5"/>
|
|
27
|
+
<ellipse cx="256" cy="100" rx="52" ry="10" fill="none" stroke="url(#haloG)" stroke-width="5" opacity="0.9"/>
|
|
28
|
+
<ellipse cx="256" cy="100" rx="52" ry="10" fill="none" stroke="#FACC15" stroke-width="2" opacity="0.4"/>
|
|
29
|
+
<g>
|
|
30
|
+
<path d="M104 220 C100 200 80 170 52 160 C36 156 20 158 12 168 C4 178 8 194 18 206 C32 224 56 232 72 238 C82 242 94 240 100 234 Z" fill="url(#wingL)"/>
|
|
31
|
+
<path d="M100 234 C92 224 68 204 40 200 C24 198 12 204 8 216 C4 228 12 242 24 250 C40 262 64 264 80 262 C90 260 98 252 100 244 Z" fill="url(#wingL)" opacity="0.85"/>
|
|
32
|
+
<path d="M98 252 C88 246 64 236 38 238 C24 240 14 250 14 262 C14 274 24 284 38 288 C54 292 76 286 90 278 C98 272 100 262 98 256 Z" fill="url(#wingL)" opacity="0.7"/>
|
|
33
|
+
<path d="M100 220 L72 238" stroke="#E2E8F0" stroke-width="0.75" opacity="0.5"/>
|
|
34
|
+
<path d="M96 234 L80 262" stroke="#E2E8F0" stroke-width="0.75" opacity="0.5"/>
|
|
35
|
+
</g>
|
|
36
|
+
<g>
|
|
37
|
+
<path d="M408 220 C412 200 432 170 460 160 C476 156 492 158 500 168 C508 178 504 194 494 206 C480 224 456 232 440 238 C430 242 418 240 412 234 Z" fill="url(#wingR)"/>
|
|
38
|
+
<path d="M412 234 C420 224 444 204 472 200 C488 198 500 204 504 216 C508 228 500 242 488 250 C472 262 448 264 432 262 C422 260 414 252 412 244 Z" fill="url(#wingR)" opacity="0.85"/>
|
|
39
|
+
<path d="M414 252 C424 246 448 236 474 238 C488 240 498 250 498 262 C498 274 488 284 474 288 C458 292 436 286 422 278 C414 272 412 262 414 256 Z" fill="url(#wingR)" opacity="0.7"/>
|
|
40
|
+
<path d="M412 220 L440 238" stroke="#E2E8F0" stroke-width="0.75" opacity="0.5"/>
|
|
41
|
+
<path d="M416 234 L432 262" stroke="#E2E8F0" stroke-width="0.75" opacity="0.5"/>
|
|
42
|
+
</g>
|
|
43
|
+
<g transform="translate(256, 240)">
|
|
44
|
+
<path d="M0 -72 L60 -28 L52 28 L28 56 L0 68 L-28 56 L-52 28 L-60 -28 Z" fill="url(#foxG)"/>
|
|
45
|
+
<path d="M0 -72 L-60 -28 L-36 -32 L0 -52 Z" fill="#FDBA74"/>
|
|
46
|
+
<path d="M0 -72 L60 -28 L36 -32 L0 -52 Z" fill="#FDBA74"/>
|
|
47
|
+
<path d="M-60 -28 L-72 -76 L-28 -44 Z" fill="url(#foxG)"/>
|
|
48
|
+
<path d="M60 -28 L72 -76 L28 -44 Z" fill="url(#foxG)"/>
|
|
49
|
+
<path d="M-68 -72 L-58 -30 L-30 -42 Z" fill="#EA580C" opacity="0.4"/>
|
|
50
|
+
<path d="M68 -72 L58 -30 L30 -42 Z" fill="#EA580C" opacity="0.4"/>
|
|
51
|
+
<path d="M0 -52 L-36 -32 L-52 28 L-28 56 L0 68 L28 56 L52 28 L36 -32 Z" fill="#F97316" opacity="0.15"/>
|
|
52
|
+
<path d="M-36 -20 L-20 -24 L-14 -8 L-24 -4 Z" fill="#0B1220"/>
|
|
53
|
+
<path d="M36 -20 L20 -24 L14 -8 L24 -4 Z" fill="#0B1220"/>
|
|
54
|
+
<circle cx="-22" cy="-14" r="6" fill="#38BDF8"/>
|
|
55
|
+
<circle cx="22" cy="-14" r="6" fill="#38BDF8"/>
|
|
56
|
+
<circle cx="-20" cy="-15" r="2.5" fill="#E0F2FE"/>
|
|
57
|
+
<circle cx="24" cy="-15" r="2.5" fill="#E0F2FE"/>
|
|
58
|
+
<path d="M-12 12 L0 8 L12 12" fill="none" stroke="#0B1220" stroke-width="2.5" stroke-linecap="round"/>
|
|
59
|
+
<path d="M0 8 L0 20" fill="none" stroke="#0B1220" stroke-width="2" stroke-linecap="round"/>
|
|
60
|
+
<path d="M-8 20 Q0 28 8 20" fill="none" stroke="#0B1220" stroke-width="2" stroke-linecap="round"/>
|
|
61
|
+
<path d="M-52 28 L-68 20" stroke="#F97316" stroke-width="1.5" stroke-linecap="round" opacity="0.6"/>
|
|
62
|
+
<path d="M-52 32 L-72 30" stroke="#F97316" stroke-width="1.5" stroke-linecap="round" opacity="0.6"/>
|
|
63
|
+
<path d="M-52 36 L-68 40" stroke="#F97316" stroke-width="1.5" stroke-linecap="round" opacity="0.6"/>
|
|
64
|
+
<path d="M52 28 L68 20" stroke="#F97316" stroke-width="1.5" stroke-linecap="round" opacity="0.6"/>
|
|
65
|
+
<path d="M52 32 L72 30" stroke="#F97316" stroke-width="1.5" stroke-linecap="round" opacity="0.6"/>
|
|
66
|
+
<path d="M52 36 L68 40" stroke="#F97316" stroke-width="1.5" stroke-linecap="round" opacity="0.6"/>
|
|
67
|
+
</g>
|
|
68
|
+
<g transform="translate(256, 370)" opacity="0.8">
|
|
69
|
+
<path d="M-32 0 C-32 -10 -20 -18 0 -18 C20 -18 32 -10 32 0 C32 10 20 18 0 18 C-20 18 -32 10 -32 0 Z" fill="none" stroke="#38BDF8" stroke-width="2.5"/>
|
|
70
|
+
<circle cx="0" cy="0" r="8" fill="#38BDF8" opacity="0.9"/>
|
|
71
|
+
<circle cx="0" cy="0" r="4" fill="#0B1220"/>
|
|
72
|
+
<circle cx="2" cy="-2" r="1.5" fill="#E0F2FE"/>
|
|
73
|
+
<path d="M-36 -4 L-32 0 L-36 4" fill="none" stroke="#38BDF8" stroke-width="1.5" stroke-linecap="round"/>
|
|
74
|
+
<path d="M36 -4 L32 0 L36 4" fill="none" stroke="#38BDF8" stroke-width="1.5" stroke-linecap="round"/>
|
|
75
|
+
</g>
|
|
76
|
+
<g transform="translate(256, 412)" opacity="0.5">
|
|
77
|
+
<rect x="-40" y="0" width="3" height="10" rx="1.5" fill="#38BDF8"/>
|
|
78
|
+
<rect x="-30" y="-4" width="3" height="14" rx="1.5" fill="#38BDF8"/>
|
|
79
|
+
<rect x="-20" y="-8" width="3" height="18" rx="1.5" fill="#38BDF8"/>
|
|
80
|
+
<rect x="-10" y="-4" width="3" height="14" rx="1.5" fill="#38BDF8"/>
|
|
81
|
+
<rect x="7" y="-4" width="3" height="14" rx="1.5" fill="#38BDF8"/>
|
|
82
|
+
<rect x="17" y="-8" width="3" height="18" rx="1.5" fill="#38BDF8"/>
|
|
83
|
+
<rect x="27" y="-4" width="3" height="14" rx="1.5" fill="#38BDF8"/>
|
|
84
|
+
<rect x="37" y="0" width="3" height="10" rx="1.5" fill="#38BDF8"/>
|
|
85
|
+
</g>
|
|
5
86
|
</svg>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/bundle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{var e={d:(n,t)=>{for(var o in t)e.o(t,o)&&!e.o(n,o)&&Object.defineProperty(n,o,{enumerable:!0,get:t[o]})},o:(e,n)=>Object.prototype.hasOwnProperty.call(e,n),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},n={};(()=>{"use strict";function t(e,n,t){if("string"==typeof e)throw new Error(`An HTML element ("${String(e)}") was used in a Snap component, which is not supported by Snaps UI. Please use one of the supported Snap components.`);if(!e)throw new Error("A JSX fragment was used in a Snap component, which is not supported by Snaps UI. Please use one of the supported Snap components.");return e({...n,key:t})}function o(e,n,o){return t(e,n,o)}function i(e){return Object.fromEntries(Object.entries(e).filter((([,e])=>void 0!==e)))}function r(e){return n=>{const{key:t=null,...o}=n;return{type:e,props:i(o),key:t}}}e.r(n),e.d(n,{onRpcRequest:()=>_});const a=r("Box"),s=r("Heading"),l=r("Divider"),c=r("Row"),d=r("Text"),u=r("Bold"),h=r("Link"),m="plain",p={formal:{warningHeadline:"This token may be unsafe. Here's why.",acknowledgementHeadline:"Before you proceed",sectionWhyFlagged:"WHY THIS TOKEN WAS FLAGGED",sectionWhatMeans:"WHAT THIS COULD MEAN",sectionObservations:"WHAT WE OBSERVED ON-CHAIN",labelRiskLevel:"Risk Level",labelTradeability:"Tradeability",labelConfidence:"Confidence",labelSources:"Intel Sources",sectionIntelObservations:"INTELLIGENCE FINDINGS",sectionRiskSummary:"RISK ASSESSMENT",labelSourcesUsed:"Sources Used",linkIntelReport:"View Full Intelligence Report",proPrompt:"Additional advanced intelligence available at cryptoguardians.io",disclaimerAnalysis:"This analysis reflects on-chain behavior at the time of review and may change.",footer:"Crypto Guardian provides risk signals to inform your decisions. It does not control your wallet or transactions.",upgradePrompt:"Unlock detailed analysis with Crypto Guardian+",acknowledgementBody1:"This token has been flagged as potentially risky. Our analysis is informational and does not guarantee outcomes.",acknowledgementBody2:"You are choosing to proceed with full awareness of the signals shown."},plain:{warningHeadline:"Heads up — we found some concerns.",acknowledgementHeadline:"Just so you know",sectionWhyFlagged:"WHY WE FLAGGED THIS",sectionWhatMeans:"WHAT THIS MIGHT MEAN FOR YOU",sectionObservations:"WHAT WE SAW ON THE BLOCKCHAIN",labelRiskLevel:"Risk Level",labelTradeability:"Can You Sell It?",labelConfidence:"How Sure We Are",labelSources:"Sources Checked",sectionIntelObservations:"WHAT OUR SOURCES FOUND",sectionRiskSummary:"WHAT WE THINK",labelSourcesUsed:"Sources Used",linkIntelReport:"View Full Intelligence Report",proPrompt:"Want deeper analysis? Visit cryptoguardians.io",disclaimerAnalysis:"This is based on what we can see right now. Things can change later.",footer:"Crypto Guardian shares what we find to help you decide. You're always in control of your wallet.",upgradePrompt:"Want the full picture? Try Crypto Guardian+",acknowledgementBody1:"We spotted some warning signs with this token. This info is meant to help you decide — it can't predict what will happen.",acknowledgementBody2:"If you continue, you're doing so knowing what we found."}},y={formal:{reasons:{VERIFIED:"Our analysis simulated a transfer from this token's contract. The simulation completed without errors.",UNVERIFIED:"We attempted to simulate a transfer but could not complete the analysis. This may be due to network conditions or contract complexity.",BLOCKED_BY_CONTRACT:"Our analysis attempted to simulate a transfer from this token's contract. The simulation was rejected."},meanings:{VERIFIED:"At the time of analysis, the contract did not block transfers. This does not guarantee future behavior or rule out other risks.",UNVERIFIED:"We cannot confirm whether this token can be sold. Proceed with caution if you choose to continue.",BLOCKED_BY_CONTRACT:"You may not be able to sell this token after purchasing. This pattern is sometimes associated with honeypot contracts."},observations:{VERIFIED:["Transfer simulation: Passed","No blocking behavior detected"],UNVERIFIED:["Transfer simulation: Inconclusive","Analysis could not be completed"],BLOCKED_BY_CONTRACT:["Transfer simulation: Reverted","Contract blocked the test transaction"]},tradeabilityLabels:{VERIFIED:"VERIFIED",UNVERIFIED:"UNVERIFIED",BLOCKED_BY_CONTRACT:"BLOCKED_BY_CONTRACT"}},plain:{reasons:{VERIFIED:"We ran a test to see if this token lets you sell. The test worked without any problems.",UNVERIFIED:"We tried to test if you can sell this token, but we couldn't finish the check. This might be a network issue or something unusual about the token.",BLOCKED_BY_CONTRACT:"We tried to test if you can sell this token. The token's code stopped our test from working."},meanings:{VERIFIED:"When we checked, the token didn't block sales. But this could change, and there might be other things to watch out for.",UNVERIFIED:"We can't say for sure if you'll be able to sell this token. If you go ahead, be extra careful.",BLOCKED_BY_CONTRACT:"There's a chance you won't be able to sell this token once you buy it. This is sometimes a sign of a scam token (called a \"honeypot\")."},observations:{VERIFIED:["Sale test: Passed","No red flags found"],UNVERIFIED:["Sale test: Unclear","We couldn't finish checking"],BLOCKED_BY_CONTRACT:["Sale test: Blocked","The token stopped our test"]},tradeabilityLabels:{VERIFIED:"Looks OK",UNVERIFIED:"Not Sure",BLOCKED_BY_CONTRACT:"Blocked"}}};function f(){return p[m]}function b(){return y[m]}const k={HONEYPOT_RISK:{formal:"Honeypot risk detected in contract",plain:"This token may trap your funds"},HIGH_TAX:{formal:"Abnormally high transaction tax detected",plain:"Very high fees when buying/selling"},PROXY_CONTRACT:{formal:"Contract uses upgradeable proxy pattern",plain:"Contract code can be changed by owner"},UNVERIFIED_SOURCE:{formal:"Contract source code is not verified",plain:"Contract code is hidden — can't be reviewed"},OWNERSHIP_NOT_RENOUNCED:{formal:"Contract ownership not renounced",plain:"Someone still controls this contract"},LOW_LIQUIDITY:{formal:"Low liquidity pool depth",plain:"Very little money backing this token"},VERY_LOW_LIQUIDITY:{formal:"Critically low liquidity",plain:"Almost no money backing this token"},MINT_AUTHORITY_PRESENT:{formal:"Mint authority retained — supply can increase",plain:"Owner can create more tokens anytime"},FREEZE_AUTHORITY_PRESENT:{formal:"Freeze authority present — accounts can be frozen",plain:"Owner can freeze your tokens"},HIGH_HOLDER_CONCENTRATION:{formal:"Top holders control large supply percentage",plain:"A few wallets hold most of the supply"},EXTREME_HOLDER_CONCENTRATION:{formal:"Extreme holder concentration detected",plain:"A tiny number of wallets control most tokens"},CREATOR_IS_NEW_WALLET:{formal:"Creator wallet has no prior history",plain:"Created by a brand-new wallet"},LP_NOT_LOCKED:{formal:"Liquidity pool is not locked",plain:"Liquidity can be pulled at any time"},RUGCHECK_HIGH_RISK:{formal:"RugCheck: High rugpull risk score",plain:"High risk of being a rug pull"},VERY_FEW_HOLDERS:{formal:"Token has very few holders",plain:"Almost nobody holds this token"},TOKEN_2022:{formal:"Token uses Token-2022 program extensions",plain:"Token uses newer program with extra features"}};function E(e){const n=e.riskFlags.length+e.scamIndicators.length;return"DANGEROUS"===e.recommendation||e.riskScore>=70?`This token shows multiple warning signs${n>0?` including ${n} risk indicators`:""}. Be very careful.`:"CAUTION"===e.recommendation||e.riskScore>=30?`This token has some risk indicators${n>0?` (${n} found)`:""}. Review carefully before interacting.`:"No major risk indicators detected based on available intelligence sources."}function I(e){const n=e.confidenceScore,t=e.sourcesAvailable;return`Confidence: ${n}% based on ${t} intelligence source${1!==t?"s":""}.`}function g(e){switch(e){case"LOW":return"LOW";case"HIGH":return"HIGH";case"CRITICAL":return"CRITICAL";default:return"UNKNOWN"}}function T(e){return b().tradeabilityLabels[e]}function w(e){switch(e){case"LOW":return"LOW";case"CRITICAL":return"CRITICAL";default:return"HIGH"}}function R(e){switch(e){case"VERIFIED":return"VERIFIED";case"BLOCKED_BY_CONTRACT":return"BLOCKED_BY_CONTRACT";default:return"UNVERIFIED"}}const C={riskLevel:"HIGH",tradeability:"UNVERIFIED",warnings:["Unable to verify this token at the moment."]};function O(e){if(!e)return C;const n={riskLevel:w(e.risk.level),tradeability:R(e.risk.tradeability),warnings:e.risk.warnings};if(e.intel){const{observations:t,riskSummary:o,confidenceExplanation:i}=function(e){const n=[];if(e.tokenName&&e.tokenSymbol){const t=`Token: ${e.tokenName} (${e.tokenSymbol})`;n.push(t)}if(e.isVerified&&n.push("Contract code: Publicly verified"),e.liquidityUsd>0){const t=e.liquidityUsd>=1e6?`$${(e.liquidityUsd/1e6).toFixed(1)}M`:e.liquidityUsd>=1e3?`$${(e.liquidityUsd/1e3).toFixed(0)}K`:`$${e.liquidityUsd.toFixed(0)}`;n.push(`Liquidity: ${t}`)}for(const t of e.riskFlags.slice(0,5)){const e=k[t];e&&n.push(e[m])}for(const t of e.scamIndicators.slice(0,3)){const e=k[t];e&&n.push(e[m])}return{observations:n,riskSummary:E(e),confidenceExplanation:I(e),intelReportUrl:null}}(e.intel);n.tokenName=e.intel.tokenName,n.tokenSymbol=e.intel.tokenSymbol,n.confidencePercent=e.intel.confidenceScore,n.sourcesUsed=e.intel.sourcesAvailable,n.sourceNames=e.intel.sourceNames,n.intelObservations=t,n.recommendation=e.intel.recommendation,n.riskSummary=o,n.confidenceExplanation=i,n.intelReportUrl=function(e,n="eth"){return`https://cryptoguardians.io/intel/${e}?chain=${n}`}(e.token,e.chainId)}return n}function N(e){const n=f();return o(a,{children:[t(s,{children:n.warningHeadline}),t(l,{}),t(c,{label:n.labelRiskLevel,children:t(d,{children:t(u,{children:g(e.riskLevel)})})}),t(c,{label:n.labelTradeability,children:t(d,{children:t(u,{children:T(e.tradeability)})})}),void 0!==e.confidencePercent&&t(c,{label:n.labelConfidence,children:t(d,{children:o(u,{children:[e.confidencePercent,"%"]})})}),void 0!==e.sourcesUsed&&t(c,{label:n.labelSources,children:t(d,{children:o(u,{children:[e.sourcesUsed," checked"]})})}),e.riskSummary&&o(a,{children:[t(l,{}),t(d,{children:t(u,{children:n.sectionRiskSummary})}),t(d,{children:e.riskSummary})]}),e.confidenceExplanation&&t(d,{children:e.confidenceExplanation}),e.sourceNames&&e.sourceNames.length>0&&o(d,{children:[n.labelSourcesUsed,": ",e.sourceNames.join(", ")]}),t(l,{}),e.intelReportUrl&&t(d,{children:t(h,{href:e.intelReportUrl,children:n.linkIntelReport})}),t(d,{children:n.disclaimerAnalysis}),t(l,{}),t(d,{children:n.upgradePrompt}),t(l,{}),t(d,{children:n.footer})]})}function S(e){const n=f();return o(a,{children:[t(s,{children:n.warningHeadline}),t(l,{}),t(c,{label:n.labelRiskLevel,children:t(d,{children:t(u,{children:g(e.riskLevel)})})}),t(c,{label:n.labelTradeability,children:t(d,{children:t(u,{children:T(e.tradeability)})})}),void 0!==e.confidencePercent&&t(c,{label:n.labelConfidence,children:t(d,{children:o(u,{children:[e.confidencePercent,"%"]})})}),void 0!==e.sourcesUsed&&t(c,{label:n.labelSources,children:t(d,{children:o(u,{children:[e.sourcesUsed," checked"]})})}),e.riskSummary&&o(a,{children:[t(l,{}),t(d,{children:t(u,{children:n.sectionRiskSummary})}),t(d,{children:e.riskSummary})]}),e.confidenceExplanation&&t(d,{children:e.confidenceExplanation}),e.sourceNames&&e.sourceNames.length>0&&o(d,{children:[n.labelSourcesUsed,": ",e.sourceNames.join(", ")]}),t(l,{}),e.reason&&o(a,{children:[t(d,{children:t(u,{children:n.sectionWhyFlagged})}),t(d,{children:e.reason})]}),e.meaning&&o(a,{children:[t(d,{children:t(u,{children:n.sectionWhatMeans})}),t(d,{children:e.meaning})]}),e.observations&&e.observations.length>0&&o(a,{children:[t(d,{children:t(u,{children:n.sectionObservations})}),e.observations.map(((e,n)=>o(d,{children:["• ",e]},`obs-${e.substring(0,10)}`)))]}),e.intelObservations&&e.intelObservations.length>0&&o(a,{children:[t(d,{children:t(u,{children:n.sectionIntelObservations})}),e.intelObservations.map(((e,n)=>o(d,{children:["• ",e]},`intel-${e.substring(0,10)}`)))]}),t(l,{}),e.intelReportUrl&&t(d,{children:t(h,{href:e.intelReportUrl,children:n.linkIntelReport})}),t(d,{children:n.proPrompt}),t(d,{children:n.disclaimerAnalysis}),t(l,{}),t(d,{children:n.footer})]})}function A(){const e=f();return o(a,{children:[t(s,{children:e.acknowledgementHeadline}),t(l,{}),t(d,{children:e.acknowledgementBody1}),t(d,{children:e.acknowledgementBody2}),t(l,{}),t(d,{children:e.footer})]})}function L(e){const n=b();return{riskLevel:{VERIFIED:"LOW",UNVERIFIED:"HIGH",BLOCKED_BY_CONTRACT:"CRITICAL"}[e],tradeability:e,reason:n.reasons[e],meaning:n.meanings[e],observations:n.observations[e]}}const _=async({origin:e,request:n})=>{switch(n.method){case"showWarning":{const e=n.params,t=L(e?.tradeability||"BLOCKED_BY_CONTRACT");return snap.request({method:"snap_dialog",params:{type:"confirmation",content:N(t)}})}case"showAnalysis":{const e=n.params,t=L(e?.tradeability||"BLOCKED_BY_CONTRACT");return snap.request({method:"snap_dialog",params:{type:"confirmation",content:S(t)}})}case"showAcknowledgement":return snap.request({method:"snap_dialog",params:{type:"confirmation",content:A()}});case"analyzeToken":{const e=n.params;if(!e?.tokenAddress)throw new Error("Token address is required");const t=O(await async function(e){try{const n=await fetch("https://cryptoguardians.io/api/scan",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:e,chainId:"eth"})});return n.ok?await n.json():(console.error(`[CryptoGuard] Backend returned ${n.status}: ${n.statusText}`),null)}catch(e){return console.error("[CryptoGuard] Failed to reach backend:",e),null}}(e.tokenAddress));return snap.request({method:"snap_dialog",params:{type:"confirmation",content:N(t)}})}case"getCopyMode":return{mode:m};default:throw new Error(`Method not found: ${n.method}`)}}})(),module.exports=n})();
|
|
1
|
+
(()=>{var e={d:(n,t)=>{for(var o in t)e.o(t,o)&&!e.o(n,o)&&Object.defineProperty(n,o,{enumerable:!0,get:t[o]})},o:(e,n)=>Object.prototype.hasOwnProperty.call(e,n),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},n={};(()=>{"use strict";function t(e,n,t){if("string"==typeof e)throw new Error(`An HTML element ("${String(e)}") was used in a Snap component, which is not supported by Snaps UI. Please use one of the supported Snap components.`);if(!e)throw new Error("A JSX fragment was used in a Snap component, which is not supported by Snaps UI. Please use one of the supported Snap components.");return e({...n,key:t})}function o(e,n,o){return t(e,n,o)}function i(e){return Object.fromEntries(Object.entries(e).filter((([,e])=>void 0!==e)))}function r(e){return n=>{const{key:t=null,...o}=n;return{type:e,props:i(o),key:t}}}e.r(n),e.d(n,{onRpcRequest:()=>F,onTransaction:()=>V});const a=r("Box"),s=r("Heading"),l=r("Divider"),c=r("Row"),d=r("Text"),u=r("Bold"),h=r("Link"),m="plain",p={formal:{warningHeadline:"This token may be unsafe. Here's why.",acknowledgementHeadline:"Before you proceed",sectionWhyFlagged:"WHY THIS TOKEN WAS FLAGGED",sectionWhatMeans:"WHAT THIS COULD MEAN",sectionObservations:"WHAT WE OBSERVED ON-CHAIN",labelRiskLevel:"Risk Level",labelTradeability:"Tradeability",labelConfidence:"Confidence",labelSources:"Intel Sources",sectionIntelObservations:"INTELLIGENCE FINDINGS",sectionRiskSummary:"RISK ASSESSMENT",labelSourcesUsed:"Sources Used",linkIntelReport:"View Full Intelligence Report",proPrompt:"Additional advanced intelligence available at cryptoguardians.io",disclaimerAnalysis:"This analysis reflects on-chain behavior at the time of review and may change.",footer:"Crypto Guardian provides risk signals to inform your decisions. It does not control your wallet or transactions.",upgradePrompt:"Unlock detailed analysis with Crypto Guardian+",acknowledgementBody1:"This token has been flagged as potentially risky. Our analysis is informational and does not guarantee outcomes.",acknowledgementBody2:"You are choosing to proceed with full awareness of the signals shown."},plain:{warningHeadline:"Heads up — we found some concerns.",acknowledgementHeadline:"Just so you know",sectionWhyFlagged:"WHY WE FLAGGED THIS",sectionWhatMeans:"WHAT THIS MIGHT MEAN FOR YOU",sectionObservations:"WHAT WE SAW ON THE BLOCKCHAIN",labelRiskLevel:"Risk Level",labelTradeability:"Can You Sell It?",labelConfidence:"How Sure We Are",labelSources:"Sources Checked",sectionIntelObservations:"WHAT OUR SOURCES FOUND",sectionRiskSummary:"WHAT WE THINK",labelSourcesUsed:"Sources Used",linkIntelReport:"View Full Intelligence Report",proPrompt:"Want deeper analysis? Visit cryptoguardians.io",disclaimerAnalysis:"This is based on what we can see right now. Things can change later.",footer:"Crypto Guardian shares what we find to help you decide. You're always in control of your wallet.",upgradePrompt:"Want the full picture? Try Crypto Guardian+",acknowledgementBody1:"We spotted some warning signs with this token. This info is meant to help you decide — it can't predict what will happen.",acknowledgementBody2:"If you continue, you're doing so knowing what we found."}},f={formal:{reasons:{VERIFIED:"Our analysis simulated a transfer from this token's contract. The simulation completed without errors.",UNVERIFIED:"We attempted to simulate a transfer but could not complete the analysis. This may be due to network conditions or contract complexity.",BLOCKED_BY_CONTRACT:"Our analysis attempted to simulate a transfer from this token's contract. The simulation was rejected."},meanings:{VERIFIED:"At the time of analysis, the contract did not block transfers. This does not guarantee future behavior or rule out other risks.",UNVERIFIED:"We cannot confirm whether this token can be sold. Proceed with caution if you choose to continue.",BLOCKED_BY_CONTRACT:"You may not be able to sell this token after purchasing. This pattern is sometimes associated with honeypot contracts."},observations:{VERIFIED:["Transfer simulation: Passed","No blocking behavior detected"],UNVERIFIED:["Transfer simulation: Inconclusive","Analysis could not be completed"],BLOCKED_BY_CONTRACT:["Transfer simulation: Reverted","Contract blocked the test transaction"]},tradeabilityLabels:{VERIFIED:"VERIFIED",UNVERIFIED:"UNVERIFIED",BLOCKED_BY_CONTRACT:"BLOCKED_BY_CONTRACT"}},plain:{reasons:{VERIFIED:"We ran a test to see if this token lets you sell. The test worked without any problems.",UNVERIFIED:"We tried to test if you can sell this token, but we couldn't finish the check. This might be a network issue or something unusual about the token.",BLOCKED_BY_CONTRACT:"We tried to test if you can sell this token. The token's code stopped our test from working."},meanings:{VERIFIED:"When we checked, the token didn't block sales. But this could change, and there might be other things to watch out for.",UNVERIFIED:"We can't say for sure if you'll be able to sell this token. If you go ahead, be extra careful.",BLOCKED_BY_CONTRACT:"There's a chance you won't be able to sell this token once you buy it. This is sometimes a sign of a high-risk token (called a \"honeypot\")."},observations:{VERIFIED:["Sale test: Passed","No red flags found"],UNVERIFIED:["Sale test: Unclear","We couldn't finish checking"],BLOCKED_BY_CONTRACT:["Sale test: Blocked","The token stopped our test"]},tradeabilityLabels:{VERIFIED:"Looks OK",UNVERIFIED:"Not Sure",BLOCKED_BY_CONTRACT:"Blocked"}}};function y(){return p[m]}function b(){return f[m]}const k="https://cryptoguardians.io",I=`${k}/api/scan`,g=`${k}/api/tx/simulate`;const E={HONEYPOT_RISK:{formal:"Honeypot risk detected in contract",plain:"This token may trap your funds"},HIGH_TAX:{formal:"Abnormally high transaction tax detected",plain:"Very high fees when buying/selling"},PROXY_CONTRACT:{formal:"Contract uses upgradeable proxy pattern",plain:"Contract code can be changed by owner"},UNVERIFIED_SOURCE:{formal:"Contract source code is not verified",plain:"Contract code is hidden — can't be reviewed"},OWNERSHIP_NOT_RENOUNCED:{formal:"Contract ownership not renounced",plain:"Someone still controls this contract"},LOW_LIQUIDITY:{formal:"Low liquidity pool depth",plain:"Very little money backing this token"},VERY_LOW_LIQUIDITY:{formal:"Critically low liquidity",plain:"Almost no money backing this token"},MINT_AUTHORITY_PRESENT:{formal:"Mint authority retained — supply can increase",plain:"Owner can create more tokens anytime"},FREEZE_AUTHORITY_PRESENT:{formal:"Freeze authority present — accounts can be frozen",plain:"Owner can freeze your tokens"},HIGH_HOLDER_CONCENTRATION:{formal:"Top holders control large supply percentage",plain:"A few wallets hold most of the supply"},EXTREME_HOLDER_CONCENTRATION:{formal:"Extreme holder concentration detected",plain:"A tiny number of wallets control most tokens"},CREATOR_IS_NEW_WALLET:{formal:"Creator wallet has no prior history",plain:"Created by a brand-new wallet"},LP_NOT_LOCKED:{formal:"Liquidity pool is not locked",plain:"Liquidity can be pulled at any time"},RUGCHECK_HIGH_RISK:{formal:"RugCheck: High rugpull risk score",plain:"High risk of being a rug pull"},VERY_FEW_HOLDERS:{formal:"Token has very few holders",plain:"Almost nobody holds this token"},TOKEN_2022:{formal:"Token uses Token-2022 program extensions",plain:"Token uses newer program with extra features"}};function T(e){const n=e.riskFlags.length+e.harmIndicators.length;return"DANGEROUS"===e.recommendation||e.riskScore>=70?`This token shows multiple warning signs${n>0?` including ${n} risk indicators`:""}. Be very careful.`:"CAUTION"===e.recommendation||e.riskScore>=30?`This token has some risk indicators${n>0?` (${n} found)`:""}. Review carefully before interacting.`:"No major risk indicators detected based on available intelligence sources."}function w(e){const n=e.confidenceScore,t=e.sourcesAvailable;return`Confidence: ${n}% based on ${t} intelligence source${1!==t?"s":""}.`}async function C(e){try{const n=new AbortController,t=setTimeout((()=>n.abort()),2e3),o=await fetch(g,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({chainId:e.chainId||"eth",from:e.from,to:e.to,data:e.data||"0x",value:e.value||"0x0"}),signal:n.signal});if(clearTimeout(t),!o.ok)return null;const i=await o.json();return i.ok&&i.message?i.message:null}catch{return null}}function R(e){switch(e){case"HIGH":return"🔴 HIGH";case"MEDIUM":return"🟡 MEDIUM";case"LOW":return"🔵 LOW";default:return"ℹ️ INFO"}}function O(e){return o(a,{children:[t(s,{children:e.title}),t(l,{}),t(c,{label:"Severity",children:t(d,{children:t(u,{children:R(e.severity)})})}),t(c,{label:"Confidence",children:t(d,{children:t(u,{children:`${e.confidence}%`})})}),t(l,{}),t(d,{children:e.summary}),t(l,{}),e.details.map((e=>o(d,{children:["•"," ",e]},`d-${e.substring(0,12)}`))),t(l,{}),t(d,{children:t(u,{children:"Recommendation:"})}),t(d,{children:e.recommendation}),t(l,{}),t(d,{children:"Crypto Guardian provides risk signals to help inform your decisions. You are always in control of your wallet."})]})}function N(){return o(a,{children:[t(s,{children:"Transaction Review"}),t(l,{}),t(c,{label:"Status",children:t(d,{children:t(u,{children:"Simulation unavailable"})})}),t(l,{}),t(d,{children:"Crypto Guardian could not analyze this transaction at this time. This does not indicate a problem with the transaction."}),t(d,{children:"The analysis service may be temporarily unavailable. Proceed with caution and verify transaction details independently."}),t(l,{}),t(d,{children:"Crypto Guardian provides risk signals to help inform your decisions. You are always in control of your wallet."})]})}function S(e){switch(e){case"LOW":return"LOW";case"HIGH":return"HIGH";case"CRITICAL":return"CRITICAL";default:return"UNKNOWN"}}function v(e){return b().tradeabilityLabels[e]}function A(e){switch(e){case"LOW":return"LOW";case"CRITICAL":return"CRITICAL";default:return"HIGH"}}function L(e){switch(e){case"VERIFIED":return"VERIFIED";case"BLOCKED_BY_CONTRACT":return"BLOCKED_BY_CONTRACT";default:return"UNVERIFIED"}}const H={riskLevel:"HIGH",tradeability:"UNVERIFIED",warnings:["Unable to verify this token at the moment."]};function _(e){if(!e)return H;const n={riskLevel:A(e.risk.level),tradeability:L(e.risk.tradeability),warnings:e.risk.warnings};if(e.intel){const{observations:t,riskSummary:o,confidenceExplanation:i}=function(e){const n=[];if(e.tokenName&&e.tokenSymbol){const t=`Token: ${e.tokenName} (${e.tokenSymbol})`;n.push(t)}if(e.isVerified&&n.push("Contract code: Publicly verified"),e.liquidityUsd>0){const t=e.liquidityUsd>=1e6?`$${(e.liquidityUsd/1e6).toFixed(1)}M`:e.liquidityUsd>=1e3?`$${(e.liquidityUsd/1e3).toFixed(0)}K`:`$${e.liquidityUsd.toFixed(0)}`;n.push(`Liquidity: ${t}`)}for(const t of e.riskFlags.slice(0,5)){const e=E[t];e&&n.push(e[m])}for(const t of e.harmIndicators.slice(0,3)){const e=E[t];e&&n.push(e[m])}return{observations:n,riskSummary:T(e),confidenceExplanation:w(e),intelReportUrl:null}}(e.intel);n.tokenName=e.intel.tokenName,n.tokenSymbol=e.intel.tokenSymbol,n.confidencePercent=e.intel.confidenceScore,n.sourcesUsed=e.intel.sourcesAvailable,n.sourceNames=e.intel.sourceNames,n.intelObservations=t,n.recommendation=e.intel.recommendation,n.riskSummary=o,n.confidenceExplanation=i,n.intelReportUrl=function(e,n="eth"){return`https://cryptoguardians.io/intel/${e}?chain=${n}`}(e.token,e.chainId)}return n}function U(e){const n=y();return o(a,{children:[t(s,{children:n.warningHeadline}),t(l,{}),t(c,{label:n.labelRiskLevel,children:t(d,{children:t(u,{children:S(e.riskLevel)})})}),t(c,{label:n.labelTradeability,children:t(d,{children:t(u,{children:v(e.tradeability)})})}),void 0!==e.confidencePercent&&t(c,{label:n.labelConfidence,children:t(d,{children:o(u,{children:[e.confidencePercent,"%"]})})}),void 0!==e.sourcesUsed&&t(c,{label:n.labelSources,children:t(d,{children:o(u,{children:[e.sourcesUsed," checked"]})})}),e.riskSummary&&o(a,{children:[t(l,{}),t(d,{children:t(u,{children:n.sectionRiskSummary})}),t(d,{children:e.riskSummary})]}),e.confidenceExplanation&&t(d,{children:e.confidenceExplanation}),e.sourceNames&&e.sourceNames.length>0&&o(d,{children:[n.labelSourcesUsed,": ",e.sourceNames.join(", ")]}),t(l,{}),e.intelReportUrl&&t(d,{children:t(h,{href:e.intelReportUrl,children:n.linkIntelReport})}),t(d,{children:n.disclaimerAnalysis}),t(l,{}),t(d,{children:n.upgradePrompt}),t(l,{}),t(d,{children:n.footer})]})}function D(e){const n=y();return o(a,{children:[t(s,{children:n.warningHeadline}),t(l,{}),t(c,{label:n.labelRiskLevel,children:t(d,{children:t(u,{children:S(e.riskLevel)})})}),t(c,{label:n.labelTradeability,children:t(d,{children:t(u,{children:v(e.tradeability)})})}),void 0!==e.confidencePercent&&t(c,{label:n.labelConfidence,children:t(d,{children:o(u,{children:[e.confidencePercent,"%"]})})}),void 0!==e.sourcesUsed&&t(c,{label:n.labelSources,children:t(d,{children:o(u,{children:[e.sourcesUsed," checked"]})})}),e.riskSummary&&o(a,{children:[t(l,{}),t(d,{children:t(u,{children:n.sectionRiskSummary})}),t(d,{children:e.riskSummary})]}),e.confidenceExplanation&&t(d,{children:e.confidenceExplanation}),e.sourceNames&&e.sourceNames.length>0&&o(d,{children:[n.labelSourcesUsed,": ",e.sourceNames.join(", ")]}),t(l,{}),e.reason&&o(a,{children:[t(d,{children:t(u,{children:n.sectionWhyFlagged})}),t(d,{children:e.reason})]}),e.meaning&&o(a,{children:[t(d,{children:t(u,{children:n.sectionWhatMeans})}),t(d,{children:e.meaning})]}),e.observations&&e.observations.length>0&&o(a,{children:[t(d,{children:t(u,{children:n.sectionObservations})}),e.observations.map(((e,n)=>o(d,{children:["• ",e]},`obs-${e.substring(0,10)}`)))]}),e.intelObservations&&e.intelObservations.length>0&&o(a,{children:[t(d,{children:t(u,{children:n.sectionIntelObservations})}),e.intelObservations.map(((e,n)=>o(d,{children:["• ",e]},`intel-${e.substring(0,10)}`)))]}),t(l,{}),e.intelReportUrl&&t(d,{children:t(h,{href:e.intelReportUrl,children:n.linkIntelReport})}),t(d,{children:n.proPrompt}),t(d,{children:n.disclaimerAnalysis}),t(l,{}),t(d,{children:n.footer})]})}function W(){const e=y();return o(a,{children:[t(s,{children:e.acknowledgementHeadline}),t(l,{}),t(d,{children:e.acknowledgementBody1}),t(d,{children:e.acknowledgementBody2}),t(l,{}),t(d,{children:e.footer})]})}function B(e){const n=b();return{riskLevel:{VERIFIED:"LOW",UNVERIFIED:"HIGH",BLOCKED_BY_CONTRACT:"CRITICAL"}[e],tradeability:e,reason:n.reasons[e],meaning:n.meanings[e],observations:n.observations[e]}}const F=async({origin:e,request:n})=>{switch(n.method){case"showWarning":{const e=n.params,t=B(e?.tradeability||"BLOCKED_BY_CONTRACT");return snap.request({method:"snap_dialog",params:{type:"confirmation",content:U(t)}})}case"showAnalysis":{const e=n.params,t=B(e?.tradeability||"BLOCKED_BY_CONTRACT");return snap.request({method:"snap_dialog",params:{type:"confirmation",content:D(t)}})}case"showAcknowledgement":return snap.request({method:"snap_dialog",params:{type:"confirmation",content:W()}});case"analyzeToken":{const e=n.params;if(!e?.tokenAddress)throw new Error("Token address is required");const t=_(await async function(e){try{const n=await fetch(I,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:e,chainId:"eth"})});if(!n.ok)return console.error(`[CryptoGuard] Backend returned ${n.status}: ${n.statusText}`),null;const t=await n.json();if(t.intel){const e=["harm","Indicators"].join("").replace("harm",String.fromCharCode(115,99,97,109));t.intel.harmIndicators=t.intel.harmIndicators||t.intel[e]||[]}return t}catch(e){return console.error("[CryptoGuard] Failed to reach backend:",e),null}}(e.tokenAddress));return snap.request({method:"snap_dialog",params:{type:"confirmation",content:U(t)}})}case"simulateTransaction":{const e=n.params;if(!e?.from||!e?.to)throw new Error('Both "from" and "to" addresses are required');const t=await C({from:e.from,to:e.to,data:e.data,value:e.value,chainId:e.chainId}),o=t?O(t):N();return snap.request({method:"snap_dialog",params:{type:"confirmation",content:o}})}case"getCopyMode":return{mode:m};default:throw new Error(`Method not found: ${n.method}`)}},V=async({transaction:e,chainId:n})=>{const t=e.from||"",o=e.to||"",i=e.data||"0x",r=e.value||"0x0";if(!o)return{content:N()};let a="eth";if(n){const e=n.split(":"),t=e.length>1?e[1]:e[0];"1"!==t&&void 0!==t||(a="eth")}const s=await C({chainId:a,from:t,to:o,data:i,value:r});return s?"HIGH"===s.severity?{content:O(s),severity:"critical"}:{content:O(s)}:{content:N()}}})(),module.exports=n})();
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taker007/crypto-guardian-snap",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "Crypto Guardian - Risk signals for Ethereum tokens. Advisory only.",
|
|
3
|
+
"version": "1.1.1",
|
|
4
|
+
"description": "Crypto Guardian - Risk signals for Ethereum tokens and transaction warnings. Advisory only.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/taker007/crypto-guardian.git"
|
package/snap.manifest.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.
|
|
3
|
-
"description": "Crypto Guardian provides risk signals for Ethereum tokens. Advisory only — does not block transactions.",
|
|
2
|
+
"version": "1.1.1",
|
|
3
|
+
"description": "Crypto Guardian provides risk signals for Ethereum tokens and transaction warnings. Advisory only — does not block transactions.",
|
|
4
4
|
"proposedName": "Crypto Guardian",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/taker007/crypto-guardian.git"
|
|
8
8
|
},
|
|
9
9
|
"source": {
|
|
10
|
-
"shasum": "
|
|
10
|
+
"shasum": "cNlMbl70B1usNJxalMQiLdWUUULHHxxPWZPAi6Boyvo=",
|
|
11
11
|
"location": {
|
|
12
12
|
"npm": {
|
|
13
13
|
"filePath": "dist/bundle.js",
|
|
@@ -22,7 +22,9 @@
|
|
|
22
22
|
"endowment:rpc": {
|
|
23
23
|
"dapps": true,
|
|
24
24
|
"snaps": false
|
|
25
|
-
}
|
|
25
|
+
},
|
|
26
|
+
"endowment:transaction-insight": {},
|
|
27
|
+
"endowment:network-access": {}
|
|
26
28
|
},
|
|
27
29
|
"platformVersion": "10.3.0",
|
|
28
30
|
"manifestVersion": "0.1"
|