author_submitAndWatchExtrinsic – Mythos JSON-RPC Method
Submits a signed extrinsic to the Mythos node and provides a subscription that emits status updates (Ready, InBlock, Finalized, or dropped). Use this method for marketplace listings, seasonal NFT mints, or DAO proposals where you must confirm inclusion before updating downstream systems.
Parameters#
| Parameter | Type | Required | Description |
|---|---|---|---|
extrinsic | string | Yes | Hex-encoded, SCALE-encoded signed extrinsic. |
Returns#
A subscription ID. Subsequent notifications stream the extrinsic lifecycle status.
Example (JavaScript)#
import { ApiPromise, WsProvider } from '@polkadot/api';
const provider = new WsProvider('wss://api-mythos-archive.n.dwellir.com/YOUR_API_KEY');
const api = await ApiPromise.create({ provider });
const extrinsic = api.tx.marketplace.list('0x...', /* price */ 1_000_000_000_000n);
const signed = await extrinsic.signAsync(account);
const unsub = await api.rpc.author.submitAndWatchExtrinsic(signed, (status) => {
console.log('Status update:', status.type);
if (status.isFinalized) {
console.log('Included in block', status.asFinalized.toHex());
unsub();
}
});
Curl Example#
curl https://api-mythos-archive.n.dwellir.com/YOUR_API_KEY \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "author_submitAndWatchExtrinsic",
"params": ["0xSIGNED_EXTRINSIC"],
"id": 1
}'