Closed jansegre closed 3 years ago
Both look ok to me.
Do you think it's worth making them public (on our nodes)? Or maybe just for people running their own full node? Doesn't seem to be much of a problem. I mean, the APIs don't seem costly to run.
I think it's fine for them to be public. But honestly I hope we can eventually shut down the public fullnode APIs.
If the idea of the create token endpoint is to facilitate HTR integration I think it's good but if we feel that any custom token integration would need this API I think it's not so difficult to add support for that. I couldn't think any reasons why a custom token integration would use that (only if some exchange decide to list a custom token, which does not seem reasonable to happen anytime soon).
Anyway, both APIs look good to me.
In GET /v1a/validate_address/{address}
's response, we should rename script
to p2pkh_script
.
Besides that, all good to me.
In
GET /v1a/validate_address/{address}
's response, we should renamescript
top2pkh_script
.
I prefer script
because we may have other address types in the future (actually is multisig address different?) and it doesn't really matter for the user of the script
field, which would be to just have the script to use for sending to that address.
But maybe we could have a "type": "p2pkh"
field in addition to script
. What do you think? @msbrogli
If the idea of the create token endpoint is to facilitate HTR integration I think it's good but if we feel that any custom token integration would need this API I think it's not so difficult to add support for that. I couldn't think any reasons why a custom token integration would use that (only if some exchange decide to list a custom token, which does not seem reasonable to happen anytime soon).
I don't see any particular use for custom token integrations besides what would already be useful in particular to HTR. Maybe if we introduce custom token specific addresses in the future, than it would be super useful for not having to reimplement that logic. But yeah, facilitating these integrations is not a goal of this API.
In
GET /v1a/validate_address/{address}
's response, we should renamescript
top2pkh_script
.I prefer
script
because we may have other address types in the future (actually is multisig address different?) and it doesn't really matter for the user of thescript
field, which would be to just have the script to use for sending to that address.But maybe we could have a
"type": "p2pkh"
field in addition toscript
. What do you think? @msbrogli
A type
field seems good to me.
A
type
field seems good to me.
I'll add that and I think this is done.
I'm creating this issue to discuss the addition of 2 new APIs:
GET /v1a/validate_address/{address}
: validates address an also returns the corresponding output scriptPOST /v1a/create_tx
: creates an unsigned, unmined transaction from inputs and outputs (script or address), validating everything (including double spending) except input data and powcreaterawtransaction
like RPC methods (came up when discussing integration of qTrade's exchange)