# Class BSV::KVStore::Global <a id="class-BSV-KVStore-Global"></a>

**Inherits:** `Object`

Read-only client for the global KVStore overlay service.

Queries the `ls_kvstore` lookup service via a {BSV::Overlay::LookupResolver},
decodes PushDrop tokens (5-field legacy and 6-field current formats), verifies
the token signature, and returns typed {Entry} objects.

Set/remove operations require wallet writes and are out of scope — those live
in the <code>bsv-wallet</code> gem.

## Selector requirement

{#get} raises `ArgumentError` unless at least one of `key`, `controller`,
`protocol_id`, or a non-empty `tags` array is supplied in the query.

## Always returns Array

{#get} always returns +Array<Entry>+, even for single-result selectors such as
+key + controller+. Callers that expect at most one result should use
<code>.first</code>.

## Silent skipping

Outputs that fail BEEF parsing, PushDrop decoding, field-count validation, or
signature verification are silently skipped (matching the TS SDK contract).

## Public Instance Methods
### `get(query, include_token: = false, history: = false)` <a id="method-i-get"></a> <a id="get-instance_method"></a>
Query the overlay for KVStore entries.
- **@param** `query` [Hash] selector: +:key+, +:controller+, +:protocol_id+, +:tags+,
+:tag_query_mode+. At least one of the first four must be present.
- **@param** `include_token` [Boolean] populate {Token} on each entry when true
- **@param** `history` [Boolean] populate history via {BSV::Overlay::Historian} when true
- **@raise** [ArgumentError] if no selector is provided
- **@return** [Array<Entry>] matching entries (empty array when nothing matches)

### `initialize(network_preset: = :mainnet, lookup_resolver: = nil, service_name: = 'ls_kvstore', proto_wallet: = nil)` <a id="method-i-initialize"></a> <a id="initialize-instance_method"></a>
- **@param** `network_preset` [Symbol] :mainnet, :testnet, or :local
- **@param** `lookup_resolver` [BSV::Overlay::LookupResolver, nil] injectable resolver
- **@param** `service_name` [String] lookup service identifier
- **@param** `proto_wallet` [BSV::Wallet::ProtoWallet, nil] injectable wallet used for
signature verification; defaults to +ProtoWallet.new('anyone')+. Tests can
substitute a double to avoid +allow_any_instance_of+.
- **@return** [Global] a new instance of Global
