Skip to content

HashAdapter — @gj-kit/expo-media

A public interface from @gj-kit/expo-media. The signature below is taken directly from the 0.6.1 release declaration.

import { HashAdapter } from '@gj-kit/expo-media';
/**
* 기본 구현은 core 내장 순수 TS 증분 SHA-256(§9) — `js-sha256` 제거, 런타임 의존성 0.
* 네이티브 가속이 필요한 호스트만 교체한다.
*
* ⚠ 해시는 dedup **최적화**일 뿐이므로 실패가 업로드를 막지 않는다(§7.1). 그 정책은 코어의
* `hashSafely()`가 갖는다 — 어댑터는 그냥 throw해도 된다.
*/
interface HashAdapter {
hashLocalFile(uri: string): Promise<string>;
hashBinary(source: BinarySource): Promise<string>;
}

This declaration is the source of truth for parameters, optionality, generics, return values, and public union/type contracts. Check the package golden path and this subpath’s import conditions for required environment, permission, and error boundaries before calling it.

  • Package: @gj-kit/expo-media
  • Version: 0.6.1
  • Public entry: .
  • Source: GitHub