From 75547aa80b2611a8b30b0274951356e73fff826c Mon Sep 17 00:00:00 2001 From: marshacb Date: Sat, 14 Dec 2024 16:15:54 -0500 Subject: [PATCH] chore(release): 0.4.5 --- CHANGELOG.md | 41 + docs/assets/highlight.css | 28 +- docs/assets/icons.js | 18 + docs/assets/icons.svg | 1 + docs/assets/main.js | 1809 +---------------- docs/assets/navigation.js | 3 +- docs/assets/search.js | 3 +- docs/assets/style.css | 231 ++- .../AssetTransferApi.AssetTransferApi.html | 90 +- .../errors_BaseError.BaseErrorsEnum.html | 84 +- docs/enums/types.Direction.html | 48 +- ...nstructApiPromise.constructApiPromise.html | 13 +- docs/index.html | 132 +- .../constructApiPromise.ApiInfo.html | 20 +- docs/interfaces/types.TransferArgsOpts.html | 76 +- docs/interfaces/types.TxResult.html | 44 +- docs/modules.html | 5 + docs/modules/AssetTransferApi.html | 4 +- docs/modules/constructApiPromise.html | 6 +- docs/modules/errors_BaseError.html | 4 +- docs/modules/types.html | 22 +- docs/types/types.AssetTransferApiOpts.html | 12 +- 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 +- 29 files changed, 549 insertions(+), 2171 deletions(-) create mode 100644 docs/assets/icons.js create mode 100644 docs/assets/icons.svg create mode 100644 docs/modules.html diff --git a/CHANGELOG.md b/CHANGELOG.md index 1da1fcda..5ea7e3a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,46 @@ # Changelog +## [0.4.5](https://github.com/paritytech/asset-transfer-api/compare/v0.4.4..v0.4.5) + +## Test + +- test: add chopsticks e2e tests ([#481](https://github.com/paritytech/asset-transfer-api/pull/481))([7406b5c](https://github.com/paritytech/asset-transfer-api/commit/d7354428e634792e33c294f358cbbeb737406b5c)) + +## Fix + +- fix: dependabot PR title ([#464](https://github.com/paritytech/asset-transfer-api/pull/464))([1f576b1](https://github.com/paritytech/asset-transfer-api/commit/29963b5fc1c1f4f20cd957f7a87d9f6f51f576b1)) + +## Docs + +- docs: Update README.md and add installation instructions for examples ([#454](https://github.com/paritytech/asset-transfer-api/pull/454))([029ec73](https://github.com/paritytech/asset-transfer-api/commit/ecda631fe80d4d5b799cb13e895d40245029ec73)) + +## Chore + +- chore(deps): update pjs ([#484](https://github.com/paritytech/asset-transfer-api/pull/484))([664ba3c](https://github.com/paritytech/asset-transfer-api/commit/464a2e20303ef54e92b8d7fb9335229d8664ba3c)) +- chore(deps-dev): bump typedoc from 0.27.2 to 0.27.4 ([#480](https://github.com/paritytech/asset-transfer-api/pull/480))([710ab6e](https://github.com/paritytech/asset-transfer-api/commit/af7f27860a43be114748380bcc6f529de710ab6e)) +- chore(deps-dev): bump typedoc from 0.26.11 to 0.27.2 ([#479](https://github.com/paritytech/asset-transfer-api/pull/479))([44f4ef8](https://github.com/paritytech/asset-transfer-api/commit/410410a7ca36193ba9254a23a140efa2f44f4ef8)) +- chore(deps): bump the pjs group with 4 updates ([#478](https://github.com/paritytech/asset-transfer-api/pull/478))([21359a7](https://github.com/paritytech/asset-transfer-api/commit/420b25bcb84fa862f28db409b905e1fc521359a7)) +- chore(deps-dev): bump typedoc-plugin-missing-exports from 3.0.0 to 3.1.0 ([#477](https://github.com/paritytech/asset-transfer-api/pull/477))([5d12392](https://github.com/paritytech/asset-transfer-api/commit/b86dac416871584783856ff61042eea695d12392)) +- chore(deps): bump the pjs group across 1 directory with 6 updates ([#476](https://github.com/paritytech/asset-transfer-api/pull/476))([54f46b5](https://github.com/paritytech/asset-transfer-api/commit/f56781dcab9bdb820f0dab2def449a48f54f46b5)) +- chore(deps): revert bump @substrate/asset-transfer-api-registry from 0.2.24 to 0.2.25 ([#472](https://github.com/paritytech/asset-transfer-api/pull/471))([b1f004c](https://github.com/paritytech/asset-transfer-api/commit/72b341a2f0b20f63a195ef47b3c0c2804b1f004c)) +- chore(deps-dev): bump @substrate/dev from 0.8.0 to 0.9.0 ([#471](https://github.com/paritytech/asset-transfer-api/pull/471))([e5c0881](https://github.com/paritytech/asset-transfer-api/commit/69c8bfc52dc9146e1769f995adbd40990e5c0881)) +- chore(deps-dev): bump typedoc from 0.26.10 to 0.26.11 ([#470](https://github.com/paritytech/asset-transfer-api/pull/470))([a104c49](https://github.com/paritytech/asset-transfer-api/commit/1582fb96adf870d0cd0fa151a2de0715aa104c49)) +- chore(deps): bump the pjs group with 6 updates ([#469](https://github.com/paritytech/asset-transfer-api/pull/469))([7c87c81](https://github.com/paritytech/asset-transfer-api/commit/a37540d8881672f8058650b98bbfd98447c87c81)) +- chore(deps): bump @substrate/asset-transfer-api-registry from 0.2.24 to 0.2.2 ([#468](https://github.com/paritytech/asset-transfer-api/pull/468))([9ad862a](https://github.com/paritytech/asset-transfer-api/commit/bb0c3f47f43a3bc0f4ac3f59c1484d2709ad862a)) +- chore(deps-dev): bump chalk from 4.1.2 to 5.3.0 ([#467](https://github.com/paritytech/asset-transfer-api/pull/467))([65e9f5f](https://github.com/paritytech/asset-transfer-api/commit/46f8598265da4be5528b6f970eb49a33e65e9f5f)) +- chore(deps-dev): bump typedoc-theme-hierarchy from 4.0.0 to 5.0.3 ([#466](https://github.com/paritytech/asset-transfer-api/pull/466))([601026b](https://github.com/paritytech/asset-transfer-api/commit/5d73c1ed705252e1f49894be6748cfcdb601026b)) +- chore(deps): bump the pjs group across 1 directory with 6 updates ([#465](https://github.com/paritytech/asset-transfer-api/pull/465))([630624d](https://github.com/paritytech/asset-transfer-api/commit/0c26dcdc196327328385d336819e89c84630624d)) +- chore(deps-dev): bump @types/cli-progress from 3.11.5 to 3.11.6([#463](https://github.com/paritytech/asset-transfer-api/pull/463))([d8c6de2](https://github.com/paritytech/asset-transfer-api/commit/c1f6541388062a8d2f67014402b7ad686d8c6de2)) +- chore(deps-dev): bump typedoc from 0.25.4 to 0.26.10 ([#462](https://github.com/paritytech/asset-transfer-api/pull/462))([4c42bf5](https://github.com/paritytech/asset-transfer-api/commit/bf740e6d3b7aab5948f4a4c6e753d09af4c42bf5)) +- chore(deps-dev): bump typedoc-plugin-missing-exports from 1.0.0 to 3.0.0 ([#461](https://github.com/paritytech/asset-transfer-api/pull/461))([1d9dccb](https://github.com/paritytech/asset-transfer-api/commit/229a94142f49af8675e3df74060eab5bf1d9dccb)) +- chore(deps-dev): bump @substrate/dev from 0.7.1 to 0.8.0 ([#460](https://github.com/paritytech/asset-transfer-api/pull/460))([b66d5a7](https://github.com/paritytech/asset-transfer-api/commit/db398842d50eb88d3f2bd2344916f130cb66d5a7)) +- chore: declare explicit pjs dependencies ([#458](https://github.com/paritytech/asset-transfer-api/pull/458))([151f964](https://github.com/paritytech/asset-transfer-api/commit/217d05e3fe860dd0fab0a0cc74985ffcf151f964)) +- chore: enable dependabot ([#457](https://github.com/paritytech/asset-transfer-api/pull/457))([b5af4c6](https://github.com/paritytech/asset-transfer-api/commit/155ebe4bf036e87e2c087c332d204d48ab5af4c6)) +- chore: run prettier format ([#456](https://github.com/paritytech/asset-transfer-api/pull/456))([d13b8a0](https://github.com/paritytech/asset-transfer-api/commit/bab268ab19279ec131da1fa717885c008d13b8a0)) +- chore(deps): bump tar from 6.1.13 to 6.2.1 ([#453](https://github.com/paritytech/asset-transfer-api/pull/453))([da25d80](https://github.com/paritytech/asset-transfer-api/commit/7f326b8aedb65f29fe26cb1bef4150c82da25d80)) +- chore(deps): bump micromatch from 4.0.5 to 4.0.8 ([#452](https://github.com/paritytech/asset-transfer-api/pull/452))([ab5e927](https://github.com/paritytech/asset-transfer-api/commit/9d7d205c77ba373b610221d30cd28e387ab5e927)) +- chore(deps): bump braces from 3.0.2 to 3.0.3 ([#451](https://github.com/paritytech/asset-transfer-api/pull/451))([7704d7f](https://github.com/paritytech/asset-transfer-api/commit/593545316aa7b950f80f5c207512b48bc7704d7f)) + ## [0.4.4](https://github.com/paritytech/asset-transfer-api/compare/v0.4.3..v0.4.4) ### Chore diff --git a/docs/assets/highlight.css b/docs/assets/highlight.css index 4a2d183b..ecb07c6f 100644 --- a/docs/assets/highlight.css +++ b/docs/assets/highlight.css @@ -1,20 +1,20 @@ :root { - --light-hl-0: #AF00DB; - --dark-hl-0: #C586C0; + --light-hl-0: #795E26; + --dark-hl-0: #DCDCAA; --light-hl-1: #000000; --dark-hl-1: #D4D4D4; - --light-hl-2: #001080; - --dark-hl-2: #9CDCFE; - --light-hl-3: #A31515; - --dark-hl-3: #CE9178; - --light-hl-4: #008000; - --dark-hl-4: #6A9955; - --light-hl-5: #0000FF; - --dark-hl-5: #569CD6; - --light-hl-6: #0070C1; - --dark-hl-6: #4FC1FF; - --light-hl-7: #795E26; - --dark-hl-7: #DCDCAA; + --light-hl-2: #A31515; + --dark-hl-2: #CE9178; + --light-hl-3: #AF00DB; + --dark-hl-3: #C586C0; + --light-hl-4: #001080; + --dark-hl-4: #9CDCFE; + --light-hl-5: #008000; + --dark-hl-5: #6A9955; + --light-hl-6: #0000FF; + --dark-hl-6: #569CD6; + --light-hl-7: #0070C1; + --dark-hl-7: #4FC1FF; --light-hl-8: #098658; --dark-hl-8: #B5CEA8; --light-hl-9: #267F99; diff --git a/docs/assets/icons.js b/docs/assets/icons.js new file mode 100644 index 00000000..3dfbd322 --- /dev/null +++ b/docs/assets/icons.js @@ -0,0 +1,18 @@ +(function() { + addIcons(); + function addIcons() { + if (document.readyState === "loading") return document.addEventListener("DOMContentLoaded", addIcons); + const svg = document.body.appendChild(document.createElementNS("http://www.w3.org/2000/svg", "svg")); + svg.innerHTML = `MMNEPVFCICPMFPCPTTAAATR`; + svg.style.display = "none"; + if (location.protocol === "file:") updateUseElements(); + } + + function updateUseElements() { + document.querySelectorAll("use").forEach(el => { + if (el.getAttribute("href").includes("#icon-")) { + el.setAttribute("href", el.getAttribute("href").replace(/.*#/, "#")); + } + }); + } +})() \ No newline at end of file diff --git a/docs/assets/icons.svg b/docs/assets/icons.svg new file mode 100644 index 00000000..a19417dc --- /dev/null +++ b/docs/assets/icons.svg @@ -0,0 +1 @@ +MMNEPVFCICPMFPCPTTAAATR \ No newline at end of file diff --git a/docs/assets/main.js b/docs/assets/main.js index cec76dc1..99097a05 100644 --- a/docs/assets/main.js +++ b/docs/assets/main.js @@ -1,1806 +1,9 @@ -'use strict'; -'use strict'; -(() => { - var Pe = Object.create; - var ne = Object.defineProperty; - var Ie = Object.getOwnPropertyDescriptor; - var Oe = Object.getOwnPropertyNames; - var _e = Object.getPrototypeOf, - Re = Object.prototype.hasOwnProperty; - var Me = (t, e) => () => (e || t((e = { exports: {} }).exports, e), e.exports); - var Fe = (t, e, n, r) => { - if ((e && typeof e == 'object') || typeof e == 'function') - for (let i of Oe(e)) - !Re.call(t, i) && i !== n && ne(t, i, { get: () => e[i], enumerable: !(r = Ie(e, i)) || r.enumerable }); - return t; - }; - var De = (t, e, n) => ( - (n = t != null ? Pe(_e(t)) : {}), - Fe(e || !t || !t.__esModule ? ne(n, 'default', { value: t, enumerable: !0 }) : n, t) - ); - var ae = Me((se, oe) => { - (function () { - var t = function (e) { - var n = new t.Builder(); - return ( - n.pipeline.add(t.trimmer, t.stopWordFilter, t.stemmer), - n.searchPipeline.add(t.stemmer), - e.call(n, n), - n.build() - ); - }; - t.version = '2.3.9'; - (t.utils = {}), - (t.utils.warn = (function (e) { - return function (n) { - e.console && console.warn && console.warn(n); - }; - })(this)), - (t.utils.asString = function (e) { - return e == null ? '' : e.toString(); - }), - (t.utils.clone = function (e) { - if (e == null) return e; - for (var n = Object.create(null), r = Object.keys(e), i = 0; i < r.length; i++) { - var s = r[i], - o = e[s]; - if (Array.isArray(o)) { - n[s] = o.slice(); - continue; - } - if (typeof o == 'string' || typeof o == 'number' || typeof o == 'boolean') { - n[s] = o; - continue; - } - throw new TypeError('clone is not deep and does not support nested objects'); - } - return n; - }), - (t.FieldRef = function (e, n, r) { - (this.docRef = e), (this.fieldName = n), (this._stringValue = r); - }), - (t.FieldRef.joiner = '/'), - (t.FieldRef.fromString = function (e) { - var n = e.indexOf(t.FieldRef.joiner); - if (n === -1) throw 'malformed field ref string'; - var r = e.slice(0, n), - i = e.slice(n + 1); - return new t.FieldRef(i, r, e); - }), - (t.FieldRef.prototype.toString = function () { - return ( - this._stringValue == null && (this._stringValue = this.fieldName + t.FieldRef.joiner + this.docRef), - this._stringValue - ); - }); - (t.Set = function (e) { - if (((this.elements = Object.create(null)), e)) { - this.length = e.length; - for (var n = 0; n < this.length; n++) this.elements[e[n]] = !0; - } else this.length = 0; - }), - (t.Set.complete = { - intersect: function (e) { - return e; - }, - union: function () { - return this; - }, - contains: function () { - return !0; - }, - }), - (t.Set.empty = { - intersect: function () { - return this; - }, - union: function (e) { - return e; - }, - contains: function () { - return !1; - }, - }), - (t.Set.prototype.contains = function (e) { - return !!this.elements[e]; - }), - (t.Set.prototype.intersect = function (e) { - var n, - r, - i, - s = []; - if (e === t.Set.complete) return this; - if (e === t.Set.empty) return e; - this.length < e.length ? ((n = this), (r = e)) : ((n = e), (r = this)), (i = Object.keys(n.elements)); - for (var o = 0; o < i.length; o++) { - var a = i[o]; - a in r.elements && s.push(a); - } - return new t.Set(s); - }), - (t.Set.prototype.union = function (e) { - return e === t.Set.complete - ? t.Set.complete - : e === t.Set.empty - ? this - : new t.Set(Object.keys(this.elements).concat(Object.keys(e.elements))); - }), - (t.idf = function (e, n) { - var r = 0; - for (var i in e) i != '_index' && (r += Object.keys(e[i]).length); - var s = (n - r + 0.5) / (r + 0.5); - return Math.log(1 + Math.abs(s)); - }), - (t.Token = function (e, n) { - (this.str = e || ''), (this.metadata = n || {}); - }), - (t.Token.prototype.toString = function () { - return this.str; - }), - (t.Token.prototype.update = function (e) { - return (this.str = e(this.str, this.metadata)), this; - }), - (t.Token.prototype.clone = function (e) { - return ( - (e = - e || - function (n) { - return n; - }), - new t.Token(e(this.str, this.metadata), this.metadata) - ); - }); - (t.tokenizer = function (e, n) { - if (e == null || e == null) return []; - if (Array.isArray(e)) - return e.map(function (v) { - return new t.Token(t.utils.asString(v).toLowerCase(), t.utils.clone(n)); - }); - for (var r = e.toString().toLowerCase(), i = r.length, s = [], o = 0, a = 0; o <= i; o++) { - var l = r.charAt(o), - u = o - a; - if (l.match(t.tokenizer.separator) || o == i) { - if (u > 0) { - var d = t.utils.clone(n) || {}; - (d.position = [a, u]), (d.index = s.length), s.push(new t.Token(r.slice(a, o), d)); - } - a = o + 1; - } - } - return s; - }), - (t.tokenizer.separator = /[\s\-]+/); - (t.Pipeline = function () { - this._stack = []; - }), - (t.Pipeline.registeredFunctions = Object.create(null)), - (t.Pipeline.registerFunction = function (e, n) { - n in this.registeredFunctions && t.utils.warn('Overwriting existing registered function: ' + n), - (e.label = n), - (t.Pipeline.registeredFunctions[e.label] = e); - }), - (t.Pipeline.warnIfFunctionNotRegistered = function (e) { - var n = e.label && e.label in this.registeredFunctions; - n || - t.utils.warn( - `Function is not registered with pipeline. This may cause problems when serialising the index. -`, - e, - ); - }), - (t.Pipeline.load = function (e) { - var n = new t.Pipeline(); - return ( - e.forEach(function (r) { - var i = t.Pipeline.registeredFunctions[r]; - if (i) n.add(i); - else throw new Error('Cannot load unregistered function: ' + r); - }), - n - ); - }), - (t.Pipeline.prototype.add = function () { - var e = Array.prototype.slice.call(arguments); - e.forEach(function (n) { - t.Pipeline.warnIfFunctionNotRegistered(n), this._stack.push(n); - }, this); - }), - (t.Pipeline.prototype.after = function (e, n) { - t.Pipeline.warnIfFunctionNotRegistered(n); - var r = this._stack.indexOf(e); - if (r == -1) throw new Error('Cannot find existingFn'); - (r = r + 1), this._stack.splice(r, 0, n); - }), - (t.Pipeline.prototype.before = function (e, n) { - t.Pipeline.warnIfFunctionNotRegistered(n); - var r = this._stack.indexOf(e); - if (r == -1) throw new Error('Cannot find existingFn'); - this._stack.splice(r, 0, n); - }), - (t.Pipeline.prototype.remove = function (e) { - var n = this._stack.indexOf(e); - n != -1 && this._stack.splice(n, 1); - }), - (t.Pipeline.prototype.run = function (e) { - for (var n = this._stack.length, r = 0; r < n; r++) { - for (var i = this._stack[r], s = [], o = 0; o < e.length; o++) { - var a = i(e[o], o, e); - if (!(a == null || a === '')) - if (Array.isArray(a)) for (var l = 0; l < a.length; l++) s.push(a[l]); - else s.push(a); - } - e = s; - } - return e; - }), - (t.Pipeline.prototype.runString = function (e, n) { - var r = new t.Token(e, n); - return this.run([r]).map(function (i) { - return i.toString(); - }); - }), - (t.Pipeline.prototype.reset = function () { - this._stack = []; - }), - (t.Pipeline.prototype.toJSON = function () { - return this._stack.map(function (e) { - return t.Pipeline.warnIfFunctionNotRegistered(e), e.label; - }); - }); - (t.Vector = function (e) { - (this._magnitude = 0), (this.elements = e || []); - }), - (t.Vector.prototype.positionForIndex = function (e) { - if (this.elements.length == 0) return 0; - for ( - var n = 0, r = this.elements.length / 2, i = r - n, s = Math.floor(i / 2), o = this.elements[s * 2]; - i > 1 && (o < e && (n = s), o > e && (r = s), o != e); - - ) - (i = r - n), (s = n + Math.floor(i / 2)), (o = this.elements[s * 2]); - if (o == e || o > e) return s * 2; - if (o < e) return (s + 1) * 2; - }), - (t.Vector.prototype.insert = function (e, n) { - this.upsert(e, n, function () { - throw 'duplicate index'; - }); - }), - (t.Vector.prototype.upsert = function (e, n, r) { - this._magnitude = 0; - var i = this.positionForIndex(e); - this.elements[i] == e - ? (this.elements[i + 1] = r(this.elements[i + 1], n)) - : this.elements.splice(i, 0, e, n); - }), - (t.Vector.prototype.magnitude = function () { - if (this._magnitude) return this._magnitude; - for (var e = 0, n = this.elements.length, r = 1; r < n; r += 2) { - var i = this.elements[r]; - e += i * i; - } - return (this._magnitude = Math.sqrt(e)); - }), - (t.Vector.prototype.dot = function (e) { - for ( - var n = 0, r = this.elements, i = e.elements, s = r.length, o = i.length, a = 0, l = 0, u = 0, d = 0; - u < s && d < o; - - ) - (a = r[u]), - (l = i[d]), - a < l ? (u += 2) : a > l ? (d += 2) : a == l && ((n += r[u + 1] * i[d + 1]), (u += 2), (d += 2)); - return n; - }), - (t.Vector.prototype.similarity = function (e) { - return this.dot(e) / this.magnitude() || 0; - }), - (t.Vector.prototype.toArray = function () { - for (var e = new Array(this.elements.length / 2), n = 1, r = 0; n < this.elements.length; n += 2, r++) - e[r] = this.elements[n]; - return e; - }), - (t.Vector.prototype.toJSON = function () { - return this.elements; - }); - (t.stemmer = (function () { - var e = { - ational: 'ate', - tional: 'tion', - enci: 'ence', - anci: 'ance', - izer: 'ize', - bli: 'ble', - alli: 'al', - entli: 'ent', - eli: 'e', - ousli: 'ous', - ization: 'ize', - ation: 'ate', - ator: 'ate', - alism: 'al', - iveness: 'ive', - fulness: 'ful', - ousness: 'ous', - aliti: 'al', - iviti: 'ive', - biliti: 'ble', - logi: 'log', - }, - n = { icate: 'ic', ative: '', alize: 'al', iciti: 'ic', ical: 'ic', ful: '', ness: '' }, - r = '[^aeiou]', - i = '[aeiouy]', - s = r + '[^aeiouy]*', - o = i + '[aeiou]*', - a = '^(' + s + ')?' + o + s, - l = '^(' + s + ')?' + o + s + '(' + o + ')?$', - u = '^(' + s + ')?' + o + s + o + s, - d = '^(' + s + ')?' + i, - v = new RegExp(a), - f = new RegExp(u), - b = new RegExp(l), - g = new RegExp(d), - L = /^(.+?)(ss|i)es$/, - p = /^(.+?)([^s])s$/, - m = /^(.+?)eed$/, - S = /^(.+?)(ed|ing)$/, - w = /.$/, - k = /(at|bl|iz)$/, - _ = new RegExp('([^aeiouylsz])\\1$'), - H = new RegExp('^' + s + i + '[^aeiouwxy]$'), - A = /^(.+?[^aeiou])y$/, - j = - /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/, - $ = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/, - N = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/, - q = /^(.+?)(s|t)(ion)$/, - P = /^(.+?)e$/, - z = /ll$/, - W = new RegExp('^' + s + i + '[^aeiouwxy]$'), - V = function (c) { - var y, I, T, h, x, O, M; - if (c.length < 3) return c; - if ( - ((T = c.substr(0, 1)), - T == 'y' && (c = T.toUpperCase() + c.substr(1)), - (h = L), - (x = p), - h.test(c) ? (c = c.replace(h, '$1$2')) : x.test(c) && (c = c.replace(x, '$1$2')), - (h = m), - (x = S), - h.test(c)) - ) { - var E = h.exec(c); - (h = v), h.test(E[1]) && ((h = w), (c = c.replace(h, ''))); - } else if (x.test(c)) { - var E = x.exec(c); - (y = E[1]), - (x = g), - x.test(y) && - ((c = y), - (x = k), - (O = _), - (M = H), - x.test(c) - ? (c = c + 'e') - : O.test(c) - ? ((h = w), (c = c.replace(h, ''))) - : M.test(c) && (c = c + 'e')); - } - if (((h = A), h.test(c))) { - var E = h.exec(c); - (y = E[1]), (c = y + 'i'); - } - if (((h = j), h.test(c))) { - var E = h.exec(c); - (y = E[1]), (I = E[2]), (h = v), h.test(y) && (c = y + e[I]); - } - if (((h = $), h.test(c))) { - var E = h.exec(c); - (y = E[1]), (I = E[2]), (h = v), h.test(y) && (c = y + n[I]); - } - if (((h = N), (x = q), h.test(c))) { - var E = h.exec(c); - (y = E[1]), (h = f), h.test(y) && (c = y); - } else if (x.test(c)) { - var E = x.exec(c); - (y = E[1] + E[2]), (x = f), x.test(y) && (c = y); - } - if (((h = P), h.test(c))) { - var E = h.exec(c); - (y = E[1]), (h = f), (x = b), (O = W), (h.test(y) || (x.test(y) && !O.test(y))) && (c = y); - } - return ( - (h = z), - (x = f), - h.test(c) && x.test(c) && ((h = w), (c = c.replace(h, ''))), - T == 'y' && (c = T.toLowerCase() + c.substr(1)), - c - ); - }; - return function (R) { - return R.update(V); - }; - })()), - t.Pipeline.registerFunction(t.stemmer, 'stemmer'); - (t.generateStopWordFilter = function (e) { - var n = e.reduce(function (r, i) { - return (r[i] = i), r; - }, {}); - return function (r) { - if (r && n[r.toString()] !== r.toString()) return r; - }; - }), - (t.stopWordFilter = t.generateStopWordFilter([ - 'a', - 'able', - 'about', - 'across', - 'after', - 'all', - 'almost', - 'also', - 'am', - 'among', - 'an', - 'and', - 'any', - 'are', - 'as', - 'at', - 'be', - 'because', - 'been', - 'but', - 'by', - 'can', - 'cannot', - 'could', - 'dear', - 'did', - 'do', - 'does', - 'either', - 'else', - 'ever', - 'every', - 'for', - 'from', - 'get', - 'got', - 'had', - 'has', - 'have', - 'he', - 'her', - 'hers', - 'him', - 'his', - 'how', - 'however', - 'i', - 'if', - 'in', - 'into', - 'is', - 'it', - 'its', - 'just', - 'least', - 'let', - 'like', - 'likely', - 'may', - 'me', - 'might', - 'most', - 'must', - 'my', - 'neither', - 'no', - 'nor', - 'not', - 'of', - 'off', - 'often', - 'on', - 'only', - 'or', - 'other', - 'our', - 'own', - 'rather', - 'said', - 'say', - 'says', - 'she', - 'should', - 'since', - 'so', - 'some', - 'than', - 'that', - 'the', - 'their', - 'them', - 'then', - 'there', - 'these', - 'they', - 'this', - 'tis', - 'to', - 'too', - 'twas', - 'us', - 'wants', - 'was', - 'we', - 'were', - 'what', - 'when', - 'where', - 'which', - 'while', - 'who', - 'whom', - 'why', - 'will', - 'with', - 'would', - 'yet', - 'you', - 'your', - ])), - t.Pipeline.registerFunction(t.stopWordFilter, 'stopWordFilter'); - (t.trimmer = function (e) { - return e.update(function (n) { - return n.replace(/^\W+/, '').replace(/\W+$/, ''); - }); - }), - t.Pipeline.registerFunction(t.trimmer, 'trimmer'); - (t.TokenSet = function () { - (this.final = !1), (this.edges = {}), (this.id = t.TokenSet._nextId), (t.TokenSet._nextId += 1); - }), - (t.TokenSet._nextId = 1), - (t.TokenSet.fromArray = function (e) { - for (var n = new t.TokenSet.Builder(), r = 0, i = e.length; r < i; r++) n.insert(e[r]); - return n.finish(), n.root; - }), - (t.TokenSet.fromClause = function (e) { - return 'editDistance' in e - ? t.TokenSet.fromFuzzyString(e.term, e.editDistance) - : t.TokenSet.fromString(e.term); - }), - (t.TokenSet.fromFuzzyString = function (e, n) { - for (var r = new t.TokenSet(), i = [{ node: r, editsRemaining: n, str: e }]; i.length; ) { - var s = i.pop(); - if (s.str.length > 0) { - var o = s.str.charAt(0), - a; - o in s.node.edges ? (a = s.node.edges[o]) : ((a = new t.TokenSet()), (s.node.edges[o] = a)), - s.str.length == 1 && (a.final = !0), - i.push({ node: a, editsRemaining: s.editsRemaining, str: s.str.slice(1) }); - } - if (s.editsRemaining != 0) { - if ('*' in s.node.edges) var l = s.node.edges['*']; - else { - var l = new t.TokenSet(); - s.node.edges['*'] = l; - } - if ( - (s.str.length == 0 && (l.final = !0), - i.push({ node: l, editsRemaining: s.editsRemaining - 1, str: s.str }), - s.str.length > 1 && i.push({ node: s.node, editsRemaining: s.editsRemaining - 1, str: s.str.slice(1) }), - s.str.length == 1 && (s.node.final = !0), - s.str.length >= 1) - ) { - if ('*' in s.node.edges) var u = s.node.edges['*']; - else { - var u = new t.TokenSet(); - s.node.edges['*'] = u; - } - s.str.length == 1 && (u.final = !0), - i.push({ node: u, editsRemaining: s.editsRemaining - 1, str: s.str.slice(1) }); - } - if (s.str.length > 1) { - var d = s.str.charAt(0), - v = s.str.charAt(1), - f; - v in s.node.edges ? (f = s.node.edges[v]) : ((f = new t.TokenSet()), (s.node.edges[v] = f)), - s.str.length == 1 && (f.final = !0), - i.push({ node: f, editsRemaining: s.editsRemaining - 1, str: d + s.str.slice(2) }); - } - } - } - return r; - }), - (t.TokenSet.fromString = function (e) { - for (var n = new t.TokenSet(), r = n, i = 0, s = e.length; i < s; i++) { - var o = e[i], - a = i == s - 1; - if (o == '*') (n.edges[o] = n), (n.final = a); - else { - var l = new t.TokenSet(); - (l.final = a), (n.edges[o] = l), (n = l); - } - } - return r; - }), - (t.TokenSet.prototype.toArray = function () { - for (var e = [], n = [{ prefix: '', node: this }]; n.length; ) { - var r = n.pop(), - i = Object.keys(r.node.edges), - s = i.length; - r.node.final && (r.prefix.charAt(0), e.push(r.prefix)); - for (var o = 0; o < s; o++) { - var a = i[o]; - n.push({ prefix: r.prefix.concat(a), node: r.node.edges[a] }); - } - } - return e; - }), - (t.TokenSet.prototype.toString = function () { - if (this._str) return this._str; - for (var e = this.final ? '1' : '0', n = Object.keys(this.edges).sort(), r = n.length, i = 0; i < r; i++) { - var s = n[i], - o = this.edges[s]; - e = e + s + o.id; - } - return e; - }), - (t.TokenSet.prototype.intersect = function (e) { - for (var n = new t.TokenSet(), r = void 0, i = [{ qNode: e, output: n, node: this }]; i.length; ) { - r = i.pop(); - for ( - var s = Object.keys(r.qNode.edges), o = s.length, a = Object.keys(r.node.edges), l = a.length, u = 0; - u < o; - u++ - ) - for (var d = s[u], v = 0; v < l; v++) { - var f = a[v]; - if (f == d || d == '*') { - var b = r.node.edges[f], - g = r.qNode.edges[d], - L = b.final && g.final, - p = void 0; - f in r.output.edges - ? ((p = r.output.edges[f]), (p.final = p.final || L)) - : ((p = new t.TokenSet()), (p.final = L), (r.output.edges[f] = p)), - i.push({ qNode: g, output: p, node: b }); - } - } - } - return n; - }), - (t.TokenSet.Builder = function () { - (this.previousWord = ''), - (this.root = new t.TokenSet()), - (this.uncheckedNodes = []), - (this.minimizedNodes = {}); - }), - (t.TokenSet.Builder.prototype.insert = function (e) { - var n, - r = 0; - if (e < this.previousWord) throw new Error('Out of order word insertion'); - for (var i = 0; i < e.length && i < this.previousWord.length && e[i] == this.previousWord[i]; i++) r++; - this.minimize(r), - this.uncheckedNodes.length == 0 - ? (n = this.root) - : (n = this.uncheckedNodes[this.uncheckedNodes.length - 1].child); - for (var i = r; i < e.length; i++) { - var s = new t.TokenSet(), - o = e[i]; - (n.edges[o] = s), this.uncheckedNodes.push({ parent: n, char: o, child: s }), (n = s); - } - (n.final = !0), (this.previousWord = e); - }), - (t.TokenSet.Builder.prototype.finish = function () { - this.minimize(0); - }), - (t.TokenSet.Builder.prototype.minimize = function (e) { - for (var n = this.uncheckedNodes.length - 1; n >= e; n--) { - var r = this.uncheckedNodes[n], - i = r.child.toString(); - i in this.minimizedNodes - ? (r.parent.edges[r.char] = this.minimizedNodes[i]) - : ((r.child._str = i), (this.minimizedNodes[i] = r.child)), - this.uncheckedNodes.pop(); - } - }); - (t.Index = function (e) { - (this.invertedIndex = e.invertedIndex), - (this.fieldVectors = e.fieldVectors), - (this.tokenSet = e.tokenSet), - (this.fields = e.fields), - (this.pipeline = e.pipeline); - }), - (t.Index.prototype.search = function (e) { - return this.query(function (n) { - var r = new t.QueryParser(e, n); - r.parse(); - }); - }), - (t.Index.prototype.query = function (e) { - for ( - var n = new t.Query(this.fields), - r = Object.create(null), - i = Object.create(null), - s = Object.create(null), - o = Object.create(null), - a = Object.create(null), - l = 0; - l < this.fields.length; - l++ - ) - i[this.fields[l]] = new t.Vector(); - e.call(n, n); - for (var l = 0; l < n.clauses.length; l++) { - var u = n.clauses[l], - d = null, - v = t.Set.empty; - u.usePipeline ? (d = this.pipeline.runString(u.term, { fields: u.fields })) : (d = [u.term]); - for (var f = 0; f < d.length; f++) { - var b = d[f]; - u.term = b; - var g = t.TokenSet.fromClause(u), - L = this.tokenSet.intersect(g).toArray(); - if (L.length === 0 && u.presence === t.Query.presence.REQUIRED) { - for (var p = 0; p < u.fields.length; p++) { - var m = u.fields[p]; - o[m] = t.Set.empty; - } - break; - } - for (var S = 0; S < L.length; S++) - for (var w = L[S], k = this.invertedIndex[w], _ = k._index, p = 0; p < u.fields.length; p++) { - var m = u.fields[p], - H = k[m], - A = Object.keys(H), - j = w + '/' + m, - $ = new t.Set(A); - if ( - (u.presence == t.Query.presence.REQUIRED && - ((v = v.union($)), o[m] === void 0 && (o[m] = t.Set.complete)), - u.presence == t.Query.presence.PROHIBITED) - ) { - a[m] === void 0 && (a[m] = t.Set.empty), (a[m] = a[m].union($)); - continue; - } - if ( - (i[m].upsert(_, u.boost, function (Qe, Ce) { - return Qe + Ce; - }), - !s[j]) - ) { - for (var N = 0; N < A.length; N++) { - var q = A[N], - P = new t.FieldRef(q, m), - z = H[q], - W; - (W = r[P]) === void 0 ? (r[P] = new t.MatchData(w, m, z)) : W.add(w, m, z); - } - s[j] = !0; - } - } - } - if (u.presence === t.Query.presence.REQUIRED) - for (var p = 0; p < u.fields.length; p++) { - var m = u.fields[p]; - o[m] = o[m].intersect(v); - } - } - for (var V = t.Set.complete, R = t.Set.empty, l = 0; l < this.fields.length; l++) { - var m = this.fields[l]; - o[m] && (V = V.intersect(o[m])), a[m] && (R = R.union(a[m])); - } - var c = Object.keys(r), - y = [], - I = Object.create(null); - if (n.isNegated()) { - c = Object.keys(this.fieldVectors); - for (var l = 0; l < c.length; l++) { - var P = c[l], - T = t.FieldRef.fromString(P); - r[P] = new t.MatchData(); - } - } - for (var l = 0; l < c.length; l++) { - var T = t.FieldRef.fromString(c[l]), - h = T.docRef; - if (V.contains(h) && !R.contains(h)) { - var x = this.fieldVectors[T], - O = i[T.fieldName].similarity(x), - M; - if ((M = I[h]) !== void 0) (M.score += O), M.matchData.combine(r[T]); - else { - var E = { ref: h, score: O, matchData: r[T] }; - (I[h] = E), y.push(E); - } - } - } - return y.sort(function (Te, ke) { - return ke.score - Te.score; - }); - }), - (t.Index.prototype.toJSON = function () { - var e = Object.keys(this.invertedIndex) - .sort() - .map(function (r) { - return [r, this.invertedIndex[r]]; - }, this), - n = Object.keys(this.fieldVectors).map(function (r) { - return [r, this.fieldVectors[r].toJSON()]; - }, this); - return { - version: t.version, - fields: this.fields, - fieldVectors: n, - invertedIndex: e, - pipeline: this.pipeline.toJSON(), - }; - }), - (t.Index.load = function (e) { - var n = {}, - r = {}, - i = e.fieldVectors, - s = Object.create(null), - o = e.invertedIndex, - a = new t.TokenSet.Builder(), - l = t.Pipeline.load(e.pipeline); - e.version != t.version && - t.utils.warn( - "Version mismatch when loading serialised index. Current version of lunr '" + - t.version + - "' does not match serialized index '" + - e.version + - "'", - ); - for (var u = 0; u < i.length; u++) { - var d = i[u], - v = d[0], - f = d[1]; - r[v] = new t.Vector(f); - } - for (var u = 0; u < o.length; u++) { - var d = o[u], - b = d[0], - g = d[1]; - a.insert(b), (s[b] = g); - } - return ( - a.finish(), - (n.fields = e.fields), - (n.fieldVectors = r), - (n.invertedIndex = s), - (n.tokenSet = a.root), - (n.pipeline = l), - new t.Index(n) - ); - }); - (t.Builder = function () { - (this._ref = 'id'), - (this._fields = Object.create(null)), - (this._documents = Object.create(null)), - (this.invertedIndex = Object.create(null)), - (this.fieldTermFrequencies = {}), - (this.fieldLengths = {}), - (this.tokenizer = t.tokenizer), - (this.pipeline = new t.Pipeline()), - (this.searchPipeline = new t.Pipeline()), - (this.documentCount = 0), - (this._b = 0.75), - (this._k1 = 1.2), - (this.termIndex = 0), - (this.metadataWhitelist = []); - }), - (t.Builder.prototype.ref = function (e) { - this._ref = e; - }), - (t.Builder.prototype.field = function (e, n) { - if (/\//.test(e)) throw new RangeError("Field '" + e + "' contains illegal character '/'"); - this._fields[e] = n || {}; - }), - (t.Builder.prototype.b = function (e) { - e < 0 ? (this._b = 0) : e > 1 ? (this._b = 1) : (this._b = e); - }), - (t.Builder.prototype.k1 = function (e) { - this._k1 = e; - }), - (t.Builder.prototype.add = function (e, n) { - var r = e[this._ref], - i = Object.keys(this._fields); - (this._documents[r] = n || {}), (this.documentCount += 1); - for (var s = 0; s < i.length; s++) { - var o = i[s], - a = this._fields[o].extractor, - l = a ? a(e) : e[o], - u = this.tokenizer(l, { fields: [o] }), - d = this.pipeline.run(u), - v = new t.FieldRef(r, o), - f = Object.create(null); - (this.fieldTermFrequencies[v] = f), (this.fieldLengths[v] = 0), (this.fieldLengths[v] += d.length); - for (var b = 0; b < d.length; b++) { - var g = d[b]; - if ((f[g] == null && (f[g] = 0), (f[g] += 1), this.invertedIndex[g] == null)) { - var L = Object.create(null); - (L._index = this.termIndex), (this.termIndex += 1); - for (var p = 0; p < i.length; p++) L[i[p]] = Object.create(null); - this.invertedIndex[g] = L; - } - this.invertedIndex[g][o][r] == null && (this.invertedIndex[g][o][r] = Object.create(null)); - for (var m = 0; m < this.metadataWhitelist.length; m++) { - var S = this.metadataWhitelist[m], - w = g.metadata[S]; - this.invertedIndex[g][o][r][S] == null && (this.invertedIndex[g][o][r][S] = []), - this.invertedIndex[g][o][r][S].push(w); - } - } - } - }), - (t.Builder.prototype.calculateAverageFieldLengths = function () { - for (var e = Object.keys(this.fieldLengths), n = e.length, r = {}, i = {}, s = 0; s < n; s++) { - var o = t.FieldRef.fromString(e[s]), - a = o.fieldName; - i[a] || (i[a] = 0), (i[a] += 1), r[a] || (r[a] = 0), (r[a] += this.fieldLengths[o]); - } - for (var l = Object.keys(this._fields), s = 0; s < l.length; s++) { - var u = l[s]; - r[u] = r[u] / i[u]; - } - this.averageFieldLength = r; - }), - (t.Builder.prototype.createFieldVectors = function () { - for ( - var e = {}, n = Object.keys(this.fieldTermFrequencies), r = n.length, i = Object.create(null), s = 0; - s < r; - s++ - ) { - for ( - var o = t.FieldRef.fromString(n[s]), - a = o.fieldName, - l = this.fieldLengths[o], - u = new t.Vector(), - d = this.fieldTermFrequencies[o], - v = Object.keys(d), - f = v.length, - b = this._fields[a].boost || 1, - g = this._documents[o.docRef].boost || 1, - L = 0; - L < f; - L++ - ) { - var p = v[L], - m = d[p], - S = this.invertedIndex[p]._index, - w, - k, - _; - i[p] === void 0 ? ((w = t.idf(this.invertedIndex[p], this.documentCount)), (i[p] = w)) : (w = i[p]), - (k = - (w * ((this._k1 + 1) * m)) / - (this._k1 * (1 - this._b + this._b * (l / this.averageFieldLength[a])) + m)), - (k *= b), - (k *= g), - (_ = Math.round(k * 1e3) / 1e3), - u.insert(S, _); - } - e[o] = u; - } - this.fieldVectors = e; - }), - (t.Builder.prototype.createTokenSet = function () { - this.tokenSet = t.TokenSet.fromArray(Object.keys(this.invertedIndex).sort()); - }), - (t.Builder.prototype.build = function () { - return ( - this.calculateAverageFieldLengths(), - this.createFieldVectors(), - this.createTokenSet(), - new t.Index({ - invertedIndex: this.invertedIndex, - fieldVectors: this.fieldVectors, - tokenSet: this.tokenSet, - fields: Object.keys(this._fields), - pipeline: this.searchPipeline, - }) - ); - }), - (t.Builder.prototype.use = function (e) { - var n = Array.prototype.slice.call(arguments, 1); - n.unshift(this), e.apply(this, n); - }), - (t.MatchData = function (e, n, r) { - for (var i = Object.create(null), s = Object.keys(r || {}), o = 0; o < s.length; o++) { - var a = s[o]; - i[a] = r[a].slice(); - } - (this.metadata = Object.create(null)), - e !== void 0 && ((this.metadata[e] = Object.create(null)), (this.metadata[e][n] = i)); - }), - (t.MatchData.prototype.combine = function (e) { - for (var n = Object.keys(e.metadata), r = 0; r < n.length; r++) { - var i = n[r], - s = Object.keys(e.metadata[i]); - this.metadata[i] == null && (this.metadata[i] = Object.create(null)); - for (var o = 0; o < s.length; o++) { - var a = s[o], - l = Object.keys(e.metadata[i][a]); - this.metadata[i][a] == null && (this.metadata[i][a] = Object.create(null)); - for (var u = 0; u < l.length; u++) { - var d = l[u]; - this.metadata[i][a][d] == null - ? (this.metadata[i][a][d] = e.metadata[i][a][d]) - : (this.metadata[i][a][d] = this.metadata[i][a][d].concat(e.metadata[i][a][d])); - } - } - } - }), - (t.MatchData.prototype.add = function (e, n, r) { - if (!(e in this.metadata)) { - (this.metadata[e] = Object.create(null)), (this.metadata[e][n] = r); - return; - } - if (!(n in this.metadata[e])) { - this.metadata[e][n] = r; - return; - } - for (var i = Object.keys(r), s = 0; s < i.length; s++) { - var o = i[s]; - o in this.metadata[e][n] - ? (this.metadata[e][n][o] = this.metadata[e][n][o].concat(r[o])) - : (this.metadata[e][n][o] = r[o]); - } - }), - (t.Query = function (e) { - (this.clauses = []), (this.allFields = e); - }), - (t.Query.wildcard = new String('*')), - (t.Query.wildcard.NONE = 0), - (t.Query.wildcard.LEADING = 1), - (t.Query.wildcard.TRAILING = 2), - (t.Query.presence = { OPTIONAL: 1, REQUIRED: 2, PROHIBITED: 3 }), - (t.Query.prototype.clause = function (e) { - return ( - 'fields' in e || (e.fields = this.allFields), - 'boost' in e || (e.boost = 1), - 'usePipeline' in e || (e.usePipeline = !0), - 'wildcard' in e || (e.wildcard = t.Query.wildcard.NONE), - e.wildcard & t.Query.wildcard.LEADING && e.term.charAt(0) != t.Query.wildcard && (e.term = '*' + e.term), - e.wildcard & t.Query.wildcard.TRAILING && - e.term.slice(-1) != t.Query.wildcard && - (e.term = '' + e.term + '*'), - 'presence' in e || (e.presence = t.Query.presence.OPTIONAL), - this.clauses.push(e), - this - ); - }), - (t.Query.prototype.isNegated = function () { - for (var e = 0; e < this.clauses.length; e++) - if (this.clauses[e].presence != t.Query.presence.PROHIBITED) return !1; - return !0; - }), - (t.Query.prototype.term = function (e, n) { - if (Array.isArray(e)) - return ( - e.forEach(function (i) { - this.term(i, t.utils.clone(n)); - }, this), - this - ); - var r = n || {}; - return (r.term = e.toString()), this.clause(r), this; - }), - (t.QueryParseError = function (e, n, r) { - (this.name = 'QueryParseError'), (this.message = e), (this.start = n), (this.end = r); - }), - (t.QueryParseError.prototype = new Error()), - (t.QueryLexer = function (e) { - (this.lexemes = []), - (this.str = e), - (this.length = e.length), - (this.pos = 0), - (this.start = 0), - (this.escapeCharPositions = []); - }), - (t.QueryLexer.prototype.run = function () { - for (var e = t.QueryLexer.lexText; e; ) e = e(this); - }), - (t.QueryLexer.prototype.sliceString = function () { - for (var e = [], n = this.start, r = this.pos, i = 0; i < this.escapeCharPositions.length; i++) - (r = this.escapeCharPositions[i]), e.push(this.str.slice(n, r)), (n = r + 1); - return e.push(this.str.slice(n, this.pos)), (this.escapeCharPositions.length = 0), e.join(''); - }), - (t.QueryLexer.prototype.emit = function (e) { - this.lexemes.push({ type: e, str: this.sliceString(), start: this.start, end: this.pos }), - (this.start = this.pos); - }), - (t.QueryLexer.prototype.escapeCharacter = function () { - this.escapeCharPositions.push(this.pos - 1), (this.pos += 1); - }), - (t.QueryLexer.prototype.next = function () { - if (this.pos >= this.length) return t.QueryLexer.EOS; - var e = this.str.charAt(this.pos); - return (this.pos += 1), e; - }), - (t.QueryLexer.prototype.width = function () { - return this.pos - this.start; - }), - (t.QueryLexer.prototype.ignore = function () { - this.start == this.pos && (this.pos += 1), (this.start = this.pos); - }), - (t.QueryLexer.prototype.backup = function () { - this.pos -= 1; - }), - (t.QueryLexer.prototype.acceptDigitRun = function () { - var e, n; - do (e = this.next()), (n = e.charCodeAt(0)); - while (n > 47 && n < 58); - e != t.QueryLexer.EOS && this.backup(); - }), - (t.QueryLexer.prototype.more = function () { - return this.pos < this.length; - }), - (t.QueryLexer.EOS = 'EOS'), - (t.QueryLexer.FIELD = 'FIELD'), - (t.QueryLexer.TERM = 'TERM'), - (t.QueryLexer.EDIT_DISTANCE = 'EDIT_DISTANCE'), - (t.QueryLexer.BOOST = 'BOOST'), - (t.QueryLexer.PRESENCE = 'PRESENCE'), - (t.QueryLexer.lexField = function (e) { - return e.backup(), e.emit(t.QueryLexer.FIELD), e.ignore(), t.QueryLexer.lexText; - }), - (t.QueryLexer.lexTerm = function (e) { - if ((e.width() > 1 && (e.backup(), e.emit(t.QueryLexer.TERM)), e.ignore(), e.more())) - return t.QueryLexer.lexText; - }), - (t.QueryLexer.lexEditDistance = function (e) { - return e.ignore(), e.acceptDigitRun(), e.emit(t.QueryLexer.EDIT_DISTANCE), t.QueryLexer.lexText; - }), - (t.QueryLexer.lexBoost = function (e) { - return e.ignore(), e.acceptDigitRun(), e.emit(t.QueryLexer.BOOST), t.QueryLexer.lexText; - }), - (t.QueryLexer.lexEOS = function (e) { - e.width() > 0 && e.emit(t.QueryLexer.TERM); - }), - (t.QueryLexer.termSeparator = t.tokenizer.separator), - (t.QueryLexer.lexText = function (e) { - for (;;) { - var n = e.next(); - if (n == t.QueryLexer.EOS) return t.QueryLexer.lexEOS; - if (n.charCodeAt(0) == 92) { - e.escapeCharacter(); - continue; - } - if (n == ':') return t.QueryLexer.lexField; - if (n == '~') return e.backup(), e.width() > 0 && e.emit(t.QueryLexer.TERM), t.QueryLexer.lexEditDistance; - if (n == '^') return e.backup(), e.width() > 0 && e.emit(t.QueryLexer.TERM), t.QueryLexer.lexBoost; - if ((n == '+' && e.width() === 1) || (n == '-' && e.width() === 1)) - return e.emit(t.QueryLexer.PRESENCE), t.QueryLexer.lexText; - if (n.match(t.QueryLexer.termSeparator)) return t.QueryLexer.lexTerm; - } - }), - (t.QueryParser = function (e, n) { - (this.lexer = new t.QueryLexer(e)), (this.query = n), (this.currentClause = {}), (this.lexemeIdx = 0); - }), - (t.QueryParser.prototype.parse = function () { - this.lexer.run(), (this.lexemes = this.lexer.lexemes); - for (var e = t.QueryParser.parseClause; e; ) e = e(this); - return this.query; - }), - (t.QueryParser.prototype.peekLexeme = function () { - return this.lexemes[this.lexemeIdx]; - }), - (t.QueryParser.prototype.consumeLexeme = function () { - var e = this.peekLexeme(); - return (this.lexemeIdx += 1), e; - }), - (t.QueryParser.prototype.nextClause = function () { - var e = this.currentClause; - this.query.clause(e), (this.currentClause = {}); - }), - (t.QueryParser.parseClause = function (e) { - var n = e.peekLexeme(); - if (n != null) - switch (n.type) { - case t.QueryLexer.PRESENCE: - return t.QueryParser.parsePresence; - case t.QueryLexer.FIELD: - return t.QueryParser.parseField; - case t.QueryLexer.TERM: - return t.QueryParser.parseTerm; - default: - var r = 'expected either a field or a term, found ' + n.type; - throw ( - (n.str.length >= 1 && (r += " with value '" + n.str + "'"), new t.QueryParseError(r, n.start, n.end)) - ); - } - }), - (t.QueryParser.parsePresence = function (e) { - var n = e.consumeLexeme(); - if (n != null) { - switch (n.str) { - case '-': - e.currentClause.presence = t.Query.presence.PROHIBITED; - break; - case '+': - e.currentClause.presence = t.Query.presence.REQUIRED; - break; - default: - var r = "unrecognised presence operator'" + n.str + "'"; - throw new t.QueryParseError(r, n.start, n.end); - } - var i = e.peekLexeme(); - if (i == null) { - var r = 'expecting term or field, found nothing'; - throw new t.QueryParseError(r, n.start, n.end); - } - switch (i.type) { - case t.QueryLexer.FIELD: - return t.QueryParser.parseField; - case t.QueryLexer.TERM: - return t.QueryParser.parseTerm; - default: - var r = "expecting term or field, found '" + i.type + "'"; - throw new t.QueryParseError(r, i.start, i.end); - } - } - }), - (t.QueryParser.parseField = function (e) { - var n = e.consumeLexeme(); - if (n != null) { - if (e.query.allFields.indexOf(n.str) == -1) { - var r = e.query.allFields - .map(function (o) { - return "'" + o + "'"; - }) - .join(', '), - i = "unrecognised field '" + n.str + "', possible fields: " + r; - throw new t.QueryParseError(i, n.start, n.end); - } - e.currentClause.fields = [n.str]; - var s = e.peekLexeme(); - if (s == null) { - var i = 'expecting term, found nothing'; - throw new t.QueryParseError(i, n.start, n.end); - } - switch (s.type) { - case t.QueryLexer.TERM: - return t.QueryParser.parseTerm; - default: - var i = "expecting term, found '" + s.type + "'"; - throw new t.QueryParseError(i, s.start, s.end); - } - } - }), - (t.QueryParser.parseTerm = function (e) { - var n = e.consumeLexeme(); - if (n != null) { - (e.currentClause.term = n.str.toLowerCase()), - n.str.indexOf('*') != -1 && (e.currentClause.usePipeline = !1); - var r = e.peekLexeme(); - if (r == null) { - e.nextClause(); - return; - } - switch (r.type) { - case t.QueryLexer.TERM: - return e.nextClause(), t.QueryParser.parseTerm; - case t.QueryLexer.FIELD: - return e.nextClause(), t.QueryParser.parseField; - case t.QueryLexer.EDIT_DISTANCE: - return t.QueryParser.parseEditDistance; - case t.QueryLexer.BOOST: - return t.QueryParser.parseBoost; - case t.QueryLexer.PRESENCE: - return e.nextClause(), t.QueryParser.parsePresence; - default: - var i = "Unexpected lexeme type '" + r.type + "'"; - throw new t.QueryParseError(i, r.start, r.end); - } - } - }), - (t.QueryParser.parseEditDistance = function (e) { - var n = e.consumeLexeme(); - if (n != null) { - var r = parseInt(n.str, 10); - if (isNaN(r)) { - var i = 'edit distance must be numeric'; - throw new t.QueryParseError(i, n.start, n.end); - } - e.currentClause.editDistance = r; - var s = e.peekLexeme(); - if (s == null) { - e.nextClause(); - return; - } - switch (s.type) { - case t.QueryLexer.TERM: - return e.nextClause(), t.QueryParser.parseTerm; - case t.QueryLexer.FIELD: - return e.nextClause(), t.QueryParser.parseField; - case t.QueryLexer.EDIT_DISTANCE: - return t.QueryParser.parseEditDistance; - case t.QueryLexer.BOOST: - return t.QueryParser.parseBoost; - case t.QueryLexer.PRESENCE: - return e.nextClause(), t.QueryParser.parsePresence; - default: - var i = "Unexpected lexeme type '" + s.type + "'"; - throw new t.QueryParseError(i, s.start, s.end); - } - } - }), - (t.QueryParser.parseBoost = function (e) { - var n = e.consumeLexeme(); - if (n != null) { - var r = parseInt(n.str, 10); - if (isNaN(r)) { - var i = 'boost must be numeric'; - throw new t.QueryParseError(i, n.start, n.end); - } - e.currentClause.boost = r; - var s = e.peekLexeme(); - if (s == null) { - e.nextClause(); - return; - } - switch (s.type) { - case t.QueryLexer.TERM: - return e.nextClause(), t.QueryParser.parseTerm; - case t.QueryLexer.FIELD: - return e.nextClause(), t.QueryParser.parseField; - case t.QueryLexer.EDIT_DISTANCE: - return t.QueryParser.parseEditDistance; - case t.QueryLexer.BOOST: - return t.QueryParser.parseBoost; - case t.QueryLexer.PRESENCE: - return e.nextClause(), t.QueryParser.parsePresence; - default: - var i = "Unexpected lexeme type '" + s.type + "'"; - throw new t.QueryParseError(i, s.start, s.end); - } - } - }), - (function (e, n) { - typeof define == 'function' && define.amd - ? define(n) - : typeof se == 'object' - ? (oe.exports = n()) - : (e.lunr = n()); - })(this, function () { - return t; - }); - })(); - }); - var re = []; - function G(t, e) { - re.push({ selector: e, constructor: t }); - } - var U = class { - constructor() { - this.alwaysVisibleMember = null; - this.createComponents(document.body), - this.ensureActivePageVisible(), - this.ensureFocusedElementVisible(), - this.listenForCodeCopies(), - window.addEventListener('hashchange', () => this.ensureFocusedElementVisible()); - } - createComponents(e) { - re.forEach((n) => { - e.querySelectorAll(n.selector).forEach((r) => { - r.dataset.hasInstance || (new n.constructor({ el: r, app: this }), (r.dataset.hasInstance = String(!0))); - }); - }); - } - filterChanged() { - this.ensureFocusedElementVisible(); - } - ensureActivePageVisible() { - let e = document.querySelector('.tsd-navigation .current'), - n = e?.parentElement; - for (; n && !n.classList.contains('.tsd-navigation'); ) - n instanceof HTMLDetailsElement && (n.open = !0), (n = n.parentElement); - if (e) { - let r = e.getBoundingClientRect().top - document.documentElement.clientHeight / 4; - document.querySelector('.site-menu').scrollTop = r; - } - } - ensureFocusedElementVisible() { - if ( - (this.alwaysVisibleMember && - (this.alwaysVisibleMember.classList.remove('always-visible'), - this.alwaysVisibleMember.firstElementChild.remove(), - (this.alwaysVisibleMember = null)), - !location.hash) - ) - return; - let e = document.getElementById(location.hash.substring(1)); - if (!e) return; - let n = e.parentElement; - for (; n && n.tagName !== 'SECTION'; ) n = n.parentElement; - if (n && n.offsetParent == null) { - (this.alwaysVisibleMember = n), n.classList.add('always-visible'); - let r = document.createElement('p'); - r.classList.add('warning'), - (r.textContent = 'This member is normally hidden due to your filter settings.'), - n.prepend(r); - } - } - listenForCodeCopies() { - document.querySelectorAll('pre > button').forEach((e) => { - let n; - e.addEventListener('click', () => { - e.previousElementSibling instanceof HTMLElement && - navigator.clipboard.writeText(e.previousElementSibling.innerText.trim()), - (e.textContent = 'Copied!'), - e.classList.add('visible'), - clearTimeout(n), - (n = setTimeout(() => { - e.classList.remove('visible'), - (n = setTimeout(() => { - e.textContent = 'Copy'; - }, 100)); - }, 1e3)); - }); - }); - } - }; - var ie = (t, e = 100) => { - let n; - return () => { - clearTimeout(n), (n = setTimeout(() => t(), e)); - }; - }; - var de = De(ae()); - async function le(t, e) { - if (!window.searchData) return; - let n = await fetch(window.searchData), - r = new Blob([await n.arrayBuffer()]).stream().pipeThrough(new DecompressionStream('gzip')), - i = await new Response(r).json(); - (t.data = i), (t.index = de.Index.load(i.index)), e.classList.remove('loading'), e.classList.add('ready'); - } - function he() { - let t = document.getElementById('tsd-search'); - if (!t) return; - let e = { base: t.dataset.base + '/' }, - n = document.getElementById('tsd-search-script'); - t.classList.add('loading'), - n && - (n.addEventListener('error', () => { - t.classList.remove('loading'), t.classList.add('failure'); - }), - n.addEventListener('load', () => { - le(e, t); - }), - le(e, t)); - let r = document.querySelector('#tsd-search input'), - i = document.querySelector('#tsd-search .results'); - if (!r || !i) throw new Error('The input field or the result list wrapper was not found'); - let s = !1; - i.addEventListener('mousedown', () => (s = !0)), - i.addEventListener('mouseup', () => { - (s = !1), t.classList.remove('has-focus'); - }), - r.addEventListener('focus', () => t.classList.add('has-focus')), - r.addEventListener('blur', () => { - s || ((s = !1), t.classList.remove('has-focus')); - }), - Ae(t, i, r, e); - } - function Ae(t, e, n, r) { - n.addEventListener( - 'input', - ie(() => { - Ne(t, e, n, r); - }, 200), - ); - let i = !1; - n.addEventListener('keydown', (s) => { - (i = !0), - s.key == 'Enter' - ? Ve(e, n) - : s.key == 'Escape' - ? n.blur() - : s.key == 'ArrowUp' - ? ue(e, -1) - : s.key === 'ArrowDown' - ? ue(e, 1) - : (i = !1); - }), - n.addEventListener('keypress', (s) => { - i && s.preventDefault(); - }), - document.body.addEventListener('keydown', (s) => { - s.altKey || - s.ctrlKey || - s.metaKey || - (!n.matches(':focus') && s.key === '/' && (n.focus(), s.preventDefault())); - }); - } - function Ne(t, e, n, r) { - if (!r.index || !r.data) return; - e.textContent = ''; - let i = n.value.trim(), - s; - if (i) { - let o = i - .split(' ') - .map((a) => (a.length ? `*${a}*` : '')) - .join(' '); - s = r.index.search(o); - } else s = []; - for (let o = 0; o < s.length; o++) { - let a = s[o], - l = r.data.rows[Number(a.ref)], - u = 1; - l.name.toLowerCase().startsWith(i.toLowerCase()) && (u *= 1 + 1 / (1 + Math.abs(l.name.length - i.length))), - (a.score *= u); - } - if (s.length === 0) { - let o = document.createElement('li'); - o.classList.add('no-results'); - let a = document.createElement('span'); - (a.textContent = 'No results found'), o.appendChild(a), e.appendChild(o); - } - s.sort((o, a) => a.score - o.score); - for (let o = 0, a = Math.min(10, s.length); o < a; o++) { - let l = r.data.rows[Number(s[o].ref)], - u = ``, - d = ce(l.name, i); - globalThis.DEBUG_SEARCH_WEIGHTS && (d += ` (score: ${s[o].score.toFixed(2)})`), - l.parent && - (d = ` - ${ce(l.parent, i)}.${d}`); - let v = document.createElement('li'); - v.classList.value = l.classes ?? ''; - let f = document.createElement('a'); - (f.href = r.base + l.url), (f.innerHTML = u + d), v.append(f), e.appendChild(v); - } - } - function ue(t, e) { - let n = t.querySelector('.current'); - if (!n) (n = t.querySelector(e == 1 ? 'li:first-child' : 'li:last-child')), n && n.classList.add('current'); - else { - let r = n; - if (e === 1) - do r = r.nextElementSibling ?? void 0; - while (r instanceof HTMLElement && r.offsetParent == null); - else - do r = r.previousElementSibling ?? void 0; - while (r instanceof HTMLElement && r.offsetParent == null); - r && (n.classList.remove('current'), r.classList.add('current')); - } - } - function Ve(t, e) { - let n = t.querySelector('.current'); - if ((n || (n = t.querySelector('li:first-child')), n)) { - let r = n.querySelector('a'); - r && (window.location.href = r.href), e.blur(); - } - } - function ce(t, e) { - if (e === '') return t; - let n = t.toLocaleLowerCase(), - r = e.toLocaleLowerCase(), - i = [], - s = 0, - o = n.indexOf(r); - for (; o != -1; ) - i.push(K(t.substring(s, o)), `${K(t.substring(o, o + r.length))}`), - (s = o + r.length), - (o = n.indexOf(r, s)); - return i.push(K(t.substring(s))), i.join(''); - } - var Be = { '&': '&', '<': '<', '>': '>', "'": ''', '"': '"' }; - function K(t) { - return t.replace(/[&<>"'"]/g, (e) => Be[e]); - } - var C = class { - constructor(e) { - (this.el = e.el), (this.app = e.app); - } - }; - var F = 'mousedown', - pe = 'mousemove', - B = 'mouseup', - J = { x: 0, y: 0 }, - fe = !1, - ee = !1, - He = !1, - D = !1, - me = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent); - document.documentElement.classList.add(me ? 'is-mobile' : 'not-mobile'); - me && - 'ontouchstart' in document.documentElement && - ((He = !0), (F = 'touchstart'), (pe = 'touchmove'), (B = 'touchend')); - document.addEventListener(F, (t) => { - (ee = !0), (D = !1); - let e = F == 'touchstart' ? t.targetTouches[0] : t; - (J.y = e.pageY || 0), (J.x = e.pageX || 0); - }); - document.addEventListener(pe, (t) => { - if (ee && !D) { - let e = F == 'touchstart' ? t.targetTouches[0] : t, - n = J.x - (e.pageX || 0), - r = J.y - (e.pageY || 0); - D = Math.sqrt(n * n + r * r) > 10; - } - }); - document.addEventListener(B, () => { - ee = !1; - }); - document.addEventListener('click', (t) => { - fe && (t.preventDefault(), t.stopImmediatePropagation(), (fe = !1)); - }); - var X = class extends C { - constructor(n) { - super(n); - (this.className = this.el.dataset.toggle || ''), - this.el.addEventListener(B, (r) => this.onPointerUp(r)), - this.el.addEventListener('click', (r) => r.preventDefault()), - document.addEventListener(F, (r) => this.onDocumentPointerDown(r)), - document.addEventListener(B, (r) => this.onDocumentPointerUp(r)); - } - setActive(n) { - if (this.active == n) return; - (this.active = n), - document.documentElement.classList.toggle('has-' + this.className, n), - this.el.classList.toggle('active', n); - let r = (this.active ? 'to-has-' : 'from-has-') + this.className; - document.documentElement.classList.add(r), setTimeout(() => document.documentElement.classList.remove(r), 500); - } - onPointerUp(n) { - D || (this.setActive(!0), n.preventDefault()); - } - onDocumentPointerDown(n) { - if (this.active) { - if (n.target.closest('.col-sidebar, .tsd-filter-group')) return; - this.setActive(!1); - } - } - onDocumentPointerUp(n) { - if (!D && this.active && n.target.closest('.col-sidebar')) { - let r = n.target.closest('a'); - if (r) { - let i = window.location.href; - i.indexOf('#') != -1 && (i = i.substring(0, i.indexOf('#'))), - r.href.substring(0, i.length) == i && setTimeout(() => this.setActive(!1), 250); - } - } - } - }; - var te; - try { - te = localStorage; - } catch { - te = { - getItem() { - return null; - }, - setItem() {}, - }; - } - var Q = te; - var ve = document.head.appendChild(document.createElement('style')); - ve.dataset.for = 'filters'; - var Y = class extends C { - constructor(n) { - super(n); - (this.key = `filter-${this.el.name}`), - (this.value = this.el.checked), - this.el.addEventListener('change', () => { - this.setLocalStorage(this.el.checked); - }), - this.setLocalStorage(this.fromLocalStorage()), - (ve.innerHTML += `html:not(.${this.key}) .tsd-is-${this.el.name} { display: none; } -`); - } - fromLocalStorage() { - let n = Q.getItem(this.key); - return n ? n === 'true' : this.el.checked; - } - setLocalStorage(n) { - Q.setItem(this.key, n.toString()), (this.value = n), this.handleValueChange(); - } - handleValueChange() { - (this.el.checked = this.value), - document.documentElement.classList.toggle(this.key, this.value), - this.app.filterChanged(), - document.querySelectorAll('.tsd-index-section').forEach((n) => { - n.style.display = 'block'; - let r = Array.from(n.querySelectorAll('.tsd-index-link')).every((i) => i.offsetParent == null); - n.style.display = r ? 'none' : 'block'; - }); - } - }; - var Z = class extends C { - constructor(n) { - super(n); - (this.summary = this.el.querySelector('.tsd-accordion-summary')), - (this.icon = this.summary.querySelector('svg')), - (this.key = `tsd-accordion-${ - this.summary.dataset.key ?? this.summary.textContent.trim().replace(/\s+/g, '-').toLowerCase() - }`); - let r = Q.getItem(this.key); - (this.el.open = r ? r === 'true' : this.el.open), this.el.addEventListener('toggle', () => this.update()); - let i = this.summary.querySelector('a'); - i && - i.addEventListener('click', () => { - location.assign(i.href); - }), - this.update(); - } - update() { - (this.icon.style.transform = `rotate(${this.el.open ? 0 : -90}deg)`), - Q.setItem(this.key, this.el.open.toString()); - } - }; - function ge(t) { - let e = Q.getItem('tsd-theme') || 'os'; - (t.value = e), - ye(e), - t.addEventListener('change', () => { - Q.setItem('tsd-theme', t.value), ye(t.value); - }); - } - function ye(t) { - document.documentElement.dataset.theme = t; - } - var Le; - function be() { - let t = document.getElementById('tsd-nav-script'); - t && (t.addEventListener('load', xe), xe()); - } - async function xe() { - let t = document.getElementById('tsd-nav-container'); - if (!t || !window.navigationData) return; - let n = await (await fetch(window.navigationData)).arrayBuffer(), - r = new Blob([n]).stream().pipeThrough(new DecompressionStream('gzip')), - i = await new Response(r).json(); - (Le = t.dataset.base + '/'), (t.innerHTML = ''); - for (let s of i) we(s, t, []); - window.app.createComponents(t), window.app.ensureActivePageVisible(); - } - function we(t, e, n) { - let r = e.appendChild(document.createElement('li')); - if (t.children) { - let i = [...n, t.text], - s = r.appendChild(document.createElement('details')); - (s.className = t.class ? `${t.class} tsd-index-accordion` : 'tsd-index-accordion'), (s.dataset.key = i.join('$')); - let o = s.appendChild(document.createElement('summary')); - (o.className = 'tsd-accordion-summary'), - (o.innerHTML = - ''), - Ee(t, o); - let a = s.appendChild(document.createElement('div')); - a.className = 'tsd-accordion-details'; - let l = a.appendChild(document.createElement('ul')); - l.className = 'tsd-nested-navigation'; - for (let u of t.children) we(u, l, i); - } else Ee(t, r, t.class); - } - function Ee(t, e, n) { - if (t.path) { - let r = e.appendChild(document.createElement('a')); - (r.href = Le + t.path), - n && (r.className = n), - location.href === r.href && r.classList.add('current'), - t.kind && - (r.innerHTML = ``), - (r.appendChild(document.createElement('span')).textContent = t.text); - } else e.appendChild(document.createElement('span')).textContent = t.text; - } - G(X, 'a[data-toggle]'); - G(Z, '.tsd-index-accordion'); - G(Y, '.tsd-filter-item input[type=checkbox]'); - var Se = document.getElementById('tsd-theme'); - Se && ge(Se); - var je = new U(); - Object.defineProperty(window, 'app', { value: je }); - he(); - be(); -})(); +"use strict"; +window.translations={"copy":"Copy","copied":"Copied!","normally_hidden":"This member is normally hidden due to your filter settings."}; +"use strict";(()=>{var Pe=Object.create;var ie=Object.defineProperty;var Oe=Object.getOwnPropertyDescriptor;var _e=Object.getOwnPropertyNames;var Re=Object.getPrototypeOf,Me=Object.prototype.hasOwnProperty;var Fe=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var De=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of _e(e))!Me.call(t,i)&&i!==n&&ie(t,i,{get:()=>e[i],enumerable:!(r=Oe(e,i))||r.enumerable});return t};var Ae=(t,e,n)=>(n=t!=null?Pe(Re(t)):{},De(e||!t||!t.__esModule?ie(n,"default",{value:t,enumerable:!0}):n,t));var ue=Fe((ae,le)=>{(function(){var t=function(e){var n=new t.Builder;return n.pipeline.add(t.trimmer,t.stopWordFilter,t.stemmer),n.searchPipeline.add(t.stemmer),e.call(n,n),n.build()};t.version="2.3.9";t.utils={},t.utils.warn=function(e){return function(n){e.console&&console.warn&&console.warn(n)}}(this),t.utils.asString=function(e){return e==null?"":e.toString()},t.utils.clone=function(e){if(e==null)return e;for(var n=Object.create(null),r=Object.keys(e),i=0;i0){var d=t.utils.clone(n)||{};d.position=[a,u],d.index=s.length,s.push(new t.Token(r.slice(a,o),d))}a=o+1}}return s},t.tokenizer.separator=/[\s\-]+/;t.Pipeline=function(){this._stack=[]},t.Pipeline.registeredFunctions=Object.create(null),t.Pipeline.registerFunction=function(e,n){n in this.registeredFunctions&&t.utils.warn("Overwriting existing registered function: "+n),e.label=n,t.Pipeline.registeredFunctions[e.label]=e},t.Pipeline.warnIfFunctionNotRegistered=function(e){var n=e.label&&e.label in this.registeredFunctions;n||t.utils.warn(`Function is not registered with pipeline. This may cause problems when serialising the index. +`,e)},t.Pipeline.load=function(e){var n=new t.Pipeline;return e.forEach(function(r){var i=t.Pipeline.registeredFunctions[r];if(i)n.add(i);else throw new Error("Cannot load unregistered function: "+r)}),n},t.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach(function(n){t.Pipeline.warnIfFunctionNotRegistered(n),this._stack.push(n)},this)},t.Pipeline.prototype.after=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var r=this._stack.indexOf(e);if(r==-1)throw new Error("Cannot find existingFn");r=r+1,this._stack.splice(r,0,n)},t.Pipeline.prototype.before=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var r=this._stack.indexOf(e);if(r==-1)throw new Error("Cannot find existingFn");this._stack.splice(r,0,n)},t.Pipeline.prototype.remove=function(e){var n=this._stack.indexOf(e);n!=-1&&this._stack.splice(n,1)},t.Pipeline.prototype.run=function(e){for(var n=this._stack.length,r=0;r1&&(oe&&(r=s),o!=e);)i=r-n,s=n+Math.floor(i/2),o=this.elements[s*2];if(o==e||o>e)return s*2;if(ol?d+=2:a==l&&(n+=r[u+1]*i[d+1],u+=2,d+=2);return n},t.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},t.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),n=1,r=0;n0){var o=s.str.charAt(0),a;o in s.node.edges?a=s.node.edges[o]:(a=new t.TokenSet,s.node.edges[o]=a),s.str.length==1&&(a.final=!0),i.push({node:a,editsRemaining:s.editsRemaining,str:s.str.slice(1)})}if(s.editsRemaining!=0){if("*"in s.node.edges)var l=s.node.edges["*"];else{var l=new t.TokenSet;s.node.edges["*"]=l}if(s.str.length==0&&(l.final=!0),i.push({node:l,editsRemaining:s.editsRemaining-1,str:s.str}),s.str.length>1&&i.push({node:s.node,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)}),s.str.length==1&&(s.node.final=!0),s.str.length>=1){if("*"in s.node.edges)var u=s.node.edges["*"];else{var u=new t.TokenSet;s.node.edges["*"]=u}s.str.length==1&&(u.final=!0),i.push({node:u,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)})}if(s.str.length>1){var d=s.str.charAt(0),m=s.str.charAt(1),p;m in s.node.edges?p=s.node.edges[m]:(p=new t.TokenSet,s.node.edges[m]=p),s.str.length==1&&(p.final=!0),i.push({node:p,editsRemaining:s.editsRemaining-1,str:d+s.str.slice(2)})}}}return r},t.TokenSet.fromString=function(e){for(var n=new t.TokenSet,r=n,i=0,s=e.length;i=e;n--){var r=this.uncheckedNodes[n],i=r.child.toString();i in this.minimizedNodes?r.parent.edges[r.char]=this.minimizedNodes[i]:(r.child._str=i,this.minimizedNodes[i]=r.child),this.uncheckedNodes.pop()}};t.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},t.Index.prototype.search=function(e){return this.query(function(n){var r=new t.QueryParser(e,n);r.parse()})},t.Index.prototype.query=function(e){for(var n=new t.Query(this.fields),r=Object.create(null),i=Object.create(null),s=Object.create(null),o=Object.create(null),a=Object.create(null),l=0;l1?this._b=1:this._b=e},t.Builder.prototype.k1=function(e){this._k1=e},t.Builder.prototype.add=function(e,n){var r=e[this._ref],i=Object.keys(this._fields);this._documents[r]=n||{},this.documentCount+=1;for(var s=0;s=this.length)return t.QueryLexer.EOS;var e=this.str.charAt(this.pos);return this.pos+=1,e},t.QueryLexer.prototype.width=function(){return this.pos-this.start},t.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},t.QueryLexer.prototype.backup=function(){this.pos-=1},t.QueryLexer.prototype.acceptDigitRun=function(){var e,n;do e=this.next(),n=e.charCodeAt(0);while(n>47&&n<58);e!=t.QueryLexer.EOS&&this.backup()},t.QueryLexer.prototype.more=function(){return this.pos1&&(e.backup(),e.emit(t.QueryLexer.TERM)),e.ignore(),e.more())return t.QueryLexer.lexText},t.QueryLexer.lexEditDistance=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.EDIT_DISTANCE),t.QueryLexer.lexText},t.QueryLexer.lexBoost=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.BOOST),t.QueryLexer.lexText},t.QueryLexer.lexEOS=function(e){e.width()>0&&e.emit(t.QueryLexer.TERM)},t.QueryLexer.termSeparator=t.tokenizer.separator,t.QueryLexer.lexText=function(e){for(;;){var n=e.next();if(n==t.QueryLexer.EOS)return t.QueryLexer.lexEOS;if(n.charCodeAt(0)==92){e.escapeCharacter();continue}if(n==":")return t.QueryLexer.lexField;if(n=="~")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexEditDistance;if(n=="^")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexBoost;if(n=="+"&&e.width()===1||n=="-"&&e.width()===1)return e.emit(t.QueryLexer.PRESENCE),t.QueryLexer.lexText;if(n.match(t.QueryLexer.termSeparator))return t.QueryLexer.lexTerm}},t.QueryParser=function(e,n){this.lexer=new t.QueryLexer(e),this.query=n,this.currentClause={},this.lexemeIdx=0},t.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var e=t.QueryParser.parseClause;e;)e=e(this);return this.query},t.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},t.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},t.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},t.QueryParser.parseClause=function(e){var n=e.peekLexeme();if(n!=null)switch(n.type){case t.QueryLexer.PRESENCE:return t.QueryParser.parsePresence;case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var r="expected either a field or a term, found "+n.type;throw n.str.length>=1&&(r+=" with value '"+n.str+"'"),new t.QueryParseError(r,n.start,n.end)}},t.QueryParser.parsePresence=function(e){var n=e.consumeLexeme();if(n!=null){switch(n.str){case"-":e.currentClause.presence=t.Query.presence.PROHIBITED;break;case"+":e.currentClause.presence=t.Query.presence.REQUIRED;break;default:var r="unrecognised presence operator'"+n.str+"'";throw new t.QueryParseError(r,n.start,n.end)}var i=e.peekLexeme();if(i==null){var r="expecting term or field, found nothing";throw new t.QueryParseError(r,n.start,n.end)}switch(i.type){case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var r="expecting term or field, found '"+i.type+"'";throw new t.QueryParseError(r,i.start,i.end)}}},t.QueryParser.parseField=function(e){var n=e.consumeLexeme();if(n!=null){if(e.query.allFields.indexOf(n.str)==-1){var r=e.query.allFields.map(function(o){return"'"+o+"'"}).join(", "),i="unrecognised field '"+n.str+"', possible fields: "+r;throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.fields=[n.str];var s=e.peekLexeme();if(s==null){var i="expecting term, found nothing";throw new t.QueryParseError(i,n.start,n.end)}switch(s.type){case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var i="expecting term, found '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseTerm=function(e){var n=e.consumeLexeme();if(n!=null){e.currentClause.term=n.str.toLowerCase(),n.str.indexOf("*")!=-1&&(e.currentClause.usePipeline=!1);var r=e.peekLexeme();if(r==null){e.nextClause();return}switch(r.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+r.type+"'";throw new t.QueryParseError(i,r.start,r.end)}}},t.QueryParser.parseEditDistance=function(e){var n=e.consumeLexeme();if(n!=null){var r=parseInt(n.str,10);if(isNaN(r)){var i="edit distance must be numeric";throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.editDistance=r;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseBoost=function(e){var n=e.consumeLexeme();if(n!=null){var r=parseInt(n.str,10);if(isNaN(r)){var i="boost must be numeric";throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.boost=r;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},function(e,n){typeof define=="function"&&define.amd?define(n):typeof ae=="object"?le.exports=n():e.lunr=n()}(this,function(){return t})})()});var se=[];function G(t,e){se.push({selector:e,constructor:t})}var U=class{constructor(){this.alwaysVisibleMember=null;this.createComponents(document.body),this.ensureFocusedElementVisible(),this.listenForCodeCopies(),window.addEventListener("hashchange",()=>this.ensureFocusedElementVisible()),document.body.style.display||(this.ensureFocusedElementVisible(),this.updateIndexVisibility(),this.scrollToHash())}createComponents(e){se.forEach(n=>{e.querySelectorAll(n.selector).forEach(r=>{r.dataset.hasInstance||(new n.constructor({el:r,app:this}),r.dataset.hasInstance=String(!0))})})}filterChanged(){this.ensureFocusedElementVisible()}showPage(){document.body.style.display&&(document.body.style.removeProperty("display"),this.ensureFocusedElementVisible(),this.updateIndexVisibility(),this.scrollToHash())}scrollToHash(){if(location.hash){let e=document.getElementById(location.hash.substring(1));if(!e)return;e.scrollIntoView({behavior:"instant",block:"start"})}}ensureActivePageVisible(){let e=document.querySelector(".tsd-navigation .current"),n=e?.parentElement;for(;n&&!n.classList.contains(".tsd-navigation");)n instanceof HTMLDetailsElement&&(n.open=!0),n=n.parentElement;if(e&&!Ve(e)){let r=e.getBoundingClientRect().top-document.documentElement.clientHeight/4;document.querySelector(".site-menu").scrollTop=r,document.querySelector(".col-sidebar").scrollTop=r}}updateIndexVisibility(){let e=document.querySelector(".tsd-index-content"),n=e?.open;e&&(e.open=!0),document.querySelectorAll(".tsd-index-section").forEach(r=>{r.style.display="block";let i=Array.from(r.querySelectorAll(".tsd-index-link")).every(s=>s.offsetParent==null);r.style.display=i?"none":"block"}),e&&(e.open=n)}ensureFocusedElementVisible(){if(this.alwaysVisibleMember&&(this.alwaysVisibleMember.classList.remove("always-visible"),this.alwaysVisibleMember.firstElementChild.remove(),this.alwaysVisibleMember=null),!location.hash)return;let e=document.getElementById(location.hash.substring(1));if(!e)return;let n=e.parentElement;for(;n&&n.tagName!=="SECTION";)n=n.parentElement;if(!n)return;let r=n.offsetParent==null,i=n;for(;i!==document.body;)i instanceof HTMLDetailsElement&&(i.open=!0),i=i.parentElement;if(n.offsetParent==null){this.alwaysVisibleMember=n,n.classList.add("always-visible");let s=document.createElement("p");s.classList.add("warning"),s.textContent=window.translations.normally_hidden,n.prepend(s)}r&&e.scrollIntoView()}listenForCodeCopies(){document.querySelectorAll("pre > button").forEach(e=>{let n;e.addEventListener("click",()=>{e.previousElementSibling instanceof HTMLElement&&navigator.clipboard.writeText(e.previousElementSibling.innerText.trim()),e.textContent=window.translations.copied,e.classList.add("visible"),clearTimeout(n),n=setTimeout(()=>{e.classList.remove("visible"),n=setTimeout(()=>{e.textContent=window.translations.copy},100)},1e3)})})}};function Ve(t){let e=t.getBoundingClientRect(),n=Math.max(document.documentElement.clientHeight,window.innerHeight);return!(e.bottom<0||e.top-n>=0)}var oe=(t,e=100)=>{let n;return()=>{clearTimeout(n),n=setTimeout(()=>t(),e)}};var pe=Ae(ue());async function ce(t,e){if(!window.searchData)return;let n=await fetch(window.searchData),r=new Blob([await n.arrayBuffer()]).stream().pipeThrough(new DecompressionStream("gzip")),i=await new Response(r).json();t.data=i,t.index=pe.Index.load(i.index),e.classList.remove("loading"),e.classList.add("ready")}function fe(){let t=document.getElementById("tsd-search");if(!t)return;let e={base:t.dataset.base+"/"},n=document.getElementById("tsd-search-script");t.classList.add("loading"),n&&(n.addEventListener("error",()=>{t.classList.remove("loading"),t.classList.add("failure")}),n.addEventListener("load",()=>{ce(e,t)}),ce(e,t));let r=document.querySelector("#tsd-search input"),i=document.querySelector("#tsd-search .results");if(!r||!i)throw new Error("The input field or the result list wrapper was not found");i.addEventListener("mouseup",()=>{te(t)}),r.addEventListener("focus",()=>t.classList.add("has-focus")),He(t,i,r,e)}function He(t,e,n,r){n.addEventListener("input",oe(()=>{Ne(t,e,n,r)},200)),n.addEventListener("keydown",i=>{i.key=="Enter"?Be(e,t):i.key=="ArrowUp"?(de(e,n,-1),i.preventDefault()):i.key==="ArrowDown"&&(de(e,n,1),i.preventDefault())}),document.body.addEventListener("keypress",i=>{i.altKey||i.ctrlKey||i.metaKey||!n.matches(":focus")&&i.key==="/"&&(i.preventDefault(),n.focus())}),document.body.addEventListener("keyup",i=>{t.classList.contains("has-focus")&&(i.key==="Escape"||!e.matches(":focus-within")&&!n.matches(":focus"))&&(n.blur(),te(t))})}function te(t){t.classList.remove("has-focus")}function Ne(t,e,n,r){if(!r.index||!r.data)return;e.textContent="";let i=n.value.trim(),s;if(i){let o=i.split(" ").map(a=>a.length?`*${a}*`:"").join(" ");s=r.index.search(o)}else s=[];for(let o=0;oa.score-o.score);for(let o=0,a=Math.min(10,s.length);o`,d=he(l.name,i);globalThis.DEBUG_SEARCH_WEIGHTS&&(d+=` (score: ${s[o].score.toFixed(2)})`),l.parent&&(d=` + ${he(l.parent,i)}.${d}`);let m=document.createElement("li");m.classList.value=l.classes??"";let p=document.createElement("a");p.href=r.base+l.url,p.innerHTML=u+d,m.append(p),p.addEventListener("focus",()=>{e.querySelector(".current")?.classList.remove("current"),m.classList.add("current")}),e.appendChild(m)}}function de(t,e,n){let r=t.querySelector(".current");if(!r)r=t.querySelector(n==1?"li:first-child":"li:last-child"),r&&r.classList.add("current");else{let i=r;if(n===1)do i=i.nextElementSibling??void 0;while(i instanceof HTMLElement&&i.offsetParent==null);else do i=i.previousElementSibling??void 0;while(i instanceof HTMLElement&&i.offsetParent==null);i?(r.classList.remove("current"),i.classList.add("current")):n===-1&&(r.classList.remove("current"),e.focus())}}function Be(t,e){let n=t.querySelector(".current");if(n||(n=t.querySelector("li:first-child")),n){let r=n.querySelector("a");r&&(window.location.href=r.href),te(e)}}function he(t,e){if(e==="")return t;let n=t.toLocaleLowerCase(),r=e.toLocaleLowerCase(),i=[],s=0,o=n.indexOf(r);for(;o!=-1;)i.push(ee(t.substring(s,o)),`${ee(t.substring(o,o+r.length))}`),s=o+r.length,o=n.indexOf(r,s);return i.push(ee(t.substring(s))),i.join("")}var je={"&":"&","<":"<",">":">","'":"'",'"':"""};function ee(t){return t.replace(/[&<>"'"]/g,e=>je[e])}var I=class{constructor(e){this.el=e.el,this.app=e.app}};var F="mousedown",ye="mousemove",N="mouseup",J={x:0,y:0},me=!1,ne=!1,qe=!1,D=!1,ve=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);document.documentElement.classList.add(ve?"is-mobile":"not-mobile");ve&&"ontouchstart"in document.documentElement&&(qe=!0,F="touchstart",ye="touchmove",N="touchend");document.addEventListener(F,t=>{ne=!0,D=!1;let e=F=="touchstart"?t.targetTouches[0]:t;J.y=e.pageY||0,J.x=e.pageX||0});document.addEventListener(ye,t=>{if(ne&&!D){let e=F=="touchstart"?t.targetTouches[0]:t,n=J.x-(e.pageX||0),r=J.y-(e.pageY||0);D=Math.sqrt(n*n+r*r)>10}});document.addEventListener(N,()=>{ne=!1});document.addEventListener("click",t=>{me&&(t.preventDefault(),t.stopImmediatePropagation(),me=!1)});var X=class extends I{constructor(e){super(e),this.className=this.el.dataset.toggle||"",this.el.addEventListener(N,n=>this.onPointerUp(n)),this.el.addEventListener("click",n=>n.preventDefault()),document.addEventListener(F,n=>this.onDocumentPointerDown(n)),document.addEventListener(N,n=>this.onDocumentPointerUp(n))}setActive(e){if(this.active==e)return;this.active=e,document.documentElement.classList.toggle("has-"+this.className,e),this.el.classList.toggle("active",e);let n=(this.active?"to-has-":"from-has-")+this.className;document.documentElement.classList.add(n),setTimeout(()=>document.documentElement.classList.remove(n),500)}onPointerUp(e){D||(this.setActive(!0),e.preventDefault())}onDocumentPointerDown(e){if(this.active){if(e.target.closest(".col-sidebar, .tsd-filter-group"))return;this.setActive(!1)}}onDocumentPointerUp(e){if(!D&&this.active&&e.target.closest(".col-sidebar")){let n=e.target.closest("a");if(n){let r=window.location.href;r.indexOf("#")!=-1&&(r=r.substring(0,r.indexOf("#"))),n.href.substring(0,r.length)==r&&setTimeout(()=>this.setActive(!1),250)}}}};var re;try{re=localStorage}catch{re={getItem(){return null},setItem(){}}}var Q=re;var ge=document.head.appendChild(document.createElement("style"));ge.dataset.for="filters";var Y=class extends I{constructor(e){super(e),this.key=`filter-${this.el.name}`,this.value=this.el.checked,this.el.addEventListener("change",()=>{this.setLocalStorage(this.el.checked)}),this.setLocalStorage(this.fromLocalStorage()),ge.innerHTML+=`html:not(.${this.key}) .tsd-is-${this.el.name} { display: none; } +`,this.app.updateIndexVisibility()}fromLocalStorage(){let e=Q.getItem(this.key);return e?e==="true":this.el.checked}setLocalStorage(e){Q.setItem(this.key,e.toString()),this.value=e,this.handleValueChange()}handleValueChange(){this.el.checked=this.value,document.documentElement.classList.toggle(this.key,this.value),this.app.filterChanged(),this.app.updateIndexVisibility()}};var Z=class extends I{constructor(e){super(e),this.summary=this.el.querySelector(".tsd-accordion-summary"),this.icon=this.summary.querySelector("svg"),this.key=`tsd-accordion-${this.summary.dataset.key??this.summary.textContent.trim().replace(/\s+/g,"-").toLowerCase()}`;let n=Q.getItem(this.key);this.el.open=n?n==="true":this.el.open,this.el.addEventListener("toggle",()=>this.update());let r=this.summary.querySelector("a");r&&r.addEventListener("click",()=>{location.assign(r.href)}),this.update()}update(){this.icon.style.transform=`rotate(${this.el.open?0:-90}deg)`,Q.setItem(this.key,this.el.open.toString())}};function Ee(t){let e=Q.getItem("tsd-theme")||"os";t.value=e,xe(e),t.addEventListener("change",()=>{Q.setItem("tsd-theme",t.value),xe(t.value)})}function xe(t){document.documentElement.dataset.theme=t}var K;function we(){let t=document.getElementById("tsd-nav-script");t&&(t.addEventListener("load",Le),Le())}async function Le(){let t=document.getElementById("tsd-nav-container");if(!t||!window.navigationData)return;let n=await(await fetch(window.navigationData)).arrayBuffer(),r=new Blob([n]).stream().pipeThrough(new DecompressionStream("gzip")),i=await new Response(r).json();K=t.dataset.base,K.endsWith("/")||(K+="/"),t.innerHTML="";for(let s of i)Se(s,t,[]);window.app.createComponents(t),window.app.showPage(),window.app.ensureActivePageVisible()}function Se(t,e,n){let r=e.appendChild(document.createElement("li"));if(t.children){let i=[...n,t.text],s=r.appendChild(document.createElement("details"));s.className=t.class?`${t.class} tsd-accordion`:"tsd-accordion";let o=s.appendChild(document.createElement("summary"));o.className="tsd-accordion-summary",o.dataset.key=i.join("$"),o.innerHTML='',be(t,o);let a=s.appendChild(document.createElement("div"));a.className="tsd-accordion-details";let l=a.appendChild(document.createElement("ul"));l.className="tsd-nested-navigation";for(let u of t.children)Se(u,l,i)}else be(t,r,t.class)}function be(t,e,n){if(t.path){let r=e.appendChild(document.createElement("a"));r.href=K+t.path,n&&(r.className=n),location.pathname===r.pathname&&!r.href.includes("#")&&r.classList.add("current"),t.kind&&(r.innerHTML=``),r.appendChild(document.createElement("span")).textContent=t.text}else{let r=e.appendChild(document.createElement("span"));r.innerHTML='',r.appendChild(document.createElement("span")).textContent=t.text}}G(X,"a[data-toggle]");G(Z,".tsd-accordion");G(Y,".tsd-filter-item input[type=checkbox]");var Te=document.getElementById("tsd-theme");Te&&Ee(Te);var $e=new U;Object.defineProperty(window,"app",{value:$e});fe();we();})(); /*! Bundled license information: lunr/lunr.js: diff --git a/docs/assets/navigation.js b/docs/assets/navigation.js index d3e368c6..fd68c8df 100644 --- a/docs/assets/navigation.js +++ b/docs/assets/navigation.js @@ -1,2 +1 @@ -window.navigationData = - 'data:application/octet-stream;base64,H4sIAAAAAAAAE42TUUvDMBDHv0uei3PDTe3b1AmCoow9CDIkpNc12CQld4UN2XcXt65r0qztW0l+/O6fu+vXLyPYEovZHBFoZbnGFOy8kCxiBaeMxUyZpMwBRz5xlZHKWcR+pE5YPImYyGSeWNAs/hqgFTlHDGm764wnd/v1PqoLCKORbCloXsgPa5REaEcPQMPSF/JFp+YslJrAplxccFa8557OhuZNSy1IGh22975iduO0Bqw1FkcPHGHx/9nuy5H4rolBTalpXOhSnaWgSxVQurhbwR0l7QrAdsjD8aBkT9LCoX9+qKOivvZDnCPUa2c3+F4QBid/tPlo19BX2yVgmVOXrkK6NP6f4SY8eCpbiPTM1/e34+mkYX88rRckz8YqTmF1C+vzdsmGGV6N4PnpNSt3S5q2NtdnfgPKTHJBV132OZawkUh21xHMQfp8n0IFFrmpaxJh23q//gNSKZwA2wUAAA=='; +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 8a51cce5..3a604619 100644 --- a/docs/assets/search.js +++ b/docs/assets/search.js @@ -1,2 +1 @@ -window.searchData = - 'data:application/octet-stream;base64,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'; +window.searchData = "data:application/octet-stream;base64,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"; \ No newline at end of file diff --git a/docs/assets/style.css b/docs/assets/style.css index 07a385b7..178bfb02 100644 --- a/docs/assets/style.css +++ b/docs/assets/style.css @@ -4,12 +4,19 @@ --light-color-background-secondary: #eff0f1; --light-color-warning-text: #222; --light-color-background-warning: #e6e600; - --light-color-icon-background: var(--light-color-background); --light-color-accent: #c5c7c9; --light-color-active-menu-item: var(--light-color-accent); --light-color-text: #222; --light-color-text-aside: #6e6e6e; + + --light-color-icon-background: var(--light-color-background); + --light-color-icon-text: var(--light-color-text); + + --light-color-comment-tag-text: var(--light-color-text); + --light-color-comment-tag: var(--light-color-background); + --light-color-link: #1f70c2; + --light-color-focus-outline: #3584e4; --light-color-ts-keyword: #056bd6; --light-color-ts-project: #b111c9; @@ -21,20 +28,22 @@ --light-color-ts-function: #572be7; --light-color-ts-class: #1f70c2; --light-color-ts-interface: #108024; - --light-color-ts-constructor: var(--light-color-ts-class); - --light-color-ts-property: var(--light-color-ts-variable); - --light-color-ts-method: var(--light-color-ts-function); + --light-color-ts-constructor: #4d7fff; + --light-color-ts-property: #ff984d; + --light-color-ts-method: #ff4db8; + --light-color-ts-reference: #ff4d82; --light-color-ts-call-signature: var(--light-color-ts-method); --light-color-ts-index-signature: var(--light-color-ts-property); --light-color-ts-constructor-signature: var(--light-color-ts-constructor); --light-color-ts-parameter: var(--light-color-ts-variable); /* type literal not included as links will never be generated to it */ - --light-color-ts-type-parameter: var(--light-color-ts-type-alias); - --light-color-ts-accessor: var(--light-color-ts-property); + --light-color-ts-type-parameter: #a55c0e; + --light-color-ts-accessor: #ff4d4d; --light-color-ts-get-signature: var(--light-color-ts-accessor); --light-color-ts-set-signature: var(--light-color-ts-accessor); --light-color-ts-type-alias: #d51270; /* reference not included as links will be colored with the kind that it points to */ + --light-color-document: #000000; --light-external-icon: url("data:image/svg+xml;utf8,"); --light-color-scheme: light; @@ -44,12 +53,19 @@ --dark-color-background-secondary: #1e2024; --dark-color-background-warning: #bebe00; --dark-color-warning-text: #222; - --dark-color-icon-background: var(--dark-color-background-secondary); --dark-color-accent: #9096a2; --dark-color-active-menu-item: #5d5d6a; --dark-color-text: #f5f5f5; --dark-color-text-aside: #dddddd; + + --dark-color-icon-background: var(--dark-color-background-secondary); + --dark-color-icon-text: var(--dark-color-text); + + --dark-color-comment-tag-text: var(--dark-color-text); + --dark-color-comment-tag: var(--dark-color-background); + --dark-color-link: #00aff4; + --dark-color-focus-outline: #4c97f2; --dark-color-ts-keyword: #3399ff; --dark-color-ts-project: #e358ff; @@ -61,20 +77,22 @@ --dark-color-ts-function: #a280ff; --dark-color-ts-class: #8ac4ff; --dark-color-ts-interface: #6cff87; - --dark-color-ts-constructor: var(--dark-color-ts-class); - --dark-color-ts-property: var(--dark-color-ts-variable); - --dark-color-ts-method: var(--dark-color-ts-function); + --dark-color-ts-constructor: #4d7fff; + --dark-color-ts-property: #ff984d; + --dark-color-ts-method: #ff4db8; + --dark-color-ts-reference: #ff4d82; --dark-color-ts-call-signature: var(--dark-color-ts-method); --dark-color-ts-index-signature: var(--dark-color-ts-property); --dark-color-ts-constructor-signature: var(--dark-color-ts-constructor); --dark-color-ts-parameter: var(--dark-color-ts-variable); /* type literal not included as links will never be generated to it */ - --dark-color-ts-type-parameter: var(--dark-color-ts-type-alias); - --dark-color-ts-accessor: var(--dark-color-ts-property); + --dark-color-ts-type-parameter: #e07d13; + --dark-color-ts-accessor: #ff4d4d; --dark-color-ts-get-signature: var(--dark-color-ts-accessor); --dark-color-ts-set-signature: var(--dark-color-ts-accessor); --dark-color-ts-type-alias: #ff6492; /* reference not included as links will be colored with the kind that it points to */ + --dark-color-document: #ffffff; --dark-external-icon: url("data:image/svg+xml;utf8,"); --dark-color-scheme: dark; @@ -86,14 +104,22 @@ --color-background-secondary: var(--light-color-background-secondary); --color-background-warning: var(--light-color-background-warning); --color-warning-text: var(--light-color-warning-text); - --color-icon-background: var(--light-color-icon-background); --color-accent: var(--light-color-accent); --color-active-menu-item: var(--light-color-active-menu-item); --color-text: var(--light-color-text); --color-text-aside: var(--light-color-text-aside); + + --color-icon-background: var(--light-color-icon-background); + --color-icon-text: var(--light-color-icon-text); + + --color-comment-tag-text: var(--light-color-text); + --color-comment-tag: var(--light-color-background); + --color-link: var(--light-color-link); + --color-focus-outline: var(--light-color-focus-outline); --color-ts-keyword: var(--light-color-ts-keyword); + --color-ts-project: var(--light-color-ts-project); --color-ts-module: var(--light-color-ts-module); --color-ts-namespace: var(--light-color-ts-namespace); --color-ts-enum: var(--light-color-ts-enum); @@ -105,6 +131,7 @@ --color-ts-constructor: var(--light-color-ts-constructor); --color-ts-property: var(--light-color-ts-property); --color-ts-method: var(--light-color-ts-method); + --color-ts-reference: var(--light-color-ts-reference); --color-ts-call-signature: var(--light-color-ts-call-signature); --color-ts-index-signature: var(--light-color-ts-index-signature); --color-ts-constructor-signature: var( @@ -116,6 +143,7 @@ --color-ts-get-signature: var(--light-color-ts-get-signature); --color-ts-set-signature: var(--light-color-ts-set-signature); --color-ts-type-alias: var(--light-color-ts-type-alias); + --color-document: var(--light-color-document); --external-icon: var(--light-external-icon); --color-scheme: var(--light-color-scheme); @@ -128,14 +156,22 @@ --color-background-secondary: var(--dark-color-background-secondary); --color-background-warning: var(--dark-color-background-warning); --color-warning-text: var(--dark-color-warning-text); - --color-icon-background: var(--dark-color-icon-background); --color-accent: var(--dark-color-accent); --color-active-menu-item: var(--dark-color-active-menu-item); --color-text: var(--dark-color-text); --color-text-aside: var(--dark-color-text-aside); + + --color-icon-background: var(--dark-color-icon-background); + --color-icon-text: var(--dark-color-icon-text); + + --color-comment-tag-text: var(--dark-color-text); + --color-comment-tag: var(--dark-color-background); + --color-link: var(--dark-color-link); + --color-focus-outline: var(--dark-color-focus-outline); --color-ts-keyword: var(--dark-color-ts-keyword); + --color-ts-project: var(--dark-color-ts-project); --color-ts-module: var(--dark-color-ts-module); --color-ts-namespace: var(--dark-color-ts-namespace); --color-ts-enum: var(--dark-color-ts-enum); @@ -147,6 +183,7 @@ --color-ts-constructor: var(--dark-color-ts-constructor); --color-ts-property: var(--dark-color-ts-property); --color-ts-method: var(--dark-color-ts-method); + --color-ts-reference: var(--dark-color-ts-reference); --color-ts-call-signature: var(--dark-color-ts-call-signature); --color-ts-index-signature: var(--dark-color-ts-index-signature); --color-ts-constructor-signature: var( @@ -158,6 +195,7 @@ --color-ts-get-signature: var(--dark-color-ts-get-signature); --color-ts-set-signature: var(--dark-color-ts-set-signature); --color-ts-type-alias: var(--dark-color-ts-type-alias); + --color-document: var(--dark-color-document); --external-icon: var(--dark-external-icon); --color-scheme: var(--dark-color-scheme); @@ -182,9 +220,16 @@ body { --color-active-menu-item: var(--light-color-active-menu-item); --color-text: var(--light-color-text); --color-text-aside: var(--light-color-text-aside); + --color-icon-text: var(--light-color-icon-text); + + --color-comment-tag-text: var(--light-color-text); + --color-comment-tag: var(--light-color-background); + --color-link: var(--light-color-link); + --color-focus-outline: var(--light-color-focus-outline); --color-ts-keyword: var(--light-color-ts-keyword); + --color-ts-project: var(--light-color-ts-project); --color-ts-module: var(--light-color-ts-module); --color-ts-namespace: var(--light-color-ts-namespace); --color-ts-enum: var(--light-color-ts-enum); @@ -196,6 +241,7 @@ body { --color-ts-constructor: var(--light-color-ts-constructor); --color-ts-property: var(--light-color-ts-property); --color-ts-method: var(--light-color-ts-method); + --color-ts-reference: var(--light-color-ts-reference); --color-ts-call-signature: var(--light-color-ts-call-signature); --color-ts-index-signature: var(--light-color-ts-index-signature); --color-ts-constructor-signature: var( @@ -207,6 +253,7 @@ body { --color-ts-get-signature: var(--light-color-ts-get-signature); --color-ts-set-signature: var(--light-color-ts-set-signature); --color-ts-type-alias: var(--light-color-ts-type-alias); + --color-document: var(--light-color-document); --external-icon: var(--light-external-icon); --color-scheme: var(--light-color-scheme); @@ -222,9 +269,16 @@ body { --color-active-menu-item: var(--dark-color-active-menu-item); --color-text: var(--dark-color-text); --color-text-aside: var(--dark-color-text-aside); + --color-icon-text: var(--dark-color-icon-text); + + --color-comment-tag-text: var(--dark-color-text); + --color-comment-tag: var(--dark-color-background); + --color-link: var(--dark-color-link); + --color-focus-outline: var(--dark-color-focus-outline); --color-ts-keyword: var(--dark-color-ts-keyword); + --color-ts-project: var(--dark-color-ts-project); --color-ts-module: var(--dark-color-ts-module); --color-ts-namespace: var(--dark-color-ts-namespace); --color-ts-enum: var(--dark-color-ts-enum); @@ -236,6 +290,7 @@ body { --color-ts-constructor: var(--dark-color-ts-constructor); --color-ts-property: var(--dark-color-ts-property); --color-ts-method: var(--dark-color-ts-method); + --color-ts-reference: var(--dark-color-ts-reference); --color-ts-call-signature: var(--dark-color-ts-call-signature); --color-ts-index-signature: var(--dark-color-ts-index-signature); --color-ts-constructor-signature: var( @@ -247,11 +302,17 @@ body { --color-ts-get-signature: var(--dark-color-ts-get-signature); --color-ts-set-signature: var(--dark-color-ts-set-signature); --color-ts-type-alias: var(--dark-color-ts-type-alias); + --color-document: var(--dark-color-document); --external-icon: var(--dark-external-icon); --color-scheme: var(--dark-color-scheme); } +*:focus-visible, +.tsd-accordion-summary:focus-visible svg { + outline: 2px solid var(--color-focus-outline); +} + .always-visible, .always-visible .tsd-signatures { display: inherit !important; @@ -266,16 +327,6 @@ h6 { line-height: 1.2; } -h1 > a, -h2 > a, -h3 > a, -h4 > a, -h5 > a, -h6 > a { - text-decoration: none; - color: var(--color-text); -} - h1 { font-size: 1.875rem; margin: 0.67rem 0; @@ -306,10 +357,6 @@ h6 { margin: 2.33rem 0; } -.uppercase { - text-transform: uppercase; -} - dl, menu, ol, @@ -327,17 +374,14 @@ dd { } /* Footer */ -.tsd-generator { +footer { border-top: 1px solid var(--color-accent); padding-top: 1rem; padding-bottom: 1rem; max-height: 3.5rem; } - -.tsd-generator > p { - margin-top: 0; - margin-bottom: 0; - padding: 0 1rem; +footer > p { + margin: 0 1em; } .container-main { @@ -405,7 +449,8 @@ dd { } body { background: var(--color-background); - font-family: "Segoe UI", sans-serif; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", + Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; font-size: 16px; color: var(--color-text); } @@ -423,6 +468,9 @@ a.external[target="_blank"] { background-repeat: no-repeat; padding-right: 13px; } +a.tsd-anchor-link { + color: var(--color-text); +} code, pre { @@ -435,7 +483,6 @@ pre { pre { position: relative; - white-space: pre; white-space: pre-wrap; word-wrap: break-word; padding: 10px; @@ -582,13 +629,13 @@ dl.tsd-comment-tag-group p { } .tsd-filter-input { display: flex; - width: fit-content; width: -moz-fit-content; + width: fit-content; align-items: center; - user-select: none; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; + user-select: none; cursor: pointer; } .tsd-filter-input input[type="checkbox"] { @@ -611,11 +658,8 @@ dl.tsd-comment-tag-group p { Don't remove unless you know what you're doing. */ opacity: 0.99; } -.tsd-filter-input input[type="checkbox"]:focus + svg { - transform: scale(0.95); -} -.tsd-filter-input input[type="checkbox"]:focus:not(:focus-visible) + svg { - transform: scale(1); +.tsd-filter-input input[type="checkbox"]:focus-visible + svg { + outline: 2px solid var(--color-focus-outline); } .tsd-checkbox-background { fill: var(--color-accent); @@ -632,13 +676,18 @@ input[type="checkbox"]:checked ~ svg .tsd-checkbox-checkmark { stroke: var(--color-accent); } -.tsd-theme-toggle { - padding-top: 0.75rem; +.settings-label { + font-weight: bold; + text-transform: uppercase; + display: inline-block; } -.tsd-theme-toggle > h4 { - display: inline; - vertical-align: middle; - margin-right: 0.75rem; + +.tsd-filter-visibility .settings-label { + margin: 0.75rem 0 0.5rem 0; +} + +.tsd-theme-toggle .settings-label { + margin: 0.75rem 0.75rem 0 0; } .tsd-hierarchy { @@ -649,6 +698,28 @@ input[type="checkbox"]:checked ~ svg .tsd-checkbox-checkmark { font-weight: bold; } +.tsd-full-hierarchy:not(:last-child) { + margin-bottom: 1em; + padding-bottom: 1em; + border-bottom: 1px solid var(--color-accent); +} +.tsd-full-hierarchy, +.tsd-full-hierarchy ul { + list-style: none; + margin: 0; + padding: 0; +} +.tsd-full-hierarchy ul { + padding-left: 1.5rem; +} +.tsd-full-hierarchy a { + padding: 0.25rem 0 !important; + font-size: 1rem; + display: inline-flex; + align-items: center; + color: var(--color-text); +} + .tsd-panel-group.tsd-index-group { margin-bottom: 0; } @@ -714,12 +785,15 @@ input[type="checkbox"]:checked ~ svg .tsd-checkbox-checkmark { } .tsd-navigation > a, .tsd-navigation .tsd-accordion-summary { - width: calc(100% - 0.5rem); + width: calc(100% - 0.25rem); + display: flex; + align-items: center; } .tsd-navigation a, .tsd-navigation summary > span, .tsd-page-navigation a { - display: inline-flex; + display: flex; + width: calc(100% - 0.25rem); align-items: center; padding: 0.25rem; color: var(--color-text); @@ -746,6 +820,9 @@ input[type="checkbox"]:checked ~ svg .tsd-checkbox-checkmark { padding: 0; max-width: 100%; } +.tsd-navigation .tsd-nav-link { + display: none; +} .tsd-nested-navigation { margin-left: 3rem; } @@ -759,11 +836,15 @@ input[type="checkbox"]:checked ~ svg .tsd-checkbox-checkmark { margin-left: -1.5rem; } -.tsd-nested-navigation > li > a, -.tsd-nested-navigation > li > span { - width: calc(100% - 1.75rem - 0.5rem); +.tsd-page-navigation-section { + margin-left: 10px; +} +.tsd-page-navigation-section > summary { + padding: 0.25rem; +} +.tsd-page-navigation-section > div { + margin-left: 20px; } - .tsd-page-navigation ul { padding-left: 1.75rem; } @@ -794,10 +875,10 @@ a.tsd-index-link { } .tsd-accordion-summary, .tsd-accordion-summary a { - user-select: none; -moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; + user-select: none; cursor: pointer; } @@ -810,8 +891,9 @@ a.tsd-index-link { padding-top: 0; padding-bottom: 0; } -.tsd-index-accordion .tsd-accordion-summary > svg { +.tsd-accordion .tsd-accordion-summary > svg { margin-left: 0.25rem; + vertical-align: text-top; } .tsd-index-content > :not(:first-child) { margin-top: 0.75rem; @@ -821,6 +903,12 @@ a.tsd-index-link { margin-bottom: 0.75rem; } +.tsd-no-select { + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} .tsd-kind-icon { margin-right: 0.5rem; width: 1.25rem; @@ -828,10 +916,6 @@ a.tsd-index-link { min-width: 1.25rem; min-height: 1.25rem; } -.tsd-kind-icon path { - transform-origin: center; - transform: scale(1.1); -} .tsd-signature > .tsd-kind-icon { margin-right: 0.8rem; } @@ -859,7 +943,7 @@ a.tsd-index-link { } .tsd-panel-group { - margin: 4rem 0; + margin: 2rem 0; } .tsd-panel-group.tsd-index-group { margin: 2rem 0; @@ -867,6 +951,9 @@ a.tsd-index-link { .tsd-panel-group.tsd-index-group details { margin: 2rem 0; } +.tsd-panel-group > .tsd-accordion-summary { + margin-bottom: 1rem; +} #tsd-search { transition: background-color 0.2s; @@ -1016,6 +1103,12 @@ a.tsd-index-link { border-width: 1px 0; transition: background-color 0.1s; } +.tsd-signatures .tsd-index-signature:not(:last-child) { + margin-bottom: 1em; +} +.tsd-signatures .tsd-index-signature .tsd-signature { + border-width: 1px; +} .tsd-description .tsd-signatures .tsd-signature { border-width: 1px; } @@ -1194,6 +1287,9 @@ img { .tsd-kind-method { color: var(--color-ts-method); } +.tsd-kind-reference { + color: var(--color-ts-reference); +} .tsd-kind-call-signature { color: var(--color-ts-call-signature); } @@ -1206,9 +1302,6 @@ img { .tsd-kind-parameter { color: var(--color-ts-parameter); } -.tsd-kind-type-literal { - color: var(--color-ts-type-literal); -} .tsd-kind-type-parameter { color: var(--color-ts-type-parameter); } @@ -1329,6 +1422,12 @@ img { .has-menu .tsd-navigation { max-height: 100%; } + #tsd-toolbar-links { + display: none; + } + .tsd-navigation .tsd-nav-link { + display: flex; + } } /* one sidebar */ @@ -1381,7 +1480,7 @@ img { } .site-menu { - margin-top: 1rem 0; + margin-top: 1rem; } .page-menu, diff --git a/docs/classes/AssetTransferApi.AssetTransferApi.html b/docs/classes/AssetTransferApi.AssetTransferApi.html index 5fa337f0..9a703a33 100644 --- a/docs/classes/AssetTransferApi.AssetTransferApi.html +++ b/docs/classes/AssetTransferApi.AssetTransferApi.html @@ -1,46 +1,52 @@ -AssetTransferApi | @substrate/asset-transfer-api - v0.4.4

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

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

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

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

    let callInfo: TxResult<'call'>;
    try {
    callInfo = await assetsApi.claimAssets(
    [`{"parents":"0","interior":{"X2":[{"PalletInstance":"50"},{"GeneralIndex":"1984"}]}}`],
    ['1000000000000'],
    '0xf5d5714c084c112843aca74f8c498da06cc5a2d63153b825189baa51043b1f0b',
    {
    format: 'call',
    xcmVersion: 2,
    }
    )
    } catch (e) {
    console.error(e);
    throw Error(e);
    } -
    -

    Type Parameters

    Parameters

    • assetIds: string[]

      Array of assetId's to be claimed from the AssetTrap

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

    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

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

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

    let callInfo: TxResult<'call'>;
    try {
    callInfo = await assetsApi.claimAssets(
    [`{"parents":"0","interior":{"X2":[{"PalletInstance":"50"},{"GeneralIndex":"1984"}]}}`],
    ['1000000000000'],
    '0xf5d5714c084c112843aca74f8c498da06cc5a2d63153b825189baa51043b1f0b',
    {
    format: 'call',
    xcmVersion: 2,
    }
    )
    } catch (e) {
    console.error(e);
    throw Error(e);
    } +
    + +

    Type Parameters

    Parameters

    • assetIds: string[]

      Array of assetId's to be claimed from the AssetTrap

      +
    • 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, 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);
    } -
    -

    Type Parameters

    Parameters

    • destChainId: string

      ID of the destination (para) chain (‘0’ for Relaychain)

      -
    • destAddr: string

      Address of destination account

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

    -
    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

  • Dry Run a call to determine its execution result

    -
    const executionResult = await assetApi.dryRunCall(sendersAddr, tx, 'call');
    console.log(executionResult.toJSON()); -
    -

    Type Parameters

    Parameters

    • sendersAddr: string

      address of the account sending the transaction

      -
    • tx: ConstructedFormat<T>

      a payload, call or submittable

      -
    • format: T

      The format the tx is in

      -

    Returns Promise<null | Result<CallDryRunEffects, XcmDryRunApiError>>

  • Fetch estimated fee information for an extrinsic

    -
    const feeInfo = assetApi.fetchFeeInfo(tx, 'call');
    console.log(feeInfo.toJSON()); -
    -

    Type Parameters

    Parameters

    • tx: ConstructedFormat<T>

      a payload, call or submittable

      -
    • format: T

      The format the tx is in

      -

    Returns Promise<null | RuntimeDispatchInfo | RuntimeDispatchInfoV1>

  • Initialize the registry. This will only activate the registry for the CDN. +

    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);
    } +
    + +

    Type Parameters

    Parameters

    • destChainId: string

      ID of the destination (para) chain (‘0’ for Relaychain)

      +
    • destAddr: string

      Address of destination account

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

    +
    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

  • Dry Run a call to determine its execution result

    +
    const executionResult = await assetApi.dryRunCall(sendersAddr, tx, 'call');
    console.log(executionResult.toJSON()); +
    + +

    Type Parameters

    Parameters

    • sendersAddr: string

      address of the account sending the transaction

      +
    • tx: ConstructedFormat<T>

      a payload, call or submittable

      +
    • format: T

      The format the tx is in

      +

    Returns Promise<null | Result<CallDryRunEffects, XcmDryRunApiError>>

  • Fetch estimated fee information for an extrinsic

    +
    const feeInfo = assetApi.fetchFeeInfo(tx, 'call');
    console.log(feeInfo.toJSON()); +
    + +

    Type Parameters

    Parameters

    Returns Promise<null | RuntimeDispatchInfo | RuntimeDispatchInfoV1>

  • Initialize the registry. This will only activate the registry for the CDN. If the registryType is NPM the initalization will exit since the AssetTransferApi initializes with the reigstry from the NPM package.

    -

    Returns Promise<void>

\ No newline at end of file +

Returns Promise<void>

diff --git a/docs/enums/errors_BaseError.BaseErrorsEnum.html b/docs/enums/errors_BaseError.BaseErrorsEnum.html index 3f9dae45..2d2fc9e5 100644 --- a/docs/enums/errors_BaseError.BaseErrorsEnum.html +++ b/docs/enums/errors_BaseError.BaseErrorsEnum.html @@ -1,44 +1,44 @@ -BaseErrorsEnum | @substrate/asset-transfer-api - v0.4.4

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

Errors that may be returned by the API.

+

Enumeration Members

AssetNotFound

Not able to find the asset.

+
DisabledOption

The following option is disabled given the inputs.

+
InternalError

An issue has happened internally.

+
InvalidAddress

The inputted address is invalid.

+
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

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

+
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

The inputted multilocation is incorrect.

+
InvalidPallet

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

+
InvalidXcmVersion

The xcm version is invalid.

+
MultipleNonUniqueAssetsFound

Multiple assets have been found for a single token symbol.

+
NoFeeAssetLpFound

The provided paysWithFeeOrigin asset has no liquidity pool.

+
NotImplemented

Not Implemented yet.

+
PalletNotFound

The following pallet is not found.

+
RegistryNotFound

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

+
RuntimeCallNotFound

