js-stellar-sdk icon indicating copy to clipboard operation
js-stellar-sdk copied to clipboard

createClaimableBalance: create claimant predicate from JSON object

Open quietbits opened this issue 4 years ago • 1 comments

Currently, all claimant predicate creation helpers are functions in createClaimableBalance, which makes it harder to dynamically compose them. It would be great if there was an option to pass a JSON object instead.

quietbits avatar Oct 19 '20 16:10 quietbits

Here's a reference implementation in go https://github.com/stellar/go/blob/master/xdr/json.go#L84 -- this is actually how predicates are shown in Horizon

abuiles avatar Oct 19 '20 16:10 abuiles