Masa SDK v4.2.0 • Docs
Masa SDK v4.2.0 / SoulLinker
MasaContractModuleBase
new SoulLinker(
masa
,instances
):SoulLinker
• masa: MasaInterface
• instances: IIdentityContracts
MasaContractModuleBase.constructor
protected
instances:IIdentityContracts
MasaContractModuleBase.instances
protected
readonly
masa:MasaInterface
MasaContractModuleBase.masa
readonly
types:Record
<string
,TypedDataField
[]>
addLink(
tokenAddress
,paymentMethod
,readerIdentityId
,ownerIdentityId
,tokenId
,signatureDate
,expirationDate
,signature
,slippage
):Promise
<BaseResult
>
Adds a link to the soullinker
• tokenAddress: string
• paymentMethod: PaymentMethod
• readerIdentityId: BigNumber
• ownerIdentityId: BigNumber
• tokenId: BigNumber
• signatureDate: number
• expirationDate: number
• signature: string
• slippage: undefined
| number
= 250
Promise
<BaseResult
>
breakLink(
contract
,tokenId
,readerIdentityId
):Promise
<BaseResult
>
• contract: Contract
• tokenId: BigNumber
• readerIdentityId: BigNumber
Promise
<BaseResult
>
protected
createOverrides(value
?):Promise
<PayableOverrides
>
• value?: BigNumber
Promise
<PayableOverrides
>
MasaContractModuleBase.createOverrides
protected
estimateGasWithSlippage(estimateGas
,args
?,overrides
?):Promise
<BigNumber
>
• estimateGas
• args?: unknown
[]
• overrides?: PayableOverrides
Promise
<BigNumber
>
MasaContractModuleBase.estimateGasWithSlippage
protected
formatPrice(paymentAddress
,price
):Promise
<string
>
• paymentAddress: string
• price: BigNumber
Promise
<string
>
MasaContractModuleBase.formatPrice
protected
getNetworkFeeInformation():Promise
<undefined
|FeeData
>
Promise
<undefined
| FeeData
>
MasaContractModuleBase.getNetworkFeeInformation
getPrice(
tokenAddress
,paymentMethod
,slippage
):Promise
<PriceInformation
>
Gets price for establishing a link
• tokenAddress: string
• paymentMethod: PaymentMethod
• slippage: undefined
| number
= 250
Promise
<PriceInformation
>
signLink(
readerIdentityId
,ownerIdentityId
,tokenAddress
,tokenId
,signatureDate
,expirationOffset
):Promise
<object
>
Signs a soul linker link
• readerIdentityId: BigNumber
• ownerIdentityId: BigNumber
• tokenAddress: string
• tokenId: BigNumber
• signatureDate: number
= ...
• expirationOffset: number
= ...
Promise
<object
>
expirationDate:
number
signature:
string
signatureDate:
number
protected
verify(errorMessage
,contract
,domain
,types
,value
,signature
,authorityAddress
):Promise
<void
>
verify a signature created during one of the SBT signing flows
• 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
Promise
<void
>
MasaContractModuleBase.verify
protected
static
addSlippage(price
,slippage
):BigNumber
adds a percentage to the price as slippage
• price: BigNumber
• slippage: number
BigNumber
MasaContractModuleBase.addSlippage