Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

References

Enumerations enums

Enumerations generated

Classes Errors

Classes Other

Classes generated

Type Aliases Append

Type Aliases CloseEmptyTree

Type Aliases InitEmptyMerkleTree

Type Aliases InsertOrAppend

Type Aliases Instructions

Type Aliases Other

Type Aliases ReplaceLeaf

Type Aliases TransferAuthority

Type Aliases VerifyLeaf

Type Aliases enums

Type Aliases generated

Type Aliases userTypes

Variables Append

Variables CloseEmptyTree

Variables InitEmptyMerkleTree

Variables InsertOrAppend

Variables Instructions

Variables Other

Variables ReplaceLeaf

Variables TransferAuthority

Variables VerifyLeaf

Variables constants

Variables generated

Variables userTypes

Functions Append

Functions CloseEmptyTree

Functions Errors

Functions InitEmptyMerkleTree

Functions InsertOrAppend

Functions Instructions

Functions Other

Functions ReplaceLeaf

Functions TransferAuthority

Functions VerifyLeaf

Functions generated

References

Re-exports LEAF_BUFFER_LENGTH
Re-exports MerkleTree
Re-exports MerkleTreeProof
Renames and re-exports SPL_ACCOUNT_COMPRESSION_ADDRESS
Renames and re-exports SPL_ACCOUNT_COMPRESSION_PROGRAM_ID
Re-exports TreeNode
Re-exports emptyNode
Re-exports hash

Append Type Aliases

AppendInstructionAccounts: { anchorRemainingAccounts?: web3.AccountMeta[]; authority: web3.PublicKey; merkleTree: web3.PublicKey; noop: web3.PublicKey }

Accounts required by the append instruction

property

[writable] merkleTree

property

[signer] authority

property

[] noop

Type declaration

  • Optional anchorRemainingAccounts?: web3.AccountMeta[]
  • authority: web3.PublicKey
  • merkleTree: web3.PublicKey
  • noop: web3.PublicKey
AppendInstructionArgs: { leaf: number[] }

Type declaration

  • leaf: number[]

CloseEmptyTree Type Aliases

CloseEmptyTreeInstructionAccounts: { anchorRemainingAccounts?: web3.AccountMeta[]; authority: web3.PublicKey; merkleTree: web3.PublicKey; recipient: web3.PublicKey }

Accounts required by the closeEmptyTree instruction

property

[writable] merkleTree

property

[signer] authority

property

[writable] recipient

Type declaration

  • Optional anchorRemainingAccounts?: web3.AccountMeta[]
  • authority: web3.PublicKey
  • merkleTree: web3.PublicKey
  • recipient: web3.PublicKey

InitEmptyMerkleTree Type Aliases

InitEmptyMerkleTreeInstructionAccounts: { anchorRemainingAccounts?: web3.AccountMeta[]; authority: web3.PublicKey; merkleTree: web3.PublicKey; noop: web3.PublicKey }

Accounts required by the initEmptyMerkleTree instruction

property

[writable] merkleTree

property

[signer] authority

property

[] noop

Type declaration

  • Optional anchorRemainingAccounts?: web3.AccountMeta[]
  • authority: web3.PublicKey
  • merkleTree: web3.PublicKey
  • noop: web3.PublicKey
InitEmptyMerkleTreeInstructionArgs: { maxBufferSize: number; maxDepth: number }

Type declaration

  • maxBufferSize: number
  • maxDepth: number

InsertOrAppend Type Aliases

InsertOrAppendInstructionAccounts: { anchorRemainingAccounts?: web3.AccountMeta[]; authority: web3.PublicKey; merkleTree: web3.PublicKey; noop: web3.PublicKey }

Accounts required by the insertOrAppend instruction

property

[writable] merkleTree

property

[signer] authority

property

[] noop

Type declaration

  • Optional anchorRemainingAccounts?: web3.AccountMeta[]
  • authority: web3.PublicKey
  • merkleTree: web3.PublicKey
  • noop: web3.PublicKey
InsertOrAppendInstructionArgs: { index: number; leaf: number[]; root: number[] }

Type declaration

  • index: number
  • leaf: number[]
  • root: number[]

Instructions Type Aliases

AppendInstructionAccounts: { anchorRemainingAccounts?: web3.AccountMeta[]; authority: web3.PublicKey; merkleTree: web3.PublicKey; noop: web3.PublicKey }

Accounts required by the append instruction

property

[writable] merkleTree

property

[signer] authority

property

[] noop

Type declaration

  • Optional anchorRemainingAccounts?: web3.AccountMeta[]
  • authority: web3.PublicKey
  • merkleTree: web3.PublicKey
  • noop: web3.PublicKey
AppendInstructionArgs: { leaf: number[] }

Type declaration

  • leaf: number[]
CloseEmptyTreeInstructionAccounts: { anchorRemainingAccounts?: web3.AccountMeta[]; authority: web3.PublicKey; merkleTree: web3.PublicKey; recipient: web3.PublicKey }

Accounts required by the closeEmptyTree instruction

property

[writable] merkleTree

property

[signer] authority

property

[writable] recipient

Type declaration

  • Optional anchorRemainingAccounts?: web3.AccountMeta[]
  • authority: web3.PublicKey
  • merkleTree: web3.PublicKey
  • recipient: web3.PublicKey
InitEmptyMerkleTreeInstructionAccounts: { anchorRemainingAccounts?: web3.AccountMeta[]; authority: web3.PublicKey; merkleTree: web3.PublicKey; noop: web3.PublicKey }

Accounts required by the initEmptyMerkleTree instruction

property

[writable] merkleTree

property

[signer] authority

property

[] noop

Type declaration

  • Optional anchorRemainingAccounts?: web3.AccountMeta[]
  • authority: web3.PublicKey
  • merkleTree: web3.PublicKey
  • noop: web3.PublicKey
InitEmptyMerkleTreeInstructionArgs: { maxBufferSize: number; maxDepth: number }

Type declaration

  • maxBufferSize: number
  • maxDepth: number
InsertOrAppendInstructionAccounts: { anchorRemainingAccounts?: web3.AccountMeta[]; authority: web3.PublicKey; merkleTree: web3.PublicKey; noop: web3.PublicKey }

Accounts required by the insertOrAppend instruction

property

[writable] merkleTree

property

[signer] authority

property

[] noop

Type declaration

  • Optional anchorRemainingAccounts?: web3.AccountMeta[]
  • authority: web3.PublicKey
  • merkleTree: web3.PublicKey
  • noop: web3.PublicKey
InsertOrAppendInstructionArgs: { index: number; leaf: number[]; root: number[] }

Type declaration

  • index: number
  • leaf: number[]
  • root: number[]
ReplaceLeafInstructionAccounts: { anchorRemainingAccounts?: web3.AccountMeta[]; authority: web3.PublicKey; merkleTree: web3.PublicKey; noop: web3.PublicKey }

Accounts required by the replaceLeaf instruction

property

[writable] merkleTree

property

[signer] authority

property

[] noop

Type declaration

  • Optional anchorRemainingAccounts?: web3.AccountMeta[]
  • authority: web3.PublicKey
  • merkleTree: web3.PublicKey
  • noop: web3.PublicKey
ReplaceLeafInstructionArgs: { index: number; newLeaf: number[]; previousLeaf: number[]; root: number[] }

Type declaration

  • index: number
  • newLeaf: number[]
  • previousLeaf: number[]
  • root: number[]
TransferAuthorityInstructionAccounts: { anchorRemainingAccounts?: web3.AccountMeta[]; authority: web3.PublicKey; merkleTree: web3.PublicKey }

Accounts required by the transferAuthority instruction

property

[writable] merkleTree

property

[signer] authority

Type declaration

  • Optional anchorRemainingAccounts?: web3.AccountMeta[]
  • authority: web3.PublicKey
  • merkleTree: web3.PublicKey
TransferAuthorityInstructionArgs: { newAuthority: web3.PublicKey }

Type declaration

  • newAuthority: web3.PublicKey
VerifyLeafInstructionAccounts: { anchorRemainingAccounts?: web3.AccountMeta[]; merkleTree: web3.PublicKey }

Accounts required by the verifyLeaf instruction

property

[] merkleTree

Type declaration

  • Optional anchorRemainingAccounts?: web3.AccountMeta[]
  • merkleTree: web3.PublicKey
VerifyLeafInstructionArgs: { index: number; leaf: number[]; root: number[] }

Type declaration

  • index: number
  • leaf: number[]
  • root: number[]

Other Type Aliases

ApplicationDataEventV1: { applicationData: Uint8Array }

Type declaration

  • applicationData: Uint8Array
Canopy: { canopyBytes: number[] }

Canopy fields necessary for deserializing an on-chain Canopy for a ConcurrentMerkleTreeAccount

Type declaration

  • canopyBytes: number[]
ChangeLogEventV1: { index: number; path: PathNode[]; seq: BN; treeId: PublicKey }

Type declaration

  • index: number
  • path: PathNode[]
  • seq: BN
  • treeId: PublicKey
ChangeLogInternal: { _padding: number; index: number; pathNodes: PublicKey[]; root: PublicKey }

ChangeLog information necessary for deserializing an on-chain ConcurrentMerkleTree

Type declaration

  • _padding: number
  • index: number
  • pathNodes: PublicKey[]
  • root: PublicKey
ConcurrentMerkleTree: { activeIndex: beet.bignum; bufferSize: beet.bignum; changeLogs: ChangeLogInternal[]; rightMostPath: Path; sequenceNumber: beet.bignum }

ConcurrentMerkleTree fields necessary for deserializing an on-chain ConcurrentMerkleTree

Type declaration

  • activeIndex: beet.bignum
  • bufferSize: beet.bignum
  • changeLogs: ChangeLogInternal[]
  • rightMostPath: Path
  • sequenceNumber: beet.bignum
ConcurrentMerkleTreeHeader: { accountType: CompressionAccountType; header: ConcurrentMerkleTreeHeaderData }

Type declaration

ConcurrentMerkleTreeHeaderDataV1: { authority: web3.PublicKey; creationSlot: beet.bignum; maxBufferSize: number; maxDepth: number; padding: number[] }

Type declaration

  • authority: web3.PublicKey
  • creationSlot: beet.bignum
  • maxBufferSize: number
  • maxDepth: number
  • padding: number[]
DepthSizePair: { maxBufferSize: number; maxDepth: number }

DepthSizePair is a valid (maxDepth, maxBufferSize) tuple for an SPL ConcurrentMerkleTree Only the tuples listed in ALL_DEPTH_SIZE_PAIRS are valid for creating a new ConcurrentMerkleTreeAccount.

Type declaration

  • maxBufferSize: number
  • maxDepth: number
Path: { _padding: number; index: number; leaf: PublicKey; proof: PublicKey[] }

Canopy fields necessary for deserializing an on-chain Path used in an ConcurrentMerkleTree

Type declaration

  • _padding: number
  • index: number
  • leaf: PublicKey
  • proof: PublicKey[]
PathNode: { index: number; node: number[] }

Type declaration

  • index: number
  • node: number[]
ValidDepthSizePair: { maxBufferSize: 8; maxDepth: 3 } | { maxBufferSize: 8; maxDepth: 5 } | { maxBufferSize: 64; maxDepth: 14 } | { maxBufferSize: 256; maxDepth: 14 } | { maxBufferSize: 1024; maxDepth: 14 } | { maxBufferSize: 2048; maxDepth: 14 } | { maxBufferSize: 64; maxDepth: 15 } | { maxBufferSize: 64; maxDepth: 16 } | { maxBufferSize: 64; maxDepth: 17 } | { maxBufferSize: 64; maxDepth: 18 } | { maxBufferSize: 64; maxDepth: 19 } | { maxBufferSize: 64; maxDepth: 20 } | { maxBufferSize: 256; maxDepth: 20 } | { maxBufferSize: 1024; maxDepth: 20 } | { maxBufferSize: 2048; maxDepth: 20 } | { maxBufferSize: 64; maxDepth: 24 } | { maxBufferSize: 256; maxDepth: 24 } | { maxBufferSize: 512; maxDepth: 24 } | { maxBufferSize: 1024; maxDepth: 24 } | { maxBufferSize: 2048; maxDepth: 24 } | { maxBufferSize: 512; maxDepth: 26 } | { maxBufferSize: 1024; maxDepth: 26 } | { maxBufferSize: 2048; maxDepth: 26 } | { maxBufferSize: 512; maxDepth: 30 } | { maxBufferSize: 1024; maxDepth: 30 } | { maxBufferSize: 2048; maxDepth: 30 }

ReplaceLeaf Type Aliases

ReplaceLeafInstructionAccounts: { anchorRemainingAccounts?: web3.AccountMeta[]; authority: web3.PublicKey; merkleTree: web3.PublicKey; noop: web3.PublicKey }

Accounts required by the replaceLeaf instruction

property

[writable] merkleTree

property

[signer] authority

property

[] noop

Type declaration

  • Optional anchorRemainingAccounts?: web3.AccountMeta[]
  • authority: web3.PublicKey
  • merkleTree: web3.PublicKey
  • noop: web3.PublicKey
ReplaceLeafInstructionArgs: { index: number; newLeaf: number[]; previousLeaf: number[]; root: number[] }

Type declaration

  • index: number
  • newLeaf: number[]
  • previousLeaf: number[]
  • root: number[]

TransferAuthority Type Aliases

TransferAuthorityInstructionAccounts: { anchorRemainingAccounts?: web3.AccountMeta[]; authority: web3.PublicKey; merkleTree: web3.PublicKey }

Accounts required by the transferAuthority instruction

property

[writable] merkleTree

property

[signer] authority

Type declaration

  • Optional anchorRemainingAccounts?: web3.AccountMeta[]
  • authority: web3.PublicKey
  • merkleTree: web3.PublicKey
TransferAuthorityInstructionArgs: { newAuthority: web3.PublicKey }

Type declaration

  • newAuthority: web3.PublicKey

VerifyLeaf Type Aliases

VerifyLeafInstructionAccounts: { anchorRemainingAccounts?: web3.AccountMeta[]; merkleTree: web3.PublicKey }

Accounts required by the verifyLeaf instruction

property

[] merkleTree

Type declaration

  • Optional anchorRemainingAccounts?: web3.AccountMeta[]
  • merkleTree: web3.PublicKey
VerifyLeafInstructionArgs: { index: number; leaf: number[]; root: number[] }

Type declaration

  • index: number
  • leaf: number[]
  • root: number[]

enums Type Aliases

AccountCompressionEvent: beet.DataEnumKeyAsKind<AccountCompressionEventRecord>

Union type respresenting the AccountCompressionEvent data enum defined in Rust.

NOTE: that it includes a __kind property which allows to narrow types in switch/if statements. Additionally isAccountCompressionEvent* type guards are exposed below to narrow to a specific variant.

AccountCompressionEventRecord: { ApplicationData: { fields: [ApplicationDataEvent] }; ChangeLog: { fields: [ChangeLogEvent] } }

This type is used to derive the AccountCompressionEvent type as well as the de/serializer. However don't refer to it in your code but use the AccountCompressionEvent type instead.

Type declaration

ApplicationDataEvent: beet.DataEnumKeyAsKind<ApplicationDataEventRecord>

Union type respresenting the ApplicationDataEvent data enum defined in Rust.

NOTE: that it includes a __kind property which allows to narrow types in switch/if statements. Additionally isApplicationDataEvent* type guards are exposed below to narrow to a specific variant.

ApplicationDataEventRecord: { V1: { fields: [ApplicationDataEventV1] } }

This type is used to derive the ApplicationDataEvent type as well as the de/serializer. However don't refer to it in your code but use the ApplicationDataEvent type instead.

Type declaration

ChangeLogEvent: beet.DataEnumKeyAsKind<ChangeLogEventRecord>

Union type respresenting the ChangeLogEvent data enum defined in Rust.

NOTE: that it includes a __kind property which allows to narrow types in switch/if statements. Additionally isChangeLogEvent* type guards are exposed below to narrow to a specific variant.

ChangeLogEventRecord: { V1: { fields: [ChangeLogEventV1] } }

This type is used to derive the ChangeLogEvent type as well as the de/serializer. However don't refer to it in your code but use the ChangeLogEvent type instead.

Type declaration

  • V1: { fields: [ChangeLogEventV1] }
    • fields: [ChangeLogEventV1]
ConcurrentMerkleTreeHeaderData: beet.DataEnumKeyAsKind<ConcurrentMerkleTreeHeaderDataRecord>

Union type respresenting the ConcurrentMerkleTreeHeaderData data enum defined in Rust.

NOTE: that it includes a __kind property which allows to narrow types in switch/if statements. Additionally isConcurrentMerkleTreeHeaderData* type guards are exposed below to narrow to a specific variant.

ConcurrentMerkleTreeHeaderDataRecord: { V1: { fields: [ConcurrentMerkleTreeHeaderDataV1] } }

This type is used to derive the ConcurrentMerkleTreeHeaderData type as well as the de/serializer. However don't refer to it in your code but use the ConcurrentMerkleTreeHeaderData type instead.

Type declaration

generated Type Aliases

AccountCompressionEvent: beet.DataEnumKeyAsKind<AccountCompressionEventRecord>

Union type respresenting the AccountCompressionEvent data enum defined in Rust.

NOTE: that it includes a __kind property which allows to narrow types in switch/if statements. Additionally isAccountCompressionEvent* type guards are exposed below to narrow to a specific variant.

AccountCompressionEventRecord: { ApplicationData: { fields: [ApplicationDataEvent] }; ChangeLog: { fields: [ChangeLogEvent] } }

This type is used to derive the AccountCompressionEvent type as well as the de/serializer. However don't refer to it in your code but use the AccountCompressionEvent type instead.

Type declaration

AppendInstructionAccounts: { anchorRemainingAccounts?: web3.AccountMeta[]; authority: web3.PublicKey; merkleTree: web3.PublicKey; noop: web3.PublicKey }

Accounts required by the append instruction

property

[writable] merkleTree

property

[signer] authority

property

[] noop

Type declaration

  • Optional anchorRemainingAccounts?: web3.AccountMeta[]
  • authority: web3.PublicKey
  • merkleTree: web3.PublicKey
  • noop: web3.PublicKey
AppendInstructionArgs: { leaf: number[] }

Type declaration

  • leaf: number[]
ApplicationDataEvent: beet.DataEnumKeyAsKind<ApplicationDataEventRecord>

Union type respresenting the ApplicationDataEvent data enum defined in Rust.

NOTE: that it includes a __kind property which allows to narrow types in switch/if statements. Additionally isApplicationDataEvent* type guards are exposed below to narrow to a specific variant.

ApplicationDataEventRecord: { V1: { fields: [ApplicationDataEventV1] } }

This type is used to derive the ApplicationDataEvent type as well as the de/serializer. However don't refer to it in your code but use the ApplicationDataEvent type instead.

Type declaration

ChangeLogEvent: beet.DataEnumKeyAsKind<ChangeLogEventRecord>

Union type respresenting the ChangeLogEvent data enum defined in Rust.

NOTE: that it includes a __kind property which allows to narrow types in switch/if statements. Additionally isChangeLogEvent* type guards are exposed below to narrow to a specific variant.

ChangeLogEventRecord: { V1: { fields: [ChangeLogEventV1] } }

This type is used to derive the ChangeLogEvent type as well as the de/serializer. However don't refer to it in your code but use the ChangeLogEvent type instead.

Type declaration

  • V1: { fields: [ChangeLogEventV1] }
    • fields: [ChangeLogEventV1]
CloseEmptyTreeInstructionAccounts: { anchorRemainingAccounts?: web3.AccountMeta[]; authority: web3.PublicKey; merkleTree: web3.PublicKey; recipient: web3.PublicKey }

Accounts required by the closeEmptyTree instruction

property

[writable] merkleTree

property

[signer] authority

property

[writable] recipient

Type declaration

  • Optional anchorRemainingAccounts?: web3.AccountMeta[]
  • authority: web3.PublicKey
  • merkleTree: web3.PublicKey
  • recipient: web3.PublicKey
ConcurrentMerkleTreeHeaderData: beet.DataEnumKeyAsKind<ConcurrentMerkleTreeHeaderDataRecord>

Union type respresenting the ConcurrentMerkleTreeHeaderData data enum defined in Rust.

NOTE: that it includes a __kind property which allows to narrow types in switch/if statements. Additionally isConcurrentMerkleTreeHeaderData* type guards are exposed below to narrow to a specific variant.

ConcurrentMerkleTreeHeaderDataRecord: { V1: { fields: [ConcurrentMerkleTreeHeaderDataV1] } }

This type is used to derive the ConcurrentMerkleTreeHeaderData type as well as the de/serializer. However don't refer to it in your code but use the ConcurrentMerkleTreeHeaderData type instead.

Type declaration

InitEmptyMerkleTreeInstructionAccounts: { anchorRemainingAccounts?: web3.AccountMeta[]; authority: web3.PublicKey; merkleTree: web3.PublicKey; noop: web3.PublicKey }

Accounts required by the initEmptyMerkleTree instruction

property

[writable] merkleTree

property

[signer] authority

property

[] noop

Type declaration

  • Optional anchorRemainingAccounts?: web3.AccountMeta[]
  • authority: web3.PublicKey
  • merkleTree: web3.PublicKey
  • noop: web3.PublicKey
InitEmptyMerkleTreeInstructionArgs: { maxBufferSize: number; maxDepth: number }

Type declaration

  • maxBufferSize: number
  • maxDepth: number
InsertOrAppendInstructionAccounts: { anchorRemainingAccounts?: web3.AccountMeta[]; authority: web3.PublicKey; merkleTree: web3.PublicKey; noop: web3.PublicKey }

Accounts required by the insertOrAppend instruction

property

[writable] merkleTree

property

[signer] authority

property

[] noop

Type declaration

  • Optional anchorRemainingAccounts?: web3.AccountMeta[]
  • authority: web3.PublicKey
  • merkleTree: web3.PublicKey
  • noop: web3.PublicKey
InsertOrAppendInstructionArgs: { index: number; leaf: number[]; root: number[] }

Type declaration

  • index: number
  • leaf: number[]
  • root: number[]
ReplaceLeafInstructionAccounts: { anchorRemainingAccounts?: web3.AccountMeta[]; authority: web3.PublicKey; merkleTree: web3.PublicKey; noop: web3.PublicKey }

Accounts required by the replaceLeaf instruction

property

[writable] merkleTree

property

[signer] authority

property

[] noop

Type declaration

  • Optional anchorRemainingAccounts?: web3.AccountMeta[]
  • authority: web3.PublicKey
  • merkleTree: web3.PublicKey
  • noop: web3.PublicKey
ReplaceLeafInstructionArgs: { index: number; newLeaf: number[]; previousLeaf: number[]; root: number[] }

Type declaration

  • index: number
  • newLeaf: number[]
  • previousLeaf: number[]
  • root: number[]
TransferAuthorityInstructionAccounts: { anchorRemainingAccounts?: web3.AccountMeta[]; authority: web3.PublicKey; merkleTree: web3.PublicKey }

Accounts required by the transferAuthority instruction

property

[writable] merkleTree

property

[signer] authority

Type declaration

  • Optional anchorRemainingAccounts?: web3.AccountMeta[]
  • authority: web3.PublicKey
  • merkleTree: web3.PublicKey
TransferAuthorityInstructionArgs: { newAuthority: web3.PublicKey }

Type declaration

  • newAuthority: web3.PublicKey
VerifyLeafInstructionAccounts: { anchorRemainingAccounts?: web3.AccountMeta[]; merkleTree: web3.PublicKey }

Accounts required by the verifyLeaf instruction

property

[] merkleTree

Type declaration

  • Optional anchorRemainingAccounts?: web3.AccountMeta[]
  • merkleTree: web3.PublicKey
VerifyLeafInstructionArgs: { index: number; leaf: number[]; root: number[] }

Type declaration

  • index: number
  • leaf: number[]
  • root: number[]

userTypes Type Aliases

AccountCompressionEvent: beet.DataEnumKeyAsKind<AccountCompressionEventRecord>

Union type respresenting the AccountCompressionEvent data enum defined in Rust.

NOTE: that it includes a __kind property which allows to narrow types in switch/if statements. Additionally isAccountCompressionEvent* type guards are exposed below to narrow to a specific variant.

AccountCompressionEventRecord: { ApplicationData: { fields: [ApplicationDataEvent] }; ChangeLog: { fields: [ChangeLogEvent] } }

This type is used to derive the AccountCompressionEvent type as well as the de/serializer. However don't refer to it in your code but use the AccountCompressionEvent type instead.

Type declaration

