You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
.to(TChain/*,customParaId - optional*/|Locationobject/*Only works for PolkadotXCM pallet*/) //'AssetHubPolkadot' | 'Hydration' | 'Moonbeam' | 'Polkadot' | ... https://paraspell.github.io/docs/sdk/AssetPallet.html#import-chains-as-types
15
15
.currency(CURRENCY_SPEC) // Refer to currency spec options below
16
16
.address(address|Locationobject/*If you are sending through xTokens, you need to pass the destination and address location in one object (x2)*/)
17
-
.senderAddress(address) // - OPTIONAL but strongly recommended as it is automatically ignored when not needed - Used when origin is AssetHub/Hydration with feeAsset or when sending to AssetHub to prevent asset traps by auto-swapping to DOT to have DOT ED.
17
+
.senderAddress(address|PAPI_SIGNER/*Only in PAPI SDK*/| {address, PJS_SIGNER} /*Only in PJS SDK*/) // - OPTIONAL but strongly recommended as it is automatically ignored when not needed - Used when origin is AssetHub/Hydration with feeAsset or when sending to AssetHub to prevent asset traps by auto-swapping to DOT to have DOT ED.
18
18
19
19
const tx =awaitbuilder.build()
20
+
// Or if you use signers in senderAddress:
21
+
// await builder.signAndSubmit() - Signs and submits the transaction; returns TX hash for tracking
20
22
21
23
// Make sure to disconnect API after it is no longer used (eg. after transaction)
22
24
awaitbuilder.disconnect()
@@ -67,7 +69,7 @@ Asset selection of multiple assets:
67
69
These can be added to further customize your calls.
.ahAddress(ahAddress) //- OPTIONAL - used when origin is EVM CHAIN and XCM goes through AssetHub (Multihop transfer where we are unable to convert Key20 to ID32 address eg. origin: Moonbeam & destination: Ethereum (Multihop goes from Moonbeam > AssetHub > BridgeHub > Ethereum)
71
73
.feeAsset({symbol: 'symbol'} || {id: 'id'} || {location: 'location'}) // Optional parameter used when multiple assets are provided or when origin is AssetHub/Hydration - so user can pay fees with asset different than DOT
72
74
.xcmVersion(Version.V3/V4/V5) // Optional parameter for manual override of XCM Version used in call
73
75
.customPallet('Pallet','pallet_function') // Optional parameter for manual override of XCM Pallet and function used in call (If they are named differently on some CHAIN but syntax stays the same). Both pallet name and function required. Pallet name must be CamelCase, function name snake_case.
0 commit comments