@tonconnect/sdk
Advanced tools
Comparing version 3.0.0 to 3.0.1-beta.0
@@ -181,3 +181,6 @@ export declare interface Account { | ||
*/ | ||
restoreConnection(): Promise<void>; | ||
restoreConnection(options?: { | ||
openingDeadlineMS?: number; | ||
signal?: AbortSignal; | ||
}): Promise<void>; | ||
/** | ||
@@ -195,10 +198,17 @@ * Pause bridge HTTP connection. Might be helpful, if you want to pause connections while browser tab is unfocused, | ||
*/ | ||
disconnect(): Promise<void>; | ||
disconnect(options?: { | ||
signal?: AbortSignal; | ||
}): Promise<void>; | ||
/** | ||
* Asks connected wallet to sign and send the transaction. | ||
* @param transaction transaction to send. | ||
* @param onRequestSent (optional) will be called after the transaction is sent to the wallet. | ||
* @param options (optional) onRequestSent callback will be called after the transaction is sent and signal to abort the request. | ||
* @returns signed transaction boc that allows you to find the transaction in the blockchain. | ||
* If user rejects transaction, method will throw the corresponding error. | ||
*/ | ||
sendTransaction(transaction: SendTransactionRequest, options?: { | ||
onRequestSent?: () => void; | ||
signal?: AbortSignal; | ||
}): Promise<SendTransactionResponse>; | ||
/** @deprecated use sendTransaction(transaction, options) instead */ | ||
sendTransaction(transaction: SendTransactionRequest, onRequestSent?: () => void): Promise<SendTransactionResponse>; | ||
@@ -300,2 +310,3 @@ } | ||
private statusChangeErrorSubscriptions; | ||
private abortController?; | ||
/** | ||
@@ -330,16 +341,34 @@ * Shows if the wallet is connected right now. | ||
* @param request (optional) additional request to pass to the wallet while connect (currently only ton_proof is available). | ||
* @param options (optional) openingDeadlineMS for the connection opening deadline and signal for the connection abort. | ||
* @returns universal link if external wallet was passed or void for the injected wallet. | ||
*/ | ||
connect<T extends WalletConnectionSource | Pick<WalletConnectionSourceHTTP, 'bridgeUrl'>[]>(wallet: T, request?: ConnectAdditionalRequest): T extends WalletConnectionSourceJS ? void : string; | ||
connect<T extends WalletConnectionSource | Pick<WalletConnectionSourceHTTP, 'bridgeUrl'>[]>(wallet: T, options?: { | ||
request?: ConnectAdditionalRequest; | ||
openingDeadlineMS?: number; | ||
signal?: AbortSignal; | ||
}): T extends WalletConnectionSourceJS ? void : string; | ||
/** @deprecated use connect(wallet, options) instead */ | ||
connect<T extends WalletConnectionSource | Pick<WalletConnectionSourceHTTP, 'bridgeUrl'>[]>(wallet: T, request?: ConnectAdditionalRequest, options?: { | ||
openingDeadlineMS?: number; | ||
signal?: AbortSignal; | ||
}): T extends WalletConnectionSourceJS ? void : string; | ||
/** | ||
* Try to restore existing session and reconnect to the corresponding wallet. Call it immediately when your app is loaded. | ||
*/ | ||
restoreConnection(): Promise<void>; | ||
restoreConnection(options?: { | ||
openingDeadlineMS?: number; | ||
signal?: AbortSignal; | ||
}): Promise<void>; | ||
/** | ||
* Asks connected wallet to sign and send the transaction. | ||
* @param transaction transaction to send. | ||
* @param onRequestSent (optional) will be called after the transaction is sent to the wallet. | ||
* @param options (optional) onRequestSent will be called after the request was sent to the wallet and signal for the transaction abort. | ||
* @returns signed transaction boc that allows you to find the transaction in the blockchain. | ||
* If user rejects transaction, method will throw the corresponding error. | ||
*/ | ||
sendTransaction(transaction: SendTransactionRequest, options?: { | ||
onRequestSent?: () => void; | ||
signal?: AbortSignal; | ||
}): Promise<SendTransactionResponse>; | ||
/** @deprecated use sendTransaction(transaction, options) instead */ | ||
sendTransaction(transaction: SendTransactionRequest, onRequestSent?: () => void): Promise<SendTransactionResponse>; | ||
@@ -349,3 +378,5 @@ /** | ||
*/ | ||
disconnect(): Promise<void>; | ||
disconnect(options?: { | ||
signal?: AbortSignal; | ||
}): Promise<void>; | ||
/** | ||
@@ -352,0 +383,0 @@ * Pause bridge HTTP connection. Might be helpful, if you want to pause connections while browser tab is unfocused, |
{ | ||
"name": "@tonconnect/sdk", | ||
"version": "3.0.0", | ||
"version": "3.0.1-beta.0", | ||
"scripts": { | ||
@@ -5,0 +5,0 @@ "build": "npx rimraf types-dist && npx rimraf lib && npx rollup -c rollup.config.mjs && ttsc --project tsconfig.declarations.json && api-extractor run && npx rimraf types-dist && npx rimraf dist && npx webpack --config webpack.config.js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
838356
5699
1