/** * Return whether the provided stack trace string appears to be generated * by a deployed upload-api. * Heuristics: * - stack trace files paths will start with `file:///var/task/upload-api` because of how the lambda environment is working * * @param {string} stack */ export function isUploadApiStack(stack: string): boolean; /** * @param {Types.Signer} issuer * @param {Types.Signer} service * @param {Types.ConnectionView} conn * @param {`${string}@${string}`} email */ export function createSpace(issuer: Types.Signer, service: Types.Signer, conn: Types.ConnectionView, email: `${string}@${string}`): Promise<{ space: ed25519.EdSigner; delegation: Types.Delegation<[{ can: "*"; with: "ucan:*" | (`did:${string}:${string}` & `did:${string}` & Types.Phantom<{ protocol: "did:"; }>); nb: Partial; }]>; }>; /** * @param {URL} confirmationUrl * @returns {Promise>} */ export function extractConfirmInvocation(confirmationUrl: URL): Promise>; /** * @param {API.ConnectionView} connection * @param {{ url: string|URL }} confirmation */ export function confirmConfirmationUrl(connection: API.ConnectionView, confirmation: { url: string | URL; }): Promise; export { Context }; /** did:key:z6Mkk89bC3JrVqKie71YEcc5M1SMVxuCgNx6zLZ8SYJsxALi */ export const alice: ed25519.EdSigner; /** did:key:z6MkffDZCkCTWreg8868fG1FGFogcJj5X6PY93pPcWDn9bob */ export const bob: ed25519.EdSigner; /** did:key:z6MktafZTREjJkvV5mfJxcLpNBoVPwDLhTuMg9ng7dY4zMAL */ export const mallory: ed25519.EdSigner; /** did:key:z6MkrZ1r5XBFZjBU34qyD8fueMbMRkKw17BZaq2ivKFjnz2z */ export const w3Signer: ed25519.EdSigner; export const w3: Types.Signer<"did:web:test.web3.storage", ed25519.SigAlg>; /** did:key:z6MkuKJgV8DKxiAF5oaUcT8ckg8kZUoBe6yavSLnHn5ZgyAP */ export const gatewaySigner: ed25519.EdSigner; export const gateway: Types.Signer<"did:web:w3s.link", ed25519.SigAlg>; export function createServer>({ id, service, codec }: { service: Service; id?: Types.Signer<`did:web:${string}`, Types.SigAlg> | undefined; codec?: Types.InboundCodec | undefined; }): Types.ServerView; export function connect>({ id, channel, codec }: { id: Types.Principal; channel: Types.Transport.Channel; codec?: Types.OutboundCodec | undefined; }): Types.ConnectionView; export function createChannel>({ id, service, ...etc }: { service: Service; id: Server.API.Signer>; server: Types.Transport.Channel; }): { server: Types.ServerView; client: Types.ConnectionView; }; export function createAuthorization({ account, agent, service }: { account: Types.UCAN.Signer; service: Types.Signer; agent: Types.Signer; }): Promise<(Types.Delegation<[{ with: "ucan:*"; can: "*"; }]> | Types.Invocation<{ can: "ucan/attest"; with: `did:${string}:${string}` & `did:${string}` & Types.Phantom<{ protocol: "did:"; }>; nb: Server.Schema.InferStruct<{ proof: Server.Schema.Schema, any>; }>; }>)[]>; export function provisionProvider({ service, agent, space, account, connection, provider, }: { service: Types.Signer; space: Types.Principal; agent: Types.Signer; account: Types.UCAN.Signer; connection: Types.ConnectionView; provider?: `did:web:${string}` | undefined; }): Promise>, Types.SigAlg>>; export function queue(buffer?: T[]): { put: (message: T) => void; take: () => Promise; }; export function validateAuthorization(): { ok: {}; }; import * as Types from '../../types.js'; import { ed25519 } from '@ucanto/principal'; import * as API from '../types.js'; import * as Context from './context.js'; import * as Server from '@ucanto/server'; //# sourceMappingURL=utils.d.ts.map