From aa50738d0f1159268da0122ac0aad4bc0c00b951 Mon Sep 17 00:00:00 2001 From: tarikgul Date: Tue, 7 Nov 2023 18:55:31 -0500 Subject: [PATCH] RelayToSystem inline docs --- src/createXcmTypes/RelayToPara.ts | 6 +++--- src/createXcmTypes/RelayToSystem.ts | 30 +++++++++++------------------ 2 files changed, 14 insertions(+), 22 deletions(-) diff --git a/src/createXcmTypes/RelayToPara.ts b/src/createXcmTypes/RelayToPara.ts index 343ff08a..d1d7e51a 100644 --- a/src/createXcmTypes/RelayToPara.ts +++ b/src/createXcmTypes/RelayToPara.ts @@ -17,7 +17,7 @@ import { */ export const RelayToPara: ICreateXcmType = { /** - * Create a XcmVersionedMultiLocation type for a beneficiary. + * Create a XcmVersionedMultiLocation structured type for a beneficiary. * * @param accountId The accountId of the beneficiary. * @param xcmVersion The accepted xcm version. @@ -49,7 +49,7 @@ export const RelayToPara: ICreateXcmType = { }; }, /** - * Create a XcmVersionedMultiLocation type for a destination. + * Create a XcmVersionedMultiLocation structured type for a destination. * * @param destId The parachain Id of the destination. * @param xcmVersion The accepted xcm version. @@ -80,7 +80,7 @@ export const RelayToPara: ICreateXcmType = { }; }, /** - * Create a VersionedMultiAsset type. + * Create a VersionedMultiAsset structured type. * * @param amounts The amount for a relay native asset. The length will always be one. * @param xcmVersion The accepted xcm version. diff --git a/src/createXcmTypes/RelayToSystem.ts b/src/createXcmTypes/RelayToSystem.ts index 00842772..f30f13b2 100644 --- a/src/createXcmTypes/RelayToSystem.ts +++ b/src/createXcmTypes/RelayToSystem.ts @@ -15,10 +15,10 @@ import { */ export const RelayToSystem: ICreateXcmType = { /** - * Create a XcmVersionedMultiLocation type for a beneficiary. + * Create a XcmVersionedMultiLocation structured type for a beneficiary. * - * @param accountId The accountId of the beneficiary - * @param xcmVersion The accepted xcm version + * @param accountId The accountId of the beneficiary. + * @param xcmVersion The accepted xcm version. */ createBeneficiary: (accountId: string, xcmVersion: number): XcmDestBenificiary => { if (xcmVersion === 2) { @@ -51,9 +51,8 @@ export const RelayToSystem: ICreateXcmType = { }; }, /** - * Create a XcmVersionedMultiLocation type for a destination. + * Create a XcmVersionedMultiLocation structured type for a destination. * - * @param api ApiPromise * @param destId The parachain Id of the destination * @param xcmVersion The accepted xcm version */ @@ -83,12 +82,10 @@ export const RelayToSystem: ICreateXcmType = { }; }, /** - * Create a VersionedMultiAsset type. + * Create a VersionedMultiAsset structured type. * - * @param api ApiPromise - * @param assets Assets to be sent - * @param amounts - * @param xcmVersion + * @param amounts The amount for a relay native asset. The length will always be one. + * @param xcmVersion The accepted xcm version. */ createAssets: async (amounts: string[], xcmVersion: number): Promise => { const multiAssets = []; @@ -121,12 +118,9 @@ export const RelayToSystem: ICreateXcmType = { } }, /** - * Create an XcmV3WeightLimit type. + * Create an Xcm WeightLimit structured type. * - * @param api ApiPromise - * @param isLimited Whether the tx is limited - * @param refTime amount of computation time - * @param proofSize amount of storage to be used + * @param opts Options that are used for WeightLimit. */ createWeightLimit: (opts: CreateWeightLimitOpts): XcmWeight => { return opts.isLimited && opts.weightLimit?.refTime && opts.weightLimit?.proofSize @@ -138,11 +132,9 @@ export const RelayToSystem: ICreateXcmType = { } : { Unlimited: null }; }, - /** - * return the correct feeAssetItem based on XCM direction. - * - * @param api ApiPromise + * Return the correct feeAssetItem based on XCM direction. + * In this case it will always be zero since there is no `feeAssetItem` for this direction. */ createFeeAssetItem: async (_: ApiPromise): Promise => { return await Promise.resolve(0);