Options
All
  • Public
  • Public/Protected
  • All
Menu

@metaplex-foundation/beet-solana

Index

TypeDefinition

BeetSolanaExports: KeysExports
BeetSolanaTypeMapKey: KeysTypeMapKey
KeysExports: keyof __module
KeysTypeMap: Record<KeysTypeMapKey, SupportedTypeDefinition & { beet: KeysExports }>
KeysTypeMapKey: "publicKey"
keysTypeMap: KeysTypeMap = ...

Maps solana keys beet exports to metadata which describes in which package it is defined as well as which TypeScript type is used to represent the deserialized value in JavaScript.

supportedTypeMap: Record<BeetSolanaTypeMapKey, SupportedTypeDefinition & { beet: BeetSolanaExports }> = keysTypeMap

Maps solana beet exports to metadata which describes in which package it is defined as well as which TypeScript type is used to represent the deserialized value in JavaScript.

beet/solana

publicKey: FixedSizeBeet<PublicKey> = ...

De/Serializer for solana {@link PublicKey}s aka publicKey.

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 { publicKey } from '@metaplex-foundation/beet-solana'

type InstructionArgs = {
authority: web3.PublicKey
}

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

Generated using TypeDoc