Skip to content

Conversation

DaughterOfMars
Copy link
Contributor

Descriptions

Adds three graphql queries and types to support IOTA-Names.

Copy link
Member

@Thoralf-M Thoralf-M left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Default name: name.iota 🎉

from lib.iota_sdk_ffi import *

import asyncio


async def main():
    client = GraphQlClient.new_devnet()
    
    name = await client.iota_names_default_name(Address.from_hex("0x0000a4984bd495d4346fa208ddff4f5d5e5ad48c21dec631ddebc99809f16900"), None)
    print("Default name:", name.format(NameFormat.DOT))

if __name__ == "__main__":
    asyncio.run(main())

Comment on lines 24 to 25
#[error("Name must include only one separator")]
InvalidSeparator,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tbh this error is a bit confusing since we actually have two separators and it's not clear that this error and its message make only sense for the @ separator.

Can we be more explicit here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure, done

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

Successfully merging this pull request may close these issues.

3 participants