@web3-storage/access
Advanced tools
Comparing version 18.0.7 to 18.1.0
@@ -149,24 +149,3 @@ /** | ||
*/ | ||
createSpace(name: string): Promise<{ | ||
model: Space.Model; | ||
readonly signer: import("@ucanto/principal/ed25519").EdSigner; | ||
readonly name: string; | ||
did(): `did:key:${string}`; | ||
withName(name: string): any; | ||
save({ agent }?: { | ||
agent?: API.Agent<API.Service> | undefined; | ||
}): Promise<Client.Result<Client.Unit, Error>>; | ||
provision({ proofs }: Space.Authorization, { agent }?: { | ||
agent?: API.Agent<API.Service> | undefined; | ||
}): Promise<Client.Result<{}, Client.Failure | Client.HandlerNotFound | Client.HandlerExecutionError | Client.InvalidAudience | Client.Unauthorized>> | { | ||
error: Client.Failure; | ||
ok?: undefined; | ||
}; | ||
createRecovery(account: `did:mailto:${string}`): Promise<Client.Delegation<Client.Capabilities>>; | ||
createAuthorization(agent: Client.Principal<`did:${string}:${string}`>, input?: { | ||
access?: API.Access | undefined; | ||
expiration?: number | undefined; | ||
} | undefined): Promise<Client.Delegation<Client.Capabilities>>; | ||
toMnemonic(): string; | ||
}>; | ||
createSpace(name: string): Promise<Space.OwnedSpace>; | ||
/** | ||
@@ -179,24 +158,3 @@ * @param {string} secret | ||
name: string; | ||
}): Promise<{ | ||
model: Space.Model; | ||
readonly signer: import("@ucanto/principal/ed25519").EdSigner; | ||
readonly name: string; | ||
did(): `did:key:${string}`; | ||
withName(name: string): any; | ||
save({ agent }?: { | ||
agent?: API.Agent<API.Service> | undefined; | ||
}): Promise<Client.Result<Client.Unit, Error>>; | ||
provision({ proofs }: Space.Authorization, { agent }?: { | ||
agent?: API.Agent<API.Service> | undefined; | ||
}): Promise<Client.Result<{}, Client.Failure | Client.HandlerNotFound | Client.HandlerExecutionError | Client.InvalidAudience | Client.Unauthorized>> | { | ||
error: Client.Failure; | ||
ok?: undefined; | ||
}; | ||
createRecovery(account: `did:mailto:${string}`): Promise<Client.Delegation<Client.Capabilities>>; | ||
createAuthorization(agent: Client.Principal<`did:${string}:${string}`>, input?: { | ||
access?: API.Access | undefined; | ||
expiration?: number | undefined; | ||
} | undefined): Promise<Client.Delegation<Client.Capabilities>>; | ||
toMnemonic(): string; | ||
}>; | ||
}): Promise<Space.OwnedSpace>; | ||
/** | ||
@@ -211,19 +169,3 @@ * Import a space from a delegation. | ||
name?: string | undefined; | ||
}): Promise<{ | ||
model: { | ||
id: `did:key:${string}`; | ||
delegation: Client.Delegation<Client.Capabilities>; | ||
meta: { | ||
name?: string | undefined; | ||
}; | ||
agent?: API.Agent<API.Service> | undefined; | ||
}; | ||
readonly delegation: Client.Delegation<Client.Capabilities>; | ||
readonly meta: { | ||
name?: string | undefined; | ||
}; | ||
readonly name: string; | ||
did(): `did:key:${string}`; | ||
withName(name: string): any; | ||
}>; | ||
}): Promise<Space.SharedSpace>; | ||
/** | ||
@@ -230,0 +172,0 @@ * Sets the current selected space |
export function generate({ name, agent }: { | ||
name: string; | ||
agent?: API.Agent<API.Service> | undefined; | ||
}): Promise<OwnedSpace>; | ||
}): Promise<API.OwnedSpace>; | ||
export function fromMnemonic(mnemonic: string, { name, agent }: { | ||
name: string; | ||
agent?: API.Agent<API.Service> | undefined; | ||
}): Promise<OwnedSpace>; | ||
}): Promise<API.OwnedSpace>; | ||
export function toMnemonic({ signer }: { | ||
@@ -19,27 +19,7 @@ signer: ED25519.EdSigner; | ||
}): Promise<ED25519.Delegation<ED25519.Signer.Capabilities>>; | ||
export function fromDelegation(delegation: API.Delegation): SharedSpace; | ||
export function provision(space: Space, { proofs, agent }: { | ||
proofs: API.Delegation[]; | ||
agent: API.Agent; | ||
}): Promise<ED25519.Result<{}, ED25519.Failure | ED25519.HandlerNotFound | ED25519.HandlerExecutionError | ED25519.InvalidAudience | ED25519.Unauthorized>>; | ||
/** | ||
* Data model for the (owned) space. | ||
*/ | ||
export type Model = { | ||
signer: ED25519.EdSigner; | ||
name: string; | ||
agent?: API.Agent<API.Service> | undefined; | ||
}; | ||
export type Authorization = { | ||
proofs: API.Delegation[]; | ||
}; | ||
export type Space = { | ||
did: () => API.SpaceDID; | ||
}; | ||
import * as API from './types.js'; | ||
/** | ||
* Represents an owned space, meaning a space for which we have a private key | ||
* and consequently have full authority over. | ||
*/ | ||
declare class OwnedSpace { | ||
export class OwnedSpace { | ||
/** | ||
@@ -58,3 +38,3 @@ * @param {Model} model | ||
*/ | ||
withName(name: string): OwnedSpace; | ||
withName(name: string): API.OwnedSpace; | ||
/** | ||
@@ -110,3 +90,7 @@ * Saves account in the agent store so it can be accessed across sessions. | ||
} | ||
import * as ED25519 from '@ucanto/principal/ed25519'; | ||
export function fromDelegation(delegation: API.Delegation): API.SharedSpace; | ||
export function provision(space: Space, { proofs, agent }: { | ||
proofs: API.Delegation[]; | ||
agent: API.Agent; | ||
}): Promise<ED25519.Result<{}, ED25519.Failure | ED25519.HandlerNotFound | ED25519.HandlerExecutionError | ED25519.InvalidAudience | ED25519.Unauthorized>>; | ||
/** | ||
@@ -116,3 +100,3 @@ * Represents a shared space, meaning a space for which we have a delegation | ||
*/ | ||
declare class SharedSpace { | ||
export class SharedSpace { | ||
/** | ||
@@ -152,5 +136,20 @@ * @typedef {object} SharedSpaceModel | ||
*/ | ||
withName(name: string): SharedSpace; | ||
withName(name: string): API.SharedSpace; | ||
} | ||
export {}; | ||
/** | ||
* Data model for the (owned) space. | ||
*/ | ||
export type Model = { | ||
signer: ED25519.EdSigner; | ||
name: string; | ||
agent?: API.Agent<API.Service> | undefined; | ||
}; | ||
export type Authorization = { | ||
proofs: API.Delegation[]; | ||
}; | ||
export type Space = { | ||
did: () => API.SpaceDID; | ||
}; | ||
import * as API from './types.js'; | ||
import * as ED25519 from '@ucanto/principal/ed25519'; | ||
//# sourceMappingURL=space.d.ts.map |
@@ -113,3 +113,3 @@ import * as ED25519 from '@ucanto/principal/ed25519'; | ||
*/ | ||
class OwnedSpace { | ||
export class OwnedSpace { | ||
/** | ||
@@ -243,3 +243,3 @@ * @param {Model} model | ||
*/ | ||
class SharedSpace { | ||
export class SharedSpace { | ||
/** | ||
@@ -246,0 +246,0 @@ * @typedef {object} SharedSpaceModel |
@@ -12,2 +12,3 @@ import type { Capabilities, ConnectionView, Fact, Failure, Phantom, Principal, RequestEncoder, Resource, ResponseDecoder, ServiceMethod, InferInvokedCapability, CapabilityParser, Match, Ability, UnknownMatch, Delegation, DID, Signer, SignerArchive, SigAlg, Caveats, Unit } from '@ucanto/interface'; | ||
export type { Agent } from './agent.js'; | ||
export type { OwnedSpace, SharedSpace } from './space.js'; | ||
export interface SpaceInfoResult { | ||
@@ -14,0 +15,0 @@ did: DID<'key'>; |
{ | ||
"name": "@web3-storage/access", | ||
"version": "18.0.7", | ||
"version": "18.1.0", | ||
"description": "w3access client", | ||
@@ -15,3 +15,3 @@ "homepage": "https://web3.storage", | ||
"types": "dist/src/index.d.ts", | ||
"main": "src/index.js", | ||
"main": "dist/src/index.js", | ||
"exports": { | ||
@@ -18,0 +18,0 @@ ".": { |
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
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
229544
98
3989