Commit Graph
18 Commits
Author SHA1 Message Date
SatoshiQaziMuhammed 8cbde5c422 Tell the reader when a .kurd page could not load a part from elsewhere (#38)
A .kurd page may load only from its own name, so a site built to pull a
video, an image or a script from another server has that part missing,
with nothing saying why. A script the wallet adds at the start of every
.kurd document reports the page's own policy violations; the browser
shows a note naming what kind of content was not loaded, until the
reader closes it or leaves the page.

Only the top frame of the .kurd page shown is heard, and only a block of
a server other than the page's own counts: inline script, eval and data
URLs are the page's doing, not a server it relies on. A page can post
the report itself, but only to have the note shown about itself.
2026-11-06 02:41:43 +04:00
SatoshiQaziMuhammed 425079281c Resolve and serve .kurd sites from verified content, never via DNS (#37)
* Resolve .kurd names on chain and keep them away from DNS and search

The Navnisan pallet is live on Zagros People. The wallet now reads a name's
record and every ancestor's at one finalized block, checks that each record
sits under the parent its name implies, and judges validity the way the
pallet does (expiry, 30-day grace for leases, a subname valid only under the
registration it was set against). Records are decoded by hand, so a lookup
does not depend on the chain's runtime being loaded; the decoder is tested
against records read from the live chain, and namehash against the vectors
the pallet pins.

Names are read through the light client, which proves each value. The
chain's own connection is RPC first, so it is not used for names. When the
light client cannot answer, two RPC nodes on different hosts must return the
same records; an answer reached that way is marked unverified, and an
official, institutional, reserved or zone name is then refused rather than
opened.

The light client tracked its users with one set, so the RPC fallback
releasing a chain would stop it under any other reader. Each holder now
keeps its own lease.

A .kurd host never reaches system DNS or the search engine: the search box
offers no web address or search for it, and the DApp browser answers every
request to such a host itself, including loadUrl and resources a page
embeds. The DuckDuckGo query is now URL-encoded.

* Verify .kurd site content block by block

A name's content is an IPFS CID on chain; mirrors serve it as a CAR. Every
block in the CAR is checked against its CID while it is read, and one block
that does not match refuses the whole CAR, so a mirror can withhold content
but cannot change it. Files are then assembled only by following CIDs taken
from blocks already checked, starting from the CID the chain gave rather
than the roots the CAR claims.

Supported: CIDv1 and CIDv0, dag-pb and raw, sha2-256 and inlined identity
blocks; UnixFS files of any chunking, plain directories and HAMT-sharded
directories (murmur3-x64-64, as Kubo builds them). An ipns contenthash, a
symlink, an escaping path segment or a file over 32 MiB is refused.

Tested against CARs Kubo produced, taken unchanged from
ipfs/gateway-conformance (MIT / Apache-2.0), including a 238-shard HAMT, a
CAR with a missing block and nodes with their fields in either order;
murmur3 also against Guava's reference vector.

* Serve .kurd sites from verified content under their own origin

The DApp browser now answers https://<name>.kurd itself: the name is
resolved on chain, its content root fetched from IPFS trustless gateways as
a CAR for the requested path, verified block by block, and only then served.
The page's origin is the full name, so cookies, storage and permissions
belong to that name alone, and every response carries a policy the wallet
writes: nothing loads or connects outside the name, no workers, no framing.

Gateways are tried in order and one that fails, withholds or changes a block
is skipped. A gateway saying "not found" is believed only once the parent
directory, verified, shows the name is absent. A directory is served through
its index.html. The gateway list is the signed kurd/gateways.json from the
config repository when it can be read, otherwise the gateways measured
reachable from Turkiye; entries can only be https origins.

Bad paths (dot segments, encoded slashes, malformed escapes, non-UTF-8) are
refused before any lookup. A refused, missing or unavailable name, ipns
content and feeds get their own status; a name's resolution is reused for a
minute so one page does not resolve it once per resource.

* Give the runtime component the app's HTTP client for .kurd content

The site server fetches CARs over the shared client, so gateway requests use
the same DNS-over-HTTPS-first resolver as the rest of the app.

* Hear the DApp bridge only from the top frame of the page shown

The polkadot-js and MetaMask bridges were exposed with addJavascriptInterface,
which every frame of a page can call. A third-party frame inside an
authorised DApp -- an ad, an embed -- could ask for the account list or a
signature, and the request was shown in the DApp's name, because
authorisation follows the page the tab shows.

The bridges now use a web message listener: the WebView reports each
message's origin and frame, and only a message from the top frame whose
origin is the page shown is heard. On a WebView too old to report them, the
bridge stays off instead of trusting the page. The bridge is also added
before the tab's first load, since it reaches only documents loaded after
it.

* Let .kurd pages reach the chain through the wallet's connection

A .kurd page may only connect to its own name, so it cannot open a node
connection of its own. The provider half of the polkadot-js extension API
(pub(rpc.listProviders, startProvider, send, subscribe, subscribeConnected))
now answers it over the wallet's connection to Pezkuwi and Zagros relay,
Asset Hub and People, which falls back to the light client.

Offered only when the tab shows a .kurd page, judged by the WebView's page
rather than the message. Only calls that read state, estimate fees or submit
an extrinsic the user already signed pass; key, peer and offchain methods do
not. A subscription ends when the tab leaves the page's origin. Calls are
answered off the request queue so a slow node does not hold up the page,
and params are forwarded as the page wrote them rather than reparsed (a
block number must not become 123.0).

* Offer a typed .kurd name in DApp search as the name itself

Typing a valid .kurd name now shows it under its own heading, with the
shield and "resolved on chain, never sent to a search engine", and opens
https://<name>/ in the browser. An invalid one is offered nowhere: not as a
web address, not as a search.

* Let runtime unit tests log a warning with its cause

The test stand-in for android.util.Log had no w(tag, msg, throwable), so any
code under test that logged a failure that way stopped with NoSuchMethodError
instead of carrying on: the .kurd fetcher logs each gateway it skips.

* Show what was verified about a .kurd page, and stop at what was not

The address bar of a .kurd page carries a badge in place of the padlock:
Official for a name Parliament gave, Registered for a bought one, Not
verified for one the reader chose to open on two RPC nodes' word. Tapping it
shows the block the name was proven at, the owner (a state institution or an
account), the content CID, and a button to clear the site's storage, cookies
and permissions.

A page that did not open is replaced by a notice instead of a blank page:
an official name that cannot be verified now (retry, never open), a name read
through RPC nodes only (go back, or open anyway), an unregistered name, a
name without a site, and content no mirror could deliver verifiably.

Behind it the site server keeps each name's page state, set only by the
page's own document, and holds back a name read through RPC nodes until the
reader chooses to open it. Texts in Kurmanji, English and Turkish.

* Warn before opening a .kurd name that imitates an official one

Zone names are institutional by construction, and the commonest imitation
folds the zone into the label: serok-gov.kurd or serokgov.kurd for
serok.gov.kurd. When a typed name has such a candidate and the candidate
resolves, proven, as an official name, search asks first: go to the official
name, or open the typed one anyway. The check runs only for names with a
candidate and gives up after a few seconds; the opened page still shows by
its badge whether it is official.

* Say on the signing screen what kind of .kurd name asks

A signature requested from a .kurd page now names the page by its .kurd
name with its kind: Official, Bought (not official) or Not verified. For a
name that is not official, the reader is told to check the full name, since
the state did not give it; for one opened without proof, to sign only when
sure whose site it is.

* Judge a DApp request by the page that sent it, not the page shown by then

Bridge requests are handled one at a time, after they arrive. A page could
send a request and navigate at once, and its request was then authorised,
and named on the signing screen, as the next page's: a .kurd page could have
its signature request shown as Official by moving to an official name.

Every request now carries the origin the WebView reported for its message
(the polkadot-js url the page writes is no longer read). A request whose
origin is not the page shown when it is handled is refused, and the signing
screen is built from the asking origin's own .kurd state, refusing as well
if the tab has moved on.

* Serve .kurd feeds from their publisher's newest signed release

A feed name (a site that changes many times a day) carries its publisher's
key and an anchor: the newest release the chain was told of. The wallet asks
the gateways for the publisher's IPNS record, verifies each against the key
the chain gives (never the key in the record or its name), refuses expired
ones, V1-only ones and ones whose legacy fields contradict the signed data,
and serves the newest release at or past the anchor. When none is confirmed,
it serves the anchor itself and the browser says that a newer version could
not be found; the release the chain already names is always served from the
chain's root.

Verification is tested against records Kubo signed, taken unchanged from
ipfs/gateway-conformance (MIT / Apache-2.0).
2026-11-06 00:25:15 +04:00
SatoshiQaziMuhammed cf74df7cf4 Ship third-party licences and point to the exact source of each build (#36)
* Ship third-party licences and point to the exact source of each build

The light client links smoldot (GPL-3.0-or-later WITH Classpath-exception-2.0), and the app
shipped no third-party notices at all. Releases are not tagged, so nothing told a user which
source a given APK was built from.

- Settings > About gets an "Open source licenses" row. It opens the licences page with the commit
  the build was made from (BuildConfig.LICENCES_URL, from git rev-parse HEAD).
- assets/licences/rust-crates.txt lists the 430 Rust crates linked into the four native libraries,
  with their licence texts. scripts/licences/rust_notices.py writes it from the lockfiles, and a
  Code Quality job fails when it is stale.
- assets/licences/native-libraries.txt covers the prebuilt libsqlcipher.so and libsr25519java.so.
- The licensee plugin bundles the Android library list into the APK and fails the build on a
  licence outside the allowed set.
- NOTICE names the Pezkuwi Wallet copyright and where these notices live.

* Check Android library licences in Code Quality and keep the report

The build job fails on a disallowed licence but does not say which library, and its workflow is
taken from main. This job runs only the licence check on the PR branch and uploads the report
naming each library and its licence.

* Replace the GPL-3.0 NovaCrypto libraries and allow the reviewed licences

substrate-sdk-android brings in NovaCrypto BIP39, Sha256, ToRuntime and SecureString, all
GPL-3.0 without exception, which made the APK a GPL-3.0 combined work alongside Google's
proprietary SDKs. The SDK uses four of their types, only in MnemonicCreator and EnglishWordList.
common now provides those types under Apache-2.0 with the binary interface the SDK is compiled
against (taken from its bytecode), and every configuration excludes the NovaCrypto groups.

Bip39VectorsTest runs the SDK's MnemonicCreator on them against all 24 English BIP-0039 vectors,
both directions, plus a round trip of each random mnemonic length. Checked outside Gradle against
the SDK 2.11.0 classes: 24/24, and red when the checksum is broken.

The licence policy now names each remaining library licensee rejected: permissive licences
declared by URL, POMs without a licence (checked against each project's repository), Google's
SDK terms for the Play build, and the EPL libraries one by one.
2026-11-05 21:25:30 +04:00
SatoshiQaziMuhammed 58ef588261 Log Wallet Connect init failures; give empty errors a text; retranslate Kurmanji (#33)
* Log Wallet Connect init failures; give empty network errors a text

- Wallet Connect core and Web3Wallet initialization errors were swallowed
  silently; log them. A retry is not added: initialization fails only on
  bad configuration, and the relay connects later on demand.
- NovaException.networkError carried an empty message; it now uses the
  existing translated connection error text. The unused
  NovaException.unexpectedError is removed.
- BaseException.unexpectedError fell back to an empty message when the
  exception had none; HttpExceptionHandler now passes the translated
  common error text as the fallback.
- Remove the unused AccountRepository.getMyAccounts stub.

* Retranslate the Kurmanji strings

The values-ku file was word-by-word machine output that mixed English and
Kurmanji (1709 of 2080 strings had English left in, 620 were English
verbatim). Rebuild it from the English source with a fixed wallet glossary:
every translatable string and plural is translated, 18 strings that were
missing are added, and strings marked translatable="false" or no longer in
the English source are dropped.

* Skip commented-out strings in the Kurmanji file

Two English strings have an older, commented-out copy; reading the
comments emitted each of them twice and failed resource merging.
2026-11-04 17:13:54 +04:00
SatoshiQaziMuhammedandClaude 280ccc3fd6 DApps: the Dijital Kurdistan Ecosystem Hub, a native screen (#24)
* DApps: the Dijital Kurdistan Ecosystem Hub, a native screen

Tapping "Dijital Kurdistan" in the DApps tab used to open pezkuwichain.io in the
browser. It now opens the hub first, inside the DApps tab so the wallet's bottom
bar stays in view; the user picks an app there and it opens in the DApp browser.

- Four sections: Finance (8), Governance (9), Education (4), Social (8). Each is
  a card with a glowing border in its colour (green, red, amber, blue), a header
  band with its name and app count, and a four-column grid of apps.
- Apps open the same pages the web app's mobile home links to, at
  app.pezkuwichain.io, or their own sites: Wallet and Validators the explorer,
  Exchange pex.network, Delegation wekil.pex.mom, KurdAI kurdishtts.dks.news,
  Games games.pex.mom, Rewshenbir rewshenbir.pezkiwi.app. Music has no page yet:
  it is shown dimmed and does nothing when tapped.
- The entry is recognised by its URL (pezkuwichain.io root, from
  wallet-utils dapps_full.json), so favourites open the hub too. Back, from the
  arrow or the system, closes the hub before it leaves the tab.
- Strings in English, Turkish and Kurmanji, worded as the web app words them;
  other languages fall back to English.

* DApps hub: open Music at music.dks.news

Every app in the hub now has an address, so the dimmed, inert state for an app
without one is gone along with its string.

* DApps hub: open KurdMedia at dks.news

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-18 09:07:10 +04:00
Satoshi Qazi Muhammed 6c70c91730 Fix Bridge swap destination + add confirmed Kurdish translation
BRIDGE_ADDRESS_GENERIC was still the retired legacy single-key bot's
address (5C5CW7xD...), not the real 3-of-5 multisig custody
(BridgeMultisigConstants.MULTISIG_ADDRESS). Confirmed live: a real user
swap sent there landed at the dead address and was never detected by
usdt-bridge's listener (which only watches the multisig account). Funds
were recovered separately using the still-intact legacy seed; this fixes
the actual destination so future swaps land where the listener watches.

Also added the user-confirmed Kurmancî translation for
bridge_wusdt_to_usdt_blocked (values-ku), replacing the now-stale text left
untouched in the previous commit pending native review.
2026-07-14 21:22:04 -07:00
Kurdistan Tech Ministry f5b38eed8c chore: remove Branch.io SDK and route deep links through own domain
Branch.io was inherited from Nova Wallet fork but never configured.
Removed SDK integration, manifest intent filters, Gradle dependencies,
Dagger DI modules, and string resources. Deep linking now routes
exclusively through app.pezkuwichain.io with verified assetlinks.json.
2026-03-23 22:59:05 +03:00
Kurdistan Tech Ministry ed0ffe0a3c Fix positional format specifiers in Kurdish strings.xml 2026-03-11 01:27:45 +03:00
Kurdistan Tech Ministry 8bbeddf2ba feat: complete Turkish and Kurdish translations for all UI strings
Turkish: expanded from 55 strings to full 2018 translatable strings
Kurdish: added 2 missing strings for complete coverage
2026-03-11 01:09:50 +03:00
Kurdistan Tech Ministry 44fd64496b feat: add complete Pezkuwi/citizenship translations to all 14 languages
Added (KYC) suffix to Apply&Actions button label in all languages.
Added ~29 missing citizenship and dashboard string keys to 12 languages
that were missing them (ru, es, pt, fr, it, ko, ja, zh-rCN, in, vi, hu, pl).
Added 3 missing dashboard keys to TR and KU.
2026-03-08 23:57:41 +03:00
Kurdistan Tech Ministry 5771fbc10b fix: use https telegram link instead of custom scheme for sharing
Custom scheme pezkuwiwallet:// is not clickable in WhatsApp and
other messaging apps. Use https://t.me/pezkuwichainBot?start=ADDRESS
which is universally clickable and auto-fills the referrer field.
2026-02-28 02:40:06 +03:00
Kurdistan Tech Ministry 33c6559a41 fix: connect referral link to blockchain via deep link handler
When Alice shares a referral link, it now generates a deep link URL
(pezkuwiwallet://pezkuwi/open/citizenship?referrer=address) that
auto-opens the citizenship form with Alice's address pre-filled as
the referrer, fixing the bug where referrer defaulted to founder.
2026-02-27 22:11:34 +03:00
Kurdistan Tech Ministry 771c9c8877 feat: in-app citizenship application with referral system
- Add CitizenshipBottomSheet with form (name, father, grandfather, mother, tribe, region)
- Submit apply_for_citizenship extrinsic with referrer parameter to People Chain
- Query KYC status from IdentityKyc pallet and show appropriate UI state
- Referrer approval: query Referral + Applications entries, approve pending referrals
- Sign (confirm_citizenship) for applicants after referrer approval
- Share referral link for citizens to invite others
- Dashboard buttons adapt to citizenship status (hide Apply/Sign when approved)
- Balance check (1.1 HEZ) only before new applications, not for sign/approve
- i18n strings for en, tr, ku
2026-02-22 05:04:43 +03:00
Kurdistan Tech Ministry f6dc35b80e i18n: add missing Turkish translations, fix Kurdish action strings
Turkish: add Send, Receive, Buy, Sell, Swap, Bridge and related strings
Kurdish: translate Buy, Sell, Swap, Buy/Sell from English to Kurdish
2026-02-21 23:40:01 +03:00
Kurdistan Tech Ministry 14519d7818 Fix Polkadot staking, add USDT bridge, update dashboard card
- Restore staking module to Nova upstream (fix Polkadot ACTIVE/shimmer)
- Add USDT(DOT) <-> USDT(HEZ) bridge option to Buy/Sell screen
- Dashboard card: add telegram_welcome image, info text, Non-Citizen role
- Add non-citizen info text to all 12 locale files
- Simplify ComputationalCache (remove stale scope recreation)
2026-02-18 02:43:53 +03:00
Kurdistan Tech Ministry 9c7bb7c6e9 Prepare for Play Store release: simplify dashboard, clean debug logs
- Simplify dashboard card: remove referral/staking/perwerde fields (not yet on-chain), keep roles + trust score + action button
- Remove all debug Log.d/e/w calls added during development (PEZ_STAKE, RuntimeFactory, ExtrinsicBuilder, etc.)
- Change Play Store track from beta to production
- Add release notes (whatsnew-en-US)
2026-02-17 06:13:59 +03:00
Kurdistan Tech Ministry 93e94cbf15 feat: add Pezkuwi Dashboard card with live People Chain data
- Dashboard card on Assets page showing roles, trust score, referral,
  staking, and perwerde points from People Chain pallets
- Repository queries: Tiki, Trust, Referral, StakingScore, Perwerde
- CachedStakingDetails double map query (RelayChain + AssetHub sources)
- Full i18n support across all 15 locales including new Turkish locale
- "Apply & Actions" button opens Telegram bot
- Staking improvements for split ecosystem multi-endpoint stats
2026-02-17 00:10:23 +03:00
Kurdistan Tech Ministry a294aa1a6b Initial commit: Pezkuwi Wallet Android
Security hardened release:
- Code obfuscation enabled (minifyEnabled=true, shrinkResources=true)
- Sensitive files excluded (google-services.json, keystores)
- Branch.io key moved to BuildConfig placeholder
- Updated dependencies: OkHttp 4.12.0, Gson 2.10.1, BouncyCastle 1.77
- Comprehensive ProGuard rules for crypto wallet
- Navigation 2.7.7, Lifecycle 2.7.0, ConstraintLayout 2.1.4
2026-02-12 05:19:41 +03:00