Did not find the correct call in the current runtime.

+
SpecNameNotProvided

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

+
TokensNotProvided

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

+
UnknownConsensusSystem

Did not find a known consensus system for bridge transaction.

+
UnsupportedEnvironment

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

+
diff --git a/docs/enums/types.Direction.html b/docs/enums/types.Direction.html index 52e219db..3c986778 100644 --- a/docs/enums/types.Direction.html +++ b/docs/enums/types.Direction.html @@ -1,24 +1,24 @@ -Direction | @substrate/asset-transfer-api - v0.4.4

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.

-
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 +Direction | @substrate/asset-transfer-api - v0.4.5

Represents all possible tx directions

+

Enumeration Members

Local

Local tx

+
ParaToPara

Parachain to Parachain.

+
ParaToRelay

Parachain to Relay chain.

+
ParaToSystem

Parachain to System parachain.

+
RelayToBridge

Relay chain to an external GlobalConsensus chain.

+
RelayToPara

Relay chain to Parachain.

+
RelayToSystem

Relay to System Parachain.

+
SystemToBridge

System parachain to an external GlobalConsensus chain.

+
SystemToPara

System parachain to Parachain.

+
SystemToRelay

System parachain to Relay chain.

+
SystemToSystem

System parachain to System parachain chain.

+
diff --git a/docs/functions/constructApiPromise.constructApiPromise.html b/docs/functions/constructApiPromise.constructApiPromise.html index 55ce6466..d9599dbe 100644 --- a/docs/functions/constructApiPromise.constructApiPromise.html +++ b/docs/functions/constructApiPromise.constructApiPromise.html @@ -1,6 +1,7 @@ -constructApiPromise | @substrate/asset-transfer-api - v0.4.4
  • Construct a Polkadot-js ApiPromise, and retrieve the specName of the chain.

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

    const { api, specName, safeXcmVersion } = constructApiPromise('wss://some_ws_url'); -
    -

    Parameters

    • wsUrl: string

      WebSocket Url to connect to.

      -
    • opts: ApiOptions = {}

      ApiOptions

      -

    Returns Promise<ApiInfo>

\ No newline at end of file +constructApiPromise | @substrate/asset-transfer-api - v0.4.5

Construct a Polkadot-js ApiPromise, and retrieve the specName of the chain.

+
import { constructApiPromise } from '@substrate/asset-transfer-api';

const { api, specName, safeXcmVersion } = constructApiPromise('wss://some_ws_url'); +
+ +
  • Parameters

    • wsUrl: string

      WebSocket Url to connect to.

      +
    • opts: ApiOptions = {}

      ApiOptions

      +

    Returns Promise<ApiInfo>

diff --git a/docs/index.html b/docs/index.html index e7626450..471f1028 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,4 +1,4 @@ -@substrate/asset-transfer-api - v0.4.4

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



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

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



@substrate/asset-transfer-api

Asset API used for common good parachains

@@ -14,11 +14,10 @@

Asset API used for common good parachains

-



-

Docs

Find the full documentation here, for quick start guide read below. All examples can be found here.

+

Find the full documentation here, for quick start guide read below. All examples can be found here.

Summary: Asset-transfer-api is a library focused on simplifying the construction of asset transfers for Substrate based chains that involves system parachains like Asset Hub (Polkadot and Kusama). It exposes a reduced set of methods which facilitates users to send transfers to other (para) chains or locally.

-

Current Cross-chain Support

The below chart is focusing on what directions are supported for constructing asset transfers and in what XCM version. The goal is to have everything in green checkmarks. Note that local transfers (intra-chain) are not visualized here.

+

The below chart is focusing on what directions are supported for constructing asset transfers and in what XCM version. The goal is to have everything in green checkmarks. Note that local transfers (intra-chain) are not visualized here.

@@ -28,7 +27,8 @@

Asset API used for common good parachains

- + + @@ -88,71 +88,77 @@

Asset API used for common good parachains

-
V4
System to Relay
-

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

