From 7ead6a504e904f876852f5ad3541c8052520e0df Mon Sep 17 00:00:00 2001 From: Cameron Marshall Date: Tue, 1 Oct 2024 08:02:07 -0400 Subject: [PATCH] chore(release): 0.4.0 (#437) --- CHANGELOG.md | 18 ++++++++ docs/assets/navigation.js | 2 +- docs/assets/search.js | 2 +- .../AssetTransferApi.AssetTransferApi.html | 21 ++++++--- .../errors_BaseError.BaseErrorsEnum.html | 44 +++++++++---------- docs/enums/types.Direction.html | 26 +++++------ ...nstructApiPromise.constructApiPromise.html | 4 +- docs/index.html | 8 ++-- .../constructApiPromise.ApiInfo.html | 12 ++--- docs/interfaces/types.TransferArgsOpts.html | 37 +++++++++------- docs/interfaces/types.TxResult.html | 24 ++++++---- docs/modules/AssetTransferApi.html | 4 +- docs/modules/constructApiPromise.html | 4 +- docs/modules/errors_BaseError.html | 4 +- docs/modules/types.html | 4 +- docs/types/types.AssetTransferApiOpts.html | 4 +- docs/types/types.ConstructedFormat.html | 4 +- docs/types/types.Format.html | 4 +- docs/types/types.LocalTransferTypes.html | 4 +- docs/types/types.Methods.html | 4 +- docs/types/types.RegistryTypes.html | 4 +- docs/types/types.XcmDirection.html | 4 +- package.json | 2 +- 23 files changed, 141 insertions(+), 103 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2bd9cb40..39720b0e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,23 @@ # Changelog +## [0.4.0](https://github.com/paritytech/asset-transfer-api/compare/v0.3.1..v0.4.0) + +### Feat + +- feat: implement transfer all ([#434](https://github.com/paritytech/asset-transfer-api/pull/434))([cf960c5](https://github.com/paritytech/asset-transfer-api/commit/811eba83a37ad9cf54d486fb392a87567cf960c5)) +- feat: implement dryRunCall option ([#433](https://github.com/paritytech/asset-transfer-api/pull/433))([19dfab3](https://github.com/paritytech/asset-transfer-api/commit/9ea6e2015df610cc1be4654ee17f2a8a319dfab3)) + +### Chore + +- chore(yarn): bump yarn to 4.5.0 ([#436](https://github.com/paritytech/asset-transfer-api/pull/436))([bcb4335](https://github.com/paritytech/asset-transfer-api/commit/bb1f4d90ffaef0d6d9146b912a4e727b2bcb4335)) +- chore(registry): update registry dep ([#435](https://github.com/paritytech/asset-transfer-api/pull/435))([26b1466](https://github.com/paritytech/asset-transfer-api/commit/ed3efdb1fc39f45df9cec212270f3a90c26b1466)) +- chore(deps): update pjs ([#432](https://github.com/paritytech/asset-transfer-api/pull/432))([b9f19ca](https://github.com/paritytech/asset-transfer-api/commit/00b245fcc8612a930dcddda223b0a484fb9f19ca)) +- chore(deps): update pjs ([#426](https://github.com/paritytech/asset-transfer-api/pull/426))([bfb6edd](https://github.com/paritytech/asset-transfer-api/commit/1947f5d7dad21428d3d74637a45052f75bfb6edd)) + +### Docs + +- docs: Update Instructions on the Repo ([#428](https://github.com/paritytech/asset-transfer-api/pull/428))([ceeac5a](https://github.com/paritytech/asset-transfer-api/commit/d5bf1319b88bbb6d03e346fb5c0ff0b62ceeac5a)) + ## [0.3.1](https://github.com/paritytech/asset-transfer-api/compare/v0.3.0..v0.3.1) ### Fix diff --git a/docs/assets/navigation.js b/docs/assets/navigation.js index 4b51b023..fd68c8df 100644 --- a/docs/assets/navigation.js +++ b/docs/assets/navigation.js @@ -1 +1 @@ -window.navigationData = "data:application/octet-stream;base64,H4sIAAAAAAAAE42Tb2vCMBCHv0tey5wy3ea7/XEw2NgQXwxERkivNqxNSu4KyvC7L9NamzS2fdf2Hp78cndd/TKCLbEZe0AEWhquMAbzkEs2YDmnxFYyHRUp4NAnrhLKUov9SBWx2XjARCLTyIBis1UPrUi5rQW07eeMxnf79X5QHSC0QjKFIEt+Gp1JhGb0ANQvfS5fVazPQqkITMzFBWfJe+7JtG/euFCCpCWC9s5bTG+c1oAx2uDwkSPM/x+bfTkS3xXRqykVjXNVZGcp2LeA0sXdE9xR0i4HbIY8fO6V7FkaOPTPD3VUVGU/xDlCtXZmgx85YXDyR5uPtg19uV0AFim16UqkTeP/GW7Cg6e0hUjPfH1/O5qMa/an03pB9KJNximsbmBd3jZZP8ObFjw93Wbpbknd1uS6zO9AiY4u6Mpil2MBG2k7smsJ5iBdvi+RBRa5rqsTYdt6v/4DUimcANsFAAA=" \ No newline at end of file +window.navigationData = "data:application/octet-stream;base64,H4sIAAAAAAAAE42TUUvDMBDHv0uei3PDTe3b1AmCoow9CDIkpNc12CQld4UN2XcXt65r0qztW0l+/O6fu+vXLyPYEovZHBFoZbnGFOy8kCxiBaeMxUyZpMwBRz5xlZHKWcR+pE5YPImYyGSeWNAs/hqgFTlHDGm764wnd/v1PqoLCKORbCloXsgPa5REaEcPQMPSF/JFp+YslJrAplxccFa8557OhuZNSy1IGh22975iduO0Bqw1FkcPHGHx/9nuy5H4rolBTalpXOhSnaWgSxVQurhbwR0l7QrAdsjD8aBkT9LCoX9+qKOivvZDnCPUa2c3+F4QBid/tPlo19BX2yVgmVOXrkK6NP6f4SY8eCpbiPTM1/e34+mkYX88rRckz8YqTmF1C+vzdsmGGV6N4PnpNSt3S5q2NtdnfgPKTHJBV132OZawkUh21xHMQfp8n0IFFrmpaxJh23q//gNSKZwA2wUAAA==" \ No newline at end of file diff --git a/docs/assets/search.js b/docs/assets/search.js index 22e6f0a0..75b6ca3d 100644 --- a/docs/assets/search.js +++ b/docs/assets/search.js @@ -1 +1 @@ -window.searchData = "data:application/octet-stream;base64,H4sIAAAAAAAAE7WcW2/buBKA/4vzGqQRRYpK3rrbFijQ3Rbd7J4FiqBQbTrVqSz5SHKabtD/fkhKsmakoa3bPrWuORfONzMkLarPqzz7XqxuPz2vvsXpZnXLLldptFOr29XLolDlXR6lxVblL/fx6nJ1yBP9xS7bHBJVvOgOuPpa7hI9ap1E+hutdLX6edno9Vh4XnMt2dc8wNTlah/lKi0p/a0b7Jq3fqxzFZWqGWj/jNZlnKUTHbo4pXCYqz3FTt+TKN7ZwcVkb5GKhf2L07iMoyT+R31UD3FR5j+muklqWtjbrSrXX98o9TbdZlP97OhY2MONWmcb9fqpzOO0iNdTneyrWcDPN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DvBjLtcr0bx6gxmwB9FirmBXskX95AYIw12Bq8OYu/nf49KsMd01msNFxj3no3yfGofLg6s92KvRhb0aDSQBb+HClattGeMNIgf5LVztrMkPEjQwLF39oVHQO5KAiPlDhPG+HKwIvqs0bIqU2Zf6FWhAG9hmbttWupuiDHBi7mhbWSLPQG0wd8zNJdW8uqTaO1wkx1uqYI0DagNX+iG13d0WqRWEKXBVVF49wNWLQELliARrZuiasPk/UuglzwN16blcqF9RiewrKiC/QY4IVzMx/5FN9+QEmpDnCmYjp+e8P94+A6UBskQ6bdv0oBLUA5XFnC7U4r0mCubtuRb7RrjXRj0AzHNVViPdT3APNBXP1cZKe3HPFTqQddKF/Hhkzx+K7pmdg2Lgrvk3ChL7qkJZvaoAUh8sJsIVBfPuHjALUpW7mkr5lNdvzoJeBiLuO0PW7YAemKXnKqxDdWVh3VxZ6POS8IcaVzs7tPdJFLxPAtSAnAtd62f1fk5Svb0FAgfmL1zAdXsgjwYMGGYu2HRv8UGd8+ZHMRLc/eVqH+seGad68Kf7nz//DwjH0UXwUAAA"; \ No newline at end of file +window.searchData = "data:application/octet-stream;base64,H4sIAAAAAAAAE7Wc7Y+cNhPA/xfu6+p6GIPZ+5Y2iRQpTaL02ifSKooIeBOe8FZgL3uN8r9XNrDMwHgXFvrpkjvPC/ObGWyw+WGV+ffKut/9sL7FWWTds42VBam07q1nVSXrhzLIqr0snxWxtbEOZWLdW2keHRJZ/TIccPu1ThNrY4VJUFWysu4t6+em02sz/7LmVnKseYKpjVUEpcxqSn/vBrvjvR9hKYNadgP1zyCs4zy70qGbcwqnuTpSbPQ9CeJUD66u9hapWNm/OIvrOEjif+R7+SWu6vLpWjdJTSt7u5d1+PWllK+yfX6tnwMdK3sYlU/vD9lvQZJc6x/SsLZ3Mswj+eJYl3FWxeHVLo7UrOBnXzJ5VtXlIayfFfG7Mk/jSo56GjHmbFtjrte3tSJG+RNntSz3QWhQ2w4/38oon0FTvWP8ZD4AjXSG6ZtGbrL5TtjkRlXI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OOmxtWdPwJiIFu4KdBpd9AXFBi4uTimHpG2GwGyPDvojQDNbXs0ixIg4r5JWZbvZaMgKUYafOCOb7r6LK9j+JYaOADudb6pXXTH8kAQADBu8rs710q2KQDNMUW/qQ5y9gkajTDlXBGUQZ0X+iMBINdAwJjJ9Ua0bD7nAGThvMTUJBrZqn0hB4RBX2CmulTnYr7HtbrDDacYHFyzO0F+TI2D3uIa3VfHEip9LAF0BuC7a8qyUu7rGM9vXRAw1zQr6fKDAi1AnvgmlzsFoyUV6EyOKUugMC50UBqO+ZqT4KnOP7ffgwC0gW1mtq2lRykKLpqZiqOVJfIM9BRmKulmT3bZ7MkerY2S06ZsgBIkjzdJ7XCuR2oFjcQzhql5L6/mrVSO+CA5t6a7h/pgFH2/tIG4bUqx9nhYoI+HgYoC7rumoKiveo0WfqAL2UafW8Esr4vTrkLQBIFxYSquJj+oDLWBODO60IoPU9QGxWFfsj3qozbIJdtUWp30OMNt0AmZaaJX6w2ZhtAJEH5hcuD0yGGwXALV6ZluICfZ8ks1fF7BQexcU+A7BYk+1lM3x3qAE3DRZkpadQoamAV5zk2lVh/L9swyaISAFjeGe9g+bdCGbFNpHJptLGG3jWXM2gdqtqZoH/o9RhLuMQJqwI1oa7qG5mBd0hy7BLEGyeKa2vExTMlFCQOwmalQjmEquzPj4/hzuCQ8o6KbJaIeAa5bmK6b7oscXDZvH0h6pIqPG6uIC5nEmbTudx9//vwXYIH4WldXAAA="; \ No newline at end of file diff --git a/docs/classes/AssetTransferApi.AssetTransferApi.html b/docs/classes/AssetTransferApi.AssetTransferApi.html index f3797ef5..0a55dd6a 100644 --- a/docs/classes/AssetTransferApi.AssetTransferApi.html +++ b/docs/classes/AssetTransferApi.AssetTransferApi.html @@ -1,10 +1,11 @@ -AssetTransferApi | @substrate/asset-transfer-api - v0.3.1

Holds open an api connection to a specified chain within the ApiPromise in order to help +AssetTransferApi | @substrate/asset-transfer-api - v0.4.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

  • Create a local claimAssets XCM transaction to retrieve trapped assets. This can be either locally on a systems parachain, on the relay chain or any chain that supports the pallet-xcm claimAssets runtime call.

    @@ -14,7 +15,7 @@
  • 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 +24,23 @@
  • 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>>

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 d3fbdaa0..360243de 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.3.1

Errors that may be returned by the API.

-

Enumeration Members

AssetNotFound +BaseErrorsEnum | @substrate/asset-transfer-api - v0.4.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.

-
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 +
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 00fe47d2..b3ad79fa 100644 --- a/docs/enums/types.Direction.html +++ b/docs/enums/types.Direction.html @@ -1,5 +1,5 @@ -Direction | @substrate/asset-transfer-api - v0.3.1

Represents all possible tx directions

-

Enumeration Members

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

Represents all possible tx directions

+

Enumeration Members

Enumeration Members

Local: "Local"

Local tx

-
ParaToPara: "ParaToPara"

Parachain to Parachain.

-
ParaToRelay: "ParaToRelay"

Parachain to Relay chain.

-
ParaToSystem: "ParaToSystem"

Parachain to System parachain.

-
RelayToBridge: "RelayToBridge"

Relay chain to an external GlobalConsensus chain.

-
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 +
ParaToPara: "ParaToPara"

Parachain to Parachain.

+
ParaToRelay: "ParaToRelay"

Parachain to Relay chain.

+
ParaToSystem: "ParaToSystem"

Parachain to System parachain.

+
RelayToBridge: "RelayToBridge"

Relay chain to an external GlobalConsensus chain.

+
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 08135be1..20640ca1 100644 --- a/docs/functions/constructApiPromise.constructApiPromise.html +++ b/docs/functions/constructApiPromise.constructApiPromise.html @@ -1,6 +1,6 @@ -constructApiPromise | @substrate/asset-transfer-api - v0.3.1

Returns Promise<ApiInfo>

\ No newline at end of file diff --git a/docs/index.html b/docs/index.html index 1673b8d7..0c252808 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,4 +1,4 @@ -@substrate/asset-transfer-api - v0.3.1

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



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

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



@substrate/asset-transfer-api

Asset API used for common good parachains

@@ -100,9 +100,9 @@

Asset API used for common good parachains

AssetTransferApi & AssetTransferApiOpts & TransferArgsOpts

// The AssetTransferApi exposes one method as of now called: `createTransferTransaction`

/**
* Create an XCM transaction to transfer Assets, or native tokens from one
* chain to another.
*
* @param destChainId ID of the destination (para) chain (‘0’ for Relaychain)
* @param destAddr Address of destination account
* @param assetIds Array of assetId's to be transferred
* @param amounts Array of the amounts of each token to transfer
* @param opts Options
*/
AssetTransferApi.createTransferTransaction(
destChainId: string,
destAddr: string,
assetIds: string[],
amounts: string[],
opts?: TransferArgsOpts<T>
)
-
// 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;
}; +
// 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/docs/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 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;
} +
// 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;
/**
* For creating local asset transfers, this will allow for a `transferAll` as opposed
* to a `transfer`.
*/
transferAll?: 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;
/**
* Optionally allows for dry running the constructed tx in order get the estimated fees and execution result.
*/
dryRunCall?: boolean;

/**
* Optional assetId that will be used to pay for fees. Used with the `dryRunCall` option to determine fees in the specified asset.
*/
xcmFeeAsset?: 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.

@@ -153,4 +153,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 a635f941..237f515e 100644 --- a/docs/interfaces/constructApiPromise.ApiInfo.html +++ b/docs/interfaces/constructApiPromise.ApiInfo.html @@ -1,10 +1,10 @@ -ApiInfo | @substrate/asset-transfer-api - v0.3.1

Return value for constructApiPromise

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

Properties

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

Return value for constructApiPromise

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

Properties

api: ApiPromise

Polkadot-js ApiPromise

-
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 +
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 fac9699b..d9583c66 100644 --- a/docs/interfaces/types.TransferArgsOpts.html +++ b/docs/interfaces/types.TransferArgsOpts.html @@ -1,6 +1,7 @@ -TransferArgsOpts | @substrate/asset-transfer-api - v0.3.1

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

assetTransferType? +TransferArgsOpts | @substrate/asset-transfer-api - v0.4.0

The TransferArgsOpts are the options passed into createTransferTransaction.

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

Type Parameters

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. +

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. +

dryRunCall?: boolean

Optionally allows for dry running the constructed tx in order get the estimated fees and execution result.

+
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. +

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 opposed 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

