Hierarchy

  • SolMerkleTree

Constructors

Properties

merkleTree: MerkleTree
pubkey: PublicKey

Methods

  • Parameters

    • merkleTreePubkey: PublicKey
    • Optional provider: default

    Returns Promise<{
        leavesAccounts: any[];
        merkleTreeIndex: BN;
        mtFetched: DecodeStruct<{
            fields: [{
                name: "assetPoolPubkey";
                type: "publicKey";
            }, {
                name: "poolType";
                type: {
                    array: ["u8", 32];
                };
            }, {
                name: "index";
                type: "u64";
            }];
            kind: "struct";
        } | {
            fields: [{
                name: "poolType";
                type: {
                    array: ["u8", 32];
                };
            }];
            kind: "struct";
        } | {
            fields: [{
                name: "pubkey";
                type: "publicKey";
            }, {
                name: "merkleTreeIndex";
                type: "u64";
            }, {
                name: "registeredAssetIndex";
                type: "u64";
            }, {
                name: "enableNfts";
                type: "bool";
            }, {
                name: "enablePermissionlessSplTokens";
                type: "bool";
            }, {
                name: "enablePermissionlessMerkleTreeRegistration";
                type: "bool";
            }];
            kind: "struct";
        } | {
            fields: [{
                name: "pubkey";
                type: "publicKey";
            }];
            kind: "struct";
        } | {
            fields: [{
                name: "merkleTree";
                type: {
                    defined: "MerkleTree<Sha256,MessageMerkleTreeConfig>";
                };
            }];
            kind: "struct";
        } | {
            fields: [];
            kind: "struct";
        } | {
            fields: [{
                name: "nextIndex";
                type: "u64";
            }];
            kind: "struct";
        } | {
            fields: [{
                name: "filledSubtrees";
                type: {
                    array: [{
                        array: ["u8", 32];
                    }, 18];
                };
            }, {
                name: "currentRootIndex";
                type: "u64";
            }, {
                name: "nextIndex";
                type: "u64";
            }, {
                name: "roots";
                type: {
                    array: [{
                        array: ["u8", 32];
                    }, 256];
                };
            }, {
                name: "pubkeyLocked";
                type: "publicKey";
            }, {
                name: "timeLocked";
                type: "u64";
            }];
            kind: "struct";
        } | {
            fields: [{
                name: "nodeLeft";
                type: {
                    array: ["u8", 32];
                };
            }, {
                name: "nodeRight";
                type: {
                    array: ["u8", 32];
                };
            }, {
                name: "merkleTreePubkey";
                type: "publicKey";
            }, {
                name: "encryptedUtxos";
                type: {
                    array: ["u8", 256];
                };
            }, {
                name: "leftLeafIndex";
                type: "u64";
            }];
            kind: "struct";
        } | {
            fields: [{
                name: "nodeLeft";
                type: {
                    array: ["u8", 32];
                };
            }, {
                name: "nodeRight";
                type: {
                    array: ["u8", 32];
                };
            }, {
                name: "leafLeft";
                type: {
                    array: ["u8", 32];
                };
            }, {
                name: "leafRight";
                type: {
                    array: ["u8", 32];
                };
            }, {
                name: "relayer";
                type: "publicKey";
            }, {
                name: "merkleTreePdaPubkey";
                type: "publicKey";
            }];
            kind: "struct";
        }, RecursiveDepth4<[{
            name: "MerkleTree<Sha256,MessageMerkleTreeConfig>";
            type: {
                fields: [{
                    docs: ["Height of the Merkle tree."];
                    name: "height";
                    type: "u64";
                }, {
                    docs: ["Subtree hashes."];
                    name: "filledSubtrees";
                    type: {
                        array: [{
                            array: ["u8", 32];
                        }, 18];
                    };
                }, {
                    docs: ["Full history of roots of the Merkle tree (the last one is the current", "one)."];
                    name: "roots";
                    type: {
                        array: [{
                            array: ["u8", 32];
                        }, 20];
                    };
                }, {
                    docs: ["Next index to insert a leaf."];
                    name: "nextIndex";
                    type: "u64";
                }, {
                    docs: ["Current index of the root."];
                    name: "currentRootIndex";
                    type: "u64";
                }, {
                    docs: ["Hash implementation used on the Merkle tree."];
                    name: "hashFunction";
                    type: {
                        defined: "HashFunction";
                    };
                }];
                kind: "struct";
            };
        }, {
            name: "HashFunction";
            type: {
                kind: "enum";
                variants: [{
                    name: "Sha256";
                }, {
                    name: "Poseidon";
                }];
            };
        }], DecodedHelper<[{
            name: "MerkleTree<Sha256,MessageMerkleTreeConfig>";
            type: {
                fields: [{
                    docs: ["Height of the Merkle tree."];
                    name: "height";
                    type: "u64";
                }, {
                    docs: ["Subtree hashes."];
                    name: "filledSubtrees";
                    type: {
                        array: [{
                            array: ["u8", 32];
                        }, 18];
                    };
                }, {
                    docs: ["Full history of roots of the Merkle tree (the last one is the current", "one)."];
                    name: "roots";
                    type: {
                        array: [{
                            array: ["u8", 32];
                        }, 20];
                    };
                }, {
                    docs: ["Next index to insert a leaf."];
                    name: "nextIndex";
                    type: "u64";
                }, {
                    docs: ["Current index of the root."];
                    name: "currentRootIndex";
                    type: "u64";
                }, {
                    docs: ["Hash implementation used on the Merkle tree."];
                    name: "hashFunction";
                    type: {
                        defined: "HashFunction";
                    };
                }];
                kind: "struct";
            };
        }, {
            name: "HashFunction";
            type: {
                kind: "enum";
                variants: [{
                    name: "Sha256";
                }, {
                    name: "Poseidon";
                }];
            };
        }], DecodedHelper<[{
            name: "MerkleTree<Sha256,MessageMerkleTreeConfig>";
            type: {
                fields: [{
                    docs: ["Height of the Merkle tree."];
                    name: "height";
                    type: "u64";
                }, {
                    docs: ["Subtree hashes."];
                    name: "filledSubtrees";
                    type: {
                        array: [{
                            array: ["u8", 32];
                        }, 18];
                    };
                }, {
                    docs: ["Full history of roots of the Merkle tree (the last one is the current", "one)."];
                    name: "roots";
                    type: {
                        array: [{
                            array: ["u8", 32];
                        }, 20];
                    };
                }, {
                    docs: ["Next index to insert a leaf."];
                    name: "nextIndex";
                    type: "u64";
                }, {
                    docs: ["Current index of the root."];
                    name: "currentRootIndex";
                    type: "u64";
                }, {
                    docs: ["Hash implementation used on the Merkle tree."];
                    name: "hashFunction";
                    type: {
                        defined: "HashFunction";
                    };
                }];
                kind: "struct";
            };
        }, {
            name: "HashFunction";
            type: {
                kind: "enum";
                variants: [{
                    name: "Sha256";
                }, {
                    name: "Poseidon";
                }];
            };
        }], DecodedHelper<[{
            name: "MerkleTree<Sha256,MessageMerkleTreeConfig>";
            type: {
                fields: [{
                    docs: ["Height of the Merkle tree."];
                    name: "height";
                    type: "u64";
                }, {
                    docs: ["Subtree hashes."];
                    name: "filledSubtrees";
                    type: {
                        array: [{
                            array: ["u8", 32];
                        }, 18];
                    };
                }, {
                    docs: ["Full history of roots of the Merkle tree (the last one is the current", "one)."];
                    name: "roots";
                    type: {
                        array: [{
                            array: ["u8", 32];
                        }, 20];
                    };
                }, {
                    docs: ["Next index to insert a leaf."];
                    name: "nextIndex";
                    type: "u64";
                }, {
                    docs: ["Current index of the root."];
                    name: "currentRootIndex";
                    type: "u64";
                }, {
                    docs: ["Hash implementation used on the Merkle tree."];
                    name: "hashFunction";
                    type: {
                        defined: "HashFunction";
                    };
                }];
                kind: "struct";
            };
        }, {
            name: "HashFunction";
            type: {
                kind: "enum";
                variants: [{
                    name: "Sha256";
                }, {
                    name: "Poseidon";
                }];
            };
        }], EmptyDefined>>>>>;
    }>

  • Parameters

    • merkleTreePubkey: PublicKey
    • Optional provider: default

    Returns Promise<{
        account: any;
        publicKey: PublicKey;
    }[]>

  • Parameters

    • merkleTreePubkey: PublicKey
    • Optional provider: default

    Returns Promise<{
        isSigner: boolean;
        isWritable: boolean;
        pubkey: PublicKey;
    }[]>

Generated using TypeDoc