@sip-protocol/sdk 0.6.26 → 0.7.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.
- package/dist/browser.d.mts +2 -1
- package/dist/browser.d.ts +2 -1
- package/dist/browser.js +5723 -4957
- package/dist/browser.mjs +94 -46
- package/dist/{chunk-ZEYNCEIE.mjs → chunk-3OVABDRH.mjs} +12 -0
- package/dist/chunk-6WGN57S2.mjs +218 -0
- package/dist/chunk-DLDWZFYC.mjs +1495 -0
- package/dist/chunk-E6SZWREQ.mjs +57 -0
- package/dist/{chunk-GFSLU6SP.mjs → chunk-G33LB27A.mjs} +496 -1407
- package/dist/chunk-HOR7PM3M.mjs +15 -0
- package/dist/chunk-L2K34JCU.mjs +1496 -0
- package/dist/{chunk-EMOAOF5P.mjs → chunk-SN4ZDTVW.mjs} +489 -1407
- package/dist/constants-VOI7BSLK.mjs +27 -0
- package/dist/{index-DO9Az5n4.d.ts → index-CHB3KuOB.d.mts} +483 -14
- package/dist/{index-CRz9S3eE.d.mts → index-CzWPI6Le.d.ts} +483 -14
- package/dist/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +5658 -4895
- package/dist/index.mjs +91 -43
- package/dist/proofs/noir.mjs +4 -2
- package/dist/solana-5EMCTPTS.mjs +46 -0
- package/dist/solana-Q4NAVBTS.mjs +46 -0
- package/package.json +4 -2
- package/src/chains/solana/constants.ts +101 -0
- package/src/chains/solana/index.ts +87 -0
- package/src/chains/solana/scan.ts +382 -0
- package/src/chains/solana/transfer.ts +266 -0
- package/src/chains/solana/types.ts +169 -0
- package/src/executors/index.ts +18 -0
- package/src/executors/same-chain.ts +154 -0
- package/src/index.ts +58 -1
- package/src/intent.ts +10 -0
- package/src/sip.ts +127 -0
- package/src/stealth.ts +12 -2
- package/dist/chunk-46TH5SRE.mjs +0 -17077
- package/dist/chunk-C7RM67TH.mjs +0 -17047
- package/dist/chunk-GE566OLO.mjs +0 -17059
- package/dist/chunk-JK4FDH74.mjs +0 -17059
- package/dist/chunk-TSOCBT73.mjs +0 -17067
- package/dist/index-BZxo_8F3.d.ts +0 -11388
- package/dist/index-DKJ81T9L.d.mts +0 -11388
- package/dist/index-Dex_NSYv.d.mts +0 -11390
- package/dist/index-DhThjSB5.d.ts +0 -11390
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ATA_RENT_LAMPORTS,
|
|
3
|
+
ESTIMATED_TX_FEE_LAMPORTS,
|
|
4
|
+
MEMO_PROGRAM_ID,
|
|
5
|
+
SIP_MEMO_PREFIX,
|
|
6
|
+
SOLANA_EXPLORER_URLS,
|
|
7
|
+
SOLANA_RPC_ENDPOINTS,
|
|
8
|
+
SOLANA_TOKEN_DECIMALS,
|
|
9
|
+
SOLANA_TOKEN_MINTS,
|
|
10
|
+
getExplorerUrl,
|
|
11
|
+
getTokenDecimals,
|
|
12
|
+
getTokenMint
|
|
13
|
+
} from "./chunk-E6SZWREQ.mjs";
|
|
14
|
+
import "./chunk-UJCSKKID.mjs";
|
|
15
|
+
export {
|
|
16
|
+
ATA_RENT_LAMPORTS,
|
|
17
|
+
ESTIMATED_TX_FEE_LAMPORTS,
|
|
18
|
+
MEMO_PROGRAM_ID,
|
|
19
|
+
SIP_MEMO_PREFIX,
|
|
20
|
+
SOLANA_EXPLORER_URLS,
|
|
21
|
+
SOLANA_RPC_ENDPOINTS,
|
|
22
|
+
SOLANA_TOKEN_DECIMALS,
|
|
23
|
+
SOLANA_TOKEN_MINTS,
|
|
24
|
+
getExplorerUrl,
|
|
25
|
+
getTokenDecimals,
|
|
26
|
+
getTokenMint
|
|
27
|
+
};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import * as _solana_web3_js from '@solana/web3.js';
|
|
2
|
+
import { Connection, PublicKey, Transaction, VersionedTransaction } from '@solana/web3.js';
|
|
1
3
|
import * as _sip_protocol_types from '@sip-protocol/types';
|
|
2
4
|
import { ZKProof, PrivacyLevel, ShieldedIntent, CreateIntentParams, TrackedIntent, OneClickConfig, OneClickToken, OneClickQuoteRequest, OneClickQuoteResponse, OneClickDepositSubmit, OneClickStatusResponse, OneClickWithdrawal, ChainId, StealthMetaAddress, HexString, StealthAddress, StealthAddressRecovery, DefuseAssetId, Asset, OneClickSwapStatus, Quote as Quote$1, FulfillmentResult, ViewingKey, EncryptedTransaction, Commitment, Hash, IntentInput, IntentOutput, SIPSolver, Solver, SolverCapabilities, SolverVisibleIntent, SolverQuote, FulfillmentStatus, ZcashConfig, ZcashAddressInfo, ZcashNewAccount, ZcashReceiverType, ZcashAccountAddress, ZcashAccountBalance, ZcashUnspentNote, ZcashShieldedSendParams, ZcashOperation, ZcashBlockHeader, ZcashBlock, ZcashBlockchainInfo, ZcashNetworkInfo, StablecoinSymbol, PaymentPurpose, ShieldedPayment, CreatePaymentParams, TrackedPayment, CreateTreasuryParams, TreasuryConfig, TreasuryMember, CreatePaymentProposalParams, TreasuryProposal, CreateBatchProposalParams, AuditorViewingKey, TreasuryBalance, CreateComplianceConfigParams, ComplianceConfig, RegisterAuditorParams, AuditorRegistration, AuditScope, DisclosedTransaction, DisclosureRequest, GenerateReportParams, ComplianceReport, ComplianceMetrics, AuditLogEntry, WinnerResult, WinnerProof, WinnerVerification, CreatePrivateOwnershipParams, PrivateNFTOwnership, ProveOwnershipParams, OwnershipProof, OwnershipVerification, TransferPrivatelyParams, TransferResult, NFTTransfer, OwnedNFT, WalletAdapter as WalletAdapter$1, WalletConnectionState, WalletEventType, WalletEventHandler, WalletEvent, Signature, UnsignedTransaction, SignedTransaction, TransactionReceipt, WalletErrorCodeType, WalletRegistryEntry, WalletInfo, PrivateWalletAdapter, WalletAdapterFactory } from '@sip-protocol/types';
|
|
3
|
-
import { c as ProofProvider, d as ProofFramework, F as FundingProofParams, P as ProofResult, V as ValidityProofParams, a as FulfillmentProofParams } from './noir-DKfEzWy9.
|
|
5
|
+
import { c as ProofProvider, d as ProofFramework, F as FundingProofParams, P as ProofResult, V as ValidityProofParams, a as FulfillmentProofParams } from './noir-DKfEzWy9.mjs';
|
|
4
6
|
|
|
5
7
|
/**
|
|
6
8
|
* Custom errors for SIP Protocol SDK
|
|
@@ -1213,7 +1215,7 @@ declare class OneClickClient {
|
|
|
1213
1215
|
*
|
|
1214
1216
|
* @param depositAddress - Deposit address from quote
|
|
1215
1217
|
* @param depositMemo - Optional memo for memo-based deposits
|
|
1216
|
-
* @returns Current swap status
|
|
1218
|
+
* @returns Current swap status with normalized transaction hashes
|
|
1217
1219
|
*/
|
|
1218
1220
|
getStatus(depositAddress: string, depositMemo?: string): Promise<OneClickStatusResponse>;
|
|
1219
1221
|
/**
|
|
@@ -1878,12 +1880,6 @@ declare class NEARIntentsAdapter {
|
|
|
1878
1880
|
*/
|
|
1879
1881
|
declare function createNEARIntentsAdapter(config?: NEARIntentsAdapterConfig): NEARIntentsAdapter;
|
|
1880
1882
|
|
|
1881
|
-
/**
|
|
1882
|
-
* SIP SDK Main Client
|
|
1883
|
-
*
|
|
1884
|
-
* High-level interface for interacting with the Shielded Intents Protocol.
|
|
1885
|
-
*/
|
|
1886
|
-
|
|
1887
1883
|
/**
|
|
1888
1884
|
* Configuration options for the SIP SDK client
|
|
1889
1885
|
*
|
|
@@ -2403,6 +2399,73 @@ declare class SIP {
|
|
|
2403
2399
|
private isValidTxHash;
|
|
2404
2400
|
private getQuotesDemo;
|
|
2405
2401
|
private executeDemo;
|
|
2402
|
+
/**
|
|
2403
|
+
* Execute a same-chain private transfer
|
|
2404
|
+
*
|
|
2405
|
+
* Bypasses cross-chain settlement for direct on-chain privacy transfers.
|
|
2406
|
+
* Currently supports Solana only.
|
|
2407
|
+
*
|
|
2408
|
+
* @param chain - Chain to execute on (must be 'solana')
|
|
2409
|
+
* @param params - Transfer parameters
|
|
2410
|
+
* @returns Transfer result with stealth address
|
|
2411
|
+
*
|
|
2412
|
+
* @example
|
|
2413
|
+
* ```typescript
|
|
2414
|
+
* const result = await sip.executeSameChain('solana', {
|
|
2415
|
+
* recipientMetaAddress: {
|
|
2416
|
+
* chain: 'solana',
|
|
2417
|
+
* spendingKey: '0x...',
|
|
2418
|
+
* viewingKey: '0x...',
|
|
2419
|
+
* },
|
|
2420
|
+
* amount: 5_000_000n, // 5 USDC
|
|
2421
|
+
* token: 'USDC',
|
|
2422
|
+
* connection,
|
|
2423
|
+
* sender: wallet.publicKey,
|
|
2424
|
+
* signTransaction: wallet.signTransaction,
|
|
2425
|
+
* })
|
|
2426
|
+
*
|
|
2427
|
+
* console.log('Sent to stealth:', result.stealthAddress)
|
|
2428
|
+
* ```
|
|
2429
|
+
*/
|
|
2430
|
+
executeSameChain(chain: ChainId, params: SameChainExecuteParams): Promise<SameChainExecuteResult>;
|
|
2431
|
+
/**
|
|
2432
|
+
* Check if same-chain privacy is supported for a chain
|
|
2433
|
+
*/
|
|
2434
|
+
isSameChainSupported(chain: ChainId): boolean;
|
|
2435
|
+
}
|
|
2436
|
+
/**
|
|
2437
|
+
* Parameters for same-chain private transfer execution
|
|
2438
|
+
*/
|
|
2439
|
+
interface SameChainExecuteParams {
|
|
2440
|
+
/** Recipient's stealth meta-address */
|
|
2441
|
+
recipientMetaAddress: StealthMetaAddress;
|
|
2442
|
+
/** Amount to transfer (in token's smallest unit) */
|
|
2443
|
+
amount: bigint;
|
|
2444
|
+
/** Token symbol (e.g., 'USDC') or mint address */
|
|
2445
|
+
token: string;
|
|
2446
|
+
/** Solana RPC connection */
|
|
2447
|
+
connection: _solana_web3_js.Connection;
|
|
2448
|
+
/** Sender's public key */
|
|
2449
|
+
sender: _solana_web3_js.PublicKey;
|
|
2450
|
+
/** Transaction signer */
|
|
2451
|
+
signTransaction: <T extends _solana_web3_js.Transaction | _solana_web3_js.VersionedTransaction>(tx: T) => Promise<T>;
|
|
2452
|
+
}
|
|
2453
|
+
/**
|
|
2454
|
+
* Result of same-chain private transfer
|
|
2455
|
+
*/
|
|
2456
|
+
interface SameChainExecuteResult {
|
|
2457
|
+
/** Transaction hash */
|
|
2458
|
+
txHash: string;
|
|
2459
|
+
/** Stealth address that received the funds */
|
|
2460
|
+
stealthAddress: string;
|
|
2461
|
+
/** Ephemeral public key for recipient scanning */
|
|
2462
|
+
ephemeralPublicKey: string;
|
|
2463
|
+
/** View tag for efficient scanning */
|
|
2464
|
+
viewTag: string;
|
|
2465
|
+
/** Explorer URL */
|
|
2466
|
+
explorerUrl: string;
|
|
2467
|
+
/** Chain the transfer was executed on */
|
|
2468
|
+
chain: ChainId;
|
|
2406
2469
|
}
|
|
2407
2470
|
/**
|
|
2408
2471
|
* Create a new SIP instance with default testnet config
|
|
@@ -9343,7 +9406,7 @@ type SolanaWalletName = 'phantom' | 'solflare' | 'backpack' | 'generic';
|
|
|
9343
9406
|
/**
|
|
9344
9407
|
* Solana network/cluster
|
|
9345
9408
|
*/
|
|
9346
|
-
type SolanaCluster = 'mainnet-beta' | 'testnet' | 'devnet' | 'localnet';
|
|
9409
|
+
type SolanaCluster$1 = 'mainnet-beta' | 'testnet' | 'devnet' | 'localnet';
|
|
9347
9410
|
/**
|
|
9348
9411
|
* Solana adapter configuration
|
|
9349
9412
|
*/
|
|
@@ -9351,7 +9414,7 @@ interface SolanaAdapterConfig {
|
|
|
9351
9414
|
/** Wallet to connect to */
|
|
9352
9415
|
wallet?: SolanaWalletName;
|
|
9353
9416
|
/** Solana cluster/network */
|
|
9354
|
-
cluster?: SolanaCluster;
|
|
9417
|
+
cluster?: SolanaCluster$1;
|
|
9355
9418
|
/** RPC endpoint URL */
|
|
9356
9419
|
rpcEndpoint?: string;
|
|
9357
9420
|
/** Custom wallet provider (for testing) */
|
|
@@ -9447,7 +9510,7 @@ declare class SolanaWalletAdapter extends BaseWalletAdapter {
|
|
|
9447
9510
|
/**
|
|
9448
9511
|
* Get the current Solana cluster
|
|
9449
9512
|
*/
|
|
9450
|
-
getCluster(): SolanaCluster;
|
|
9513
|
+
getCluster(): SolanaCluster$1;
|
|
9451
9514
|
/**
|
|
9452
9515
|
* Get the RPC endpoint
|
|
9453
9516
|
*/
|
|
@@ -9534,7 +9597,7 @@ interface MockSolanaAdapterConfig {
|
|
|
9534
9597
|
/** Whether to simulate transaction failure */
|
|
9535
9598
|
shouldFailTransaction?: boolean;
|
|
9536
9599
|
/** Simulated cluster */
|
|
9537
|
-
cluster?: SolanaCluster;
|
|
9600
|
+
cluster?: SolanaCluster$1;
|
|
9538
9601
|
/** Simulated latency in ms */
|
|
9539
9602
|
latency?: number;
|
|
9540
9603
|
}
|
|
@@ -9578,7 +9641,7 @@ declare class MockSolanaAdapter extends BaseWalletAdapter {
|
|
|
9578
9641
|
/**
|
|
9579
9642
|
* Get the current Solana cluster
|
|
9580
9643
|
*/
|
|
9581
|
-
getCluster(): SolanaCluster;
|
|
9644
|
+
getCluster(): SolanaCluster$1;
|
|
9582
9645
|
/**
|
|
9583
9646
|
* Connect to the mock wallet
|
|
9584
9647
|
*/
|
|
@@ -11387,4 +11450,410 @@ declare function createMockLedgerAdapter(config: Omit<MockHardwareConfig, 'devic
|
|
|
11387
11450
|
*/
|
|
11388
11451
|
declare function createMockTrezorAdapter(config: Omit<MockHardwareConfig, 'deviceType'>): MockTrezorAdapter;
|
|
11389
11452
|
|
|
11390
|
-
export { type CreateIntentOptions as $, getErrorMessage as A, BrowserNoirProvider as B, CryptoError as C, type SerializedError as D, ErrorCode as E, SIP as F, createSIP as G, createProductionSIP as H, IntentError as I, type SIPConfig as J, type ProductionQuote as K, IntentBuilder as L, type MobilePlatform as M, NetworkError as N, createShieldedIntent as O, type ProofProgressCallback as P, attachProofs as Q, hasRequiredProofs as R, SIPError as S, trackIntent as T, isExpired as U, ValidationError as V, type WalletAdapter as W, getTimeRemaining as X, serializeIntent as Y, deserializeIntent as Z, getIntentSummary as _, supportsSharedArrayBuffer as a, verifyOpening as a$, generateStealthMetaAddress as a0, generateStealthAddress as a1, deriveStealthPrivateKey as a2, checkStealthAddress as a3, encodeStealthMetaAddress as a4, decodeStealthMetaAddress as a5, publicKeyToEthAddress as a6, isEd25519Chain as a7, getCurveForChain as a8, generateEd25519StealthMetaAddress as a9, type SuiStealthResult as aA, CosmosStealthService as aB, generateCosmosStealthMetaAddress as aC, generateCosmosStealthAddress as aD, stealthKeyToCosmosAddress as aE, isValidCosmosAddress as aF, CHAIN_PREFIXES as aG, type CosmosChainId as aH, type CosmosStealthResult as aI, getPrivacyConfig as aJ, generateViewingKey as aK, deriveViewingKey as aL, encryptForViewing as aM, decryptWithViewing as aN, getPrivacyDescription as aO, type PrivacyConfig as aP, type TransactionData as aQ, createCommitment as aR, verifyCommitment as aS, generateIntentId as aT, hash as aU, generateRandomBytes as aV, secureWipe as aW, secureWipeAll as aX, withSecureBuffer as aY, withSecureBufferSync as aZ, commit as a_, generateEd25519StealthAddress as aa, deriveEd25519StealthPrivateKey as ab, checkEd25519StealthAddress as ac, ed25519PublicKeyToSolanaAddress as ad, solanaAddressToEd25519PublicKey as ae, isValidSolanaAddress as af, ed25519PublicKeyToNearAddress as ag, nearAddressToEd25519PublicKey as ah, isValidNearImplicitAddress as ai, isValidNearAccountId as aj, type StealthCurve as ak, AptosStealthService as al, generateAptosStealthAddress as am, deriveAptosStealthPrivateKey as an, checkAptosStealthAddress as ao, ed25519PublicKeyToAptosAddress as ap, aptosAddressToAuthKey as aq, isValidAptosAddress as ar, SuiStealthService as as, generateSuiStealthAddress as at, deriveSuiStealthPrivateKey as au, checkSuiStealthAddress as av, ed25519PublicKeyToSuiAddress as aw, normalizeSuiAddress as ax, isValidSuiAddress as ay, type AptosStealthResult as az, bytesToHex as b, type SwapResult$1 as b$, commitZero as b0, addCommitments as b1, subtractCommitments as b2, addBlindings as b3, subtractBlindings as b4, getGenerators as b5, generateBlinding as b6, type PedersenCommitment as b7, type CommitmentPoint as b8, isValidChainId as b9, getActiveOracles as bA, hasEnoughOracles as bB, serializeAttestationMessage as bC, deserializeAttestationMessage as bD, computeAttestationHash as bE, getChainNumericId as bF, ORACLE_DOMAIN as bG, ATTESTATION_VERSION as bH, DEFAULT_THRESHOLD as bI, DEFAULT_TOTAL_ORACLES as bJ, CHAIN_NUMERIC_IDS as bK, type OracleId as bL, type OracleStatus as bM, type OracleInfo as bN, type OracleAttestationMessage as bO, type OracleSignature as bP, type SignedOracleAttestation as bQ, type OracleRegistry as bR, type OracleRegistryConfig as bS, type AttestationRequest as bT, type AttestationResult as bU, type VerificationResult as bV, OneClickClient as bW, NEARIntentsAdapter as bX, createNEARIntentsAdapter as bY, type SwapRequest as bZ, type PreparedSwap as b_, isValidPrivacyLevel as ba, isValidHex as bb, isValidHexLength as bc, isValidAmount as bd, isNonNegativeAmount as be, isValidSlippage as bf, isValidStealthMetaAddress as bg, isValidCompressedPublicKey as bh, isValidEd25519PublicKey as bi, isValidPrivateKey as bj, isValidScalar as bk, validateCreateIntentParams as bl, validateAsset as bm, validateIntentInput as bn, validateIntentOutput as bo, validateViewingKey as bp, validateScalar as bq, MockProofProvider as br, verifyAttestation as bs, verifyOracleSignature as bt, signAttestationMessage as bu, deriveOracleId as bv, createOracleRegistry as bw, addOracle as bx, removeOracle as by, updateOracleStatus as bz, detectMobileBrowser as c, isValidTaprootAddress as c$, type NEARIntentsAdapterConfig as c0, MockSolver as c1, createMockSolver as c2, type MockSolverConfig as c3, SwapStatus as c4, SettlementRegistry as c5, SettlementRegistryError as c6, type SettlementBackendName as c7, type QuoteParams as c8, type Quote as c9, createZcashSwapService as cA, type ZcashShieldedServiceConfig as cB, type ShieldedSendParams as cC, type ShieldedSendResult as cD, type ReceivedNote as cE, type ShieldedBalance as cF, type ExportedViewingKey as cG, type ZcashSwapServiceConfig as cH, type ZcashSwapSourceChain as cI, type ZcashSwapSourceToken as cJ, type ZcashQuoteParams as cK, type ZcashQuote as cL, type ZcashSwapParams as cM, type ZcashSwapResult as cN, type ZcashSwapStatus as cO, type BridgeProvider as cP, type PriceFeed as cQ, schnorrSign as cR, schnorrVerify as cS, schnorrSignHex as cT, schnorrVerifyHex as cU, getXOnlyPublicKey as cV, computeTweakedKey as cW, createTaprootOutput as cX, createKeySpendOnlyOutput as cY, taprootAddress as cZ, decodeTaprootAddress as c_, type SwapRoute as ca, type SwapRouteStep as cb, type SwapParams as cc, type SwapResult as cd, type SwapStatusResponse as ce, type BackendCapabilities as cf, type SettlementBackend as cg, type SettlementBackendFactory as ch, type SettlementBackendRegistry as ci, type Route as cj, SmartRouter as ck, createSmartRouter as cl, type RouteWithQuote as cm, type QuoteComparison as cn, type FindBestRouteParams as co, NEARIntentsBackend as cp, createNEARIntentsBackend as cq, ZcashNativeBackend as cr, createZcashNativeBackend as cs, type ZcashNativeBackendConfig as ct, ZcashRPCClient as cu, ZcashRPCError as cv, createZcashClient as cw, ZcashShieldedService as cx, createZcashShieldedService as cy, ZcashSwapService as cz, detectMobilePlatform as d, createPrivateVoting as d$, type TaprootOutput as d0, type TapScript as d1, type BitcoinNetwork$1 as d2, PaymentBuilder as d3, createShieldedPayment as d4, decryptMemo as d5, trackPayment as d6, isPaymentExpired as d7, getPaymentTimeRemaining as d8, serializePayment as d9, type GenerateAuditReportParams as dA, type AuditReport as dB, type DecryptedTransaction as dC, type PdfExportOptions as dD, type ExportForRegulatorParams as dE, type RegulatoryExport as dF, type RegulatoryFormat as dG, type Jurisdiction as dH, type FATFExport as dI, type FATFTransaction as dJ, type FINCENExport as dK, type FINCENTransaction as dL, type CSVExport as dM, type DerivedViewingKey as dN, type DeriveViewingKeyParams as dO, type DeriveMultipleParams as dP, type ThresholdShares as dQ, type TimeLockResult as dR, type UnlockResult as dS, type TimeLockParams as dT, SealedBidAuction as dU, createSealedBidAuction as dV, type SealedBid as dW, type BidReceipt as dX, type CreateBidParams as dY, type VerifyBidParams as dZ, PrivateVoting as d_, deserializePayment as da, getPaymentSummary as db, STABLECOIN_INFO as dc, STABLECOIN_ADDRESSES as dd, STABLECOIN_DECIMALS as de, getStablecoin as df, getStablecoinsForChain as dg, isStablecoin as dh, getStablecoinInfo as di, getSupportedStablecoins as dj, isStablecoinOnChain as dk, getChainsForStablecoin as dl, toStablecoinUnits as dm, fromStablecoinUnits as dn, formatStablecoinAmount as dp, type CreatePaymentOptions as dq, type StablecoinInfo as dr, Treasury as ds, ComplianceManager as dt, ComplianceReporter as du, generatePdfReport as dv, ConditionalDisclosure as dw, AuditorKeyDerivation as dx, AuditorType as dy, ThresholdViewingKey as dz, getMobileDeviceInfo as e, type SolanaSendOptions as e$, type EncryptedVote as e0, type RevealedVote as e1, type CastVoteParams as e2, PrivateNFT as e3, createPrivateOwnership as e4, proveOwnership as e5, verifyOwnership as e6, BaseWalletAdapter as e7, MockWalletAdapter as e8, WalletError as e9, normalizeAddress as eA, getDefaultRpcEndpoint as eB, EthereumChainId as eC, HardwareErrorCode as eD, HardwareWalletError as eE, DerivationPath as eF, getDerivationPath as eG, supportsWebUSB as eH, supportsWebHID as eI, supportsWebBluetooth as eJ, getAvailableTransports as eK, LedgerWalletAdapter as eL, createLedgerAdapter as eM, TrezorWalletAdapter as eN, createTrezorAdapter as eO, MockLedgerAdapter as eP, MockTrezorAdapter as eQ, createMockLedgerAdapter as eR, createMockTrezorAdapter as eS, type SolanaPublicKey as eT, type SolanaTransaction as eU, type SolanaVersionedTransaction as eV, type SolanaWalletProvider as eW, type SolanaWalletName as eX, type SolanaCluster as eY, type SolanaAdapterConfig as eZ, type SolanaConnection as e_, notConnectedError as ea, featureNotSupportedError as eb, walletRegistry as ec, registerWallet as ed, createWalletFactory as ee, isPrivateWalletAdapter as ef, SolanaWalletAdapter as eg, createSolanaAdapter as eh, MockSolanaAdapter as ei, createMockSolanaAdapter as ej, createMockSolanaProvider as ek, createMockSolanaConnection as el, getSolanaProvider as em, detectSolanaWallets as en, solanaPublicKeyToHex as eo, base58ToHex as ep, EthereumWalletAdapter as eq, createEthereumAdapter as er, MockEthereumAdapter as es, createMockEthereumAdapter as et, createMockEthereumProvider as eu, getEthereumProvider as ev, detectEthereumWallets as ew, toHex as ex, fromHex as ey, hexToNumber as ez, checkMobileWASMCompatibility as f, type SolanaUnsignedTransaction as f0, type SolanaSignature as f1, type MockSolanaAdapterConfig as f2, type EIP1193Provider as f3, type EIP1193RequestArguments as f4, type EIP1193Event as f5, type EIP1193ConnectInfo as f6, type EIP1193ProviderRpcError as f7, type EIP712Domain as f8, type EIP712TypeDefinition as f9, type EIP712Types as fa, type EIP712TypedData as fb, type EthereumTransactionRequest as fc, type EthereumTransactionReceipt as fd, type EthereumTokenMetadata as fe, type EthereumChainMetadata as ff, type EthereumWalletName as fg, type EthereumAdapterConfig as fh, type EthereumChainIdType as fi, type MockEthereumAdapterConfig as fj, type HardwareWalletType as fk, type LedgerModel as fl, type TrezorModel as fm, type HardwareConnectionStatus as fn, type TransportType as fo, type HardwareDeviceInfo as fp, type HardwareWalletConfig as fq, type LedgerConfig as fr, type TrezorConfig as fs, type HardwareSignRequest as ft, type HardwareEthereumTx as fu, type HardwareSignature as fv, type HardwareAccount as fw, type HardwareTransport as fx, type HardwareErrorCodeType as fy, type MockHardwareConfig as fz, getBrowserInfo as g, hexToBytes as h, isBrowser as i, getBrowserVersion as j, getOSVersion as k, isTablet as l, supportsTouch as m, supportsWASMSimd as n, supportsWASMBulkMemory as o, type MobileBrowser as p, type MobileDeviceInfo as q, type MobileWASMCompatibility as r, supportsWebWorkers as s, type BrowserNoirProviderConfig as t, ProofError as u, ProofNotImplementedError as v, EncryptionNotImplementedError as w, isSIPError as x, hasErrorCode as y, wrapError as z };
|
|
11453
|
+
/**
|
|
11454
|
+
* Solana Chain Constants
|
|
11455
|
+
*
|
|
11456
|
+
* Token mints, RPC endpoints, and configuration for Solana same-chain privacy.
|
|
11457
|
+
*/
|
|
11458
|
+
/**
|
|
11459
|
+
* Common SPL token mint addresses on Solana mainnet
|
|
11460
|
+
*/
|
|
11461
|
+
declare const SOLANA_TOKEN_MINTS: {
|
|
11462
|
+
/** USD Coin (USDC) - Circle's stablecoin */
|
|
11463
|
+
readonly USDC: "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v";
|
|
11464
|
+
/** Tether USD (USDT) */
|
|
11465
|
+
readonly USDT: "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB";
|
|
11466
|
+
/** Wrapped SOL (for SPL token operations with native SOL) */
|
|
11467
|
+
readonly WSOL: "So11111111111111111111111111111111111111112";
|
|
11468
|
+
};
|
|
11469
|
+
/**
|
|
11470
|
+
* Token decimals for Solana tokens
|
|
11471
|
+
*/
|
|
11472
|
+
declare const SOLANA_TOKEN_DECIMALS: Record<string, number>;
|
|
11473
|
+
/**
|
|
11474
|
+
* RPC endpoints for Solana clusters
|
|
11475
|
+
*/
|
|
11476
|
+
declare const SOLANA_RPC_ENDPOINTS: {
|
|
11477
|
+
readonly 'mainnet-beta': "https://api.mainnet-beta.solana.com";
|
|
11478
|
+
readonly mainnet: "https://api.mainnet-beta.solana.com";
|
|
11479
|
+
readonly devnet: "https://api.devnet.solana.com";
|
|
11480
|
+
readonly testnet: "https://api.testnet.solana.com";
|
|
11481
|
+
readonly localnet: "http://localhost:8899";
|
|
11482
|
+
};
|
|
11483
|
+
/**
|
|
11484
|
+
* Solana cluster types
|
|
11485
|
+
*/
|
|
11486
|
+
type SolanaCluster = keyof typeof SOLANA_RPC_ENDPOINTS;
|
|
11487
|
+
/**
|
|
11488
|
+
* Explorer URLs for transaction viewing
|
|
11489
|
+
*/
|
|
11490
|
+
declare const SOLANA_EXPLORER_URLS: {
|
|
11491
|
+
readonly 'mainnet-beta': "https://solscan.io";
|
|
11492
|
+
readonly mainnet: "https://solscan.io";
|
|
11493
|
+
readonly devnet: "https://solscan.io?cluster=devnet";
|
|
11494
|
+
readonly testnet: "https://solscan.io?cluster=testnet";
|
|
11495
|
+
readonly localnet: "http://localhost:3000";
|
|
11496
|
+
};
|
|
11497
|
+
/**
|
|
11498
|
+
* Memo program ID for Solana
|
|
11499
|
+
*/
|
|
11500
|
+
declare const MEMO_PROGRAM_ID = "MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr";
|
|
11501
|
+
/**
|
|
11502
|
+
* SIP announcement memo prefix
|
|
11503
|
+
* Format: SIP:1:<ephemeral_pubkey_base58>:<view_tag_hex>
|
|
11504
|
+
*/
|
|
11505
|
+
declare const SIP_MEMO_PREFIX = "SIP:1:";
|
|
11506
|
+
/**
|
|
11507
|
+
* Get explorer URL for a transaction
|
|
11508
|
+
*/
|
|
11509
|
+
declare function getExplorerUrl(signature: string, cluster?: SolanaCluster): string;
|
|
11510
|
+
/**
|
|
11511
|
+
* Get token mint address from symbol
|
|
11512
|
+
*/
|
|
11513
|
+
declare function getTokenMint(symbol: string): string | undefined;
|
|
11514
|
+
/**
|
|
11515
|
+
* Get token decimals from symbol
|
|
11516
|
+
*/
|
|
11517
|
+
declare function getTokenDecimals(symbol: string): number;
|
|
11518
|
+
|
|
11519
|
+
/**
|
|
11520
|
+
* Solana Same-Chain Privacy Types
|
|
11521
|
+
*
|
|
11522
|
+
* Type definitions for Solana stealth address transfers and scanning.
|
|
11523
|
+
*/
|
|
11524
|
+
|
|
11525
|
+
/**
|
|
11526
|
+
* Parameters for sending a private SPL token transfer
|
|
11527
|
+
*/
|
|
11528
|
+
interface SolanaPrivateTransferParams {
|
|
11529
|
+
/** Solana RPC connection */
|
|
11530
|
+
connection: Connection;
|
|
11531
|
+
/** Sender's public key */
|
|
11532
|
+
sender: PublicKey;
|
|
11533
|
+
/** Sender's token account (ATA) */
|
|
11534
|
+
senderTokenAccount: PublicKey;
|
|
11535
|
+
/** Recipient's stealth meta-address (sip:solana:...) */
|
|
11536
|
+
recipientMetaAddress: StealthMetaAddress;
|
|
11537
|
+
/** SPL token mint address */
|
|
11538
|
+
mint: PublicKey;
|
|
11539
|
+
/** Amount to transfer (in token's smallest unit) */
|
|
11540
|
+
amount: bigint;
|
|
11541
|
+
/** Function to sign the transaction */
|
|
11542
|
+
signTransaction: <T extends Transaction | VersionedTransaction>(tx: T) => Promise<T>;
|
|
11543
|
+
}
|
|
11544
|
+
/**
|
|
11545
|
+
* Result of a private SPL token transfer
|
|
11546
|
+
*/
|
|
11547
|
+
interface SolanaPrivateTransferResult {
|
|
11548
|
+
/** Transaction signature */
|
|
11549
|
+
txSignature: string;
|
|
11550
|
+
/** Stealth address (base58 Solana address) */
|
|
11551
|
+
stealthAddress: string;
|
|
11552
|
+
/** Ephemeral public key (base58) for recipient scanning */
|
|
11553
|
+
ephemeralPublicKey: string;
|
|
11554
|
+
/** View tag for efficient scanning */
|
|
11555
|
+
viewTag: string;
|
|
11556
|
+
/** Explorer URL for the transaction */
|
|
11557
|
+
explorerUrl: string;
|
|
11558
|
+
/** Cluster the transaction was sent on */
|
|
11559
|
+
cluster: SolanaCluster;
|
|
11560
|
+
}
|
|
11561
|
+
/**
|
|
11562
|
+
* Parameters for scanning for incoming stealth payments
|
|
11563
|
+
*/
|
|
11564
|
+
interface SolanaScanParams {
|
|
11565
|
+
/** Solana RPC connection */
|
|
11566
|
+
connection: Connection;
|
|
11567
|
+
/** Recipient's viewing private key (hex) */
|
|
11568
|
+
viewingPrivateKey: HexString;
|
|
11569
|
+
/** Recipient's spending public key (hex) */
|
|
11570
|
+
spendingPublicKey: HexString;
|
|
11571
|
+
/** Optional: Start scanning from this slot */
|
|
11572
|
+
fromSlot?: number;
|
|
11573
|
+
/** Optional: Stop scanning at this slot */
|
|
11574
|
+
toSlot?: number;
|
|
11575
|
+
/** Optional: Limit number of results */
|
|
11576
|
+
limit?: number;
|
|
11577
|
+
}
|
|
11578
|
+
/**
|
|
11579
|
+
* Result of scanning for incoming payments
|
|
11580
|
+
*/
|
|
11581
|
+
interface SolanaScanResult {
|
|
11582
|
+
/** Stealth address that received the payment (base58) */
|
|
11583
|
+
stealthAddress: string;
|
|
11584
|
+
/** Ephemeral public key from the sender (base58) */
|
|
11585
|
+
ephemeralPublicKey: string;
|
|
11586
|
+
/** Amount received (in token's smallest unit) */
|
|
11587
|
+
amount: bigint;
|
|
11588
|
+
/** Token mint address */
|
|
11589
|
+
mint: string;
|
|
11590
|
+
/** Token symbol (if known) */
|
|
11591
|
+
tokenSymbol?: string;
|
|
11592
|
+
/** Transaction signature */
|
|
11593
|
+
txSignature: string;
|
|
11594
|
+
/** Block slot */
|
|
11595
|
+
slot: number;
|
|
11596
|
+
/** Block timestamp */
|
|
11597
|
+
timestamp: number;
|
|
11598
|
+
}
|
|
11599
|
+
/**
|
|
11600
|
+
* Parameters for claiming a stealth payment
|
|
11601
|
+
*/
|
|
11602
|
+
interface SolanaClaimParams {
|
|
11603
|
+
/** Solana RPC connection */
|
|
11604
|
+
connection: Connection;
|
|
11605
|
+
/** Stealth address to claim from (base58) */
|
|
11606
|
+
stealthAddress: string;
|
|
11607
|
+
/** Ephemeral public key from the payment (base58) */
|
|
11608
|
+
ephemeralPublicKey: string;
|
|
11609
|
+
/** Recipient's viewing private key (hex) */
|
|
11610
|
+
viewingPrivateKey: HexString;
|
|
11611
|
+
/** Recipient's spending private key (hex) */
|
|
11612
|
+
spendingPrivateKey: HexString;
|
|
11613
|
+
/** Destination address to send claimed funds (base58) */
|
|
11614
|
+
destinationAddress: string;
|
|
11615
|
+
/** SPL token mint address */
|
|
11616
|
+
mint: PublicKey;
|
|
11617
|
+
}
|
|
11618
|
+
/**
|
|
11619
|
+
* Result of claiming a stealth payment
|
|
11620
|
+
*/
|
|
11621
|
+
interface SolanaClaimResult {
|
|
11622
|
+
/** Transaction signature */
|
|
11623
|
+
txSignature: string;
|
|
11624
|
+
/** Destination address that received the funds (base58) */
|
|
11625
|
+
destinationAddress: string;
|
|
11626
|
+
/** Amount claimed (in token's smallest unit) */
|
|
11627
|
+
amount: bigint;
|
|
11628
|
+
/** Explorer URL for the transaction */
|
|
11629
|
+
explorerUrl: string;
|
|
11630
|
+
}
|
|
11631
|
+
/**
|
|
11632
|
+
* Announcement data stored in transaction memo
|
|
11633
|
+
*/
|
|
11634
|
+
interface SolanaAnnouncement {
|
|
11635
|
+
/** Ephemeral public key (base58) */
|
|
11636
|
+
ephemeralPublicKey: string;
|
|
11637
|
+
/** View tag for efficient scanning (hex, 1 byte) */
|
|
11638
|
+
viewTag: string;
|
|
11639
|
+
/** Full stealth address (for verification) */
|
|
11640
|
+
stealthAddress?: string;
|
|
11641
|
+
}
|
|
11642
|
+
/**
|
|
11643
|
+
* Parse announcement from memo string
|
|
11644
|
+
* Format: SIP:1:<ephemeral_pubkey_base58>:<view_tag_hex>
|
|
11645
|
+
*/
|
|
11646
|
+
declare function parseAnnouncement(memo: string): SolanaAnnouncement | null;
|
|
11647
|
+
/**
|
|
11648
|
+
* Create announcement memo string
|
|
11649
|
+
*/
|
|
11650
|
+
declare function createAnnouncementMemo(ephemeralPublicKey: string, viewTag: string, stealthAddress?: string): string;
|
|
11651
|
+
|
|
11652
|
+
/**
|
|
11653
|
+
* Solana Private SPL Token Transfer
|
|
11654
|
+
*
|
|
11655
|
+
* Send SPL tokens to a stealth address with on-chain announcement.
|
|
11656
|
+
* Uses ed25519 stealth addresses for Solana-native privacy.
|
|
11657
|
+
*/
|
|
11658
|
+
|
|
11659
|
+
/**
|
|
11660
|
+
* Send SPL tokens privately to a stealth address
|
|
11661
|
+
*
|
|
11662
|
+
* This function:
|
|
11663
|
+
* 1. Generates a one-time stealth address from recipient's meta-address
|
|
11664
|
+
* 2. Creates/gets Associated Token Account for the stealth address
|
|
11665
|
+
* 3. Transfers tokens to the stealth address
|
|
11666
|
+
* 4. Adds memo with ephemeral key for recipient scanning
|
|
11667
|
+
*
|
|
11668
|
+
* @param params - Transfer parameters
|
|
11669
|
+
* @returns Transfer result with stealth address and explorer URL
|
|
11670
|
+
*
|
|
11671
|
+
* @example
|
|
11672
|
+
* ```typescript
|
|
11673
|
+
* import { sendPrivateSPLTransfer } from '@sip-protocol/sdk'
|
|
11674
|
+
*
|
|
11675
|
+
* const result = await sendPrivateSPLTransfer({
|
|
11676
|
+
* connection,
|
|
11677
|
+
* sender: wallet.publicKey,
|
|
11678
|
+
* senderTokenAccount: senderATA,
|
|
11679
|
+
* recipientMetaAddress: {
|
|
11680
|
+
* chain: 'solana',
|
|
11681
|
+
* spendingKey: '0x...',
|
|
11682
|
+
* viewingKey: '0x...',
|
|
11683
|
+
* },
|
|
11684
|
+
* mint: new PublicKey('EPjFWdd5...'), // USDC
|
|
11685
|
+
* amount: 5_000_000n, // 5 USDC (6 decimals)
|
|
11686
|
+
* signTransaction: wallet.signTransaction,
|
|
11687
|
+
* })
|
|
11688
|
+
*
|
|
11689
|
+
* console.log('Sent to:', result.stealthAddress)
|
|
11690
|
+
* console.log('View on Solscan:', result.explorerUrl)
|
|
11691
|
+
* ```
|
|
11692
|
+
*/
|
|
11693
|
+
declare function sendPrivateSPLTransfer(params: SolanaPrivateTransferParams): Promise<SolanaPrivateTransferResult>;
|
|
11694
|
+
/**
|
|
11695
|
+
* Estimate transaction fee for a private transfer
|
|
11696
|
+
*
|
|
11697
|
+
* @param connection - Solana RPC connection
|
|
11698
|
+
* @param needsATACreation - Whether ATA needs to be created
|
|
11699
|
+
* @returns Estimated fee in lamports
|
|
11700
|
+
*/
|
|
11701
|
+
declare function estimatePrivateTransferFee(connection: Parameters<typeof sendPrivateSPLTransfer>[0]['connection'], needsATACreation?: boolean): Promise<bigint>;
|
|
11702
|
+
/**
|
|
11703
|
+
* Check if a stealth address already has an Associated Token Account
|
|
11704
|
+
*
|
|
11705
|
+
* @param connection - Solana RPC connection
|
|
11706
|
+
* @param stealthAddress - Stealth address (base58)
|
|
11707
|
+
* @param mint - Token mint
|
|
11708
|
+
* @returns True if ATA exists
|
|
11709
|
+
*/
|
|
11710
|
+
declare function hasTokenAccount(connection: Parameters<typeof sendPrivateSPLTransfer>[0]['connection'], stealthAddress: string, mint: PublicKey): Promise<boolean>;
|
|
11711
|
+
|
|
11712
|
+
/**
|
|
11713
|
+
* Solana Stealth Payment Scanning and Claiming
|
|
11714
|
+
*
|
|
11715
|
+
* Scan the blockchain for incoming stealth payments and claim them.
|
|
11716
|
+
*/
|
|
11717
|
+
|
|
11718
|
+
/**
|
|
11719
|
+
* Scan for incoming stealth payments
|
|
11720
|
+
*
|
|
11721
|
+
* Queries the Solana blockchain for transactions containing SIP announcements,
|
|
11722
|
+
* then checks if any match the recipient's viewing key.
|
|
11723
|
+
*
|
|
11724
|
+
* @param params - Scanning parameters
|
|
11725
|
+
* @returns Array of detected payments
|
|
11726
|
+
*
|
|
11727
|
+
* @example
|
|
11728
|
+
* ```typescript
|
|
11729
|
+
* const payments = await scanForPayments({
|
|
11730
|
+
* connection,
|
|
11731
|
+
* viewingPrivateKey: '0x...',
|
|
11732
|
+
* spendingPublicKey: '0x...',
|
|
11733
|
+
* fromSlot: 250000000,
|
|
11734
|
+
* })
|
|
11735
|
+
*
|
|
11736
|
+
* for (const payment of payments) {
|
|
11737
|
+
* console.log(`Found ${payment.amount} at ${payment.stealthAddress}`)
|
|
11738
|
+
* }
|
|
11739
|
+
* ```
|
|
11740
|
+
*/
|
|
11741
|
+
declare function scanForPayments(params: SolanaScanParams): Promise<SolanaScanResult[]>;
|
|
11742
|
+
/**
|
|
11743
|
+
* Claim a stealth payment
|
|
11744
|
+
*
|
|
11745
|
+
* Derives the stealth private key and transfers funds to the destination.
|
|
11746
|
+
*
|
|
11747
|
+
* @param params - Claim parameters
|
|
11748
|
+
* @returns Claim result with transaction signature
|
|
11749
|
+
*
|
|
11750
|
+
* @example
|
|
11751
|
+
* ```typescript
|
|
11752
|
+
* const result = await claimStealthPayment({
|
|
11753
|
+
* connection,
|
|
11754
|
+
* stealthAddress: '7xK9...',
|
|
11755
|
+
* ephemeralPublicKey: '8yL0...',
|
|
11756
|
+
* viewingPrivateKey: '0x...',
|
|
11757
|
+
* spendingPrivateKey: '0x...',
|
|
11758
|
+
* destinationAddress: 'myWallet...',
|
|
11759
|
+
* mint: new PublicKey('EPjFWdd5...'),
|
|
11760
|
+
* })
|
|
11761
|
+
*
|
|
11762
|
+
* console.log('Claimed! Tx:', result.txSignature)
|
|
11763
|
+
* ```
|
|
11764
|
+
*/
|
|
11765
|
+
declare function claimStealthPayment(params: SolanaClaimParams): Promise<SolanaClaimResult>;
|
|
11766
|
+
/**
|
|
11767
|
+
* Get token balance for a stealth address
|
|
11768
|
+
*/
|
|
11769
|
+
declare function getStealthBalance(connection: SolanaScanParams['connection'], stealthAddress: string, mint: PublicKey): Promise<bigint>;
|
|
11770
|
+
|
|
11771
|
+
/**
|
|
11772
|
+
* Same-Chain Privacy Executor
|
|
11773
|
+
*
|
|
11774
|
+
* Executes privacy-preserving transfers on the same chain,
|
|
11775
|
+
* bypassing cross-chain settlement for direct transfers.
|
|
11776
|
+
*/
|
|
11777
|
+
|
|
11778
|
+
/**
|
|
11779
|
+
* Parameters for same-chain private transfer
|
|
11780
|
+
*/
|
|
11781
|
+
interface SameChainTransferParams {
|
|
11782
|
+
/** Recipient's stealth meta-address */
|
|
11783
|
+
recipientMetaAddress: StealthMetaAddress;
|
|
11784
|
+
/** Amount to transfer (in token's smallest unit) */
|
|
11785
|
+
amount: bigint;
|
|
11786
|
+
/** Token identifier (symbol or mint address) */
|
|
11787
|
+
token: string;
|
|
11788
|
+
}
|
|
11789
|
+
/**
|
|
11790
|
+
* Result of same-chain private transfer
|
|
11791
|
+
*/
|
|
11792
|
+
interface SameChainTransferResult {
|
|
11793
|
+
/** Transaction signature/hash */
|
|
11794
|
+
txHash: string;
|
|
11795
|
+
/** Stealth address that received the funds */
|
|
11796
|
+
stealthAddress: string;
|
|
11797
|
+
/** Ephemeral public key for recipient scanning */
|
|
11798
|
+
ephemeralPublicKey: string;
|
|
11799
|
+
/** Explorer URL */
|
|
11800
|
+
explorerUrl: string;
|
|
11801
|
+
/** Chain the transfer was executed on */
|
|
11802
|
+
chain: ChainId;
|
|
11803
|
+
}
|
|
11804
|
+
/**
|
|
11805
|
+
* Same-chain executor interface
|
|
11806
|
+
*/
|
|
11807
|
+
interface SameChainExecutor {
|
|
11808
|
+
/** Chain this executor handles */
|
|
11809
|
+
readonly chain: ChainId;
|
|
11810
|
+
/**
|
|
11811
|
+
* Execute a same-chain private transfer
|
|
11812
|
+
*/
|
|
11813
|
+
execute(params: SameChainTransferParams): Promise<SameChainTransferResult>;
|
|
11814
|
+
/**
|
|
11815
|
+
* Estimate transaction fee
|
|
11816
|
+
*/
|
|
11817
|
+
estimateFee(params: SameChainTransferParams): Promise<bigint>;
|
|
11818
|
+
}
|
|
11819
|
+
/**
|
|
11820
|
+
* Solana-specific executor configuration
|
|
11821
|
+
*/
|
|
11822
|
+
interface SolanaSameChainConfig {
|
|
11823
|
+
/** Solana RPC connection */
|
|
11824
|
+
connection: Connection;
|
|
11825
|
+
/** Sender's public key */
|
|
11826
|
+
sender: PublicKey;
|
|
11827
|
+
/** Sender's token account getter */
|
|
11828
|
+
getTokenAccount: (mint: PublicKey) => Promise<PublicKey>;
|
|
11829
|
+
/** Transaction signer */
|
|
11830
|
+
signTransaction: <T extends Transaction | VersionedTransaction>(tx: T) => Promise<T>;
|
|
11831
|
+
/** Token mint resolver (symbol -> PublicKey) */
|
|
11832
|
+
getTokenMint: (symbol: string) => PublicKey;
|
|
11833
|
+
}
|
|
11834
|
+
/**
|
|
11835
|
+
* Solana Same-Chain Executor
|
|
11836
|
+
*
|
|
11837
|
+
* Executes privacy-preserving SPL token transfers on Solana.
|
|
11838
|
+
*/
|
|
11839
|
+
declare class SolanaSameChainExecutor implements SameChainExecutor {
|
|
11840
|
+
readonly chain: "solana";
|
|
11841
|
+
private config;
|
|
11842
|
+
constructor(config: SolanaSameChainConfig);
|
|
11843
|
+
execute(params: SameChainTransferParams): Promise<SameChainTransferResult>;
|
|
11844
|
+
estimateFee(params: SameChainTransferParams): Promise<bigint>;
|
|
11845
|
+
}
|
|
11846
|
+
/**
|
|
11847
|
+
* Factory function to create a same-chain executor for a given chain
|
|
11848
|
+
*/
|
|
11849
|
+
declare function createSameChainExecutor(chain: ChainId, config: SolanaSameChainConfig): SameChainExecutor;
|
|
11850
|
+
/**
|
|
11851
|
+
* Check if same-chain privacy is supported for a chain
|
|
11852
|
+
*/
|
|
11853
|
+
declare function isSameChainSupported(chain: ChainId): boolean;
|
|
11854
|
+
/**
|
|
11855
|
+
* Get supported same-chain privacy chains
|
|
11856
|
+
*/
|
|
11857
|
+
declare function getSupportedSameChainChains(): ChainId[];
|
|
11858
|
+
|
|
11859
|
+
export { deserializeIntent as $, getErrorMessage as A, BrowserNoirProvider as B, CryptoError as C, type SerializedError as D, ErrorCode as E, SIP as F, createSIP as G, createProductionSIP as H, IntentError as I, type SIPConfig as J, type ProductionQuote as K, type SameChainExecuteParams as L, type MobilePlatform as M, NetworkError as N, type SameChainExecuteResult as O, type ProofProgressCallback as P, IntentBuilder as Q, createShieldedIntent as R, SIPError as S, attachProofs as T, hasRequiredProofs as U, ValidationError as V, type WalletAdapter as W, trackIntent as X, isExpired as Y, getTimeRemaining as Z, serializeIntent as _, supportsSharedArrayBuffer as a, withSecureBufferSync as a$, getIntentSummary as a0, type CreateIntentOptions as a1, generateStealthMetaAddress as a2, generateStealthAddress as a3, deriveStealthPrivateKey as a4, checkStealthAddress as a5, encodeStealthMetaAddress as a6, decodeStealthMetaAddress as a7, publicKeyToEthAddress as a8, isEd25519Chain as a9, isValidSuiAddress as aA, type AptosStealthResult as aB, type SuiStealthResult as aC, CosmosStealthService as aD, generateCosmosStealthMetaAddress as aE, generateCosmosStealthAddress as aF, stealthKeyToCosmosAddress as aG, isValidCosmosAddress as aH, CHAIN_PREFIXES as aI, type CosmosChainId as aJ, type CosmosStealthResult as aK, getPrivacyConfig as aL, generateViewingKey as aM, deriveViewingKey as aN, encryptForViewing as aO, decryptWithViewing as aP, getPrivacyDescription as aQ, type PrivacyConfig as aR, type TransactionData as aS, createCommitment as aT, verifyCommitment as aU, generateIntentId as aV, hash as aW, generateRandomBytes as aX, secureWipe as aY, secureWipeAll as aZ, withSecureBuffer as a_, getCurveForChain as aa, generateEd25519StealthMetaAddress as ab, generateEd25519StealthAddress as ac, deriveEd25519StealthPrivateKey as ad, checkEd25519StealthAddress as ae, ed25519PublicKeyToSolanaAddress as af, solanaAddressToEd25519PublicKey as ag, isValidSolanaAddress as ah, ed25519PublicKeyToNearAddress as ai, nearAddressToEd25519PublicKey as aj, isValidNearImplicitAddress as ak, isValidNearAccountId as al, type StealthCurve as am, AptosStealthService as an, generateAptosStealthAddress as ao, deriveAptosStealthPrivateKey as ap, checkAptosStealthAddress as aq, ed25519PublicKeyToAptosAddress as ar, aptosAddressToAuthKey as as, isValidAptosAddress as at, SuiStealthService as au, generateSuiStealthAddress as av, deriveSuiStealthPrivateKey as aw, checkSuiStealthAddress as ax, ed25519PublicKeyToSuiAddress as ay, normalizeSuiAddress as az, bytesToHex as b, type SwapRequest as b$, commit as b0, verifyOpening as b1, commitZero as b2, addCommitments as b3, subtractCommitments as b4, addBlindings as b5, subtractBlindings as b6, getGenerators as b7, generateBlinding as b8, type PedersenCommitment as b9, removeOracle as bA, updateOracleStatus as bB, getActiveOracles as bC, hasEnoughOracles as bD, serializeAttestationMessage as bE, deserializeAttestationMessage as bF, computeAttestationHash as bG, getChainNumericId as bH, ORACLE_DOMAIN as bI, ATTESTATION_VERSION as bJ, DEFAULT_THRESHOLD as bK, DEFAULT_TOTAL_ORACLES as bL, CHAIN_NUMERIC_IDS as bM, type OracleId as bN, type OracleStatus as bO, type OracleInfo as bP, type OracleAttestationMessage as bQ, type OracleSignature as bR, type SignedOracleAttestation as bS, type OracleRegistry as bT, type OracleRegistryConfig as bU, type AttestationRequest as bV, type AttestationResult as bW, type VerificationResult as bX, OneClickClient as bY, NEARIntentsAdapter as bZ, createNEARIntentsAdapter as b_, type CommitmentPoint as ba, isValidChainId as bb, isValidPrivacyLevel as bc, isValidHex as bd, isValidHexLength as be, isValidAmount as bf, isNonNegativeAmount as bg, isValidSlippage as bh, isValidStealthMetaAddress as bi, isValidCompressedPublicKey as bj, isValidEd25519PublicKey as bk, isValidPrivateKey as bl, isValidScalar as bm, validateCreateIntentParams as bn, validateAsset as bo, validateIntentInput as bp, validateIntentOutput as bq, validateViewingKey as br, validateScalar as bs, MockProofProvider as bt, verifyAttestation as bu, verifyOracleSignature as bv, signAttestationMessage as bw, deriveOracleId as bx, createOracleRegistry as by, addOracle as bz, detectMobileBrowser as c, taprootAddress as c$, type PreparedSwap as c0, type SwapResult$1 as c1, type NEARIntentsAdapterConfig as c2, MockSolver as c3, createMockSolver as c4, type MockSolverConfig as c5, SwapStatus as c6, SettlementRegistry as c7, SettlementRegistryError as c8, type SettlementBackendName as c9, createZcashShieldedService as cA, ZcashSwapService as cB, createZcashSwapService as cC, type ZcashShieldedServiceConfig as cD, type ShieldedSendParams as cE, type ShieldedSendResult as cF, type ReceivedNote as cG, type ShieldedBalance as cH, type ExportedViewingKey as cI, type ZcashSwapServiceConfig as cJ, type ZcashSwapSourceChain as cK, type ZcashSwapSourceToken as cL, type ZcashQuoteParams as cM, type ZcashQuote as cN, type ZcashSwapParams as cO, type ZcashSwapResult as cP, type ZcashSwapStatus as cQ, type BridgeProvider as cR, type PriceFeed as cS, schnorrSign as cT, schnorrVerify as cU, schnorrSignHex as cV, schnorrVerifyHex as cW, getXOnlyPublicKey as cX, computeTweakedKey as cY, createTaprootOutput as cZ, createKeySpendOnlyOutput as c_, type QuoteParams as ca, type Quote as cb, type SwapRoute as cc, type SwapRouteStep as cd, type SwapParams as ce, type SwapResult as cf, type SwapStatusResponse as cg, type BackendCapabilities as ch, type SettlementBackend as ci, type SettlementBackendFactory as cj, type SettlementBackendRegistry as ck, type Route as cl, SmartRouter as cm, createSmartRouter as cn, type RouteWithQuote as co, type QuoteComparison as cp, type FindBestRouteParams as cq, NEARIntentsBackend as cr, createNEARIntentsBackend as cs, ZcashNativeBackend as ct, createZcashNativeBackend as cu, type ZcashNativeBackendConfig as cv, ZcashRPCClient as cw, ZcashRPCError as cx, createZcashClient as cy, ZcashShieldedService as cz, detectMobilePlatform as d, type VerifyBidParams as d$, decodeTaprootAddress as d0, isValidTaprootAddress as d1, type TaprootOutput as d2, type TapScript as d3, type BitcoinNetwork$1 as d4, PaymentBuilder as d5, createShieldedPayment as d6, decryptMemo as d7, trackPayment as d8, isPaymentExpired as d9, AuditorType as dA, ThresholdViewingKey as dB, type GenerateAuditReportParams as dC, type AuditReport as dD, type DecryptedTransaction as dE, type PdfExportOptions as dF, type ExportForRegulatorParams as dG, type RegulatoryExport as dH, type RegulatoryFormat as dI, type Jurisdiction as dJ, type FATFExport as dK, type FATFTransaction as dL, type FINCENExport as dM, type FINCENTransaction as dN, type CSVExport as dO, type DerivedViewingKey as dP, type DeriveViewingKeyParams as dQ, type DeriveMultipleParams as dR, type ThresholdShares as dS, type TimeLockResult as dT, type UnlockResult as dU, type TimeLockParams as dV, SealedBidAuction as dW, createSealedBidAuction as dX, type SealedBid as dY, type BidReceipt as dZ, type CreateBidParams as d_, getPaymentTimeRemaining as da, serializePayment as db, deserializePayment as dc, getPaymentSummary as dd, STABLECOIN_INFO as de, STABLECOIN_ADDRESSES as df, STABLECOIN_DECIMALS as dg, getStablecoin as dh, getStablecoinsForChain as di, isStablecoin as dj, getStablecoinInfo as dk, getSupportedStablecoins as dl, isStablecoinOnChain as dm, getChainsForStablecoin as dn, toStablecoinUnits as dp, fromStablecoinUnits as dq, formatStablecoinAmount as dr, type CreatePaymentOptions as ds, type StablecoinInfo as dt, Treasury as du, ComplianceManager as dv, ComplianceReporter as dw, generatePdfReport as dx, ConditionalDisclosure as dy, AuditorKeyDerivation as dz, getMobileDeviceInfo as e, type SolanaAdapterConfig as e$, PrivateVoting as e0, createPrivateVoting as e1, type EncryptedVote as e2, type RevealedVote as e3, type CastVoteParams as e4, PrivateNFT as e5, createPrivateOwnership as e6, proveOwnership as e7, verifyOwnership as e8, BaseWalletAdapter as e9, fromHex as eA, hexToNumber as eB, normalizeAddress as eC, getDefaultRpcEndpoint as eD, EthereumChainId as eE, HardwareErrorCode as eF, HardwareWalletError as eG, DerivationPath as eH, getDerivationPath as eI, supportsWebUSB as eJ, supportsWebHID as eK, supportsWebBluetooth as eL, getAvailableTransports as eM, LedgerWalletAdapter as eN, createLedgerAdapter as eO, TrezorWalletAdapter as eP, createTrezorAdapter as eQ, MockLedgerAdapter as eR, MockTrezorAdapter as eS, createMockLedgerAdapter as eT, createMockTrezorAdapter as eU, type SolanaPublicKey as eV, type SolanaTransaction as eW, type SolanaVersionedTransaction as eX, type SolanaWalletProvider as eY, type SolanaWalletName as eZ, type SolanaCluster$1 as e_, MockWalletAdapter as ea, WalletError as eb, notConnectedError as ec, featureNotSupportedError as ed, walletRegistry as ee, registerWallet as ef, createWalletFactory as eg, isPrivateWalletAdapter as eh, SolanaWalletAdapter as ei, createSolanaAdapter as ej, MockSolanaAdapter as ek, createMockSolanaAdapter as el, createMockSolanaProvider as em, createMockSolanaConnection as en, getSolanaProvider as eo, detectSolanaWallets as ep, solanaPublicKeyToHex as eq, base58ToHex as er, EthereumWalletAdapter as es, createEthereumAdapter as et, MockEthereumAdapter as eu, createMockEthereumAdapter as ev, createMockEthereumProvider as ew, getEthereumProvider as ex, detectEthereumWallets as ey, toHex as ez, checkMobileWASMCompatibility as f, SolanaSameChainExecutor as f$, type SolanaConnection as f0, type SolanaSendOptions as f1, type SolanaUnsignedTransaction as f2, type SolanaSignature as f3, type MockSolanaAdapterConfig as f4, type EIP1193Provider as f5, type EIP1193RequestArguments as f6, type EIP1193Event as f7, type EIP1193ConnectInfo as f8, type EIP1193ProviderRpcError as f9, type HardwareErrorCodeType as fA, type MockHardwareConfig as fB, sendPrivateSPLTransfer as fC, estimatePrivateTransferFee as fD, hasTokenAccount as fE, scanForPayments as fF, claimStealthPayment as fG, getStealthBalance as fH, SOLANA_TOKEN_MINTS as fI, SOLANA_TOKEN_DECIMALS as fJ, SOLANA_RPC_ENDPOINTS as fK, SOLANA_EXPLORER_URLS as fL, MEMO_PROGRAM_ID as fM, SIP_MEMO_PREFIX as fN, getExplorerUrl as fO, getTokenMint as fP, getTokenDecimals as fQ, parseAnnouncement as fR, createAnnouncementMemo as fS, type SolanaPrivateTransferParams as fT, type SolanaPrivateTransferResult as fU, type SolanaScanParams as fV, type SolanaScanResult as fW, type SolanaClaimParams as fX, type SolanaClaimResult as fY, type SolanaAnnouncement as fZ, type SolanaCluster as f_, type EIP712Domain as fa, type EIP712TypeDefinition as fb, type EIP712Types as fc, type EIP712TypedData as fd, type EthereumTransactionRequest as fe, type EthereumTransactionReceipt as ff, type EthereumTokenMetadata as fg, type EthereumChainMetadata as fh, type EthereumWalletName as fi, type EthereumAdapterConfig as fj, type EthereumChainIdType as fk, type MockEthereumAdapterConfig as fl, type HardwareWalletType as fm, type LedgerModel as fn, type TrezorModel as fo, type HardwareConnectionStatus as fp, type TransportType as fq, type HardwareDeviceInfo as fr, type HardwareWalletConfig as fs, type LedgerConfig as ft, type TrezorConfig as fu, type HardwareSignRequest as fv, type HardwareEthereumTx as fw, type HardwareSignature as fx, type HardwareAccount as fy, type HardwareTransport as fz, getBrowserInfo as g, createSameChainExecutor as g0, isSameChainSupported as g1, getSupportedSameChainChains as g2, type SameChainExecutor as g3, type SameChainTransferParams as g4, type SameChainTransferResult as g5, type SolanaSameChainConfig as g6, hexToBytes as h, isBrowser as i, getBrowserVersion as j, getOSVersion as k, isTablet as l, supportsTouch as m, supportsWASMSimd as n, supportsWASMBulkMemory as o, type MobileBrowser as p, type MobileDeviceInfo as q, type MobileWASMCompatibility as r, supportsWebWorkers as s, type BrowserNoirProviderConfig as t, ProofError as u, ProofNotImplementedError as v, EncryptionNotImplementedError as w, isSIPError as x, hasErrorCode as y, wrapError as z };
|