-
remoteReserveAssetTransferTypeLocation?: string

The RemoteReserve location for an XCM transfer. +

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. +

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. +

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. +

transferAll?: boolean

For creating local asset transfers, this will allow for a transferAll call as opposed +to a transfer call.

+
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 +

xcmFeeAsset?: string

Optional assetId that will be used to pay for fees. Used with the dryRunCall option to determine fees in the specified asset.

+
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 2b0779f1..cb1cb350 100644 --- a/docs/interfaces/types.TxResult.html +++ b/docs/interfaces/types.TxResult.html @@ -1,17 +1,23 @@ -TxResult | @substrate/asset-transfer-api - v0.3.1

The TxResult is the result of constructing a transaction. +TxResult | @substrate/asset-transfer-api - v0.4.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";
    forwardedXcmFees?: [VersionedXcm, XcmFee][];
    localXcmFees?: [VersionedXcm, XcmFee];
    method: Methods;
    origin: string;
    tx: ConstructedFormat<T>;
    xcmExecutionResult?: DispatchResultWithPostInfo | XcmDryRunApiError;
    xcmVersion: null | number;
}

Type Parameters

  • T

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.

+
forwardedXcmFees?: [VersionedXcm, XcmFee][]

Description

List of forwarded xcms and the weights needed to execute them.

