New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@lit-protocol/types

Package Overview
Dependencies
Maintainers
7
Versions
397
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lit-protocol/types - npm Package Compare versions

Comparing version 6.4.1 to 6.4.2-pr-621

4

package.json

@@ -26,8 +26,6 @@ {

},
"version": "6.4.1",
"version": "6.4.2-pr-621",
"dependencies": {
"@ethersproject/abstract-provider": "5.7.0",
"@lit-protocol/accs-schemas": "0.0.9",
"ethers": "^5.7.1",
"jszip": "^3.10.1",
"siwe": "^2.0.5",

@@ -34,0 +32,0 @@ "tslib": "1.14.1"

@@ -39,3 +39,3 @@ import { DecryptRequest, DecryptResponse, EncryptSdkParams, EncryptResponse, ExecuteJsResponse, FormattedMultipleAccs, GetSignedTokenRequest, HandshakeWithNode, JsonExecutionSdkParams, JsonHandshakeResponse, LitNodeClientConfig, MultipleAccessControlConditions, NodeBlsSigningShare, NodeCommandServerKeysResponse, RejectedNodePromises, SendNodeCommand, SuccessNodePromises } from './interfaces';

*/
combineSharesAndGetJWT(signatureShares: NodeBlsSigningShare[]): string;
combineSharesAndGetJWT(signatureShares: NodeBlsSigningShare[]): Promise<string>;
/**

@@ -87,2 +87,3 @@ *

* @param { RejectedNodePromises } res
* @param { string } requestId
*

@@ -92,3 +93,3 @@ * @returns { void }

*/
_throwNodeError(res: RejectedNodePromises, requestId: string): void;
_throwNodeError(res: RejectedNodePromises, requestId: string): never;
/**

@@ -99,2 +100,3 @@ *

* @param { Array<any> } shareData from all node promises
* @param { string } requestId
*

@@ -101,0 +103,0 @@ * @returns { string } signature

import { Provider } from '@ethersproject/abstract-provider';
import * as JSZip from 'jszip/dist/jszip.js';
import { ILitNodeClient } from './ILitNodeClient';

@@ -75,21 +74,2 @@ import { ISessionCapabilityObject, LitResourceAbilityRequest } from './models';

/** ---------- Crypto ---------- */
export interface EncryptedZip {
symmetricKey: SymmetricKey;
encryptedZip: Blob;
}
export interface DecryptZipFileWithMetadata {
decryptedFile: Uint8Array;
metadata: MetadataForFile;
}
export interface MetadataForFile {
name: string | any;
type: string | any;
size: string | number | any;
accessControlConditions: any[] | any;
evmContractConditions: any[] | any;
solRpcConditions: any[] | any;
unifiedAccessControlConditions: any[] | any;
chain: string;
dataToEncryptHash: string;
}
export interface EncryptedFile {

@@ -407,2 +387,8 @@ encryptedFile: Blob;

}
export interface EncryptUint8ArrayRequest extends MultipleAccessControlConditions {
/**
* The uint8array that you wish to encrypt
*/
dataToEncrypt: Uint8Array;
}
export interface EncryptStringRequest extends MultipleAccessControlConditions {

@@ -414,8 +400,2 @@ /**

}
export interface EncryptZipRequest extends MultipleAccessControlConditions {
/**
* The zip that you wish to encrypt
*/
zip: JSZip;
}
export interface EncryptFileRequest extends DecryptRequestBase {

@@ -523,7 +503,7 @@ file: AcceptedFileType;

export interface SuccessNodePromises<T> {
success: boolean;
success: true;
values: T[];
}
export interface RejectedNodePromises {
success: boolean;
success: false;
error: NodeErrorV1;

@@ -674,19 +654,2 @@ }

}
export interface EncryptFileAndZipWithMetadataProps extends MultipleAccessControlConditions {
sessionSigs: SessionSigsMap;
chain: string;
file: File;
litNodeClient: ILitNodeClient;
readme: string;
}
export interface DecryptZipFileWithMetadataProps extends SessionSigsOrAuthSig {
/**
* The zip file blob with metadata inside it and the encrypted asset
*/
file: File | Blob;
/**
* An instance of LitNodeClient that is already connected
*/
litNodeClient: ILitNodeClient;
}
/**

@@ -959,27 +922,4 @@ * Struct in rust

/**
* ========== LitAuthClient ==========
* ========== Lit Auth Client ==========
*/
export interface LitAuthClientOptions {
/**
* Endpoint to interact with a blockchain network. Defaults to the Lit Chronicle.
*/
rpcUrl?: string;
/**
* Options for Lit's relay server
*/
litRelayConfig?: LitRelayConfig;
/**
* Pass in a custom relay server
*/
customRelay?: IRelay;
/**
* Lit Node Client
*/
litNodeClient?: any;
/**
* If enable will turn on logging
*/
debug?: boolean;
litOtpConfig?: OtpProviderOptions;
}
export interface OtpSessionResult {

@@ -1031,2 +971,20 @@ /**

/**
* Mint a new PKP for the given auth method
*
* @throws {Error} - Throws an error if no AuthMethods are given
* @param {AuthMethod[]} authMethods - AuthMethods authentication methods to be added to the pkp
* @param {{ pkpPermissionScopes?: number[][]; sendPkpToitself?: boolean; addPkpEthAddressAsPermittedAddress?: boolean;}} options
*
* @returns {Promise<{pkpTokenId?: string; pkpEthAddress?: string; pkpPublicKey?: string}>} pkp information
*/
mintPKPWithAuthMethods(authMethods: AuthMethod[], options: {
pkpPermissionScopes?: number[][];
sendPkpToitself?: boolean;
addPkpEthAddressAsPermittedAddress?: boolean;
}): Promise<{
pkpTokenId?: string;
pkpEthAddress?: string;
pkpPublicKey?: string;
}>;
/**
* Poll the relay server for status of minting request

@@ -1250,24 +1208,2 @@ *

}
export interface LoginUrlParams {
/**
* Auth method name
*/
provider: string | null;
/**
* Access token
*/
accessToken: string | null;
/**
* ID token
*/
idToken: string | null;
/**
* OAuth state param
*/
state: string | null;
/**
* Error codes from Lit's login server
*/
error: string | null;
}
export interface BaseAuthenticateOptions {

@@ -1274,0 +1210,0 @@ }

import { SiweMessage } from 'siwe';
import { AuthSig } from './interfaces';
import { LitAbility, LitResourcePrefix } from './types';
export declare type PlainJSON = boolean | number | string | {

@@ -12,46 +13,2 @@ [key: string]: PlainJSON;

export declare type CID = string;
/**
* These are the user-facing abilities that can be granted to a session.
*/
export declare enum LitAbility {
/**
* This is the ability to process an encryption access control condition.
* The resource will specify the corresponding hashed key value of the
* access control condition.
*/
AccessControlConditionDecryption = "access-control-condition-decryption",
/**
* This is the ability to process a signing access control condition.
* The resource will specify the corresponding hashed key value of the
* access control condition.
*/
AccessControlConditionSigning = "access-control-condition-signing",
/**
* This is the ability to use a PKP for signing purposes. The resource will specify
* the corresponding PKP token ID.
*/
PKPSigning = "pkp-signing",
/**
* This is the ability to use a Rate Limit Increase (Capacity Credits NFT) token during
* authentication with the nodes. The resource will specify the corresponding
* Capacity Credits NFT token ID.
*/
RateLimitIncreaseAuth = "rate-limit-increase-auth",
/**
* This is the ability to execute a Lit Action. The resource will specify the
* corresponding Lit Action IPFS CID.
*/
LitActionExecution = "lit-action-execution"
}
/**
* Prefixes used for identifying various LIT resources.
*
* @description These resource prefixes are also used as valid IRI schemes.
*/
export declare enum LitResourcePrefix {
AccessControlCondition = "lit-accesscontrolcondition",
PKP = "lit-pkp",
RLI = "lit-ratelimitincrease",
LitAction = "lit-litaction"
}
export interface ISessionCapabilityObject {

@@ -58,0 +15,0 @@ get attenuations(): AttenuationsObject;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.LitResourcePrefix = exports.LitAbility = void 0;
/**
* These are the user-facing abilities that can be granted to a session.
*/
var LitAbility;
(function (LitAbility) {
/**
* This is the ability to process an encryption access control condition.
* The resource will specify the corresponding hashed key value of the
* access control condition.
*/
LitAbility["AccessControlConditionDecryption"] = "access-control-condition-decryption";
/**
* This is the ability to process a signing access control condition.
* The resource will specify the corresponding hashed key value of the
* access control condition.
*/
LitAbility["AccessControlConditionSigning"] = "access-control-condition-signing";
/**
* This is the ability to use a PKP for signing purposes. The resource will specify
* the corresponding PKP token ID.
*/
LitAbility["PKPSigning"] = "pkp-signing";
/**
* This is the ability to use a Rate Limit Increase (Capacity Credits NFT) token during
* authentication with the nodes. The resource will specify the corresponding
* Capacity Credits NFT token ID.
*/
LitAbility["RateLimitIncreaseAuth"] = "rate-limit-increase-auth";
/**
* This is the ability to execute a Lit Action. The resource will specify the
* corresponding Lit Action IPFS CID.
*/
LitAbility["LitActionExecution"] = "lit-action-execution";
})(LitAbility = exports.LitAbility || (exports.LitAbility = {}));
/**
* Prefixes used for identifying various LIT resources.
*
* @description These resource prefixes are also used as valid IRI schemes.
*/
var LitResourcePrefix;
(function (LitResourcePrefix) {
LitResourcePrefix["AccessControlCondition"] = "lit-accesscontrolcondition";
LitResourcePrefix["PKP"] = "lit-pkp";
LitResourcePrefix["RLI"] = "lit-ratelimitincrease";
LitResourcePrefix["LitAction"] = "lit-litaction";
})(LitResourcePrefix = exports.LitResourcePrefix || (exports.LitResourcePrefix = {}));
//# sourceMappingURL=models.js.map
import * as ethers from 'ethers';
import { LPACC_EVM_ATOM, LPACC_EVM_CONTRACT, LPACC_SOL, LPACC_EVM_BASIC } from '@lit-protocol/accs-schemas';
import { AuthMethodType } from './enums';
import { AuthMethod, LitRelayConfig, SignInWithOTPParams, Signature, StytchOtpProviderOptions, WebAuthnProviderOptions, AccsOperatorParams, EthWalletProviderOptions, JsonEncryptionRetrieveRequest, JsonExecutionRequest, JsonSignChainDataRequest, JsonSigningRetrieveRequest, OAuthProviderOptions, BaseAuthenticateOptions } from './interfaces';
import { AuthMethod, LitRelayConfig, Signature, AccsOperatorParams, JsonEncryptionRetrieveRequest, JsonExecutionRequest, JsonSignChainDataRequest, JsonSigningRetrieveRequest, BaseAuthenticateOptions } from './interfaces';
export declare type ConditionType = 'solRpc' | 'evmBasic' | 'evmContract' | 'cosmos';

@@ -61,3 +60,3 @@ export declare type AccsDefaultParams = LPACC_EVM_BASIC;

export declare type LITChain<T> = Record<string, T>;
export declare type LIT_NETWORKS_KEYS = 'cayenne' | 'datil-dev' | 'datil-test' | 'datil' | 'localhost' | 'custom' | 'habanero' | 'manzano';
export declare type LIT_NETWORKS_KEYS = 'cayenne' | 'datil-dev' | 'datil-test' | 'datil' | 'custom' | 'habanero' | 'manzano';
export declare type SymmetricKey = Uint8Array | string | CryptoKey | BufferSource;

@@ -70,3 +69,2 @@ export declare type EncryptedSymmetricKey = string | Uint8Array | any;

export declare type IRelayAuthStatus = 'InProgress' | 'Succeeded' | 'Failed';
export declare type ProviderOptions = OAuthProviderOptions | EthWalletProviderOptions | SignInWithOTPParams | StytchOtpProviderOptions | WebAuthnProviderOptions;
export declare type AuthenticateOptions = BaseAuthenticateOptions;

@@ -96,3 +94,3 @@ /**

*/
export declare type MintCallback<T = ClaimProcessor> = (response: ClaimResult<T>, network: string) => Promise<string>;
export declare type MintCallback<T = ClaimProcessor> = (response: ClaimResult<T>, network: LIT_NETWORKS_KEYS) => Promise<string>;
/**

@@ -117,3 +115,3 @@ * Model for requesting a PKP to be claimed based on an {@link AuthMethod} identifier

derivedKeyId: string;
authMethodType: AuthMethodType;
authMethodType: number;
pubkey: string;

@@ -162,1 +160,3 @@ } & (T extends 'relay' ? LitRelayConfig : {

export declare type ResponseStrategy = 'leastCommon' | 'mostCommon' | 'custom';
export declare type LitResourcePrefix = 'lit-accesscontrolcondition' | 'lit-pkp' | 'lit-ratelimitincrease' | 'lit-litaction';
export declare type LitAbility = 'access-control-condition-decryption' | 'access-control-condition-signing' | 'pkp-signing' | 'rate-limit-increase-auth' | 'lit-action-execution';

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