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 7.0.0 to 8.0.0

dist/src/filecoin.d.ts

5

dist/src/index.d.ts

@@ -14,5 +14,4 @@ /** @type {import('./types.js').AbilitiesArray} */

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

59

dist/src/types.d.ts
import type { TupleToUnion } from 'type-fest';
import * as Ucanto from '@ucanto/interface';
import type { Schema } from '@ucanto/core';
import { InferInvokedCapability, Unit, DID } from '@ucanto/interface';
import type { PieceLink } from '@web3-storage/data-segment';
import { space, info, recover, recoverValidation } from './space.js';

@@ -11,4 +13,3 @@ import * as provider from './provider.js';

import * as AccessCaps from './access.js';
import * as AggregateCaps from './aggregate.js';
import * as OfferCaps from './offer.js';
import * as FilecoinCaps from './filecoin.js';
export type { Unit };

@@ -22,2 +23,3 @@ /**

}
export type PieceLinkSchema = Schema.Schema<PieceLink>;
export type Access = InferInvokedCapability<typeof AccessCaps.access>;

@@ -59,20 +61,35 @@ export type AccessAuthorize = InferInvokedCapability<typeof AccessCaps.authorize>;

export type SpaceRecover = InferInvokedCapability<typeof recover>;
export interface AggregateGetSuccess {
deals: unknown[];
export type FILECOIN_PROCESSING_STATUS = 'pending' | 'done';
export interface FilecoinAddSuccess {
piece: PieceLink;
}
export interface AggregateGetFailure extends Ucanto.Failure {
name: 'AggregateNotFound';
export interface FilecoinAddFailure extends Ucanto.Failure {
name: string;
}
export interface AggregateOfferSuccess {
status: string;
export interface AggregateAddSuccess {
piece: PieceLink;
aggregate?: PieceLink;
}
export interface AggregateOfferFailure extends Ucanto.Failure {
name: 'AggregateOfferInvalidSize' | 'AggregateOfferBlockNotFound' | 'AggregateOfferInvalidUrl';
export interface AggregateAddFailure extends Ucanto.Failure {
name: string;
}
export interface OfferArrangeSuccess {
status: string;
export interface DealAddSuccess {
aggregate?: PieceLink;
}
export interface OfferArrangeFailure extends Ucanto.Failure {
name: 'OfferArrangeNotFound';
export type DealAddFailure = DealAddParseFailure | DealAddFailureWithBadPiece;
export interface DealAddParseFailure extends Ucanto.Failure {
name: string;
}
export interface DealAddFailureWithBadPiece extends Ucanto.Failure {
piece?: PieceLink;
cause?: DealAddFailureCause[] | unknown;
}
export interface DealAddFailureCause {
piece: PieceLink;
reason: string;
}
export interface ChainTrackerInfoSuccess {
}
export interface ChainTrackerInfoFailure extends Ucanto.Failure {
}
export type VoucherRedeem = InferInvokedCapability<typeof redeem>;

@@ -88,5 +105,6 @@ export type VoucherClaim = InferInvokedCapability<typeof claim>;

export type StoreList = InferInvokedCapability<typeof list>;
export type AggregateOffer = InferInvokedCapability<typeof AggregateCaps.offer>;
export type AggregateGet = InferInvokedCapability<typeof AggregateCaps.get>;
export type OfferArrange = InferInvokedCapability<typeof OfferCaps.arrange>;
export type FilecoinAdd = InferInvokedCapability<typeof FilecoinCaps.filecoinAdd>;
export type AggregateAdd = InferInvokedCapability<typeof FilecoinCaps.aggregateAdd>;
export type DealAdd = InferInvokedCapability<typeof FilecoinCaps.dealAdd>;
export type ChainTrackerInfo = InferInvokedCapability<typeof FilecoinCaps.chainTrackerInfo>;
export type Top = InferInvokedCapability<typeof top>;

@@ -114,6 +132,7 @@ export type Abilities = TupleToUnion<AbilitiesArray>;

AccessSession['can'],
AggregateOffer['can'],
AggregateGet['can'],
OfferArrange['can']
FilecoinAdd['can'],
AggregateAdd['can'],
DealAdd['can'],
ChainTrackerInfo['can']
];
//# sourceMappingURL=types.d.ts.map
{
"name": "@web3-storage/capabilities",
"version": "7.0.0",
"version": "8.0.0",
"description": "Capabilities provided by web3.storage",

@@ -52,3 +52,4 @@ "homepage": "https://github.com/web3-storage/w3protocol/tree/main/packages/capabilities",

"@ucanto/transport": "^8.0.0",
"@ucanto/validator": "^8.0.0"
"@ucanto/validator": "^8.0.0",
"@web3-storage/data-segment": "^2.2.0"
},

@@ -55,0 +56,0 @@ "devDependencies": {

@@ -12,4 +12,3 @@ import * as Provider from './provider.js'

import * as Console from './console.js'
import * as Offer from './offer.js'
import * as Aggregate from './aggregate.js'
import * as Filecoin from './filecoin.js'

@@ -28,4 +27,3 @@ export {

Utils,
Aggregate,
Offer,
Filecoin,
}

@@ -54,5 +52,6 @@

Access.session.can,
Aggregate.offer.can,
Aggregate.get.can,
Offer.arrange.can,
Filecoin.filecoinAdd.can,
Filecoin.aggregateAdd.can,
Filecoin.dealAdd.can,
Filecoin.chainTrackerInfo.can,
]
import type { TupleToUnion } from 'type-fest'
import * as Ucanto from '@ucanto/interface'
import type { Schema } from '@ucanto/core'
import { InferInvokedCapability, Unit, DID } from '@ucanto/interface'
import type { PieceLink } from '@web3-storage/data-segment'
import { space, info, recover, recoverValidation } from './space.js'

@@ -11,4 +13,3 @@ import * as provider from './provider.js'

import * as AccessCaps from './access.js'
import * as AggregateCaps from './aggregate.js'
import * as OfferCaps from './offer.js'
import * as FilecoinCaps from './filecoin.js'

@@ -24,2 +25,4 @@ export type { Unit }

export type PieceLinkSchema = Schema.Schema<PieceLink>
// Access

@@ -77,27 +80,48 @@ export type Access = InferInvokedCapability<typeof AccessCaps.access>

// Aggregate
export interface AggregateGetSuccess {
deals: unknown[]
// filecoin
export type FILECOIN_PROCESSING_STATUS = 'pending' | 'done'
export interface FilecoinAddSuccess {
piece: PieceLink
}
export interface AggregateGetFailure extends Ucanto.Failure {
name: 'AggregateNotFound'
export interface FilecoinAddFailure extends Ucanto.Failure {
name: string
}
export interface AggregateOfferSuccess {
status: string
export interface AggregateAddSuccess {
piece: PieceLink
aggregate?: PieceLink
}
export interface AggregateOfferFailure extends Ucanto.Failure {
name:
| 'AggregateOfferInvalidSize'
| 'AggregateOfferBlockNotFound'
| 'AggregateOfferInvalidUrl'
export interface AggregateAddFailure extends Ucanto.Failure {
name: string
}
export interface OfferArrangeSuccess {
status: string
export interface DealAddSuccess {
aggregate?: PieceLink
}
export interface OfferArrangeFailure extends Ucanto.Failure {
name: 'OfferArrangeNotFound'
export type DealAddFailure = DealAddParseFailure | DealAddFailureWithBadPiece
export interface DealAddParseFailure extends Ucanto.Failure {
name: string
}
export interface DealAddFailureWithBadPiece extends Ucanto.Failure {
piece?: PieceLink
cause?: DealAddFailureCause[] | unknown
}
export interface DealAddFailureCause {
piece: PieceLink
reason: string
}
// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface ChainTrackerInfoSuccess {
// TODO
}
export interface ChainTrackerInfoFailure extends Ucanto.Failure {
// TODO
}
// Voucher Protocol

@@ -116,8 +140,13 @@ export type VoucherRedeem = InferInvokedCapability<typeof redeem>

export type StoreList = InferInvokedCapability<typeof list>
// Aggregate
export type AggregateOffer = InferInvokedCapability<typeof AggregateCaps.offer>
export type AggregateGet = InferInvokedCapability<typeof AggregateCaps.get>
// Offer
export type OfferArrange = InferInvokedCapability<typeof OfferCaps.arrange>
// Filecoin
export type FilecoinAdd = InferInvokedCapability<
typeof FilecoinCaps.filecoinAdd
>
export type AggregateAdd = InferInvokedCapability<
typeof FilecoinCaps.aggregateAdd
>
export type DealAdd = InferInvokedCapability<typeof FilecoinCaps.dealAdd>
export type ChainTrackerInfo = InferInvokedCapability<
typeof FilecoinCaps.chainTrackerInfo
>
// Top

@@ -148,5 +177,6 @@ export type Top = InferInvokedCapability<typeof top>

AccessSession['can'],
AggregateOffer['can'],
AggregateGet['can'],
OfferArrange['can']
FilecoinAdd['can'],
AggregateAdd['can'],
DealAdd['can'],
ChainTrackerInfo['can']
]

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