Skip to content

MerkleProof is used to represent a merkle proof. The merkle proof is used to prove that a leaf is in a merkle tree.

Defined in: packages/bitbadgesjs-sdk/src/core/misc.ts:684

MerkleProof is used to represent a merkle proof. The merkle proof is used to prove that a leaf is in a merkle tree.

Extends

Implements

  • MerkleProof

Constructors

Constructor

new MerkleProof(merkleProof): MerkleProof

Defined in: packages/bitbadgesjs-sdk/src/core/misc.ts:689

Parameters

merkleProof

iMerkleProof

Returns

MerkleProof

Overrides

CustomTypeClass<MerkleProof>.constructor

Properties

aunts

aunts: MerklePathItem[]

Defined in: packages/bitbadgesjs-sdk/src/core/misc.ts:685

Implementation of

MerkleProof.aunts


leaf

leaf: string

Defined in: packages/bitbadgesjs-sdk/src/core/misc.ts:686

Implementation of

MerkleProof.leaf


leafSignature

leafSignature: string

Defined in: packages/bitbadgesjs-sdk/src/core/misc.ts:687

Implementation of

MerkleProof.leafSignature

Methods

clone()

clone(): MerkleProof

Defined in: packages/bitbadgesjs-sdk/src/core/misc.ts:708

Returns

MerkleProof

Implementation of

MerkleProof.clone

Overrides

CustomTypeClass.clone


convert()

convert<U>(_convertFunction?, options?): CustomType<any>

Defined in: packages/bitbadgesjs-sdk/src/common/base.ts:124

Type Parameters

U

U extends NumberType

Parameters

_convertFunction?

(val) => U

options?

ConvertOptions

Returns

CustomType<any>

Deprecated

This function is unnecessary as this field has no numeric types. Please use the .clone() method instead.

Implementation of

MerkleProof.convert

Inherited from

CustomTypeClass.convert


equals()

equals<U>(other, normalizeNumberTypes?): boolean

Defined in: packages/bitbadgesjs-sdk/src/common/base.ts:101

Compares this object's fields to another object's fields for equality. Equality is determined by comparing the JSON representations of the objects.

If normalizeNumberTypes is true, then all number types will be compared as strings (i.e. "1n" === "1" === 1). Else, they will be compared as their native types (i.e. 1n !== 1 !== "1").

Type Parameters

U

U extends CustomType<U>

Parameters

other

CustomType<U> | null | undefined

normalizeNumberTypes?

boolean

Returns

boolean

Implementation of

MerkleProof.equals

Inherited from

CustomTypeClass.equals


getNumberFieldNames()

getNumberFieldNames(): string[]

Defined in: packages/bitbadgesjs-sdk/src/common/base.ts:111

Internal helper method to convert the number fields of the object to a different NumberType equivalent.

Returns

string[]

Implementation of

MerkleProof.getNumberFieldNames

Inherited from

CustomTypeClass.getNumberFieldNames


hasNumberFields()

hasNumberFields(): boolean

Defined in: packages/bitbadgesjs-sdk/src/common/base.ts:115

Checks if the object has number fields.

Returns

boolean

Implementation of

MerkleProof.hasNumberFields

Inherited from

CustomTypeClass.hasNumberFields


toJson()

toJson(): JsonObject

Defined in: packages/bitbadgesjs-sdk/src/common/base.ts:93

Converts the object to a JSON object with all primitive types.

Returns

JsonObject

Implementation of

MerkleProof.toJson

Inherited from

CustomTypeClass.toJson


toJsonString()

toJsonString(): string

Defined in: packages/bitbadgesjs-sdk/src/common/base.ts:97

Converts the object to a JSON string.

Returns

string

Implementation of

MerkleProof.toJsonString

Inherited from

CustomTypeClass.toJsonString


toProto()

toProto(): MerkleProof

Defined in: packages/bitbadgesjs-sdk/src/core/misc.ts:704

Returns

MerkleProof

Implementation of

MerkleProof.toProto


fromJson()

static fromJson(jsonValue, options?): MerkleProof

Defined in: packages/bitbadgesjs-sdk/src/core/misc.ts:712

Parameters

jsonValue

JsonValue

options?

Partial<JsonReadOptions>

Returns

MerkleProof


fromJsonString()

static fromJsonString(jsonString, options?): MerkleProof

Defined in: packages/bitbadgesjs-sdk/src/core/misc.ts:716

Parameters

jsonString

string

options?

Partial<JsonReadOptions>

Returns

MerkleProof


fromProto()

static fromProto(item): MerkleProof

Defined in: packages/bitbadgesjs-sdk/src/core/misc.ts:720

Parameters

item

MerkleProof

Returns

MerkleProof


required()

static required(): MerkleProof

Defined in: packages/bitbadgesjs-sdk/src/core/misc.ts:696

Returns

MerkleProof

Edit this page on GitHub