@talismn/balances 0.0.0-pr2091-20250805073819 → 0.0.0-pr2091-20250813033555

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 {};
@@ -2271,11 +2271,6 @@ function includeInTotalExtraAmount(extra) {
2271
2271
  return extra.filter(extra => extra.includeInTotal).map(extra => extra.amount.planck).reduce((a, b) => a + b, 0n);
2272
2272
  }
2273
2273
 
2274
- /**
2275
- * Have the importing library define its Token and BalanceJson enums (as a sum type of all plugins) and pass them into some
2276
- * internal global typescript context, which is then picked up on by this module.
2277
- */
2278
-
2279
2274
  /** A utility type used to extract the underlying `BalanceType` of a specific source from a generalised `BalanceJson` */
2280
2275
 
2281
2276
  /** TODO: Remove this in favour of a frontend-friendly `ChaindataProvider` */
@@ -3012,8 +3007,6 @@ const getValueId = amount => {
3012
3007
 
3013
3008
  /** A labelled extra amount of a balance */
3014
3009
 
3015
- /** Used by plugins to help define their custom `BalanceType` */
3016
-
3017
3010
  /** For fast db access, you can calculate the primary key for a miniMetadata using this method */
3018
3011
  const deriveMiniMetadataId = ({
3019
3012
  source,
@@ -2271,11 +2271,6 @@ function includeInTotalExtraAmount(extra) {
2271
2271
  return extra.filter(extra => extra.includeInTotal).map(extra => extra.amount.planck).reduce((a, b) => a + b, 0n);
2272
2272
  }
2273
2273
 
2274
- /**
2275
- * Have the importing library define its Token and BalanceJson enums (as a sum type of all plugins) and pass them into some
2276
- * internal global typescript context, which is then picked up on by this module.
2277
- */
2278
-
2279
2274
  /** A utility type used to extract the underlying `BalanceType` of a specific source from a generalised `BalanceJson` */
2280
2275
 
2281
2276
  /** TODO: Remove this in favour of a frontend-friendly `ChaindataProvider` */
@@ -3012,8 +3007,6 @@ const getValueId = amount => {
3012
3007
 
3013
3008
  /** A labelled extra amount of a balance */
3014
3009
 
3015
- /** Used by plugins to help define their custom `BalanceType` */
3016
-
3017
3010
  /** For fast db access, you can calculate the primary key for a miniMetadata using this method */
3018
3011
  const deriveMiniMetadataId = ({
3019
3012
  source,
@@ -2262,11 +2262,6 @@ function includeInTotalExtraAmount(extra) {
2262
2262
  return extra.filter(extra => extra.includeInTotal).map(extra => extra.amount.planck).reduce((a, b) => a + b, 0n);
2263
2263
  }
2264
2264
 
2265
- /**
2266
- * Have the importing library define its Token and BalanceJson enums (as a sum type of all plugins) and pass them into some
2267
- * internal global typescript context, which is then picked up on by this module.
2268
- */
2269
-
2270
2265
  /** A utility type used to extract the underlying `BalanceType` of a specific source from a generalised `BalanceJson` */
2271
2266
 
2272
2267
  /** TODO: Remove this in favour of a frontend-friendly `ChaindataProvider` */
@@ -3003,8 +2998,6 @@ const getValueId = amount => {
3003
2998
 
3004
2999
  /** A labelled extra amount of a balance */
3005
3000
 
3006
- /** Used by plugins to help define their custom `BalanceType` */
3007
-
3008
3001
  /** For fast db access, you can calculate the primary key for a miniMetadata using this method */
3009
3002
  const deriveMiniMetadataId = ({
3010
3003
  source,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@talismn/balances",
3
- "version": "0.0.0-pr2091-20250805073819",
3
+ "version": "0.0.0-pr2091-20250813033555",
4
4
  "author": "Talisman",
5
5
  "homepage": "https://talisman.xyz",
6
6
  "license": "GPL-3.0-or-later",
@@ -38,14 +38,14 @@
38
38
  "scale-ts": "^1.6.1",
39
39
  "viem": "^2.27.3",
40
40
  "zod": "^3.25.76",
41
- "@talismn/chain-connectors": "0.0.0-pr2091-20250805073819",
42
- "@talismn/chaindata-provider": "0.0.0-pr2091-20250805073819",
43
- "@talismn/crypto": "0.0.0-pr2091-20250805073819",
44
- "@talismn/sapi": "0.0.0-pr2091-20250805073819",
45
- "@talismn/token-rates": "0.0.0-pr2091-20250805073819",
41
+ "@talismn/chain-connectors": "0.0.0-pr2091-20250813033555",
42
+ "@talismn/chaindata-provider": "0.0.0-pr2091-20250813033555",
43
+ "@talismn/sapi": "0.0.0-pr2091-20250813033555",
44
+ "@talismn/crypto": "0.0.0-pr2091-20250813033555",
46
45
  "@talismn/scale": "0.2.0",
47
- "@talismn/util": "0.0.0-pr2091-20250805073819",
48
- "@talismn/solana": "0.0.0-pr2091-20250805073819"
46
+ "@talismn/solana": "0.0.0-pr2091-20250813033555",
47
+ "@talismn/token-rates": "0.0.0-pr2091-20250813033555",
48
+ "@talismn/util": "0.0.0-pr2091-20250813033555"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@polkadot/api-contract": "16.1.2",