-

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.

-

Example Usage

NOTE: For more practical usage, and specified examples please look through our ./examples directory to see more use cases. To -run these examples: yarn build:examples && node ./examples/build/examples/<file_to_run>.js.

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

// NOTE: This should all be wrapped in an asynchronous layer.

// This constructs a polkadot-js ApiPromise, it is totally viable for one to construct their
// own ApiPromise, and pass it into AssetTransferApi, but keep in mind the `specName`, and `safeXcmVersion` are also necessary.
const { api, specName, safeXcmVersion } = await constructApiPromise('wss://westmint-rpc.polkadot.io');

const assetsApi = new AssetTransferApi(api, specName, safeXcmVersion);

const call = assetsApi.createTransferTransaction(
'2001', // destChainId (If the destination is a relay chain put `0`)
'0x00', // destAddress
['1', '2'], // Array of AssetIds
['1000000000', '2000000000'], // Array of amounts of each token to transfer
{
format: 'call',
xcmVersion: 1
} // Options
) -
-

AssetTransferApi & AssetTransferApiOpts & TransferArgsOpts

// The AssetTransferApi method: `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>
) -
-
// The AssetTransferApi method: `fetchFeeInfo`

/**
* Fetch estimated fee information for an extrinsic
*
* @param tx a payload, call or submittable
* @param format The format the tx is in
*/
AssetTransferApi.fetchFeeInfo(
tx: ConstructedFormat<T>,
format: 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/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 `paseo`.
*/
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;
/**
* 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;

/**
* Optionally sets the pallet to be used for the current tx.
*/
xcmPalletOverride?: XcmPallet;
} -
-

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.

