> For the complete documentation index, see [llms.txt](https://doc.crocwallet.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.crocwallet.com/developers/security-boundaries.md).

# Security Boundaries

## Public DApp methods

The SDK 1.0.0 facade exposes these methods; this is not the Extension's internal content-script allow-list:

* `checkExtensionAvailability`
* `connect`
* `disconnect`
* `getSession`
* `request`
* `signEvmMessage`
* `signEvmTypedData`
* `sendEvmTransaction`
* `signSolanaMessage`
* `signSolanaTransaction`
* `signAndSendSolanaTransaction`
* `getActiveContracts`
* `prepareExecute`
* `getCommandStatus`
* `getWalletVersion`
* `getEthereumProvider`
* `on`

## Permission and signing boundaries

SDK requests delegate to the injected provider. Universal requests cross the Extension's public `providerRequest` bridge and are checked against the browser-verified origin, approved namespace, chain and account snapshot. Calling a method from page JavaScript does not grant a new permission.

Canton contract reads and Daml execution use the deployed Extension/backend template and choice rules. A contract query cannot create party visibility. SDK installation cannot upload or vet a DAR. Arbitrary `ledgerApi` operations are not enabled by these helpers.

The Extension also has a partial CIP-0103 adapter at `window.crocWallet.cip103`; it is separate from this SDK facade. Do not advertise full CIP-0103 conformance, generic Ledger API access or a complete transaction-event lifecycle from the partial adapter.

Receive preapproval remains an Extension-owned permission and signing flow. The SDK does not expose `croc_get_receive_preapproval` or `croc_set_receive_preapproval`.

## Responsibility boundaries

| Component                            | Responsibility                                                                                                                                             |
| ------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| dApp                                 | Use the real served origin, explicit chain IDs and approved accounts; explain the requested action; preserve command IDs and reconcile uncertain outcomes. |
| SDK                                  | Resolve the provider, validate selected inputs, reject wallet-secret-shaped fields, preserve error data and delegate requests.                             |
| Injected provider and content script | Bridge public requests to the Extension; isolate internal runtime operations from page-origin calls.                                                       |
| Extension and local vault            | Enforce origin/account permissions, own confirmation, keep keys local, sign approved actions and attach authenticated Backend access.                      |
| Wallet Backend                       | Enforce canonical asset/command rules, prepare and submit transactions, and return ledger status through the authorized Extension flow.                    |

The SDK's secret-field check is a developer guard, not the security boundary: page JavaScript can replace its own SDK. Enforceable separation comes from the Extension, its local vault and Backend checks. The dApp must never collect wallet passwords, private keys, recovery phrases, Backend session tokens or arbitrary signed wallet payloads.

## Rejection and uncertain outcomes

Signing and write requests require explicit wallet confirmation. Treat rejection as final for that user action. For an uncertain Canton submission, query the original command ID with `getCommandStatus`; do not automatically resend or replace the trade. The SDK does not retry these operations.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://doc.crocwallet.com/developers/security-boundaries.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
