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

@manifoldxyz/frontend-provider-types

Package Overview
Dependencies
Maintainers
20
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@manifoldxyz/frontend-provider-types - npm Package Compare versions

Comparing version 1.0.1-beta.1 to 1.1.0

17

dist/ethereumProvider.d.ts
import { Contract, ContractFactory } from '@ethersproject/contracts';
import { ExternalProvider, JsonRpcProvider, Web3Provider } from '@ethersproject/providers';
import { EthereumNetwork } from './network';
import { OAuthOptions } from './oAuth';
import { IOAuthSignatureHandler, OAuthOptions } from './oAuth';
/**

@@ -213,2 +213,17 @@ * @dev InitializeOptions are the options that can be passed to initialize

static getOAuth(options: OAuthOptions): Promise<string | null>;
/**
* Retrieve and validate an existing oauth token for the current user. If there is
* no oauth token, the user will not be prompted to authenticate. Useful for checking if a user
* is currently authenticated or not. This is the same as calling `getOAuth` with `delayAuth` set to true.
*/
static getOAuthReadOnly(strictAuth?: boolean): Promise<string | null>;
/**
* Get an OAuthSignatureHandler instance, particular for modular authentication
* e.g. an integration with Rainbowkit
*
* @returns the oauth token for the current user
* @throws 'Custom `message` can only be used with the `signature` grant type'
* @throws `Invalid grant type` if grant type is not `signature` or `token`
*/
static OAuthSignatureHandler: new (options: Omit<OAuthOptions, 'grantType'>) => IOAuthSignatureHandler;
}

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

import { JsonRpcProvider } from '@ethersproject/providers';
/**

@@ -27,3 +28,9 @@ * Refer to our documentation at https://docs.manifold.xyz/v/manifold-for-developers/resources/apps/grant-types#signature-grant to learn more about Grant Type

delayAuth?: boolean;
userCallback?: (message: string) => Promise<void>;
userCallback?: (message: string) => Promise<string>;
}
export interface IOAuthSignatureHandler {
getOneTimeUseCode(): Promise<string>;
formatMessage(oneTimeUseCode: string): string;
getAccessToken(oneTimeUseCode: string, message: string, signature: string, chainId: number): Promise<string>;
signMessage(message: string, provider: JsonRpcProvider): Promise<string>;
}

2

package.json
{
"name": "@manifoldxyz/frontend-provider-types",
"version": "1.0.1-beta.1",
"version": "1.1.0",
"description": "",

@@ -5,0 +5,0 @@ "typings": "./dist/index.d.ts",

import { Contract, ContractFactory } from '@ethersproject/contracts';
import { ExternalProvider, JsonRpcProvider, Web3Provider } from '@ethersproject/providers';
import { EthereumNetwork } from './network';
import { OAuthOptions } from './oAuth';
import { IOAuthSignatureHandler, OAuthOptions } from './oAuth';

@@ -242,2 +242,21 @@ /**

public static getOAuth(options: OAuthOptions): Promise<string | null>;
/**
* Retrieve and validate an existing oauth token for the current user. If there is
* no oauth token, the user will not be prompted to authenticate. Useful for checking if a user
* is currently authenticated or not. This is the same as calling `getOAuth` with `delayAuth` set to true.
*/
public static getOAuthReadOnly(strictAuth?: boolean): Promise<string | null>;
/**
* Get an OAuthSignatureHandler instance, particular for modular authentication
* e.g. an integration with Rainbowkit
*
* @returns the oauth token for the current user
* @throws 'Custom `message` can only be used with the `signature` grant type'
* @throws `Invalid grant type` if grant type is not `signature` or `token`
*/
public static OAuthSignatureHandler: new (
options: Omit<OAuthOptions, 'grantType'>
) => IOAuthSignatureHandler;
}

@@ -0,1 +1,3 @@

import { JsonRpcProvider } from '@ethersproject/providers';
/**

@@ -28,3 +30,15 @@ * Refer to our documentation at https://docs.manifold.xyz/v/manifold-for-developers/resources/apps/grant-types#signature-grant to learn more about Grant Type

delayAuth?: boolean;
userCallback?: (message: string) => Promise<void>;
userCallback?: (message: string) => Promise<string>;
}
export interface IOAuthSignatureHandler {
getOneTimeUseCode(): Promise<string>;
formatMessage(oneTimeUseCode: string): string;
getAccessToken(
oneTimeUseCode: string,
message: string,
signature: string,
chainId: number
): Promise<string>;
signMessage(message: string, provider: JsonRpcProvider): Promise<string>;
}
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