SoulName
[# Masa SDK
- v3.34.1](/docs/developers/sdk/) / Exports / SoulName
Class: SoulName
Hierarchy
MasaContractModuleBase
↳
SoulName
Table of contents
Constructors
Properties
Methods
- burn
- checkOrGiveAllowance
- createOverrides
- estimateGasWithSlippage
- formatPrice
- getNetworkFeeInformation
- getPaymentAddress
- getPrice
- getSoulnameData
- isAvailable
- purchase
- renew
- sign
- transfer
- verify
- addSlippage
Constructors
constructor
• new SoulName(masa
, instances
): SoulName
Parameters
Name | Type |
---|---|
masa | MasaInterface |
instances | IIdentityContracts |
Returns
Inherited from
MasaContractModuleBase.constructor
Properties
instances
• Protected
instances: IIdentityContracts
Inherited from
MasaContractModuleBase.instances
masa
• Protected
Readonly
masa: MasaInterface
Inherited from
MasaContractModuleBase.masa
types
• Readonly
types: Record
\<string
, TypedDataField
[]>
Methods
burn
▸ burn(soulName
): Promise
\<BaseResult
>
Parameters
Name | Type |
---|---|
soulName | string |
Returns
Promise
\<BaseResult
>
checkOrGiveAllowance
▸ checkOrGiveAllowance(paymentAddress
, paymentMethod
, spenderAddress
, price
): Promise
\<undefined
| ContractReceipt
>
Checks or gives allowance on ERC20 tokens
Parameters
Name | Type |
---|---|
paymentAddress | string |
paymentMethod | PaymentMethod |
spenderAddress | string |
price | BigNumber |
Returns
Promise
\<undefined
| ContractReceipt
>
Inherited from
MasaContractModuleBase.checkOrGiveAllowance
createOverrides
▸ createOverrides(value?
): Promise
\<PayableOverrides
>
Parameters
Name | Type |
---|---|
value? | BigNumber |
Returns
Promise
\<PayableOverrides
>
Inherited from
MasaContractModuleBase.createOverrides
estimateGasWithSlippage
▸ estimateGasWithSlippage(estimateGas
, args?
, overrides?
): Promise
\<BigNumber
>
Parameters
Name | Type |
---|---|
estimateGas | (...estimateGasArgAndOverrides : never []) => Promise \<BigNumber > |
args? | unknown [] |
overrides? | PayableOverrides |
Returns
Promise
\<BigNumber
>
Inherited from
MasaContractModuleBase.estimateGasWithSlippage
formatPrice
▸ formatPrice(paymentAddress
, price
): Promise
\<string
>
Parameters
Name | Type |
---|---|
paymentAddress | string |
price | BigNumber |
Returns
Promise
\<string
>
Inherited from
MasaContractModuleBase.formatPrice
getNetworkFeeInformation
▸ getNetworkFeeInformation(): Promise
\<undefined
| FeeData
>
Returns
Promise
\<undefined
| FeeData
>
Inherited from
MasaContractModuleBase.getNetworkFeeInformation
getPaymentAddress
▸ getPaymentAddress(paymentMethod
): string
Gets the payment address for a given payment method
Parameters
Name | Type |
---|---|
paymentMethod | PaymentMethod |
Returns
string
Inherited from
MasaContractModuleBase.getPaymentAddress
getPrice
▸ getPrice(paymentMethod
, nameLength
, duration?
, slippage?
): Promise
\<PriceInformation
>
Get price for minting a soul name
Parameters
Name | Type | Default value |
---|---|---|
paymentMethod | PaymentMethod | undefined |
nameLength | number | undefined |
duration | number | 1 |
slippage | undefined | number | 250 |
Returns
Promise
\<PriceInformation
>
getSoulnameData
▸ getSoulnameData(soulName
): Promise
\<{ exists
: boolean
; tokenId
: BigNumber
}>
Returns detailed information for a soul name
Parameters
Name | Type |
---|---|
soulName | string |
Returns
Promise
\<{ exists
: boolean
; tokenId
: BigNumber
}>
isAvailable
▸ isAvailable(soulName
): Promise
\<boolean
>
Check if a soul name is available
Parameters
Name | Type |
---|---|
soulName | string |
Returns
Promise
\<boolean
>
purchase
▸ purchase(paymentMethod
, name
, nameLength
, duration?
, metadataURL
, authorityAddress
, signature
, receiver?
): Promise
\<ContractTransaction
>
purchase only name
Parameters
Name | Type | Default value |
---|---|---|
paymentMethod | PaymentMethod | undefined |
name | string | undefined |
nameLength | number | undefined |
duration | number | 1 |
metadataURL | string | undefined |
authorityAddress | string | undefined |
signature | string | undefined |
receiver? | string | undefined |
Returns
Promise
\<ContractTransaction
>
renew
▸ renew(soulName
, years
): Promise
\<BaseResult
>
Parameters
Name | Type |
---|---|
soulName | string |
years | number |
Returns
Promise
\<BaseResult
>
sign
▸ sign(soulName
, soulNameLength
, duration
, metadataUrl
, receiver
): Promise
\<undefined
| { authorityAddress
: string
; signature
: string
}>
signs a soul name
Parameters
Name | Type |
---|---|
soulName | string |
soulNameLength | number |
duration | number |
metadataUrl | string |
receiver | string |
Returns
Promise
\<undefined
| { authorityAddress
: string
; signature
: string
}>
transfer
▸ transfer(soulName
, receiver
): Promise
\<BaseResult
>
Parameters
Name | Type |
---|---|
soulName | string |
receiver | string |
Returns
Promise
\<BaseResult
>
verify
▸ verify(errorMessage
, contract
, domain
, types
, value
, signature
, authorityAddress
): Promise
\<void
>
verify a signature created during one of the SBT signing flows
Parameters
Name | Type |
---|---|
errorMessage | string |
contract | SoulLinker | SoulStore | MasaSBT | MasaSBTSelfSovereign | MasaSBTAuthority |
domain | TypedDataDomain |
types | Record \<string , TypedDataField []> |
value | Record \<string , string | number | boolean | BigNumber > |
signature | string |
authorityAddress | string |
Returns
Promise
\<void
>
Inherited from
MasaContractModuleBase.verify
addSlippage
▸ addSlippage(price
, slippage
): BigNumber
adds a percentage to the price as slippage
Parameters
Name | Type |
---|---|
price | BigNumber |
slippage | number |
Returns
BigNumber
Inherited from
MasaContractModuleBase.addSlippage