Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@web3-storage/capabilities

Package Overview
Dependencies
Maintainers
5
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@web3-storage/capabilities - npm Package Compare versions

Comparing version 9.0.1 to 9.1.0

3

dist/src/index.d.ts

@@ -9,3 +9,2 @@ /** @type {import('./types.js').AbilitiesArray} */

import * as Upload from "./upload.js";
import * as Voucher from "./voucher.js";
import * as Consumer from "./consumer.js";

@@ -18,3 +17,3 @@ import * as Customer from "./customer.js";

import * as Filecoin from "./filecoin.js";
export { Access, Provider, Space, Top, Store, Upload, Voucher, Consumer, Customer, Console, Utils, RateLimit, Subscription, Filecoin };
export { Access, Provider, Space, Top, Store, Upload, Consumer, Customer, Console, Utils, RateLimit, Subscription, Filecoin };
//# sourceMappingURL=index.d.ts.map

@@ -42,12 +42,2 @@ export { top } from "./top.js";

}>>>>;
export const recoverValidation: import("@ucanto/interface").TheCapabilityParser<import("@ucanto/interface").CapabilityMatch<"space/recover-validation", `did:key:${string}` & `did:${string}` & import("@ucanto/interface").Phantom<{
protocol: "did:";
}>, Store.Schema.InferStruct<{
identity: Store.Schema.Schema<import("@ucanto/interface").URI<"mailto:">, unknown>;
}>>>;
export const recover: import("@ucanto/interface").TheCapabilityParser<import("@ucanto/interface").CapabilityMatch<"space/recover", `did:${string}:${string}` & `did:${string}` & import("@ucanto/interface").Phantom<{
protocol: "did:";
}>, Store.Schema.InferStruct<{
identity: Store.Schema.Schema<import("@ucanto/interface").URI<"mailto:">, unknown>;
}>>>;
export const allocate: import("@ucanto/interface").TheCapabilityParser<import("@ucanto/interface").CapabilityMatch<"space/allocate", `did:key:${string}` & `did:${string}` & import("@ucanto/interface").Phantom<{

@@ -54,0 +44,0 @@ protocol: "did:";

@@ -6,3 +6,3 @@ import type { TupleToUnion } from 'type-fest';

import type { PieceLink } from '@web3-storage/data-segment';
import { space, info, recover, recoverValidation } from './space.js';
import { space, info } from './space.js';
import * as provider from './provider.js';

@@ -12,3 +12,2 @@ import { top } from './top.js';

import * as UploadCaps from './upload.js';
import { claim, redeem } from './voucher.js';
import * as AccessCaps from './access.js';

@@ -72,2 +71,3 @@ import * as CustomerCaps from './customer.js';

did: AccountDID;
subscriptions: string[];
}

@@ -95,3 +95,3 @@ export interface CustomerNotFound extends Ucanto.Failure {

customer: AccountDID;
consumer: DIDKey;
consumer?: DIDKey;
}

@@ -124,4 +124,2 @@ export interface SubscriptionNotFound extends Ucanto.Failure {

export type SpaceInfo = InferInvokedCapability<typeof info>;
export type SpaceRecoverValidation = InferInvokedCapability<typeof recoverValidation>;
export type SpaceRecover = InferInvokedCapability<typeof recover>;
export type FILECOIN_PROCESSING_STATUS = 'pending' | 'done';

@@ -160,4 +158,2 @@ export interface FilecoinAddSuccess {

}
export type VoucherRedeem = InferInvokedCapability<typeof redeem>;
export type VoucherClaim = InferInvokedCapability<typeof claim>;
export type Upload = InferInvokedCapability<typeof UploadCaps.upload>;

@@ -182,4 +178,2 @@ export type UploadAdd = InferInvokedCapability<typeof UploadCaps.add>;

SpaceInfo['can'],
SpaceRecover['can'],
SpaceRecoverValidation['can'],
Upload['can'],

@@ -193,4 +187,2 @@ UploadAdd['can'],

StoreList['can'],
VoucherClaim['can'],
VoucherRedeem['can'],
Access['can'],

@@ -197,0 +189,0 @@ AccessAuthorize['can'],

{
"name": "@web3-storage/capabilities",
"version": "9.0.1",
"version": "9.1.0",
"description": "Capabilities provided by web3.storage",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/web3-storage/w3protocol/tree/main/packages/capabilities",

@@ -6,3 +6,2 @@ import * as Provider from './provider.js'

import * as Upload from './upload.js'
import * as Voucher from './voucher.js'
import * as Access from './access.js'

@@ -24,3 +23,2 @@ import * as Utils from './utils.js'

Upload,
Voucher,
Consumer,

@@ -41,4 +39,2 @@ Customer,

Space.info.can,
Space.recover.can,
Space.recoverValidation.can,
Upload.upload.can,

@@ -52,4 +48,2 @@ Upload.add.can,

Store.list.can,
Voucher.claim.can,
Voucher.redeem.can,
Access.access.can,

@@ -56,0 +50,0 @@ Access.authorize.can,

@@ -13,4 +13,4 @@ /**

import * as Store from './store.js'
import { capability, URI, Schema, ok, fail } from '@ucanto/validator'
import { canDelegateURI, equalWith, and } from './utils.js'
import { capability, Schema, ok, fail } from '@ucanto/validator'
import { equalWith } from './utils.js'
import * as Upload from './upload.js'

@@ -49,25 +49,2 @@ export { top } from './top.js'

export const recoverValidation = capability({
can: 'space/recover-validation',
with: SpaceDID,
nb: Schema.struct({
identity: URI.match({ protocol: 'mailto:' }),
}),
})
export const recover = capability({
can: 'space/recover',
with: Schema.did(),
nb: Schema.struct({
identity: URI.match({ protocol: 'mailto:' }),
}),
derives: (child, parent) => {
return (
and(equalWith(child, parent)) ||
and(canDelegateURI(child.nb.identity, parent.nb.identity)) ||
ok({})
)
},
})
export const allocate = capability({

@@ -74,0 +51,0 @@ can: 'space/allocate',

@@ -6,3 +6,3 @@ import type { TupleToUnion } from 'type-fest'

import type { PieceLink } from '@web3-storage/data-segment'
import { space, info, recover, recoverValidation } from './space.js'
import { space, info } from './space.js'
import * as provider from './provider.js'

@@ -12,3 +12,2 @@ import { top } from './top.js'

import * as UploadCaps from './upload.js'
import { claim, redeem } from './voucher.js'
import * as AccessCaps from './access.js'

@@ -91,2 +90,3 @@ import * as CustomerCaps from './customer.js'

did: AccountDID
subscriptions: string[]
}

@@ -120,3 +120,3 @@ export interface CustomerNotFound extends Ucanto.Failure {

customer: AccountDID
consumer: DIDKey
consumer?: DIDKey
}

@@ -161,6 +161,2 @@ export interface SubscriptionNotFound extends Ucanto.Failure {

export type SpaceInfo = InferInvokedCapability<typeof info>
export type SpaceRecoverValidation = InferInvokedCapability<
typeof recoverValidation
>
export type SpaceRecover = InferInvokedCapability<typeof recover>

@@ -213,5 +209,2 @@ // filecoin

// Voucher Protocol
export type VoucherRedeem = InferInvokedCapability<typeof redeem>
export type VoucherClaim = InferInvokedCapability<typeof claim>
// Upload

@@ -248,4 +241,2 @@ export type Upload = InferInvokedCapability<typeof UploadCaps.upload>

SpaceInfo['can'],
SpaceRecover['can'],
SpaceRecoverValidation['can'],
Upload['can'],

@@ -259,4 +250,2 @@ UploadAdd['can'],

StoreList['can'],
VoucherClaim['can'],
VoucherRedeem['can'],
Access['can'],

@@ -263,0 +252,0 @@ AccessAuthorize['can'],

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc