-
Notifications
You must be signed in to change notification settings - Fork 5
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
txref BIP needs pull request for txos #4
Comments
PR should include a reference classifyInputString(). |
Our current proposed text surrounding classifyInputString() is as follows:
const int TXREF_STRING_MIN_LENGTH = 17; // ex: "tx1rqqqqqqqqmhuqk"
const int TXREF_EXT_STRING_MIN_LENGTH = 20; // ex: "tx1rqqqqqqqqqquau7hl"
const int TXREF_STRING_MIN_LENGTH_TESTNET = 23; // ex: "txtest1xqqqqqqqqqkn3gh9"
const int TXREF_EXT_STRING_MIN_LENGTH_TESTNET = 26; // ex: "txtest1xqqqqqqqqqqqqj7dvzy"
enum InputParam { unknown_param, txref_param, txrefext_param };
// before testing for various txrefs, get rid of any unknown characters
std::string s = bech32::stripUnknownChars(str);
if(s.length() == TXREF_STRING_MIN_LENGTH ||
s.length() == TXREF_STRING_MIN_LENGTH_TESTNET) {
return txref_param;
}
if(s.length() == TXREF_EXT_STRING_MIN_LENGTH ||
s.length() == TXREF_EXT_STRING_MIN_LENGTH_TESTNET) {
return txrefext_param;
}
return unknown_param; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
No description provided.
The text was updated successfully, but these errors were encountered: