FOR DEVELOPERS / READER API

Reader API reference.

The public contracts for the published Node.js and .NET Readers and the opt-in native preview. Every signature and behavior note here is public. Labels identify the licensing terms for each implementation.

Access labels

Published package The Node.js and .NET Readers are distributed under their respective package licenses; updated future versions use the same commercial threshold as the native SDK. Earlier versions retain their shipped terms. Commercial license required at threshold When the product or user reaches EUR 1 trillion annual revenue, an enterprise agreement is required for covered AmoosedWeb code and protocol use. The standard fee absent a different negotiated price is EUR 133,700,000 per year per product. Separate source agreement GameReader implementation source is delivered after a written agreement and payment through the developer members area. See the access table and each package license.

Node.js amoosedweb-reader Published package

openRemoteSite(site, { credential, indexKeyFile, contentKey, memberKeyFile, fetcher } = {})
listRemoteResources(session)
downloadRemoteResource(session, resourcePath, output, { outputRoot } = {})
downloadRemoteSite(session, outputDirectory)

openRemoteSite accepts an HTTPS URL or loopback HTTP URL and returns a verified session. Supply only one of credential and indexKeyFile for a private index. The file may contain an AMWKEY1 token or packed ICO. Supply only one of a 32-byte contentKey and memberKeyFile; the file may be .amwmember or 64 hexadecimal characters. An edition ID in the member file must match the verified index. fetcher is an optional Fetch-compatible transport.

listRemoteResources returns an array of { path, bytes, sha256, mime, access, delivery }. access is public or members; delivery is app or download. downloadRemoteResource accepts an indexed /amoosed.com/app/ path and writes a new verified file. Its optional outputRoot confines output paths during a pull. It returns { path, bytes, sha256 }. downloadRemoteSite downloads all indexed resources under a new or existing real directory and returns an array of those results. Downloads do not replace existing files; protected files require the matching member key.

Opt-in native Node.js Reader Binary SDK terms apply Local review preview

The native-backed Node-API preview is a local review build, not a published npm download. The 0.28.17-preview.1 Windows x64 review tarball passed a clean installed-consumer gate with C ABI revision 16, including native injected fetches and cancellation. It exposes the familiar Reader functions at its package root and the direct native API through ./native. The earlier 0.28.14-preview.1 package passed Windows x64 and Ubuntu Linux x64 gates; the new entry-point arrangement has not yet been checked on Linux. The earlier Linux package uses revision 14. Each tarball contains a JavaScript wrapper, addon, and matching prebuilt library. The direct native exports return promises:

readBytes(origin, resourcePath, options = {})
listResources(origin, options = {})
downloadResource(origin, resourcePath, outputPath, options = {})
openSite(origin, options = {})
decodeStandaloneWav(wavBuffer, mediaKeyBuffer)

// The object returned by openSite():
site.listResources(options = {})
site.readBytes(resourcePath, options = {})
site.downloadResource(resourcePath, outputPath, options = {})
site.downloadSite(outputDirectory, options = {})
site.close()

At the review package root, openRemoteSite, listRemoteResources, downloadRemoteResource, and downloadRemoteSite use the native backend by default. On Windows, a supplied fetcher also uses the native backend through a bounded Node-API callback bridge. The Windows tarball omits the JavaScript codec fallback; the older Linux review still uses it for custom fetchers. Close either session when finished. Site options for the ./native subpath accept indexCredential or indexKeyFile, and memberKey or memberKeyFile; use one source for each key. Site methods accept an AbortSignal. The opened session pins one verified index and serializes its operations; close it when finished. Reads return a verified Buffer of at most 64 MiB. Downloads preserve existing files, and a whole-site pull checks paths before writing. Native failures expose numeric statusCode and operation fields; cancellation rejects with an AbortError.

decodeStandaloneWav uses a separate raw 32-byte media key and one complete self-contained AWA1 WAV Buffer of at most 64 MiB. It runs on a worker thread, authenticates before returning plaintext, and does not need a website index. This local method has no cancellation signal. Clear the key and returned plaintext when finished. Indexed multi-clip exchange and website WAV carriers are separate. A clean installed Windows review package matched the current JavaScript Reader on all public amoosed.com resource metadata and one bounded resource over HTTPS, then confirmed no-overwrite. Private editions and the full target-host matrix remain release gates. The next Windows x64 amoosedweb-reader package build uses this binding behind the same four public functions. That local build is not yet a registry release; other npm platforms retain the JavaScript Reader.

.NET 10 AmoosedWeb.Reader Published package

new AmoosedReader(Uri site, string? indexKeyFile = null, string? memberKeyFile = null)
new AmoosedReader(string executablePath, Uri site, string? indexKeyFile = null, string? memberKeyFile = null)
string ExecutablePath { get; }
Task<IReadOnlyList<AmoosedResource>> ListAsync(CancellationToken cancellationToken = default)
Task<AmoosedDownload> DownloadAsync(string resourcePath, string outputPath, CancellationToken cancellationToken = default)
Task<IReadOnlyList<AmoosedDownload>> DownloadAllAsync(string outputDirectory, CancellationToken cancellationToken = default)

