Package Exports
- @metaplex-foundation/beet-solana
- @metaplex-foundation/beet-solana/dist/src/beet-solana.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@metaplex-foundation/beet-solana) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@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