+
localXcmFees?: [VersionedXcm, XcmFee]

Description

Weight needed to execute the local segment of a provided XCM.

+
method: Methods

Description

The method used in the transaction.

+
origin: string

Description

The origin specName of the transaction

+

Description

The constructed transaction.

+
xcmExecutionResult?: DispatchResultWithPostInfo | XcmDryRunApiError

Description

The result of xcm execution.

+
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 bfc1ed23..26856885 100644 --- a/docs/modules/AssetTransferApi.html +++ b/docs/modules/AssetTransferApi.html @@ -1,2 +1,2 @@ -AssetTransferApi | @substrate/asset-transfer-api - v0.3.1
\ No newline at end of file +AssetTransferApi | @substrate/asset-transfer-api - v0.4.0
\ No newline at end of file diff --git a/docs/modules/constructApiPromise.html b/docs/modules/constructApiPromise.html index fb5511a7..724edcad 100644 --- a/docs/modules/constructApiPromise.html +++ b/docs/modules/constructApiPromise.html @@ -1,3 +1,3 @@ -constructApiPromise | @substrate/asset-transfer-api - v0.3.1

Index

Interfaces

ApiInfo +constructApiPromise | @substrate/asset-transfer-api - v0.4.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 71a88a54..4cb5d18a 100644 --- a/docs/modules/errors_BaseError.html +++ b/docs/modules/errors_BaseError.html @@ -1,2 +1,2 @@ -errors/BaseError | @substrate/asset-transfer-api - v0.3.1
\ No newline at end of file +errors/BaseError | @substrate/asset-transfer-api - v0.4.0
\ No newline at end of file diff --git a/docs/modules/types.html b/docs/modules/types.html index 55d2761b..f1e61031 100644 --- a/docs/modules/types.html +++ b/docs/modules/types.html @@ -1,4 +1,4 @@ -types | @substrate/asset-transfer-api - v0.3.1

