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

minadata

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

minadata

MinaData simplifies the retrieval of transaction data on the Mina blockchain. In doing so, it directly fetches data through the native GraphQL interfaces of the Archive Node. MinaData aims to assist you in quickly launching user interfaces.

  • 0.0.81
  • npm
  • Socket score

Version published
Weekly downloads
16
increased by433.33%
Maintainers
1
Weekly downloads
 
Created
Source

CircleCI

Mina Data

MinaData simplifies the retrieval of transaction data on the Mina blockchain. In doing so, it directly fetches data through the native GraphQL interfaces of the Archive Node. MinaData aims to assist you in quickly launching user interfaces.

Quickstart

node

npm init -y
npm i minadata

index.mjs

import { MinaData } from 'minadata'

const minaData = new MinaData()
minaData.init( {
    'network': 'berkeley'
} )

minaData.getData( { 
    'preset': 'transactionByHash', 
    'userVars': {
        'hash': '5Ju7HSdjQcPpgzkjECVdmErhuri3VMLm2N7b4z2mB6kMbbKnFHx1'
    },
    'network': 'berkeley'
} )

Table of Contents

  1. Quickstart
  2. Presets
  3. How to Use MinaData in HTML
  4. License

Presets

  • transactionByHash
NameDescriptionTypeRequiredDefault
hashTransaction hashstringtrue5Ju7HSdjQcPpgzkjECVdmErhuri3VMLm2N7b4z2mB6kMbbKnFHx1
  • latestBlockHeight
NameDescriptionTypeRequiredDefault
blockHeight_ltHighest blocknumberfalse999999999
  • latestBlockHeights
NameDescriptionTypeRequiredDefault
limitLimitnumberfalse10
  • latestEventsFromContract
NameDescriptionTypeRequiredDefault
limitLimitnumberfalse10
blockHeight_ltHighest blocknumberfalse999999999
creatorBTC addressstringtrueB62qnLVz8wM7MfJsuYbjFf4UWbwrUBEL5ZdawExxxFhnGXB6siqokyM

Example:

minaData.getData( {
    'preset': ' latestEventsFromContract',
    'userVars': {
        'creator': 'B62qnLVz8wM7MfJsuYbjFf4UWbwrUBEL5ZdawExxxFhnGXB6siqokyM'
    },
    'network': 'berkeley'
})

Please visit https://easymina.github.io/minadata

How to Use MinaData in HTML

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Your MinaData Project</title>
</head>
<body>
    <script type="module">
        import { MinaData } from 'https://unpkg.com/minadata@latest/dist/MinaData.js'

        const minaData = new MinaData()
        minaData.init( {} )
        minaData
            .getData( {
                'preset': 'transactionByHash',
                'userVars': {
                    'hash': '5Ju7HSdjQcPpgzkjECVdmErhuri3VMLm2N7b4z2mB6kMbbKnFHx1'
                },
                'network': 'berkeley'
            } )
            .then( result => {
                console.log( `Here is the result ${JSON.stringify( result )}` )
            } )
    </script>
</body>
</html>

Create new dist

npx webpack --config webpack.config.js

License

The module is available as open source under the terms of the Apache 2.0.

FAQs

Package last updated on 19 Nov 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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