deploy-sdk 0.0.1

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.
@@ -0,0 +1 @@
1
+ var t=(r=>(r[r.ETHEREUM=1]="ETHEREUM",r[r.ARBITRUM=42161]="ARBITRUM",r))(t||{});export{t as a};
@@ -0,0 +1 @@
1
+ var a=class{constructor(e){this.privy=e;this.name="Privy"}async getProvider(){return this.privy.getEthereumProvider()}async getSigner(){return(await this.getProvider()).getSigner()}async isConnected(){return!!this.privy.user?.wallet?.address}};var i=class{constructor(e){this.ethereum=e;this.name="External"}async getProvider(){return this.ethereum}async getSigner(){return await this.ethereum.request({method:"eth_requestAccounts"}),this.ethereum}async isConnected(){try{return(await this.ethereum.request({method:"eth_accounts"})).length>0}catch{return!1}}async switchChain(e){let t=`0x${e.toString(16)}`;try{await this.ethereum.request({method:"wallet_switchEthereumChain",params:[{chainId:t}]})}catch(r){if(r.code===4902)await this.addChain(e);else throw r}}async addChain(e){let r={1:{chainId:"0x1",chainName:"Ethereum Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:["https://eth.llamarpc.com"],blockExplorerUrls:["https://etherscan.io"]},42161:{chainId:"0xa4b1",chainName:"Arbitrum One",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:["https://arb1.arbitrum.io/rpc"],blockExplorerUrls:["https://arbiscan.io"]}}[e];if(!r)throw new Error(`Chain ${e} not supported`);await this.ethereum.request({method:"wallet_addEthereumChain",params:[r]})}};export{a,i as b};
@@ -0,0 +1,192 @@
1
+ import { BigNumberish, BigNumber } from 'ethers';
2
+ import EventEmitter from 'eventemitter3';
3
+ import { C as CollateralAsset, S as StakeToken, b as SDKEvents, D as DeploySDKConfig, W as WalletAdapter, a as ChainId } from './base-DLLHDCZ5.mjs';
4
+
5
+ interface MintOrder {
6
+ orderId: string;
7
+ orderType: number;
8
+ expiry: number;
9
+ nonce: number;
10
+ benefactor: string;
11
+ beneficiary: string;
12
+ collateralAsset: string;
13
+ collateralAmount: string;
14
+ dAssetAmount: string;
15
+ minterAddress: string;
16
+ }
17
+ interface MintResult {
18
+ success: boolean;
19
+ orderId: string;
20
+ txHash?: string;
21
+ status?: string;
22
+ error?: string;
23
+ }
24
+ interface MintOptions {
25
+ expiryMinutes?: number;
26
+ benefactor?: string;
27
+ beneficiary?: string;
28
+ }
29
+ interface MintParams {
30
+ collateralAsset: CollateralAsset;
31
+ collateralAmount: BigNumberish;
32
+ dAssetAmount: BigNumberish;
33
+ options?: MintOptions;
34
+ }
35
+
36
+ declare class MintModule {
37
+ private sdk;
38
+ constructor(sdk: DeploySDK);
39
+ createOrder(collateralAsset: CollateralAsset, collateralAmount: BigNumberish, dAssetAmount: BigNumberish, options?: MintOptions): Promise<MintOrder>;
40
+ signOrder(order: MintOrder): Promise<string>;
41
+ submitOrder(order: MintOrder, signature: string): Promise<MintResult>;
42
+ mint(collateralAsset: CollateralAsset, collateralAmount: BigNumberish, dAssetAmount: BigNumberish, options?: MintOptions): Promise<MintResult>;
43
+ estimateGas(collateralAsset: CollateralAsset, collateralAmount: BigNumberish, dAssetAmount: BigNumberish, signature: string): Promise<bigint>;
44
+ }
45
+
46
+ interface StakeParams {
47
+ token: StakeToken;
48
+ amount: BigNumberish;
49
+ receiver?: string;
50
+ }
51
+ interface StakeResult {
52
+ success: boolean;
53
+ txHash?: string;
54
+ sharesReceived?: string;
55
+ error?: string;
56
+ }
57
+ interface StakingPosition {
58
+ tokenKey: string;
59
+ stakedAmount: string;
60
+ stakedValue: string;
61
+ cooldownEnd?: number;
62
+ canUnstake: boolean;
63
+ }
64
+ interface StakePreview {
65
+ shares: string;
66
+ assets: string;
67
+ }
68
+
69
+ declare class StakeModule {
70
+ private sdk;
71
+ constructor(sdk: DeploySDK);
72
+ stake(params: StakeParams): Promise<StakeResult>;
73
+ getPosition(token: StakeToken, userAddress?: string): Promise<StakingPosition>;
74
+ previewStake(token: StakeToken, amount: BigNumberish): Promise<StakePreview>;
75
+ getAPY(token: StakeToken): Promise<number>;
76
+ }
77
+
78
+ interface UnstakeParams {
79
+ token: StakeToken;
80
+ sharesAmount: BigNumberish;
81
+ receiver?: string;
82
+ }
83
+ interface UnstakeResult {
84
+ success: boolean;
85
+ txHash?: string;
86
+ assetsWithdrawn?: string;
87
+ error?: string;
88
+ }
89
+ interface CooldownResult {
90
+ success: boolean;
91
+ txHash?: string;
92
+ cooldownEnd?: number;
93
+ error?: string;
94
+ }
95
+ interface CooldownStatus {
96
+ cooldownEnd: number;
97
+ sharesInCooldown: string;
98
+ canUnstake: boolean;
99
+ }
100
+
101
+ declare class UnstakeModule {
102
+ private sdk;
103
+ constructor(sdk: DeploySDK);
104
+ initiateCooldown(token: StakeToken, sharesAmount: BigNumberish): Promise<CooldownResult>;
105
+ unstake(params: UnstakeParams): Promise<UnstakeResult>;
106
+ getCooldownStatus(token: StakeToken, userAddress?: string): Promise<CooldownStatus>;
107
+ previewUnstake(token: StakeToken, sharesAmount: BigNumberish): Promise<string>;
108
+ }
109
+
110
+ interface RedeemOrder {
111
+ orderId: string;
112
+ orderType: number;
113
+ expiry: number;
114
+ nonce: number;
115
+ benefactor: string;
116
+ beneficiary: string;
117
+ collateralAsset: string;
118
+ collateralAmount: string;
119
+ dAssetAmount: string;
120
+ minterAddress: string;
121
+ }
122
+ interface RedeemResult {
123
+ success: boolean;
124
+ orderId: string;
125
+ txHash?: string;
126
+ status?: string;
127
+ error?: string;
128
+ }
129
+ interface RedeemOptions {
130
+ expiryMinutes?: number;
131
+ benefactor?: string;
132
+ beneficiary?: string;
133
+ }
134
+
135
+ declare class RedeemModule {
136
+ private sdk;
137
+ constructor(sdk: DeploySDK);
138
+ createOrder(token: StakeToken, redeemAmount: BigNumberish, collateralAsset: string, collateralAmount: BigNumberish, options?: RedeemOptions): Promise<RedeemOrder>;
139
+ signOrder(order: RedeemOrder): Promise<string>;
140
+ submitOrder(order: RedeemOrder, signature: string): Promise<RedeemResult>;
141
+ redeem(token: StakeToken, redeemAmount: BigNumberish, collateralAsset: string, collateralAmount: BigNumberish, options?: RedeemOptions): Promise<RedeemResult>;
142
+ estimateGas(token: StakeToken, redeemAmount: BigNumberish, collateralAsset: string, collateralAmount: BigNumberish, signature: string): Promise<bigint>;
143
+ }
144
+
145
+ declare class AllowanceService {
146
+ private sdk;
147
+ constructor(sdk: DeploySDK);
148
+ getAllowance(tokenAddress: string, spenderAddress: string, ownerAddress?: string): Promise<BigNumber>;
149
+ approve(tokenAddress: string, spenderAddress: string, amount: BigNumberish): Promise<any>;
150
+ approveMax(tokenAddress: string, spenderAddress: string): Promise<any>;
151
+ hasSufficientAllowance(tokenAddress: string, spenderAddress: string, requiredAmount: BigNumberish): Promise<boolean>;
152
+ ensureAllowance(tokenAddress: string, spenderAddress: string, requiredAmount: BigNumberish, options?: {
153
+ approveMax?: boolean;
154
+ }): Promise<boolean>;
155
+ }
156
+
157
+ declare class BalanceService {
158
+ private sdk;
159
+ constructor(sdk: DeploySDK);
160
+ getTokenBalance(tokenAddress: string, userAddress?: string): Promise<BigNumber>;
161
+ getTokenDecimals(tokenAddress: string): Promise<number>;
162
+ getTokenSymbol(tokenAddress: string): Promise<string>;
163
+ getNativeBalance(userAddress?: string): Promise<BigNumber>;
164
+ hasSufficientBalance(tokenAddress: string, requiredAmount: BigNumberish): Promise<boolean>;
165
+ hasSufficientNativeBalance(requiredAmount: BigNumberish): Promise<boolean>;
166
+ }
167
+
168
+ declare class DeploySDK extends EventEmitter<SDKEvents> {
169
+ private _provider;
170
+ private _signer;
171
+ private _walletAdapter;
172
+ private _config;
173
+ private _isInitialized;
174
+ readonly mint: MintModule;
175
+ readonly stake: StakeModule;
176
+ readonly unstake: UnstakeModule;
177
+ readonly redeem: RedeemModule;
178
+ readonly allowance: AllowanceService;
179
+ readonly balances: BalanceService;
180
+ constructor(config: DeploySDKConfig);
181
+ initialize(adapter: WalletAdapter): Promise<void>;
182
+ get provider(): any;
183
+ get signer(): any;
184
+ get config(): DeploySDKConfig;
185
+ get isInitialized(): boolean;
186
+ getAddress(): Promise<string>;
187
+ getChainId(): Promise<number>;
188
+ switchChain(chainId: ChainId): Promise<void>;
189
+ disconnect(): Promise<void>;
190
+ }
191
+
192
+ export { AllowanceService as A, BalanceService as B, type CooldownResult as C, DeploySDK as D, MintModule as M, RedeemModule as R, StakeModule as S, UnstakeModule as U, type CooldownStatus as a, type MintOptions as b, type MintOrder as c, type MintParams as d, type MintResult as e, type RedeemOptions as f, type RedeemOrder as g, type RedeemResult as h, type StakeParams as i, type StakePreview as j, type StakeResult as k, type StakingPosition as l, type UnstakeParams as m, type UnstakeResult as n };
@@ -0,0 +1,192 @@
1
+ import { BigNumberish, BigNumber } from 'ethers';
2
+ import EventEmitter from 'eventemitter3';
3
+ import { C as CollateralAsset, S as StakeToken, b as SDKEvents, D as DeploySDKConfig, W as WalletAdapter, a as ChainId } from './base-DLLHDCZ5.js';
4
+
5
+ interface MintOrder {
6
+ orderId: string;
7
+ orderType: number;
8
+ expiry: number;
9
+ nonce: number;
10
+ benefactor: string;
11
+ beneficiary: string;
12
+ collateralAsset: string;
13
+ collateralAmount: string;
14
+ dAssetAmount: string;
15
+ minterAddress: string;
16
+ }
17
+ interface MintResult {
18
+ success: boolean;
19
+ orderId: string;
20
+ txHash?: string;
21
+ status?: string;
22
+ error?: string;
23
+ }
24
+ interface MintOptions {
25
+ expiryMinutes?: number;
26
+ benefactor?: string;
27
+ beneficiary?: string;
28
+ }
29
+ interface MintParams {
30
+ collateralAsset: CollateralAsset;
31
+ collateralAmount: BigNumberish;
32
+ dAssetAmount: BigNumberish;
33
+ options?: MintOptions;
34
+ }
35
+
36
+ declare class MintModule {
37
+ private sdk;
38
+ constructor(sdk: DeploySDK);
39
+ createOrder(collateralAsset: CollateralAsset, collateralAmount: BigNumberish, dAssetAmount: BigNumberish, options?: MintOptions): Promise<MintOrder>;
40
+ signOrder(order: MintOrder): Promise<string>;
41
+ submitOrder(order: MintOrder, signature: string): Promise<MintResult>;
42
+ mint(collateralAsset: CollateralAsset, collateralAmount: BigNumberish, dAssetAmount: BigNumberish, options?: MintOptions): Promise<MintResult>;
43
+ estimateGas(collateralAsset: CollateralAsset, collateralAmount: BigNumberish, dAssetAmount: BigNumberish, signature: string): Promise<bigint>;
44
+ }
45
+
46
+ interface StakeParams {
47
+ token: StakeToken;
48
+ amount: BigNumberish;
49
+ receiver?: string;
50
+ }
51
+ interface StakeResult {
52
+ success: boolean;
53
+ txHash?: string;
54
+ sharesReceived?: string;
55
+ error?: string;
56
+ }
57
+ interface StakingPosition {
58
+ tokenKey: string;
59
+ stakedAmount: string;
60
+ stakedValue: string;
61
+ cooldownEnd?: number;
62
+ canUnstake: boolean;
63
+ }
64
+ interface StakePreview {
65
+ shares: string;
66
+ assets: string;
67
+ }
68
+
69
+ declare class StakeModule {
70
+ private sdk;
71
+ constructor(sdk: DeploySDK);
72
+ stake(params: StakeParams): Promise<StakeResult>;
73
+ getPosition(token: StakeToken, userAddress?: string): Promise<StakingPosition>;
74
+ previewStake(token: StakeToken, amount: BigNumberish): Promise<StakePreview>;
75
+ getAPY(token: StakeToken): Promise<number>;
76
+ }
77
+
78
+ interface UnstakeParams {
79
+ token: StakeToken;
80
+ sharesAmount: BigNumberish;
81
+ receiver?: string;
82
+ }
83
+ interface UnstakeResult {
84
+ success: boolean;
85
+ txHash?: string;
86
+ assetsWithdrawn?: string;
87
+ error?: string;
88
+ }
89
+ interface CooldownResult {
90
+ success: boolean;
91
+ txHash?: string;
92
+ cooldownEnd?: number;
93
+ error?: string;
94
+ }
95
+ interface CooldownStatus {
96
+ cooldownEnd: number;
97
+ sharesInCooldown: string;
98
+ canUnstake: boolean;
99
+ }
100
+
101
+ declare class UnstakeModule {
102
+ private sdk;
103
+ constructor(sdk: DeploySDK);
104
+ initiateCooldown(token: StakeToken, sharesAmount: BigNumberish): Promise<CooldownResult>;
105
+ unstake(params: UnstakeParams): Promise<UnstakeResult>;
106
+ getCooldownStatus(token: StakeToken, userAddress?: string): Promise<CooldownStatus>;
107
+ previewUnstake(token: StakeToken, sharesAmount: BigNumberish): Promise<string>;
108
+ }
109
+
110
+ interface RedeemOrder {
111
+ orderId: string;
112
+ orderType: number;
113
+ expiry: number;
114
+ nonce: number;
115
+ benefactor: string;
116
+ beneficiary: string;
117
+ collateralAsset: string;
118
+ collateralAmount: string;
119
+ dAssetAmount: string;
120
+ minterAddress: string;
121
+ }
122
+ interface RedeemResult {
123
+ success: boolean;
124
+ orderId: string;
125
+ txHash?: string;
126
+ status?: string;
127
+ error?: string;
128
+ }
129
+ interface RedeemOptions {
130
+ expiryMinutes?: number;
131
+ benefactor?: string;
132
+ beneficiary?: string;
133
+ }
134
+
135
+ declare class RedeemModule {
136
+ private sdk;
137
+ constructor(sdk: DeploySDK);
138
+ createOrder(token: StakeToken, redeemAmount: BigNumberish, collateralAsset: string, collateralAmount: BigNumberish, options?: RedeemOptions): Promise<RedeemOrder>;
139
+ signOrder(order: RedeemOrder): Promise<string>;
140
+ submitOrder(order: RedeemOrder, signature: string): Promise<RedeemResult>;
141
+ redeem(token: StakeToken, redeemAmount: BigNumberish, collateralAsset: string, collateralAmount: BigNumberish, options?: RedeemOptions): Promise<RedeemResult>;
142
+ estimateGas(token: StakeToken, redeemAmount: BigNumberish, collateralAsset: string, collateralAmount: BigNumberish, signature: string): Promise<bigint>;
143
+ }
144
+
145
+ declare class AllowanceService {
146
+ private sdk;
147
+ constructor(sdk: DeploySDK);
148
+ getAllowance(tokenAddress: string, spenderAddress: string, ownerAddress?: string): Promise<BigNumber>;
149
+ approve(tokenAddress: string, spenderAddress: string, amount: BigNumberish): Promise<any>;
150
+ approveMax(tokenAddress: string, spenderAddress: string): Promise<any>;
151
+ hasSufficientAllowance(tokenAddress: string, spenderAddress: string, requiredAmount: BigNumberish): Promise<boolean>;
152
+ ensureAllowance(tokenAddress: string, spenderAddress: string, requiredAmount: BigNumberish, options?: {
153
+ approveMax?: boolean;
154
+ }): Promise<boolean>;
155
+ }
156
+
157
+ declare class BalanceService {
158
+ private sdk;
159
+ constructor(sdk: DeploySDK);
160
+ getTokenBalance(tokenAddress: string, userAddress?: string): Promise<BigNumber>;
161
+ getTokenDecimals(tokenAddress: string): Promise<number>;
162
+ getTokenSymbol(tokenAddress: string): Promise<string>;
163
+ getNativeBalance(userAddress?: string): Promise<BigNumber>;
164
+ hasSufficientBalance(tokenAddress: string, requiredAmount: BigNumberish): Promise<boolean>;
165
+ hasSufficientNativeBalance(requiredAmount: BigNumberish): Promise<boolean>;
166
+ }
167
+
168
+ declare class DeploySDK extends EventEmitter<SDKEvents> {
169
+ private _provider;
170
+ private _signer;
171
+ private _walletAdapter;
172
+ private _config;
173
+ private _isInitialized;
174
+ readonly mint: MintModule;
175
+ readonly stake: StakeModule;
176
+ readonly unstake: UnstakeModule;
177
+ readonly redeem: RedeemModule;
178
+ readonly allowance: AllowanceService;
179
+ readonly balances: BalanceService;
180
+ constructor(config: DeploySDKConfig);
181
+ initialize(adapter: WalletAdapter): Promise<void>;
182
+ get provider(): any;
183
+ get signer(): any;
184
+ get config(): DeploySDKConfig;
185
+ get isInitialized(): boolean;
186
+ getAddress(): Promise<string>;
187
+ getChainId(): Promise<number>;
188
+ switchChain(chainId: ChainId): Promise<void>;
189
+ disconnect(): Promise<void>;
190
+ }
191
+
192
+ export { AllowanceService as A, BalanceService as B, type CooldownResult as C, DeploySDK as D, MintModule as M, RedeemModule as R, StakeModule as S, UnstakeModule as U, type CooldownStatus as a, type MintOptions as b, type MintOrder as c, type MintParams as d, type MintResult as e, type RedeemOptions as f, type RedeemOrder as g, type RedeemResult as h, type StakeParams as i, type StakePreview as j, type StakeResult as k, type StakingPosition as l, type UnstakeParams as m, type UnstakeResult as n };
@@ -0,0 +1,192 @@
1
+ import { BigNumberish, BigNumber } from 'ethers';
2
+ import EventEmitter from 'eventemitter3';
3
+ import { C as CollateralAsset, S as StakeToken, b as SDKEvents, D as DeploySDKConfig, W as WalletAdapter, a as ChainId } from './base-01mNzZ7A.mjs';
4
+
5
+ interface MintOrder {
6
+ orderId: string;
7
+ orderType: number;
8
+ expiry: number;
9
+ nonce: number;
10
+ benefactor: string;
11
+ beneficiary: string;
12
+ collateralAsset: string;
13
+ collateralAmount: string;
14
+ dAssetAmount: string;
15
+ minterAddress: string;
16
+ }
17
+ interface MintResult {
18
+ success: boolean;
19
+ orderId: string;
20
+ txHash?: string;
21
+ status?: string;
22
+ error?: string;
23
+ }
24
+ interface MintOptions {
25
+ expiryMinutes?: number;
26
+ benefactor?: string;
27
+ beneficiary?: string;
28
+ }
29
+ interface MintParams {
30
+ collateralAsset: CollateralAsset;
31
+ collateralAmount: BigNumberish;
32
+ dAssetAmount: BigNumberish;
33
+ options?: MintOptions;
34
+ }
35
+
36
+ declare class MintModule {
37
+ private sdk;
38
+ constructor(sdk: DeploySDK);
39
+ createOrder(collateralAsset: CollateralAsset, collateralAmount: BigNumberish, dAssetAmount: BigNumberish, options?: MintOptions): Promise<MintOrder>;
40
+ signOrder(order: MintOrder): Promise<string>;
41
+ submitOrder(order: MintOrder, signature: string): Promise<MintResult>;
42
+ mint(collateralAsset: CollateralAsset, collateralAmount: BigNumberish, dAssetAmount: BigNumberish, options?: MintOptions): Promise<MintResult>;
43
+ estimateGas(collateralAsset: CollateralAsset, collateralAmount: BigNumberish, dAssetAmount: BigNumberish, signature: string): Promise<bigint>;
44
+ }
45
+
46
+ interface StakeParams {
47
+ token: StakeToken;
48
+ amount: BigNumberish;
49
+ receiver?: string;
50
+ }
51
+ interface StakeResult {
52
+ success: boolean;
53
+ txHash?: string;
54
+ sharesReceived?: string;
55
+ error?: string;
56
+ }
57
+ interface StakingPosition {
58
+ tokenKey: string;
59
+ stakedAmount: string;
60
+ stakedValue: string;
61
+ cooldownEnd?: number;
62
+ canUnstake: boolean;
63
+ }
64
+ interface StakePreview {
65
+ shares: string;
66
+ assets: string;
67
+ }
68
+
69
+ declare class StakeModule {
70
+ private sdk;
71
+ constructor(sdk: DeploySDK);
72
+ stake(params: StakeParams): Promise<StakeResult>;
73
+ getPosition(token: StakeToken, userAddress?: string): Promise<StakingPosition>;
74
+ previewStake(token: StakeToken, amount: BigNumberish): Promise<StakePreview>;
75
+ getAPY(token: StakeToken): Promise<number>;
76
+ }
77
+
78
+ interface UnstakeParams {
79
+ token: StakeToken;
80
+ sharesAmount: BigNumberish;
81
+ receiver?: string;
82
+ }
83
+ interface UnstakeResult {
84
+ success: boolean;
85
+ txHash?: string;
86
+ assetsWithdrawn?: string;
87
+ error?: string;
88
+ }
89
+ interface CooldownResult {
90
+ success: boolean;
91
+ txHash?: string;
92
+ cooldownEnd?: number;
93
+ error?: string;
94
+ }
95
+ interface CooldownStatus {
96
+ cooldownEnd: number;
97
+ sharesInCooldown: string;
98
+ canUnstake: boolean;
99
+ }
100
+
101
+ declare class UnstakeModule {
102
+ private sdk;
103
+ constructor(sdk: DeploySDK);
104
+ initiateCooldown(token: StakeToken, sharesAmount: BigNumberish): Promise<CooldownResult>;
105
+ unstake(params: UnstakeParams): Promise<UnstakeResult>;
106
+ getCooldownStatus(token: StakeToken, userAddress?: string): Promise<CooldownStatus>;
107
+ previewUnstake(token: StakeToken, sharesAmount: BigNumberish): Promise<string>;
108
+ }
109
+
110
+ interface RedeemOrder {
111
+ orderId: string;
112
+ orderType: number;
113
+ expiry: number;
114
+ nonce: number;
115
+ benefactor: string;
116
+ beneficiary: string;
117
+ collateralAsset: string;
118
+ collateralAmount: string;
119
+ dAssetAmount: string;
120
+ minterAddress: string;
121
+ }
122
+ interface RedeemResult {
123
+ success: boolean;
124
+ orderId: string;
125
+ txHash?: string;
126
+ status?: string;
127
+ error?: string;
128
+ }
129
+ interface RedeemOptions {
130
+ expiryMinutes?: number;
131
+ benefactor?: string;
132
+ beneficiary?: string;
133
+ }
134
+
135
+ declare class RedeemModule {
136
+ private sdk;
137
+ constructor(sdk: DeploySDK);
138
+ createOrder(token: StakeToken, redeemAmount: BigNumberish, collateralAsset: string, collateralAmount: BigNumberish, options?: RedeemOptions): Promise<RedeemOrder>;
139
+ signOrder(order: RedeemOrder): Promise<string>;
140
+ submitOrder(order: RedeemOrder, signature: string): Promise<RedeemResult>;
141
+ redeem(token: StakeToken, redeemAmount: BigNumberish, collateralAsset: string, collateralAmount: BigNumberish, options?: RedeemOptions): Promise<RedeemResult>;
142
+ estimateGas(token: StakeToken, redeemAmount: BigNumberish, collateralAsset: string, collateralAmount: BigNumberish, signature: string): Promise<bigint>;
143
+ }
144
+
145
+ declare class AllowanceService {
146
+ private sdk;
147
+ constructor(sdk: DeploySDK);
148
+ getAllowance(tokenAddress: string, spenderAddress: string, ownerAddress?: string): Promise<BigNumber>;
149
+ approve(tokenAddress: string, spenderAddress: string, amount: BigNumberish): Promise<any>;
150
+ approveMax(tokenAddress: string, spenderAddress: string): Promise<any>;
151
+ hasSufficientAllowance(tokenAddress: string, spenderAddress: string, requiredAmount: BigNumberish): Promise<boolean>;
152
+ ensureAllowance(tokenAddress: string, spenderAddress: string, requiredAmount: BigNumberish, options?: {
153
+ approveMax?: boolean;
154
+ }): Promise<boolean>;
155
+ }
156
+
157
+ declare class BalanceService {
158
+ private sdk;
159
+ constructor(sdk: DeploySDK);
160
+ getTokenBalance(tokenAddress: string, userAddress?: string): Promise<BigNumber>;
161
+ getTokenDecimals(tokenAddress: string): Promise<number>;
162
+ getTokenSymbol(tokenAddress: string): Promise<string>;
163
+ getNativeBalance(userAddress?: string): Promise<BigNumber>;
164
+ hasSufficientBalance(tokenAddress: string, requiredAmount: BigNumberish): Promise<boolean>;
165
+ hasSufficientNativeBalance(requiredAmount: BigNumberish): Promise<boolean>;
166
+ }
167
+
168
+ declare class DeploySDK extends EventEmitter<SDKEvents> {
169
+ private _provider;
170
+ private _signer;
171
+ private _walletAdapter;
172
+ private _config;
173
+ private _isInitialized;
174
+ readonly mint: MintModule;
175
+ readonly stake: StakeModule;
176
+ readonly unstake: UnstakeModule;
177
+ readonly redeem: RedeemModule;
178
+ readonly allowance: AllowanceService;
179
+ readonly balances: BalanceService;
180
+ constructor(config?: DeploySDKConfig);
181
+ initialize(adapter: WalletAdapter): Promise<void>;
182
+ get provider(): any;
183
+ get signer(): any;
184
+ get config(): DeploySDKConfig;
185
+ get isInitialized(): boolean;
186
+ getAddress(): Promise<string>;
187
+ getChainId(): Promise<number>;
188
+ switchChain(chainId: ChainId): Promise<void>;
189
+ disconnect(): Promise<void>;
190
+ }
191
+
192
+ export { AllowanceService as A, BalanceService as B, type CooldownResult as C, DeploySDK as D, MintModule as M, RedeemModule as R, StakeModule as S, UnstakeModule as U, type CooldownStatus as a, type MintOptions as b, type MintOrder as c, type MintParams as d, type MintResult as e, type RedeemOptions as f, type RedeemOrder as g, type RedeemResult as h, type StakeParams as i, type StakePreview as j, type StakeResult as k, type StakingPosition as l, type UnstakeParams as m, type UnstakeResult as n };