@web3-storage/clock
Advanced tools
Comparing version 0.1.0 to 0.2.0
@@ -35,5 +35,11 @@ /** | ||
* @template T | ||
* @param {object} [options] | ||
* @param {import('@ucanto/interface').Principal} [options.servicePrincipal] | ||
* @param {URL} [options.serviceURL] | ||
* @returns {import('@ucanto/interface').ConnectionView<import('../service').Service<T>>} | ||
*/ | ||
export function connect<T>(): import("@ucanto/interface").ConnectionView<import("../service.js").Service<T>>; | ||
export function connect<T>(options?: { | ||
servicePrincipal?: import("@ucanto/client").Principal<`did:${string}:${string}`> | undefined; | ||
serviceURL?: URL | undefined; | ||
} | undefined): import("@ucanto/interface").ConnectionView<import("../service.js").Service<T>>; | ||
export * from "./api.js"; | ||
@@ -40,0 +46,0 @@ export * from "../service.js"; |
{ | ||
"name": "@web3-storage/clock", | ||
"version": "0.1.0", | ||
"version": "0.2.0", | ||
"description": "UCAN based Merkle Clock as a service.", | ||
@@ -58,3 +58,3 @@ "type": "module", | ||
"dependencies": { | ||
"@alanshaw/pail": "^0.1.0", | ||
"@alanshaw/pail": "^0.3.0", | ||
"@ipld/dag-cbor": "^9.0.0", | ||
@@ -61,0 +61,0 @@ "@ucanto/client": "^5.0.0", |
# w3clock | ||
<p> | ||
<a href="https://github.com/web3-storage/freeway/actions/workflows/release.yml"><img alt="GitHub Workflow Status" src="https://img.shields.io/github/actions/workflow/status/web3-storage/w3clock/test.yml?branch=main&style=for-the-badge" /></a> | ||
<a href="https://github.com/web3-storage/w3clock/actions/workflows/test.yml"><img alt="GitHub Workflow Status" src="https://img.shields.io/github/actions/workflow/status/web3-storage/w3clock/test.yml?branch=main&style=for-the-badge" /></a> | ||
<a href="https://standardjs.com"><img alt="StandardJS Code Style" src="https://img.shields.io/badge/code_style-standard-brightgreen.svg?style=for-the-badge" /></a> | ||
@@ -6,0 +6,0 @@ <a href="https://discord.com/channels/806902334369824788/864892166470893588"><img src="https://img.shields.io/badge/chat-discord?style=for-the-badge&logo=discord&label=discord&logoColor=ffffff&color=7389D8" /></a> |
@@ -97,11 +97,14 @@ import { connect as clientConnect } from '@ucanto/client' | ||
* @template T | ||
* @param {object} [options] | ||
* @param {import('@ucanto/interface').Principal} [options.servicePrincipal] | ||
* @param {URL} [options.serviceURL] | ||
* @returns {import('@ucanto/interface').ConnectionView<import('../service').Service<T>>} | ||
*/ | ||
export function connect () { | ||
export function connect (options) { | ||
return clientConnect({ | ||
id: DID.parse(SERVICE_PRINCIPAL), | ||
id: options?.servicePrincipal ?? DID.parse(SERVICE_PRINCIPAL), | ||
encoder: CAR, | ||
decoder: CBOR, | ||
channel: HTTP.open({ | ||
url: new URL(SERVICE_URL), | ||
url: options?.serviceURL ?? new URL(SERVICE_URL), | ||
method: 'POST' | ||
@@ -108,0 +111,0 @@ }) |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
31530
368
+ Added@alanshaw/pail@0.3.4(transitive)
+ Addedmultiformats@12.1.3(transitive)
- Removed@alanshaw/pail@0.1.1(transitive)
Updated@alanshaw/pail@^0.3.0