@talismn/balances 3.0.2 → 3.0.3
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.
- package/dist/index.d.mts +184 -184
- package/dist/index.d.mts.map +1 -1
- package/dist/index.d.ts +179 -179
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +45 -27
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +42 -24
- package/dist/index.mjs.map +1 -1
- package/package.json +15 -15
package/dist/index.d.ts
CHANGED
|
@@ -10,10 +10,10 @@ import { Mint, TransferFee } from "@solana-program/token-2022";
|
|
|
10
10
|
import { Enum, GetEnum, ResultPayload, SS58String, SizedHex } from "@polkadot-api/substrate-bindings";
|
|
11
11
|
import "@polkadot-api/utils";
|
|
12
12
|
//#region src/types/addresses.d.ts
|
|
13
|
-
type Address = string;
|
|
13
|
+
export type Address = string;
|
|
14
14
|
//#endregion
|
|
15
15
|
//#region src/types/balancetypes.d.ts
|
|
16
|
-
type BalanceStatus = "live" | "cache" | "stale";
|
|
16
|
+
export type BalanceStatus = "live" | "cache" | "stale";
|
|
17
17
|
type IBalanceBase = {
|
|
18
18
|
/** The module that this balance was retrieved by */
|
|
19
19
|
source: string;
|
|
@@ -37,13 +37,13 @@ type IBalanceComplexValues = {
|
|
|
37
37
|
value?: undefined;
|
|
38
38
|
};
|
|
39
39
|
/** `IBalance` is a common interface which all balance types must implement. */
|
|
40
|
-
type IBalance = IBalanceBase & (IBalanceSimpleValues | IBalanceComplexValues);
|
|
41
|
-
type BalanceJson = IBalance;
|
|
40
|
+
export type IBalance = IBalanceBase & (IBalanceSimpleValues | IBalanceComplexValues);
|
|
41
|
+
export type BalanceJson = IBalance;
|
|
42
42
|
/** A collection of `BalanceJson` objects */
|
|
43
|
-
type BalanceJsonList = Record<string, BalanceJson>;
|
|
43
|
+
export type BalanceJsonList = Record<string, BalanceJson>;
|
|
44
44
|
/** An unlabelled amount of a balance */
|
|
45
|
-
type Amount = string;
|
|
46
|
-
type BalanceStatusTypes = "free" | "reserved" | "locked" | "extra" | "nompool";
|
|
45
|
+
export type Amount = string;
|
|
46
|
+
export type BalanceStatusTypes = "free" | "reserved" | "locked" | "extra" | "nompool";
|
|
47
47
|
/** A labelled amount of a balance */
|
|
48
48
|
type BaseAmountWithLabel<TLabel extends string> = {
|
|
49
49
|
type: BalanceStatusTypes;
|
|
@@ -57,9 +57,9 @@ type BaseAmountWithLabel<TLabel extends string> = {
|
|
|
57
57
|
amount: Amount;
|
|
58
58
|
meta?: unknown;
|
|
59
59
|
};
|
|
60
|
-
declare const getValueId: (amount: AmountWithLabel<string>) => string;
|
|
60
|
+
export declare const getValueId: (amount: AmountWithLabel<string>) => string;
|
|
61
61
|
/** A labelled locked amount of a balance */
|
|
62
|
-
type LockedAmount<TLabel extends string> = BaseAmountWithLabel<TLabel> & {
|
|
62
|
+
export type LockedAmount<TLabel extends string> = BaseAmountWithLabel<TLabel> & {
|
|
63
63
|
/**
|
|
64
64
|
* By default, the largest locked amount is subtrated from the transferable amount of this balance.
|
|
65
65
|
* If this property is set to true, this particular lock will be skipped when making this calculation.
|
|
@@ -74,9 +74,9 @@ type LockedAmount<TLabel extends string> = BaseAmountWithLabel<TLabel> & {
|
|
|
74
74
|
*/
|
|
75
75
|
excludeFromFeePayable?: boolean;
|
|
76
76
|
};
|
|
77
|
-
type AmountWithLabel<TLabel extends string> = BaseAmountWithLabel<TLabel> | LockedAmount<TLabel> | ExtraAmount<TLabel>;
|
|
77
|
+
export type AmountWithLabel<TLabel extends string> = BaseAmountWithLabel<TLabel> | LockedAmount<TLabel> | ExtraAmount<TLabel>;
|
|
78
78
|
/** A labelled extra amount of a balance */
|
|
79
|
-
type ExtraAmount<TLabel extends string> = BaseAmountWithLabel<TLabel> & {
|
|
79
|
+
export type ExtraAmount<TLabel extends string> = BaseAmountWithLabel<TLabel> & {
|
|
80
80
|
type: "extra";
|
|
81
81
|
/** If set to true, this extra amount will be included in the calculation of the total amount of this balance. */
|
|
82
82
|
includeInTotal?: boolean;
|
|
@@ -86,25 +86,25 @@ type ExtraAmount<TLabel extends string> = BaseAmountWithLabel<TLabel> & {
|
|
|
86
86
|
type FormattedAmount<GenericAmount extends AmountWithLabel<TLabel>, TLabel extends string> = Omit<GenericAmount, "amount"> & {
|
|
87
87
|
amount: BalanceFormatter;
|
|
88
88
|
};
|
|
89
|
-
declare function excludeFromTransferableAmount(locks: Amount | FormattedAmount<LockedAmount<string>, string> | Array<FormattedAmount<LockedAmount<string>, string>>): bigint;
|
|
90
|
-
declare function excludeFromFeePayableLocks(locks: Amount | LockedAmount<string> | Array<LockedAmount<string>>): Array<LockedAmount<string>>;
|
|
91
|
-
declare function includeInTotalExtraAmount(extra?: FormattedAmount<ExtraAmount<string>, string> | Array<FormattedAmount<ExtraAmount<string>, string>>): bigint;
|
|
89
|
+
export declare function excludeFromTransferableAmount(locks: Amount | FormattedAmount<LockedAmount<string>, string> | Array<FormattedAmount<LockedAmount<string>, string>>): bigint;
|
|
90
|
+
export declare function excludeFromFeePayableLocks(locks: Amount | LockedAmount<string> | Array<LockedAmount<string>>): Array<LockedAmount<string>>;
|
|
91
|
+
export declare function includeInTotalExtraAmount(extra?: FormattedAmount<ExtraAmount<string>, string> | Array<FormattedAmount<ExtraAmount<string>, string>>): bigint;
|
|
92
92
|
/** A utility type used to extract the underlying `BalanceType` of a specific source from a generalised `BalanceJson` */
|
|
93
|
-
type NarrowBalanceType<S extends IBalance, P> = S extends {
|
|
93
|
+
export type NarrowBalanceType<S extends IBalance, P> = S extends {
|
|
94
94
|
source: P;
|
|
95
95
|
} ? S : never;
|
|
96
|
-
type BalanceSource = BalanceJson["source"];
|
|
96
|
+
export type BalanceSource = BalanceJson["source"];
|
|
97
97
|
/** TODO: Remove this in favour of a frontend-friendly `ChaindataProvider` */
|
|
98
|
-
type HydrateDb = Partial<{
|
|
98
|
+
export type HydrateDb = Partial<{
|
|
99
99
|
networks: NetworkList;
|
|
100
100
|
tokens: TokenList;
|
|
101
101
|
tokenRates: TokenRatesList;
|
|
102
102
|
}>;
|
|
103
|
-
type BalanceSearchQuery = Partial<NonFunctionProperties<Balance>> | ((balance: Balance) => boolean);
|
|
103
|
+
export type BalanceSearchQuery = Partial<NonFunctionProperties<Balance>> | ((balance: Balance) => boolean);
|
|
104
104
|
/**
|
|
105
105
|
* A collection of balances.
|
|
106
106
|
*/
|
|
107
|
-
declare class Balances {
|
|
107
|
+
export declare class Balances {
|
|
108
108
|
#private;
|
|
109
109
|
constructor(balances: Balances | BalanceJsonList | Balance[] | IBalance[] | BalanceJson[] | Balance, hydrate?: HydrateDb);
|
|
110
110
|
/**
|
|
@@ -190,11 +190,11 @@ declare class Balances {
|
|
|
190
190
|
*/
|
|
191
191
|
get sum(): SumBalancesFormatter;
|
|
192
192
|
}
|
|
193
|
-
declare const getBalanceId: (balance: Pick<IBalance, "address" | "tokenId">) => string;
|
|
193
|
+
export declare const getBalanceId: (balance: Pick<IBalance, "address" | "tokenId">) => string;
|
|
194
194
|
/**
|
|
195
195
|
* An individual balance.
|
|
196
196
|
*/
|
|
197
|
-
declare class Balance {
|
|
197
|
+
export declare class Balance {
|
|
198
198
|
#private;
|
|
199
199
|
constructor(storage: BalanceJson | IBalance, hydrate?: HydrateDb);
|
|
200
200
|
toJSON: () => BalanceJson;
|
|
@@ -338,9 +338,12 @@ declare class Balance {
|
|
|
338
338
|
coingeckoId?: string | undefined;
|
|
339
339
|
noDiscovery?: boolean | undefined;
|
|
340
340
|
mirrorOf?: string | undefined;
|
|
341
|
-
type: "
|
|
342
|
-
platform: "
|
|
343
|
-
|
|
341
|
+
type: "substrate-hydration";
|
|
342
|
+
platform: "polkadot";
|
|
343
|
+
onChainId: number;
|
|
344
|
+
assetType: "Erc20" | "External" | "Token";
|
|
345
|
+
isSufficient: boolean;
|
|
346
|
+
existentialDeposit: string;
|
|
344
347
|
} | {
|
|
345
348
|
id: string;
|
|
346
349
|
networkId: string;
|
|
@@ -352,8 +355,9 @@ declare class Balance {
|
|
|
352
355
|
coingeckoId?: string | undefined;
|
|
353
356
|
noDiscovery?: boolean | undefined;
|
|
354
357
|
mirrorOf?: string | undefined;
|
|
355
|
-
type: "
|
|
356
|
-
platform: "
|
|
358
|
+
type: "substrate-native";
|
|
359
|
+
platform: "polkadot";
|
|
360
|
+
existentialDeposit: string;
|
|
357
361
|
} | {
|
|
358
362
|
id: string;
|
|
359
363
|
networkId: string;
|
|
@@ -388,12 +392,9 @@ declare class Balance {
|
|
|
388
392
|
coingeckoId?: string | undefined;
|
|
389
393
|
noDiscovery?: boolean | undefined;
|
|
390
394
|
mirrorOf?: string | undefined;
|
|
391
|
-
type: "substrate-
|
|
395
|
+
type: "substrate-psp22";
|
|
392
396
|
platform: "polkadot";
|
|
393
|
-
|
|
394
|
-
isFrozen?: boolean | undefined;
|
|
395
|
-
isSufficient: boolean;
|
|
396
|
-
existentialDeposit: string;
|
|
397
|
+
contractAddress: string;
|
|
397
398
|
} | {
|
|
398
399
|
id: string;
|
|
399
400
|
networkId: string;
|
|
@@ -405,12 +406,12 @@ declare class Balance {
|
|
|
405
406
|
coingeckoId?: string | undefined;
|
|
406
407
|
noDiscovery?: boolean | undefined;
|
|
407
408
|
mirrorOf?: string | undefined;
|
|
408
|
-
type: "substrate-
|
|
409
|
+
type: "substrate-assets";
|
|
409
410
|
platform: "polkadot";
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
411
|
+
assetId: string;
|
|
412
|
+
isFrozen?: boolean | undefined;
|
|
413
|
+
isSufficient: boolean;
|
|
414
|
+
existentialDeposit: string;
|
|
414
415
|
} | {
|
|
415
416
|
id: string;
|
|
416
417
|
networkId: string;
|
|
@@ -422,12 +423,8 @@ declare class Balance {
|
|
|
422
423
|
coingeckoId?: string | undefined;
|
|
423
424
|
noDiscovery?: boolean | undefined;
|
|
424
425
|
mirrorOf?: string | undefined;
|
|
425
|
-
type: "
|
|
426
|
-
platform: "
|
|
427
|
-
onChainId: string;
|
|
428
|
-
isFrozen?: boolean | undefined;
|
|
429
|
-
isSufficient: boolean;
|
|
430
|
-
existentialDeposit: string;
|
|
426
|
+
type: "evm-native";
|
|
427
|
+
platform: "ethereum";
|
|
431
428
|
} | {
|
|
432
429
|
id: string;
|
|
433
430
|
networkId: string;
|
|
@@ -439,9 +436,8 @@ declare class Balance {
|
|
|
439
436
|
coingeckoId?: string | undefined;
|
|
440
437
|
noDiscovery?: boolean | undefined;
|
|
441
438
|
mirrorOf?: string | undefined;
|
|
442
|
-
type: "
|
|
443
|
-
platform: "
|
|
444
|
-
existentialDeposit: string;
|
|
439
|
+
type: "sol-native";
|
|
440
|
+
platform: "solana";
|
|
445
441
|
} | {
|
|
446
442
|
id: string;
|
|
447
443
|
networkId: string;
|
|
@@ -453,9 +449,12 @@ declare class Balance {
|
|
|
453
449
|
coingeckoId?: string | undefined;
|
|
454
450
|
noDiscovery?: boolean | undefined;
|
|
455
451
|
mirrorOf?: string | undefined;
|
|
456
|
-
type: "substrate-
|
|
452
|
+
type: "substrate-foreignassets";
|
|
457
453
|
platform: "polkadot";
|
|
458
|
-
|
|
454
|
+
onChainId: string;
|
|
455
|
+
isFrozen?: boolean | undefined;
|
|
456
|
+
isSufficient: boolean;
|
|
457
|
+
existentialDeposit: string;
|
|
459
458
|
} | {
|
|
460
459
|
id: string;
|
|
461
460
|
networkId: string;
|
|
@@ -467,10 +466,9 @@ declare class Balance {
|
|
|
467
466
|
coingeckoId?: string | undefined;
|
|
468
467
|
noDiscovery?: boolean | undefined;
|
|
469
468
|
mirrorOf?: string | undefined;
|
|
470
|
-
type: "
|
|
471
|
-
platform: "
|
|
472
|
-
|
|
473
|
-
existentialDeposit: string;
|
|
469
|
+
type: "sol-spl";
|
|
470
|
+
platform: "solana";
|
|
471
|
+
mintAddress: string;
|
|
474
472
|
} | {
|
|
475
473
|
id: string;
|
|
476
474
|
networkId: string;
|
|
@@ -482,11 +480,9 @@ declare class Balance {
|
|
|
482
480
|
coingeckoId?: string | undefined;
|
|
483
481
|
noDiscovery?: boolean | undefined;
|
|
484
482
|
mirrorOf?: string | undefined;
|
|
485
|
-
type: "substrate-
|
|
483
|
+
type: "substrate-tokens";
|
|
486
484
|
platform: "polkadot";
|
|
487
|
-
onChainId: number;
|
|
488
|
-
assetType: "Erc20" | "External" | "Token";
|
|
489
|
-
isSufficient: boolean;
|
|
485
|
+
onChainId: string | number;
|
|
490
486
|
existentialDeposit: string;
|
|
491
487
|
} | {
|
|
492
488
|
id: string;
|
|
@@ -499,8 +495,9 @@ declare class Balance {
|
|
|
499
495
|
coingeckoId?: string | undefined;
|
|
500
496
|
noDiscovery?: boolean | undefined;
|
|
501
497
|
mirrorOf?: string | undefined;
|
|
502
|
-
type: "
|
|
503
|
-
platform: "
|
|
498
|
+
type: "evm-erc20";
|
|
499
|
+
platform: "ethereum";
|
|
500
|
+
contractAddress: `0x${string}`;
|
|
504
501
|
} | {
|
|
505
502
|
id: string;
|
|
506
503
|
networkId: string;
|
|
@@ -512,9 +509,10 @@ declare class Balance {
|
|
|
512
509
|
coingeckoId?: string | undefined;
|
|
513
510
|
noDiscovery?: boolean | undefined;
|
|
514
511
|
mirrorOf?: string | undefined;
|
|
515
|
-
type: "sol-
|
|
512
|
+
type: "sol-token2022";
|
|
516
513
|
platform: "solana";
|
|
517
514
|
mintAddress: string;
|
|
515
|
+
isTransferable?: boolean | undefined;
|
|
518
516
|
} | {
|
|
519
517
|
id: string;
|
|
520
518
|
networkId: string;
|
|
@@ -526,10 +524,12 @@ declare class Balance {
|
|
|
526
524
|
coingeckoId?: string | undefined;
|
|
527
525
|
noDiscovery?: boolean | undefined;
|
|
528
526
|
mirrorOf?: string | undefined;
|
|
529
|
-
type: "
|
|
530
|
-
platform: "
|
|
531
|
-
|
|
532
|
-
|
|
527
|
+
type: "substrate-dtao";
|
|
528
|
+
platform: "polkadot";
|
|
529
|
+
netuid: number;
|
|
530
|
+
subnetName?: string | undefined;
|
|
531
|
+
hotkey?: string | undefined;
|
|
532
|
+
isTransferable: boolean;
|
|
533
533
|
} | null;
|
|
534
534
|
get decimals(): number | null;
|
|
535
535
|
get rates(): TokenRates | null;
|
|
@@ -582,21 +582,21 @@ declare class Balance {
|
|
|
582
582
|
get feePayable(): BalanceFormatter;
|
|
583
583
|
}
|
|
584
584
|
/** raw "locked" values, straight from the IBalance JSON (see getRawTotalPlanck) */
|
|
585
|
-
declare const getRawLocks: (balance: IBalance) => AmountWithLabel<string>[];
|
|
585
|
+
export declare const getRawLocks: (balance: IBalance) => AmountWithLabel<string>[];
|
|
586
586
|
/**
|
|
587
587
|
* Computes `new Balance(b).total.planck` without constructing a Balance (which allocates
|
|
588
588
|
* several BalanceFormatters per access) — used for high-frequency zero-balance filtering.
|
|
589
589
|
* MUST mirror Balance.total exactly, including the DelegatedStaking-hold/nompool rule
|
|
590
590
|
* (guarded by a parity test in balance-raw-helpers.test.ts).
|
|
591
591
|
*/
|
|
592
|
-
declare const getRawTotalPlanck: (balance: IBalance) => bigint;
|
|
593
|
-
declare class BalanceValueGetter {
|
|
592
|
+
export declare const getRawTotalPlanck: (balance: IBalance) => bigint;
|
|
593
|
+
export declare class BalanceValueGetter {
|
|
594
594
|
#private;
|
|
595
595
|
constructor(storage: BalanceJson);
|
|
596
596
|
get(valueType: BalanceStatusTypes): AmountWithLabel<string>[];
|
|
597
597
|
add(valueType: BalanceStatusTypes, amount: Omit<AmountWithLabel<string>, "type">): void;
|
|
598
598
|
}
|
|
599
|
-
declare class BalanceFormatter {
|
|
599
|
+
export declare class BalanceFormatter {
|
|
600
600
|
#private;
|
|
601
601
|
constructor(planck: string | bigint | undefined, decimals?: number | undefined, fiatRatios?: TokenRates | null);
|
|
602
602
|
toJSON: () => string;
|
|
@@ -604,7 +604,7 @@ declare class BalanceFormatter {
|
|
|
604
604
|
get tokens(): string;
|
|
605
605
|
fiat(currency: TokenRateCurrency): number | null;
|
|
606
606
|
}
|
|
607
|
-
declare class PlanckSumBalancesFormatter {
|
|
607
|
+
export declare class PlanckSumBalancesFormatter {
|
|
608
608
|
#private;
|
|
609
609
|
constructor(balances: Balances);
|
|
610
610
|
/**
|
|
@@ -626,7 +626,7 @@ declare class PlanckSumBalancesFormatter {
|
|
|
626
626
|
/** The feePayable balance of these tokens. Is generally the free amount - the feeFrozen amount. */
|
|
627
627
|
get feePayable(): bigint;
|
|
628
628
|
}
|
|
629
|
-
declare class FiatSumBalancesFormatter {
|
|
629
|
+
export declare class FiatSumBalancesFormatter {
|
|
630
630
|
#private;
|
|
631
631
|
constructor(balances: Balances, currency: TokenRateCurrency);
|
|
632
632
|
/**
|
|
@@ -648,14 +648,14 @@ declare class FiatSumBalancesFormatter {
|
|
|
648
648
|
/** The feePayable balance of these tokens. Is generally the free amount - the feeFrozen amount. */
|
|
649
649
|
get feePayable(): number;
|
|
650
650
|
}
|
|
651
|
-
declare class SumBalancesFormatter {
|
|
651
|
+
export declare class SumBalancesFormatter {
|
|
652
652
|
#private;
|
|
653
653
|
constructor(balances: Balances);
|
|
654
654
|
get planck(): PlanckSumBalancesFormatter;
|
|
655
655
|
fiat(currency: TokenRateCurrency): FiatSumBalancesFormatter;
|
|
656
656
|
change24h(currency: TokenRateCurrency): Change24hCurrencyFormatter;
|
|
657
657
|
}
|
|
658
|
-
declare class Change24hCurrencyFormatter {
|
|
658
|
+
export declare class Change24hCurrencyFormatter {
|
|
659
659
|
#private;
|
|
660
660
|
constructor(balances: Balances, currency: TokenRateCurrency);
|
|
661
661
|
get total(): {
|
|
@@ -691,18 +691,18 @@ declare class Change24hCurrencyFormatter {
|
|
|
691
691
|
ratio: number;
|
|
692
692
|
} | null;
|
|
693
693
|
}
|
|
694
|
-
declare const filterMirrorTokens: (balance: Balance, _i: number, balances: Balance[]) => boolean;
|
|
694
|
+
export declare const filterMirrorTokens: (balance: Balance, _i: number, balances: Balance[]) => boolean;
|
|
695
695
|
//#endregion
|
|
696
696
|
//#region src/types/chainConnectors.d.ts
|
|
697
|
-
type ChainConnectors = {
|
|
697
|
+
export type ChainConnectors = {
|
|
698
698
|
substrate?: IChainConnectorDot;
|
|
699
699
|
evm?: IChainConnectorEth;
|
|
700
700
|
solana?: IChainConnectorSol;
|
|
701
701
|
};
|
|
702
702
|
//#endregion
|
|
703
703
|
//#region src/types/IBalanceModule.d.ts
|
|
704
|
-
type TokenPlatform<T extends TokenType> = TokenOfType<T>["platform"];
|
|
705
|
-
type PlatformConnector<P extends TokenPlatform<TokenType>> = P extends "ethereum" ? IChainConnectorEth : P extends "polkadot" ? IChainConnectorDot : P extends "solana" ? IChainConnectorSol : never;
|
|
704
|
+
export type TokenPlatform<T extends TokenType> = TokenOfType<T>["platform"];
|
|
705
|
+
export type PlatformConnector<P extends TokenPlatform<TokenType>> = P extends "ethereum" ? IChainConnectorEth : P extends "polkadot" ? IChainConnectorDot : P extends "solana" ? IChainConnectorSol : never;
|
|
706
706
|
type DotTransferCallData = {
|
|
707
707
|
address: string;
|
|
708
708
|
method: `0x${string}`;
|
|
@@ -714,15 +714,15 @@ type EthTransferCallData = {
|
|
|
714
714
|
value?: string;
|
|
715
715
|
};
|
|
716
716
|
type SolTransferCallData = Instruction[];
|
|
717
|
-
type BalanceTransferType = "keep-alive" | "all" | "allow-death";
|
|
717
|
+
export type BalanceTransferType = "keep-alive" | "all" | "allow-death";
|
|
718
718
|
type CallDataOf<P extends TokenPlatform<TokenType>> = P extends "ethereum" ? EthTransferCallData : P extends "polkadot" ? DotTransferCallData : P extends "solana" ? SolTransferCallData : never;
|
|
719
|
-
type TokensWithAddresses = Array<[Token, Address[]]>;
|
|
720
|
-
type FetchBalanceErrors = Array<{
|
|
719
|
+
export type TokensWithAddresses = Array<[Token, Address[]]>;
|
|
720
|
+
export type FetchBalanceErrors = Array<{
|
|
721
721
|
tokenId: TokenId;
|
|
722
722
|
address: Address;
|
|
723
723
|
error: Error;
|
|
724
724
|
}>;
|
|
725
|
-
type FetchBalanceResults = {
|
|
725
|
+
export type FetchBalanceResults = {
|
|
726
726
|
success: IBalance[];
|
|
727
727
|
errors: FetchBalanceErrors;
|
|
728
728
|
/**
|
|
@@ -730,7 +730,7 @@ type FetchBalanceResults = {
|
|
|
730
730
|
*/
|
|
731
731
|
dynamicTokens?: Token[];
|
|
732
732
|
};
|
|
733
|
-
interface IBalanceModule<Type extends TokenType, TokenConfig = unknown, ModuleConfig = unknown, MiniMetadataExtra = unknown> {
|
|
733
|
+
export interface IBalanceModule<Type extends TokenType, TokenConfig = unknown, ModuleConfig = unknown, MiniMetadataExtra = unknown> {
|
|
734
734
|
type: Type;
|
|
735
735
|
platform: TokenPlatform<Type>;
|
|
736
736
|
getMiniMetadata: (arg: TokenPlatform<Type> extends "polkadot" ? {
|
|
@@ -800,33 +800,33 @@ interface IBalanceModule<Type extends TokenType, TokenConfig = unknown, ModuleCo
|
|
|
800
800
|
//#endregion
|
|
801
801
|
//#region src/types/fingerprint.d.ts
|
|
802
802
|
/** WeakMap-cached JSON serialization of a balance */
|
|
803
|
-
declare const getBalanceFingerprint: (balance: IBalance) => string;
|
|
803
|
+
export declare const getBalanceFingerprint: (balance: IBalance) => string;
|
|
804
804
|
/**
|
|
805
805
|
* Status-agnostic variant: stored balances carry status "cache" while fresh results carry
|
|
806
806
|
* "live", so comparisons between incoming results and stored entries must ignore status.
|
|
807
807
|
*/
|
|
808
|
-
declare const getBalanceStorageFingerprint: (balance: IBalance) => string;
|
|
809
|
-
declare const isEqualBalanceArrays: (a: IBalance[], b: IBalance[]) => boolean;
|
|
808
|
+
export declare const getBalanceStorageFingerprint: (balance: IBalance) => string;
|
|
809
|
+
export declare const isEqualBalanceArrays: (a: IBalance[], b: IBalance[]) => boolean;
|
|
810
810
|
/** replaces distinctUntilChanged(isEqual) on BalancesResult streams */
|
|
811
|
-
declare const isEqualBalancesResult: (a: BalancesResult, b: BalancesResult) => boolean;
|
|
811
|
+
export declare const isEqualBalancesResult: (a: BalancesResult, b: BalancesResult) => boolean;
|
|
812
812
|
/**
|
|
813
813
|
* Replaces distinctUntilChanged(isEqual) on module poll streams.
|
|
814
814
|
* Errors are compared by (tokenId, address) and dynamic tokens by id — slightly MORE
|
|
815
815
|
* dedupe than lodash isEqual (which compared Error instances), which is desirable: a
|
|
816
816
|
* fresh-but-identical Error on every failing poll should not re-emit.
|
|
817
817
|
*/
|
|
818
|
-
declare const isEqualModuleResults: (a: FetchBalanceResults, b: FetchBalanceResults) => boolean;
|
|
818
|
+
export declare const isEqualModuleResults: (a: FetchBalanceResults, b: FetchBalanceResults) => boolean;
|
|
819
819
|
/**
|
|
820
820
|
* Replaces distinctUntilChanged(isEqual) on MiniMetadata[] streams: id encodes
|
|
821
821
|
* (source, chainId, specVersion, version) and data is the metadata hex, so comparing
|
|
822
822
|
* those by === replaces a deep walk over large metadata strings and `extra` objects.
|
|
823
823
|
*/
|
|
824
|
-
declare const isEqualMiniMetadatas: (a: MiniMetadata[] | null, b: MiniMetadata[] | null) => boolean;
|
|
824
|
+
export declare const isEqualMiniMetadatas: (a: MiniMetadata[] | null, b: MiniMetadata[] | null) => boolean;
|
|
825
825
|
//#endregion
|
|
826
826
|
//#region src/types/minimetadatas.d.ts
|
|
827
827
|
/** For fast db access, you can calculate the primary key for a miniMetadata using this method */
|
|
828
|
-
declare const deriveMiniMetadataId: ({ source, chainId, specVersion }: Pick<AnyMiniMetadata, "source" | "chainId" | "specVersion">) => string;
|
|
829
|
-
type MiniMetadata<Extra = unknown> = Omit<AnyMiniMetadata, "extra"> & {
|
|
828
|
+
export declare const deriveMiniMetadataId: ({ source, chainId, specVersion }: Pick<AnyMiniMetadata, "source" | "chainId" | "specVersion">) => string;
|
|
829
|
+
export type MiniMetadata<Extra = unknown> = Omit<AnyMiniMetadata, "extra"> & {
|
|
830
830
|
extra: Extra;
|
|
831
831
|
};
|
|
832
832
|
//#endregion
|
|
@@ -834,27 +834,27 @@ type MiniMetadata<Extra = unknown> = Omit<AnyMiniMetadata, "extra"> & {
|
|
|
834
834
|
/**
|
|
835
835
|
* A callback with either an error or a result.
|
|
836
836
|
*/
|
|
837
|
-
interface SubscriptionCallback<Result> {
|
|
837
|
+
export interface SubscriptionCallback<Result> {
|
|
838
838
|
(error: null, result: Result): void;
|
|
839
839
|
(error: any, result?: never): void;
|
|
840
840
|
}
|
|
841
841
|
/**
|
|
842
842
|
* A function which cancels a subscription when called.
|
|
843
843
|
*/
|
|
844
|
-
type UnsubscribeFn = () => void;
|
|
844
|
+
export type UnsubscribeFn = () => void;
|
|
845
845
|
//#endregion
|
|
846
846
|
//#region src/BalancesProvider.d.ts
|
|
847
847
|
type BalancesStatus = "initialising" | "live";
|
|
848
|
-
type BalancesResult = {
|
|
848
|
+
export type BalancesResult = {
|
|
849
849
|
status: BalancesStatus;
|
|
850
850
|
balances: IBalance[];
|
|
851
851
|
failedBalanceIds: string[];
|
|
852
852
|
};
|
|
853
|
-
type BalancesStorage = {
|
|
853
|
+
export type BalancesStorage = {
|
|
854
854
|
balances: IBalance[];
|
|
855
855
|
miniMetadatas: MiniMetadata[];
|
|
856
856
|
};
|
|
857
|
-
declare class BalancesProvider {
|
|
857
|
+
export declare class BalancesProvider {
|
|
858
858
|
#private;
|
|
859
859
|
constructor(chaindataProvider: ChaindataProvider, chainConnectors: ChainConnectors, storage?: BalancesStorage);
|
|
860
860
|
get storage$(): Observable<BalancesStorage>;
|
|
@@ -875,10 +875,10 @@ declare class BalancesProvider {
|
|
|
875
875
|
private getStoredBalances;
|
|
876
876
|
private cleanupAddressesByTokenId$;
|
|
877
877
|
}
|
|
878
|
-
declare const getSweepStaleVariant: (balance: IBalance) => IBalance;
|
|
878
|
+
export declare const getSweepStaleVariant: (balance: IBalance) => IBalance;
|
|
879
879
|
//#endregion
|
|
880
880
|
//#region src/modules/abis/erc20BalancesAggregator.d.ts
|
|
881
|
-
declare const erc20BalancesAggregatorAbi: readonly [{
|
|
881
|
+
export declare const erc20BalancesAggregatorAbi: readonly [{
|
|
882
882
|
readonly name: "balances";
|
|
883
883
|
readonly type: 'function';
|
|
884
884
|
readonly stateMutability: "view";
|
|
@@ -899,7 +899,7 @@ declare const erc20BalancesAggregatorAbi: readonly [{
|
|
|
899
899
|
}];
|
|
900
900
|
//#endregion
|
|
901
901
|
//#region src/modules/abis/multicall.d.ts
|
|
902
|
-
declare const abiMulticall: readonly [{
|
|
902
|
+
export declare const abiMulticall: readonly [{
|
|
903
903
|
readonly name: "aggregate";
|
|
904
904
|
readonly type: 'function';
|
|
905
905
|
readonly stateMutability: "payable";
|
|
@@ -1177,7 +1177,7 @@ declare const abiMulticall: readonly [{
|
|
|
1177
1177
|
}];
|
|
1178
1178
|
//#endregion
|
|
1179
1179
|
//#region src/modules/abis/uniswapV2Pair.d.ts
|
|
1180
|
-
declare const uniswapV2PairAbi: readonly [{
|
|
1180
|
+
export declare const uniswapV2PairAbi: readonly [{
|
|
1181
1181
|
readonly anonymous: false;
|
|
1182
1182
|
readonly inputs: readonly [{
|
|
1183
1183
|
readonly indexed: true;
|
|
@@ -1739,7 +1739,7 @@ declare const uniswapV2PairAbi: readonly [{
|
|
|
1739
1739
|
}];
|
|
1740
1740
|
//#endregion
|
|
1741
1741
|
//#region src/modules/evm-erc20/types.d.ts
|
|
1742
|
-
declare const EvmErc20TokenConfigSchema: z.ZodObject<{
|
|
1742
|
+
export declare const EvmErc20TokenConfigSchema: z.ZodObject<{
|
|
1743
1743
|
networkId: z.ZodOptional<z.ZodString>;
|
|
1744
1744
|
isDefault: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
1745
1745
|
decimals: z.ZodOptional<z.ZodInt>;
|
|
@@ -1751,16 +1751,16 @@ declare const EvmErc20TokenConfigSchema: z.ZodObject<{
|
|
|
1751
1751
|
mirrorOf: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
1752
1752
|
contractAddress: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
1753
1753
|
}, z.core.$strict>;
|
|
1754
|
-
type EvmErc20TokenConfig = z.infer<typeof EvmErc20TokenConfigSchema>;
|
|
1754
|
+
export type EvmErc20TokenConfig = z.infer<typeof EvmErc20TokenConfigSchema>;
|
|
1755
1755
|
//#endregion
|
|
1756
1756
|
//#region src/modules/evm-erc20/config.d.ts
|
|
1757
1757
|
declare const MODULE_TYPE$12: "evm-erc20";
|
|
1758
1758
|
//#endregion
|
|
1759
1759
|
//#region src/modules/evm-erc20/module.d.ts
|
|
1760
|
-
declare const EvmErc20BalanceModule: IBalanceModule<typeof MODULE_TYPE$12, EvmErc20TokenConfig>;
|
|
1760
|
+
export declare const EvmErc20BalanceModule: IBalanceModule<typeof MODULE_TYPE$12, EvmErc20TokenConfig>;
|
|
1761
1761
|
//#endregion
|
|
1762
1762
|
//#region src/modules/evm-native/types.d.ts
|
|
1763
|
-
declare const EvmNativeTokenConfigSchema: z.ZodObject<{
|
|
1763
|
+
export declare const EvmNativeTokenConfigSchema: z.ZodObject<{
|
|
1764
1764
|
networkId: z.ZodOptional<z.ZodString>;
|
|
1765
1765
|
isDefault: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
1766
1766
|
decimals: z.ZodOptional<z.ZodInt>;
|
|
@@ -1771,16 +1771,16 @@ declare const EvmNativeTokenConfigSchema: z.ZodObject<{
|
|
|
1771
1771
|
noDiscovery: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
1772
1772
|
mirrorOf: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
1773
1773
|
}, z.core.$strict>;
|
|
1774
|
-
type EvmNativeTokenConfig = z.infer<typeof EvmNativeTokenConfigSchema>;
|
|
1774
|
+
export type EvmNativeTokenConfig = z.infer<typeof EvmNativeTokenConfigSchema>;
|
|
1775
1775
|
//#endregion
|
|
1776
1776
|
//#region src/modules/evm-native/config.d.ts
|
|
1777
1777
|
declare const MODULE_TYPE$11: "evm-native";
|
|
1778
1778
|
//#endregion
|
|
1779
1779
|
//#region src/modules/evm-native/module.d.ts
|
|
1780
|
-
declare const EvmNativeBalanceModule: IBalanceModule<typeof MODULE_TYPE$11, EvmNativeTokenConfig>;
|
|
1780
|
+
export declare const EvmNativeBalanceModule: IBalanceModule<typeof MODULE_TYPE$11, EvmNativeTokenConfig>;
|
|
1781
1781
|
//#endregion
|
|
1782
1782
|
//#region src/modules/evm-uniswapv2/types.d.ts
|
|
1783
|
-
declare const EvmUniswapV2TokenConfigSchema: z.ZodObject<{
|
|
1783
|
+
export declare const EvmUniswapV2TokenConfigSchema: z.ZodObject<{
|
|
1784
1784
|
networkId: z.ZodOptional<z.ZodString>;
|
|
1785
1785
|
isDefault: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
1786
1786
|
decimals: z.ZodOptional<z.ZodInt>;
|
|
@@ -1792,16 +1792,16 @@ declare const EvmUniswapV2TokenConfigSchema: z.ZodObject<{
|
|
|
1792
1792
|
mirrorOf: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
1793
1793
|
contractAddress: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
1794
1794
|
}, z.core.$strict>;
|
|
1795
|
-
type EvmUniswapV2TokenConfig = z.infer<typeof EvmUniswapV2TokenConfigSchema>;
|
|
1795
|
+
export type EvmUniswapV2TokenConfig = z.infer<typeof EvmUniswapV2TokenConfigSchema>;
|
|
1796
1796
|
//#endregion
|
|
1797
1797
|
//#region src/modules/evm-uniswapv2/config.d.ts
|
|
1798
1798
|
declare const MODULE_TYPE$10: "evm-uniswapv2";
|
|
1799
1799
|
//#endregion
|
|
1800
1800
|
//#region src/modules/evm-uniswapv2/module.d.ts
|
|
1801
|
-
declare const EvmUniswapV2BalanceModule: IBalanceModule<typeof MODULE_TYPE$10, EvmUniswapV2TokenConfig>;
|
|
1801
|
+
export declare const EvmUniswapV2BalanceModule: IBalanceModule<typeof MODULE_TYPE$10, EvmUniswapV2TokenConfig>;
|
|
1802
1802
|
//#endregion
|
|
1803
1803
|
//#region src/modules/sol-native/types.d.ts
|
|
1804
|
-
declare const SolNativeTokenConfigSchema: z.ZodObject<{
|
|
1804
|
+
export declare const SolNativeTokenConfigSchema: z.ZodObject<{
|
|
1805
1805
|
networkId: z.ZodOptional<z.ZodString>;
|
|
1806
1806
|
isDefault: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
1807
1807
|
decimals: z.ZodOptional<z.ZodInt>;
|
|
@@ -1812,16 +1812,16 @@ declare const SolNativeTokenConfigSchema: z.ZodObject<{
|
|
|
1812
1812
|
noDiscovery: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
1813
1813
|
mirrorOf: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
1814
1814
|
}, z.core.$strict>;
|
|
1815
|
-
type SolNativeTokenConfig = z.infer<typeof SolNativeTokenConfigSchema>;
|
|
1815
|
+
export type SolNativeTokenConfig = z.infer<typeof SolNativeTokenConfigSchema>;
|
|
1816
1816
|
//#endregion
|
|
1817
1817
|
//#region src/modules/sol-native/config.d.ts
|
|
1818
1818
|
declare const MODULE_TYPE$9: "sol-native";
|
|
1819
1819
|
//#endregion
|
|
1820
1820
|
//#region src/modules/sol-native/module.d.ts
|
|
1821
|
-
declare const SolNativeBalanceModule: IBalanceModule<typeof MODULE_TYPE$9, SolNativeTokenConfig>;
|
|
1821
|
+
export declare const SolNativeBalanceModule: IBalanceModule<typeof MODULE_TYPE$9, SolNativeTokenConfig>;
|
|
1822
1822
|
//#endregion
|
|
1823
1823
|
//#region src/modules/sol-spl/types.d.ts
|
|
1824
|
-
declare const SolSplTokenConfigSchema: z.ZodObject<{
|
|
1824
|
+
export declare const SolSplTokenConfigSchema: z.ZodObject<{
|
|
1825
1825
|
networkId: z.ZodOptional<z.ZodString>;
|
|
1826
1826
|
isDefault: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
1827
1827
|
decimals: z.ZodOptional<z.ZodInt>;
|
|
@@ -1833,16 +1833,16 @@ declare const SolSplTokenConfigSchema: z.ZodObject<{
|
|
|
1833
1833
|
mirrorOf: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
1834
1834
|
mintAddress: z.ZodString;
|
|
1835
1835
|
}, z.core.$strict>;
|
|
1836
|
-
type SolSplTokenConfig = z.infer<typeof SolSplTokenConfigSchema>;
|
|
1836
|
+
export type SolSplTokenConfig = z.infer<typeof SolSplTokenConfigSchema>;
|
|
1837
1837
|
//#endregion
|
|
1838
1838
|
//#region src/modules/sol-spl/config.d.ts
|
|
1839
1839
|
declare const MODULE_TYPE$8: "sol-spl";
|
|
1840
1840
|
//#endregion
|
|
1841
1841
|
//#region src/modules/sol-spl/module.d.ts
|
|
1842
|
-
declare const SolSplBalanceModule: IBalanceModule<typeof MODULE_TYPE$8, SolSplTokenConfig>;
|
|
1842
|
+
export declare const SolSplBalanceModule: IBalanceModule<typeof MODULE_TYPE$8, SolSplTokenConfig>;
|
|
1843
1843
|
//#endregion
|
|
1844
1844
|
//#region src/modules/sol-token2022/types.d.ts
|
|
1845
|
-
declare const SolToken2022TokenConfigSchema: z.ZodObject<{
|
|
1845
|
+
export declare const SolToken2022TokenConfigSchema: z.ZodObject<{
|
|
1846
1846
|
networkId: z.ZodOptional<z.ZodString>;
|
|
1847
1847
|
isDefault: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
1848
1848
|
decimals: z.ZodOptional<z.ZodInt>;
|
|
@@ -1854,14 +1854,14 @@ declare const SolToken2022TokenConfigSchema: z.ZodObject<{
|
|
|
1854
1854
|
mirrorOf: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
1855
1855
|
mintAddress: z.ZodString;
|
|
1856
1856
|
}, z.core.$strict>;
|
|
1857
|
-
type SolToken2022TokenConfig = z.infer<typeof SolToken2022TokenConfigSchema>;
|
|
1857
|
+
export type SolToken2022TokenConfig = z.infer<typeof SolToken2022TokenConfigSchema>;
|
|
1858
1858
|
//#endregion
|
|
1859
1859
|
//#region src/modules/sol-token2022/config.d.ts
|
|
1860
1860
|
declare const MODULE_TYPE$7: "sol-token2022";
|
|
1861
1861
|
//#endregion
|
|
1862
1862
|
//#region src/modules/sol-token2022/getTransferCallData.d.ts
|
|
1863
1863
|
/** Selects the transfer-fee schedule (older vs newer) that applies to a given epoch. */
|
|
1864
|
-
declare const getEpochTransferFee: (transferFeeConfig: {
|
|
1864
|
+
export declare const getEpochTransferFee: (transferFeeConfig: {
|
|
1865
1865
|
olderTransferFee: TransferFee;
|
|
1866
1866
|
newerTransferFee: TransferFee;
|
|
1867
1867
|
}, epoch: bigint) => TransferFee;
|
|
@@ -1871,12 +1871,12 @@ declare const getEpochTransferFee: (transferFeeConfig: {
|
|
|
1871
1871
|
* Same math as @solana/spl-token's `calculateEpochFee`: pick the fee schedule for the epoch,
|
|
1872
1872
|
* apply basis points with ceiling rounding, cap at `maximumFee`.
|
|
1873
1873
|
*/
|
|
1874
|
-
declare const calculateToken2022TransferFee: (transferFeeConfig: {
|
|
1874
|
+
export declare const calculateToken2022TransferFee: (transferFeeConfig: {
|
|
1875
1875
|
olderTransferFee: TransferFee;
|
|
1876
1876
|
newerTransferFee: TransferFee;
|
|
1877
1877
|
}, epoch: bigint, amount: bigint) => bigint;
|
|
1878
1878
|
//#endregion
|
|
1879
|
-
//#region ../../node_modules/.pnpm/@solana+nominal-types@
|
|
1879
|
+
//#region ../../node_modules/.pnpm/@solana+nominal-types@8.2.0_typescript@7.0.2/node_modules/@solana/nominal-types/dist/types/index.d.ts
|
|
1880
1880
|
type StringEncoding = 'base58' | 'base64';
|
|
1881
1881
|
/**
|
|
1882
1882
|
* Use this to produce a new type that satisfies the original type, but not the other way around.
|
|
@@ -1947,7 +1947,7 @@ type EncodedString<T extends string, TEncoding extends StringEncoding> = Nominal
|
|
|
1947
1947
|
*/
|
|
1948
1948
|
type NominalType<TKey extends string, TMarker extends string> = { readonly [K in `__${TKey}:@solana/kit`]: TMarker; };
|
|
1949
1949
|
//#endregion
|
|
1950
|
-
//#region ../../node_modules/.pnpm/@solana+addresses@
|
|
1950
|
+
//#region ../../node_modules/.pnpm/@solana+addresses@8.2.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@7.0.2/node_modules/@solana/addresses/dist/types/address.d.ts
|
|
1951
1951
|
/**
|
|
1952
1952
|
* Represents a string that validates as a Solana address. Functions that require well-formed
|
|
1953
1953
|
* addresses should specify their inputs in terms of this type.
|
|
@@ -1959,11 +1959,11 @@ type Address$1<TAddress extends string = string> = Brand<EncodedString<TAddress,
|
|
|
1959
1959
|
//#endregion
|
|
1960
1960
|
//#region src/modules/sol-token2022/mintExtensions.d.ts
|
|
1961
1961
|
type Extension = NonNullable<ReturnType<typeof getMintExtensions>>[number];
|
|
1962
|
-
declare const getMintExtensions: (mint: Mint) => import("@solana-program/token-2022").Extension[];
|
|
1963
|
-
declare const getExtension: <TKind extends Extension["__kind"]>(mint: Mint, kind: TKind) => Extract<Extension, {
|
|
1962
|
+
export declare const getMintExtensions: (mint: Mint) => import("@solana-program/token-2022").Extension[];
|
|
1963
|
+
export declare const getExtension: <TKind extends Extension["__kind"]>(mint: Mint, kind: TKind) => Extract<Extension, {
|
|
1964
1964
|
__kind: TKind;
|
|
1965
1965
|
}> | null;
|
|
1966
|
-
declare const getTransferFeeConfig: (mint: Mint) => {
|
|
1966
|
+
export declare const getTransferFeeConfig: (mint: Mint) => {
|
|
1967
1967
|
__kind: 'TransferFeeConfig';
|
|
1968
1968
|
transferFeeConfigAuthority: Address$1;
|
|
1969
1969
|
withdrawWithheldAuthority: Address$1;
|
|
@@ -1971,13 +1971,13 @@ declare const getTransferFeeConfig: (mint: Mint) => {
|
|
|
1971
1971
|
olderTransferFee: import("@solana-program/token-2022").TransferFee;
|
|
1972
1972
|
newerTransferFee: import("@solana-program/token-2022").TransferFee;
|
|
1973
1973
|
} | null;
|
|
1974
|
-
declare const getTransferHook: (mint: Mint) => {
|
|
1974
|
+
export declare const getTransferHook: (mint: Mint) => {
|
|
1975
1975
|
__kind: 'TransferHook';
|
|
1976
1976
|
authority: Address$1;
|
|
1977
1977
|
programId: Address$1;
|
|
1978
1978
|
} | null;
|
|
1979
|
-
declare const isNonTransferable: (mint: Mint) => boolean;
|
|
1980
|
-
declare const getTokenMetadata: (mint: Mint) => {
|
|
1979
|
+
export declare const isNonTransferable: (mint: Mint) => boolean;
|
|
1980
|
+
export declare const getTokenMetadata: (mint: Mint) => {
|
|
1981
1981
|
__kind: 'TokenMetadata';
|
|
1982
1982
|
updateAuthority: import("@solana/kit").Option<Address$1>;
|
|
1983
1983
|
mint: Address$1;
|
|
@@ -1988,10 +1988,10 @@ declare const getTokenMetadata: (mint: Mint) => {
|
|
|
1988
1988
|
} | null;
|
|
1989
1989
|
//#endregion
|
|
1990
1990
|
//#region src/modules/sol-token2022/module.d.ts
|
|
1991
|
-
declare const SolToken2022BalanceModule: IBalanceModule<typeof MODULE_TYPE$7, SolToken2022TokenConfig>;
|
|
1991
|
+
export declare const SolToken2022BalanceModule: IBalanceModule<typeof MODULE_TYPE$7, SolToken2022TokenConfig>;
|
|
1992
1992
|
//#endregion
|
|
1993
1993
|
//#region src/modules/substrate-assets/types.d.ts
|
|
1994
|
-
declare const SubAssetsTokenConfigSchema: z.ZodObject<{
|
|
1994
|
+
export declare const SubAssetsTokenConfigSchema: z.ZodObject<{
|
|
1995
1995
|
networkId: z.ZodOptional<z.ZodString>;
|
|
1996
1996
|
isDefault: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
1997
1997
|
decimals: z.ZodOptional<z.ZodInt>;
|
|
@@ -2003,20 +2003,20 @@ declare const SubAssetsTokenConfigSchema: z.ZodObject<{
|
|
|
2003
2003
|
mirrorOf: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
2004
2004
|
assetId: z.ZodPipe<z.ZodUnion<readonly [z.ZodUInt32, z.ZodString]>, z.ZodTransform<string, string | number>>;
|
|
2005
2005
|
}, z.core.$strict>;
|
|
2006
|
-
type SubAssetsTokenConfig = z.infer<typeof SubAssetsTokenConfigSchema>;
|
|
2006
|
+
export type SubAssetsTokenConfig = z.infer<typeof SubAssetsTokenConfigSchema>;
|
|
2007
2007
|
//#endregion
|
|
2008
2008
|
//#region src/modules/substrate-assets/config.d.ts
|
|
2009
2009
|
declare const MODULE_TYPE$6: "substrate-assets";
|
|
2010
2010
|
type TokenConfig$1 = z.infer<typeof SubAssetsTokenConfigSchema>;
|
|
2011
2011
|
//#endregion
|
|
2012
2012
|
//#region src/modules/substrate-assets/module.d.ts
|
|
2013
|
-
declare const SubAssetsBalanceModule: IBalanceModule<typeof MODULE_TYPE$6, TokenConfig$1>;
|
|
2013
|
+
export declare const SubAssetsBalanceModule: IBalanceModule<typeof MODULE_TYPE$6, TokenConfig$1>;
|
|
2014
2014
|
//#endregion
|
|
2015
2015
|
//#region src/modules/substrate-dtao/alphaPrice.d.ts
|
|
2016
|
-
declare const TAO_DECIMALS = 9n;
|
|
2017
|
-
declare const ALPHA_PRICE_SCALE: bigint;
|
|
2018
|
-
declare const alphaToTao: (alpha: bigint, scaledAlphaPrice: bigint) => bigint;
|
|
2019
|
-
declare const taoToAlpha: (tao: bigint, scaledAlphaPrice: bigint) => bigint;
|
|
2016
|
+
export declare const TAO_DECIMALS = 9n;
|
|
2017
|
+
export declare const ALPHA_PRICE_SCALE: bigint;
|
|
2018
|
+
export declare const alphaToTao: (alpha: bigint, scaledAlphaPrice: bigint) => bigint;
|
|
2019
|
+
export declare const taoToAlpha: (tao: bigint, scaledAlphaPrice: bigint) => bigint;
|
|
2020
2020
|
/**
|
|
2021
2021
|
* Like taoToAlpha but rounds up. Use for "must keep / must send at least this much alpha"
|
|
2022
2022
|
* thresholds: the chain floors the alpha→TAO conversion when checking its TAO-denominated
|
|
@@ -2024,7 +2024,7 @@ declare const taoToAlpha: (tao: bigint, scaledAlphaPrice: bigint) => bigint;
|
|
|
2024
2024
|
* meeting it exactly would still fail the on-chain check (or get the position force-swept).
|
|
2025
2025
|
* Guarantees alphaToTao(taoToAlphaCeil(tao, price), price) >= tao.
|
|
2026
2026
|
*/
|
|
2027
|
-
declare const taoToAlphaCeil: (tao: bigint, scaledAlphaPrice: bigint) => bigint;
|
|
2027
|
+
export declare const taoToAlphaCeil: (tao: bigint, scaledAlphaPrice: bigint) => bigint;
|
|
2028
2028
|
//#endregion
|
|
2029
2029
|
//#region src/modules/substrate-dtao/basketClaims.d.ts
|
|
2030
2030
|
type BalanceLockLike$1 = {
|
|
@@ -2034,9 +2034,9 @@ type BalanceLockLike$1 = {
|
|
|
2034
2034
|
};
|
|
2035
2035
|
};
|
|
2036
2036
|
/** Whether a lock is a claimable root rewards entitlement */
|
|
2037
|
-
declare const isDTaoClaimableLock: (lock: Pick<BalanceLockLike$1, "label">) => boolean;
|
|
2037
|
+
export declare const isDTaoClaimableLock: (lock: Pick<BalanceLockLike$1, "label">) => boolean;
|
|
2038
2038
|
/** Sum of a balance's claimable root rewards (TAO plancks, marked NAV quote) */
|
|
2039
|
-
declare const getDTaoClaimablePlancks: (locks: BalanceLockLike$1[] | null | undefined) => bigint;
|
|
2039
|
+
export declare const getDTaoClaimablePlancks: (locks: BalanceLockLike$1[] | null | undefined) => bigint;
|
|
2040
2040
|
/** Identifies the entitlement to claim: claims are per (account, validator) pair */
|
|
2041
2041
|
type DTaoClaimTarget = {
|
|
2042
2042
|
networkId: DotNetworkId;
|
|
@@ -2059,7 +2059,7 @@ type ClaimBalanceLike = {
|
|
|
2059
2059
|
* Sourced from balances rather than staking positions: the chain keeps basket entitlement
|
|
2060
2060
|
* after a full unstake, so a claim can have no stake left on its validator.
|
|
2061
2061
|
*/
|
|
2062
|
-
declare const findDTaoClaimablePlancks: (balances: ClaimBalanceLike[], { networkId, address, hotkey }: DTaoClaimTarget) => bigint | null;
|
|
2062
|
+
export declare const findDTaoClaimablePlancks: (balances: ClaimBalanceLike[], { networkId, address, hotkey }: DTaoClaimTarget) => bigint | null;
|
|
2063
2063
|
//#endregion
|
|
2064
2064
|
//#region ../../node_modules/.pnpm/polkadot-api@2.2.0_bufferutil@4.0.8_esbuild@0.28.1_rxjs@7.8.2_supports-color@10.2.2_utf-8-validate@6.0.4/node_modules/polkadot-api/dist/types-BJAMtGIT.d.ts
|
|
2065
2065
|
type PlainDescriptor<T> = {
|
|
@@ -21932,7 +21932,7 @@ type Bittensor = {
|
|
|
21932
21932
|
declare const _allDescriptors: Bittensor;
|
|
21933
21933
|
//#endregion
|
|
21934
21934
|
//#region src/modules/substrate-dtao/types.d.ts
|
|
21935
|
-
declare const SubDTaoTokenConfigSchema: z.ZodObject<{
|
|
21935
|
+
export declare const SubDTaoTokenConfigSchema: z.ZodObject<{
|
|
21936
21936
|
networkId: z.ZodOptional<z.ZodString>;
|
|
21937
21937
|
isDefault: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
21938
21938
|
decimals: z.ZodOptional<z.ZodInt>;
|
|
@@ -21944,8 +21944,8 @@ declare const SubDTaoTokenConfigSchema: z.ZodObject<{
|
|
|
21944
21944
|
mirrorOf: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
21945
21945
|
netuid: z.ZodNumber;
|
|
21946
21946
|
}, z.core.$strict>;
|
|
21947
|
-
type SubDTaoTokenConfig = z.infer<typeof SubDTaoTokenConfigSchema>;
|
|
21948
|
-
type SubDTaoBalanceMeta = {
|
|
21947
|
+
export type SubDTaoTokenConfig = z.infer<typeof SubDTaoTokenConfigSchema>;
|
|
21948
|
+
export type SubDTaoBalanceMeta = {
|
|
21949
21949
|
convictionLock?: SubDTaoConvictionLockMeta;
|
|
21950
21950
|
rootStakeHold?: SubDTaoRootStakeHoldMeta;
|
|
21951
21951
|
};
|
|
@@ -21953,18 +21953,18 @@ type SubDTaoBalanceMeta = {
|
|
|
21953
21953
|
* Root-stake hold window (spec 441): while active, the pair's root stake cannot leave root
|
|
21954
21954
|
* (remove/move/swap/transfer). Only present while the window is still running.
|
|
21955
21955
|
*/
|
|
21956
|
-
type SubDTaoRootStakeHoldMeta = {
|
|
21956
|
+
export type SubDTaoRootStakeHoldMeta = {
|
|
21957
21957
|
type: "root-stake-hold";
|
|
21958
21958
|
/** block at which the (coldkey, hotkey) root stake can leave root again */
|
|
21959
21959
|
unlockAtBlock: number;
|
|
21960
21960
|
};
|
|
21961
|
-
type SubDTaoConvictionLockType = "decaying" | "perpetual";
|
|
21962
|
-
type SubDTaoConvictionLockMeta = {
|
|
21961
|
+
export type SubDTaoConvictionLockType = "decaying" | "perpetual";
|
|
21962
|
+
export type SubDTaoConvictionLockMeta = {
|
|
21963
21963
|
type: "conviction-lock";
|
|
21964
21964
|
hotkey: string;
|
|
21965
21965
|
lockType: SubDTaoConvictionLockType;
|
|
21966
21966
|
};
|
|
21967
|
-
type SubDTaoBalance = {
|
|
21967
|
+
export type SubDTaoBalance = {
|
|
21968
21968
|
address: string;
|
|
21969
21969
|
tokenId: string;
|
|
21970
21970
|
baseTokenId: string;
|
|
@@ -21977,22 +21977,22 @@ type SubDTaoBalance = {
|
|
|
21977
21977
|
hotkey: string;
|
|
21978
21978
|
netuid: number;
|
|
21979
21979
|
};
|
|
21980
|
-
type SubDTaoConvictionLock = {
|
|
21980
|
+
export type SubDTaoConvictionLock = {
|
|
21981
21981
|
amount: bigint;
|
|
21982
21982
|
hotkey: string;
|
|
21983
21983
|
lockType: SubDTaoConvictionLockType;
|
|
21984
21984
|
convictionRaw: string;
|
|
21985
21985
|
};
|
|
21986
|
-
type GetStakeInfosResult = (typeof _allDescriptors)["descriptors"]["apis"]["StakeInfoRuntimeApi"]["get_stake_info_for_coldkeys"][1];
|
|
21986
|
+
export type GetStakeInfosResult = (typeof _allDescriptors)["descriptors"]["apis"]["StakeInfoRuntimeApi"]["get_stake_info_for_coldkeys"][1];
|
|
21987
21987
|
/**
|
|
21988
21988
|
* `undefined` when the coldkey has no lock on the subnet; `null` is our own fetch-failure marker.
|
|
21989
21989
|
* `conviction` is the raw U64F64 fixed-point value (shift right by 64 bits for the integer part),
|
|
21990
21990
|
* despite decoding as a plain bigint.
|
|
21991
21991
|
*/
|
|
21992
|
-
type GetColdkeyLockResult = (typeof _allDescriptors)["descriptors"]["apis"]["StakeInfoRuntimeApi"]["get_coldkey_lock"][1] | null;
|
|
21992
|
+
export type GetColdkeyLockResult = (typeof _allDescriptors)["descriptors"]["apis"]["StakeInfoRuntimeApi"]["get_coldkey_lock"][1] | null;
|
|
21993
21993
|
//#endregion
|
|
21994
21994
|
//#region src/modules/substrate-dtao/convictionLocks.d.ts
|
|
21995
|
-
declare const getConvictionLockLabel: (lockType: SubDTaoConvictionLockType) => string;
|
|
21995
|
+
export declare const getConvictionLockLabel: (lockType: SubDTaoConvictionLockType) => string;
|
|
21996
21996
|
type DTaoConvictionLockInfo = {
|
|
21997
21997
|
amount: bigint;
|
|
21998
21998
|
/** the hotkey the lock is keyed on: required to top-up (the chain rejects a different hotkey) */
|
|
@@ -22011,14 +22011,14 @@ type BalanceLockLike = {
|
|
|
22011
22011
|
* The locked amount cannot be unstaked until the lock decays (or ever, if perpetual);
|
|
22012
22012
|
* transferring it is allowed but moves the lock and its conviction to the recipient.
|
|
22013
22013
|
*/
|
|
22014
|
-
declare const findDTaoConvictionLock: (locks: BalanceLockLike[] | null | undefined) => DTaoConvictionLockInfo | null;
|
|
22014
|
+
export declare const findDTaoConvictionLock: (locks: BalanceLockLike[] | null | undefined) => DTaoConvictionLockInfo | null;
|
|
22015
22015
|
//#endregion
|
|
22016
22016
|
//#region src/modules/substrate-dtao/config.d.ts
|
|
22017
22017
|
declare const MODULE_TYPE$5: "substrate-dtao";
|
|
22018
22018
|
type TokenConfig = z.infer<typeof SubDTaoTokenConfigSchema>;
|
|
22019
22019
|
//#endregion
|
|
22020
22020
|
//#region src/modules/substrate-dtao/module.d.ts
|
|
22021
|
-
declare const SubDTaoBalanceModule: IBalanceModule<typeof MODULE_TYPE$5, TokenConfig>;
|
|
22021
|
+
export declare const SubDTaoBalanceModule: IBalanceModule<typeof MODULE_TYPE$5, TokenConfig>;
|
|
22022
22022
|
//#endregion
|
|
22023
22023
|
//#region src/modules/substrate-dtao/rootStakeHold.d.ts
|
|
22024
22024
|
/**
|
|
@@ -22027,14 +22027,14 @@ declare const SubDTaoBalanceModule: IBalanceModule<typeof MODULE_TYPE$5, TokenCo
|
|
|
22027
22027
|
* would fail with `RootStakeLocked`. Only present while the window was still running
|
|
22028
22028
|
* as of the last balances poll.
|
|
22029
22029
|
*/
|
|
22030
|
-
declare const findDTaoRootStakeHold: (balance: {
|
|
22030
|
+
export declare const findDTaoRootStakeHold: (balance: {
|
|
22031
22031
|
values?: Array<{
|
|
22032
22032
|
meta?: unknown;
|
|
22033
22033
|
}>;
|
|
22034
22034
|
} | null | undefined) => SubDTaoRootStakeHoldMeta | null;
|
|
22035
22035
|
//#endregion
|
|
22036
22036
|
//#region src/modules/substrate-foreignassets/types.d.ts
|
|
22037
|
-
declare const SubForeignAssetsTokenConfigSchema: z.ZodObject<{
|
|
22037
|
+
export declare const SubForeignAssetsTokenConfigSchema: z.ZodObject<{
|
|
22038
22038
|
networkId: z.ZodOptional<z.ZodString>;
|
|
22039
22039
|
isDefault: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
22040
22040
|
decimals: z.ZodOptional<z.ZodInt>;
|
|
@@ -22046,16 +22046,16 @@ declare const SubForeignAssetsTokenConfigSchema: z.ZodObject<{
|
|
|
22046
22046
|
mirrorOf: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
22047
22047
|
onChainId: z.ZodString;
|
|
22048
22048
|
}, z.core.$strict>;
|
|
22049
|
-
type SubForeignAssetsTokenConfig = z.infer<typeof SubForeignAssetsTokenConfigSchema>;
|
|
22049
|
+
export type SubForeignAssetsTokenConfig = z.infer<typeof SubForeignAssetsTokenConfigSchema>;
|
|
22050
22050
|
//#endregion
|
|
22051
22051
|
//#region src/modules/substrate-foreignassets/config.d.ts
|
|
22052
22052
|
declare const MODULE_TYPE$4: "substrate-foreignassets";
|
|
22053
22053
|
//#endregion
|
|
22054
22054
|
//#region src/modules/substrate-foreignassets/module.d.ts
|
|
22055
|
-
declare const SubForeignAssetsBalanceModule: IBalanceModule<typeof MODULE_TYPE$4, SubForeignAssetsTokenConfig>;
|
|
22055
|
+
export declare const SubForeignAssetsBalanceModule: IBalanceModule<typeof MODULE_TYPE$4, SubForeignAssetsTokenConfig>;
|
|
22056
22056
|
//#endregion
|
|
22057
22057
|
//#region src/modules/substrate-hydration/types.d.ts
|
|
22058
|
-
declare const SubHydrationTokenConfigSchema: z.ZodObject<{
|
|
22058
|
+
export declare const SubHydrationTokenConfigSchema: z.ZodObject<{
|
|
22059
22059
|
networkId: z.ZodOptional<z.ZodString>;
|
|
22060
22060
|
isDefault: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
22061
22061
|
decimals: z.ZodOptional<z.ZodInt>;
|
|
@@ -22067,16 +22067,16 @@ declare const SubHydrationTokenConfigSchema: z.ZodObject<{
|
|
|
22067
22067
|
mirrorOf: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
22068
22068
|
onChainId: z.ZodUInt32;
|
|
22069
22069
|
}, z.core.$strict>;
|
|
22070
|
-
type SubHydrationTokenConfig = z.infer<typeof SubHydrationTokenConfigSchema>;
|
|
22070
|
+
export type SubHydrationTokenConfig = z.infer<typeof SubHydrationTokenConfigSchema>;
|
|
22071
22071
|
//#endregion
|
|
22072
22072
|
//#region src/modules/substrate-hydration/config.d.ts
|
|
22073
22073
|
declare const MODULE_TYPE$3: "substrate-hydration";
|
|
22074
22074
|
//#endregion
|
|
22075
22075
|
//#region src/modules/substrate-hydration/module.d.ts
|
|
22076
|
-
declare const SubHydrationBalanceModule: IBalanceModule<typeof MODULE_TYPE$3, SubHydrationTokenConfig>;
|
|
22076
|
+
export declare const SubHydrationBalanceModule: IBalanceModule<typeof MODULE_TYPE$3, SubHydrationTokenConfig>;
|
|
22077
22077
|
//#endregion
|
|
22078
22078
|
//#region src/modules/substrate-native/types.d.ts
|
|
22079
|
-
declare const SubNativeTokenConfigSchema: z.ZodObject<{
|
|
22079
|
+
export declare const SubNativeTokenConfigSchema: z.ZodObject<{
|
|
22080
22080
|
networkId: z.ZodOptional<z.ZodString>;
|
|
22081
22081
|
isDefault: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
22082
22082
|
decimals: z.ZodOptional<z.ZodInt>;
|
|
@@ -22087,43 +22087,43 @@ declare const SubNativeTokenConfigSchema: z.ZodObject<{
|
|
|
22087
22087
|
noDiscovery: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
22088
22088
|
mirrorOf: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
22089
22089
|
}, z.core.$strict>;
|
|
22090
|
-
type SubNativeTokenConfig = z.infer<typeof SubNativeTokenConfigSchema>;
|
|
22091
|
-
declare const SubNativeModuleConfigSchema: z.ZodObject<{
|
|
22090
|
+
export type SubNativeTokenConfig = z.infer<typeof SubNativeTokenConfigSchema>;
|
|
22091
|
+
export declare const SubNativeModuleConfigSchema: z.ZodObject<{
|
|
22092
22092
|
disable: z.ZodOptional<z.ZodBoolean>;
|
|
22093
22093
|
}, z.core.$strict>;
|
|
22094
|
-
type SubNativeModuleConfig = z.infer<typeof SubNativeModuleConfigSchema>;
|
|
22095
|
-
declare const SubNativeMiniMetadataExtraSchema: z.ZodObject<{
|
|
22094
|
+
export type SubNativeModuleConfig = z.infer<typeof SubNativeModuleConfigSchema>;
|
|
22095
|
+
export declare const SubNativeMiniMetadataExtraSchema: z.ZodObject<{
|
|
22096
22096
|
disable: z.ZodOptional<z.ZodBoolean>;
|
|
22097
22097
|
useLegacyTransferableCalculation: z.ZodOptional<z.ZodBoolean>;
|
|
22098
22098
|
existentialDeposit: z.ZodOptional<z.ZodString>;
|
|
22099
22099
|
nominationPoolsPalletId: z.ZodOptional<z.ZodString>;
|
|
22100
22100
|
}, z.core.$strict>;
|
|
22101
|
-
type SubNativeMiniMetadataExtra = z.infer<typeof SubNativeMiniMetadataExtraSchema>;
|
|
22101
|
+
export type SubNativeMiniMetadataExtra = z.infer<typeof SubNativeMiniMetadataExtraSchema>;
|
|
22102
22102
|
//#endregion
|
|
22103
22103
|
//#region src/modules/substrate-native/config.d.ts
|
|
22104
22104
|
declare const MODULE_TYPE$2: "substrate-native";
|
|
22105
22105
|
//#endregion
|
|
22106
22106
|
//#region src/modules/substrate-native/module.d.ts
|
|
22107
|
-
declare const SubNativeBalanceModule: IBalanceModule<typeof MODULE_TYPE$2, SubNativeTokenConfig, SubNativeModuleConfig, SubNativeMiniMetadataExtra>;
|
|
22107
|
+
export declare const SubNativeBalanceModule: IBalanceModule<typeof MODULE_TYPE$2, SubNativeTokenConfig, SubNativeModuleConfig, SubNativeMiniMetadataExtra>;
|
|
22108
22108
|
//#endregion
|
|
22109
22109
|
//#region src/modules/substrate-native/util/lockTypes.d.ts
|
|
22110
|
-
type BalanceLockType = "reserved" | "democracy" | "crowdloan" | "staking" | "nompools-staking" | "nompools-unbonding" | "subtensor-staking" | "vesting" | "dapp-staking" | `other-${string}` | "other";
|
|
22110
|
+
export type BalanceLockType = "reserved" | "democracy" | "crowdloan" | "staking" | "nompools-staking" | "nompools-unbonding" | "subtensor-staking" | "vesting" | "dapp-staking" | `other-${string}` | "other";
|
|
22111
22111
|
/**
|
|
22112
22112
|
* For converting the value of `lock?.id?.toUtf8?.()` which is retrieved from
|
|
22113
22113
|
* the Balances.Locks storage key into a useful classification for our UI
|
|
22114
22114
|
*/
|
|
22115
|
-
declare const getLockedType: (input?: string) => BalanceLockType;
|
|
22116
|
-
declare const filterBaseLocks: (locks: Array<Omit<LockedAmount<string>, "amount"> & {
|
|
22115
|
+
export declare const getLockedType: (input?: string) => BalanceLockType;
|
|
22116
|
+
export declare const filterBaseLocks: (locks: Array<Omit<LockedAmount<string>, "amount"> & {
|
|
22117
22117
|
amount: BalanceFormatter;
|
|
22118
22118
|
}>) => (Omit<LockedAmount<string>, "amount"> & {
|
|
22119
22119
|
amount: BalanceFormatter;
|
|
22120
22120
|
})[];
|
|
22121
|
-
declare const getLockTitle: (lock: Pick<LockedAmount<string>, "label" | "meta">, { balance }?: {
|
|
22121
|
+
export declare const getLockTitle: (lock: Pick<LockedAmount<string>, "label" | "meta">, { balance }?: {
|
|
22122
22122
|
balance?: Balance;
|
|
22123
22123
|
}) => string;
|
|
22124
22124
|
//#endregion
|
|
22125
22125
|
//#region src/modules/substrate-psp22/types.d.ts
|
|
22126
|
-
declare const SubPsp22TokenConfigSchema: z.ZodObject<{
|
|
22126
|
+
export declare const SubPsp22TokenConfigSchema: z.ZodObject<{
|
|
22127
22127
|
networkId: z.ZodOptional<z.ZodString>;
|
|
22128
22128
|
isDefault: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
22129
22129
|
decimals: z.ZodOptional<z.ZodInt>;
|
|
@@ -22135,16 +22135,16 @@ declare const SubPsp22TokenConfigSchema: z.ZodObject<{
|
|
|
22135
22135
|
mirrorOf: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
22136
22136
|
contractAddress: z.ZodString;
|
|
22137
22137
|
}, z.core.$strict>;
|
|
22138
|
-
type SubPsp22TokenConfig = z.infer<typeof SubPsp22TokenConfigSchema>;
|
|
22138
|
+
export type SubPsp22TokenConfig = z.infer<typeof SubPsp22TokenConfigSchema>;
|
|
22139
22139
|
//#endregion
|
|
22140
22140
|
//#region src/modules/substrate-psp22/config.d.ts
|
|
22141
22141
|
declare const MODULE_TYPE$1: "substrate-psp22";
|
|
22142
22142
|
//#endregion
|
|
22143
22143
|
//#region src/modules/substrate-psp22/module.d.ts
|
|
22144
|
-
declare const SubPsp22BalanceModule: IBalanceModule<typeof MODULE_TYPE$1, SubPsp22TokenConfig>;
|
|
22144
|
+
export declare const SubPsp22BalanceModule: IBalanceModule<typeof MODULE_TYPE$1, SubPsp22TokenConfig>;
|
|
22145
22145
|
//#endregion
|
|
22146
22146
|
//#region src/modules/substrate-tokens/types.d.ts
|
|
22147
|
-
declare const SubTokensTokenConfigSchema: z.ZodObject<{
|
|
22147
|
+
export declare const SubTokensTokenConfigSchema: z.ZodObject<{
|
|
22148
22148
|
networkId: z.ZodOptional<z.ZodString>;
|
|
22149
22149
|
isDefault: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
22150
22150
|
name: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
@@ -22157,24 +22157,24 @@ declare const SubTokensTokenConfigSchema: z.ZodObject<{
|
|
|
22157
22157
|
decimals: z.ZodNumber;
|
|
22158
22158
|
existentialDeposit: z.ZodString;
|
|
22159
22159
|
}, z.core.$strict>;
|
|
22160
|
-
type SubTokensTokenConfig = z.infer<typeof SubTokensTokenConfigSchema>;
|
|
22161
|
-
declare const SubTokensModuleConfigSchema: z.ZodObject<{
|
|
22160
|
+
export type SubTokensTokenConfig = z.infer<typeof SubTokensTokenConfigSchema>;
|
|
22161
|
+
export declare const SubTokensModuleConfigSchema: z.ZodObject<{
|
|
22162
22162
|
palletId: z.ZodOptional<z.ZodString>;
|
|
22163
22163
|
}, z.core.$strict>;
|
|
22164
|
-
type SubTokensModuleConfig = z.infer<typeof SubTokensModuleConfigSchema>;
|
|
22165
|
-
declare const SubTokensMiniMetadataExtraSchema: z.ZodObject<{
|
|
22164
|
+
export type SubTokensModuleConfig = z.infer<typeof SubTokensModuleConfigSchema>;
|
|
22165
|
+
export declare const SubTokensMiniMetadataExtraSchema: z.ZodObject<{
|
|
22166
22166
|
palletId: z.ZodString;
|
|
22167
22167
|
}, z.core.$strict>;
|
|
22168
|
-
type SubTokensMiniMetadataExtra = z.infer<typeof SubTokensMiniMetadataExtraSchema>;
|
|
22168
|
+
export type SubTokensMiniMetadataExtra = z.infer<typeof SubTokensMiniMetadataExtraSchema>;
|
|
22169
22169
|
//#endregion
|
|
22170
22170
|
//#region src/modules/substrate-tokens/config.d.ts
|
|
22171
22171
|
declare const MODULE_TYPE: "substrate-tokens";
|
|
22172
22172
|
//#endregion
|
|
22173
22173
|
//#region src/modules/substrate-tokens/module.d.ts
|
|
22174
|
-
declare const SubTokensBalanceModule: IBalanceModule<typeof MODULE_TYPE, SubTokensTokenConfig, SubTokensModuleConfig, SubTokensMiniMetadataExtra>;
|
|
22174
|
+
export declare const SubTokensBalanceModule: IBalanceModule<typeof MODULE_TYPE, SubTokensTokenConfig, SubTokensModuleConfig, SubTokensMiniMetadataExtra>;
|
|
22175
22175
|
//#endregion
|
|
22176
22176
|
//#region src/modules/index.d.ts
|
|
22177
|
-
declare const BALANCE_MODULES: (IBalanceModule<"evm-erc20", {
|
|
22177
|
+
export declare const BALANCE_MODULES: (IBalanceModule<"evm-erc20", {
|
|
22178
22178
|
networkId?: string | undefined;
|
|
22179
22179
|
isDefault?: boolean | undefined;
|
|
22180
22180
|
decimals?: number | undefined;
|
|
@@ -22327,7 +22327,7 @@ declare const BALANCE_MODULES: (IBalanceModule<"evm-erc20", {
|
|
|
22327
22327
|
}, {
|
|
22328
22328
|
palletId: string;
|
|
22329
22329
|
}>)[];
|
|
22330
|
-
type AnyBalanceModule = (typeof BALANCE_MODULES)[number];
|
|
22330
|
+
export type AnyBalanceModule = (typeof BALANCE_MODULES)[number];
|
|
22331
22331
|
//#endregion
|
|
22332
|
-
export {
|
|
22332
|
+
export { type DTaoClaimTarget, type DTaoConvictionLockInfo, MINIMETADATA_VERSION };
|
|
22333
22333
|
//# sourceMappingURL=index.d.ts.map
|