NewToken creates a Token whose origRealm is bound to the calling realm. rlm must be the caller's own captured cur (asserted via rlm.IsCurrent()), and rlm.PkgPath() — the calling realm itself — becomes the Token's origRealm. Token.ID() returns origRealm + "." + symbol + "." + id.
Because IsCurrent runtime-validates that rlm came from the live crossing frame, origRealm is unforgeable: an external realm cannot fabricate a Token claiming to belong to a different package.
Realms that create multiple tokens should allocate id from one persistent seqid.ID, shared by every creation path, to avoid conflicting identifiers:
Example
1var nextTokenID seqid.ID
2Token, ledger := grc20.NewToken("Foo", "FOO", 4, nextTokenID.Next(), cur)
A realm that creates only a single token can pass 0 directly, since no other token of that realm can collide with it.
If the Token should be discoverable, follow up with grc20reg.Register(cross(cur), Token, slug). The registry key is Token.ID().