Index

Enumerations

Direction +types | @substrate/asset-transfer-api - v0.4.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 930375bb..fce33f3e 100644 --- a/docs/types/types.AssetTransferApiOpts.html +++ b/docs/types/types.AssetTransferApiOpts.html @@ -1,7 +1,7 @@ -AssetTransferApiOpts | @substrate/asset-transfer-api - v0.3.1
AssetTransferApiOpts<T>: {
    chainName?: string;
    injectedRegistry?: RequireAtLeastOne<ChainInfoRegistry<T>>;
    overrideRegistry?: RequireAtLeastOne<ChainInfoRegistry<InjectedChainInfoKeys>>;
    registryType?: RegistryTypes;
}

Options that are appplied at initialization of the AssetTransferApi.

+AssetTransferApiOpts | @substrate/asset-transfer-api - v0.4.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 50e87a06..202d6e67 100644 --- a/docs/types/types.ConstructedFormat.html +++ b/docs/types/types.ConstructedFormat.html @@ -1,2 +1,2 @@ -ConstructedFormat | @substrate/asset-transfer-api - v0.3.1
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.4.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 a2173afb..f9832f7b 100644 --- a/docs/types/types.Format.html +++ b/docs/types/types.Format.html @@ -1,7 +1,7 @@ -Format | @substrate/asset-transfer-api - v0.3.1
Format: "payload" | "call" | "submittable"

