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 11.2.0 to 11.3.0

2

dist/src/filecoin/index.d.ts

@@ -1,2 +0,2 @@

export { filecoinOffer as offer, filecoinSubmit as submit, filecoinAccept as accept } from "./storefront.js";
export { filecoinOffer as offer, filecoinSubmit as submit, filecoinAccept as accept, filecoinInfo as info } from "./storefront.js";
//# sourceMappingURL=index.d.ts.map

@@ -31,3 +31,12 @@ /**

}>>>;
/**
* Capability allowing an agent to _request_ info about a content piece in
* Filecoin deals.
*/
export const filecoinInfo: import("@ucanto/interface").TheCapabilityParser<import("@ucanto/interface").CapabilityMatch<"filecoin/info", `did:${string}:${string}` & `did:${string}` & import("@ucanto/interface").Phantom<{
protocol: "did:";
}>, Schema.InferStruct<{
piece: import("../types.js").PieceLinkSchema;
}>>>;
import { Schema } from '@ucanto/validator';
//# sourceMappingURL=storefront.d.ts.map

@@ -236,2 +236,10 @@ import type { TupleToUnion } from 'type-fest';

}
export interface FilecoinInfoSuccess {
piece: PieceLink;
deals: FilecoinInfoAcceptedDeal[];
}
export interface FilecoinInfoAcceptedDeal extends DataAggregationProof, DealDetails {
aggregate: PieceLink;
}
export type FilecoinInfoFailure = ContentNotFound | InvalidContentPiece | Ucanto.Failure;
export interface PieceOfferSuccess {

@@ -419,2 +427,3 @@ /**

export type FilecoinAccept = InferInvokedCapability<typeof StorefrontCaps.filecoinAccept>;
export type FilecoinInfo = InferInvokedCapability<typeof StorefrontCaps.filecoinInfo>;
export type PieceOffer = InferInvokedCapability<typeof AggregatorCaps.pieceOffer>;

@@ -464,2 +473,3 @@ export type PieceAccept = InferInvokedCapability<typeof AggregatorCaps.pieceAccept>;

FilecoinAccept['can'],
FilecoinInfo['can'],
PieceOffer['can'],

@@ -466,0 +476,0 @@ PieceAccept['can'],

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

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

@@ -19,2 +19,3 @@ /**

filecoinAccept as accept,
filecoinInfo as info,
} from './storefront.js'

@@ -109,1 +109,28 @@ /**

})
/**
* Capability allowing an agent to _request_ info about a content piece in
* Filecoin deals.
*/
export const filecoinInfo = capability({
can: 'filecoin/info',
/**
* DID of the space the content is stored in.
*/
with: Schema.did(),
nb: Schema.struct({
/**
* CID of the piece.
*
* @see https://github.com/filecoin-project/FIPs/pull/758/files
*/
piece: PieceLink,
}),
derives: (claim, from) => {
return (
and(equalWith(claim, from)) ||
and(checkLink(claim.nb.piece, from.nb.piece, 'nb.piece')) ||
ok({})
)
},
})

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

Storefront.filecoinAccept.can,
Storefront.filecoinInfo.can,
Aggregator.pieceOffer.can,

@@ -78,0 +79,0 @@ Aggregator.pieceAccept.can,

@@ -308,2 +308,17 @@ import type { TupleToUnion } from 'type-fest'

export interface FilecoinInfoSuccess {
piece: PieceLink
deals: FilecoinInfoAcceptedDeal[]
}
export interface FilecoinInfoAcceptedDeal
extends DataAggregationProof,
DealDetails {
aggregate: PieceLink
}
export type FilecoinInfoFailure =
| ContentNotFound
| InvalidContentPiece
| Ucanto.Failure
// filecoin aggregator

@@ -553,2 +568,5 @@ export interface PieceOfferSuccess {

>
export type FilecoinInfo = InferInvokedCapability<
typeof StorefrontCaps.filecoinInfo
>
export type PieceOffer = InferInvokedCapability<

@@ -615,2 +633,3 @@ typeof AggregatorCaps.pieceOffer

FilecoinAccept['can'],
FilecoinInfo['can'],
PieceOffer['can'],

@@ -617,0 +636,0 @@ PieceAccept['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