Socket
Socket
Sign inDemoInstall

@metaplex-foundation/beet-solana

Package Overview
Dependencies
55
Maintainers
4
Versions
14
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @metaplex-foundation/beet-solana

Solana specific extension for beet, the borsh compatible de/serializer


Version published
Weekly downloads
83K
increased by0.06%
Maintainers
4
Created
Weekly downloads
 

Readme

Source

@metaplex-foundation/beet-solana

Solana specific extension for beet, the borsh compatible de/serializer

API

Please find the API docs here.

Examples

Using PublicKey Directly

import { publicKey } from '@metaplex-foundation/beet-solana'

const generatedKey  = Keypair.generate().publicKey
const buf = Buffer.alloc(publicKey.byteSize)
beet.write(buf, 0, generatedKey)
beet.read(buf, 0) // same as generatedKey

PublicKey as part of a Struct Configuration

import * as web3 from '@solana/web3.js'
import * as beet from '@metaplex-foundation/beet'
import * as beetSolana from '@metaplex-foundation/beet-solana'

type InstructionArgs = {
  authority: web3.PublicKey
}

const createStruct = new beet.BeetArgsStruct<InstructionArgs>(
  [ 
    ['authority', beetSolana.publicKey]
  ],
  'InstructionArgs'
)

LICENSE

Apache-2.0

FAQs

Last updated on 21 Jan 2022

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc