Add a "conditions" field on /tx/sources
Today when querying /tx/sources/95ApcNEeoFnjUYPwh4fbGqKPDe5mCJysfJfezLngEZcu
, we have a result like:
{
"currency": "gtest",
"pubkey": "95ApcNEeoFnjUYPwh4fbGqKPDe5mCJysfJfezLngEZcu",
"sources": [
{
"type": "T",
"noffset": 1,
"identifier": "55D70E125CBE4A14B6C2DCA29197C17A73578988BA56D2BE249683204C6BFB29",
"amount": 250,
"base": 1
}
]
}
The problem is: each result does not necessarily unlock with just:
SIG(95ApcNEeoFnjUYPwh4fbGqKPDe5mCJysfJfezLngEZcu)
It may be a more complex condition containing 95ApcNEeoFnjUYPwh4fbGqKPDe5mCJysfJfezLngEZcu
, like:
SIG(95ApcNEeoFnjUYPwh4fbGqKPDe5mCJysfJfezLngEZcu) && CSV(2000)
This is annoying, as a client seeing this source does not know how to unlock it. The client may suppose that the source only requires SIG(...)
, but that can be false and future transactions relying on this unlock will always fail.
Adding explicit unlocking conditions would allow to make the difference between all the sources.