SDK operation map
The same byte-level contract is available through native TypeScript and Go operations.
generation
| Operation | Function | Input | Output | Purpose |
|---|---|---|---|---|
| Create seed | createSeed | source: ByteSource, sink: AsyncByteSink, signal: AbortSignal | Promise<SeedInfo> | Hash source blocks into raw digest bytes. |
inspection
| Operation | Function | Input | Output | Purpose |
|---|---|---|---|---|
| Inspect or hash seed | inspectSeed | seed: ByteSource, signal: AbortSignal | Promise<SeedInfo> | Compute seed hash and inspect structural length. |
verification
| Operation | Function | Input | Output | Purpose |
|---|---|---|---|---|
| Verify seed | verifySeed | seed: ByteSource, expected: Digest, signal: AbortSignal | Promise<SeedInfo> | Authenticate complete seed bytes with expected hash. |
| Verify with source size | verifySeedForSourceSize | seed: ByteSource, expectedSeedHash: Digest, sourceSize: bigint, signal: AbortSignal | Promise<SeedInfo> | Bind digest count to trusted source size. |
| Verify complete source | verifySource | source: ByteSource, seed: ByteSource, signal: AbortSignal | Promise<VerifyInfo> | Compare source blocks against the authenticated seed. |
blocks
| Operation | Function | Input | Output | Purpose |
|---|---|---|---|---|
| Read block hash | readBlockHash | seed: RandomAccessSeed, seedSize: bigint, blockIndex: bigint, signal: AbortSignal | Promise<Digest> | Read one digest at a checked index. |
| Find digest membership | findBlockHash | seed: ByteSource, expectedSeedHash: Digest, sourceSize: bigint, blockHash: Digest, signal: AbortSignal | Promise<BlockMatches> | Scan a trusted seed for matching digests. |
files
| Operation | Function | Input | Output | Purpose |
|---|---|---|---|---|
| File create and verify | createSeedFile | sourcePath: string, seedPath: string, options: CreateSeedFileOptions, signal: AbortSignal | Promise<SeedInfo> | Use path adapters around the streaming core. |
Compare SDKs
Keep the same capability model while showing each language’s real contract.
| Operation | TypeScript | Go |
|---|---|---|
| Create seed | createSeedPromise<SeedInfo> | CreateSeed(SeedInfo, error) |
| Inspect or hash seed | inspectSeedPromise<SeedInfo> | InspectSeed(SeedInfo, error) |
| Verify seed | verifySeedPromise<SeedInfo> | VerifySeed(SeedInfo, error) |
| Verify with source size | verifySeedForSourceSizePromise<SeedInfo> | VerifySeedForSourceSize(SeedInfo, error) |
| Verify complete source | verifySourcePromise<VerifyInfo> | VerifySource(VerifyInfo, error) |
| Read block hash | readBlockHashPromise<Digest> | ReadBlockHash(Digest, error) |
| Find digest membership | findBlockHashPromise<BlockMatches> | FindBlockHash(BlockMatches, error) |
| File create and verify | createSeedFilePromise<SeedInfo> | CreateSeedFile(info SeedInfo, err error) |