diff --git a/CHANGELOG.md b/CHANGELOG.md index c28ac842..4f246b96 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,32 @@ # Changelog +## [0.2.0](https://github.com/paritytech/asset-transfer-api/compare/v0.2.0-beta.2..v0.2.0) + +### Chore + +- chore(deps): update pjs ([#403](https://github.com/paritytech/asset-transfer-api/pull/403))([60f82f9](https://github.com/paritytech/asset-transfer-api/commit/60f82f9a478ca65e1f8831b87ab6458c598edd34)) +- chore(registry): update registry dep ([#402](https://github.com/paritytech/asset-transfer-api/pull/402))([014c8f0](https://github.com/paritytech/asset-transfer-api/commit/014c8f0f79b8134ff44d8ca0cb96eb2c22dbf46f)) +- chore(deps): update pjs ([#398](https://github.com/paritytech/asset-transfer-api/pull/398))([339e032](https://github.com/paritytech/asset-transfer-api/commit/339e0322f22e5e3a8b5fd98c145212b6e1cc94b2)) +Note: This PJS update allows for paysWithFeeOrigin to work on Polkadot Asset Hub. +- chore(deps): up pjs ([#396](https://github.com/paritytech/asset-transfer-api/pull/396))([4073aa2](https://github.com/paritytech/asset-transfer-api/commit/4073aa21250643d4503ef9fb123eaf27bea1fa90)) +- chore(registry): update registry dep ([#395](https://github.com/paritytech/asset-transfer-api/pull/395))([d7f3d8a](https://github.com/paritytech/asset-transfer-api/commit/d7f3d8afeb02f9c4b9e322d02337a33c19fe0856)) +- chore(deps): up pjs ([#387](https://github.com/paritytech/asset-transfer-api/pull/387))([f3f2b28](https://github.com/paritytech/asset-transfer-api/commit/f3f2b28bada384be23317cf281bdd74426553461)) +- chore(registry): update registry dep ([#385](https://github.com/paritytech/asset-transfer-api/pull/385))([00064ea](https://github.com/paritytech/asset-transfer-api/commit/00064ea628b0095bcf0227bccb0122ddbd3b4f1d)) + +### Feat + +- feat: support system to bridge txs ([#383](https://github.com/paritytech/asset-transfer-api/pull/383))([311ecd9](https://github.com/paritytech/asset-transfer-api/commit/311ecd91ade1756933500760211d1e351ba907c0)) +- feat: add support for pallet-xcm claimAssets call ([#394](https://github.com/paritytech/asset-transfer-api/pull/394))([685ca19](https://github.com/paritytech/asset-transfer-api/commit/685ca19e54bdc6dc76b93423b09c9b44f57a009e)) + +## Breaking Change + +- fix!: always use limited calls ([#392](https://github.com/paritytech/asset-transfer-api/pull/392))([c7ff030](https://github.com/paritytech/asset-transfer-api/commit/c7ff0302dcea92ecb92623832f6460cc56e28491)) +- fix!: change TxResult type ([#391](https://github.com/paritytech/asset-transfer-api/pull/391))([09d1410](https://github.com/paritytech/asset-transfer-api/commit/09d141006f928ecf9b08e2b894ae6dfd4df7d8de)) + +### Fix + +- fix: update lp pool token storage key destructuring ([#390](https://github.com/paritytech/asset-transfer-api/pull/390))([cb7d39f](https://github.com/paritytech/asset-transfer-api/commit/cb7d39fb3ffbaa7f905545268f014c8ba51156ab)) + ## [0.2.0-beta.2](https://github.com/paritytech/asset-transfer-api/compare/v0.2.0-beta.1..v0.2.0-beta.2)(2024-04-24) ### Chore diff --git a/docs/assets/search.js b/docs/assets/search.js index e3931557..17154034 100644 --- a/docs/assets/search.js +++ b/docs/assets/search.js @@ -1 +1 @@ -window.searchData = "data:application/octet-stream;base64,H4sIAAAAAAAAE7WbX2/bOBLAv4vyargRKVJJ3nqbFijQ3S3a7N4BQVBobbrVVZZ8kpwmG+S7H0lJ1ow0tCVL+5S6nn/kb2ZIWtSLl2c/C+/m/sX7Eadr74YtvDTaKu/Ge1sUqrzLo7TYqPztLvYW3j5P9BfbbL1PVPGmK7D8Xm4TLbVKIv2NNup5r4vGrs+uTluuNfuWB7haeLsoV2lJ2W/DYJdBG8cqV1GpGkH7N1qVcZaeGdDFMYPDQu0ZdsaeRPHWChdnR4tMzBxfnMZlHCXx3+qz+hYXZf58bpikpZmj3ahy9f29Uh/STXZunB0bM0e4Vqtsrd49lXmcFvHq3CD7ZmaIs03KLNV89qtSC3zKs21cqF7XIGSONg4mZNs4djEiFKelyjfRymG2Fj/eLKiYQdu6ZMHBfQRa1QjXF5XeYPeNsiuMYqdWv5l/nh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tNdrHVhkjtVBsqLuRzTVc1BhnC79i08Qc74w8LTR12VxKkWvn94ff0/X4XWrLVGAAA="; \ No newline at end of file +window.searchData = "data:application/octet-stream;base64,H4sIAAAAAAAAE7WcW5ObuBKA/4vn1eUMugAzb9lNUpWq7CaVnd2zVampFLHlCScYfABPJjuV/34kAaYbWjYY9ilx3Dfp625JRuR5kWffi8Xtp+fFtzjdLG7ZcpFGO7W4XbwsClXe5VFabFX+ch8vlotDnugvdtnmkKjiRVdg9bXcJVpqnUT6G210sfi5bOx6LDxvudbsWx7garnYR7lKS8p+Gwa7Fm0c61xFpWoE7Z/Ruoyz9MKArk4ZHBZqz7Az9iSKd1a4uDhaZGLm+OI0LuMoif9RH9VDXJT5j0vDJC3NHO1Wleuvb5R6m26zS+Ps2Jg5wo1aZxv1+qnM47SI15cG2TczQ5xtUmap5nNYl1rgQ57t4kL1ugYhc7JxMOm3jWMfI0JxWqp8G60dZmvx082Cihm0rWsmju4j0KpGuL6q9Aa7b5RdYRR7tf7d/PWSWIDybAGtv0ZxenFEUHu+OYq26u/17i+VF7Cfj5qprokpwfliUJFsD6ldL+jwhpXO4Nxu67b8sVdFr1Ltv56szbY9vYpzhZdOlR52jY3jt6fDrcIARNvKf5eto2SA7atG8ISHVoX29cePolS7u+xDlEdDXHbkZ/D8USXRjzGuG4UZfFd/jnF+1JjB+y95vHlQY7wfNSZ4N+SG80bSk70OZo3FJ/sdzrkjP8GzDX6M667CdN9DIWPxsX7Z9U3gybbB6nWk3yGteu0dCoxrkl1Xb7J8F5Wkk+qraeZ/bZYUtTnhqSc1zalt6sdjFVqsoNe+2DS3v6nya7ahfdXfTXPQ3VS/35e0N0pwnGtfSt4Ww+fP5vtxrq6OSqeqgRySY5MWp/9VJkV6J8Qx8awIK2MDXNVDc8SZPapcrzL9k+yoOAkrM8eZ15bvLmW76liYOb7+OWFUcOcPCmMi69biRzB0ugiRxMjCB4fYu6ePqjgkbeMEh5LKUSMxcrcMp3qjiqEOrmrZU1N6jN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VguAKLBgqBykgq+kXrunf1D+qZvuumQCkQXjtUK9/xDpmMho0HLXLv7kc4iwiEIHvisC+k66tdFsRICZdqv18AyGzOnNFXUXC1ZPat/fz43sPgGNr0VXIzesdpDpIXO6axLh+qNBDEIBuELjqJ65+9Y+aX/2BOnAeuHKwUa8eBQJ6YAnxXVlfK5N57AOEgavoagNxdTUDeAdLke9KgFp5Zx4RJvUjzd44fJATgZuAtbSvLxQAbUDAP0NAt57md15oAcxj4JpHc9kvqi77gRIAmtKlmVRvE4P2AabdO6kF6xYvIGDymStvmov0INfBsitcxbJr3lgD7sA4uatP7OrnwGmWHuxz4Grd621DfLh2uYJIM91xrIFk37MQgJIPXbsHvQOK4UNKEACYhcDVc5r3S8DkgTkXrkloXtAiOw1c9l0DrxKc2r75oFf4Lub7KI/KbG/fOAUZB0bMXBNWqebVu8GAPagv5moSlW5RP48BynBX4Cptc+P+e1yaNaa7RgvY3N1jPur3qQkw6cLVHuyF58JeeAaagLd04crVtozxBlGA/JauMTf5QYIGjgNXZ20M9I4kYMb4EGVU6By0Ju4qDZsi/SRjwDNze7a6RKYATsw92+byaF5dHu0dD5Lj7VGwSoEElK4EQma7+yXSKhiq76qnvHqwqtt4QlEOwKoXutLE/P8h9KLlgYF5rrKsXx2J7KsjIEPh1s3Vycx/8tI9+4A24p3T02PeH2+FgeQGnAOnDZseZfal/n8ZwLDBSsTOqffaIJhyz5XdjXKvEXqgrj1XJ2m0+wnugar2XJlY2gt1rqkDWRe4su546M4fiu6pW4CcEa6NR2Mgsa8QlNUrBMAGyAHpmkPzTh1QASuIcDWG8imv32gF3Qjw4q4Z7/UwD2SY5+okh+oqwbq5StDnFQDcodvM8Z6Hgvc8gBlQa6GrTqv3ZpLqrSowcWD80gVctwdyc8+AY+aCTfcWDopMND9rkeDul4t9rHtknGrhT/c/f/4fFGyk8gxQAAA="; \ No newline at end of file diff --git a/docs/classes/AssetTransferApi.AssetTransferApi.html b/docs/classes/AssetTransferApi.AssetTransferApi.html index d852c908..421c7747 100644 --- a/docs/classes/AssetTransferApi.AssetTransferApi.html +++ b/docs/classes/AssetTransferApi.AssetTransferApi.html @@ -1,8 +1,8 @@ -AssetTransferApi | @substrate/asset-transfer-api - v0.2.0-beta.2

