npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

fsl-authorization

v1.1.1-beta.61

Published

## What id FSL ID

Readme

FSL-ACCOUNT-SDK

What is FSL ID

Getting started

  • npm | yarn | pnpm install
import { FSLAuthorization } from 'fsl-authorization';

const fslAuthorization = FSLAuthorization.init({
  /** 'code' | 'token' */
  responseType: 'code',

  /** appKey */
  appKey: 'Your APP KEY',

  /** https://xxx.xxx.com */
  redirectUri: 'Your Redirect URL',

  /** 'basic' | 'wallet' */
  scope: 'basic',

  /** Used to verify specific fields transmitted by the current third-party web page */
  state: 'xyz',

  /** External web page pop-up mode */
  usePopup: false,

  /** For internal scenarios of mini-programs or native apps, redirectUri needs to be filled in */
  isApp: true,

  /** In modal box mode, the parameters usePopup and isApp will be ignored */
  useModal: true,

  /**  During the testing phase, for domain names that require specified ids, do not add '/' at the end. */
  domain: 'https://id.fsl.com',

  /** If the user has already been determined, the uid needs to be passed in */
  uid: 1770,
});

fSLAuthorization.signInV2().then(({ code, state }) => {
  if (code) {
    // todo your code
  }
});

callEvmSign

import { FSLAuthorization } from 'fsl-authorization';

// your Three-party login initialization
// ...

fSLAuthorization
  .callEvmSign({
    chainId: 80002,
    msg: 'Your Sign Message',
    chain: 'Amony', // Specify the test chain name
    uid: 1770,
  })
  .then((res) => {
    console.log('signedTx', res);
    const address = FSLAuthorization.evmVerifyMessage('Your Sign Message', res);
    // Check whether the resolved address is the same as the user address
  });

Types

interface IEvmSign {
  msg: string;
  rpc?: string;
  chainId: number;
  uid?: number;
}

callEvmContract

import { FSLAuthorization } from 'fsl-authorization';
import { ethers } from 'ethers';

// your Three-party login initialization
// ...

fSLAuthorization
  .callEvmContract({
    contractAddress: '0xc2132D05D31c914a87C6611C10748AEb04B58e8F',
    methodName: 'transfer',
    params: ['0x...', ethers.BigNumber.from(Math.floor(10 * Math.pow(10, 6)))],
    abi: [
      {
        constant: false,
        inputs: [
          { name: '_to', type: 'address' },
          { name: '_value', type: 'uint256' },
        ],
        name: 'transfer',
        outputs: [{ name: '', type: 'bool' }],
        payable: false,
        stateMutability: 'nonpayable',
        type: 'function',
      },
    ],
    gasLimit: '100000',
    to: '0x...',
    chainId: 137,
    uid: 1770,
  })
  .then((res) => {
    console.log('TransactionReceipt', res);
  });

Types

interface IEvmContract {
  contractAddress: string;
  methodName: string;
  chainId: number;
  gasLimit: string;

  abi?: any; // If the abi is not recognized, you can pass it in manually
  value?: string;
  params?: any[];
  to?: string;
  rpc?: string;
  nonce?: number;

  maxPriorityFeePerGasValue?: ethers.BigNumber;
  maxFeePerGasValue?: ethers.BigNumber;
  uid?: number;
}

signTypedData

import { FSLAuthorization } from 'fsl-authorization';
import { ethers } from 'ethers';

// your Three-party login initialization
// ...

const domain = {
  name: 'ERC20Token',
  version: '1',
  chainId: 137,
  verifyingContract: '0x',
};

let spender = '0x';
let number = '100';

const types = {
  Storage: [
    { name: 'spender', type: 'address' },
    { name: 'number', type: 'uint256' },
  ],
};

const message = {
  spender,
  number,
};

fSLAuthorization
  .signTypedData({
    domain,
    types,
    message,
    chainId,
    uid: 1770,
  })
  .then((res) => {
    console.log('signedTx', res);
    const address = FSLAuthorization.evmVerifyTypedData(
      domain,
      types,
      message,
      res,
    );
    // Check whether the resolved address is the same as the user address
  });

Types

interface IDomain {
  name: string;
  version: string;
  chainId: number;
  verifyingContract: string;
  uid?: number;
}

interface ITypes {
  [key: string]: Record<'name' | 'type', string>[];
}

interface IMessage {
  [key: string]: any;
}

callEvmContractByCallData

const args = {
  contractAddress: '0x',
  chainId: 137,
  gasLimit: 40000,
  callData:
    '0xa9059cbb00000000000000000000000091837ab8b09257975b3cb737d8d580aaba27b14b0000000000000000000000000000000000000000000000000000000005f5e100',
  uid: 1770,
};
fSLAuthorization.callEvmContractByCallData(args).then((res) => {
  console.log('TransactionReceipt', res);
});

Types

interface IEvmCallDataParams {
  contractAddress: string;
  callData: string;
  chainId: number;
  gasLimit: string;
  rpc?: string;
  maxPriorityFeePerGasValue?: BigNumber;
  maxFeePerGasValue?: BigNumber;
  uid?: number;
}

signTransaction

import { FSLAuthorization } from 'fsl-authorization';
import { ethers } from 'ethers';

// your Three-party login initialization
// ...

fSLAuthorization
  .signTransaction({
    contractAddress: '0xc2132D05D31c914a87C6611C10748AEb04B58e8F',
    methodName: 'transfer',
    params: ['0x...', ethers.BigNumber.from(Math.floor(10 * Math.pow(10, 6)))],
    abi: [
      {
        constant: false,
        inputs: [
          { name: '_to', type: 'address' },
          { name: '_value', type: 'uint256' },
        ],
        name: 'transfer',
        outputs: [{ name: '', type: 'bool' }],
        payable: false,
        stateMutability: 'nonpayable',
        type: 'function',
      },
    ],
    gasLimit: '100000',
    to: '0x...',
    chainId: 137,
    uid: 1770,
  })
  .then((signedTx) => {
    console.log('signedTx', signedTx);
  });

signSolMessage

fSLAuthorization.signSolMessage({ msg, uid: 1770 }).then((res) => {
  console.log('signMessage', res);
});

callSolInstructions && signSolInstructions

const transferInstruction = createTransferInstruction();
fSLAuthorization
  .callSolInstructions({
    instructions: [transferInstruction],
    keypairs: [],
    uid: 1770,
  })
  .then((res) => {
    console.log('hash', res);
  });

fSLAuthorization
  .signSolInstructions({
    instructions: [transferInstruction],
    keypairs: [],
    uid: 1770,
  })
  .then((res) => {
    console.log('signMessage', res);
  });

signSolTransaction

const transactions = [new Transaction()];
signSolTransaction({ transactions, uid: 1770 }).then((res) => {
  console.log('signArrayTransactions', res);
});

Join as Developers

  • Please prepare the necessary stuff and talk to an FSL guy for your interest. Here are some step guides
  1. Register an FSL ID at https://id.fsl.com, and setup all necessary information. This will be your developer ID. Please make sure your 2FA and seed phrase backup is well and safely kept.

  2. Tell us about your App/product in a sheet

    1. Name
    2. Icon images in 128128px and 512512px
    3. App/product description
    4. Official website
    5. Social network links
  3. Go through the API references and provide your CALLBACK URL and host.