@forevermoney/sdk 0.1.0 → 0.4.0
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/CHANGELOG.md +64 -0
- package/README.md +113 -5
- package/dist/index.cjs +646 -245
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +87 -32
- package/dist/index.d.ts +87 -32
- package/dist/index.js +655 -231
- package/dist/index.js.map +1 -1
- package/examples/viem.ts +64 -0
- package/package.json +8 -9
package/dist/index.d.cts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Address, Hex, PublicClient, Chain } from 'viem';
|
|
2
2
|
|
|
3
|
-
declare function normalizeEvmAddress(value: string):
|
|
3
|
+
declare function normalizeEvmAddress(value: string): Address;
|
|
4
4
|
declare function evmToMirrorSS58(evmAddress: string): string;
|
|
5
5
|
declare function normalizeSS58(value: string): string;
|
|
6
6
|
declare function isBittensorSS58(value: string): boolean;
|
|
7
|
-
declare function ss58ToPublicKey(value: string):
|
|
7
|
+
declare function ss58ToPublicKey(value: string): Hex;
|
|
8
8
|
|
|
9
9
|
declare const BASIS_POINTS = 10000n;
|
|
10
10
|
declare const NETWORK_FEE_BUFFER_BPS = 200n;
|
|
@@ -16,12 +16,12 @@ declare function feeWithBuffer(fee: bigint): bigint;
|
|
|
16
16
|
declare function gasLimitWithBuffer(gasLimit: bigint): bigint;
|
|
17
17
|
|
|
18
18
|
declare const foreverMoneyAbis: Readonly<{
|
|
19
|
-
alphaGateway: readonly ["function ROUTER() view returns (address)", "function allowedLane(uint64 selector) view returns (bool)", "function quoteBridgeOut(uint64 destSelector,address token,address recipient,uint256 mintedAmount) view returns (uint256 fee)", "function bridgeOut(uint64 destSelector,address token,address recipient,uint256 taoAmount,uint256 stakedAlphaRao,uint256 minTokenOut) payable returns (bytes32 messageId)", "function claimLiquid(address token,uint256 minTaoOut,address to)", "function claimNative(address to)", "function claimStaked(address token,bytes32 destColdkey,address to)", "function claimToken(address token,address to)", "function claimableNative(address account) view returns (uint256)", "function claimableToken(address
|
|
19
|
+
alphaGateway: readonly ["function ROUTER() view returns (address)", "function allowedLane(uint64 selector) view returns (bool)", "function maxIntegratorFeeBps() view returns (uint16)", "function bridgeFeeBps() view returns (uint16)", "function integratorTaoTopUp(uint256 taoAmount,uint16 bps) pure returns (uint256)", "function quoteBridgeOut(uint64 destSelector,address token,address recipient,uint256 mintedAmount) view returns (uint256 fee)", "function bridgeOut(uint64 destSelector,address token,address recipient,uint256 taoAmount,uint256 stakedAlphaRao,uint256 minTokenOut) payable returns (bytes32 messageId)", "function integratorCut(uint256 amount,uint16 bps) pure returns (uint256)", "function quoteBridgeOutWithFee(uint64 destSelector,address token,address recipient,uint256 mintedAmount,uint256 taoAmount,uint256 stakedAlphaRao,(address recipient,uint16 bps) integrator) view returns (uint256 fee,uint256 nativeTopUp,uint256 alphaTopUp,uint256 amountCrossing)", "function bridgeOutWithFee(uint64 destSelector,address token,address recipient,uint256 taoAmount,uint256 stakedAlphaRao,uint256 minTokenOut,(address recipient,uint16 bps) integrator) payable returns (bytes32 messageId)", "function claimLiquid(address token,uint256 minTaoOut,address to)", "function claimNative(address to)", "function claimStaked(address token,bytes32 destColdkey,address to)", "function claimToken(address token,address to)", "function claimableNative(address account) view returns (uint256)", "function claimableToken(address token,address account) view returns (uint256)", "event BridgedOut(uint64 destChainSelector,address indexed token,address indexed sender,address indexed recipient,uint256 minted,bytes32 messageId)", "event Claimable(address indexed token,address indexed user,uint256 native,uint256 wsn)", "event NotDelivered(uint64 indexed sourceChainSelector,address indexed token,uint256 amount,uint8 reason)", "event DeliveredLiquid(address indexed token,bytes32 indexed ss58,uint256 taoOut)", "event DeliveredStaked(address indexed token,bytes32 indexed ss58,uint256 alphaRao)"];
|
|
20
20
|
alphaVault: readonly ["function isPaused() view returns (bool)", "function pausedUntil() view returns (uint256)", "function isListed(address token) view returns (bool)", "function backing(address token) view returns (uint256 stakedAlpha)", "function positionOf(address token) view returns (bytes32 validator,uint256 netuid)"];
|
|
21
21
|
ccipExecution: readonly ["event ExecutionStateChanged(uint64 indexed sourceChainSelector,uint64 indexed sequenceNumber,bytes32 indexed messageId,bytes32 messageHash,uint8 state,bytes returnData,uint256 gasUsed)"];
|
|
22
22
|
ccipRouter: readonly ["function isOffRamp(uint64 sourceChainSelector,address offRamp) view returns (bool)"];
|
|
23
23
|
erc20: readonly ["function allowance(address owner,address spender) view returns (uint256)", "function approve(address spender,uint256 amount) returns (bool)", "function balanceOf(address account) view returns (uint256)"];
|
|
24
|
-
spokeGateway: readonly ["function ROUTER() view returns (address)", "function BITTENSOR_SELECTOR() view returns (uint64)", "function SUBTENSOR_GATEWAY() view returns (address)", "function quoteBridgeToFinney(address token,uint256 amount,(bytes32 ss58,address evmFallback,bool wantLiquid,uint256 minTaoOut) exit) view returns (uint256 fee)", "function bridgeToFinney(address token,uint256 amount,(bytes32 ss58,address evmFallback,bool wantLiquid,uint256 minTaoOut) exit) payable returns (bytes32 messageId)", "event BridgedToFinney(address indexed token,address indexed sender,bytes32 indexed ss58,uint256 amount,bytes32 messageId)"];
|
|
24
|
+
spokeGateway: readonly ["function ROUTER() view returns (address)", "function BITTENSOR_SELECTOR() view returns (uint64)", "function SUBTENSOR_GATEWAY() view returns (address)", "function maxIntegratorFeeBps() view returns (uint16)", "function bridgeFeeBps() view returns (uint16)", "function quoteBridgeToFinney(address token,uint256 amount,(bytes32 ss58,address evmFallback,bool wantLiquid,uint256 minTaoOut) exit) view returns (uint256 fee)", "function bridgeToFinney(address token,uint256 amount,(bytes32 ss58,address evmFallback,bool wantLiquid,uint256 minTaoOut) exit) payable returns (bytes32 messageId)", "function quoteBridgeToFinneyWithFee(address token,uint256 amount,(bytes32 ss58,address evmFallback,bool wantLiquid,uint256 minTaoOut) exit,uint256 gasLimit,(address recipient,uint16 bps) integrator) view returns (uint256 fee,uint256 cut,uint256 amountCrossing)", "function bridgeToFinneyWithFee(address token,uint256 amount,(bytes32 ss58,address evmFallback,bool wantLiquid,uint256 minTaoOut) exit,uint256 gasLimit,(address recipient,uint16 bps) integrator) payable returns (bytes32 messageId)", "event BridgedToFinney(address indexed token,address indexed sender,bytes32 indexed ss58,uint256 amount,bytes32 messageId)"];
|
|
25
25
|
staking: readonly ["function allowance(address sourceAddress,address spenderAddress,uint256 netuid) view returns (uint256)", "function approve(address spenderAddress,uint256 netuid,uint256 absoluteAmount)", "function getStake(bytes32 hotkey,bytes32 coldkey,uint256 netuid) view returns (uint256)"];
|
|
26
26
|
vaultFactory: readonly ["function create(address owner,bytes32 associatedMiner,address akAddress,address poolManager,address poolAddress,address positionManagerImpl,(address token,uint256 amount)[] stashTokens) payable returns (address manager)", "event SnLiquidityManagerCreated(address indexed manager,address indexed owner,bytes32 associatedMiner,address akAddress,address poolAddress,address poolManager,address positionManager)"];
|
|
27
27
|
vaultManager: readonly ["function claimFees(address akAddress)", "function topUpAk(address akAddress,address token,uint256 amount) payable", "function withdrawFromAkAndPositions(address akAddress,uint256 amount0,uint256 amount1,uint256[] decreaseTokenIds,bool unwrapETH)", "function stake(address akAddress,bytes data)", "function unstake(address akAddress,bytes data)", "function owner() view returns (address)", "event AKStashTopUp(address akAddress,address token,uint256 amount)", "event AKStashWithdraw(address akAddress,address token,uint256 amount)"];
|
|
@@ -35,23 +35,26 @@ declare const ROBINHOOD_CCIP_SELECTOR = 6180753054346818345n;
|
|
|
35
35
|
declare const SUBTENSOR_CCIP_SELECTOR = 2135107236357186872n;
|
|
36
36
|
declare const RAO_PER_TAO = 1000000000n;
|
|
37
37
|
declare const EVM_WEI_PER_RAO = 1000000000n;
|
|
38
|
-
declare const
|
|
38
|
+
declare const SN80_NETUID = 80n;
|
|
39
|
+
declare const FOREVERMONEY_DEPLOYMENT_VERSION: "1.2.0";
|
|
39
40
|
declare const foreverMoneyDeployment: Readonly<{
|
|
40
|
-
version: "1.
|
|
41
|
+
version: "1.2.0";
|
|
41
42
|
base: Readonly<{
|
|
42
43
|
key: "base";
|
|
43
44
|
name: "Base";
|
|
44
45
|
chainId: 8453;
|
|
45
46
|
ccipSelector: 15971525489660198786n;
|
|
46
47
|
contracts: Readonly<{
|
|
47
|
-
gateway: string
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
48
|
+
gateway: `0x${string}`;
|
|
49
|
+
legacyGateway: `0x${string}`;
|
|
50
|
+
wrappedTao: `0x${string}`;
|
|
51
|
+
wrappedSn80: `0x${string}`;
|
|
52
|
+
ccipRouter: `0x${string}`;
|
|
53
|
+
ccipOffRampFromSubtensor: `0x${string}`;
|
|
54
|
+
vaultFactory: `0x${string}`;
|
|
55
|
+
vaultManagerImplementation: `0x${string}`;
|
|
56
|
+
batchLiquidityManagerQuery: `0x${string}`;
|
|
57
|
+
weth: `0x${string}`;
|
|
55
58
|
}>;
|
|
56
59
|
deploymentBlock: 50098800;
|
|
57
60
|
}>;
|
|
@@ -61,23 +64,26 @@ declare const foreverMoneyDeployment: Readonly<{
|
|
|
61
64
|
chainId: 4663;
|
|
62
65
|
ccipSelector: 6180753054346818345n;
|
|
63
66
|
contracts: Readonly<{
|
|
64
|
-
gateway: string
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
67
|
+
gateway: `0x${string}`;
|
|
68
|
+
legacyGateway: `0x${string}`;
|
|
69
|
+
wrappedTao: `0x${string}`;
|
|
70
|
+
ccipRouter: `0x${string}`;
|
|
71
|
+
ccipOffRampFromSubtensor: `0x${string}`;
|
|
68
72
|
}>;
|
|
69
73
|
}>;
|
|
70
74
|
subtensor: Readonly<{
|
|
71
75
|
chainId: 964;
|
|
72
76
|
ccipSelector: 2135107236357186872n;
|
|
73
77
|
contracts: Readonly<{
|
|
74
|
-
gateway: string
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
78
|
+
gateway: `0x${string}`;
|
|
79
|
+
legacyGateway: `0x${string}`;
|
|
80
|
+
alphaVault: `0x${string}`;
|
|
81
|
+
wrappedTao: `0x${string}`;
|
|
82
|
+
wrappedSn80: `0x${string}`;
|
|
83
|
+
ccipRouter: `0x${string}`;
|
|
84
|
+
ccipOffRampFromBase: `0x${string}`;
|
|
85
|
+
ccipOffRampFromRobinhood: `0x${string}`;
|
|
86
|
+
stakingPrecompile: `0x${string}`;
|
|
81
87
|
}>;
|
|
82
88
|
}>;
|
|
83
89
|
}>;
|
|
@@ -111,10 +117,25 @@ interface TransactionPlan {
|
|
|
111
117
|
|
|
112
118
|
declare const MIN_LIQUID_EVM_TO_SUBTENSOR_WEI = 10000000000000000n;
|
|
113
119
|
declare const MIN_LIQUID_BASE_TO_SUBTENSOR_WEI = 10000000000000000n;
|
|
120
|
+
declare const MIN_LIQUID_SUBTENSOR_TO_EVM_WEI: bigint;
|
|
114
121
|
type SubtensorDelivery = 'liquid' | 'staked';
|
|
115
122
|
type SubtensorSource = 'liquid' | 'staked';
|
|
123
|
+
type BridgeAsset = 'tao' | 'sn80';
|
|
124
|
+
/**
|
|
125
|
+
* Optional partner (integrator) fee, charged ON TOP of the bridged amount and
|
|
126
|
+
* paid to `recipient` on the source chain. The full `amountWei` still crosses.
|
|
127
|
+
* `bps` is in basis points (1 = 0.01%); the gateway caps it at
|
|
128
|
+
* `maxIntegratorFeeBps`, which `prepare*` reads and enforces.
|
|
129
|
+
*/
|
|
130
|
+
interface PartnerFee {
|
|
131
|
+
readonly recipient: string;
|
|
132
|
+
readonly bps: number;
|
|
133
|
+
}
|
|
134
|
+
declare const MAX_PARTNER_FEE_BPS = 10000;
|
|
116
135
|
interface EvmToSubtensorRequest {
|
|
117
136
|
readonly evmChain: ForeverMoneyEvmChain;
|
|
137
|
+
readonly asset?: BridgeAsset;
|
|
138
|
+
readonly partnerFee?: PartnerFee;
|
|
118
139
|
readonly sender: string;
|
|
119
140
|
readonly amountWei: bigint;
|
|
120
141
|
readonly destination: string;
|
|
@@ -122,6 +143,8 @@ interface EvmToSubtensorRequest {
|
|
|
122
143
|
}
|
|
123
144
|
interface SubtensorToEvmRequest {
|
|
124
145
|
readonly evmChain: ForeverMoneyEvmChain;
|
|
146
|
+
readonly asset?: BridgeAsset;
|
|
147
|
+
readonly partnerFee?: PartnerFee;
|
|
125
148
|
readonly sender: string;
|
|
126
149
|
readonly recipient: string;
|
|
127
150
|
readonly amountWei: bigint;
|
|
@@ -133,8 +156,18 @@ type SubtensorToBaseRequest = Omit<SubtensorToEvmRequest, 'evmChain'>;
|
|
|
133
156
|
interface BridgePreparation {
|
|
134
157
|
readonly exactNetworkFeeWei: bigint;
|
|
135
158
|
readonly transactionValueWei: bigint;
|
|
159
|
+
/**
|
|
160
|
+
* Extra the sender pays for the partner fee, in the units of the source leg:
|
|
161
|
+
* token wei for an EVM source, alpha (as 18-decimal wei) for a staked source,
|
|
162
|
+
* TAO wei for a liquid source. Zero when no partner fee is set.
|
|
163
|
+
*/
|
|
164
|
+
readonly partnerFeeWei: bigint;
|
|
136
165
|
readonly plan: TransactionPlan;
|
|
137
166
|
}
|
|
167
|
+
/** `bps` of `amount`, rounded down: the extra token (spoke) or alpha (hub) pulled on top. */
|
|
168
|
+
declare function partnerFeeCut(amount: bigint, bps: number): bigint;
|
|
169
|
+
/** Extra native TAO a liquid Subtensor source carries for the partner, rounded up to a whole RAO. */
|
|
170
|
+
declare function partnerFeeTaoTopUp(taoAmount: bigint, bps: number): bigint;
|
|
138
171
|
interface BuildEvmToSubtensorPlanRequest extends EvmToSubtensorRequest {
|
|
139
172
|
readonly allowanceWei: bigint;
|
|
140
173
|
readonly exactNetworkFeeWei: bigint;
|
|
@@ -164,6 +197,11 @@ interface HttpTransportOptions {
|
|
|
164
197
|
readonly fetch?: typeof globalThis.fetch;
|
|
165
198
|
}
|
|
166
199
|
declare function http(url: string, options?: HttpTransportOptions): RpcTransport;
|
|
200
|
+
/** Minimal structural interface implemented by ethers JSON-RPC providers. */
|
|
201
|
+
interface LegacyRpcProvider {
|
|
202
|
+
send(method: string, params: unknown[]): Promise<unknown>;
|
|
203
|
+
}
|
|
204
|
+
type TrackingProvider = PublicClient | LegacyRpcProvider;
|
|
167
205
|
|
|
168
206
|
interface VaultStashToken {
|
|
169
207
|
readonly token: string;
|
|
@@ -260,9 +298,9 @@ type BridgeSourceStatus = (BridgeSourceStatusBase & {
|
|
|
260
298
|
});
|
|
261
299
|
declare function destinationChainId(direction: BridgeDirection): number;
|
|
262
300
|
declare function sourceChainId(direction: BridgeDirection): number;
|
|
263
|
-
declare function getBridgeSourceStatus(provider:
|
|
264
|
-
declare function getCcipDeliveryCheckpoint(provider:
|
|
265
|
-
declare function getCcipDeliveryStatus(provider:
|
|
301
|
+
declare function getBridgeSourceStatus(provider: TrackingProvider, input: BridgeSourceStatusRequest): Promise<BridgeSourceStatus>;
|
|
302
|
+
declare function getCcipDeliveryCheckpoint(provider: TrackingProvider, direction: BridgeDirection): Promise<CcipDeliveryCheckpoint>;
|
|
303
|
+
declare function getCcipDeliveryStatus(provider: TrackingProvider, input: CcipDeliveryStatusRequest): Promise<CcipDeliveryStatus>;
|
|
266
304
|
|
|
267
305
|
interface ForeverMoneyClientOptions {
|
|
268
306
|
readonly transports: {
|
|
@@ -289,7 +327,7 @@ interface ForeverMoneyClient {
|
|
|
289
327
|
}
|
|
290
328
|
declare function createForeverMoneyClient(options: ForeverMoneyClientOptions): ForeverMoneyClient;
|
|
291
329
|
|
|
292
|
-
type ForeverMoneyErrorCode = 'AMOUNT_BELOW_MINIMUM' | 'AMOUNT_NOT_WHOLE_RAO' | 'AMOUNT_ZERO' | 'CHAIN_MISMATCH' | 'INVALID_ADDRESS' | 'INVALID_BYTES32' | 'INVALID_PROVIDER_RESPONSE' | 'INVALID_SS58' | 'INVALID_TRANSACTION_PLAN' | 'MISSING_TRANSPORT' | 'RPC_ERROR' | 'SIMULATION_REVERTED';
|
|
330
|
+
type ForeverMoneyErrorCode = 'AMOUNT_BELOW_MINIMUM' | 'AMOUNT_NOT_WHOLE_RAO' | 'AMOUNT_ZERO' | 'CHAIN_MISMATCH' | 'INVALID_ADDRESS' | 'INVALID_BYTES32' | 'INVALID_PARTNER_FEE' | 'INVALID_PROVIDER_RESPONSE' | 'INVALID_SS58' | 'INVALID_TRANSACTION_PLAN' | 'MISSING_TRANSPORT' | 'RPC_ERROR' | 'SIMULATION_REVERTED';
|
|
293
331
|
declare class ForeverMoneyError extends Error {
|
|
294
332
|
readonly code: ForeverMoneyErrorCode;
|
|
295
333
|
readonly details: Readonly<Record<string, unknown>> | undefined;
|
|
@@ -306,6 +344,23 @@ interface Eip1193TransactionRequest {
|
|
|
306
344
|
readonly gas?: string;
|
|
307
345
|
}
|
|
308
346
|
declare function toEip1193Transaction(transaction: PreparedTransaction): Eip1193TransactionRequest;
|
|
309
|
-
declare function toEthersTransaction(transaction: PreparedTransaction): Readonly<
|
|
347
|
+
declare function toEthersTransaction(transaction: PreparedTransaction): Readonly<EthersCompatibleTransactionRequest>;
|
|
348
|
+
interface EthersCompatibleTransactionRequest {
|
|
349
|
+
readonly chainId: number;
|
|
350
|
+
readonly to: string;
|
|
351
|
+
readonly data: string;
|
|
352
|
+
readonly value: bigint;
|
|
353
|
+
readonly gasLimit?: bigint;
|
|
354
|
+
}
|
|
355
|
+
interface ViemTransactionRequest {
|
|
356
|
+
readonly chain: Chain;
|
|
357
|
+
readonly account: Address;
|
|
358
|
+
readonly chainId: number;
|
|
359
|
+
readonly to: Address;
|
|
360
|
+
readonly data: Hex;
|
|
361
|
+
readonly value: bigint;
|
|
362
|
+
readonly gas?: bigint;
|
|
363
|
+
}
|
|
364
|
+
declare function toViemTransaction(transaction: PreparedTransaction): Readonly<ViemTransactionRequest>;
|
|
310
365
|
|
|
311
|
-
export { BASE_CCIP_SELECTOR, BASE_CHAIN_ID, BASIS_POINTS, type BaseToSubtensorRequest, type BridgeDirection, type BridgePreparation, type BridgeSourceStatus, type BridgeSourceStatusRequest, type BridgeSourceTransactionStatus, type BuildBaseToSubtensorPlanRequest, type BuildEvmToSubtensorPlanRequest, type BuildSubtensorToBasePlanRequest, type BuildSubtensorToEvmPlanRequest, type CcipDeliveryCheckpoint, type CcipDeliveryStatus, type CcipDeliveryStatusRequest, type CreateVaultRequest, type DepositVaultRequest, EVM_WEI_PER_RAO, type Eip1193TransactionRequest, type EvmToSubtensorRequest, FOREVERMONEY_DEPLOYMENT_VERSION, type ForeverMoneyClient, type ForeverMoneyClientOptions, type ForeverMoneyDeployment, ForeverMoneyError, type ForeverMoneyErrorCode, type ForeverMoneyEvmChain, GAS_LIMIT_BUFFER_BPS, type HttpTransportOptions, MIN_LIQUID_BASE_TO_SUBTENSOR_WEI, MIN_LIQUID_EVM_TO_SUBTENSOR_WEI, NETWORK_FEE_BUFFER_BPS, type PreparedTransaction, RAO_PER_TAO, ROBINHOOD_CCIP_SELECTOR, ROBINHOOD_CHAIN_ID, type ReceiptLog, type RpcRequest, type RpcTransport, SUBTENSOR_CCIP_SELECTOR, SUBTENSOR_CHAIN_ID, type SubtensorDelivery, type SubtensorSource, type SubtensorToBaseRequest, type SubtensorToEvmRequest, type TransactionAction, type TransactionPlan, type TransactionReceiptLike, type TransactionStep, type TransactionStepKind, type VaultStashToken, type VaultTokenAllowance, type WithdrawVaultRequest, assertWholeRao, bridgeMessageIdFromReceipt, buildBaseToSubtensorPlan, buildClaimVaultFeesPlan, buildCreateVaultPlan, buildDepositVaultPlan, buildEvmToSubtensorPlan, buildSetVaultStakingPlan, buildSubtensorToBasePlan, buildSubtensorToEvmPlan, buildWithdrawVaultPlan, createForeverMoneyClient, destinationChainId, evmChainFromBridgeDirection, evmToMirrorSS58, feeWithBuffer, foreverMoneyAbis, foreverMoneyDeployment, formatTaoAmount, gasLimitWithBuffer, getBridgeSourceStatus, getCcipDeliveryCheckpoint, getCcipDeliveryStatus, getForeverMoneyEvmDeployment, http, isBittensorSS58, isEvmToSubtensorDirection, normalizeEvmAddress, normalizeSS58, parseTaoAmount, sourceChainId, ss58ToPublicKey, toEip1193Transaction, toEthersTransaction, vaultManagerFromCreationReceipt };
|
|
366
|
+
export { BASE_CCIP_SELECTOR, BASE_CHAIN_ID, BASIS_POINTS, type BaseToSubtensorRequest, type BridgeAsset, type BridgeDirection, type BridgePreparation, type BridgeSourceStatus, type BridgeSourceStatusRequest, type BridgeSourceTransactionStatus, type BuildBaseToSubtensorPlanRequest, type BuildEvmToSubtensorPlanRequest, type BuildSubtensorToBasePlanRequest, type BuildSubtensorToEvmPlanRequest, type CcipDeliveryCheckpoint, type CcipDeliveryStatus, type CcipDeliveryStatusRequest, type CreateVaultRequest, type DepositVaultRequest, EVM_WEI_PER_RAO, type Eip1193TransactionRequest, type EthersCompatibleTransactionRequest, type EvmToSubtensorRequest, FOREVERMONEY_DEPLOYMENT_VERSION, type ForeverMoneyClient, type ForeverMoneyClientOptions, type ForeverMoneyDeployment, ForeverMoneyError, type ForeverMoneyErrorCode, type ForeverMoneyEvmChain, GAS_LIMIT_BUFFER_BPS, type HttpTransportOptions, type LegacyRpcProvider, MAX_PARTNER_FEE_BPS, MIN_LIQUID_BASE_TO_SUBTENSOR_WEI, MIN_LIQUID_EVM_TO_SUBTENSOR_WEI, MIN_LIQUID_SUBTENSOR_TO_EVM_WEI, NETWORK_FEE_BUFFER_BPS, type PartnerFee, type PreparedTransaction, RAO_PER_TAO, ROBINHOOD_CCIP_SELECTOR, ROBINHOOD_CHAIN_ID, type ReceiptLog, type RpcRequest, type RpcTransport, SN80_NETUID, SUBTENSOR_CCIP_SELECTOR, SUBTENSOR_CHAIN_ID, type SubtensorDelivery, type SubtensorSource, type SubtensorToBaseRequest, type SubtensorToEvmRequest, type TrackingProvider, type TransactionAction, type TransactionPlan, type TransactionReceiptLike, type TransactionStep, type TransactionStepKind, type VaultStashToken, type VaultTokenAllowance, type ViemTransactionRequest, type WithdrawVaultRequest, assertWholeRao, bridgeMessageIdFromReceipt, buildBaseToSubtensorPlan, buildClaimVaultFeesPlan, buildCreateVaultPlan, buildDepositVaultPlan, buildEvmToSubtensorPlan, buildSetVaultStakingPlan, buildSubtensorToBasePlan, buildSubtensorToEvmPlan, buildWithdrawVaultPlan, createForeverMoneyClient, destinationChainId, evmChainFromBridgeDirection, evmToMirrorSS58, feeWithBuffer, foreverMoneyAbis, foreverMoneyDeployment, formatTaoAmount, gasLimitWithBuffer, getBridgeSourceStatus, getCcipDeliveryCheckpoint, getCcipDeliveryStatus, getForeverMoneyEvmDeployment, http, isBittensorSS58, isEvmToSubtensorDirection, normalizeEvmAddress, normalizeSS58, parseTaoAmount, partnerFeeCut, partnerFeeTaoTopUp, sourceChainId, ss58ToPublicKey, toEip1193Transaction, toEthersTransaction, toViemTransaction, vaultManagerFromCreationReceipt };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Address, Hex, PublicClient, Chain } from 'viem';
|
|
2
2
|
|
|
3
|
-
declare function normalizeEvmAddress(value: string):
|
|
3
|
+
declare function normalizeEvmAddress(value: string): Address;
|
|
4
4
|
declare function evmToMirrorSS58(evmAddress: string): string;
|
|
5
5
|
declare function normalizeSS58(value: string): string;
|
|
6
6
|
declare function isBittensorSS58(value: string): boolean;
|
|
7
|
-
declare function ss58ToPublicKey(value: string):
|
|
7
|
+
declare function ss58ToPublicKey(value: string): Hex;
|
|
8
8
|
|
|
9
9
|
declare const BASIS_POINTS = 10000n;
|
|
10
10
|
declare const NETWORK_FEE_BUFFER_BPS = 200n;
|
|
@@ -16,12 +16,12 @@ declare function feeWithBuffer(fee: bigint): bigint;
|
|
|
16
16
|
declare function gasLimitWithBuffer(gasLimit: bigint): bigint;
|
|
17
17
|
|
|
18
18
|
declare const foreverMoneyAbis: Readonly<{
|
|
19
|
-
alphaGateway: readonly ["function ROUTER() view returns (address)", "function allowedLane(uint64 selector) view returns (bool)", "function quoteBridgeOut(uint64 destSelector,address token,address recipient,uint256 mintedAmount) view returns (uint256 fee)", "function bridgeOut(uint64 destSelector,address token,address recipient,uint256 taoAmount,uint256 stakedAlphaRao,uint256 minTokenOut) payable returns (bytes32 messageId)", "function claimLiquid(address token,uint256 minTaoOut,address to)", "function claimNative(address to)", "function claimStaked(address token,bytes32 destColdkey,address to)", "function claimToken(address token,address to)", "function claimableNative(address account) view returns (uint256)", "function claimableToken(address
|
|
19
|
+
alphaGateway: readonly ["function ROUTER() view returns (address)", "function allowedLane(uint64 selector) view returns (bool)", "function maxIntegratorFeeBps() view returns (uint16)", "function bridgeFeeBps() view returns (uint16)", "function integratorTaoTopUp(uint256 taoAmount,uint16 bps) pure returns (uint256)", "function quoteBridgeOut(uint64 destSelector,address token,address recipient,uint256 mintedAmount) view returns (uint256 fee)", "function bridgeOut(uint64 destSelector,address token,address recipient,uint256 taoAmount,uint256 stakedAlphaRao,uint256 minTokenOut) payable returns (bytes32 messageId)", "function integratorCut(uint256 amount,uint16 bps) pure returns (uint256)", "function quoteBridgeOutWithFee(uint64 destSelector,address token,address recipient,uint256 mintedAmount,uint256 taoAmount,uint256 stakedAlphaRao,(address recipient,uint16 bps) integrator) view returns (uint256 fee,uint256 nativeTopUp,uint256 alphaTopUp,uint256 amountCrossing)", "function bridgeOutWithFee(uint64 destSelector,address token,address recipient,uint256 taoAmount,uint256 stakedAlphaRao,uint256 minTokenOut,(address recipient,uint16 bps) integrator) payable returns (bytes32 messageId)", "function claimLiquid(address token,uint256 minTaoOut,address to)", "function claimNative(address to)", "function claimStaked(address token,bytes32 destColdkey,address to)", "function claimToken(address token,address to)", "function claimableNative(address account) view returns (uint256)", "function claimableToken(address token,address account) view returns (uint256)", "event BridgedOut(uint64 destChainSelector,address indexed token,address indexed sender,address indexed recipient,uint256 minted,bytes32 messageId)", "event Claimable(address indexed token,address indexed user,uint256 native,uint256 wsn)", "event NotDelivered(uint64 indexed sourceChainSelector,address indexed token,uint256 amount,uint8 reason)", "event DeliveredLiquid(address indexed token,bytes32 indexed ss58,uint256 taoOut)", "event DeliveredStaked(address indexed token,bytes32 indexed ss58,uint256 alphaRao)"];
|
|
20
20
|
alphaVault: readonly ["function isPaused() view returns (bool)", "function pausedUntil() view returns (uint256)", "function isListed(address token) view returns (bool)", "function backing(address token) view returns (uint256 stakedAlpha)", "function positionOf(address token) view returns (bytes32 validator,uint256 netuid)"];
|
|
21
21
|
ccipExecution: readonly ["event ExecutionStateChanged(uint64 indexed sourceChainSelector,uint64 indexed sequenceNumber,bytes32 indexed messageId,bytes32 messageHash,uint8 state,bytes returnData,uint256 gasUsed)"];
|
|
22
22
|
ccipRouter: readonly ["function isOffRamp(uint64 sourceChainSelector,address offRamp) view returns (bool)"];
|
|
23
23
|
erc20: readonly ["function allowance(address owner,address spender) view returns (uint256)", "function approve(address spender,uint256 amount) returns (bool)", "function balanceOf(address account) view returns (uint256)"];
|
|
24
|
-
spokeGateway: readonly ["function ROUTER() view returns (address)", "function BITTENSOR_SELECTOR() view returns (uint64)", "function SUBTENSOR_GATEWAY() view returns (address)", "function quoteBridgeToFinney(address token,uint256 amount,(bytes32 ss58,address evmFallback,bool wantLiquid,uint256 minTaoOut) exit) view returns (uint256 fee)", "function bridgeToFinney(address token,uint256 amount,(bytes32 ss58,address evmFallback,bool wantLiquid,uint256 minTaoOut) exit) payable returns (bytes32 messageId)", "event BridgedToFinney(address indexed token,address indexed sender,bytes32 indexed ss58,uint256 amount,bytes32 messageId)"];
|
|
24
|
+
spokeGateway: readonly ["function ROUTER() view returns (address)", "function BITTENSOR_SELECTOR() view returns (uint64)", "function SUBTENSOR_GATEWAY() view returns (address)", "function maxIntegratorFeeBps() view returns (uint16)", "function bridgeFeeBps() view returns (uint16)", "function quoteBridgeToFinney(address token,uint256 amount,(bytes32 ss58,address evmFallback,bool wantLiquid,uint256 minTaoOut) exit) view returns (uint256 fee)", "function bridgeToFinney(address token,uint256 amount,(bytes32 ss58,address evmFallback,bool wantLiquid,uint256 minTaoOut) exit) payable returns (bytes32 messageId)", "function quoteBridgeToFinneyWithFee(address token,uint256 amount,(bytes32 ss58,address evmFallback,bool wantLiquid,uint256 minTaoOut) exit,uint256 gasLimit,(address recipient,uint16 bps) integrator) view returns (uint256 fee,uint256 cut,uint256 amountCrossing)", "function bridgeToFinneyWithFee(address token,uint256 amount,(bytes32 ss58,address evmFallback,bool wantLiquid,uint256 minTaoOut) exit,uint256 gasLimit,(address recipient,uint16 bps) integrator) payable returns (bytes32 messageId)", "event BridgedToFinney(address indexed token,address indexed sender,bytes32 indexed ss58,uint256 amount,bytes32 messageId)"];
|
|
25
25
|
staking: readonly ["function allowance(address sourceAddress,address spenderAddress,uint256 netuid) view returns (uint256)", "function approve(address spenderAddress,uint256 netuid,uint256 absoluteAmount)", "function getStake(bytes32 hotkey,bytes32 coldkey,uint256 netuid) view returns (uint256)"];
|
|
26
26
|
vaultFactory: readonly ["function create(address owner,bytes32 associatedMiner,address akAddress,address poolManager,address poolAddress,address positionManagerImpl,(address token,uint256 amount)[] stashTokens) payable returns (address manager)", "event SnLiquidityManagerCreated(address indexed manager,address indexed owner,bytes32 associatedMiner,address akAddress,address poolAddress,address poolManager,address positionManager)"];
|
|
27
27
|
vaultManager: readonly ["function claimFees(address akAddress)", "function topUpAk(address akAddress,address token,uint256 amount) payable", "function withdrawFromAkAndPositions(address akAddress,uint256 amount0,uint256 amount1,uint256[] decreaseTokenIds,bool unwrapETH)", "function stake(address akAddress,bytes data)", "function unstake(address akAddress,bytes data)", "function owner() view returns (address)", "event AKStashTopUp(address akAddress,address token,uint256 amount)", "event AKStashWithdraw(address akAddress,address token,uint256 amount)"];
|
|
@@ -35,23 +35,26 @@ declare const ROBINHOOD_CCIP_SELECTOR = 6180753054346818345n;
|
|
|
35
35
|
declare const SUBTENSOR_CCIP_SELECTOR = 2135107236357186872n;
|
|
36
36
|
declare const RAO_PER_TAO = 1000000000n;
|
|
37
37
|
declare const EVM_WEI_PER_RAO = 1000000000n;
|
|
38
|
-
declare const
|
|
38
|
+
declare const SN80_NETUID = 80n;
|
|
39
|
+
declare const FOREVERMONEY_DEPLOYMENT_VERSION: "1.2.0";
|
|
39
40
|
declare const foreverMoneyDeployment: Readonly<{
|
|
40
|
-
version: "1.
|
|
41
|
+
version: "1.2.0";
|
|
41
42
|
base: Readonly<{
|
|
42
43
|
key: "base";
|
|
43
44
|
name: "Base";
|
|
44
45
|
chainId: 8453;
|
|
45
46
|
ccipSelector: 15971525489660198786n;
|
|
46
47
|
contracts: Readonly<{
|
|
47
|
-
gateway: string
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
48
|
+
gateway: `0x${string}`;
|
|
49
|
+
legacyGateway: `0x${string}`;
|
|
50
|
+
wrappedTao: `0x${string}`;
|
|
51
|
+
wrappedSn80: `0x${string}`;
|
|
52
|
+
ccipRouter: `0x${string}`;
|
|
53
|
+
ccipOffRampFromSubtensor: `0x${string}`;
|
|
54
|
+
vaultFactory: `0x${string}`;
|
|
55
|
+
vaultManagerImplementation: `0x${string}`;
|
|
56
|
+
batchLiquidityManagerQuery: `0x${string}`;
|
|
57
|
+
weth: `0x${string}`;
|
|
55
58
|
}>;
|
|
56
59
|
deploymentBlock: 50098800;
|
|
57
60
|
}>;
|
|
@@ -61,23 +64,26 @@ declare const foreverMoneyDeployment: Readonly<{
|
|
|
61
64
|
chainId: 4663;
|
|
62
65
|
ccipSelector: 6180753054346818345n;
|
|
63
66
|
contracts: Readonly<{
|
|
64
|
-
gateway: string
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
67
|
+
gateway: `0x${string}`;
|
|
68
|
+
legacyGateway: `0x${string}`;
|
|
69
|
+
wrappedTao: `0x${string}`;
|
|
70
|
+
ccipRouter: `0x${string}`;
|
|
71
|
+
ccipOffRampFromSubtensor: `0x${string}`;
|
|
68
72
|
}>;
|
|
69
73
|
}>;
|
|
70
74
|
subtensor: Readonly<{
|
|
71
75
|
chainId: 964;
|
|
72
76
|
ccipSelector: 2135107236357186872n;
|
|
73
77
|
contracts: Readonly<{
|
|
74
|
-
gateway: string
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
78
|
+
gateway: `0x${string}`;
|
|
79
|
+
legacyGateway: `0x${string}`;
|
|
80
|
+
alphaVault: `0x${string}`;
|
|
81
|
+
wrappedTao: `0x${string}`;
|
|
82
|
+
wrappedSn80: `0x${string}`;
|
|
83
|
+
ccipRouter: `0x${string}`;
|
|
84
|
+
ccipOffRampFromBase: `0x${string}`;
|
|
85
|
+
ccipOffRampFromRobinhood: `0x${string}`;
|
|
86
|
+
stakingPrecompile: `0x${string}`;
|
|
81
87
|
}>;
|
|
82
88
|
}>;
|
|
83
89
|
}>;
|
|
@@ -111,10 +117,25 @@ interface TransactionPlan {
|
|
|
111
117
|
|
|
112
118
|
declare const MIN_LIQUID_EVM_TO_SUBTENSOR_WEI = 10000000000000000n;
|
|
113
119
|
declare const MIN_LIQUID_BASE_TO_SUBTENSOR_WEI = 10000000000000000n;
|
|
120
|
+
declare const MIN_LIQUID_SUBTENSOR_TO_EVM_WEI: bigint;
|
|
114
121
|
type SubtensorDelivery = 'liquid' | 'staked';
|
|
115
122
|
type SubtensorSource = 'liquid' | 'staked';
|
|
123
|
+
type BridgeAsset = 'tao' | 'sn80';
|
|
124
|
+
/**
|
|
125
|
+
* Optional partner (integrator) fee, charged ON TOP of the bridged amount and
|
|
126
|
+
* paid to `recipient` on the source chain. The full `amountWei` still crosses.
|
|
127
|
+
* `bps` is in basis points (1 = 0.01%); the gateway caps it at
|
|
128
|
+
* `maxIntegratorFeeBps`, which `prepare*` reads and enforces.
|
|
129
|
+
*/
|
|
130
|
+
interface PartnerFee {
|
|
131
|
+
readonly recipient: string;
|
|
132
|
+
readonly bps: number;
|
|
133
|
+
}
|
|
134
|
+
declare const MAX_PARTNER_FEE_BPS = 10000;
|
|
116
135
|
interface EvmToSubtensorRequest {
|
|
117
136
|
readonly evmChain: ForeverMoneyEvmChain;
|
|
137
|
+
readonly asset?: BridgeAsset;
|
|
138
|
+
readonly partnerFee?: PartnerFee;
|
|
118
139
|
readonly sender: string;
|
|
119
140
|
readonly amountWei: bigint;
|
|
120
141
|
readonly destination: string;
|
|
@@ -122,6 +143,8 @@ interface EvmToSubtensorRequest {
|
|
|
122
143
|
}
|
|
123
144
|
interface SubtensorToEvmRequest {
|
|
124
145
|
readonly evmChain: ForeverMoneyEvmChain;
|
|
146
|
+
readonly asset?: BridgeAsset;
|
|
147
|
+
readonly partnerFee?: PartnerFee;
|
|
125
148
|
readonly sender: string;
|
|
126
149
|
readonly recipient: string;
|
|
127
150
|
readonly amountWei: bigint;
|
|
@@ -133,8 +156,18 @@ type SubtensorToBaseRequest = Omit<SubtensorToEvmRequest, 'evmChain'>;
|
|
|
133
156
|
interface BridgePreparation {
|
|
134
157
|
readonly exactNetworkFeeWei: bigint;
|
|
135
158
|
readonly transactionValueWei: bigint;
|
|
159
|
+
/**
|
|
160
|
+
* Extra the sender pays for the partner fee, in the units of the source leg:
|
|
161
|
+
* token wei for an EVM source, alpha (as 18-decimal wei) for a staked source,
|
|
162
|
+
* TAO wei for a liquid source. Zero when no partner fee is set.
|
|
163
|
+
*/
|
|
164
|
+
readonly partnerFeeWei: bigint;
|
|
136
165
|
readonly plan: TransactionPlan;
|
|
137
166
|
}
|
|
167
|
+
/** `bps` of `amount`, rounded down: the extra token (spoke) or alpha (hub) pulled on top. */
|
|
168
|
+
declare function partnerFeeCut(amount: bigint, bps: number): bigint;
|
|
169
|
+
/** Extra native TAO a liquid Subtensor source carries for the partner, rounded up to a whole RAO. */
|
|
170
|
+
declare function partnerFeeTaoTopUp(taoAmount: bigint, bps: number): bigint;
|
|
138
171
|
interface BuildEvmToSubtensorPlanRequest extends EvmToSubtensorRequest {
|
|
139
172
|
readonly allowanceWei: bigint;
|
|
140
173
|
readonly exactNetworkFeeWei: bigint;
|
|
@@ -164,6 +197,11 @@ interface HttpTransportOptions {
|
|
|
164
197
|
readonly fetch?: typeof globalThis.fetch;
|
|
165
198
|
}
|
|
166
199
|
declare function http(url: string, options?: HttpTransportOptions): RpcTransport;
|
|
200
|
+
/** Minimal structural interface implemented by ethers JSON-RPC providers. */
|
|
201
|
+
interface LegacyRpcProvider {
|
|
202
|
+
send(method: string, params: unknown[]): Promise<unknown>;
|
|
203
|
+
}
|
|
204
|
+
type TrackingProvider = PublicClient | LegacyRpcProvider;
|
|
167
205
|
|
|
168
206
|
interface VaultStashToken {
|
|
169
207
|
readonly token: string;
|
|
@@ -260,9 +298,9 @@ type BridgeSourceStatus = (BridgeSourceStatusBase & {
|
|
|
260
298
|
});
|
|
261
299
|
declare function destinationChainId(direction: BridgeDirection): number;
|
|
262
300
|
declare function sourceChainId(direction: BridgeDirection): number;
|
|
263
|
-
declare function getBridgeSourceStatus(provider:
|
|
264
|
-
declare function getCcipDeliveryCheckpoint(provider:
|
|
265
|
-
declare function getCcipDeliveryStatus(provider:
|
|
301
|
+
declare function getBridgeSourceStatus(provider: TrackingProvider, input: BridgeSourceStatusRequest): Promise<BridgeSourceStatus>;
|
|
302
|
+
declare function getCcipDeliveryCheckpoint(provider: TrackingProvider, direction: BridgeDirection): Promise<CcipDeliveryCheckpoint>;
|
|
303
|
+
declare function getCcipDeliveryStatus(provider: TrackingProvider, input: CcipDeliveryStatusRequest): Promise<CcipDeliveryStatus>;
|
|
266
304
|
|
|
267
305
|
interface ForeverMoneyClientOptions {
|
|
268
306
|
readonly transports: {
|
|
@@ -289,7 +327,7 @@ interface ForeverMoneyClient {
|
|
|
289
327
|
}
|
|
290
328
|
declare function createForeverMoneyClient(options: ForeverMoneyClientOptions): ForeverMoneyClient;
|
|
291
329
|
|
|
292
|
-
type ForeverMoneyErrorCode = 'AMOUNT_BELOW_MINIMUM' | 'AMOUNT_NOT_WHOLE_RAO' | 'AMOUNT_ZERO' | 'CHAIN_MISMATCH' | 'INVALID_ADDRESS' | 'INVALID_BYTES32' | 'INVALID_PROVIDER_RESPONSE' | 'INVALID_SS58' | 'INVALID_TRANSACTION_PLAN' | 'MISSING_TRANSPORT' | 'RPC_ERROR' | 'SIMULATION_REVERTED';
|
|
330
|
+
type ForeverMoneyErrorCode = 'AMOUNT_BELOW_MINIMUM' | 'AMOUNT_NOT_WHOLE_RAO' | 'AMOUNT_ZERO' | 'CHAIN_MISMATCH' | 'INVALID_ADDRESS' | 'INVALID_BYTES32' | 'INVALID_PARTNER_FEE' | 'INVALID_PROVIDER_RESPONSE' | 'INVALID_SS58' | 'INVALID_TRANSACTION_PLAN' | 'MISSING_TRANSPORT' | 'RPC_ERROR' | 'SIMULATION_REVERTED';
|
|
293
331
|
declare class ForeverMoneyError extends Error {
|
|
294
332
|
readonly code: ForeverMoneyErrorCode;
|
|
295
333
|
readonly details: Readonly<Record<string, unknown>> | undefined;
|
|
@@ -306,6 +344,23 @@ interface Eip1193TransactionRequest {
|
|
|
306
344
|
readonly gas?: string;
|
|
307
345
|
}
|
|
308
346
|
declare function toEip1193Transaction(transaction: PreparedTransaction): Eip1193TransactionRequest;
|
|
309
|
-
declare function toEthersTransaction(transaction: PreparedTransaction): Readonly<
|
|
347
|
+
declare function toEthersTransaction(transaction: PreparedTransaction): Readonly<EthersCompatibleTransactionRequest>;
|
|
348
|
+
interface EthersCompatibleTransactionRequest {
|
|
349
|
+
readonly chainId: number;
|
|
350
|
+
readonly to: string;
|
|
351
|
+
readonly data: string;
|
|
352
|
+
readonly value: bigint;
|
|
353
|
+
readonly gasLimit?: bigint;
|
|
354
|
+
}
|
|
355
|
+
interface ViemTransactionRequest {
|
|
356
|
+
readonly chain: Chain;
|
|
357
|
+
readonly account: Address;
|
|
358
|
+
readonly chainId: number;
|
|
359
|
+
readonly to: Address;
|
|
360
|
+
readonly data: Hex;
|
|
361
|
+
readonly value: bigint;
|
|
362
|
+
readonly gas?: bigint;
|
|
363
|
+
}
|
|
364
|
+
declare function toViemTransaction(transaction: PreparedTransaction): Readonly<ViemTransactionRequest>;
|
|
310
365
|
|
|
311
|
-
export { BASE_CCIP_SELECTOR, BASE_CHAIN_ID, BASIS_POINTS, type BaseToSubtensorRequest, type BridgeDirection, type BridgePreparation, type BridgeSourceStatus, type BridgeSourceStatusRequest, type BridgeSourceTransactionStatus, type BuildBaseToSubtensorPlanRequest, type BuildEvmToSubtensorPlanRequest, type BuildSubtensorToBasePlanRequest, type BuildSubtensorToEvmPlanRequest, type CcipDeliveryCheckpoint, type CcipDeliveryStatus, type CcipDeliveryStatusRequest, type CreateVaultRequest, type DepositVaultRequest, EVM_WEI_PER_RAO, type Eip1193TransactionRequest, type EvmToSubtensorRequest, FOREVERMONEY_DEPLOYMENT_VERSION, type ForeverMoneyClient, type ForeverMoneyClientOptions, type ForeverMoneyDeployment, ForeverMoneyError, type ForeverMoneyErrorCode, type ForeverMoneyEvmChain, GAS_LIMIT_BUFFER_BPS, type HttpTransportOptions, MIN_LIQUID_BASE_TO_SUBTENSOR_WEI, MIN_LIQUID_EVM_TO_SUBTENSOR_WEI, NETWORK_FEE_BUFFER_BPS, type PreparedTransaction, RAO_PER_TAO, ROBINHOOD_CCIP_SELECTOR, ROBINHOOD_CHAIN_ID, type ReceiptLog, type RpcRequest, type RpcTransport, SUBTENSOR_CCIP_SELECTOR, SUBTENSOR_CHAIN_ID, type SubtensorDelivery, type SubtensorSource, type SubtensorToBaseRequest, type SubtensorToEvmRequest, type TransactionAction, type TransactionPlan, type TransactionReceiptLike, type TransactionStep, type TransactionStepKind, type VaultStashToken, type VaultTokenAllowance, type WithdrawVaultRequest, assertWholeRao, bridgeMessageIdFromReceipt, buildBaseToSubtensorPlan, buildClaimVaultFeesPlan, buildCreateVaultPlan, buildDepositVaultPlan, buildEvmToSubtensorPlan, buildSetVaultStakingPlan, buildSubtensorToBasePlan, buildSubtensorToEvmPlan, buildWithdrawVaultPlan, createForeverMoneyClient, destinationChainId, evmChainFromBridgeDirection, evmToMirrorSS58, feeWithBuffer, foreverMoneyAbis, foreverMoneyDeployment, formatTaoAmount, gasLimitWithBuffer, getBridgeSourceStatus, getCcipDeliveryCheckpoint, getCcipDeliveryStatus, getForeverMoneyEvmDeployment, http, isBittensorSS58, isEvmToSubtensorDirection, normalizeEvmAddress, normalizeSS58, parseTaoAmount, sourceChainId, ss58ToPublicKey, toEip1193Transaction, toEthersTransaction, vaultManagerFromCreationReceipt };
|
|
366
|
+
export { BASE_CCIP_SELECTOR, BASE_CHAIN_ID, BASIS_POINTS, type BaseToSubtensorRequest, type BridgeAsset, type BridgeDirection, type BridgePreparation, type BridgeSourceStatus, type BridgeSourceStatusRequest, type BridgeSourceTransactionStatus, type BuildBaseToSubtensorPlanRequest, type BuildEvmToSubtensorPlanRequest, type BuildSubtensorToBasePlanRequest, type BuildSubtensorToEvmPlanRequest, type CcipDeliveryCheckpoint, type CcipDeliveryStatus, type CcipDeliveryStatusRequest, type CreateVaultRequest, type DepositVaultRequest, EVM_WEI_PER_RAO, type Eip1193TransactionRequest, type EthersCompatibleTransactionRequest, type EvmToSubtensorRequest, FOREVERMONEY_DEPLOYMENT_VERSION, type ForeverMoneyClient, type ForeverMoneyClientOptions, type ForeverMoneyDeployment, ForeverMoneyError, type ForeverMoneyErrorCode, type ForeverMoneyEvmChain, GAS_LIMIT_BUFFER_BPS, type HttpTransportOptions, type LegacyRpcProvider, MAX_PARTNER_FEE_BPS, MIN_LIQUID_BASE_TO_SUBTENSOR_WEI, MIN_LIQUID_EVM_TO_SUBTENSOR_WEI, MIN_LIQUID_SUBTENSOR_TO_EVM_WEI, NETWORK_FEE_BUFFER_BPS, type PartnerFee, type PreparedTransaction, RAO_PER_TAO, ROBINHOOD_CCIP_SELECTOR, ROBINHOOD_CHAIN_ID, type ReceiptLog, type RpcRequest, type RpcTransport, SN80_NETUID, SUBTENSOR_CCIP_SELECTOR, SUBTENSOR_CHAIN_ID, type SubtensorDelivery, type SubtensorSource, type SubtensorToBaseRequest, type SubtensorToEvmRequest, type TrackingProvider, type TransactionAction, type TransactionPlan, type TransactionReceiptLike, type TransactionStep, type TransactionStepKind, type VaultStashToken, type VaultTokenAllowance, type ViemTransactionRequest, type WithdrawVaultRequest, assertWholeRao, bridgeMessageIdFromReceipt, buildBaseToSubtensorPlan, buildClaimVaultFeesPlan, buildCreateVaultPlan, buildDepositVaultPlan, buildEvmToSubtensorPlan, buildSetVaultStakingPlan, buildSubtensorToBasePlan, buildSubtensorToEvmPlan, buildWithdrawVaultPlan, createForeverMoneyClient, destinationChainId, evmChainFromBridgeDirection, evmToMirrorSS58, feeWithBuffer, foreverMoneyAbis, foreverMoneyDeployment, formatTaoAmount, gasLimitWithBuffer, getBridgeSourceStatus, getCcipDeliveryCheckpoint, getCcipDeliveryStatus, getForeverMoneyEvmDeployment, http, isBittensorSS58, isEvmToSubtensorDirection, normalizeEvmAddress, normalizeSS58, parseTaoAmount, partnerFeeCut, partnerFeeTaoTopUp, sourceChainId, ss58ToPublicKey, toEip1193Transaction, toEthersTransaction, toViemTransaction, vaultManagerFromCreationReceipt };
|