AmoosedResource is (string Path, long Bytes, string Sha256, string Mime, string Access, string Delivery). AmoosedDownload is (string Path, long Bytes, string Sha256). The site must use HTTPS or loopback HTTP. Key paths refer to local files; key bytes are not process arguments. In the next Windows x64 package build, the site-only constructor loads the matching AmoosedWeb.Native C/C++ DLL from application output. The explicit executable-path constructor supports a separately installed compatible CLI. Every method may be cancelled with its token. Download methods preserve existing targets.

Opt-in native .NET Reader Binary SDK terms apply Local review preview

The separate AmoosedWeb.Reader.NativePreview package is a local technical review, not a published download. It depends on the exact-version AmoosedWeb.GameReader.Native package, which copies the matching Windows or Linux x64 library beside the application. It does not include the large amw.exe runtime. The preview API is documented here for everyone:

using AmoosedWeb.Reader.NativePreview;

new AmoosedNativePreviewReader(Uri site, string? indexKeyFile = null, string? memberKeyFile = null)
Task<IReadOnlyList<AmoosedResource>> ListAsync(CancellationToken cancellationToken = default)
Task<AmoosedDownload> DownloadAsync(string resourcePath, string outputPath, CancellationToken cancellationToken = default)
Task<byte[]> ReadBytesAsync(string resourcePath, CancellationToken cancellationToken = default)
static byte[] DecodeStandaloneWav(byte[] wav, byte[] mediaKey)
Task<IReadOnlyList<AmoosedDownload>> DownloadAllAsync(string outputDirectory, CancellationToken cancellationToken = default)

The result records have the same fields as the published .NET Reader. The site must use HTTPS or loopback HTTP. The index and member key arguments are paths to local credential files. Downloads verify bytes and preserve existing targets. ReadBytesAsync returns up to 64 MiB of verified bytes in caller memory and never returns partial content on failure; use DownloadAsync for larger files. The current source C ABI revision is 16 and may change before 1.0. The 0.28.17-preview .NET review package uses revision 16 and passed a clean Windows x64 installed-consumer gate. Native status codes distinguish missing resources, invalid state, rejected game rollback, existing output, bad format, authentication, verification, network, and unsupported failures without parsing diagnostic text. The .NET cancellation token now reaches an in-progress index load through a separate single-use native operation handle. Commercial binary use at or above the revenue threshold requires an enterprise license; implementation source requires a separate paid agreement. See the complete exported C symbol list and public C++ headers.

DecodeStandaloneWav authenticates one self-contained AWA1 WAV using a separate raw 32-byte media key. It accepts at most 64 MiB of WAV input, returns caller-owned bytes only after full verification, and does not need a website index. The synchronous call has no cancellation token. Clear the key and recovered plaintext after use. Wrong keys and damaged WAVs raise typed statuses. Indexed multi-clip exchange and website WAV carriers are separate operations.

The 0.28.17-preview .NET facade raises AmoosedNativePreviewException for native failures. Its StatusCode preserves the exact number, Status gives the named AmoosedNativePreviewStatus, and Operation identifies the failed call. The type derives from IOException for existing callers. Cancellation raises OperationCanceledException. This documented API is public under the binary SDK terms above. A Linux x64 review consumer now verifies hosted and external indexes, protected bytes, missing or incorrect member-key rejection, and exact PNG low-bit, sparse-frame, and WAV tone reads. The Windows review suite covers the broader corruption and CLI parity matrix.

Native backend for the familiar .NET Reader API Binary SDK terms apply Local review preview

The separate Windows x64 AmoosedWeb.Reader.NativeDefaultPreview 0.28.17-preview package exposes AmoosedWeb.Reader.AmoosedReader with the same list and download methods shown above. Its site-only constructor uses the revision-16 C library by default. UsesNativeLibrary reports this choice and ExecutablePath is empty for that path; an explicit CLI executable constructor remains available. A clean NuGet consumer recovered exact hosted bytes and a full site, then opened an external-index member edition, rejected absent or incorrect keys without leaving output, verified protected bytes, and preserved existing files. The package includes no amw.exe or implementation source. A clean installed consumer also verified one bounded public resource and no-overwrite behavior against amoosed.com over HTTPS. The next Windows x64 AmoosedWeb.Reader package build also uses this native backend by default, with a matching DLL in AmoosedWeb.Native. This local change is not yet a registry release; private target hosts and the full target-host parity gate remain.

Native preview credential failures Binary SDK terms apply

The native .NET facade reads a member key file locally. A malformed .amwmember raises AmoosedNativePreviewException with BadFormat; a valid token for a different verified edition raises AuthenticationFailed. Both derive from IOException, matching the published Reader's failure family while preserving a typed preview status. Incorrect key bytes also return AuthenticationFailed when a protected resource is fetched. No failed download publishes an output file.

CLI command reference

The plain-text compiler reference lists every shipped amw command with syntax. Run amw help COMMAND for focused arguments. The CLI quick start shows remote listing, one-file download, and full pull.