Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Export functions for creating Timepoint/Duration (#1201)
### What Export functions for creating and accessing Timepoint and Duration. ### Why The types are not creatable inside a contract, and outside a contract in tests are only creatable using the XDR ScVal type. If developers are to use the Timepoint and Duration types, they need to be able to construct the types from primitive values. The `Timepoint` `from_unix` and `to_unix` functions were added using the unix terminologgy because that's the type of time values the Stellar network uses. The `Duration` `from_seconds` and `to_seconds` functions were added using the seconds terminology because it seemed like the most direct way to communicate intent. I originally intended to use `secs` which I think would also be reasonable and feedback on the issue suggested `seconds` which also seems reasonable to me. While for both types functions were repurposed/removed, those functions were private only and should have no impact on compatibility. Close #1197
- Loading branch information