0.1.0 • Published 11 months ago

@ubiquify/cyclone v0.1.0

Weekly downloads
-
License
(Apache-2.0 AND M...
Repository
github
Last release
11 months ago

@ubiquify/cyclone

Http(s) client for @ubiquify/relay .

Build

npm run clean
npm install
npm run build
npm run test

Plumbing client

Low level interface to the relay service.

interface RelayClientPlumbing {
  storePush(
    chunkSize: number,
    bytes: Uint8Array
  ): Promise<PlumbingStorePushResponse>;
  storePull(
    chunkSize: number,
    versionStoreId: string
  ): Promise<Uint8Array | undefined>;
  storeResolve(versionStoreId: string): Promise<string | undefined>;
  graphPush(bytes: Uint8Array): Promise<PlumbingGraphPushResponse>;
  graphPull(versionRoot: string): Promise<Uint8Array | undefined>;
  indexPull(versionRoot: string): Promise<Uint8Array | undefined>;
  blocksPush(bytes: Uint8Array): Promise<PlumbingBlocksPushResponse>;
  blocksPull(links: string[]): Promise<Uint8Array | undefined>;
  protocolVersion(): Promise<ProtocolVersion>;
}
const relayClient = relayClientPlumbingFactory({
  baseURL: "https://localhost:3002",
});

Basic client

Coarse interface to the relay service. The relay auto-merges on push.

interface RelayClientBasic {
  push(versionStoreRoot: Link, versionRoot?: Link): Promise<BasicPushResponse>;
  pull(
    versionStoreId: string,
    localVersionStoreRoot?: Link
  ): Promise<
    | { versionStore: VersionStore; graphStore: GraphStore; graph: Graph }
    | undefined
  >;
}
const relayClient = relayClientBasicFactory(
  {
    chunk,
    chunkSize,
    linkCodec,
    valueCodec,
    blockStore,
  },
  {
    baseURL: "https://localhost:3002",
  }
);

Licenses

Licensed under either Apache 2.0 or MIT at your option.

0.1.0

11 months ago

0.0.10

1 year ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago