Skip to content
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

ecc.PublicKey is not string #197

Closed
biancheng347 opened this issue Dec 12, 2022 · 6 comments
Closed

ecc.PublicKey is not string #197

biancheng347 opened this issue Dec 12, 2022 · 6 comments

Comments

@biancheng347
Copy link

{
key: "string",
weight: 1,
}

but, key is ecc.PublicKey struct

@maoueh
Copy link
Contributor

maoueh commented Dec 12, 2022

That is expected behavior, key should represents a valid ECC PublicKey, hence why it's ecc.PublicKey, use key.String() to get back the string representation.

@maoueh maoueh closed this as completed Dec 12, 2022
@biancheng347
Copy link
Author

The back-end
json:{
"key": "string"
}

The get_account method returns key: ""

If I get the ecc.pubkey object and I have no problem with key.string (), how can I now be compatible with back-end key:string

@biancheng347
Copy link
Author

Also, how to get http body raw data method and why, mainly if the method model is not consistent with the backend json, we can parse it ourselves with body.

@maoueh
Copy link
Contributor

maoueh commented Dec 13, 2022

Sorry, probably barrier of language, I don't understand your problem at all. Provide exact reproduction case so I can see what you mean.

If you want HTTP body raw, make the request yourself using net/http package offered by Golang.

@biancheng347
Copy link
Author

I mean if key is a string, get_account is acceptable. Instead of key is the structure

@anthonyzzy
Copy link
Contributor

哈喽哥们 @biancheng347,我是EOS Canada原成员。你可以说中文解释你的问题,我帮你跟 matt 翻译

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants