How to generate snap-id of package?

I’ve execute command: snap download to download *.snap and *.assert file.
In *.assert file exist snap-id, please tell me how to generate snap-id at backend?

Thank so much!

2 Likes

The snap ID is a unique identifier assigned by the store. It is created when you register a new snap name with the store: it isn’t something you can generate independently.

2 Likes

Can you show me libraries and relative parameters that used to generate it?
Actually, I’m trying create snap store of myself.

Thank you

1 Like

I’m not one of the store developers, but my understanding is that the snap IDs are assigned arbitrarily by the store. There is no way for you to generate an ID that would match what the real store assigns should that snap name be registered.

Conversely, I don’t think there is any way snapd could determine that a snapd ID was wrong if you redirected it at an alternative store. I’m sure things would get confused if you were switching snapd between the two store implementations though.

2 Likes

The Snap store server-side code is generally proprietary, @manhtran.