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

@wharfkit/msigs

v0.3.1

Published

API Client to access Roborovski msigs API endpoints

Readme

@wharfkit/msigs

API client for the Roborovski Multisig Proposals API.

Installing

yarn add @wharfkit/msigs

Usage

import {APIClient} from '@wharfkit/antelope'
import {MsigsClient} from '@wharfkit/msigs'

// Create an API client pointing to your msigs service
const client = new APIClient({url: 'https://your-msigs-service.com'})

// Create a Msigs client
const msigs = new MsigsClient(client)

// Get service status (Optional)
const status = await msigs.get_status()
console.log('Service limits:', {
    max_proposal_results: status.max_proposal_results, // 20
    max_approval_results: status.max_approval_results, // 100
})

// Get a specific proposal
const proposal = await msigs.get_proposal('alice', 'upgrade')
console.log('Proposal:', {
    proposer: proposal.proposer, // 'alice'
    proposal_name: proposal.proposal_name, // 'upgrade'
    status: proposal.status, // 'proposed'
    actions_count: proposal.actions_count, // 1
})

// Get proposals requiring my approval
const myProposals = await msigs.get_approver_proposals('bob', {
    status: 'proposed',
    include_approved: false, // Only show proposals I haven't approved yet
})
console.log(`${myProposals.total} proposals need my approval`)

// Get account activity
const activity = await msigs.get_activity('alice', {
    action_type: 'proposed',
    limit: 20,
})
console.log(`Alice has proposed ${activity.total} transactions`)

Pagination

All list endpoints (get_proposals, get_activity, get_approver_proposals, get_proposal_history) support pagination with standard response fields:

  • total: Total number of results available
  • more: Boolean indicating if more pages exist
  • offset: Current offset parameter for navigation

Basic Pagination Example

import {MsigsClient, getPaginationInfo} from '@wharfkit/msigs'

// Get first page
let offset = 0
const limit = 10
const firstPage = await msigs.get_proposals('alice', {limit, offset})

console.log(`Total proposals: ${firstPage.total}`)
console.log(`More pages: ${firstPage.more}`)
console.log(`Results: ${firstPage.proposals.length}`)

// Get pagination info
const pageInfo = getPaginationInfo(offset, limit, firstPage.total, firstPage.more)
console.log(`Page ${pageInfo.currentPage} of ${pageInfo.totalPages}`)

// Get next page if available
if (pageInfo.hasMore) {
    const nextPage = await msigs.get_proposals('alice', {
        limit,
        offset: pageInfo.nextOffset,
    })
}

Load All Pages Example

async function getAllProposals(msigs: MsigsClient, proposer: string) {
    const allProposals = []
    let offset = 0
    const limit = 20 // Use max limit for efficiency

    do {
        const response = await msigs.get_proposals(proposer, {limit, offset})
        allProposals.push(...response.proposals)

        if (!response.more) {
            break
        }
        offset += limit
    } while (true)

    return allProposals
}

Service Limits

The service enforces different maximum results per endpoint:

  • Proposals (get_proposals, get_approver_proposals, etc.): Default 20 results max
  • Approvals (get_approvals): Default 100 results max

Check current limits via get_status():

const status = await msigs.get_status()
console.log(`Max proposal results: ${status.max_proposal_results}`)
console.log(`Max approval results: ${status.max_approval_results}`)

// The SDK automatically fetches and enforces these limits
const maxLimit = await msigs.getMaxProposalLimit()

API Methods

get_status()

Get service status and sync information, including configured service limits.

Returns: Status object with chain sync info, head block, service metadata, and pagination limits (max_proposal_results, max_approval_results).


get_proposal(proposer, proposalName, options?)

Get a single proposal by proposer and proposal name.

Parameters:

  • proposer: string - The account that proposed the transaction
  • proposalName: string - The name of the proposal
  • options.globalseq?: number - Get specific version by global sequence number
  • options.version_history?: boolean - Include version history (default: true)

Returns: Full proposal details including metadata, approvals, and transaction data.


get_proposal_history(proposer, proposalName, options?)

Get version history for a proposal.

Parameters:

  • proposer: string - The account that proposed the transaction
  • proposalName: string - The name of the proposal
  • options.status?: string - Filter by status: 'proposed', 'executed', 'cancelled', 'expired', 'all'
  • options.limit?: number - Maximum results to return (max: 100)
  • options.offset?: number - Pagination offset

Returns: Paginated list of proposal versions.


get_proposals(proposer, options?)

List proposals for a specific proposer account.

Parameters:

  • proposer: string - The proposer account to filter by (required)

Options:

  • status?: string - Filter by status: 'proposed', 'executed', 'cancelled', 'expired', 'all'
  • limit?: number - Maximum results to return
  • offset?: number - Pagination offset

Returns: Paginated list of proposals matching the filters with total and more fields.


get_approvals(proposer, proposalName)

Get approval timeline for a proposal.

Parameters:

  • proposer: string - The account that proposed the transaction
  • proposalName: string - The name of the proposal

Returns: Timeline of approval/unapproval events with timestamps and block info.


get_activity(account, options?)

Get account activity (proposed/approved/unapproved/executed/cancelled actions).

Parameters:

  • account: string - The account to get activity for
  • options.limit?: number - Maximum results to return
  • options.offset?: number - Pagination offset
  • options.action_type?: string - Filter by action type: 'proposed', 'approved', 'unapproved', 'executed', 'cancelled', 'all'

Returns: Paginated list of multisig actions involving the account with total and more fields.


get_approver_proposals(approver, options?)

Get proposals requiring approval from a specific account.

Parameters:

  • approver: string - The account that needs to approve
  • options.status?: string - Filter by status: 'proposed', 'executed', 'cancelled', 'expired', 'all'
  • options.include_approved?: boolean - Include proposals already approved by this account
  • options.limit?: number - Maximum results to return
  • options.offset?: number - Pagination offset

Returns: Paginated list of proposals requiring approval from the specified account with total and more fields.


debug_proposal(proposer, proposalName, options?)

Debug proposal status computation (for troubleshooting status discrepancies).

Parameters:

  • proposer: string - The account that proposed the transaction
  • proposalName: string - The name of the proposal
  • options.globalseq?: number - Debug specific version by global sequence number

Returns: Detailed debug information including stored status byte, computed status, expiration checks, approval counts, and debug notes explaining status computation.


Development

Build the library:

make

Format code:

make format

Check for linting errors:

make check