(id Hash)
| 71 | } |
| 72 | |
| 73 | func (tx *Tx) Issuance(id Hash) (*Issuance, error) { |
| 74 | e, ok := tx.Entries[id] |
| 75 | if !ok || e == nil { |
| 76 | return nil, errors.Wrapf(ErrMissingEntry, "id %x", id.Bytes()) |
| 77 | } |
| 78 | iss, ok := e.(*Issuance) |
| 79 | if !ok { |
| 80 | return nil, errors.Wrapf(ErrEntryType, "entry %x has unexpected type %T", id.Bytes(), e) |
| 81 | } |
| 82 | return iss, nil |
| 83 | } |
| 84 | |
| 85 | func (tx *Tx) Nonce(id Hash) (*Nonce, error) { |
| 86 | e, ok := tx.Entries[id] |