ApplicationDataEvent: beet.DataEnumKeyAsKind<ApplicationDataEventRecord>

Union type respresenting the ApplicationDataEvent data enum defined in Rust.

NOTE: that it includes a __kind property which allows to narrow types in switch/if statements. Additionally isApplicationDataEvent* type guards are exposed below to narrow to a specific variant.

ApplicationDataEventRecord: { V1: { fields: [ApplicationDataEventV1] } }

This type is used to derive the ApplicationDataEvent type as well as the de/serializer. However don't refer to it in your code but use the ApplicationDataEvent type instead.

Type declaration

ChangeLogEvent: beet.DataEnumKeyAsKind<ChangeLogEventRecord>

Union type respresenting the ChangeLogEvent data enum defined in Rust.

NOTE: that it includes a __kind property which allows to narrow types in switch/if statements. Additionally isChangeLogEvent* type guards are exposed below to narrow to a specific variant.

ChangeLogEventRecord: { V1: { fields: [ChangeLogEventV1] } }

This type is used to derive the ChangeLogEvent type as well as the de/serializer. However don't refer to it in your code but use the ChangeLogEvent type instead.

Type declaration

  • V1: { fields: [ChangeLogEventV1] }
    • fields: [ChangeLogEventV1]
ConcurrentMerkleTreeHeaderData: beet.DataEnumKeyAsKind<ConcurrentMerkleTreeHeaderDataRecord>

Union type respresenting the ConcurrentMerkleTreeHeaderData data enum defined in Rust.

NOTE: that it includes a __kind property which allows to narrow types in switch/if statements. Additionally isConcurrentMerkleTreeHeaderData* type guards are exposed below to narrow to a specific variant.

ConcurrentMerkleTreeHeaderDataRecord: { V1: { fields: [ConcurrentMerkleTreeHeaderDataV1] } }

This type is used to derive the ConcurrentMerkleTreeHeaderData type as well as the de/serializer. However don't refer to it in your code but use the ConcurrentMerkleTreeHeaderData type instead.

Type declaration

Append Variables

appendStruct: BeetArgsStruct<AppendInstructionArgs & { instructionDiscriminator: number[] }> = ...

CloseEmptyTree Variables

closeEmptyTreeStruct: BeetArgsStruct<{ instructionDiscriminator: number[] }> = ...

InitEmptyMerkleTree Variables

initEmptyMerkleTreeStruct: BeetArgsStruct<InitEmptyMerkleTreeInstructionArgs & { instructionDiscriminator: number[] }> = ...

InsertOrAppend Variables

insertOrAppendStruct: BeetArgsStruct<InsertOrAppendInstructionArgs & { instructionDiscriminator: number[] }> = ...

Instructions Variables

appendStruct: BeetArgsStruct<AppendInstructionArgs & { instructionDiscriminator: number[] }> = ...
closeEmptyTreeStruct: BeetArgsStruct<{ instructionDiscriminator: number[] }> = ...
initEmptyMerkleTreeStruct: BeetArgsStruct<InitEmptyMerkleTreeInstructionArgs & { instructionDiscriminator: number[] }> = ...
insertOrAppendStruct: BeetArgsStruct<InsertOrAppendInstructionArgs & { instructionDiscriminator: number[] }> = ...
replaceLeafStruct: BeetArgsStruct<ReplaceLeafInstructionArgs & { instructionDiscriminator: number[] }> = ...
transferAuthorityStruct: BeetArgsStruct<TransferAuthorityInstructionArgs & { instructionDiscriminator: number[] }> = ...
verifyLeafStruct: BeetArgsStruct<VerifyLeafInstructionArgs & { instructionDiscriminator: number[] }> = ...

Other Variables

ALL_DEPTH_SIZE_PAIRS: ValidDepthSizePair[] = ...

Valid pairs for creating a new ConcurrentMerkleTreeAccount

SPL_NOOP_ADDRESS: "noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV" = "noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV"
SPL_NOOP_PROGRAM_ID: PublicKey = ...
appendInstructionDiscriminator: number[] = ...
closeEmptyTreeInstructionDiscriminator: number[] = ...
initEmptyMerkleTreeInstructionDiscriminator: number[] = ...
insertOrAppendInstructionDiscriminator: number[] = ...
replaceLeafInstructionDiscriminator: number[] = ...
transferAuthorityInstructionDiscriminator: number[] = ...
verifyLeafInstructionDiscriminator: number[] = ...

ReplaceLeaf Variables

replaceLeafStruct: BeetArgsStruct<ReplaceLeafInstructionArgs & { instructionDiscriminator: number[] }> = ...

TransferAuthority Variables

transferAuthorityStruct: BeetArgsStruct<TransferAuthorityInstructionArgs & { instructionDiscriminator: number[] }> = ...

VerifyLeaf Variables

verifyLeafStruct: BeetArgsStruct<VerifyLeafInstructionArgs & { instructionDiscriminator: number[] }> = ...

constants Variables

SPL_ACCOUNT_COMPRESSION_ADDRESS: "cmtDvXumGCrqC1Age74AVPhSRVXJMd8PJS91L8KbNCK" = 'cmtDvXumGCrqC1Age74AVPhSRVXJMd8PJS91L8KbNCK'

Program address

SPL_ACCOUNT_COMPRESSION_PROGRAM_ID: PublicKey = ...

Program public key

generated Variables

SPL_ACCOUNT_COMPRESSION_ADDRESS: "cmtDvXumGCrqC1Age74AVPhSRVXJMd8PJS91L8KbNCK" = 'cmtDvXumGCrqC1Age74AVPhSRVXJMd8PJS91L8KbNCK'

Program address

SPL_ACCOUNT_COMPRESSION_PROGRAM_ID: PublicKey = ...

Program public key

accountCompressionEventBeet: FixableBeet<AccountCompressionEvent, Partial<AccountCompressionEvent>> = ...
appendStruct: BeetArgsStruct<AppendInstructionArgs & { instructionDiscriminator: number[] }> = ...
applicationDataEventBeet: FixableBeet<{ __kind: "V1" } & Omit<{ fields: [ApplicationDataEventV1] }, "void">, Partial<{ __kind: "V1" } & Omit<{ fields: [ApplicationDataEventV1] }, "void">>> = ...
applicationDataEventV1Beet: FixableBeetArgsStruct<ApplicationDataEventV1> = ...
changeLogEventBeet: FixableBeet<{ __kind: "V1" } & Omit<{ fields: [ChangeLogEventV1] }, "void">, Partial<{ __kind: "V1" } & Omit<{ fields: [ChangeLogEventV1] }, "void">>> = ...
changeLogEventV1Beet: FixableBeetArgsStruct<ChangeLogEventV1> = ...
closeEmptyTreeStruct: BeetArgsStruct<{ instructionDiscriminator: number[] }> = ...
compressionAccountTypeBeet: FixedSizeBeet<CompressionAccountType, CompressionAccountType> = ...
concurrentMerkleTreeHeaderBeet: FixableBeetArgsStruct<ConcurrentMerkleTreeHeader> = ...
concurrentMerkleTreeHeaderDataBeet: FixableBeet<{ __kind: "V1" } & Omit<{ fields: [ConcurrentMerkleTreeHeaderDataV1] }, "void">, Partial<{ __kind: "V1" } & Omit<{ fields: [ConcurrentMerkleTreeHeaderDataV1] }, "void">>> = ...
concurrentMerkleTreeHeaderDataV1Beet: BeetArgsStruct<ConcurrentMerkleTreeHeaderDataV1> = ...
initEmptyMerkleTreeStruct: BeetArgsStruct<InitEmptyMerkleTreeInstructionArgs & { instructionDiscriminator: number[] }> = ...
insertOrAppendStruct: BeetArgsStruct<InsertOrAppendInstructionArgs & { instructionDiscriminator: number[] }> = ...
pathNodeBeet: BeetArgsStruct<PathNode> = ...
replaceLeafStruct: BeetArgsStruct<ReplaceLeafInstructionArgs & { instructionDiscriminator: number[] }> = ...
transferAuthorityStruct: BeetArgsStruct<TransferAuthorityInstructionArgs & { instructionDiscriminator: number[] }> = ...
verifyLeafStruct: BeetArgsStruct<VerifyLeafInstructionArgs & { instructionDiscriminator: number[] }> = ...

userTypes Variables

accountCompressionEventBeet: FixableBeet<AccountCompressionEvent, Partial<AccountCompressionEvent>> = ...
applicationDataEventBeet: FixableBeet<{ __kind: "V1" } & Omit<{ fields: [ApplicationDataEventV1] }, "void">, Partial<{ __kind: "V1" } & Omit<{ fields: [ApplicationDataEventV1] }, "void">>> = ...
applicationDataEventV1Beet: FixableBeetArgsStruct<ApplicationDataEventV1> = ...
changeLogEventBeet: FixableBeet<{ __kind: "V1" } & Omit<{ fields: [ChangeLogEventV1] }, "void">, Partial<{ __kind: "V1" } & Omit<{ fields: [ChangeLogEventV1] }, "void">>> = ...
changeLogEventV1Beet: FixableBeetArgsStruct<ChangeLogEventV1> = ...
compressionAccountTypeBeet: FixedSizeBeet<CompressionAccountType, CompressionAccountType> = ...
concurrentMerkleTreeHeaderBeet: FixableBeetArgsStruct<ConcurrentMerkleTreeHeader> = ...
concurrentMerkleTreeHeaderDataBeet: FixableBeet<{ __kind: "V1" } & Omit<{ fields: [ConcurrentMerkleTreeHeaderDataV1] }, "void">, Partial<{ __kind: "V1" } & Omit<{ fields: [ConcurrentMerkleTreeHeaderDataV1] }, "void">>> = ...
concurrentMerkleTreeHeaderDataV1Beet: BeetArgsStruct<ConcurrentMerkleTreeHeaderDataV1> = ...
pathNodeBeet: BeetArgsStruct<PathNode> = ...

Append Functions

CloseEmptyTree Functions

Errors Functions

  • errorFromCode(code: number): MaybeErrorWithCode
  • Attempts to resolve a custom program error from the provided error code.

    Parameters

    • code: number

    Returns MaybeErrorWithCode

  • errorFromName(name: string): MaybeErrorWithCode
  • Attempts to resolve a custom program error from the provided error name, i.e. 'Unauthorized'.

    Parameters

    • name: string

    Returns MaybeErrorWithCode

InitEmptyMerkleTree Functions

InsertOrAppend Functions

Instructions Functions

Other Functions

  • addProof(instruction: TransactionInstruction, nodeProof: Buffer[]): TransactionInstruction
  • Helper function that adds proof nodes to a TransactionInstruction by adding extra keys to the transaction

    Parameters

    • instruction: TransactionInstruction
    • nodeProof: Buffer[]

    Returns TransactionInstruction

  • canopyBeetFactory(canopyDepth: number): BeetArgsStruct<Canopy>
  • Factory function for generating a beet that can deserialize an on-chain Canopy

    Canopy of depth N is an on-chain cache of the top N nodes in the ConcurrentMerkleTree. This is a total of 2^(N+1) - 1 nodes. Each node has 32 bytes. However, the current root of the tree is always stored in the most recent ChangeLog, so we only need to cache the remaining N-1 levels.

    The final formula for account size in bytes: (2^(N) - 1 - 1) * 32.

    Parameters

    • canopyDepth: number

    Returns BeetArgsStruct<Canopy>

  • concurrentMerkleTreeBeetFactory(maxDepth: number, maxBufferSize: number): BeetArgsStruct<ConcurrentMerkleTree>
  • createAllocTreeIx(connection: Connection, merkleTree: PublicKey, payer: PublicKey, depthSizePair: ValidDepthSizePair, canopyDepth: number): Promise<TransactionInstruction>
  • createAppendIx(merkleTree: PublicKey, authority: PublicKey, newLeaf: ArrayLike<number> | Buffer): TransactionInstruction
  • createCloseEmptyTreeIx(merkleTree: PublicKey, authority: PublicKey, recipient: PublicKey): TransactionInstruction
  • createInitEmptyMerkleTreeIx(merkleTree: PublicKey, authority: PublicKey, depthSizePair: ValidDepthSizePair): TransactionInstruction
  • createReplaceIx(merkleTree: PublicKey, authority: PublicKey, newLeaf: Buffer, proof: MerkleTreeProof): TransactionInstruction
  • createTransferAuthorityIx(merkleTree: PublicKey, authority: PublicKey, newAuthority: PublicKey): TransactionInstruction
  • createVerifyLeafIx(merkleTree: PublicKey, proof: MerkleTreeProof): TransactionInstruction
  • getCanopyDepth(canopyByteLength: number): number
  • getConcurrentMerkleTreeAccountSize(maxDepth: number, maxBufferSize: number, canopyDepth?: number, headerVersion?: string): number
  • Calculate the expected size of an ConcurrentMerkleTreeAccount

    Parameters

    • maxDepth: number
    • maxBufferSize: number
    • Optional canopyDepth: number
    • headerVersion: string = 'V1'

    Returns number

  • isAccountCompressionEventApplicationData(x: AccountCompressionEvent): x is never & { __kind: "ApplicationData" } & Omit<{ fields: [{ __kind: "V1" } & Omit<{ fields: [ApplicationDataEventV1] }, "void">] }, "void"> & { __kind: "ApplicationData" }
  • isAccountCompressionEventChangeLog(x: AccountCompressionEvent): x is { __kind: "ChangeLog" } & Omit<{ fields: [{ __kind: "V1" } & Omit<{ fields: [ChangeLogEventV1] }, "void">] }, "void"> & { __kind: "ChangeLog" } & never
  • isChangeLogEventV1(x: { __kind: "V1" } & Omit<{ fields: [ChangeLogEventV1] }, "void">): x is { __kind: "V1" } & Omit<{ fields: [ChangeLogEventV1] }, "void"> & { __kind: "V1" }
  • Parameters

    • x: { __kind: "V1" } & Omit<{ fields: [ChangeLogEventV1] }, "void">

    Returns x is { __kind: "V1" } & Omit<{ fields: [ChangeLogEventV1] }, "void"> & { __kind: "V1" }

  • pathBeetFactory(maxDepth: number): BeetArgsStruct<Path>
  • Factory function for generating a beet that can deserialize an on-chain Path

    Parameters

    • maxDepth: number

    Returns BeetArgsStruct<Path>

ReplaceLeaf Functions

TransferAuthority Functions

VerifyLeaf Functions

generated Functions

  • errorFromCode(code: number): MaybeErrorWithCode
  • Attempts to resolve a custom program error from the provided error code.

    Parameters

    • code: number

    Returns MaybeErrorWithCode

  • errorFromName(name: string): MaybeErrorWithCode
  • Attempts to resolve a custom program error from the provided error name, i.e. 'Unauthorized'.

    Parameters

    • name: string

    Returns MaybeErrorWithCode

Generated using TypeDoc