@aptos-labs/wallet-adapter-core 2.0.0 → 2.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.
- package/CHANGELOG.md +0 -6
- package/dist/index.d.ts +5 -6
- package/dist/index.global.js +93 -0
- package/dist/index.global.js.map +1 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +12 -12
- package/src/WalletCore.ts +3 -4
- package/src/types.ts +3 -6
package/CHANGELOG.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { Types } from 'aptos';
|
|
1
2
|
import EventEmitter from 'eventemitter3';
|
|
2
|
-
import { Types, TxnBuilderTypes } from 'aptos';
|
|
3
3
|
|
|
4
4
|
declare enum WalletReadyState {
|
|
5
5
|
/**
|
|
@@ -63,7 +63,6 @@ interface AdapterPluginEvents {
|
|
|
63
63
|
onNetworkChange(callback: any): Promise<any>;
|
|
64
64
|
onAccountChange(callback: any): Promise<any>;
|
|
65
65
|
}
|
|
66
|
-
declare type TransactionPayload = Types.TransactionPayload | TxnBuilderTypes.TransactionPayload;
|
|
67
66
|
interface AdapterPluginProps<Name extends string = string> {
|
|
68
67
|
name: WalletName<Name>;
|
|
69
68
|
url: string;
|
|
@@ -73,7 +72,7 @@ interface AdapterPluginProps<Name extends string = string> {
|
|
|
73
72
|
connect(): Promise<any>;
|
|
74
73
|
disconnect: () => Promise<any>;
|
|
75
74
|
network: () => Promise<any>;
|
|
76
|
-
signAndSubmitTransaction<T extends TransactionPayload, V>(transaction: T, options?: V): Promise<{
|
|
75
|
+
signAndSubmitTransaction<T extends Types.TransactionPayload, V>(transaction: T, options?: V): Promise<{
|
|
77
76
|
hash: Types.HexEncodedBytes;
|
|
78
77
|
}>;
|
|
79
78
|
signMessage<T extends SignMessagePayload>(message: T): Promise<SignMessageResponse>;
|
|
@@ -172,14 +171,14 @@ declare class WalletCore extends EventEmitter<WalletCoreEvents> {
|
|
|
172
171
|
@return response from the wallet's signAndSubmitTransaction function
|
|
173
172
|
@throws WalletSignAndSubmitMessageError
|
|
174
173
|
*/
|
|
175
|
-
signAndSubmitTransaction(transaction: TransactionPayload): Promise<any>;
|
|
174
|
+
signAndSubmitTransaction(transaction: Types.TransactionPayload): Promise<any>;
|
|
176
175
|
/**
|
|
177
176
|
Sign transaction (doesnt submit to chain).
|
|
178
177
|
@param transaction
|
|
179
178
|
@return response from the wallet's signTransaction function
|
|
180
179
|
@throws WalletSignTransactionError
|
|
181
180
|
*/
|
|
182
|
-
signTransaction(transaction: TransactionPayload): Promise<Uint8Array | null>;
|
|
181
|
+
signTransaction(transaction: Types.TransactionPayload): Promise<Uint8Array | null>;
|
|
183
182
|
/**
|
|
184
183
|
Sign message (doesnt submit to chain).
|
|
185
184
|
@param message
|
|
@@ -202,4 +201,4 @@ declare class WalletCore extends EventEmitter<WalletCoreEvents> {
|
|
|
202
201
|
signMessageAndVerify(message: SignMessagePayload): Promise<boolean>;
|
|
203
202
|
}
|
|
204
203
|
|
|
205
|
-
export { AccountInfo, AdapterPlugin, AdapterPluginEvents, AdapterPluginProps, AptosWalletErrorResult, NetworkInfo, NetworkName, PluginProvider, SignMessagePayload, SignMessageResponse,
|
|
204
|
+
export { AccountInfo, AdapterPlugin, AdapterPluginEvents, AdapterPluginProps, AptosWalletErrorResult, NetworkInfo, NetworkName, PluginProvider, SignMessagePayload, SignMessageResponse, Wallet, WalletCore, WalletCoreEvents, WalletInfo, WalletName, WalletReadyState };
|