Reference / Modules / node-api / FeesEstimator
Class: FeesEstimator
node-api.FeesEstimator
Table of contents
Constructors
Properties
Methods
- ensureEnoughFunds
- estimateAddCollectionItem
- estimateAddTokensRecord
- estimateCertificateFee
- estimateCreateLoc
- estimateInclusionFee
- estimateStorageFee
- estimateWithStorage
- estimateWithoutStorage
- getDefaultLegalFee
Constructors
constructor
• new FeesEstimator(api
): FeesEstimator
Parameters
Name | Type |
---|---|
api | ApiPromise |
Returns
Defined in
Properties
api
• Private
Readonly
api: ApiPromise
Defined in
Methods
ensureEnoughFunds
▸ ensureEnoughFunds(params
): Promise
<void
>
Parameters
Name | Type |
---|---|
params | Object |
params.fees | Fees |
params.origin | ValidAccountId |
Returns
Promise
<void
>
Defined in
estimateAddCollectionItem
▸ estimateAddCollectionItem(params
): Promise
<Fees
>
Parameters
Name | Type |
---|---|
params | Object |
params.collectionItemFee | Lgnt |
params.numOfEntries | bigint |
params.origin | ValidAccountId |
params.submittable | SubmittableExtrinsic |
params.tokenIssuance | undefined | bigint |
params.totSize | bigint |
Returns
Promise
<Fees
>
Defined in
estimateAddTokensRecord
▸ estimateAddTokensRecord(params
): Promise
<Fees
>
Parameters
Name | Type |
---|---|
params | Object |
params.numOfEntries | bigint |
params.origin | ValidAccountId |
params.submittable | SubmittableExtrinsic |
params.tokensRecordFee | Lgnt |
params.totSize | bigint |
Returns
Promise
<Fees
>
Defined in
estimateCertificateFee
▸ estimateCertificateFee(params
): Promise
<Lgnt
>
Parameters
Name | Type |
---|---|
params | Object |
params.tokenIssuance | bigint |
Returns
Promise
<Lgnt
>
Defined in
estimateCreateLoc
▸ estimateCreateLoc(params
): Promise
<Fees
>
Parameters
Name | Type |
---|---|
params | Object |
params.legalFee? | Lgnt |
params.locType | LocType |
params.origin | ValidAccountId |
params.storageSize? | bigint |
params.submittable | SubmittableExtrinsic |
params.valueFee? | Lgnt |
Returns
Promise
<Fees
>
Defined in
estimateInclusionFee
▸ estimateInclusionFee(origin
, submittable
): Promise
<Lgnt
>
Parameters
Name | Type |
---|---|
origin | ValidAccountId |
submittable | SubmittableExtrinsic |
Returns
Promise
<Lgnt
>
Defined in
estimateStorageFee
▸ estimateStorageFee(params
): Promise
<Lgnt
>
Parameters
Name | Type |
---|---|
params | Object |
params.numOfEntries | bigint |
params.totSize | bigint |
Returns
Promise
<Lgnt
>
Defined in
estimateWithStorage
▸ estimateWithStorage(params
): Promise
<Fees
>
Parameters
Name | Type |
---|---|
params | Object |
params.origin | ValidAccountId |
params.size | bigint |
params.submittable | SubmittableExtrinsic |
Returns
Promise
<Fees
>
Defined in
estimateWithoutStorage
▸ estimateWithoutStorage(params
): Promise
<Fees
>
Parameters
Name | Type |
---|---|
params | Object |
params.origin | ValidAccountId |
params.submittable | SubmittableExtrinsic |
Returns
Promise
<Fees
>
Defined in
getDefaultLegalFee
▸ getDefaultLegalFee(params
): Lgnt
Parameters
Name | Type |
---|---|
params | Object |
params.locType | LocType |