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

@magic-sdk/provider

Package Overview
Dependencies
Maintainers
18
Versions
785
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@magic-sdk/provider - npm Package Compare versions

Comparing version 28.18.0 to 28.18.1-canary.841.12038986507.0

2

dist/types/core/sdk-environment.d.ts

@@ -5,3 +5,3 @@ import type localForage from 'localforage';

import type { WithExtensions } from '../modules/base-extension';
declare type ConstructorOf<C> = {
type ConstructorOf<C> = {
new (...args: any[]): C;

@@ -8,0 +8,0 @@ };

@@ -10,3 +10,3 @@ import { EthNetworkConfiguration, SupportedLocale } from '@magic-sdk/types';

import { NFTModule } from '../modules/nft';
export declare type MagicSDKExtensionsOption<TCustomExtName extends string = string> = Extension<string>[] | {
export type MagicSDKExtensionsOption<TCustomExtName extends string = string> = Extension<string>[] | {
[P in TCustomExtName]: Extension<string>;

@@ -13,0 +13,0 @@ };

@@ -6,3 +6,3 @@ import { createJsonRpcRequestPayload, standardizeJsonRpcRequestPayload } from '../core/json-rpc';

import { createPromiEvent, encodeJSON, decodeJSON, storage, isPromiEvent } from '../util';
declare type AnonymousExtension = 'anonymous extension';
type AnonymousExtension = 'anonymous extension';
interface BaseExtension<TName extends string = AnonymousExtension> extends BaseModule {

@@ -88,7 +88,7 @@ /**

*/
declare type HiddenExtensionFields = 'name' | 'init' | 'config' | 'compat';
type HiddenExtensionFields = 'name' | 'init' | 'config' | 'compat';
/**
* Gets the type contained in an array type.
*/
declare type UnwrapArray<T extends any[]> = T extends Array<infer P> ? P : never;
type UnwrapArray<T extends any[]> = T extends Array<infer P> ? P : never;
/**

@@ -98,3 +98,3 @@ * Create a union type of Extension names from an

*/
declare type ExtensionNames<TExt extends Extension<string>[]> = UnwrapArray<TExt> extends Extension<infer R> ? R : never;
type ExtensionNames<TExt extends Extension<string>[]> = UnwrapArray<TExt> extends Extension<infer R> ? R : never;
/**

@@ -104,3 +104,3 @@ * From the literal Extension name type given by `TExtName`,

*/
declare type GetExtensionFromName<TExt extends Extension<string>[], TExtName extends string> = {
type GetExtensionFromName<TExt extends Extension<string>[], TExtName extends string> = {
[P in TExtName]: Extract<UnwrapArray<TExt>, Extension<TExtName>>;

@@ -112,6 +112,6 @@ }[TExtName];

*/
export declare type WithExtensions<SDK extends SDKBase> = {
export type WithExtensions<SDK extends SDKBase> = {
new <TCustomExtName extends string, TExt extends MagicSDKExtensionsOption<TCustomExtName>>(apiKey: string, options?: MagicSDKAdditionalConfiguration<TCustomExtName, TExt>): InstanceWithExtensions<SDK, TExt>;
};
export declare type InstanceWithExtensions<SDK extends SDKBase, TExt extends MagicSDKExtensionsOption> = SDK & {
export type InstanceWithExtensions<SDK extends SDKBase, TExt extends MagicSDKExtensionsOption> = SDK & {
[P in Exclude<TExt extends Extension<string>[] ? ExtensionNames<TExt> : keyof TExt, number | AnonymousExtension>]: TExt extends Extension<string>[] ? Omit<GetExtensionFromName<TExt, P>, HiddenExtensionFields> : TExt extends {

@@ -118,0 +118,0 @@ [P in Exclude<TExt extends Extension<string>[] ? ExtensionNames<TExt> : keyof TExt, number | AnonymousExtension>]: Extension<string>;

import { GetIdTokenConfiguration, MagicUserMetadata, GenerateIdTokenConfiguration, UserInfo, RequestUserInfoScope, RecoverAccountConfiguration, ShowSettingsConfiguration, EnableMFAConfiguration, EnableMFAEventHandlers, DisableMFAConfiguration, DisableMFAEventHandlers, RecoverAccountEventHandlers } from '@magic-sdk/types';
import { BaseModule } from './base-module';
declare type UserLoggedOutCallback = (loggedOut: boolean) => void;
type UserLoggedOutCallback = (loggedOut: boolean) => void;
export declare class UserModule extends BaseModule {

@@ -5,0 +5,0 @@ getIdToken(configuration?: GetIdTokenConfiguration): import("../util").PromiEvent<string, {

import { GasApiResponse, GaslessTransactionRequest, RequestUserInfoScope, UserInfo, WalletInfo, Wallets, ShowUIPromiEvents } from '@magic-sdk/types';
import { BaseModule } from './base-module';
export declare type ConnectWithUiEvents = {
export type ConnectWithUiEvents = {
'id-token-created': (params: {

@@ -11,3 +11,3 @@ idToken: string;

};
declare type ShowUiConfig = {
type ShowUiConfig = {
onramperParams?: {

@@ -14,0 +14,0 @@ [key: string]: string;

import EventEmitter from 'eventemitter3';
export declare type EventsDefinition = {
export type EventsDefinition = {
[K in string | symbol]: (...args: any[]) => void;

@@ -11,5 +11,5 @@ } | void;

}
declare type ChainingMethods = 'on' | 'once' | 'addListener' | 'off' | 'removeListener' | 'removeAllListeners';
declare type NonChainingMethods = 'emit' | 'eventNames' | 'listeners' | 'listenerCount';
declare type ReplaceReturnType<T extends (...a: any) => any, TNewReturn> = (...a: Parameters<T>) => TNewReturn;
type ChainingMethods = 'on' | 'once' | 'addListener' | 'off' | 'removeListener' | 'removeAllListeners';
type NonChainingMethods = 'emit' | 'eventNames' | 'listeners' | 'listenerCount';
type ReplaceReturnType<T extends (...a: any) => any, TNewReturn> = (...a: Parameters<T>) => TNewReturn;
/**

@@ -21,5 +21,5 @@ * Creates a `TypedEmitter` instance and returns helper functions for easily

emitter: TypedEmitter<Events>;
createChainingEmitterMethod: <T1 extends ChainingMethods, T2>(method: T1, source: T2) => ReplaceReturnType<TypedEmitter<void>[T1], T2>;
createBoundEmitterMethod: <T extends NonChainingMethods>(method: T) => TypedEmitter<void>[T];
createChainingEmitterMethod: <T1 extends ChainingMethods, T2>(method: T1, source: T2) => ReplaceReturnType<TypedEmitter[T1], T2>;
createBoundEmitterMethod: <T extends NonChainingMethods>(method: T) => TypedEmitter[T];
};
export {};

@@ -15,7 +15,7 @@ import { UserEventsEmit } from '@magic-sdk/types';

*/
export declare type PromiEvent<TResult, TEvents extends EventsDefinition = void> = ExtendedPromise<TResult> & TypedEmitter<TEvents extends void ? DefaultEvents<TResult> : TEvents & DefaultEvents<TResult>>;
export type PromiEvent<TResult, TEvents extends EventsDefinition = void> = ExtendedPromise<TResult> & TypedEmitter<TEvents extends void ? DefaultEvents<TResult> : TEvents & DefaultEvents<TResult>>;
/**
* Default events attached to every `PromiEvent`.
*/
declare type DefaultEvents<TResult> = {
type DefaultEvents<TResult> = {
done: (result: TResult) => void;

@@ -29,3 +29,3 @@ error: (reason: any) => void;

*/
declare type AsyncPromiseExecutor<TResult> = (resolve: (value: TResult | PromiseLike<TResult>) => void, reject: (reason?: any) => void) => void | Promise<void>;
type AsyncPromiseExecutor<TResult> = (resolve: (value: TResult | PromiseLike<TResult>) => void, reject: (reason?: any) => void) => void | Promise<void>;
/**

@@ -32,0 +32,0 @@ * Returns `true` if the given `value` is a `PromiEvent`.

@@ -21,4 +21,4 @@ export function satisfies(e: any, r: any, t: any): any;

compareBuild(e: any): 1 | 0 | -1 | undefined;
inc(e: any, r: any): SemVer;
inc(e: any, r: any): this;
}
export {};
{
"name": "@magic-sdk/provider",
"version": "28.18.0",
"version": "28.18.1-canary.841.12038986507.0",
"description": "Core business logic for Magic SDK packages.",

@@ -38,3 +38,3 @@ "author": "Magic Labs <team@magic.link> (https://magic.link/)",

"dependencies": {
"@magic-sdk/types": "^24.16.0",
"@magic-sdk/types": "24.16.1-canary.841.12038986507.0",
"eventemitter3": "^4.0.4",

@@ -46,3 +46,3 @@ "web3-core": "1.5.2"

},
"gitHead": "936a5bdf1a85c110d4d5eaa498fb52dc461bd139"
"gitHead": "3ef5d0ade2763c536437d48c0ea44018826cef07"
}

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