Skip to main content

Identity

[# Masa SDK

  • v3.30.3](/docs/developers/sdk/) / Exports / Identity

Class: Identity

Hierarchy

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new Identity(masa, instances): Identity

Parameters

NameType
masaMasaInterface
instancesIIdentityContracts

Returns

Identity

Inherited from

MasaSBTModuleBase.constructor

Properties

instances

Protected instances: IIdentityContracts

Inherited from

MasaSBTModuleBase.instances


masa

Protected Readonly masa: MasaInterface

Inherited from

MasaSBTModuleBase.masa

Methods

burn

burn(identityId): Promise\<BaseResult>

Parameters

NameType
identityIdBigNumber

Returns

Promise\<BaseResult>


checkOrGiveAllowance

checkOrGiveAllowance(paymentAddress, paymentMethod, spenderAddress, price): Promise\<undefined | ContractReceipt>

Checks or gives allowance on ERC20 tokens

Parameters

NameType
paymentAddressstring
paymentMethodPaymentMethod
spenderAddressstring
priceBigNumber

Returns

Promise\<undefined | ContractReceipt>

Inherited from

MasaSBTModuleBase.checkOrGiveAllowance


createOverrides

createOverrides(value?): Promise\<PayableOverrides>

Parameters

NameType
value?BigNumber

Returns

Promise\<PayableOverrides>

Inherited from

MasaSBTModuleBase.createOverrides


estimateGasWithSlippage

estimateGasWithSlippage(estimateGas, args?, overrides?): Promise\<BigNumber>

Parameters

NameType
estimateGas(...estimateGasArgAndOverrides: never[]) => Promise\<BigNumber>
args?unknown[]
overrides?PayableOverrides

Returns

Promise\<BigNumber>

Inherited from

MasaSBTModuleBase.estimateGasWithSlippage


formatPrice

formatPrice(paymentAddress, price): Promise\<string>

Parameters

NameType
paymentAddressstring
priceBigNumber

Returns

Promise\<string>

Inherited from

MasaSBTModuleBase.formatPrice


getMintPrice

getMintPrice(paymentMethod, contract, slippage?): Promise\<PriceInformation>

Parameters

NameTypeDefault value
paymentMethodPaymentMethodundefined
contractMasaSBTundefined
slippageundefined | number250

Returns

Promise\<PriceInformation>

Inherited from

MasaSBTModuleBase.getMintPrice


getNetworkFeeInformation

getNetworkFeeInformation(): Promise\<undefined | FeeData>

Returns

Promise\<undefined | FeeData>

Inherited from

MasaSBTModuleBase.getNetworkFeeInformation


getPaymentAddress

getPaymentAddress(paymentMethod): string

Gets the payment address for a given payment method

Parameters

NameType
paymentMethodPaymentMethod

Returns

string

Inherited from

MasaSBTModuleBase.getPaymentAddress


loadSBTContract

loadSBTContract\<Contract>(address, factory): Promise\<Contract>

Type parameters

NameType
Contractextends MasaSBT

Parameters

NameType
addressstring
factoryContractFactory

Returns

Promise\<Contract>

Inherited from

MasaSBTModuleBase.loadSBTContract


purchase

purchase(): Promise\<ContractTransaction>

purchase only identity

Returns

Promise\<ContractTransaction>


purchaseIdentityAndName

purchaseIdentityAndName(paymentMethod, name, nameLength, duration?, metadataURL, authorityAddress, signature): Promise\<ContractTransaction>

purchase identity with name

Parameters

NameTypeDefault value
paymentMethodPaymentMethodundefined
namestringundefined
nameLengthnumberundefined
durationnumber1
metadataURLstringundefined
authorityAddressstringundefined
signaturestringundefined

Returns

Promise\<ContractTransaction>


verify

verify(errorMessage, contract, domain, types, value, signature, authorityAddress): Promise\<void>

verify a signature created during one of the SBT signing flows

Parameters

NameType
errorMessagestring
contractSoulLinker | SoulStore | MasaSBT | MasaSBTSelfSovereign | MasaSBTAuthority
domainTypedDataDomain
typesRecord\<string, TypedDataField[]>
valueRecord\<string, string | number | boolean | BigNumber>
signaturestring
authorityAddressstring

Returns

Promise\<void>

Inherited from

MasaSBTModuleBase.verify


addSlippage

addSlippage(price, slippage): BigNumber

adds a percentage to the price as slippage

Parameters

NameType
priceBigNumber
slippagenumber

Returns

BigNumber

Inherited from

MasaSBTModuleBase.addSlippage