interledger-deprecated / java-ilp-core

WE'VE MOVED: This project has moved to Hyperledger Quilt
https://github.com/hyperledger/quilt/tree/master/ilp-core
Apache License 2.0
16 stars 10 forks source link

Questions about readme #89

Closed michielbdejong closed 6 years ago

michielbdejong commented 6 years ago

What is/are the allowed type(s) for 'hash' in Condition condition1 = Condition.of(hash)? 32-bytes, just like for Fulfillment.of(preimage), I guess?

What is/are the allowed type(s) for 'destinationAmount' and for 'data' in InterledgerPayment.builder().destinationAmount? And I guess 'address' there has to be an InterledgerAddress object? Or can it also be a String?

sappenin commented 6 years ago

What is/are the allowed type(s) for 'destinationAmount' and for 'data' in InterledgerPayment.builder().destinationAmount?

destinationAmount must be a BigInteger, and data is a byte[] (an array of bytes).

And I guess 'address' there has to be an InterledgerAddress object? Or can it also be a String?

The address is always of type InterledgerAddress, which is basically just a wrapper for a String that enforces everything from the RFC, like max-length, and offers some utility functions like, "is this a prefix?" and such.

adrianhopebailie commented 6 years ago

What is/are the allowed type(s) for 'hash' in Condition condition1 = Condition.of(hash)? 32-bytes, just like for Fulfillment.of(preimage), I guess?

Condition.of(hash) is validated to be 32 bytes