+ + +

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

+

npm install @substrate/asset-transfer-api

+

yarn add @substrate/asset-transfer-api

+

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.

+

Note: For more detailed and practical usage examples, please refer to the ./examples directory, where you can find various use cases. To run these examples, follow the steps below:

+
    +
  1. +

    First, install the dependencies:

    +
    yarn install
    +
    + +
  2. +
  3. +

    Then, build and run the desired example:

    +
    yarn build:examples && node ./examples/build/examples/<file_to_run>.js
    +
    + +
  4. +
+
import { AssetTransferApi, constructApiPromise } from '@substrate/asset-transfer-api';

// NOTE: This should all be wrapped in an asynchronous layer.

// This constructs a polkadot-js ApiPromise, it is totally viable for one to construct their
// own ApiPromise, and pass it into AssetTransferApi, but keep in mind the `specName`, and `safeXcmVersion` are also necessary.
const { api, specName, safeXcmVersion } = await constructApiPromise('wss://westmint-rpc.polkadot.io');

const assetsApi = new AssetTransferApi(api, specName, safeXcmVersion);

const call = assetsApi.createTransferTransaction(
'2001', // destChainId (If the destination is a relay chain put `0`)
'0x00', // destAddress
['1', '2'], // Array of AssetIds
['1000000000', '2000000000'], // Array of amounts of each token to transfer
{
format: 'call',
xcmVersion: 1,
}, // Options
); +
+ +
// The AssetTransferApi method: `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>
) +
+ +
// The AssetTransferApi method: `fetchFeeInfo`