Holds open an api connection to a specified chain within the ApiPromise in order to help +AssetTransferApi | @substrate/asset-transfer-api - v0.2.0

Holds open an api connection to a specified chain within the ApiPromise in order to help construct transactions for assets and estimating fees.

import { AssetTransferApi, constructApiPromise } from '@substrate/asset-transfer-api'

const main = () => {
const { api, specName, safeXcmVersion } = await constructApiPromise('wss://some_ws_url');
const assetsApi = new AssetTransferApi(api, specName, safeXcmVersion);
}
-

Methods

Methods

  • amounts: string[]

    Array of the amounts of each trapped asset to be claimed

  • beneficiary: string

    Address of the account to receive the trapped assets

  • opts: TransferArgsOpts<T>

    Options

    -
  • Returns Promise<TxResult<T>>

    • Create an asset transfer transaction. This can be either locally on a systems parachain or relay chain, +

    Returns Promise<TxResult<T>>

    • Create an asset transfer transaction. This can be either locally on a systems parachain or relay chain, or between chains using xcm.

      import { TxResult } from '@substrate/asset-transfer-api'

      let callInfo: TxResult<'call'>;
      try {
      callInfo = await assetsApi.createTransferTransaction(
      '1000',
      '5EWNeodpcQ6iYibJ3jmWVe85nsok1EDG8Kk3aFg8ZzpfY1qX',
      ['WND'],
      ['1000000000000'],
      {
      format: 'call',
      xcmVersion: 2,
      }
      )
      } catch (e) {
      console.error(e);
      throw Error(e);
      }
      @@ -23,17 +23,17 @@
    • assetIds: string[]

      Array of assetId's to be transferred

    • amounts: string[]

      Array of the amounts of each token to transfer

    • opts: TransferArgsOpts<T> = {}

      Options

      -

    Returns Promise<TxResult<T>>

    • Decodes the hex of an extrinsic into a string readable format.

      +

    Returns Promise<TxResult<T>>

    • Decodes the hex of an extrinsic into a string readable format.

      const decodedExt = assetsApi.decodeExtrinsic(tx, 'call');
      console.log(JSON.parse(decodedExt));

      Type Parameters

      Parameters

      • encodedTransaction: string

        the hex of an extrinsic tx

      • format: T

        The format the tx is in

        -

      Returns string

    • Fetch estimated fee information for an extrinsic

      +

    Returns string

    Returns Promise<null | RuntimeDispatchInfo | RuntimeDispatchInfoV1>

    \ No newline at end of file +

    Returns Promise<void>

    \ No newline at end of file diff --git a/docs/enums/errors_BaseError.BaseErrorsEnum.html b/docs/enums/errors_BaseError.BaseErrorsEnum.html index b06cfdcf..9980db1c 100644 --- a/docs/enums/errors_BaseError.BaseErrorsEnum.html +++ b/docs/enums/errors_BaseError.BaseErrorsEnum.html @@ -1,5 +1,5 @@ -BaseErrorsEnum | @substrate/asset-transfer-api - v0.2.0-beta.2

    Errors that may be returned by the API.

    -

    Enumeration Members

    AssetNotFound +BaseErrorsEnum | @substrate/asset-transfer-api - v0.2.0

    Errors that may be returned by the API.

    +

    Enumeration Members

    AssetNotFound: "AssetNotFound"

    Not able to find the asset.

    -
    DisabledOption: "DisabledOption"

    The following option is disabled given the inputs.

    -
    InternalError: "InternalError"

    An issue has happened internally.

    -
    InvalidAddress: "InvalidAddress"

    The inputted address is invalid.

    -
    InvalidAsset: "InvalidAsset"

    The inputted asset is incorrect or invalid, and does not exist given the surrounding specs. +

    DisabledOption: "DisabledOption"

    The following option is disabled given the inputs.

    +
    InternalError: "InternalError"

    An issue has happened internally.

    +
    InvalidAddress: "InvalidAddress"

    The inputted address is invalid.

    +
    InvalidAsset: "InvalidAsset"

    The inputted asset is incorrect or invalid, and does not exist given the surrounding specs. This exlcudes MultiLocation assets which are handled using InvalidMultiLocationAsset.

    -
    InvalidDirection: "InvalidDirection"

    The direction in which these assets are going to be sent is incorrect.

    -
    InvalidInput: "InvalidInput"

    An input or lack of input to any public facing function by the user is incorrect, and or invalid. +

    InvalidDirection: "InvalidDirection"

    The direction in which these assets are going to be sent is incorrect.

    +
    InvalidInput: "InvalidInput"

    An input or lack of input to any public facing function by the user is incorrect, and or invalid. This may include using options incorrectly.

    -
    InvalidMultiLocationAsset: "InvalidMultiLocationAsset"

    The inputted multilocation is incorrect.

    -
    InvalidPallet: "InvalidPallet"

    The following pallet does not support the method to be used.

    -
    InvalidXcmVersion: "InvalidXcmVersion"

    The xcm version is invalid.

    -
    MultipleNonUniqueAssetsFound: "MultipleNonUniqueAssetsFound"

    Multiple assets have been found for a single token symbol.

    -
    NoFeeAssetLpFound: "NoFeeAssetLpFound"

    The provided paysWithFeeOrigin asset has no liquidity pool.

    -
    NotImplemented: "NotImplemented"

    Not Implemented yet.

    -
    PalletNotFound: "PalletNotFound"

    The following pallet is not found.

    -
    RegistryNotFound: "RegistryNotFound"

    Not able to find the pertinent registry to gather certain information. This can refer to xcAssets.

    -
    RuntimeCallNotFound: "RuntimeCallNotFound"

    Did not find the correct call in the current runtime.

    -
    SpecNameNotProvided: "SpecNameNotProvided"

    The specName was not provided when injecting a new chain in the registry.

    -
    TokensNotProvided: "TokensNotProvided"

    The tokens were not provided when injecting a new chain in the registry.

    -
    UnsupportedEnvironment: "UnsupportedEnvironment"

    The provided JS environment is not supported, and the api will not run.

    -
    \ No newline at end of file +
    InvalidMultiLocationAsset: "InvalidMultiLocationAsset"

    The inputted multilocation is incorrect.

    +
    InvalidPallet: "InvalidPallet"

    The following pallet does not support the method to be used.

    +
    InvalidXcmVersion: "InvalidXcmVersion"

    The xcm version is invalid.

    +
    MultipleNonUniqueAssetsFound: "MultipleNonUniqueAssetsFound"

    Multiple assets have been found for a single token symbol.

    +
    NoFeeAssetLpFound: "NoFeeAssetLpFound"

    The provided paysWithFeeOrigin asset has no liquidity pool.

    +
    NotImplemented: "NotImplemented"

    Not Implemented yet.

    +
    PalletNotFound: "PalletNotFound"

    The following pallet is not found.

    +
    RegistryNotFound: "RegistryNotFound"

    Not able to find the pertinent registry to gather certain information. This can refer to xcAssets.

    +
    RuntimeCallNotFound: "RuntimeCallNotFound"

    Did not find the correct call in the current runtime.

    +
    SpecNameNotProvided: "SpecNameNotProvided"

    The specName was not provided when injecting a new chain in the registry.

    +
    TokensNotProvided: "TokensNotProvided"

    The tokens were not provided when injecting a new chain in the registry.

    +
    UnknownConsensusSystem: "UnknownConsensusSystem"

    Did not find a known consensus system for bridge transaction.

    +
    UnsupportedEnvironment: "UnsupportedEnvironment"

    The provided JS environment is not supported, and the api will not run.

    +
    \ No newline at end of file diff --git a/docs/enums/types.Direction.html b/docs/enums/types.Direction.html index dda07c13..f2de8a83 100644 --- a/docs/enums/types.Direction.html +++ b/docs/enums/types.Direction.html @@ -1,20 +1,22 @@ -Direction | @substrate/asset-transfer-api - v0.2.0-beta.2

    Represents all possible tx directions

    -

    Enumeration Members

    Local +Direction | @substrate/asset-transfer-api - v0.2.0

    Represents all possible tx directions

    +

    Enumeration Members

    Local: "Local"

    Local tx

    -
    ParaToPara: "ParaToPara"

    Parachain to Parachain.

    -
    ParaToRelay: "ParaToRelay"

    Parachain to Relay chain.

    -
    ParaToSystem: "ParaToSystem"

    Parachain to System parachain.

    -
    RelayToPara: "RelayToPara"

    Relay chain to Parachain.

    -
    RelayToSystem: "RelayToSystem"

    Relay to System Parachain.

    -
    SystemToPara: "SystemToPara"

    System parachain to Parachain.

    -
    SystemToRelay: "SystemToRelay"

    System parachain to Relay chain.

    -
    SystemToSystem: "SystemToSystem"

    System parachain to System parachain chain.

    -
    \ No newline at end of file +
    ParaToPara: "ParaToPara"

    Parachain to Parachain.

    +
    ParaToRelay: "ParaToRelay"

    Parachain to Relay chain.

    +
    ParaToSystem: "ParaToSystem"

    Parachain to System parachain.

    +
    RelayToPara: "RelayToPara"

    Relay chain to Parachain.

    +
    RelayToSystem: "RelayToSystem"

    Relay to System Parachain.

    +
    SystemToBridge: "SystemToBridge"

    System parachain to an external GlobalConsensus chain.

    +
    SystemToPara: "SystemToPara"

    System parachain to Parachain.

    +
    SystemToRelay: "SystemToRelay"

    System parachain to Relay chain.

    +
    SystemToSystem: "SystemToSystem"

    System parachain to System parachain chain.

    +
    \ No newline at end of file diff --git a/docs/functions/constructApiPromise.constructApiPromise.html b/docs/functions/constructApiPromise.constructApiPromise.html index 93a1ac87..ca610563 100644 --- a/docs/functions/constructApiPromise.constructApiPromise.html +++ b/docs/functions/constructApiPromise.constructApiPromise.html @@ -1,6 +1,6 @@ -constructApiPromise | @substrate/asset-transfer-api - v0.2.0-beta.2

    Returns Promise<ApiInfo>

    \ No newline at end of file diff --git a/docs/index.html b/docs/index.html index 549ddac5..fa96c62f 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,4 +1,4 @@ -@substrate/asset-transfer-api - v0.2.0-beta.2

    @substrate/asset-transfer-api - v0.2.0-beta.2



    +@substrate/asset-transfer-api - v0.2.0

    @substrate/asset-transfer-api - v0.2.0



    @substrate/asset-transfer-api

    Asset API used for common good parachains

    @@ -29,57 +29,62 @@

    Asset API used for common good parachains

    -System to Parachain +System to Relay ✅ ✅ ✅ -System to Relay +System to System ✅ ✅ ✅ -Relay to Parachain +System to Bridge +❌ +✅ +✅ + + +System to Parachain ✅ ✅ ✅ -Relay to System +Relay to Parachain ✅ ✅ ✅ -Parachain to Parachain +Relay to System ✅ ✅ ✅ -Parachain to Relay +Parachain to Parachain ✅ ✅ ✅ -Parachain to System +Parachain to Relay ✅ ✅ ✅ -System to System +Parachain to System ✅ ✅ ✅

    Note on Parachain to Parachain Support

    Parachain To Parachain support is currently limited to XCM V2, with the exception of Parachain primary asset tx construction (e.g. MOVR, SDN, etc.).

    -

    Note: System refers to System Parachains like Asset Hub.

    -

    Usage

    Npm

    npm install @substrate/asset-transfer-api

    +

    Note: System refers to System Parachains like Asset Hub.

    Usage

    Npm

    npm install @substrate/asset-transfer-api

    Yarn

    yarn add @substrate/asset-transfer-api

    NodeJS Version

    Recommended: v21 or greater When the API is initalized using the CDN, node:fetch is being used and is stable in node v21. Therefore it is recommended to use v21 or greater.

    @@ -91,7 +96,7 @@

    Asset API used for common good parachains

    // AssetTransferApiOpts are the options for the `AssetTransferApi`

    type AssetTransferApiOpts = {
    /**
    * The injectedRegistry allows you to add custom values to the predefined initialized registry.
    * If you would like to see the registry you may visit https://github.com/paritytech/asset-transfer-api-registry/blob/main/registry.json
    * When adding a new chain, the `specName` and `tokens` fields are mandatory.
    *
    * An example input of the registry would be:
    * {
    * polkadot: {
    * '9876': {
    * tokens: ['TST'],
    * assetsInfo,
    * specName: 'testing',
    * }
    * }
    * }
    *
    * NOTE: It supports adding info for `polkadot`, `kusama`, `westend` and `rococo`.
    */
    injectedRegistry?: RequireAtLeastOne<ChainInfoRegistry>;
    /**
    * The overrideRegistry option allows you to modify chain data already present in the registry,
    * either overriding fields' values or adding new information. If the chain of which data is
    * being overriden is not present in the registry, it will be treated as if it were
    * and injectedRegistry and added following the same logic.
    *
    * If the chain is present in the registry, it will override only the fields
    * present in the passed overrideRegistry, leaving the remaining as is.
    *
    * An example input for overrideRegistry would be:
    * {
    * westend: {
    * '0': {
    * tokens: ['WER'],
    * }
    * }
    * }
    *
    * This would override the existing native token for the Westend Relay Chain
    * to WER instead of WND.
    */
    overrideRegistry?: RequireAtLeastOne<ChainInfoRegistry<InjectedChainInfoKeys>>;
    /**
    * RegistryTypes is a string and can either be 'CDN' or 'NPM'.
    *
    * CDN - The registry will be initialized with the up to date version given the CDN
    * NPM - The registry will be initialized with the NPM version which is updated less frequently.
    */
    registryType?: RegistryTypes;
    };
    -
    // The TransferArgsOpts are options that give the possibility of adding certain customization to the transaction.

    interface TransferArgsOpts<T extends Format> {
    /**
    * Option that specifies the format in which to return a transaction.
    * It can either be a `payload`, `call`, or `submittable`.
    *
    * Note: A `submittable` will return a `SubmittableExtrinsic` polkadot-js type, whereas
    * a `payload` will return a `GenericExtrinsicPayload` polkadot-js type and a `call` will return a hex. By default a `payload` will be returned if nothing is inputted.
    */
    format?: T;
    /**
    * AssetId to pay fees on the current common good parachain.
    * Polkadot AssetHub: default DOT
    * Kusama AssetHub: default KSM
    */
    paysWithFeeOrigin?: string;
    /**
    * AssetId to pay fees on the destination parachain.
    */
    paysWithFeeDest?: string;
    /**
    * Option for applying a custom weightLimit.
    * If not inputted it will default to `Unlimited`.
    */
    weightLimit?: { refTime?: string, proofSize?: string };
    /**
    * Set the xcmVersion for message construction. If this is not present a supported version
    * will be queried, and if there is no supported version a safe version will be queried.
    */
    xcmVersion?: number;
    /**
    * For creating local asset transfers, this will allow for a `transferKeepAlive` as oppose
    * to a `transfer`.
    */
    keepAlive?: boolean;
    /**
    * Boolean to declare if this will transfer liquidity tokens.
    * Default is false.
    */
    transferLiquidToken?: boolean;
    } +
    // The TransferArgsOpts are options that give the possibility of adding certain customization to the transaction.

    interface TransferArgsOpts<T extends Format> {
    /**
    * Option that specifies the format in which to return a transaction.
    * It can either be a `payload`, `call`, or `submittable`.
    *
    * Note: A `submittable` will return a `SubmittableExtrinsic` polkadot-js type, whereas
    * a `payload` will return a `GenericExtrinsicPayload` polkadot-js type and a `call` will return a hex. By default a `payload` will be returned if nothing is inputted.
    */
    format?: T;
    /**
    * AssetId to pay fees on the current common good parachain.
    * Polkadot AssetHub: default DOT
    * Kusama AssetHub: default KSM
    */
    paysWithFeeOrigin?: string;
    /**
    * AssetId to pay fees on the destination parachain.
    */
    paysWithFeeDest?: string;
    /**
    * Option for applying a custom weightLimit.
    * If not inputted it will default to `Unlimited`.
    */
    weightLimit?: { refTime?: string, proofSize?: string };
    /**
    * Set the xcmVersion for message construction. If this is not present a supported version
    * will be queried, and if there is no supported version a safe version will be queried.
    */
    xcmVersion?: number;
    /**
    * For creating local asset transfers, this will allow for a `transferKeepAlive` as oppose
    * to a `transfer`.
    */
    keepAlive?: boolean;
    /**
    * Boolean to declare if this will transfer liquidity tokens.
    * Default is false.
    */
    transferLiquidToken?: boolean;
    /**
    * The XCM `TransferType` used to transfer assets.
    * Provided to construct `transferAssetsUsingTypeAndThen` transactions.
    */
    assetTransferType?: string;
    /**
    * The RemoteReserve location for an XCM transfer.
    * Should be provided when specifying an `assetTransferType` of `RemoteReserve`.
    */
    remoteReserveAssetTransferTypeLocation?: string;
    /**
    * The XCM `TransferType` used to pay fees for an XCM transfer.
    * Provided to construct `transferAssetsUsingTypeAndThen` transactions.
    */
    feesTransferType?: string;
    /**
    * The RemoteReserve location for an XCM transfers' fees.
    * Should be provided when specfying a `feesTransferType` of `RemoteReserve`.
    */
    remoteReserveFeesTransferTypeLocation?: string;
    /**
    * Optional custom XCM message to be executed on destination chain.
    * Should be provided if a custom xcm message is needed after transfering assets.
    * Defaults to `Xcm(vec![DepositAsset { assets: Wild(AllCounted(assets.len())), beneficiary }])`
    */
    customXcmOnDest?: string;
    }

    Teleport and Reserve Transfer via polkadotXcm pallet

    The AssetTransferApi.createTransferTransaction is able to infer what kind of transaction is necessary given the inputs. When sending cross chain transfers, the api does a lot of validation to ensure the inputs are valid, and the assets either exist or don't. This process is done through a registry which is maintained in a separate repo here. If the asset is not in the registry, it will then lookup if that asset exists on-chain and cache it if necessary. On-chain verification is not always possible in respect to the direction the asset is being sent and what the destination chain is since we only maintain one api connection. Therefore, if you would like to inject information into the registry, you can using the injectedRegistry option for the AssetTransferApi.

    Transferring assets via xTokens pallet

    If the transfer is being sent from a parachain that utilizes the xTokens pallet, the API will detect that and construct the transaction that is necessary. It will construct one of three calls: transferMultiasset, transferMultiassets, or transferMultiassetWithFee. This is only applicable when the intended transfer direction starts from a parachain. The xTokens pallet can be found here.

    @@ -142,4 +147,4 @@

    Asset API used for common good parachains

    Running Zombienet

    From the root directory run ./<zombienet_binary_name> -p native spawn ./zombienet/<network_file>.toml | tee zombienet.log

    Create an asset

    From the root directory run yarn start:zombienet-post-script. You can run this right after running your zombienet network.

    E2E Testing

    You can access the E2E tests and its documentation here.

    -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/interfaces/constructApiPromise.ApiInfo.html b/docs/interfaces/constructApiPromise.ApiInfo.html index 23a63b2a..7cf3b01c 100644 --- a/docs/interfaces/constructApiPromise.ApiInfo.html +++ b/docs/interfaces/constructApiPromise.ApiInfo.html @@ -1,8 +1,10 @@ -ApiInfo | @substrate/asset-transfer-api - v0.2.0-beta.2

    Return value for constructApiPromise

    -
    interface ApiInfo {
        api: ApiPromise;
        safeXcmVersion: number;
        specName: string;
    }

    Properties

    api +ApiInfo | @substrate/asset-transfer-api - v0.2.0

    Return value for constructApiPromise

    +
    interface ApiInfo {
        api: ApiPromise;
        chainName: string;
        safeXcmVersion: number;
        specName: string;
    }

    Properties

    api: ApiPromise

    Polkadot-js ApiPromise

    -
    safeXcmVersion: number

    SafeXcmVersion for the chain which the api is connected too.

    -
    specName: string

    SpecName of the chain which the api is connected to.

    -
    \ No newline at end of file +
    chainName: string

    Chain name of the chain which the api is connected to.

    +
    safeXcmVersion: number

    SafeXcmVersion for the chain which the api is connected too.

    +
    specName: string

    SpecName of the chain which the api is connected to.

    +
    \ No newline at end of file diff --git a/docs/interfaces/types.TransferArgsOpts.html b/docs/interfaces/types.TransferArgsOpts.html index 08cf5bbe..834bfd4b 100644 --- a/docs/interfaces/types.TransferArgsOpts.html +++ b/docs/interfaces/types.TransferArgsOpts.html @@ -1,32 +1,48 @@ -TransferArgsOpts | @substrate/asset-transfer-api - v0.2.0-beta.2

    The TransferArgsOpts are the options passed into createTransferTransaction.

    -
    interface TransferArgsOpts {
        format?: T;
        keepAlive?: boolean;
        paysWithFeeDest?: string;
        paysWithFeeOrigin?: string;
        sendersAddr?: string;
        transferLiquidToken?: boolean;
        weightLimit?: {
            proofSize?: string;
            refTime?: string;
        };
        xcmVersion?: number;
    }

    Type Parameters

    Properties

    format? +TransferArgsOpts | @substrate/asset-transfer-api - v0.2.0

    The TransferArgsOpts are the options passed into createTransferTransaction.

    +
    interface TransferArgsOpts {
        assetTransferType?: string;
        customXcmOnDest?: string;
        feesTransferType?: string;
        format?: T;
        keepAlive?: boolean;
        paysWithFeeDest?: string;
        paysWithFeeOrigin?: string;
        remoteReserveAssetTransferTypeLocation?: string;
        remoteReserveFeesTransferTypeLocation?: string;
        sendersAddr?: string;
        transferLiquidToken?: boolean;
        weightLimit?: {
            proofSize?: string;
            refTime?: string;
        };
        xcmVersion?: number;
    }

    Type Parameters

    Properties

    format?: T

    Option that specifies the format in which to return a transaction. +

    Properties

    assetTransferType?: string

    The XCM TransferType used to transfer assets. +Provided to construct transferAssetsUsingTypeAndThen transactions.

    +
    customXcmOnDest?: string

    Optional custom XCM message to be executed on destination chain. +Should be provided if a custom xcm message is needed after transfering assets. +Defaults to Xcm(vec![DepositAsset { assets: Wild(AllCounted(assets.len())), beneficiary }])

    +
    feesTransferType?: string

    The XCM TransferType used to pay fees for an XCM transfer. +Provided to construct transferAssetsUsingTypeAndThen transactions.

    +
    format?: T

    Option that specifies the format in which to return a transaction. It can either be a payload, call, or submittable.

    Note: A submittable will return a SubmittableExtrinsic polkadot-js type, whereas a payload or call will return a hex.

    -
    keepAlive?: boolean

    For creating local asset transfers, this will allow for a transferKeepAlive as oppose +

    keepAlive?: boolean

    For creating local asset transfers, this will allow for a transferKeepAlive as oppose to a transfer.

    -
    paysWithFeeDest?: string

    AssetId to pay fee's on the destination parachain.

    -
    paysWithFeeOrigin?: string

    AssetId to pay fee's on the current common good parachain. +

    paysWithFeeDest?: string

    AssetId to pay fee's on the destination parachain.

    +
    paysWithFeeOrigin?: string

    AssetId to pay fee's on the current common good parachain. Polkadot AssetHub: default DOT Kusama AssetHub: default KSM

    -
    sendersAddr?: string

    The SS58 Address the tx will be sent from. This is specifically used for the format payload. +

    remoteReserveAssetTransferTypeLocation?: string

    The RemoteReserve location for an XCM transfer. +Should be provided when specifying an assetTransferType of RemoteReserve.

    +
    remoteReserveFeesTransferTypeLocation?: string

    The RemoteReserve location for an XCM transfers' fees. +Should be provided when specfying a feesTransferType of RemoteReserve.

    +
    sendersAddr?: string

    The SS58 Address the tx will be sent from. This is specifically used for the format payload. It is necessary because the payload will need information such as the nonce.

    -
    transferLiquidToken?: boolean

    Boolean to declare if this will transfer liquidity tokens. +

    transferLiquidToken?: boolean

    Boolean to declare if this will transfer liquidity tokens. Default is false.

    -
    weightLimit?: {
        proofSize?: string;
        refTime?: string;
    }

    Option for applying a custom weightLimit. +

    weightLimit?: {
        proofSize?: string;
        refTime?: string;
    }

    Option for applying a custom weightLimit. If not inputted it will default to Unlimited.

    Type declaration

    • Optional proofSize?: string

      Provided when creating limited txs, represents the amount of storage in bytes that can be used by the tx

    • Optional refTime?: string

      Provided when creating limited txs, represents the allowed amount of computation time the tx can use

      -
    xcmVersion?: number

    Set the xcmVersion for message construction. If this is not present a supported version +

    xcmVersion?: number

    Set the xcmVersion for message construction. If this is not present a supported version will be queried, and if there is no supported version a safe version will be queried.

    -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/interfaces/types.TxResult.html b/docs/interfaces/types.TxResult.html index 2094ca13..5003256a 100644 --- a/docs/interfaces/types.TxResult.html +++ b/docs/interfaces/types.TxResult.html @@ -1,6 +1,6 @@ -TxResult | @substrate/asset-transfer-api - v0.2.0-beta.2

    The TxResult is the result of constructing a transaction. +TxResult | @substrate/asset-transfer-api - v0.2.0

    The TxResult is the result of constructing a transaction. T extends Format in the context of the options passed in for the Format the user expects.

    -
    interface TxResult {
        dest: string;
        direction: Direction | "local";
        format: Format | "local";
        method: Methods;
        origin: string;
        tx: ConstructedFormat<T>;
        xcmVersion: null | number;
    }

    Type Parameters

    • T

    Properties

    interface TxResult {
        dest: string;
        direction: Direction | "local";
        format: Format | "local";
        method: Methods;
        origin: string;
        tx: ConstructedFormat<T>;
        xcmVersion: null | number;
    }

    Type Parameters

    • T

    Properties

    Properties

    dest: string

    Description

    The destination specName of the transaction

    -
    direction: Direction | "local"

    Description

    The direction of the cross chain transfer.

    -
    format: Format | "local"

    Description

    The format type the tx is ouputted in.

    -
    method: Methods

    Description

    The method used in the transaction.

    -
    origin: string

    Description

    The origin specName of the transaction

    -

    Description

    The constructed transaction.

    -
    xcmVersion: null | number

    Description

    The xcm version that was used to construct the tx.

    -
    \ No newline at end of file +
    direction: Direction | "local"

    Description

    The direction of the cross chain transfer.

    +
    format: Format | "local"

    Description

    The format type the tx is ouputted in.

    +
    method: Methods

    Description

    The method used in the transaction.

    +
    origin: string

    Description

    The origin specName of the transaction

    +

    Description

    The constructed transaction.

    +
    xcmVersion: null | number

    Description

    The xcm version that was used to construct the tx.

    +
    \ No newline at end of file diff --git a/docs/modules/AssetTransferApi.html b/docs/modules/AssetTransferApi.html index 98a4818c..e8eff1bf 100644 --- a/docs/modules/AssetTransferApi.html +++ b/docs/modules/AssetTransferApi.html @@ -1,2 +1,2 @@ -AssetTransferApi | @substrate/asset-transfer-api - v0.2.0-beta.2
    \ No newline at end of file +AssetTransferApi | @substrate/asset-transfer-api - v0.2.0
    \ No newline at end of file diff --git a/docs/modules/constructApiPromise.html b/docs/modules/constructApiPromise.html index f63c4406..8b1b354b 100644 --- a/docs/modules/constructApiPromise.html +++ b/docs/modules/constructApiPromise.html @@ -1,3 +1,3 @@ -constructApiPromise | @substrate/asset-transfer-api - v0.2.0-beta.2

    Index

    Interfaces

    ApiInfo +constructApiPromise | @substrate/asset-transfer-api - v0.2.0
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/modules/errors_BaseError.html b/docs/modules/errors_BaseError.html index 71f044a0..e2eb9aeb 100644 --- a/docs/modules/errors_BaseError.html +++ b/docs/modules/errors_BaseError.html @@ -1,2 +1,2 @@ -errors/BaseError | @substrate/asset-transfer-api - v0.2.0-beta.2
    \ No newline at end of file +errors/BaseError | @substrate/asset-transfer-api - v0.2.0
    \ No newline at end of file diff --git a/docs/modules/types.html b/docs/modules/types.html index 607cdeb9..b216bd0c 100644 --- a/docs/modules/types.html +++ b/docs/modules/types.html @@ -1,4 +1,4 @@ -types | @substrate/asset-transfer-api - v0.2.0-beta.2

    Index

    Enumerations

    Direction +types | @substrate/asset-transfer-api - v0.2.0
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/types/types.AssetTransferApiOpts.html b/docs/types/types.AssetTransferApiOpts.html index 403df01d..5238f755 100644 --- a/docs/types/types.AssetTransferApiOpts.html +++ b/docs/types/types.AssetTransferApiOpts.html @@ -1,6 +1,7 @@ -AssetTransferApiOpts | @substrate/asset-transfer-api - v0.2.0-beta.2
    AssetTransferApiOpts<T>: {
        injectedRegistry?: RequireAtLeastOne<ChainInfoRegistry<T>>;
        overrideRegistry?: RequireAtLeastOne<ChainInfoRegistry<InjectedChainInfoKeys>>;
        registryType?: RegistryTypes;
    }

    Options that are appplied at initialization of the AssetTransferApi.

    -

    Type Parameters

    • T extends ChainInfoKeys | InjectedChainInfoKeys

    Type declaration

    • Optional injectedRegistry?: RequireAtLeastOne<ChainInfoRegistry<T>>

      Option to inject chain information into the registry.

      +AssetTransferApiOpts | @substrate/asset-transfer-api - v0.2.0
      AssetTransferApiOpts<T>: {
          chainName?: string;
          injectedRegistry?: RequireAtLeastOne<ChainInfoRegistry<T>>;
          overrideRegistry?: RequireAtLeastOne<ChainInfoRegistry<InjectedChainInfoKeys>>;
          registryType?: RegistryTypes;
      }

      Options that are appplied at initialization of the AssetTransferApi.

      +

      Type Parameters

      • T extends ChainInfoKeys | InjectedChainInfoKeys

      Type declaration

      • Optional chainName?: string

        Chain name of the chain which the api is connected to.

        +
      • Optional injectedRegistry?: RequireAtLeastOne<ChainInfoRegistry<T>>

        Option to inject chain information into the registry.

      • Optional overrideRegistry?: RequireAtLeastOne<ChainInfoRegistry<InjectedChainInfoKeys>>

        Option to override the registry with the supplied chain information.

      • Optional registryType?: RegistryTypes

        Whether or not to apply the registry from the npm package asset-transfer-api-registry, or the hosted CDN which updates frequently.

        -
      \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/types/types.ConstructedFormat.html b/docs/types/types.ConstructedFormat.html index 1b5e3d4b..c94c2c93 100644 --- a/docs/types/types.ConstructedFormat.html +++ b/docs/types/types.ConstructedFormat.html @@ -1,2 +1,2 @@ -ConstructedFormat | @substrate/asset-transfer-api - v0.2.0-beta.2
    ConstructedFormat<T>: T extends "payload"
        ? GenericExtrinsicPayload
        : T extends "call"
            ? `0x${string}`
            : T extends "submittable"
                ? SubmittableExtrinsic<"promise", ISubmittableResult>
                : never

    The Format types possible for a constructed transaction.

    -

    Type Parameters

    • T

    \ No newline at end of file +ConstructedFormat | @substrate/asset-transfer-api - v0.2.0
    ConstructedFormat<T>: T extends "payload"
        ? GenericExtrinsicPayload
        : T extends "call"
            ? `0x${string}`
            : T extends "submittable"
                ? SubmittableExtrinsic<"promise", ISubmittableResult>
                : never

    The Format types possible for a constructed transaction.

    +

    Type Parameters

    • T

    \ No newline at end of file diff --git a/docs/types/types.Format.html b/docs/types/types.Format.html index f76fb792..446f2321 100644 --- a/docs/types/types.Format.html +++ b/docs/types/types.Format.html @@ -1,7 +1,7 @@ -Format | @substrate/asset-transfer-api - v0.2.0-beta.2
    Format: "payload" | "call" | "submittable"

    AssetTransferApi supports three formats to be returned:

    +Format | @substrate/asset-transfer-api - v0.2.0
    Format: "payload" | "call" | "submittable"

    AssetTransferApi supports three formats to be returned:

    • payload: This returns a Polkadot-js ExtrinsicPayload as a hex.
    • call: This returns a Polkadot-js Call as a hex.
    • submittable: This returns a Polkadot-js SubmittableExtrinsic.
    -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/types/types.LocalTransferTypes.html b/docs/types/types.LocalTransferTypes.html index add8a9e9..841d1f4c 100644 --- a/docs/types/types.LocalTransferTypes.html +++ b/docs/types/types.LocalTransferTypes.html @@ -1,2 +1,2 @@ -LocalTransferTypes | @substrate/asset-transfer-api - v0.2.0-beta.2
    LocalTransferTypes: "assets::transfer" | "assets::transferKeepAlive" | "foreignAssets::transfer" | "foreignAssets::transferKeepAlive" | "balances::transfer" | "balances::transferKeepAlive" | "poolAssets::transfer" | "poolAssets::transferKeepAlive" | "tokens::transfer" | "tokens::transferKeepAlive"

    The types of local transactions the api can construct.

    -
    \ No newline at end of file +LocalTransferTypes | @substrate/asset-transfer-api - v0.2.0
    LocalTransferTypes: "assets::transfer" | "assets::transferKeepAlive" | "foreignAssets::transfer" | "foreignAssets::transferKeepAlive" | "balances::transfer" | "balances::transferKeepAlive" | "poolAssets::transfer" | "poolAssets::transferKeepAlive" | "tokens::transfer" | "tokens::transferKeepAlive"

    The types of local transactions the api can construct.

    +
    \ No newline at end of file diff --git a/docs/types/types.Methods.html b/docs/types/types.Methods.html index 4afcd5dc..5110db12 100644 --- a/docs/types/types.Methods.html +++ b/docs/types/types.Methods.html @@ -1,2 +1,2 @@ -Methods | @substrate/asset-transfer-api - v0.2.0-beta.2
    Methods: LocalTransferTypes | "transferAssets" | "limitedReserveTransferAssets" | "limitedTeleportAssets" | "transferMultiasset" | "transferMultiassets" | "transferMultiassetWithFee" | "claimAssets"

    The Methods are the collections of methods the API will use to construct a transaction.

    -
    \ No newline at end of file +Methods | @substrate/asset-transfer-api - v0.2.0
    Methods: LocalTransferTypes | "transferAssets" | "transferAssetsUsingTypeAndThen" | "limitedReserveTransferAssets" | "limitedTeleportAssets" | "transferMultiasset" | "transferMultiassets" | "transferMultiassetWithFee" | "claimAssets"

    The Methods are the collections of methods the API will use to construct a transaction.

    +
    \ No newline at end of file diff --git a/docs/types/types.RegistryTypes.html b/docs/types/types.RegistryTypes.html index 2f3e1981..c17097fa 100644 --- a/docs/types/types.RegistryTypes.html +++ b/docs/types/types.RegistryTypes.html @@ -1,4 +1,4 @@ -RegistryTypes | @substrate/asset-transfer-api - v0.2.0-beta.2
    RegistryTypes: "CDN" | "NPM"

    Types that the registry can be initialized as.

    +RegistryTypes | @substrate/asset-transfer-api - v0.2.0
    RegistryTypes: "CDN" | "NPM"

    Types that the registry can be initialized as.

    CDN - The registry will be initialized with the up to date version given the CDN NPM - The registry will be initialized with the NPM version which is updated less frequently.

    -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/types/types.XcmDirection.html b/docs/types/types.XcmDirection.html index 12f4dc6a..d39d7d66 100644 --- a/docs/types/types.XcmDirection.html +++ b/docs/types/types.XcmDirection.html @@ -1,2 +1,2 @@ -XcmDirection | @substrate/asset-transfer-api - v0.2.0-beta.2
    XcmDirection: Exclude<Direction, "Local">

    The direction of the cross chain transfer. This only concerns XCM transactions.

    -
    \ No newline at end of file +XcmDirection | @substrate/asset-transfer-api - v0.2.0
    XcmDirection: Exclude<Direction, "Local">

    The direction of the cross chain transfer. This only concerns XCM transactions.

    +
    \ No newline at end of file diff --git a/package.json b/package.json index 47a84b78..be84c71b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@substrate/asset-transfer-api", - "version": "0.2.0-beta.2", + "version": "0.2.0", "description": "", "main": "lib/index.js", "scripts": {