Skip to content

api: optional prefix param on the four marketplace listings - #17

Merged
On1x merged 1 commit into
masterfrom
api/prefix-param-marketplace
Sep 16, 2026
Merged

On1x merged 1 commit into
masterfrom
api/prefix-param-marketplace

Conversation

@On1x

@On1x On1x commented Sep 16, 2026

Copy link
Copy Markdown
Member

The node gained an optional trailing argument on these four read methods (viz-cpp-node steemit#160) that is matched against an index, so a filter can reach rows the caller never paged to. The API explorer advertised the old signatures.

Documented in all three places the explorer and the lib read from:

  • src/api/methods.js — the method tree the lib generates its wrappers from
  • api-frontend/app.js — its copy of that tree plus the SPEC descriptions
  • api-frontend/jsonrpc-api-spec.json — the canonical spec
method new arg
database_api.get_accounts_on_sale name_prefix
database_api.get_accounts_on_auction name_prefix
database_api.get_subaccounts_on_sale name_prefix
paid_subscription_api.get_paid_subscriptions creator_prefix

Empty or omitted keeps the old behaviour, and the explorer does not send an empty value at all, so nothing changes for a caller that ignores the argument.

Before the next release

The generated wrappers read the callback from a fixed position (args[params.length]), so adding a param is breaking for positional callers — getPaidSubscriptions(0, 100, cb) would hand cb over as the prefix. Callers using the *With(options, cb) form are unaffected: an absent option serialises to null, which the node treats as an empty prefix (verified on mainnet).

Nothing in Forecaster-client or WebVIZWallet calls these four positionally, so the break only reaches external npm consumers, and only when a release is cut — which is a separate, deliberate step (npm publish is irreversible). Flagging it here so that step is not taken blind.

Live

api.viz.world already serves this app.js, and the explorer was driven end-to-end against mainnet: with name_prefix empty the first page is press, liveblogs, russia, finance, bitcoin; with pre it is press alone.

Follows steemit#160, which shipped code-only.

The node gained an optional trailing argument on these read methods
(viz-cpp-node steemit#160) that is matched against an index, so a filter can
reach rows the caller never paged to. Documented here in all three
places the explorer and the lib read from: the method tree in
src/api/methods.js, its copy plus the SPEC block in api-frontend/app.js,
and the canonical jsonrpc-api-spec.json.

Empty or omitted keeps the old behaviour, and an empty value is not sent
at all by the explorer, so nothing changes for a caller that ignores it.

One caveat worth knowing before the next release: the generated wrappers
read the callback from a FIXED position (args[params.length]), so adding
a param is breaking for POSITIONAL callers -- getPaidSubscriptions(0,100,cb)
would hand cb over as the prefix. Callers using the *With(options, cb) form
are unaffected (an absent option becomes null, which the node treats as an
empty prefix). Nothing in Forecaster-client or WebVIZWallet calls these
four positionally, so the break only reaches external consumers, and only
when a release is cut -- which is a separate, deliberate step.
@On1x
On1x merged commit 69724e3 into master Sep 16, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant