# `package.wire_invalid`

Field says how it is sent in a way it can't.

Area 11, [External services](../topics/external-services.md); not declinable; the next step is usually the agent's.

> A provider package's field says how it is sent
> with `wire:`, one of the built-in encodings, or with its package's own
> `decode:` and `encode:` functions, given together. Either is refused
> outside a provider package, both on one field, an encoding that doesn't
> hold the field's type or `Wire.minor_units` without the field's one
> currency, and a function that isn't the package's or doesn't take and
> give the right types. `wire_parts:` is refused on a type
> not made of parts, beside another way of sending the field, with a part
> left out, unknown or given twice, or a spelling that isn't text.

An encoding holds the types its provider sends that way:




```jadpo
/// A parcel and where it is.
public type Parcel = Object {
    status: Text
    collected_on: Text {
        wire: Wire.unix_seconds
    }
}
```

```text
error: `Wire.unix_seconds` sends an `Instant`, and `collected_on` is a `Text`
 --> shared/providers/acme_couriers/v1/types/parcel.jadpo:5:15
  |
5 |         wire: Wire.unix_seconds
  |               ^^^^^^^^^^^^^^^^^ a `Text` field
  reason: `Wire.unix_seconds` is how a provider sends an `Instant`; a field of another type is sent as the contract writes it, in another encoding, or by the package's own `decode:` and `encode:` functions.
  next: Name the encoding the provider sends a `Text` in, or remove `wire:` (agent)
  rule: package.wire_invalid
  help: https://jadpo.dev/docs/errors/package.wire_invalid

check failed: 1 error, 4 files
```
