⛏ Witness School · MELEK · PRANA pool
SchoolDevLearnAcademyBuildWhitepaperRunPoolFeesServersWalletHathorLibrary

MELEK app dev · read the feed & make your first post

MELEK is a Graphene / DPoS social chain in the Steem/Hive/Blurt family — so every Steem-family tool already speaks it. This page is the whole on-ramp: connect, read the global feed, and broadcast your first post — in JavaScript and Python, against the live mainnet. Every RPC call below was verified to respond before it was published.

1 · Connect

RPC endpoint   https://melek.salon/rpc
chain id       907959e559e253f0db275e467363425cc2cf4f20f7721699914d248a5547ad8b
address prefix MELEK       coin  MELEK   (no MBD "dollar" token)
block time     ~4 seconds  consensus  Graphene DPoS
API            condenser_api  (the bridge app-layer API is not enabled on the public node)

MELEK is JSON-RPC over HTTPS, exactly like Hive/Steem. The chain id and the MELEK prefix are the only two things that make a client "a MELEK client" instead of a Hive one.

2 · Read the feed — the 60-second start

The fastest possible smoke test — one curl, no SDK. It returns the newest posts on the chain:

curl -s https://melek.salon/rpc -H 'content-type: application/json' -d '{
  "jsonrpc":"2.0","id":1,
  "method":"condenser_api.get_discussions_by_created",
  "params":[{"tag":"","limit":10}]
}'

JavaScript — dhive

import { Client } from '@hiveio/dhive';

// MELEK is a Steem/Blurt-family Graphene chain — dhive speaks it, you just pass
// the MELEK chain id + address prefix.
const client = new Client('https://melek.salon/rpc', {
  chainId: '907959e559e253f0db275e467363425cc2cf4f20f7721699914d248a5547ad8b',
  addressPrefix: 'MELEK',
});

// Read the global feed (newest first). 'bridge' is NOT enabled on the public node,
// so use condenser_api — which is.
const feed = await client.database.call('get_discussions_by_created', [
  { tag: '', limit: 10 },
]);
for (const p of feed) console.log(p.author, '/', p.permlink, '—', p.title);

// One account's blog:
const blog = await client.database.call('get_discussions_by_blog', [
  { tag: 'hathor', limit: 10 },
]);

// One post + its body:
const post = await client.database.call('get_content', ['hathor', 'introducing-hathor-on-melek']);

Python

import requests   # the zero-dependency way — this exact call is verified live

r = requests.post('https://melek.salon/rpc', json={
    'jsonrpc': '2.0', 'id': 1,
    'method': 'condenser_api.get_discussions_by_created',
    'params': [{'tag': '', 'limit': 10}],
})
for p in r.json()['result']:
    print(p['author'], '/', p['permlink'], '—', p['title'])

Useful read methods, all on condenser_api and all verified live: get_discussions_by_created (feed), get_discussions_by_blog (one account, needs a tag), get_content (one post), get_accounts (profiles), get_dynamic_global_properties (chain head). Reads need no key and no auth.

3 · Make your first post

A post is a comment operation with an empty parent_author. It must be signed with your account's posting key.

JavaScript — dhive

import { Client, PrivateKey } from '@hiveio/dhive';
const client = new Client('https://melek.salon/rpc', { chainId: '907959e559e253f0db275e467363425cc2cf4f20f7721699914d248a5547ad8b', addressPrefix: 'MELEK' });

// Your POSTING key only — never your owner/active key in app code.
// (Better: don't hold a key at all — use "Sign in with MELEK" below.)
const posting = PrivateKey.fromString(process.env.MELEK_POSTING_WIF);

await client.broadcast.comment({
  parent_author: '',
  parent_permlink: 'melek',              // a top-level post → the tag/category
  author: 'youraccount',
  permlink: 'my-first-post',
  title: 'Hello MELEK',
  body: 'My first post, broadcast from code.',
  json_metadata: JSON.stringify({ tags: ['melek', 'intro'], app: 'my-app/0.1' }),
}, posting);

Python — beem-style

# beem-style: point beem at MELEK by registering it as a custom chain.
from beem import Steem                       # beem drives any Graphene chain
from beem.comment import Comment

melek = Steem(
    node=['https://melek.salon/rpc'],
    custom_chains={'MELEK': {
        'chain_id': '907959e559e253f0db275e467363425cc2cf4f20f7721699914d248a5547ad8b',
        'min_version': '0.0.0',
        'prefix': 'MELEK',
        'chain_assets': [
            {'asset': 'MBD',   'symbol': 'MBD',   'precision': 3, 'id': 0},
            {'asset': 'MELEK', 'symbol': 'MELEK', 'precision': 3, 'id': 1},
            {'asset': 'VESTS', 'symbol': 'VESTS', 'precision': 6, 'id': 2},
        ],
    }},
    chain='MELEK',
    keys=[os.environ['MELEK_POSTING_WIF']],   # posting key only
)

melek.post(
    title='Hello MELEK',
    body='My first post, broadcast from Python.',
    author='youraccount',
    tags=['melek', 'intro'],
)

A comment on an existing post is the same op with parent_author / parent_permlink set to the post you're replying to. A vote is a vote op. That's the whole write surface.

4 · Sign in with MELEK — the keyless path (MELEK-Signer / OAuth)

You should not ask users for their private key, and you shouldn't hold one in your app either. MELEK follows the HiveSigner model: MELEK-Signer (signer.melek.salon) is an OAuth2-style consent service that holds the key custody boundary. Your app redirects the user there, they approve a scoped permission (e.g. "post" / "vote"), and you get back a revocable bearer token you broadcast with — your app never sees the key.

Honest status: a hosted keyless read API (a HiveSigner-style hosted gateway) and open third-party OAuth app registration are coming — not live for public self-service yet. Until then: read direct from the RPC (no auth needed anyway), and for writes either run your own posting-key server or ask the operator to provision a MELEK-Signer client. We will not hand you an endpoint that doesn't exist.

SDK chooser

You're writing…UseNotes
JS / TypeScriptdhive (or hive-js)Pass chainId + addressPrefix: 'MELEK' to the Client.
PythonbeemRegister MELEK via custom_chains (chain id + prefix), as above.
Anything / a shellraw JSON-RPC + curlcondenser_api over HTTPS POST — no SDK needed, works everywhere.

A testnet exists (chain prefix TST, symbols TESTS/TBD) for safe experiments — see Hathor, live for the working witness. Next: the EVM side, PRANA contract dev →