@dynamic-labs/cosmos 3.0.0-alpha.53 → 3.0.0-alpha.55
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 +21 -0
- package/package.json +5 -5
- package/src/index.d.ts +1 -0
- package/src/wallet/CosmosWallet.cjs +2 -72
- package/src/wallet/CosmosWallet.js +2 -72
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,25 @@
|
|
|
1
1
|
|
|
2
|
+
## [3.0.0-alpha.55](https://github.com/dynamic-labs/DynamicAuth/compare/v3.0.0-alpha.54...v3.0.0-alpha.55) (2024-09-02)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### ⚠ BREAKING CHANGES
|
|
6
|
+
|
|
7
|
+
* remove network prop from wallet ([#6716](https://github.com/dynamic-labs/DynamicAuth/issues/6716)) ([b3f90aa](https://github.com/dynamic-labs/DynamicAuth/commit/b3f90aa57cb494f35e3e8b4bc94343d676b2bb4f))
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* override viem chain data with evmNetworks override data ([#6779](https://github.com/dynamic-labs/DynamicAuth/issues/6779)) ([0d836a0](https://github.com/dynamic-labs/DynamicAuth/commit/0d836a0897b7e950e1e91e991f06da338d0cd0db))
|
|
12
|
+
* sdkHasLoaded waits for session validation ([#6769](https://github.com/dynamic-labs/DynamicAuth/issues/6769)) ([72a700b](https://github.com/dynamic-labs/DynamicAuth/commit/72a700b697aad7eca7e8a9b61eddd135aece8da3))
|
|
13
|
+
* send transaction cropping on insufficient funds ([#6776](https://github.com/dynamic-labs/DynamicAuth/issues/6776)) ([995c1f0](https://github.com/dynamic-labs/DynamicAuth/commit/995c1f0b6957112cfa50e4487bdaaa5993c0691d))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
## [3.0.0-alpha.54](https://github.com/dynamic-labs/DynamicAuth/compare/v3.0.0-alpha.53...v3.0.0-alpha.54) (2024-08-29)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Bug Fixes
|
|
20
|
+
|
|
21
|
+
* transaction hanging in confirmation modal ([#6740](https://github.com/dynamic-labs/DynamicAuth/issues/6740)) ([f03d286](https://github.com/dynamic-labs/DynamicAuth/commit/f03d286aaf471dbc7a6149acee10512be7b56b18))
|
|
22
|
+
|
|
2
23
|
## [3.0.0-alpha.53](https://github.com/dynamic-labs/DynamicAuth/compare/v3.0.0-alpha.52...v3.0.0-alpha.53) (2024-08-29)
|
|
3
24
|
|
|
4
25
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/cosmos",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.55",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/dynamic-labs/dynamic-auth.git",
|
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@keplr-wallet/types": "0.12.121",
|
|
30
|
-
"@dynamic-labs/types": "3.0.0-alpha.
|
|
31
|
-
"@dynamic-labs/utils": "3.0.0-alpha.
|
|
32
|
-
"@dynamic-labs/wallet-book": "3.0.0-alpha.
|
|
33
|
-
"@dynamic-labs/wallet-connector-core": "3.0.0-alpha.
|
|
30
|
+
"@dynamic-labs/types": "3.0.0-alpha.55",
|
|
31
|
+
"@dynamic-labs/utils": "3.0.0-alpha.55",
|
|
32
|
+
"@dynamic-labs/wallet-book": "3.0.0-alpha.55",
|
|
33
|
+
"@dynamic-labs/wallet-connector-core": "3.0.0-alpha.55"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {}
|
|
36
36
|
}
|
package/src/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { KeplrWalletConnector } from './connectors';
|
|
2
2
|
export * from './wallet';
|
|
3
3
|
export { type ICosmosOfflineSigner, type ICosmosProvider } from './types';
|
|
4
|
+
export { type CosmosWalletConnector } from './connectors/CosmosWalletConnector';
|
|
4
5
|
export declare const CosmosWalletConnectors: () => (typeof KeplrWalletConnector)[];
|
|
@@ -13,60 +13,7 @@ class CosmosWallet extends walletConnectorCore.Wallet {
|
|
|
13
13
|
if (!provider) {
|
|
14
14
|
throw new Error('unable to retrieve Cosmos provider');
|
|
15
15
|
}
|
|
16
|
-
|
|
17
|
-
get: (target, prop) => {
|
|
18
|
-
if (prop === 'signAmino') {
|
|
19
|
-
return (chainId, signer, signerDoc, signerOperations) => _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
20
|
-
yield this.sync();
|
|
21
|
-
return target.signAmino(chainId, signer, signerDoc, signerOperations);
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
if (prop === 'signDirect') {
|
|
25
|
-
return (chainId, signer, signDoc, signOptions) => _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
26
|
-
yield this.sync();
|
|
27
|
-
return target.signDirect(chainId, signer, signDoc, signOptions);
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
if (prop === 'signDirectAux') {
|
|
31
|
-
return (chainId, signer, signDoc, signOptions) => _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
32
|
-
yield this.sync();
|
|
33
|
-
return target.signDirectAux(chainId, signer, signDoc, signOptions);
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
if (prop === 'sendTx') {
|
|
37
|
-
return (chainId, tx, mode) => _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
38
|
-
yield this.sync();
|
|
39
|
-
return target.sendTx(chainId, tx, mode);
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
if (prop === 'signICNSAdr36') {
|
|
43
|
-
return (chainId, contractAddress, owner, username, addressChainIds) => _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
44
|
-
yield this.sync();
|
|
45
|
-
return target.signICNSAdr36(chainId, contractAddress, owner, username, addressChainIds);
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
if (prop === 'signArbitrary') {
|
|
49
|
-
return (chainId, signer, data) => _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
50
|
-
yield this.sync();
|
|
51
|
-
return target.signArbitrary(chainId, signer, data);
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
if (prop === 'signEthereum') {
|
|
55
|
-
return (chainId, signer, data, type) => _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
56
|
-
yield this.sync();
|
|
57
|
-
return target.signEthereum(chainId, signer, data, type);
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
if (prop === 'sendEthereumTx') {
|
|
61
|
-
return (chainId, tx) => _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
62
|
-
yield this.sync();
|
|
63
|
-
return target.sendEthereumTx(chainId, tx);
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
return Reflect.get(target, prop);
|
|
67
|
-
},
|
|
68
|
-
});
|
|
69
|
-
return proxyProvider;
|
|
16
|
+
return provider;
|
|
70
17
|
});
|
|
71
18
|
}
|
|
72
19
|
getOfflineSigner() {
|
|
@@ -75,24 +22,7 @@ class CosmosWallet extends walletConnectorCore.Wallet {
|
|
|
75
22
|
if (!offlineSigner) {
|
|
76
23
|
throw new Error('unable to retrieve Cosmos offline signer');
|
|
77
24
|
}
|
|
78
|
-
|
|
79
|
-
get: (target, prop) => {
|
|
80
|
-
if (prop === 'signAmino') {
|
|
81
|
-
return (signerAddress, signerDoc) => _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
82
|
-
yield this.sync();
|
|
83
|
-
return target.signAmino(signerAddress, signerDoc);
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
if (prop === 'signDirect') {
|
|
87
|
-
return (signerAddress, signerDoc) => _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
88
|
-
yield this.sync();
|
|
89
|
-
return target.signDirect(signerAddress, signerDoc);
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
return Reflect.get(target, prop);
|
|
93
|
-
},
|
|
94
|
-
});
|
|
95
|
-
return proxyOfflineSigner;
|
|
25
|
+
return offlineSigner;
|
|
96
26
|
});
|
|
97
27
|
}
|
|
98
28
|
}
|
|
@@ -9,60 +9,7 @@ class CosmosWallet extends Wallet {
|
|
|
9
9
|
if (!provider) {
|
|
10
10
|
throw new Error('unable to retrieve Cosmos provider');
|
|
11
11
|
}
|
|
12
|
-
|
|
13
|
-
get: (target, prop) => {
|
|
14
|
-
if (prop === 'signAmino') {
|
|
15
|
-
return (chainId, signer, signerDoc, signerOperations) => __awaiter(this, void 0, void 0, function* () {
|
|
16
|
-
yield this.sync();
|
|
17
|
-
return target.signAmino(chainId, signer, signerDoc, signerOperations);
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
if (prop === 'signDirect') {
|
|
21
|
-
return (chainId, signer, signDoc, signOptions) => __awaiter(this, void 0, void 0, function* () {
|
|
22
|
-
yield this.sync();
|
|
23
|
-
return target.signDirect(chainId, signer, signDoc, signOptions);
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
if (prop === 'signDirectAux') {
|
|
27
|
-
return (chainId, signer, signDoc, signOptions) => __awaiter(this, void 0, void 0, function* () {
|
|
28
|
-
yield this.sync();
|
|
29
|
-
return target.signDirectAux(chainId, signer, signDoc, signOptions);
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
if (prop === 'sendTx') {
|
|
33
|
-
return (chainId, tx, mode) => __awaiter(this, void 0, void 0, function* () {
|
|
34
|
-
yield this.sync();
|
|
35
|
-
return target.sendTx(chainId, tx, mode);
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
if (prop === 'signICNSAdr36') {
|
|
39
|
-
return (chainId, contractAddress, owner, username, addressChainIds) => __awaiter(this, void 0, void 0, function* () {
|
|
40
|
-
yield this.sync();
|
|
41
|
-
return target.signICNSAdr36(chainId, contractAddress, owner, username, addressChainIds);
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
if (prop === 'signArbitrary') {
|
|
45
|
-
return (chainId, signer, data) => __awaiter(this, void 0, void 0, function* () {
|
|
46
|
-
yield this.sync();
|
|
47
|
-
return target.signArbitrary(chainId, signer, data);
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
if (prop === 'signEthereum') {
|
|
51
|
-
return (chainId, signer, data, type) => __awaiter(this, void 0, void 0, function* () {
|
|
52
|
-
yield this.sync();
|
|
53
|
-
return target.signEthereum(chainId, signer, data, type);
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
if (prop === 'sendEthereumTx') {
|
|
57
|
-
return (chainId, tx) => __awaiter(this, void 0, void 0, function* () {
|
|
58
|
-
yield this.sync();
|
|
59
|
-
return target.sendEthereumTx(chainId, tx);
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
return Reflect.get(target, prop);
|
|
63
|
-
},
|
|
64
|
-
});
|
|
65
|
-
return proxyProvider;
|
|
12
|
+
return provider;
|
|
66
13
|
});
|
|
67
14
|
}
|
|
68
15
|
getOfflineSigner() {
|
|
@@ -71,24 +18,7 @@ class CosmosWallet extends Wallet {
|
|
|
71
18
|
if (!offlineSigner) {
|
|
72
19
|
throw new Error('unable to retrieve Cosmos offline signer');
|
|
73
20
|
}
|
|
74
|
-
|
|
75
|
-
get: (target, prop) => {
|
|
76
|
-
if (prop === 'signAmino') {
|
|
77
|
-
return (signerAddress, signerDoc) => __awaiter(this, void 0, void 0, function* () {
|
|
78
|
-
yield this.sync();
|
|
79
|
-
return target.signAmino(signerAddress, signerDoc);
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
if (prop === 'signDirect') {
|
|
83
|
-
return (signerAddress, signerDoc) => __awaiter(this, void 0, void 0, function* () {
|
|
84
|
-
yield this.sync();
|
|
85
|
-
return target.signDirect(signerAddress, signerDoc);
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
return Reflect.get(target, prop);
|
|
89
|
-
},
|
|
90
|
-
});
|
|
91
|
-
return proxyOfflineSigner;
|
|
21
|
+
return offlineSigner;
|
|
92
22
|
});
|
|
93
23
|
}
|
|
94
24
|
}
|