Page MenuHomePhabricator

[alias-server] add endpoint to look up address from alias
AbandonedPublic

Authored by bytesofman on Mar 21 2023, 18:46.

Details

Reviewers
None
Group Reviewers
Restricted Project
Summary

T3010

Depends on D13410

Add new endpoint /alias/<alias> that returns {alias: <alias>, address: <address>, isAvailable: bool} for a valid alias string and {"error":"Input must be a valid alias string (a-z, 0-9)"} for an invalid alias string.

Test Plan

node index.js
In a browser, navigate to localhost:5000/alias/ecash and confirm it is registered
Try localhost:5000/alias/_^Sd and confirm error msg
Try localhost:5000/alias/someunregisteredalias and confirm address: false and isAvailable: true

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 22764
Build 45148: Build Diff
Build 45147: arc lint + arc unit