(envelope: Envelope<R>)
| 407 | * @since 4.0.0 |
| 408 | */ |
| 409 | export const primaryKey = <R extends Rpc.Any>(envelope: Envelope<R>): string | null => { |
| 410 | if (envelope._tag !== "Request" || !PrimaryKey.isPrimaryKey(envelope.payload)) { |
| 411 | return null |
| 412 | } |
| 413 | return primaryKeyByAddress({ |
| 414 | address: envelope.address, |
| 415 | tag: envelope.tag, |
| 416 | id: PrimaryKey.value(envelope.payload) |
| 417 | }) |
| 418 | } |
| 419 | |
| 420 | /** |
| 421 | * Builds a storage primary-key string from an entity address, RPC tag, and |
nothing calls this directly
no test coverage detected