@sudobility/contracts 1.12.0 → 1.13.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/dist/evm/src/evm/{mailer-client.d.ts → evm-mailer-client.d.ts} +146 -50
- package/dist/evm/src/evm/evm-mailer-client.d.ts.map +1 -0
- package/dist/evm/src/evm/evm-mailer-client.js +924 -0
- package/dist/evm/src/evm/evm-mailer-client.js.map +1 -0
- package/dist/evm/src/evm/index.d.ts +1 -1
- package/dist/evm/src/evm/index.d.ts.map +1 -1
- package/dist/evm/src/evm/index.js +4 -4
- package/dist/evm/src/evm/index.js.map +1 -1
- package/dist/solana/solana/index.d.ts +1 -1
- package/dist/solana/solana/index.d.ts.map +1 -1
- package/dist/solana/solana/index.js +4 -3
- package/dist/solana/solana/index.js.map +1 -1
- package/dist/solana/solana/solana-mailer-client.d.ts +209 -0
- package/dist/solana/solana/solana-mailer-client.d.ts.map +1 -0
- package/dist/solana/solana/solana-mailer-client.js +1004 -0
- package/dist/solana/solana/solana-mailer-client.js.map +1 -0
- package/dist/solana/solana/types.d.ts +3 -2
- package/dist/solana/solana/types.d.ts.map +1 -1
- package/dist/solana/solana/types.js.map +1 -1
- package/dist/{unified-esm/src/evm/mailer-client.d.ts → unified/src/evm/evm-mailer-client.d.ts} +146 -50
- package/dist/unified/src/evm/evm-mailer-client.d.ts.map +1 -0
- package/dist/unified/src/evm/evm-mailer-client.js +924 -0
- package/dist/unified/src/evm/evm-mailer-client.js.map +1 -0
- package/dist/unified/src/evm/index.d.ts +1 -1
- package/dist/unified/src/evm/index.d.ts.map +1 -1
- package/dist/unified/src/evm/index.js +4 -4
- package/dist/unified/src/evm/index.js.map +1 -1
- package/dist/unified/src/react/context/MailerProvider.d.ts +26 -20
- package/dist/unified/src/react/context/MailerProvider.d.ts.map +1 -1
- package/dist/unified/src/react/context/MailerProvider.js +26 -26
- package/dist/unified/src/react/context/MailerProvider.js.map +1 -1
- package/dist/unified/src/react/hooks/useMailerMutations.d.ts +225 -192
- package/dist/unified/src/react/hooks/useMailerMutations.d.ts.map +1 -1
- package/dist/unified/src/react/hooks/useMailerMutations.js +263 -266
- package/dist/unified/src/react/hooks/useMailerMutations.js.map +1 -1
- package/dist/unified/src/react/hooks/useMailerQueries.d.ts +117 -63
- package/dist/unified/src/react/hooks/useMailerQueries.d.ts.map +1 -1
- package/dist/unified/src/react/hooks/useMailerQueries.js +239 -104
- package/dist/unified/src/react/hooks/useMailerQueries.js.map +1 -1
- package/dist/unified/src/react/index.d.ts +5 -3
- package/dist/unified/src/react/index.d.ts.map +1 -1
- package/dist/unified/src/react/index.js +41 -26
- package/dist/unified/src/react/index.js.map +1 -1
- package/dist/unified/src/solana/index.d.ts +1 -1
- package/dist/unified/src/solana/index.d.ts.map +1 -1
- package/dist/unified/src/solana/index.js +4 -3
- package/dist/unified/src/solana/index.js.map +1 -1
- package/dist/unified/src/solana/solana-mailer-client.d.ts +209 -0
- package/dist/unified/src/solana/solana-mailer-client.d.ts.map +1 -0
- package/dist/unified/src/solana/solana-mailer-client.js +1004 -0
- package/dist/unified/src/solana/solana-mailer-client.js.map +1 -0
- package/dist/unified/src/solana/types.d.ts +3 -2
- package/dist/unified/src/solana/types.d.ts.map +1 -1
- package/dist/unified/src/solana/types.js.map +1 -1
- package/dist/unified/src/unified/index.d.ts +1 -1
- package/dist/unified/src/unified/index.d.ts.map +1 -1
- package/dist/unified/src/unified/onchain-mailer-client.d.ts +187 -268
- package/dist/unified/src/unified/onchain-mailer-client.d.ts.map +1 -1
- package/dist/unified/src/unified/onchain-mailer-client.js +539 -1614
- package/dist/unified/src/unified/onchain-mailer-client.js.map +1 -1
- package/dist/unified/src/unified/types.d.ts +23 -6
- package/dist/unified/src/unified/types.d.ts.map +1 -1
- package/dist/{unified/src/evm/mailer-client.d.ts → unified-esm/src/evm/evm-mailer-client.d.ts} +146 -50
- package/dist/unified-esm/src/evm/evm-mailer-client.d.ts.map +1 -0
- package/dist/unified-esm/src/evm/evm-mailer-client.js +920 -0
- package/dist/unified-esm/src/evm/evm-mailer-client.js.map +1 -0
- package/dist/unified-esm/src/evm/index.d.ts +1 -1
- package/dist/unified-esm/src/evm/index.d.ts.map +1 -1
- package/dist/unified-esm/src/evm/index.js +2 -2
- package/dist/unified-esm/src/evm/index.js.map +1 -1
- package/dist/unified-esm/src/react/context/MailerProvider.d.ts +26 -20
- package/dist/unified-esm/src/react/context/MailerProvider.d.ts.map +1 -1
- package/dist/unified-esm/src/react/context/MailerProvider.js +25 -26
- package/dist/unified-esm/src/react/context/MailerProvider.js.map +1 -1
- package/dist/unified-esm/src/react/hooks/useMailerMutations.d.ts +225 -192
- package/dist/unified-esm/src/react/hooks/useMailerMutations.d.ts.map +1 -1
- package/dist/unified-esm/src/react/hooks/useMailerMutations.js +254 -262
- package/dist/unified-esm/src/react/hooks/useMailerMutations.js.map +1 -1
- package/dist/unified-esm/src/react/hooks/useMailerQueries.d.ts +117 -63
- package/dist/unified-esm/src/react/hooks/useMailerQueries.d.ts.map +1 -1
- package/dist/unified-esm/src/react/hooks/useMailerQueries.js +232 -102
- package/dist/unified-esm/src/react/hooks/useMailerQueries.js.map +1 -1
- package/dist/unified-esm/src/react/index.d.ts +5 -3
- package/dist/unified-esm/src/react/index.d.ts.map +1 -1
- package/dist/unified-esm/src/react/index.js +9 -5
- package/dist/unified-esm/src/react/index.js.map +1 -1
- package/dist/unified-esm/src/solana/index.d.ts +1 -1
- package/dist/unified-esm/src/solana/index.d.ts.map +1 -1
- package/dist/unified-esm/src/solana/index.js +2 -1
- package/dist/unified-esm/src/solana/index.js.map +1 -1
- package/dist/unified-esm/src/solana/solana-mailer-client.d.ts +209 -0
- package/dist/unified-esm/src/solana/solana-mailer-client.d.ts.map +1 -0
- package/dist/unified-esm/src/solana/solana-mailer-client.js +1000 -0
- package/dist/unified-esm/src/solana/solana-mailer-client.js.map +1 -0
- package/dist/unified-esm/src/solana/types.d.ts +3 -2
- package/dist/unified-esm/src/solana/types.d.ts.map +1 -1
- package/dist/unified-esm/src/solana/types.js.map +1 -1
- package/dist/unified-esm/src/unified/index.d.ts +1 -1
- package/dist/unified-esm/src/unified/index.d.ts.map +1 -1
- package/dist/unified-esm/src/unified/onchain-mailer-client.d.ts +187 -268
- package/dist/unified-esm/src/unified/onchain-mailer-client.d.ts.map +1 -1
- package/dist/unified-esm/src/unified/onchain-mailer-client.js +539 -1614
- package/dist/unified-esm/src/unified/onchain-mailer-client.js.map +1 -1
- package/dist/unified-esm/src/unified/types.d.ts +23 -6
- package/dist/unified-esm/src/unified/types.d.ts.map +1 -1
- package/package.json +5 -4
- package/programs/mailer/Cargo.toml +1 -1
- package/dist/evm/src/evm/mailer-client.d.ts.map +0 -1
- package/dist/evm/src/evm/mailer-client.js +0 -619
- package/dist/evm/src/evm/mailer-client.js.map +0 -1
- package/dist/solana/solana/mailer-client.d.ts +0 -282
- package/dist/solana/solana/mailer-client.d.ts.map +0 -1
- package/dist/solana/solana/mailer-client.js +0 -989
- package/dist/solana/solana/mailer-client.js.map +0 -1
- package/dist/unified/src/evm/mailer-client.d.ts.map +0 -1
- package/dist/unified/src/evm/mailer-client.js +0 -619
- package/dist/unified/src/evm/mailer-client.js.map +0 -1
- package/dist/unified/src/solana/mailer-client.d.ts +0 -282
- package/dist/unified/src/solana/mailer-client.d.ts.map +0 -1
- package/dist/unified/src/solana/mailer-client.js +0 -989
- package/dist/unified/src/solana/mailer-client.js.map +0 -1
- package/dist/unified-esm/src/evm/mailer-client.d.ts.map +0 -1
- package/dist/unified-esm/src/evm/mailer-client.js +0 -615
- package/dist/unified-esm/src/evm/mailer-client.js.map +0 -1
- package/dist/unified-esm/src/solana/mailer-client.d.ts +0 -282
- package/dist/unified-esm/src/solana/mailer-client.d.ts.map +0 -1
- package/dist/unified-esm/src/solana/mailer-client.js +0 -985
- package/dist/unified-esm/src/solana/mailer-client.js.map +0 -1
|
@@ -1,282 +0,0 @@
|
|
|
1
|
-
import { Connection, PublicKey, Transaction, Keypair, ConfirmOptions } from '@solana/web3.js';
|
|
2
|
-
import { Optional } from '@sudobility/types';
|
|
3
|
-
import { ClaimableInfo, MailerFees } from './types.js';
|
|
4
|
-
/**
|
|
5
|
-
* Interface for wallet adapter pattern
|
|
6
|
-
*/
|
|
7
|
-
export interface Wallet {
|
|
8
|
-
publicKey: PublicKey;
|
|
9
|
-
signTransaction<T extends Transaction>(transaction: T): Promise<T>;
|
|
10
|
-
signAllTransactions<T extends Transaction>(transactions: T[]): Promise<T[]>;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Compute unit optimization options for Solana transactions
|
|
14
|
-
*/
|
|
15
|
-
export interface ComputeUnitOptions {
|
|
16
|
-
/**
|
|
17
|
-
* Compute unit limit for the transaction (default: 200,000)
|
|
18
|
-
* Max: 1,400,000
|
|
19
|
-
*/
|
|
20
|
-
computeUnitLimit?: number;
|
|
21
|
-
/**
|
|
22
|
-
* Priority fee in micro-lamports per compute unit
|
|
23
|
-
* Higher values = faster inclusion during congestion
|
|
24
|
-
*/
|
|
25
|
-
computeUnitPrice?: number;
|
|
26
|
-
/**
|
|
27
|
-
* Automatically simulate and optimize compute units
|
|
28
|
-
* @default false
|
|
29
|
-
*/
|
|
30
|
-
autoOptimize?: boolean;
|
|
31
|
-
/**
|
|
32
|
-
* Multiplier for compute unit buffer when auto-optimizing
|
|
33
|
-
* @default 1.2 (20% buffer)
|
|
34
|
-
*/
|
|
35
|
-
computeUnitMultiplier?: number;
|
|
36
|
-
/**
|
|
37
|
-
* Skip compute unit settings entirely
|
|
38
|
-
* @default false
|
|
39
|
-
*/
|
|
40
|
-
skipComputeUnits?: boolean;
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Transaction result with compute unit details
|
|
44
|
-
*/
|
|
45
|
-
export interface TransactionResult {
|
|
46
|
-
/**
|
|
47
|
-
* Transaction signature
|
|
48
|
-
*/
|
|
49
|
-
signature: string;
|
|
50
|
-
/**
|
|
51
|
-
* Simulated compute units (if auto-optimized)
|
|
52
|
-
*/
|
|
53
|
-
simulatedUnits?: number;
|
|
54
|
-
/**
|
|
55
|
-
* Actual compute unit limit set
|
|
56
|
-
*/
|
|
57
|
-
computeUnitLimit?: number;
|
|
58
|
-
/**
|
|
59
|
-
* Priority fee per compute unit (if set)
|
|
60
|
-
*/
|
|
61
|
-
computeUnitPrice?: number;
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* @class MailerClient
|
|
65
|
-
* @description Native Solana program client for the Mailer program
|
|
66
|
-
* @notice Provides easy-to-use methods for sending messages with USDC fees and revenue sharing
|
|
67
|
-
*
|
|
68
|
-
* ## Key Features:
|
|
69
|
-
* - **Priority Messages**: Full fee (0.1 USDC) with 90% revenue share to recipient
|
|
70
|
-
* - **Standard Messages**: 10% fee only (0.01 USDC) with no revenue share
|
|
71
|
-
* - **Revenue Claims**: 60-day claim period for priority message revenue shares
|
|
72
|
-
* - **Delegation Management**: Delegate message handling with rejection capability
|
|
73
|
-
*
|
|
74
|
-
* ## Usage Examples:
|
|
75
|
-
* ```typescript
|
|
76
|
-
* // Connect to existing deployed program
|
|
77
|
-
* const connection = new Connection('https://api.devnet.solana.com');
|
|
78
|
-
* const wallet = new WalletAdapter(keypair);
|
|
79
|
-
* const programId = new PublicKey('9FLkBDGpZBcR8LMsQ7MwwV6X9P4TDFgN3DeRh5qYyHJF');
|
|
80
|
-
* const usdcMint = new PublicKey('EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v');
|
|
81
|
-
* const client = new MailerClient(connection, wallet, programId, usdcMint);
|
|
82
|
-
*
|
|
83
|
-
* // Send message with revenue sharing to recipient
|
|
84
|
-
* await client.send('recipient-address', 'Subject', 'Message body', true);
|
|
85
|
-
*
|
|
86
|
-
* // Claim your revenue share within 60 days (as recipient)
|
|
87
|
-
* await client.claimRecipientShare();
|
|
88
|
-
*
|
|
89
|
-
* // Check claimable amount
|
|
90
|
-
* const info = await client.getRecipientClaimable();
|
|
91
|
-
* if (info) console.log(`Claimable: ${formatUSDC(info.amount)} USDC`);
|
|
92
|
-
* ```
|
|
93
|
-
*
|
|
94
|
-
* @author Mailer Team
|
|
95
|
-
* @version 2.0.0 - Native Solana Program (no Anchor)
|
|
96
|
-
*/
|
|
97
|
-
export declare class MailerClient {
|
|
98
|
-
private connection;
|
|
99
|
-
private wallet;
|
|
100
|
-
private programId;
|
|
101
|
-
private usdcMint;
|
|
102
|
-
private mailerStatePda;
|
|
103
|
-
private mailerBump;
|
|
104
|
-
private defaultComputeUnitMultiplier;
|
|
105
|
-
constructor(connection: Connection, wallet: Wallet, programId: PublicKey, usdcMint: PublicKey);
|
|
106
|
-
/**
|
|
107
|
-
* Optimize compute units for a transaction
|
|
108
|
-
* @param transaction Transaction to optimize
|
|
109
|
-
* @param options Compute unit options
|
|
110
|
-
* @returns Optimized transaction with compute budget instructions
|
|
111
|
-
*/
|
|
112
|
-
private optimizeComputeUnits;
|
|
113
|
-
/**
|
|
114
|
-
* Initialize the mailer program (owner only)
|
|
115
|
-
* @param computeOptions Compute unit optimization options
|
|
116
|
-
*/
|
|
117
|
-
initialize(computeOptions?: ComputeUnitOptions): Promise<TransactionResult>;
|
|
118
|
-
/**
|
|
119
|
-
* Send a message with optional revenue sharing
|
|
120
|
-
* @param to Recipient's public key or address string who receives message and potential revenue share
|
|
121
|
-
* @param subject Message subject
|
|
122
|
-
* @param body Message body
|
|
123
|
-
* @param revenueShareToReceiver If true, recipient gets 90% revenue share; if false, no revenue share
|
|
124
|
-
* @param resolveSenderToName If true, resolve sender address to name via off-chain service
|
|
125
|
-
* @param computeOptions Compute unit optimization options
|
|
126
|
-
* @returns Transaction result with signature and compute details
|
|
127
|
-
*/
|
|
128
|
-
send(to: string | PublicKey, subject: string, body: string, revenueShareToReceiver?: boolean, resolveSenderToName?: boolean, computeOptions?: ComputeUnitOptions): Promise<TransactionResult>;
|
|
129
|
-
/**
|
|
130
|
-
* Claim recipient share of revenue
|
|
131
|
-
* @returns Transaction result
|
|
132
|
-
*/
|
|
133
|
-
claimRecipientShare(computeOptions?: ComputeUnitOptions): Promise<TransactionResult>;
|
|
134
|
-
/**
|
|
135
|
-
* Claim owner share of fees (owner only)
|
|
136
|
-
* @returns Transaction result
|
|
137
|
-
*/
|
|
138
|
-
claimOwnerShare(computeOptions?: ComputeUnitOptions): Promise<TransactionResult>;
|
|
139
|
-
/**
|
|
140
|
-
* Claim expired recipient shares and move them under owner control
|
|
141
|
-
* @param recipient Recipient whose expired shares to reclaim
|
|
142
|
-
* @param options Transaction confirm options
|
|
143
|
-
* @returns Transaction signature
|
|
144
|
-
*/
|
|
145
|
-
claimExpiredShares(recipient: string | PublicKey, options?: ConfirmOptions, computeOptions?: ComputeUnitOptions): Promise<TransactionResult>;
|
|
146
|
-
/**
|
|
147
|
-
* Delegate message handling to another address
|
|
148
|
-
* @param delegate Address to delegate to, or null to clear delegation
|
|
149
|
-
* @returns Transaction signature
|
|
150
|
-
*/
|
|
151
|
-
delegateTo(delegate?: Optional<string | PublicKey>, computeOptions?: ComputeUnitOptions): Promise<TransactionResult>;
|
|
152
|
-
/**
|
|
153
|
-
* Reject a delegation made to you
|
|
154
|
-
* @param delegator Address that delegated to you
|
|
155
|
-
* @returns Transaction signature
|
|
156
|
-
*/
|
|
157
|
-
rejectDelegation(delegator: string | PublicKey, computeOptions?: ComputeUnitOptions): Promise<TransactionResult>;
|
|
158
|
-
/**
|
|
159
|
-
* Set the send fee (owner only)
|
|
160
|
-
* @param newFee New fee in USDC micro-units (6 decimals)
|
|
161
|
-
* @param computeOptions Compute unit optimization options
|
|
162
|
-
* @returns Transaction result
|
|
163
|
-
*/
|
|
164
|
-
setFee(newFee: number | bigint, computeOptions?: ComputeUnitOptions): Promise<TransactionResult>;
|
|
165
|
-
/**
|
|
166
|
-
* Set the delegation fee (owner only)
|
|
167
|
-
* @param newFee New delegation fee in USDC micro-units (6 decimals)
|
|
168
|
-
* @returns Transaction signature
|
|
169
|
-
*/
|
|
170
|
-
setDelegationFee(newFee: number | bigint, computeOptions?: ComputeUnitOptions): Promise<TransactionResult>;
|
|
171
|
-
setCustomFeePercentage(account: string | PublicKey, percentage: number, payer?: Optional<string | PublicKey>, computeOptions?: ComputeUnitOptions): Promise<TransactionResult>;
|
|
172
|
-
clearCustomFeePercentage(account: string | PublicKey, computeOptions?: ComputeUnitOptions): Promise<TransactionResult>;
|
|
173
|
-
getCustomFeePercentage(account: string | PublicKey): Promise<number>;
|
|
174
|
-
/**
|
|
175
|
-
* Get current fees from the mailer state
|
|
176
|
-
* @returns MailerFees object with current fees
|
|
177
|
-
*/
|
|
178
|
-
getFees(): Promise<MailerFees>;
|
|
179
|
-
/**
|
|
180
|
-
* Get recipient claimable information
|
|
181
|
-
* @param recipient Optional recipient address, defaults to wallet address
|
|
182
|
-
* @returns ClaimableInfo or null if no claimable amount
|
|
183
|
-
*/
|
|
184
|
-
getRecipientClaimable(recipient?: Optional<PublicKey>): Promise<Optional<ClaimableInfo>>;
|
|
185
|
-
/**
|
|
186
|
-
* Get owner claimable amount
|
|
187
|
-
* @returns Owner claimable amount in USDC micro-units
|
|
188
|
-
*/
|
|
189
|
-
getOwnerClaimable(): Promise<number>;
|
|
190
|
-
/**
|
|
191
|
-
* Get delegation information for an address
|
|
192
|
-
* @param delegator Address to check delegation for, defaults to wallet address
|
|
193
|
-
* @returns Delegation info or null if no delegation
|
|
194
|
-
*/
|
|
195
|
-
getDelegation(delegator?: Optional<PublicKey>): Promise<Optional<{
|
|
196
|
-
delegator: string;
|
|
197
|
-
delegate?: Optional<string>;
|
|
198
|
-
}>>;
|
|
199
|
-
/**
|
|
200
|
-
* Get the mailer state PDA address
|
|
201
|
-
* @returns PublicKey of the mailer state PDA
|
|
202
|
-
*/
|
|
203
|
-
getMailerStatePda(): PublicKey;
|
|
204
|
-
/**
|
|
205
|
-
* Send a message to an email address (no wallet known)
|
|
206
|
-
* Charges only 10% owner fee since recipient wallet is unknown
|
|
207
|
-
* @param toEmail Email address of the recipient
|
|
208
|
-
* @param subject Message subject
|
|
209
|
-
* @param body Message body
|
|
210
|
-
* @param options Transaction confirm options
|
|
211
|
-
* @returns Transaction signature
|
|
212
|
-
*/
|
|
213
|
-
sendToEmail(toEmail: string, subject: string, body: string, options?: ConfirmOptions, computeOptions?: ComputeUnitOptions): Promise<TransactionResult>;
|
|
214
|
-
/**
|
|
215
|
-
* Send a prepared message to an email address (no wallet known)
|
|
216
|
-
* Charges only 10% owner fee since recipient wallet is unknown
|
|
217
|
-
* @param toEmail Email address of the recipient
|
|
218
|
-
* @param mailId Pre-prepared message ID
|
|
219
|
-
* @param options Transaction confirm options
|
|
220
|
-
* @returns Transaction signature
|
|
221
|
-
*/
|
|
222
|
-
sendPreparedToEmail(toEmail: string, mailId: string, options?: ConfirmOptions, computeOptions?: ComputeUnitOptions): Promise<TransactionResult>;
|
|
223
|
-
/**
|
|
224
|
-
* Send a prepared message using a mailId (to match EVM behavior)
|
|
225
|
-
* @param to Recipient's public key or address string
|
|
226
|
-
* @param mailId Pre-prepared message identifier
|
|
227
|
-
* @param revenueShareToReceiver If true, recipient gets 90% revenue share
|
|
228
|
-
* @param resolveSenderToName If true, resolve sender address to name
|
|
229
|
-
* @returns Transaction signature
|
|
230
|
-
*/
|
|
231
|
-
sendPrepared(to: string | PublicKey, mailId: string, revenueShareToReceiver?: boolean, resolveSenderToName?: boolean, computeOptions?: ComputeUnitOptions): Promise<TransactionResult>;
|
|
232
|
-
sendThroughWebhook(to: string | PublicKey, webhookId: string, revenueShareToReceiver?: boolean, resolveSenderToName?: boolean, computeOptions?: ComputeUnitOptions): Promise<TransactionResult>;
|
|
233
|
-
/**
|
|
234
|
-
* Pause the contract and distribute owner claimable funds (owner only)
|
|
235
|
-
* @param options Transaction confirm options
|
|
236
|
-
* @returns Transaction signature
|
|
237
|
-
*/
|
|
238
|
-
pause(options?: ConfirmOptions, computeOptions?: ComputeUnitOptions): Promise<TransactionResult>;
|
|
239
|
-
/**
|
|
240
|
-
* Unpause the contract (owner only)
|
|
241
|
-
* @param options Transaction confirm options
|
|
242
|
-
* @returns Transaction signature
|
|
243
|
-
*/
|
|
244
|
-
unpause(options?: ConfirmOptions, computeOptions?: ComputeUnitOptions): Promise<TransactionResult>;
|
|
245
|
-
/**
|
|
246
|
-
* Emergency unpause without fund distribution (owner only)
|
|
247
|
-
* @param options Transaction confirm options
|
|
248
|
-
* @returns Transaction signature
|
|
249
|
-
*/
|
|
250
|
-
emergencyUnpause(options?: ConfirmOptions, computeOptions?: ComputeUnitOptions): Promise<TransactionResult>;
|
|
251
|
-
/**
|
|
252
|
-
* Distribute claimable funds to a recipient when contract is paused
|
|
253
|
-
* @param recipient Recipient address to distribute funds for
|
|
254
|
-
* @param options Transaction confirm options
|
|
255
|
-
* @returns Transaction signature
|
|
256
|
-
*/
|
|
257
|
-
distributeClaimableFunds(recipient: string | PublicKey, options?: ConfirmOptions, computeOptions?: ComputeUnitOptions): Promise<TransactionResult>;
|
|
258
|
-
/**
|
|
259
|
-
* Get the current send fee
|
|
260
|
-
* @returns Send fee in USDC micro-units (6 decimals)
|
|
261
|
-
*/
|
|
262
|
-
getSendFee(): Promise<bigint>;
|
|
263
|
-
/**
|
|
264
|
-
* Check if contract is currently paused
|
|
265
|
-
* @returns True if contract is paused, false otherwise
|
|
266
|
-
*/
|
|
267
|
-
isPaused(): Promise<boolean>;
|
|
268
|
-
/**
|
|
269
|
-
* Send and confirm a transaction
|
|
270
|
-
* @param transaction Transaction to send
|
|
271
|
-
* @param options Confirm options
|
|
272
|
-
* @returns Transaction signature
|
|
273
|
-
*/
|
|
274
|
-
private sendTransaction;
|
|
275
|
-
/**
|
|
276
|
-
* Create a simple wallet from a keypair for testing
|
|
277
|
-
* @param keypair Solana keypair
|
|
278
|
-
* @returns Wallet interface implementation
|
|
279
|
-
*/
|
|
280
|
-
static createWallet(keypair: Keypair): Wallet;
|
|
281
|
-
}
|
|
282
|
-
//# sourceMappingURL=mailer-client.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
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