AssetTransferApi supports three formats to be returned:

+Format | @substrate/asset-transfer-api - v0.4.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 ac0f2d62..2e898b01 100644 --- a/docs/types/types.LocalTransferTypes.html +++ b/docs/types/types.LocalTransferTypes.html @@ -1,2 +1,2 @@ -LocalTransferTypes | @substrate/asset-transfer-api - v0.3.1
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.4.0
LocalTransferTypes: "assets::transfer" | "assets::transferKeepAlive" | "assets::transferAll" | "foreignAssets::transfer" | "foreignAssets::transferKeepAlive" | "foreignAssets::transferAll" | "balances::transfer" | "balances::transferKeepAlive" | "balances::transferAll" | "poolAssets::transfer" | "poolAssets::transferKeepAlive" | "poolAssets::transferAll" | "tokens::transfer" | "tokens::transferKeepAlive" | "tokens::transferAll"

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 c9b053a6..67aa7fef 100644 --- a/docs/types/types.Methods.html +++ b/docs/types/types.Methods.html @@ -1,2 +1,2 @@ -Methods | @substrate/asset-transfer-api - v0.3.1
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 +Methods | @substrate/asset-transfer-api - v0.4.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 78d966b7..79d3e621 100644 --- a/docs/types/types.RegistryTypes.html +++ b/docs/types/types.RegistryTypes.html @@ -1,4 +1,4 @@ -RegistryTypes | @substrate/asset-transfer-api - v0.3.1
RegistryTypes: "CDN" | "NPM"

Types that the registry can be initialized as.

+RegistryTypes | @substrate/asset-transfer-api - v0.4.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 12ebd0ad..4d3cf75a 100644 --- a/docs/types/types.XcmDirection.html +++ b/docs/types/types.XcmDirection.html @@ -1,2 +1,2 @@ -XcmDirection | @substrate/asset-transfer-api - v0.3.1
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.4.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 49ba16b5..1c94bcf2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@substrate/asset-transfer-api", - "version": "0.3.1", + "version": "0.4.0", "description": "", "main": "lib/index.js", "scripts": {