@eos3/connect 0.1.3 → 0.1.4
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/README.md +2 -1
- package/dist/index.d.ts +1 -2
- package/dist/index.js +3 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -226,7 +226,8 @@ await fetch('https://wallet.example.com/api/market/push', {
|
|
|
226
226
|
- `client.connectTelegram(options)`: starts or resumes Telegram binding.
|
|
227
227
|
- `client.connectTokenPocket(options)`: starts TokenPocket binding.
|
|
228
228
|
- `client.pay(options)`: builds, signs, confirms, and pushes a paylimit payment.
|
|
229
|
-
- `client.
|
|
229
|
+
- `client.disconnect()`: removes the local Telegram payment key from
|
|
230
|
+
SecureStorage, clears the biometric token, and resets the SDK state.
|
|
230
231
|
|
|
231
232
|
## Network Presets
|
|
232
233
|
|
package/dist/index.d.ts
CHANGED
|
@@ -137,7 +137,7 @@ export interface EosConnectClient {
|
|
|
137
137
|
connectTelegram(options?: EosConnectTelegramOptions): Promise<EosConnectState>;
|
|
138
138
|
connectTokenPocket(options?: EosConnectTelegramOptions): Promise<EosConnectState>;
|
|
139
139
|
pay(options: EosConnectPayOptions): Promise<EosConnectPayResult>;
|
|
140
|
-
|
|
140
|
+
disconnect(): Promise<EosConnectState>;
|
|
141
141
|
}
|
|
142
142
|
export interface EosConnectBalanceAsset {
|
|
143
143
|
tokenContract: string;
|
|
@@ -241,7 +241,6 @@ export declare function loadEosConnectPaymentSigningKey(app?: EosConnectTelegram
|
|
|
241
241
|
publicKey: string;
|
|
242
242
|
storedPublicKey: string | null;
|
|
243
243
|
}>;
|
|
244
|
-
export declare function removeEosConnectPaymentKey(app?: EosConnectTelegramWebApp | null): Promise<void>;
|
|
245
244
|
export declare function signEosConnectTransaction(transaction: Record<string, unknown>, context: {
|
|
246
245
|
telegramWebApp?: EosConnectTelegramWebApp | null;
|
|
247
246
|
rpcUrls: string[];
|
package/dist/index.js
CHANGED
|
@@ -994,7 +994,7 @@ export async function loadEosConnectPaymentSigningKey(app) {
|
|
|
994
994
|
storedPublicKey: envelope.publicKey ?? null
|
|
995
995
|
};
|
|
996
996
|
}
|
|
997
|
-
|
|
997
|
+
async function disconnectEosConnectPaymentKey(app) {
|
|
998
998
|
const telegram = requireSecureTelegramStorage(app);
|
|
999
999
|
await Promise.all([
|
|
1000
1000
|
secureStorageRemove(telegram, EOS_CONNECT_PRIVATE_KEY_STORAGE),
|
|
@@ -1496,7 +1496,8 @@ export function createEosConnect(options) {
|
|
|
1496
1496
|
})
|
|
1497
1497
|
});
|
|
1498
1498
|
},
|
|
1499
|
-
|
|
1499
|
+
async disconnect() {
|
|
1500
|
+
await disconnectEosConnectPaymentKey(telegramWebApp());
|
|
1500
1501
|
return publish({ ...idleState });
|
|
1501
1502
|
}
|
|
1502
1503
|
};
|