1.0.1 • Published 4 months ago

minadata v1.0.1

Weekly downloads
-
License
Apache-2.0
Repository
-
Last release
4 months ago

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( {
    'networkName': 'berkeley'
/*
    'graphQl': {
        'proxy': [ 'https://proxy.berkeley.minaexplorer.com/' ],
        'standard': [ 'https://berkeley.graphql.minaexplorer.com' ],
    }
*/
} )


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

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'
    }
})

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( {
            'networkName': 'berkeley'
        } )

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

Create new dist

npx webpack

License

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

1.0.1

4 months ago

1.0.0

4 months ago

0.0.94

6 months ago

0.0.93

6 months ago

0.0.92

6 months ago

0.0.91

6 months ago

0.0.9

6 months ago

0.0.82

6 months ago

0.0.81

6 months ago

0.0.8

6 months ago

0.0.7

6 months ago

0.0.6

6 months ago

0.0.5

6 months ago

0.0.4

6 months ago

0.0.3

7 months ago

0.0.2

7 months ago

0.0.1

7 months ago