@aptos-labs/wallet-adapter-core 5.3.0 → 5.4.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/WalletCore.d.ts +4 -0
- package/dist/WalletCore.d.ts.map +1 -1
- package/dist/index.js +2215 -980
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2075 -956
- package/dist/index.mjs.map +1 -1
- package/dist/sdkWallets.d.ts.map +1 -1
- package/dist/utils/helpers.d.ts +1 -1
- package/dist/utils/types.d.ts +2 -1
- package/dist/utils/types.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +7 -5
- package/src/WalletCore.ts +9 -2
- package/src/sdkWallets.ts +10 -0
- package/src/utils/types.ts +8 -5
- package/src/version.ts +1 -1
package/dist/utils/types.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export interface AptosStandardSupportedWallet {
|
|
|
9
9
|
isAIP62Standard: true;
|
|
10
10
|
deeplinkProvider?: string;
|
|
11
11
|
}
|
|
12
|
-
export type AvailableWallets = "
|
|
12
|
+
export type AvailableWallets = "Continue with Apple" | "Continue with Google" | "MSafe" | "Mizu Wallet" | "Nightly" | "OKX Wallet" | "Petra" | "Pontem Wallet" | "Rimosafe" | "T wallet";
|
|
13
13
|
export type InputTransactionData = {
|
|
14
14
|
sender?: AccountAddressInput;
|
|
15
15
|
data: InputGenerateTransactionPayloadData;
|
|
@@ -17,6 +17,7 @@ export type InputTransactionData = {
|
|
|
17
17
|
expirationSecondsFromNow?: number;
|
|
18
18
|
expirationTimestamp?: number;
|
|
19
19
|
};
|
|
20
|
+
withFeePayer?: boolean;
|
|
20
21
|
};
|
|
21
22
|
export type WalletInfo = {
|
|
22
23
|
name: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/utils/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,+BAA+B,EAChC,MAAM,oB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7B,IAAI,EAAE,mCAAmC,CAAC;IAC1C,OAAO,CAAC,EAAE,+BAA+B,GAAG;QAC1C,wBAAwB,CAAC,EAAE,MAAM,CAAC;QAClC,mBAAmB,CAAC,EAAE,MAAM,CAAC;KAC9B,CAAC;IACF,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;CACb,CAAC"}
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const WALLET_ADAPTER_CORE_VERSION = "5.
|
|
1
|
+
export declare const WALLET_ADAPTER_CORE_VERSION = "5.4.1";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aptos-labs/wallet-adapter-core",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.4.1",
|
|
4
4
|
"description": "Aptos Wallet Adapter Core",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
8
8
|
"license": "Apache-2.0",
|
|
9
9
|
"exports": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
10
11
|
"require": "./dist/index.js",
|
|
11
|
-
"import": "./dist/index.mjs"
|
|
12
|
-
"types": "./dist/index.d.ts"
|
|
12
|
+
"import": "./dist/index.mjs"
|
|
13
13
|
},
|
|
14
14
|
"repository": {
|
|
15
15
|
"type": "git",
|
|
@@ -28,12 +28,13 @@
|
|
|
28
28
|
"Aptos Wallet"
|
|
29
29
|
],
|
|
30
30
|
"devDependencies": {
|
|
31
|
+
"@swc/core": "^1.11.16",
|
|
31
32
|
"@types/jest": "^29.2.4",
|
|
32
33
|
"@types/node": "^20.10.4",
|
|
33
34
|
"eslint": "^8.15.0",
|
|
34
35
|
"jest": "^29.3.1",
|
|
35
36
|
"ts-jest": "^29.0.3",
|
|
36
|
-
"tsup": "^
|
|
37
|
+
"tsup": "^8.4.0",
|
|
37
38
|
"typescript": "^4.5.3",
|
|
38
39
|
"@aptos-labs/eslint-config-adapter": "0.0.2",
|
|
39
40
|
"@aptos-labs/wallet-adapter-tsconfig": "0.0.2"
|
|
@@ -43,12 +44,13 @@
|
|
|
43
44
|
"@aptos-labs/wallet-standard": "^0.3.0",
|
|
44
45
|
"@atomrigslab/aptos-wallet-adapter": "^0.1.20",
|
|
45
46
|
"@mizuwallet-sdk/aptos-wallet-adapter": "^0.3.2",
|
|
47
|
+
"@msafe/aptos-aip62-wallet": "^1.0.17",
|
|
46
48
|
"buffer": "^6.0.3",
|
|
47
49
|
"eventemitter3": "^4.0.7",
|
|
48
50
|
"tweetnacl": "^1.0.3"
|
|
49
51
|
},
|
|
50
52
|
"peerDependencies": {
|
|
51
|
-
"@aptos-labs/ts-sdk": "^1.
|
|
53
|
+
"@aptos-labs/ts-sdk": "^1.38.0"
|
|
52
54
|
},
|
|
53
55
|
"files": [
|
|
54
56
|
"dist",
|
package/src/WalletCore.ts
CHANGED
|
@@ -117,6 +117,10 @@ export interface DappConfig {
|
|
|
117
117
|
manifestURL: string;
|
|
118
118
|
appId?: string;
|
|
119
119
|
};
|
|
120
|
+
msafeWalletConfig?: {
|
|
121
|
+
appId?: string;
|
|
122
|
+
appUrl?: string;
|
|
123
|
+
};
|
|
120
124
|
}
|
|
121
125
|
|
|
122
126
|
export declare interface WalletCoreEvents {
|
|
@@ -851,6 +855,7 @@ export class WalletCore extends EventEmitter<WalletCoreEvents> {
|
|
|
851
855
|
sender: this._account.address,
|
|
852
856
|
data: transactionOrPayload.data,
|
|
853
857
|
options: transactionOrPayload.options,
|
|
858
|
+
withFeePayer: transactionOrPayload.withFeePayer,
|
|
854
859
|
});
|
|
855
860
|
|
|
856
861
|
const response = (await this._wallet?.features[
|
|
@@ -1050,13 +1055,15 @@ export class WalletCore extends EventEmitter<WalletCoreEvents> {
|
|
|
1050
1055
|
}
|
|
1051
1056
|
|
|
1052
1057
|
const aptosConfig = getAptosConfig(this._network, this._dappConfig);
|
|
1053
|
-
const signingMessage = new TextEncoder().encode(
|
|
1058
|
+
const signingMessage = new TextEncoder().encode(
|
|
1059
|
+
response.args.fullMessage
|
|
1060
|
+
);
|
|
1054
1061
|
if ("verifySignatureAsync" in (this._account.publicKey as Object)) {
|
|
1055
1062
|
return await this._account.publicKey.verifySignatureAsync({
|
|
1056
1063
|
aptosConfig,
|
|
1057
1064
|
message: signingMessage,
|
|
1058
1065
|
signature: response.args.signature,
|
|
1059
|
-
options: { throwErrorWithReason: true }
|
|
1066
|
+
options: { throwErrorWithReason: true },
|
|
1060
1067
|
});
|
|
1061
1068
|
}
|
|
1062
1069
|
return this._account.publicKey.verifySignature({
|
package/src/sdkWallets.ts
CHANGED
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
import { Network } from "@aptos-labs/ts-sdk";
|
|
6
6
|
import { DevTWallet, TWallet } from "@atomrigslab/aptos-wallet-adapter";
|
|
7
7
|
import { MizuWallet } from "@mizuwallet-sdk/aptos-wallet-adapter";
|
|
8
|
+
import { MSafeWallet } from "@msafe/aptos-aip62-wallet";
|
|
8
9
|
import { DappConfig, AdapterWallet } from "./WalletCore";
|
|
9
10
|
|
|
10
11
|
export function getSDKWallets(dappConfig?: DappConfig) {
|
|
@@ -50,6 +51,15 @@ export function getSDKWallets(dappConfig?: DappConfig) {
|
|
|
50
51
|
sdkWallets.push(new DevTWallet() as any);
|
|
51
52
|
}
|
|
52
53
|
|
|
54
|
+
if (dappConfig?.network) {
|
|
55
|
+
sdkWallets.push(
|
|
56
|
+
new MSafeWallet({
|
|
57
|
+
...dappConfig?.msafeWalletConfig,
|
|
58
|
+
network: dappConfig.network,
|
|
59
|
+
})
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
|
|
53
63
|
// Add new SDK wallet plugins (ones that should be installed as packages) here:
|
|
54
64
|
// Ex. sdkWallets.push(new YourSDKWallet(dappConfig))
|
|
55
65
|
|
package/src/utils/types.ts
CHANGED
|
@@ -25,14 +25,16 @@ export interface AptosStandardSupportedWallet {
|
|
|
25
25
|
|
|
26
26
|
// Update this with the name of your wallet when you create a new wallet plugin.
|
|
27
27
|
export type AvailableWallets =
|
|
28
|
+
| "Continue with Apple"
|
|
29
|
+
| "Continue with Google"
|
|
30
|
+
| "MSafe"
|
|
31
|
+
| "Mizu Wallet"
|
|
28
32
|
| "Nightly"
|
|
33
|
+
| "OKX Wallet"
|
|
29
34
|
| "Petra"
|
|
30
|
-
| "T wallet"
|
|
31
35
|
| "Pontem Wallet"
|
|
32
|
-
| "
|
|
33
|
-
| "
|
|
34
|
-
| "Continue with Google"
|
|
35
|
-
| "Continue with Apple";
|
|
36
|
+
| "Rimosafe"
|
|
37
|
+
| "T wallet";
|
|
36
38
|
|
|
37
39
|
export type InputTransactionData = {
|
|
38
40
|
sender?: AccountAddressInput;
|
|
@@ -41,6 +43,7 @@ export type InputTransactionData = {
|
|
|
41
43
|
expirationSecondsFromNow?: number;
|
|
42
44
|
expirationTimestamp?: number;
|
|
43
45
|
};
|
|
46
|
+
withFeePayer?: boolean;
|
|
44
47
|
};
|
|
45
48
|
|
|
46
49
|
export type WalletInfo = {
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const WALLET_ADAPTER_CORE_VERSION = "5.
|
|
1
|
+
export const WALLET_ADAPTER_CORE_VERSION = "5.4.1";
|