-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Add Ripple Payment transaction and signing #46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
} | ||
|
||
/// Encodes a 64-bit value into the provided buffer. | ||
static inline void encode64(uint64_t val, std::vector<uint8_t>& data) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should consolidate this and the one under Bitcoin.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the only difference is endian?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, let's have something like encode64le
and encode64be
src/Ripple/Transaction.h
Outdated
namespace TW { | ||
namespace Ripple { | ||
|
||
enum FieldType: int { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is only used in C++ let's use class enum FieldType: int
and change enum cases to just the name like int16
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
src/Ripple/Transaction.h
Outdated
}; | ||
|
||
enum TransactionType { | ||
TransactionTypePayment = 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
src/Ripple/BinaryCoding.h
Outdated
|
||
/// Encodes a field type. | ||
static inline void encodeType(FieldType type, int key, std::vector<uint8_t>& data) { | ||
int _type = int(type); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
int _type = int(type); | |
const auto typeValue = static_cast<int>(type); |
* Add ripple tx serialization * rebase master * add TWRippleSigner and tests * continue adding * update java_package * Add xrp/wan/vet logo * use enum class * use static_cast
* Add ripple tx serialization * rebase master * add TWRippleSigner and tests * continue adding * update java_package * Add xrp/wan/vet logo * use enum class * use static_cast
* Add ripple tx serialization * rebase master * add TWRippleSigner and tests * continue adding * update java_package * Add xrp/wan/vet logo * use enum class * use static_cast
Description
Fix #6, we only support non negative / float XRP payment transaction from A to B.
Reference:
Testing instructions
All ripple UT passed
Types of changes
Transaction
,Signer
andTWRippleSigner
Checklist
[WIP]
if necessary.