Hive guide
Hive kılavuzu
Every .nim name is a cell in the hive. If you own the name, the cell is yours: put a website in it, choose what visitors see, keep signed settings and give your app its own database. Visitors show up as bees.
Her .nim ismi kovanda bir petektir. İsim seninse petek de senindir: içine site koyarsın, ziyaretçinin ne göreceğini seçersin, imzalı ayarlarını tutarsın, uygulamana kendi veritabanını verirsin. Ziyaretçiler arı olarak görünür.
Quick start
Hızlı başlangıç
- Get a .nim name in Pigeon (how). Your cell appears in the hive on its own.
- Open
hive.heylogram.comin Nimiq Pay (phone) or in a browser with the Heylogram Wallet extension (computer). - Tap your cell, then Is this cell yours? Sign in. You sign a message; no money moves.
- Put your site in from the Site tab: upload a .zip, or link a site you already host with one line.
- Pigeon'da bir .nim ismi al (nasıl). Peteğin kovanda kendiliğinden belirir.
hive.heylogram.com'u aç: telefonda Nimiq Pay içinde, bilgisayarda Heylogram Wallet eklentili tarayıcıda.- Peteğine dokun, sonra Bu petek senin mi? Gir. Bir mesaj imzalarsın; para gitmez.
- Siteni koy: Site sekmesinden .zip yükle ya da zaten yayında olan siteni tek satırla bağla.
Get a name in Pigeon
Pigeon'da isim al
Everything starts with a .nim name. You get it in Pigeon, the Nimiq Pay mini app for paying by name. In Pigeon a name is called a ring.
Her şey bir .nim ismiyle başlar. İsmi, isimle ödeme yapılan Nimiq Pay mini uygulaması Pigeon'da alırsın. Pigeon'da isme halka denir.
- Open
pigeon.heylogram.cominside Nimiq Pay. - Tap Get ring and type the name you want: letters, digits and single dashes.
- If it says This ring is free, Pigeon shows the price. Shorter names cost more.
- Tap Engrave the ring and approve the payment in your wallet. After a few seconds: The ring is yours. It has no end date.
pigeon.heylogram.com'u Nimiq Pay içinde aç.- Halka al'a dokun, istediğin ismi yaz: harf, rakam ve tek tire.
- Bu halka boşta yazarsa Pigeon fiyatı gösterir. Kısa isimler daha pahalıdır.
- Halkayı kazı'ya dokun, ödemeyi cüzdanında onayla. Birkaç saniye sonra: Halka senin. Süresi yoktur.
Names live on the Nimiq chain. The first valid registration of a name wins, and nobody can take it from you later.
İsimler Nimiq zincirinde durur. Bir ismi ilk geçerli kayıt alır; sonradan kimse onu senden alamaz.
Explore the hive
Kovanı gez
The hive is a map of every .nim name. Older names sit near the top, new names grow the hive downward. Cells with a live site glow with honey.
Kovan, bütün .nim isimlerinin haritasıdır. Eski isimler üstte durur, yeni isimler kovanı aşağı doğru büyütür. Sitesi yayında olan petekler bal rengiyle parlar.
- Move around: drag to pan, pinch or scroll to zoom.
- Find a name: type it in the search box (with or without
.nim) and press Find. If the name is free, Hive shows its price and tells you to get it in Pigeon. - Go inside: tap a cell. The camera dives in and you see the cell's page: its big name, whether its site is live, how long it has been in the hive, and the cards its owner chose to show.
- Come back: press Back to hive, or your phone's back button. Share copies a link straight to the cell.
- Dolaş: sürükleyerek kaydır, iki parmakla ya da tekerlekle yakınlaş.
- İsim bul: arama kutusuna yaz (
.nimile ya da onsuz), Bul'a bas. İsim boştaysa Hive fiyatını gösterir ve Pigeon'da almanı söyler. - İçeri gir: bir peteğe dokun. Kamera içeri dalar, peteğin sayfası açılır: kocaman ismi, sitesi yayında mı, kaç gündür kovanda, ve sahibinin göstermeyi seçtiği kartlar.
- Geri dön: Kovana dön'e ya da telefonun geri tuşuna bas. Paylaş peteğe giden bağlantıyı verir.
Sign in with your wallet
Cüzdanla gir
Anyone can look at a cell. Only the wallet that owns the name can change it.
Bir peteğe herkes bakabilir. Onu yalnız ismin sahibi olan cüzdan değiştirebilir.
- Open your cell and tap Is this cell yours? Sign in at the top. The button says Looking for a wallet… for a moment.
- Your wallet asks you to sign a short message. Approve it.
- You see Welcome, yourname.nim and the owner side of your cell opens.
- Peteğini aç, üstteki Bu petek senin mi? Gir'e dokun. Düğme bir an Cüzdan aranıyor… der.
- Cüzdanın kısa bir mesajı imzalamanı ister. Onayla.
- Hoş geldin, isim.nim yazısı çıkar, peteğinin sahip yüzü açılır.
If no wallet answers, Hive shows two ways in:
Cüzdan cevap vermezse Hive iki yol gösterir:
| Where you are | What to do |
|---|---|
| Phone | Open in Nimiq Pay. Copy the link Hive shows and open it inside Nimiq Pay; the wallet is ready there. |
| Computer | Heylogram Wallet. Install the Chrome extension, or use the Webboos browser where the wallet is built in. Refresh the page and press Sign in again. |
| Neredesin | Ne yap |
|---|---|
| Telefon | Nimiq Pay'de aç. Hive'ın gösterdiği bağlantıyı kopyala, Nimiq Pay'in içinde aç; cüzdan orada hazır. |
| Bilgisayar | Heylogram Wallet. Chrome eklentisini kur ya da cüzdanı içinde olan Webboos tarayıcısını kullan. Sayfayı yenile, yeniden Gir'e bas. |
If you see This wallet does not own yourname.nim, the account open in your wallet is not the one that holds the name. Switch accounts and try again.
Bu cüzdan isim.nim sahibi değil yazısını görürsen cüzdanında açık olan hesap ismi tutan hesap değildir. Hesabı değiştirip yeniden dene.
Inside your cell
Peteğinin içi
Your cell has two faces. Visitors see your page: your name, your intro and the cards you chose. You, signed in, see the tools. They are tabs: on a computer down the left side, on a phone in the bar at the bottom.
Peteğinin iki yüzü vardır. Ziyaretçi sayfanı görür: ismin, tanıtımın ve seçtiğin kartlar. Sen, giriş yapınca araçları görürsün. Bunlar sekmedir: bilgisayarda solda, telefonda alttaki çubukta.
| Tab | What it holds |
|---|---|
| Overview | Vault, page and site at a glance. |
| My page | What visitors see, in what order, your intro and accent colour. More |
| Vault | Your wallet balance and whether visitors may see it. More |
| Site | Upload a .zip or link your own server. More |
| Settings | Signed key and value rows your app reads. More |
| Data | Your database console. More |
| Bees | Your users and today's visitors. More |
| Sekme | İçinde ne var |
|---|---|
| Genel | Kasa, görünüm ve site bir bakışta. |
| Görünüm | Ziyaretçi ne görsün, hangi sırayla; tanıtımın ve vurgu rengin. Ayrıntı |
| Kasa | Cüzdan bakiyen ve ziyaretçinin görüp görmeyeceği. Ayrıntı |
| Site | .zip yükle ya da kendi sunucunu bağla. Ayrıntı |
| Ayarlar | Uygulamanın okuduğu imzalı anahtar–değer satırları. Ayrıntı |
| Veri | Veritabanı konsolun. Ayrıntı |
| Arılar | Kullanıcıların ve bugünkü ziyaretçiler. Ayrıntı |
Vault, settings and data are never shown to visitors, unless you turn the vault on for your page yourself.
Kasa, ayarlar ve veri ziyaretçiye hiç gösterilmez; kasayı yalnız sen kendi sayfanda açarsan görünür.
Upload a site (.zip)
Site yükle (.zip)
Already built your site? Pack it into one .zip and drop it into your cell. Hive hosts it for you, and every visitor is counted on its own.
Siten hazır mı? Tek bir .zip'e koy, peteğine bırak. Hive senin yerine yayınlar; her ziyaretçi kendiliğinden sayılır.
- Build your site so it is plain files:
index.htmlplus its scripts, styles and images. - Zip the contents of the folder, so that
index.htmlsits at the top of the zip, not inside a subfolder. - In the Site tab pick Upload files, tap Choose file and pick the .zip.
- Tap Upload built site (.zip). When it says yourname.nim is live, your cell fills with honey.
- Siteni düz dosyalar olacak şekilde derle:
index.htmlve onun betikleri, stilleri, resimleri. - Klasörün içindekileri zip'le;
index.htmlzip'in en üstünde olsun, bir alt klasörün içinde değil. - Site sekmesinde Dosya yükle'yi seç, Dosya seç'e dokun, .zip'i seç.
- Derlenmiş siteyi yükle (.zip)'e dokun. isim.nim yayında yazısı çıkınca petek bal ile dolar.
| Rule | Detail |
|---|---|
| Size | At most 20 MB per zip. |
| Must have | index.html at the top of the zip. |
| Page title | The <title> of your index.html becomes the site name shown in your cell. |
| New upload | Replaces the old site completely. |
| Kural | Ayrıntı |
|---|---|
| Boyut | Zip başına en çok 20 MB. |
| Şart | Zip'in en üstünde index.html. |
| Sayfa başlığı | index.html'deki <title>, peteğinde görünen site adı olur. |
| Yeni yükleme | Eski sitenin tamamının yerine geçer. |
Which files are accepted
Hangi dosyalar kabul edilir
Only files a website needs. If the zip holds anything else, the whole upload is refused and Hive lists the files that blocked it.
Yalnız bir sitenin ihtiyaç duyduğu dosyalar. Zip'te başka bir şey varsa yükleme bütünüyle reddedilir ve Hive engel olan dosyaları sayar.
| Kind | Accepted |
|---|---|
| Pages and code | .html .htm .js .mjs .css .json .map .txt .xml .webmanifest .wasm |
| Images | .png .jpg .jpeg .gif .webp .avif .svg .ico |
| Fonts | .woff2 .woff .ttf .otf |
| Sound and video | .mp3 .ogg .wav .m4a .mp4 .webm |
| 3D | .glb .gltf |
| Refused | Programs, installers and archives inside the zip, such as .exe .apk .msi .bat .zip, and any type not listed above. |
| Tür | Kabul edilen |
|---|---|
| Sayfa ve kod | .html .htm .js .mjs .css .json .map .txt .xml .webmanifest .wasm |
| Resim | .png .jpg .jpeg .gif .webp .avif .svg .ico |
| Yazı tipi | .woff2 .woff .ttf .otf |
| Ses ve video | .mp3 .ogg .wav .m4a .mp4 .webm |
| 3B | .glb .gltf |
| Reddedilen | Program, kurulum dosyası ve zip içinde arşiv: .exe .apk .msi .bat .zip gibi, ve yukarıda olmayan her tür. |
Link a site on your own server
Kendi sunucundaki siteyi bağla
Your site already lives somewhere else? Link it instead of uploading. You add one line to your page. That line does two jobs: it proves the site is yours, and it turns every visitor into a bee in your cell.
Siten zaten başka bir yerde mi yayında? Yüklemek yerine bağla. Sayfana tek bir satır eklersin. Bu satır iki iş görür: sitenin senin olduğunu kanıtlar ve gelen her ziyaretçiyi peteğinde arı yapar.
A. Get your line
A. Satırını al
- In the Site tab pick My own server.
- Type your site address, for example
https://my-site.com. It must be a publichttps://address. - Tap 1 · Sign, get the line and approve the signature. The line is copied for you. Lost it? Copy the line again.
- Site sekmesinde Kendi sunucum'u seç.
- Sitenin adresini yaz, örneğin
https://my-site.com. Herkese açık birhttps://adresi olmalı. - 1 · İmzala, satırı al'a dokun, imzayı onayla. Satır senin için kopyalanır. Kaybettin mi? Satırı yeniden kopyala.
The line looks like this (yours carries your name and a long signature):
Satır şöyle görünür (seninkinde kendi ismin ve uzun bir imza olur):
<script src="https://signal.heylogram.tv/kovanapi/ari.js" data-isim="lavanta" data-imza="…" defer></script>
B. Paste it above </body>
B. </body> satırının üstüne yapıştır
- Open your site's home page file, usually
index.html, in your editor. - Go to the very bottom and find the line
</body>. - Paste the line right above
</body>, on its own line. - Save the file.
- Sitenin ana sayfa dosyasını, genelde
index.html'i, düzenleyicinde aç. - En alta in,
</body>satırını bul. - Satırı
</body>'nin hemen üstüne, kendi satırına yapıştır. - Dosyayı kaydet.
<footer>© Lavanta Atelier</footer>
</body>
</html><footer>© Lavanta Atelier</footer> <script src="…/ari.js" data-isim="lavanta" data-imza="…" defer></script> </body> </html>
C. Publish, then link
C. Yayınla, sonra bağla
- Publish your site again the way you always do, so the new line is live.
- Back in Hive, tap 2 · Link. When it says Linked: the cell now opens your site, you are done.
- Siteni her zamanki yolunla yeniden yayınla; yeni satır canlıda olsun.
- Hive'a dön, 2 · Bağla'ya dokun. Bağlandı: petek senin sitene açılıyor yazısı çıkınca bitti.
www. or the address differs in any way, type that one and get a new line.www. ile açılıyorsa ya da adres herhangi bir yerde farklıysa onu yaz ve yeni satır al.Linking replaces an uploaded site. Uploading a new zip later replaces the link.
Bağlamak, yüklenmiş sitenin yerine geçer. Sonra yeni bir zip yüklersen bağlantının yerine geçer.
Your bees
Arıların
Bees fly in your cell. There are two kinds:
Peteğinde arılar uçar. İki türlüdür:
| Bee | Who |
|---|---|
| Bee | A user who signed in to your app, or owns a sub-name. Stays for good. |
| Faint bee | Someone who visited your site today. |
| Arı | Kim |
|---|---|
| Arı | Uygulamana imzayla giren kullanıcı ya da alt isim sahibi. Kalıcıdır. |
| Soluk arı | Bugün sitene uğrayan ziyaretçi. |
Visitors of an uploaded site are counted on their own. For a site on your own server, the one line from Link your own server does the counting. The same person counts once per day, so refreshing does not inflate the number. The Bees tab shows bees, today's visitors and total visits, and lists your bees by name (see Which name shows).
Yüklenen sitenin ziyaretçileri kendiliğinden sayılır. Kendi sunucundaki sitede saymayı Kendi sunucunu bağla'daki tek satır yapar. Aynı kişi günde bir kez sayılır; sayfayı yenilemek sayıyı şişirmez. Arılar sekmesi arıları, bugünkü ziyaretçileri ve toplam ziyareti gösterir; arılarını adlarıyla da listeler (bkz. Hangi ad görünür).
Sub-names
Alt isimler
Under your name you can hand out names such as mert.lavanta.nim, for your players, your team or your customers. Everyone who owns a sub-name is a bee of your cell.
Kendi isminin altında mert.lavanta.nim gibi isimler dağıtabilirsin: oyuncuların, ekibin ya da müşterilerin için. Alt ismi olan herkes peteğinin arısıdır.
Give a sub-name yourself
Alt ismi kendin ver
- In Pigeon, open Get ring and then Give sub-rings under yourname.nim.
- Type the sub-name (for example
mert) and who gets it: an address or aname.nim. Leave it empty to keep it yourself. - Tap Give mert.yourname.nim and approve. It costs only a tiny network transaction. The list below shows the sub-names you gave.
- Pigeon'da Halka al'ı, sonra isim.nim altında halka ver'i aç.
- Alt ismi (örneğin
mert) ve kime gideceğini yaz: bir adres ya da birisim.nim. Kendine almak için boş bırak. - mert.isim.nim ver'e dokun, onayla. Yalnız çok küçük bir ağ işlemi tutar. Altındaki liste verdiğin alt isimleri gösterir.
Or let players take their own
Ya da oyuncular kendisi alsın
Tap Players can take their own sub-ring to turn it ON. Now your app can let each player take theirname.yourname.nim for their own wallet (see nim.js). First come, first served. Turn it OFF any time.
Oyuncular kendi alt halkasını alabilir'i AÇIK yap. Artık uygulaman her oyuncuya kendi cüzdanına adı.senin.nim aldırabilir (bkz. nim.js). İlk alan kazanır. İstediğin an KAPALI yaparsın.
| Rule | Detail |
|---|---|
| Length | Sub-name plus your name: 22 letters at most. |
| Depth | One level only: mert.lavanta, not deeper. |
| How it shows | The player's own name big, your name small: mert.lavanta.nim |
| Kural | Ayrıntı |
|---|---|
| Uzunluk | Alt isim ve senin ismin birlikte en çok 22 harf. |
| Derinlik | Yalnız bir kat: mert.lavanta, daha derin değil. |
| Görünüşü | Oyuncunun kendi adı büyük, senin ismin küçük: mert.lavanta.nim |
Which name shows
Hangi ad görünür
A bee can have two names in your cell: its own .nim name (for example mert) and a sub-name under your cell (for example lale.garura).
Bir arının peteğinde iki adı olabilir: kendi .nim adı (örneğin mert) ve peteğinin altındaki alt adı (örneğin lale.garura).
| The bee has | What shows |
|---|---|
| Only its own name | Its own name: mert.nim |
| Only a sub-name | The sub-name: lale.garura.nim |
| Both | Its own name, until the player picks the other one |
| Arının | Görünen |
|---|---|
| Yalnız kendi adı var | Kendi adı: mert.nim |
| Yalnız alt adı var | Alt adı: lale.garura.nim |
| İkisi de var | Kendi adı; oyuncu ötekini seçene kadar |
- The choice belongs to the player, and it counts only in your cell. In another cell the same player may show another name.
- Sub-names do not become cells on the hive map. They show in your cell's Bees card, by name: the player's own part big, your name small.
- Your app asks the question. HAHA, for example, asks a player with two names on its start screen which one to show.
- Seçim oyuncunundur ve yalnız senin peteğinde geçerlidir. Başka bir petekte aynı oyuncu başka bir adla görünebilir.
- Alt adlar kovan haritasında petek olmaz. Peteğinin Arılar kartında adlarıyla görünür: oyuncunun kendi kısmı büyük, senin ismin küçük.
- Soruyu uygulaman sorar. Örneğin HAHA, iki adı olan oyuncuya başlangıç ekranında hangisiyle görünmek istediğini sorar.
const db = HiveDB('garura');
await db.signIn();
const me = await db.myName(); // { own: 'mert', sub: 'lale.garura', choice: null, shown: 'mert.nim' }
if (me.own && me.sub) {
// ask the player, then save the answer for this cell
await db.useName('sub'); // 'own' or 'sub'
}
const { bees } = await db.bees(); // this cell's bees, each with the name it choseMy page: choose what visitors see
Görünümün: ziyaretçi ne görsün
- Open the My page tab.
- Turn cards on or off: Site, Bees, Vault. Use the arrows to change the order. The first card is shown big.
- Write a short intro (up to 160 letters) and pick an accent colour. The small preview shows the result as you go.
- Tap Sign and save. To check, tap View as visitor; tap the top button again to return.
- Görünüm sekmesini aç.
- Kartları aç ya da kapat: Site, Arılar, Kasa. Okla sırayı değiştir. İlk kart büyük görünür.
- Bir kısa tanıtım yaz (en çok 160 harf) ve bir vurgu rengi seç. Küçük önizleme sonucu anında gösterir.
- İmzala ve kaydet'e dokun. Bakmak için Ziyaretçi gözüyle bak; üstteki düğmeyle kendi gözüne dönersin.
Settings (key and value)
Ayarlar (anahtar–değer)
Small facts your app needs, kept as a plain table: a theme colour, a price, whether a feature is on. Only you can change them, because every save is signed by your wallet.
Uygulamanın ihtiyaç duyduğu küçük bilgiler, düz bir tabloda: tema rengi, bir fiyat, bir özellik açık mı. Yalnız sen değiştirebilirsin, çünkü her kayıt cüzdanınla imzalanır.
- In the Settings tab, write a key (letters, digits,
_ . -) and a value. On a computer you also pick a type: text, number or on/off. - Tap + to add the row. Change or remove rows (×) as you like.
- Tap Sign and save and approve. The version number goes up:
#1,#2…
- Ayarlar sekmesinde bir anahtar (harf, rakam,
_ . -) ve bir değer yaz. Bilgisayarda tür de seçersin: yazı, sayı ya da açık/kapalı. - Satırı eklemek için +'ya dokun. Satırları istediğin gibi değiştir ya da sil (×).
- İmzala ve kaydet'e dokun, onayla. Sürüm numarası artar:
#1,#2…
Your page choices from My page are saved here too, as vitrin.kartlar, vitrin.vurgu and tanitim. Leave them as they are; change them from My page.
Görünüm'deki seçimlerin de burada vitrin.kartlar, vitrin.vurgu ve tanitim olarak durur. Onlara burada dokunma; Görünüm'den değiştir.
Data: your database
Veri: veritabanın
Every name has its own database for apps and games: scores, profiles, lists. The Data tab shows it as a console with three columns: collections, documents, and the fields of the chosen document.
Her ismin uygulamalar ve oyunlar için kendi veritabanı vardır: skorlar, profiller, listeler. Veri sekmesi onu üç sütunlu bir konsol olarak gösterir: koleksiyonlar, belgeler ve seçili belgenin alanları.
Add data by hand
Elle veri ekle
- Type a name under Collections (for example
scores) and press Enter. - Under Add / update document, give a document id or leave it empty for an automatic one.
- Add fields: name, value and type (text, number, on/off, list with commas). Tap + for each.
- Tap Save (merge). Existing fields you did not touch stay as they are.
- Koleksiyonlar altına bir ad yaz (örneğin
skorlar), Enter'a bas. - Belge ekle / güncelle kısmında bir belge kimliği ver ya da otomatik olsun diye boş bırak.
- Alan ekle: ad, değer ve tür (yazı, sayı, açık/kapalı, virgüllü liste). Her biri için +.
- Kaydet (birleştir)'e dokun. Dokunmadığın eski alanlar olduğu gibi kalır.
Rules: who can read, who can write
Kurallar: kim okur, kim yazar
Each collection has two switches at the top of its column.
Her koleksiyonun sütun başında iki seçici vardır.
| Switch | Choice | Meaning |
|---|---|---|
| read | everyone | Anyone, also your site's visitors, can read. (Default) |
| owner | Only you, signed in. | |
| write | owner | Only you can write. (Default) |
| player's own doc | A player who signed in with their wallet may write only the document whose id is their own Nimiq address. Good for player profiles and personal scores. |
| Seçici | Seçenek | Anlamı |
|---|---|---|
| okuma | herkes | Herkes, sitenin ziyaretçileri de okuyabilir. (Varsayılan) |
| sahip | Yalnız sen, giriş yapmışken. | |
| yazma | sahip | Yalnız sen yazabilirsin. (Varsayılan) |
| oyuncu kendi belgesi | Cüzdanıyla giriş yapan oyuncu yalnız kimliği kendi Nimiq adresi olan belgeye yazabilir. Oyuncu profili ve kişisel skor için uygun. |
Limits per name
İsim başına sınırlar
| What | Limit |
|---|---|
| Reads | 50,000 per day |
| Writes | 20,000 per day |
| Total size | 50 MB |
| One document | 1 MB |
| Collections | 100 |
| Results per query | 50 by default, at most 500 |
| Ne | Sınır |
|---|---|
| Okuma | Günde 50.000 |
| Yazma | Günde 20.000 |
| Toplam boyut | 50 MB |
| Tek belge | 1 MB |
| Koleksiyon | 100 |
| Sorgu başına sonuç | Varsayılan 50, en çok 500 |
The console header shows how much you used today.
Konsolun başlığı bugün ne kadar kullandığını gösterir.
For developers: nim.js
Geliştirici için: nim.js
Optional. If your site or game wants to sign players in, take payments by name or show names, import nim.js in your own code. A site that only shows pages needs nothing.
İsteğe bağlı. Siten ya da oyunun oyuncuyu imzayla almak, isimle ödeme almak ya da isim göstermek istiyorsa kendi kodunda nim.js'i içe aktar. Yalnız sayfa gösteren bir sitenin hiçbir şeye ihtiyacı yok.
import { NimNames } from 'https://signal.heylogram.tv/kovanapi/nim.js';
const nim = NimNames({ app: 'lavanta' }); // your own .nim name (needed for login)
await nim.resolve('mert'); // { name, address } or null
await nim.nameOf('NQ…'); // the name of an address, or null
await nim.names('NQ…'); // { own, sub }: its own name and its sub-name under your app
await nim.login(); // the player signs once and becomes a bee of your cell
await nim.pay('mert', 10, 'hi'); // send 10 NIM to mert.nim from the player's wallet
nim.badge(element, 'NQ…'); // shows mert.nim, or mert + small .lavanta.nim
await nim.subsOpen(); // are sub-names open?
await nim.claimSub('ayla'); // the player takes ayla.lavanta.nim (while open)
await nim.giveSub('ayla', 'NQ…'); // you, the owner, give ayla.lavanta.nimFor developers: HiveDB
Geliştirici için: HiveDB
Your app talks to its database with a small library. If you know Firestore, you already know it. It works in the browser as a module; player sign-in needs a wallet (Nimiq Pay).
Uygulaman veritabanıyla küçük bir kütüphane üzerinden konuşur. Firestore biliyorsan bunu da bilirsin. Tarayıcıda modül olarak çalışır; oyuncu girişi için cüzdan (Nimiq Pay) gerekir.
import { HiveDB } from 'https://signal.heylogram.tv/kovanapi/hive-db.js';
const db = HiveDB('lavanta'); // the database of lavanta.nim
// Read the owner's signed settings (anyone can)
const settings = await db.settings();
// Player signs in with their wallet; db.address = their Nimiq address
await db.signIn();
// Write the player's own document (rule: write = player's own doc)
await db.col('players').doc(db.address).set({ nick: 'bee_42', gold: 5 });
await db.col('players').doc(db.address).update({ gold: 6 });
// Query: top 10 on level 2
const top = await db.col('scores')
.where('level', '==', 2)
.orderBy('points', 'desc')
.limit(10)
.get(); // [{ id, ...fields }]
// One document (null if missing)
const doc = await db.col('players').doc(db.address).get();
// Which name the player shows in this cell
const me = await db.myName(); // { own, sub, choice, shown }
await db.useName('own'); // or 'sub'
const { bees } = await db.bees(); // bees with their chosen names| Call | Does |
|---|---|
HiveDB(name) | Opens the database of name.nim. |
db.signIn() | Player signs in with their wallet. Returns their address (also in db.address); lasts 7 days. |
db.settings() | Reads the owner's signed settings. |
db.myName() | The player's names here: { own, sub, choice, shown }. |
db.useName('own' | 'sub') | The signed-in player picks which name shows in this cell. |
db.bees() | This cell's bees with the names they chose. |
col(c).doc(id).get / set / update / delete | Read, replace, merge, remove one document. |
col(c).add(data) | Adds a document with an automatic id (owner). |
where(field, op, value) | == != < <= > >= array-contains |
orderBy(field, 'asc' | 'desc'), limit(n) | Sort and cut the result. |
| Çağrı | Ne yapar |
|---|---|
HiveDB(isim) | isim.nim'in veritabanını açar. |
db.signIn() | Oyuncu cüzdanıyla giriş yapar. Adresini döner (db.address içinde de durur); 7 gün sürer. |
db.settings() | Sahibin imzalı ayarlarını okur. |
db.myName() | Oyuncunun buradaki adları: { own, sub, choice, shown }. |
db.useName('own' | 'sub') | Giriş yapmış oyuncu bu petekte hangi adın görüneceğini seçer. |
db.bees() | Peteğin arıları, seçtikleri adlarla. |
col(c).doc(id).get / set / update / delete | Tek belgeyi okur, yerine yazar, birleştirir, siler. |
col(c).add(veri) | Otomatik kimlikle belge ekler (sahip). |
where(alan, op, değer) | == != < <= > >= array-contains |
orderBy(alan, 'asc' | 'desc'), limit(n) | Sonucu sıralar ve keser. |
yazma_izni_yok (no write permission) or gunluk_okuma_siniri (daily read limit). Catch it and show your player a friendly message.yazma_izni_yok ya da gunluk_okuma_siniri. Yakala, oyuncuna anlaşılır bir mesaj göster.Vault
Kasa
The honey jar is your own wallet. The Vault tab shows the NIM balance of the address that holds the name, read from the Nimiq chain, and your Nimiq Pay vault next to it.
Bal kavanozu senin kendi cüzdanındır. Kasa sekmesi ismi tutan adresin NIM bakiyesini Nimiq zincirinden okuyarak gösterir; yanında Nimiq Pay kasan da durur.
- The vault is hidden from visitors by default.
- To show it on your page, turn on Visitors can see my vault and sign. Turn it off the same way.
- Kasa varsayılan olarak ziyaretçiye kapalıdır.
- Sayfanda göstermek için Ziyaretçiler kasamı görsün'ü aç ve imzala. Aynı yolla kapatırsın.
Walk-through: publish a game
Adım adım: bir oyun yayınla
Here is the whole path for a real app: HAHA, a small browser game in the garura.nim cell. Players sign in with their wallet, their best score goes to a public leaderboard, and they can take a name like ayla.garura.nim. Do it on a computer, signed in to your cell.
Gerçek bir uygulamanın bütün yolu: HAHA, garura.nim peteğindeki küçük bir tarayıcı oyunu. Oyuncu cüzdanıyla girer, en iyi skoru herkese açık sıralamaya yazılır ve ayla.garura.nim gibi bir isim alabilir. Bunu bilgisayarda, peteğine giriş yapmış olarak yap.
| What the game uses | What you set up |
|---|---|
| Its own pages | Step 1: upload the .zip |
HiveDB: sign-in and the leaderboard in haha_skor | Step 2: the collection and its rules |
nim.js: claimSub for player names | Step 3: open sub-names in Pigeon |
| Your cell's page | Step 4: show the site |
| Oyunun kullandığı | Senin kurduğun |
|---|---|
| Kendi sayfaları | Adım 1: .zip'i yükle |
HiveDB: giriş ve haha_skor içindeki sıralama | Adım 2: koleksiyon ve kuralları |
nim.js: oyuncu isimleri için claimSub | Adım 3: Pigeon'da alt isimleri aç |
| Peteğinin sayfası | Adım 4: siteyi göster |
1. Upload the site
1. Siteyi yükle
- Open your cell, then the Site tab, and pick Upload files.
- Choose file →
haha-site.zip→ Upload built site (.zip). - Wait for garura.nim is live. The site card turns green and shows the site's address with an Open link.
- Peteğini aç, Site sekmesine geç, Dosya yükle'yi seç.
- Dosya seç →
haha-site.zip→ Derlenmiş siteyi yükle (.zip). - garura.nim yayında yazısını bekle. Site kartı yeşil olur, sitenin adresini ve Aç bağlantısını gösterir.
2. Make the leaderboard collection
2. Sıralama koleksiyonunu aç
- Open the Data tab. Under Collections type
haha_skorand press Enter. The middle column now has its name at the top. - Next to it, leave read on everyone (the leaderboard is public).
- Set write to player's own doc. You see Rule saved. Now each player can write only their own row.
- Done. The collection appears in the list once the first player saves a score (see An empty collection).
- Veri sekmesini aç. Koleksiyonlar altına
haha_skoryaz, Enter'a bas. Orta sütunun başında artık onun adı durur. - Yanındaki okumayı herkeste bırak (sıralama herkese açık).
- yazmayı oyuncu kendi belgesi yap. Kural kaydedildi yazısını görürsün. Artık her oyuncu yalnız kendi satırına yazabilir.
- Bitti. Koleksiyon, ilk oyuncu skor kaydedince listede görünür (bkz. Boş koleksiyon).
3. Open sub-names in Pigeon
3. Pigeon'da alt isimleri aç
- Open
pigeon.heylogram.comin Nimiq Pay with the wallet that ownsgarura.nim. - Tap Get ring, scroll down and open Give sub-rings under garura.nim.
- Tap Players can take their own sub-ring: OFF and approve the tiny transaction.
- After a few seconds the button says ON. Players can now take
theirname.garura.nimfrom inside the game.
garura.nim'in sahibi olan cüzdanlapigeon.heylogram.com'u Nimiq Pay'de aç.- Halka al'a dokun, aşağı in, garura.nim altında halka ver'i aç.
- Oyuncular kendi alt halkasını alabilir: KAPALI'ya dokun, küçük işlemi onayla.
- Birkaç saniye sonra düğme AÇIK der. Oyuncular artık oyunun içinden
adı.garura.nimalabilir.
4. Show the site on your cell's page
4. Siteyi peteğinin sayfasında göster
- Back in Hive, open the My page tab.
- Make sure Site is on and first in the list, so it shows big with Open site.
- Tap Sign and save, then View as visitor to check.
- Hive'a dön, Görünüm sekmesini aç.
- Site'nin açık ve listede ilk sırada olduğuna bak; böylece büyük ve Siteyi aç ile görünür.
- İmzala ve kaydet'e, sonra kontrol için Ziyaretçi gözüyle bak'a dokun.
Check it works
Çalıştığını kontrol et
- Open the site, play a round, sign in with a wallet and save the score.
- In the Data tab,
haha_skornow shows a document named after that player's address. - Take a sub-name in the game; in Pigeon it shows in the list under your name, and the player becomes a bee of your cell.
- Siteyi aç, bir el oyna, cüzdanla gir, skoru kaydet.
- Veri sekmesinde
haha_skoriçinde o oyuncunun adresiyle adlanmış bir belge görünür. - Oyunda bir alt isim al; Pigeon'da isminin altındaki listede görünür, oyuncu da peteğinin arısı olur.
Pages every app needs
Her uygulamanın sayfaları
Before you share your app, add a few small files to the zip. HAHA ships all of them, so you can copy its pattern.
Uygulamanı paylaşmadan önce zip'e birkaç küçük dosya ekle. HAHA hepsini taşıyor; onun düzenini örnek alabilirsin.
| File | What it is for |
|---|---|
index.html | The app itself. |
kilavuz.html (how to use) | Rules and steps in plain words. Link it from the app. |
privacy.html | What you store and who sees it. Link it from the app and from every store form. |
robots.txt, sitemap.xml | Tell search engines what to read. See the limit below. |
llms.txt | A short plain summary of your app for AI assistants. |
| Dosya | Ne işe yarar |
|---|---|
index.html | Uygulamanın kendisi. |
kilavuz.html (kullanım) | Kurallar ve adımlar, sade dille. Uygulamadan bağlantı ver. |
privacy.html | Neyi sakladığın ve kimin gördüğü. Uygulamadan ve her mağaza formundan bağlantı ver. |
robots.txt, sitemap.xml | Arama motorlarına neyi okuyacaklarını söyler. Aşağıdaki sınıra bak. |
llms.txt | Yapay zeka asistanları için uygulamanın kısa, sade özeti. |
Your privacy page: four things to say
Gizlilik sayfan: söylemen gereken dört şey
- What is stored, and where. For example: the player's address, best score and the time, in your Hive database; the language choice only in the player's own browser.
- What is public. A collection with read: everyone is public. Say so. Settings are always public.
- What can never be deleted. Names and other transactions on the Nimiq chain stay there for good. You can delete rows in your database; you cannot delete a chain record.
- How to reach you. A contact address you read, and how someone asks for their row to be removed.
- Ne saklanır, nerede. Örneğin: oyuncunun adresi, en iyi skoru ve zamanı Hive veritabanında; dil seçimi yalnız oyuncunun kendi tarayıcısında.
- Ne herkese açık. okuma: herkes olan koleksiyon herkese açıktır. Bunu yaz. Ayarlar her zaman herkese açıktır.
- Ne asla silinmez. Nimiq zincirindeki isimler ve diğer işlemler orada kalıcı durur. Veritabanındaki satırları silebilirsin; zincir kaydını silemezsin.
- Sana nasıl ulaşılır. Okuduğun bir iletişim adresi ve birinin kendi satırını nasıl sildireceği.
Also say that signing sends no money and that the wallet key never reaches your app. HAHA's privacy.html covers all of this in Turkish and English.
İmzanın para göndermediğini ve cüzdan anahtarının uygulamana hiç gelmediğini de yaz. HAHA'nın privacy.html dosyası bunların hepsini Türkçe ve İngilizce anlatıyor.
robots.txt, sitemap.xml, llms.txt
robots.txt, sitemap.xml, llms.txt
Write the full address of your site in them. An uploaded site lives at the address shown on your Site card; for HAHA that is https://signal.heylogram.tv/kovanapi/s/garura/.
İçlerine sitenin tam adresini yaz. Yüklenen site, Site kartında görünen adreste durur; HAHA için bu https://signal.heylogram.tv/kovanapi/s/garura/.
User-agent: * Allow: / Sitemap: https://signal.heylogram.tv/kovanapi/s/garura/sitemap.xml
<?xml version="1.0" encoding="UTF-8"?> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <url><loc>https://signal.heylogram.tv/kovanapi/s/garura/</loc></url> <url><loc>https://signal.heylogram.tv/kovanapi/s/garura/kilavuz.html</loc></url> <url><loc>https://signal.heylogram.tv/kovanapi/s/garura/privacy.html</loc></url> </urlset>
# HAHA > A small browser game: catch falling letters in order (H-A-H-A). - [Play](https://signal.heylogram.tv/kovanapi/s/garura/) - [How to play](https://signal.heylogram.tv/kovanapi/s/garura/kilavuz.html) - [Privacy](https://signal.heylogram.tv/kovanapi/s/garura/privacy.html) Contact: haha@heylogram.com
robots.txt only at the top of a host, like https://example.com/robots.txt. An uploaded site sits in a folder (…/s/garura/), so its own robots.txt is not read by search engines, and the sitemap line inside it is not seen either. The same goes for llms.txt. Keep the files anyway: they cost nothing and work the day your app moves to its own address. To be found sooner, link your site from places people visit, or link your own server instead of uploading (see Link your own server), where the files sit at the root.robots.txt'yi yalnız bir adresin en üstünde arar, örneğin https://example.com/robots.txt. Yüklenen site bir klasörde durur (…/s/garura/), bu yüzden kendi robots.txt'si arama motorlarınca okunmaz; içindeki sitemap satırı da görülmez. Aynısı llms.txt için de geçerli. Dosyaları yine de koy: hiçbir şeye mal olmaz ve uygulaman kendi adresine taşındığı gün işe yarar. Daha çabuk bulunmak için sitene insanların uğradığı yerlerden bağlantı ver, ya da yüklemek yerine kendi sunucunu bağla (bkz. Kendi sunucunu bağla); orada dosyalar kökte durur.Troubleshooting
Sorun giderme
No wallet found in this browser
Open Hive inside Nimiq Pay on your phone, or use the Heylogram Wallet extension or the Webboos browser on a computer. Then press Sign in again.Session ended, sign in again
Your 24-hour sign-in ran out. Press Sign in once more.Upload refused: file type
The zip holds a file Hive does not serve (for example .exe, .apk or a zip inside the zip). Remove it and zip again. The message lists the files.Upload refused: no index.html
Your index.html is inside a subfolder. Zip the contents of the folder, not the folder itself.Upload refused: too large
The zip is over 20 MB. Compress images and videos, or link your own server instead.The line was not found on your site; did you publish it?
Hive could not see the line on the address you typed. Check that you pasted it above</body>, saved, and published. Open your site and use "view source" to see it.The proof is not from this name's owner
Either another wallet signed the line, or the address differs from the one you signed (for examplewww. or http). Type the exact address, get a new line and paste it again.Use a public https address
Local or private addresses cannot be linked. Use your site's public https address.Bu tarayıcıda cüzdan bulamadık
Telefonda Hive'ı Nimiq Pay içinde aç ya da bilgisayarda Heylogram Wallet eklentisini veya Webboos tarayıcısını kullan. Sonra yeniden Gir'e bas.Oturum bitti, yeniden gir
24 saatlik girişin doldu. Gir'e yeniden bas.Yükleme reddedildi: dosya türü
Zip'te Hive'ın sunmadığı bir dosya var (örneğin .exe, .apk ya da zip içinde zip). Onu çıkar, yeniden zip'le. Mesaj dosyaları sayar.Yükleme reddedildi: index.html yok
index.html bir alt klasörün içinde. Klasörün kendisini değil, içindekileri zip'le.Yükleme reddedildi: çok büyük
Zip 20 MB'ı geçiyor. Resim ve videoları küçült ya da kendi sunucunu bağla.Satır sitende bulunamadı; yayınladın mı?
Hive, yazdığın adreste satırı göremedi.</body>'nin üstüne yapıştırdığına, kaydettiğine ve yayınladığına bak. Siteni açıp "kaynağı görüntüle" ile kontrol et.Kanıt bu ismin sahibine ait değil
Ya satırı başka bir cüzdan imzaladı ya da adres imzaladığından farklı (örneğinwww. ya da http). Birebir aynı adresi yaz, yeni satır al ve yeniden yapıştır.