/**
* Fetch estimated fee information for an extrinsic
*
* @param tx a payload, call or submittable
* @param format The format the tx is in
*/
AssetTransferApi.fetchFeeInfo(
tx: ConstructedFormat<T>,
format: 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/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 `paseo`.
*/
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;
/**
* 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;

/**
* Optionally sets the pallet to be used for the current tx.
*/
xcmPalletOverride?: XcmPallet;
} +
+ +

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.

+

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.

An example would look like:

-
api.createTransferTransaction(
'1000',
'0xc4db7bcb733e117c0b34ac96354b10d47e84a006b9e7e66a229d174e8ff2a063',
['xcUSDT'],
['1000000'],
{
format: 'call',
xcmVersion: 2,
}
); -
+
api.createTransferTransaction(
'1000',
'0xc4db7bcb733e117c0b34ac96354b10d47e84a006b9e7e66a229d174e8ff2a063',
['xcUSDT'],
['1000000'],
{
format: 'call',
xcmVersion: 2,
},
); +
+

If you would like to run an example to understand the output, run: yarn build:examples && node ./examples/build/examples/paraToSystemTransferMultiAsset.js

-

Foreign Asset Transfers

Sending a foreign asset requires the input assetIds in createTransferTransaction to include the MultiLocation of the asset you would like to send. If a MultiLocation is not passed it will not know if the asset you are sending is a foreign asset. If the MultiLocation passed in has a Parachain id which matches the destChainId input for the transfer, then the output will be a limited teleport, otherwise it will be a limited reserve backed transfer.

+

Sending a foreign asset requires the input assetIds in createTransferTransaction to include the MultiLocation of the asset you would like to send. If a MultiLocation is not passed it will not know if the asset you are sending is a foreign asset. If the MultiLocation passed in has a Parachain id which matches the destChainId input for the transfer, then the output will be a limited teleport, otherwise it will be a limited reserve backed transfer.

An example would look like:

-
api.createTransferTransaction(
'2125', // Note: the Parchain ID matches the MultiLocations 'Parachain' ID, making this a limitedTeleportAssets call
'5EWNeodpcQ6iYibJ3jmWVe85nsok1EDG8Kk3aFg8ZzpfY1qX',
['{"parents":"1","interior":{"X2":[{"Parachain":"2125"},{"GeneralIndex":"0"}]}}'],
['1000000000000'],
{
format: 'call',
xcmVersion: 3,
}
) -
+
api.createTransferTransaction(
'2125', // Note: the Parchain ID matches the MultiLocations 'Parachain' ID, making this a limitedTeleportAssets call
'5EWNeodpcQ6iYibJ3jmWVe85nsok1EDG8Kk3aFg8ZzpfY1qX',
['{"parents":"1","interior":{"X2":[{"Parachain":"2125"},{"GeneralIndex":"0"}]}}'],
['1000000000000'],
{
format: 'call',
xcmVersion: 3,
},
); +
+

If you would like to run an example to understand the output run: yarn build:examples && node ./examples/build/examples/systemToParaTeleportForeignAssets.js

-

Liquid Pool Asset Transfers

Sending a liquidity token (from the poolAssets pallet) in Asset Hub is as simple as setting the option transferLiquidToken to true. That being said, it does have some nuances. A liquidity token cross-chain transfer must be in the direction of a SystemToPara, and the inputted asset must be a valid integer as a string. The api will error if either of these conditions are not met.

+

Sending a liquidity token (from the poolAssets pallet) in Asset Hub is as simple as setting the option transferLiquidToken to true. That being said, it does have some nuances. A liquidity token cross-chain transfer must be in the direction of a SystemToPara, and the inputted asset must be a valid integer as a string. The api will error if either of these conditions are not met.

An example would look like:

-
api.createTransferTransaction(
'2023',
'0xF977814e90dA44bFA03b6295A0616a897441aceC',
['0'],
['100000'],
{
format: 'call',
xcmVersion: 2,
transferLiquidToken: true,
}
); -
+
api.createTransferTransaction('2023', '0xF977814e90dA44bFA03b6295A0616a897441aceC', ['0'], ['100000'], {
format: 'call',
xcmVersion: 2,
transferLiquidToken: true,
}); +
+

If you would like to run an example to understand the output run: yarn build:examples && node ./examples/build/examples/systemToParaLpToken.js

-

Local Transactions

Sending an Asset or Native token locally on a System Parachain is easy. In order to create a transaction, ensure the destChainId is the same as the ID of the System Parachain itself. Note, the only System parachains that are supported are Kusama AssetHub, Polkadot AssetHub, Westend AssetHub, Rococo AssetHub (note on how to use it) and as a side effect the only destChainId that is supported is 1000. In addition to that, ensure the length of the assetId's array and amounts array are 1. As sending assets will only accept one asset at a time. Keep in mind transfer, and transferKeepAlive are the only supported calls.

+

Sending an Asset or Native token locally on a System Parachain is easy. In order to create a transaction, ensure the destChainId is the same as the ID of the System Parachain itself. Note, the only System parachains that are supported are Kusama AssetHub, Polkadot AssetHub, Westend AssetHub, Rococo AssetHub (note on how to use it) and as a side effect the only destChainId that is supported is 1000. In addition to that, ensure the length of the assetId's array and amounts array are 1. As sending assets will only accept one asset at a time. Keep in mind transfer, and transferKeepAlive are the only supported calls.

An example would look like:

-
api.createTransferTransaction(
'1000', // destChainId
'0xf5d5714c084c112843aca74f8c498da06cc5a2d63153b825189baa51043b1f0b', // destAddr
['1984'], // assetIds
['10000000000'], // amounts
{
format: 'call',
keepAlive: true
} // opts
) -
-

The api can also send native tokens as well. Similar to the above you would replace the assetIds with ['DOT']. In addition to that, you may provide an empty array to denote you want to send the chain's native token.

-

The api can also send local transactions for Relay chains. It is the same principal as above, the only difference being that the destChainId would need to be '0'.

-

For more information, refer to the docs in the repository.

+
api.createTransferTransaction(
'1000', // destChainId
'0xf5d5714c084c112843aca74f8c498da06cc5a2d63153b825189baa51043b1f0b', // destAddr
['1984'], // assetIds
['10000000000'], // amounts
{
format: 'call',
keepAlive: true,
}, // opts
); +
+ +

The api can also send native tokens as well. Similar to the above you would replace the assetIds with ['DOT']. In addition to that, you may provide an empty array to denote you want to send the chain's native token.

+

The api can also send local transactions for Relay chains. It is the same principal as above, the only difference being that the destChainId would need to be '0'.

+

For more information, refer to the docs in the repository.

Note: For other parachains, local transfers are currently supported via the balances and tokens pallets. For local parachain transactions, if an asset id is not passed in it will resolve to the balances pallet, and if a asset id is passed in it will resolve to the tokens pallet.

-

Claiming Trapped Assets

The api can be used to construct claimAssets calls in order to retrieve assets trapped locally on chain after a failed XCM.

+

The api can be used to construct claimAssets calls in order to retrieve assets trapped locally on chain after a failed XCM.

An example would look like:

-
api.claimAssets(
[`DOT`], // Asset(s) to claim
['1000000000000'], // Amount of asset(s) to claim
'0xf5d5714c084c112843aca74f8c498da06cc5a2d63153b825189baa51043b1f0b', // Beneficiary
{
xcmVersion: 4,
format: 'payload',
sendersAddr: '5EWNeodpcQ6iYibJ3jmWVe85nsok1EDG8Kk3aFg8ZzpfY1qX'
} // opts
) -
+
api.claimAssets(
[`DOT`], // Asset(s) to claim
['1000000000000'], // Amount of asset(s) to claim
'0xf5d5714c084c112843aca74f8c498da06cc5a2d63153b825189baa51043b1f0b', // Beneficiary
{
xcmVersion: 4,
format: 'payload',
sendersAddr: '5EWNeodpcQ6iYibJ3jmWVe85nsok1EDG8Kk3aFg8ZzpfY1qX',
}, // opts
); +
+

Note: claimAssets works when pallet-xcm is configured as the AssetTrap for the given runtime. This is true for all relay chains and system parachains but may not be for other chains.

-

License

The source code in this repository is distributed under the Apache 2.0 license. See the LICENSE file. This source code comes with absolutely no warranty. Use at your own risk.

-

Zombienet Testing

Zombienet is used to launch a complete network including a relay chain, and two parachains. It will create HRMP channels betweens the launched parachains allowing the testing environment to send XCM messages and transfer assets.

-

Requirements:

Zombienet Binary: You can download the appropriate binary from the zombienet repository here. Ensure that it is in the root of this directory. Note: For macos users if permission is denied to run the binary you can chmod 755 <file_name> to allow permissions.

-

Test Network Binaries: You will need the following binaries depending on whether you want to run a small or medium network:

-
    -
  • polkadot: You can find the releases here. (Needed for small, or medium network)
  • -
  • trappist-collator: This binary is compiled along with polkadot above. You can find it here. (Needed for medium network)
  • -
  • polkadot-parachain (ie: cumulus): You can find the releases here. (Needed for small, or medium network)
  • -
-

NOTES:

-
    -
  • When it comes to picking a version for both cumulus and polkadot ensure they are the same. Cumulus will have an extra 0 at the end though. Ex: v0.9.37 (polkadot) -> v0.9.370 (cumulus)

    -
  • -
  • You can retrieve the binaries via the release, or by compiling yourself. It's recommended to compile it yourself.

    -
  • -
-

Copy each binary that is necessary into the root <root>/bin folder.

-

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 +

You can access the E2E tests and their documentation here.

+

The source code in this repository is distributed under the Apache 2.0 license. See the LICENSE file. This source code comes with absolutely no warranty. Use at your own risk.

+
diff --git a/docs/interfaces/constructApiPromise.ApiInfo.html b/docs/interfaces/constructApiPromise.ApiInfo.html index 369810d3..e29a5f4a 100644 --- a/docs/interfaces/constructApiPromise.ApiInfo.html +++ b/docs/interfaces/constructApiPromise.ApiInfo.html @@ -1,10 +1,10 @@ -ApiInfo | @substrate/asset-transfer-api - v0.4.4

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 +ApiInfo | @substrate/asset-transfer-api - v0.4.5

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.

+
diff --git a/docs/interfaces/types.TransferArgsOpts.html b/docs/interfaces/types.TransferArgsOpts.html index 8bd48368..8d89b204 100644 --- a/docs/interfaces/types.TransferArgsOpts.html +++ b/docs/interfaces/types.TransferArgsOpts.html @@ -1,57 +1,57 @@ -TransferArgsOpts | @substrate/asset-transfer-api - v0.4.4

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;
    xcmPalletOverride?: XcmPallet;
    xcmVersion?: number;
}

Type Parameters

Properties

assetTransferType?: string

The XCM TransferType used to transfer assets. +TransferArgsOpts | @substrate/asset-transfer-api - v0.4.5

The TransferArgsOpts are the options passed into createTransferTransaction.

+
interface TransferArgsOpts<T> {
    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;
    xcmPalletOverride?: XcmPallet;
    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 }])

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

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

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.

-
transferAll?: boolean

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

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

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 +

    Type declaration

    • OptionalproofSize?: 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 +

    • OptionalrefTime?: string

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

      -
xcmFeeAsset?: string

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

-
xcmPalletOverride?: XcmPallet

Optionally sets the pallet to be used for the current tx.

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

+
xcmPalletOverride?: XcmPallet

Optionally sets the pallet to be used for the current tx.

+
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 +
diff --git a/docs/interfaces/types.TxResult.html b/docs/interfaces/types.TxResult.html index c349657a..5de2474d 100644 --- a/docs/interfaces/types.TxResult.html +++ b/docs/interfaces/types.TxResult.html @@ -1,23 +1,23 @@ -TxResult | @substrate/asset-transfer-api - v0.4.4

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

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";
    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.

-
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 +
interface TxResult<T> {
    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

The destination specName of the transaction

+
direction: Direction | "local"

The direction of the cross chain transfer.

+
format: Format | "local"

The format type the tx is ouputted in.

+
forwardedXcmFees?: [VersionedXcm, XcmFee][]

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

+
localXcmFees?: [VersionedXcm, XcmFee]

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

+
method: Methods

The method used in the transaction.

+
origin: string

The origin specName of the transaction

+

The constructed transaction.

+
xcmExecutionResult?: DispatchResultWithPostInfo | XcmDryRunApiError

The result of xcm execution.

+
xcmVersion: null | number

The xcm version that was used to construct the tx.

+
diff --git a/docs/modules.html b/docs/modules.html new file mode 100644 index 00000000..fb0fba62 --- /dev/null +++ b/docs/modules.html @@ -0,0 +1,5 @@ +@substrate/asset-transfer-api - v0.4.5

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

Index

Modules

diff --git a/docs/modules/AssetTransferApi.html b/docs/modules/AssetTransferApi.html index 1f14b0b1..01e33693 100644 --- a/docs/modules/AssetTransferApi.html +++ b/docs/modules/AssetTransferApi.html @@ -1,2 +1,2 @@ -AssetTransferApi | @substrate/asset-transfer-api - v0.4.4
\ No newline at end of file +AssetTransferApi | @substrate/asset-transfer-api - v0.4.5
diff --git a/docs/modules/constructApiPromise.html b/docs/modules/constructApiPromise.html index 9b456cdd..bc944a5e 100644 --- a/docs/modules/constructApiPromise.html +++ b/docs/modules/constructApiPromise.html @@ -1,3 +1,3 @@ -constructApiPromise | @substrate/asset-transfer-api - v0.4.4
\ No newline at end of file +constructApiPromise | @substrate/asset-transfer-api - v0.4.5
diff --git a/docs/modules/errors_BaseError.html b/docs/modules/errors_BaseError.html index 5d241750..2ba1f2d6 100644 --- a/docs/modules/errors_BaseError.html +++ b/docs/modules/errors_BaseError.html @@ -1,2 +1,2 @@ -errors/BaseError | @substrate/asset-transfer-api - v0.4.4
\ No newline at end of file +errors/BaseError | @substrate/asset-transfer-api - v0.4.5
diff --git a/docs/modules/types.html b/docs/modules/types.html index e0c6c641..26b24800 100644 --- a/docs/modules/types.html +++ b/docs/modules/types.html @@ -1,11 +1,11 @@ -types | @substrate/asset-transfer-api - v0.4.4
\ No newline at end of file +types | @substrate/asset-transfer-api - v0.4.5
diff --git a/docs/types/types.AssetTransferApiOpts.html b/docs/types/types.AssetTransferApiOpts.html index fb581b0f..a3eef0b4 100644 --- a/docs/types/types.AssetTransferApiOpts.html +++ b/docs/types/types.AssetTransferApiOpts.html @@ -1,7 +1,7 @@ -AssetTransferApiOpts | @substrate/asset-transfer-api - v0.4.4
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, +AssetTransferApiOpts | @substrate/asset-transfer-api - v0.4.5

    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

    • OptionalchainName?: string

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

      +
    • OptionalinjectedRegistry?: RequireAtLeastOne<ChainInfoRegistry<T>>

      Option to inject chain information into the registry.

      +
    • OptionaloverrideRegistry?: RequireAtLeastOne<ChainInfoRegistry<InjectedChainInfoKeys>>

      Option to override the registry with the supplied chain information.

      +
    • OptionalregistryType?: 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 +
diff --git a/docs/types/types.ConstructedFormat.html b/docs/types/types.ConstructedFormat.html index 480375b7..f860cabe 100644 --- a/docs/types/types.ConstructedFormat.html +++ b/docs/types/types.ConstructedFormat.html @@ -1,2 +1,2 @@ -ConstructedFormat | @substrate/asset-transfer-api - v0.4.4
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.5
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
diff --git a/docs/types/types.Format.html b/docs/types/types.Format.html index 40f87b0f..26f92776 100644 --- a/docs/types/types.Format.html +++ b/docs/types/types.Format.html @@ -1,7 +1,7 @@ -Format | @substrate/asset-transfer-api - v0.4.4
Format: "payload" | "call" | "submittable"

AssetTransferApi supports three formats to be returned:

+Format | @substrate/asset-transfer-api - v0.4.5
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 +
diff --git a/docs/types/types.LocalTransferTypes.html b/docs/types/types.LocalTransferTypes.html index 96894c21..f17a1d80 100644 --- a/docs/types/types.LocalTransferTypes.html +++ b/docs/types/types.LocalTransferTypes.html @@ -1,2 +1,2 @@ -LocalTransferTypes | @substrate/asset-transfer-api - v0.4.4
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 +LocalTransferTypes | @substrate/asset-transfer-api - v0.4.5
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.

+
diff --git a/docs/types/types.Methods.html b/docs/types/types.Methods.html index b8d5fb9f..c94fdcf8 100644 --- a/docs/types/types.Methods.html +++ b/docs/types/types.Methods.html @@ -1,2 +1,2 @@ -Methods | @substrate/asset-transfer-api - v0.4.4
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.5
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.

+
diff --git a/docs/types/types.RegistryTypes.html b/docs/types/types.RegistryTypes.html index 38cf0c22..d2ddf77d 100644 --- a/docs/types/types.RegistryTypes.html +++ b/docs/types/types.RegistryTypes.html @@ -1,4 +1,4 @@ -RegistryTypes | @substrate/asset-transfer-api - v0.4.4
RegistryTypes: "CDN" | "NPM"

Types that the registry can be initialized as.

+RegistryTypes | @substrate/asset-transfer-api - v0.4.5
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 +
diff --git a/docs/types/types.XcmDirection.html b/docs/types/types.XcmDirection.html index c98dd499..bbc765f6 100644 --- a/docs/types/types.XcmDirection.html +++ b/docs/types/types.XcmDirection.html @@ -1,2 +1,2 @@ -XcmDirection | @substrate/asset-transfer-api - v0.4.4
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.5
XcmDirection: Exclude<Direction, "Local">

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

+
diff --git a/package.json b/package.json index ebd7ce2b..fbdc0425 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@substrate/asset-transfer-api", - "version": "0.4.4", + "version": "0.4.5", "description": "", "main": "lib/index.js", "scripts": {