-
Notifications
You must be signed in to change notification settings - Fork 102
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
Typecasting a string to Guard via Pact code #1298
Comments
Just to clarify, this really only refers to principal account protocols, which are the only valid things that could be considered for translation into a guard value. Of these, because of the compression inherent in the one-way hashes used to denote the strings, it's impossible to "create" a guard from anything but In the case of |
My hesitation is that I think the focus on Indeed, it's accidental that Finally, it is an intentional feature of Pact that keyset-based accounts are not createable in code, as this inevitably leads to developers checking in keys to source code. Pact eliminates this by design. I would like to hear of a concrete use case that requires synthesizing a new keyset autonomously, because if it's not autonomous, you have access to the message data payload. |
Currently, there is no way to create a single-key guard via pact code. (read-keyset) is required, limiting the ease-of-use for creating new accounts. This limits marmalade transfer-create to only accounts that already exist on the coin contract unless Javascript is used. The same issue exists for transfer-create of new coins
I suggest we create a new function called
string-to-guard
.Example for something I would use directly with marmalade:
where (string-to-guard) would remove k: and check the length of account-name, and cast into a :guard typing
Alternatively, something like
create-single-key-guard
would be usefulThe text was updated successfully, but these errors were encountered: