Limits now allow you to scope a subject or a resource. This changes how the limits are applied and enforced.

Previously, limits were applicable to everything that was interacting with a wallet. While this was inflexible, combining it with access control facilitated physically segregated wallets, each with discrete purpose.
The new model with limit scopes allows greater flexibility and enables multi-purpose wallets. This means that a single wallet can have limits that restrict the spend by users or api credentials, to specific counterparties, via specific transaction types.
In order to make the limits as flexible as possible, the scopes are implemented using a mechanism called matchers. Matchers define what the limit must match in order to be applicable. Today, we have four types of matchers:
A limit can have at most one initiator matcher at a time. An initiator can be a User or API credential. A limit with an initiator will only apply to that specific initiator.
UI Examples

Example limit configuration with User as initiator

Example limit configuration with API Credential as initiator
API Examples
{
"limitType": "PER_TX",
"limitQty": "0.1",
"symbol": "XRP",
"matchers": [
{
"type": "USER",
"value": "121d0242-02f3-4fa4-b907-a5ce54b68ba3"
}
]
}
{
"limitType": "PER_TX",
"limitQty": "0.1",
"symbol": "XRP",
"matchers": [
{
"type": "API_CREDENTIAL",
"value": "b89b0060-7d8b-4944-9eb7-62e45e5cce46"
}
]
}
A limit can have at most one counterparty at a time. A limit with a counterparty will enforce the rule on transactions to that counterparty.
UI Examples