MCPcopy Create free account
hub / github.com/Mnexa-AI/e2a / nativeAttachmentStore

Struct nativeAttachmentStore

internal/httpapi/attachments.go:52–55  ·  view source on GitHub ↗

nativeAttachmentStore mints capability tokens with the deployment HMAC secret (HMAC-SHA256, the same crypto family as the HITL magic-link) and points URLs at e2a's own /…/attachments/{index}/download route. Zero external dependency. The token is purpose-scoped: it binds message_id + index + expiry,

Source from the content-addressed store, hash-verified

50// token is purpose-scoped: it binds message_id + index + expiry, so it can only
51// download the exact attachment it was minted for and only until it expires.
52type nativeAttachmentStore struct {
53 secret []byte
54 publicURL string // base, e.g. https://api.e2a.dev (no trailing slash)
55}
56
57// NewNativeAttachmentStore returns the default (zero-dependency) attachment store.
58func NewNativeAttachmentStore(secret, publicURL string) AttachmentStore {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected