Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fortmatic

Package Overview
Dependencies
Maintainers
9
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fortmatic - npm Package Compare versions

Comparing version 1.1.0-7e2fb5f4.1 to 2.0.0-54c5cfd8.0

dist/cjs/constants/config.d.ts

5

.vscode/settings.json
{
"typescript.tsdk": "node_modules/typescript/lib",
"tslint.autoFixOnSave": true,
"eslint.autoFixOnSave": true
"eslint.autoFixOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
}

24

dist/cjs/core/fm-iframe-controller.d.ts

@@ -1,6 +0,8 @@

/** Query parameters encoded with the Fortmatic modal endpoint. */
interface OverlayOptions {
/**
* The shape of encoded query parameters sent along with the `<iframe>` request.
*/
interface QueryParameters {
API_KEY: string;
DOMAIN_ORIGIN: string;
ETH_NETWORK?: string;
DOMAIN_ORIGIN: string;
}

@@ -16,5 +18,12 @@ /**

private payloadTransport;
constructor(endpoint: string, options: OverlayOptions);
constructor(endpoint: string, options: QueryParameters);
/**
* Represents the ready state of the underlying Fortmatic `<iframe>`.
*/
get overlayReady(): boolean;
/**
* The `<iframe>` label inferred from associated endpoint
*/
private get iframeLabel();
/**
* Initialize the Fortmatic `<iframe>` and pre-load overlay content when DOM

@@ -27,9 +36,12 @@ * is ready.

*/
showOverlay(): Promise<void>;
private showOverlay;
/**
* Hide the Fortmatic `<iframe>` overlay.
*/
hideOverlay(): Promise<void>;
private hideOverlay;
/**
* Listen for messages sent from the underlying Fortmatic `<iframe>`.
*/
private listen;
}
export {};

@@ -11,3 +11,3 @@ import { FmIncomingWindowMessage, FmMessageEvent, FmOutgoingWindowMessage, JsonRpcBatchRequestPayload, JsonRpcRequestPayload, JsonRpcResponsePayload } from '../types';

/**
* A class of utilities for communicating with Fortmatic modal via JSON RPC
* A class of utilities for communicating with Fortmatic iframes via JSON RPC
* payloads.

@@ -14,0 +14,0 @@ */

import { ChainId, ChainName, JsonRpcBatchRequestPayload, JsonRpcRequestCallback, JsonRpcRequestPayload, JsonRpcResponsePayload } from '../types';
import { Fortmatic } from './fortmatic';
/**

@@ -7,3 +6,2 @@ * Fortmatic's Web3-compliant provider.

export declare class FmProvider {
private readonly sdk;
private readonly endpoint;

@@ -20,3 +18,3 @@ private readonly apiKey;

isLoggedIn: boolean;
constructor(sdk: Fortmatic, endpoint: string, apiKey: string, chainName?: ChainName | undefined);
constructor(endpoint: string, apiKey: string, chainName?: ChainName | undefined);
/**

@@ -51,7 +49,7 @@ * Enqueue a native Web3 payload for asynchronous processing.

/**
* Enqueue payload to queue
* Enqueue a payload for processing.
*/
private enqueue;
/**
* Dequeue payload from queue and execute
* Dequeue the next payload and execute the request.
*/

@@ -58,0 +56,0 @@ private dequeue;

@@ -1,5 +0,6 @@

import { TransactionsModule } from '../modules/transactions-module';
import { UserModule } from '../modules/user-module';
import { ChainName, FmGlobalConfiguration } from '../types';
import { FmProvider } from './fm-provider';
import { AuthModule } from '../modules/auth';
import { TransactionsModule } from '../modules/ethereum/transactions-module';
import { UserModule } from '../modules/ethereum/user-module';
/**

@@ -11,16 +12,22 @@ * The entry-point to core Fortmatic APIs.

readonly chainName?: ChainName | undefined;
private static __provider__;
readonly endpoint: string;
private __provider__?;
private __authProvider__?;
readonly authEndpoint: string;
readonly xEndpoint: string;
readonly transactions: TransactionsModule;
readonly user: UserModule;
readonly Auth: typeof AuthModule;
constructor(apiKey: string, chainName?: ChainName | undefined);
/**
* Get the underlying Web3-compatible provider.
* Get a Web3-compatible, Ethereum provider.
*/
getProvider(): FmProvider;
/**
* Apply global configuration to customize Fortmatic's functionality across
* APIs.
* Get a Fortmatic Auth provider.
*/
getAuthProvider(): FmProvider;
/**
* Apply configuration to customize Fortmatic's Ethereum functionality.
*/
configure(configurations?: FmGlobalConfiguration): Promise<boolean>;
}

@@ -15,3 +15,6 @@ /**

fm_get_user = "fm_get_user",
fm_configure = "fm_configure"
fm_configure = "fm_configure",
fm_auth_login_with_magic_link = "fm_auth_login_with_magic_link",
fm_auth_get_access_token = "fm_auth_get_access_token",
fm_auth_logout = "fm_auth_logout"
}
export interface JsonRpcRequestPayload {
jsonrpc: string;
method: string;
params: JsonRpcRequestCallback | any[];
params: any[];
id: string | number;

@@ -6,0 +6,0 @@ }

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

import { Fortmatic } from '../core/fortmatic';
import { FmProvider } from '../core/fm-provider';
import { JsonRpcRequestPayload } from '../types';

@@ -7,3 +7,3 @@ /**

*/
export declare function emitWeb3Payload<ResultType = any>(sdk: Fortmatic, method: string, params?: any[]): Promise<ResultType>;
export declare function emitWeb3Payload<ResultType = any>(provider: FmProvider, method: string, params?: any[]): Promise<ResultType>;
/**

@@ -13,2 +13,2 @@ * Emit a custom Formatic payload asynchronously using native JavaScript

*/
export declare function emitFortmaticPayload<ResultType = any>(sdk: Fortmatic, payload: JsonRpcRequestPayload): Promise<ResultType>;
export declare function emitFortmaticPayload<ResultType = any>(provider: FmProvider, payload: JsonRpcRequestPayload): Promise<ResultType>;

@@ -16,3 +16,3 @@ import { ComposeTransactionConfig, JsonRpcBatchRequestPayload, JsonRpcRequestPayload } from '../types';

* Given a potentially partial JSON RPC request payload, this function populates
* missing properties to meet the Web3 spec.
* missing properties to meet the JSON RPC spec.
*

@@ -19,0 +19,0 @@ * **NOTE:** _This function mutates the payload argument!_ Under the hood, Web3

{
"name": "fortmatic",
"version": "1.1.0-7e2fb5f4.1",
"version": "2.0.0-54c5cfd8.0",
"description": "Fortmatic Javascript SDK",

@@ -14,17 +14,14 @@ "author": "Fortmatic <team@fortmatic.com> (https://fortmatic.com/)",

"scripts": {
"dev": "npm-run-all -l -s clean:build dev:*",
"dev:compile": "WEBPACK_ENV=development BABEL_ENV=development webpack --progress --colors --watch",
"build": "npm-run-all -l -s clean:build build:*",
"build:compile": "webpack",
"test": "npm-run-all -s clean:test-artifacts test:*",
"test:run": "cross-env TS_NODE_PROJECT=test/tsconfig.json nyc --reporter=lcov --reporter=text-summary ava",
"start": "npm run clean:build && ./scripts/start.sh",
"build": "npm run clean:build && ./scripts/build.sh",
"test": "npm run clean:test-artifacts && ./scripts/test.sh",
"lint": "tslint --fix .",
"clean": "npm-run-all -s clean:*",
"clean:test-artifacts": "rimraf coverage && rimraf .nyc_output",
"clean:build": "rimraf dist",
"clean_node_modules": "rimraf node_modules",
"lint": "tslint --fix ."
"clean_node_modules": "rimraf node_modules"
},
"dependencies": {},
"devDependencies": {
"@ikscodes/browser-env": "~0.3.1",
"@ikscodes/eslint-config": "~4.0.1",
"@ikscodes/tslint-config": "~5.3.1",

@@ -35,11 +32,6 @@ "@istanbuljs/nyc-config-typescript": "~0.1.3",

"@types/sinon": "~7.5.0",
"@types/webpack": "~4.41.0",
"ava": "2.2.0",
"cross-env": "~6.0.3",
"eslint": "~4.19.1",
"eslint-plugin-import": "~2.18.2",
"eslint-plugin-jsx-a11y": "~6.2.3",
"eslint-plugin-prettier": "~2.7.0",
"eslint-plugin-react": "~7.17.0",
"lodash": "~4.17.15",
"microbundle": "0.12.0-next.6",
"npm-run-all": "~4.1.5",

@@ -55,2 +47,3 @@ "nyc": "13.1.0",

"webpack": "~4.41.2",
"webpack-chain": "~6.2.0",
"webpack-cli": "~3.3.10"

@@ -84,4 +77,3 @@ },

]
},
"dependencies": {}
}
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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