@talismn/balances 0.0.0-pr2116-20250725042328 → 0.0.0-pr2120-20250731072022

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,10 +8,6 @@ type FormattedAmount<GenericAmount extends AmountWithLabel<TLabel>, TLabel exten
8
8
  export declare function excludeFromTransferableAmount(locks: Amount | FormattedAmount<LockedAmount<string>, string> | Array<FormattedAmount<LockedAmount<string>, string>>): bigint;
9
9
  export declare function excludeFromFeePayableLocks(locks: Amount | LockedAmount<string> | Array<LockedAmount<string>>): Array<LockedAmount<string>>;
10
10
  export declare function includeInTotalExtraAmount(extra?: FormattedAmount<ExtraAmount<string>, string> | Array<FormattedAmount<ExtraAmount<string>, string>>): bigint;
11
- /**
12
- * Have the importing library define its Token and BalanceJson enums (as a sum type of all plugins) and pass them into some
13
- * internal global typescript context, which is then picked up on by this module.
14
- */
15
11
  /** A utility type used to extract the underlying `BalanceType` of a specific source from a generalised `BalanceJson` */
16
12
  export type NarrowBalanceType<S extends IBalance, P> = S extends {
17
13
  source: P;
@@ -68,8 +68,4 @@ export type ExtraAmount<TLabel extends string> = BaseAmountWithLabel<TLabel> & {
68
68
  /** If set to true, this extra amount will be included in the calculation of the total amount of this balance. */
69
69
  includeInTotal?: boolean;
70
70
  };
71
- /** Used by plugins to help define their custom `BalanceType` */
72
- export type NewBalanceType<TModuleType extends string, TBalanceValueType extends "simple" | "complex"> = IBalanceBase & (TBalanceValueType extends "simple" ? IBalanceSimpleValues : IBalanceComplexValues) & {
73
- source: TModuleType;
74
- };
75
71
  export {};
@@ -1852,11 +1852,6 @@ function includeInTotalExtraAmount(extra) {
1852
1852
  return extra.filter(extra => extra.includeInTotal).map(extra => extra.amount.planck).reduce((a, b) => a + b, 0n);
1853
1853
  }
1854
1854
 
1855
- /**
1856
- * Have the importing library define its Token and BalanceJson enums (as a sum type of all plugins) and pass them into some
1857
- * internal global typescript context, which is then picked up on by this module.
1858
- */
1859
-
1860
1855
  /** A utility type used to extract the underlying `BalanceType` of a specific source from a generalised `BalanceJson` */
1861
1856
 
1862
1857
  /** TODO: Remove this in favour of a frontend-friendly `ChaindataProvider` */
@@ -2593,8 +2588,6 @@ const getValueId = amount => {
2593
2588
 
2594
2589
  /** A labelled extra amount of a balance */
2595
2590
 
2596
- /** Used by plugins to help define their custom `BalanceType` */
2597
-
2598
2591
  /** For fast db access, you can calculate the primary key for a miniMetadata using this method */
2599
2592
  const deriveMiniMetadataId = ({
2600
2593
  source,
@@ -1852,11 +1852,6 @@ function includeInTotalExtraAmount(extra) {
1852
1852
  return extra.filter(extra => extra.includeInTotal).map(extra => extra.amount.planck).reduce((a, b) => a + b, 0n);
1853
1853
  }
1854
1854
 
1855
- /**
1856
- * Have the importing library define its Token and BalanceJson enums (as a sum type of all plugins) and pass them into some
1857
- * internal global typescript context, which is then picked up on by this module.
1858
- */
1859
-
1860
1855
  /** A utility type used to extract the underlying `BalanceType` of a specific source from a generalised `BalanceJson` */
1861
1856
 
1862
1857
  /** TODO: Remove this in favour of a frontend-friendly `ChaindataProvider` */
@@ -2593,8 +2588,6 @@ const getValueId = amount => {
2593
2588
 
2594
2589
  /** A labelled extra amount of a balance */
2595
2590
 
2596
- /** Used by plugins to help define their custom `BalanceType` */
2597
-
2598
2591
  /** For fast db access, you can calculate the primary key for a miniMetadata using this method */
2599
2592
  const deriveMiniMetadataId = ({
2600
2593
  source,
@@ -1843,11 +1843,6 @@ function includeInTotalExtraAmount(extra) {
1843
1843
  return extra.filter(extra => extra.includeInTotal).map(extra => extra.amount.planck).reduce((a, b) => a + b, 0n);
1844
1844
  }
1845
1845
 
1846
- /**
1847
- * Have the importing library define its Token and BalanceJson enums (as a sum type of all plugins) and pass them into some
1848
- * internal global typescript context, which is then picked up on by this module.
1849
- */
1850
-
1851
1846
  /** A utility type used to extract the underlying `BalanceType` of a specific source from a generalised `BalanceJson` */
1852
1847
 
1853
1848
  /** TODO: Remove this in favour of a frontend-friendly `ChaindataProvider` */
@@ -2584,8 +2579,6 @@ const getValueId = amount => {
2584
2579
 
2585
2580
  /** A labelled extra amount of a balance */
2586
2581
 
2587
- /** Used by plugins to help define their custom `BalanceType` */
2588
-
2589
2582
  /** For fast db access, you can calculate the primary key for a miniMetadata using this method */
2590
2583
  const deriveMiniMetadataId = ({
2591
2584
  source,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@talismn/balances",
3
- "version": "0.0.0-pr2116-20250725042328",
3
+ "version": "0.0.0-pr2120-20250731072022",
4
4
  "author": "Talisman",
5
5
  "homepage": "https://talisman.xyz",
6
6
  "license": "GPL-3.0-or-later",
@@ -34,13 +34,13 @@
34
34
  "scale-ts": "^1.6.1",
35
35
  "viem": "^2.27.3",
36
36
  "zod": "^3.25.62",
37
- "@talismn/chain-connector": "1.0.0",
38
- "@talismn/chain-connector-evm": "1.0.0",
37
+ "@talismn/chain-connector-evm": "0.0.0-pr2120-20250731072022",
38
+ "@talismn/chain-connector": "0.0.0-pr2120-20250731072022",
39
+ "@talismn/sapi": "0.0.8",
39
40
  "@talismn/scale": "0.2.0",
40
- "@talismn/chaindata-provider": "1.0.0",
41
- "@talismn/token-rates": "3.0.0",
42
- "@talismn/sapi": "0.0.0-pr2116-20250725042328",
43
- "@talismn/util": "0.5.0"
41
+ "@talismn/chaindata-provider": "0.0.0-pr2120-20250731072022",
42
+ "@talismn/token-rates": "0.0.0-pr2120-20250731072022",
43
+ "@talismn/util": "0.0.0-pr2120-20250731072022"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@polkadot/api-contract": "16.1.2",