New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@futureverse/asset-registry-sdk

Package Overview
Dependencies
Maintainers
10
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@futureverse/asset-registry-sdk

## Installation

  • 0.28.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
8
increased by700%
Maintainers
10
Weekly downloads
 
Created
Source

Futureverse Asset Registry SDK

Installation

NPM:

    npm install @futureverse/asset-registry-sdk --save

Yarn:

    yarn add @futureverse/asset-registry-sdk

Usage

import {
  AssetRegistryClientProvider,
  Namespace,
  useCreateShaclSchema,
} from './index'
import { render } from 'react-dom'
import { ethers } from 'ethers'

const ASSET_REGISTRY_ENDPOINT = 'http://localhost:4000/graphql'
const APP_DOMAIN = 'com.fv.app'
const WALLET_PRIVATE_KEY = ''

function App() {
  return (
    // Provide the client to your App
    <AssetRegistryClientProvider
      url={ASSET_REGISTRY_ENDPOINT}
      domain={APP_DOMAIN}
      chainId={1}
    >
      <CreateShaclSchemaComponent />
    </AssetRegistryClientProvider>
  )
}

function CreateShaclSchemaComponent() {
  const wallet = new ethers.Wallet(WALLET_PRIVATE_KEY ?? '')
  const origin = 'http://localhost:3000'
  const id = 'foo'
  const version = 1
  const namespace = 'com.fv.schemas' as Namespace
  const schema = '{}'

  const mutation = useCreateShaclSchema({
    wallet,
    schema,
    version,
    origin,
    namespace,
  })

  return (
    <div>
      {mutation.isLoading ? (
        'Adding Shacl Schema...'
      ) : (
        <>
          {mutation.isError ? (
            <div>An error occurred: {mutation.error as string}</div>
          ) : null}

          {mutation.isSuccess ? <div>Shacl Schema added!</div> : null}

          <button onClick={() => mutation.mutate()}>Create Shacl Schema</button>
        </>
      )}
    </div>
  )
}

render(<App />, document.getElementById('root'))

Requirements

FAQs

Package last updated on 10 Sep 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