sacarlson kratos_ng Thanks for your interest, guys!
I have finally published the NPM module: https://www.npmjs.com/package/stellar-federation-resolver-node
GitHub page: https://github.com/GFTNetwork/stellar-federation-resolver-node
We decided to change the data fetching approach to make the resolver more flexible.
Key benefits:
- Works with any web framework (Express, Sails, Koa, Hapi, etc).
- Allows you to design your own name resolution workflows: fetch data from db, external API, or just from plain file. No matter how complex logic you have, you can integrate it with a minimum of coding.
- External "providers" support. Provider is an extension point that allows you to create a configurable module for any database/API. We are currently working on the provider for Sequelize ORM (supports PostgreSQL, MySQL, SQLite and MSSQL).
I don't fully grasp the idea of the forward
request, so I've made a generic implementation that can be used to proxy requests to third-party systems.
You can test the implementation here: https://ftest.gft.network/federation/
Examples:
Resolve predefined account by name:
https://ftest.gft.network/federation/?q=gft-issuer-account*ftest.gft.network&type=name
You can create your own account, just provide username
and accountid
(Stellar address).
https://ftest.gft.network/federation/add/?username=johny&accountid=GCCYESWKD7CJU5SG7MFZ4DXN77MLNIGTVHDOF6PUPXE7VBRZGKTMGHCI
https://ftest.gft.network/federation/?q=johny*ftest.gft.network&type=name
The ftest.gft.network
domain defines stellar.toml
file that contains a reference to the test federation server. So it can be used to resolve names or create a trustline in wallets with Federation protocol support.
Any feedback is highly appreciated.