Hedera.Id (Hedera v0.8.0)

Copy Markdown View Source

Shared implementation for Hedera entity identifiers of the form shard.realm.numHedera.AccountId, ContractId, FileId, ScheduleId, TokenId, and TopicId.

use Hedera.Id injects the struct (shard/realm/num, num required), its @type t, and the parse/1, to_string/1, and to_proto/1 functions — all identical across the entity types (the wire encoding is shard=1, realm=2, num=3 for every one).

Summary

Functions

Parse "shard.realm.num" into struct(mod, …), or raise ArgumentError with a clear message. Shared by every identifier module's parse/1.

Functions

parse!(mod, string)

@spec parse!(module(), binary()) :: struct()

Parse "shard.realm.num" into struct(mod, …), or raise ArgumentError with a clear message. Shared by every identifier module's parse/1.