@dynamic-labs/solana 1.0.0-alpha.8 → 1.0.0
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 +69 -0
- package/package.json +6 -6
- package/src/injected/MagicEdenSol.cjs +14 -0
- package/src/injected/MagicEdenSol.d.ts +4 -0
- package/src/injected/MagicEdenSol.js +10 -0
- package/src/injected/index.cjs +2 -0
- package/src/injected/index.js +2 -0
- package/src/solProviderHelper.cjs +7 -1
- package/src/solProviderHelper.d.ts +1 -0
- package/src/solProviderHelper.js +7 -1
- package/src/types.d.ts +4 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,73 @@
|
|
|
1
1
|
|
|
2
|
+
## [1.0.0](https://github.com/dynamic-labs/DynamicAuth/compare/v1.0.0-alpha.14...v1.0.0) (2023-12-12)
|
|
3
|
+
|
|
4
|
+
Changelog: https://docs.dynamic.xyz/changelog/v1
|
|
5
|
+
Upgrade guide: https://docs.dynamic.xyz/react-sdk/upgrade
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
## [1.0.0-alpha.14](https://github.com/dynamic-labs/DynamicAuth/compare/v1.0.0-alpha.13...v1.0.0-alpha.14) (2023-12-12)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* add user_media scope to instagram ([#4144](https://github.com/dynamic-labs/DynamicAuth/issues/4144)) ([57b9140](https://github.com/dynamic-labs/DynamicAuth/commit/57b91400cae7287157988cd6dfe7f30aeced10de))
|
|
14
|
+
* enable buy button onramp even with pregenerated wallets ([#4135](https://github.com/dynamic-labs/DynamicAuth/issues/4135)) ([fd94ecd](https://github.com/dynamic-labs/DynamicAuth/commit/fd94ecdcbe7190dc9abeb829cdcd933561afdd77))
|
|
15
|
+
* make the pin input fields responsive ([#4140](https://github.com/dynamic-labs/DynamicAuth/issues/4140)) ([4244744](https://github.com/dynamic-labs/DynamicAuth/commit/42447445ec32a3bca48a48d001c24dcd5b5cf004))
|
|
16
|
+
|
|
17
|
+
## [1.0.0-alpha.13](https://github.com/dynamic-labs/DynamicAuth/compare/v1.0.0-alpha.12...v1.0.0-alpha.13) (2023-12-12)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* embedded wallet connected flag not picking up ([#4128](https://github.com/dynamic-labs/DynamicAuth/issues/4128)) ([c6fbb1d](https://github.com/dynamic-labs/DynamicAuth/commit/c6fbb1de2027b186a4277a75545fd66d0d11ba95))
|
|
23
|
+
|
|
24
|
+
## [1.0.0-alpha.12](https://github.com/dynamic-labs/DynamicAuth/compare/v1.0.0-alpha.11...v1.0.0-alpha.12) (2023-12-11)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
### Features
|
|
28
|
+
|
|
29
|
+
* add useFunding hook ([#4098](https://github.com/dynamic-labs/DynamicAuth/issues/4098)) ([27424ab](https://github.com/dynamic-labs/DynamicAuth/commit/27424ab1a15202ee2b7c73c8a19f11e480e1794a))
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
### Bug Fixes
|
|
33
|
+
|
|
34
|
+
* add primary color to the secure wallet text ([#4127](https://github.com/dynamic-labs/DynamicAuth/issues/4127)) ([7c642d0](https://github.com/dynamic-labs/DynamicAuth/commit/7c642d0385112289df52874bc5dd2eaa0e6cdf50))
|
|
35
|
+
|
|
36
|
+
## [1.0.0-alpha.11](https://github.com/dynamic-labs/DynamicAuth/compare/v1.0.0-alpha.10...v1.0.0-alpha.11) (2023-12-11)
|
|
37
|
+
|
|
38
|
+
## [1.0.0-alpha.10](https://github.com/dynamic-labs/DynamicAuth/compare/v1.0.0-alpha.9...v1.0.0-alpha.10) (2023-12-08)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
### Bug Fixes
|
|
42
|
+
|
|
43
|
+
* allow transaction error to read from viem error ([#4101](https://github.com/dynamic-labs/DynamicAuth/issues/4101)) ([0f46cbe](https://github.com/dynamic-labs/DynamicAuth/commit/0f46cbea1eb260c2efdeee9b62f669fb3cf4ab93))
|
|
44
|
+
* trigger claim flow for unclaimed embedded smart contract wallet signer ([#4108](https://github.com/dynamic-labs/DynamicAuth/issues/4108)) ([37c9013](https://github.com/dynamic-labs/DynamicAuth/commit/37c9013109f2d6a37bde041da9072c5f5fa2df67))
|
|
45
|
+
* WalletConnect v2 connector with non active chains ([#4085](https://github.com/dynamic-labs/DynamicAuth/issues/4085)) ([f69cbe9](https://github.com/dynamic-labs/DynamicAuth/commit/f69cbe96012563f71e89939c96f2a46926e7b394))
|
|
46
|
+
|
|
47
|
+
## [1.0.0-alpha.9](https://github.com/dynamic-labs/DynamicAuth/compare/v1.0.0-alpha.8...v1.0.0-alpha.9) (2023-12-07)
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
### ⚠ BREAKING CHANGES
|
|
51
|
+
|
|
52
|
+
* how to migrate
|
|
53
|
+
Whenever you would use the property wallets from the object returned by useDynamicContext, you must now rename it to walletConnectorOptions.
|
|
54
|
+
|
|
55
|
+
### Features
|
|
56
|
+
|
|
57
|
+
* add support for eip6963 ([#4064](https://github.com/dynamic-labs/DynamicAuth/issues/4064)) ([3f8cf0e](https://github.com/dynamic-labs/DynamicAuth/commit/3f8cf0e4250945f3a331f701d491a308fab5f7b8))
|
|
58
|
+
* allow AA wallets to access owner features ([#4079](https://github.com/dynamic-labs/DynamicAuth/issues/4079)) ([9efc2be](https://github.com/dynamic-labs/DynamicAuth/commit/9efc2bee87ec9193c3682863d72024b3586de724))
|
|
59
|
+
* introduce UserWalletsContext ([#4083](https://github.com/dynamic-labs/DynamicAuth/issues/4083)) ([b9ca7f6](https://github.com/dynamic-labs/DynamicAuth/commit/b9ca7f6b0aff4b3992325b70cc9a903ece445c7f))
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
### Bug Fixes
|
|
63
|
+
|
|
64
|
+
* ensure zero dev provider will receive a signer ([#4084](https://github.com/dynamic-labs/DynamicAuth/issues/4084)) ([f02a540](https://github.com/dynamic-labs/DynamicAuth/commit/f02a54036d39bfc5fb0c262f292acf914e4bd653))
|
|
65
|
+
* render recovery section only when turnkey provider is enabled ([#4093](https://github.com/dynamic-labs/DynamicAuth/issues/4093)) ([5f29bd2](https://github.com/dynamic-labs/DynamicAuth/commit/5f29bd23ccca2e307822377be28396edc7ab1fda))
|
|
66
|
+
* reset selected social provider on logout ([#4078](https://github.com/dynamic-labs/DynamicAuth/issues/4078)) ([85dc611](https://github.com/dynamic-labs/DynamicAuth/commit/85dc611d9c0e733bdb9d316b008bdaa35bcc2a91))
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
* rename wallets > walletConnectorOptions ([#4086](https://github.com/dynamic-labs/DynamicAuth/issues/4086)) ([10a7795](https://github.com/dynamic-labs/DynamicAuth/commit/10a779567e751469a667095726da52d78facbd57))
|
|
70
|
+
|
|
2
71
|
## [1.0.0-alpha.8](https://github.com/dynamic-labs/DynamicAuth/compare/v1.0.0-alpha.7...v1.0.0-alpha.8) (2023-12-05)
|
|
3
72
|
|
|
4
73
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/solana",
|
|
3
|
-
"version": "1.0.0
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/dynamic-labs/DynamicAuth.git",
|
|
@@ -27,11 +27,11 @@
|
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@solana/web3.js": "1.70.1",
|
|
30
|
-
"@dynamic-labs/rpc-providers": "1.0.0
|
|
31
|
-
"@dynamic-labs/types": "1.0.0
|
|
32
|
-
"@dynamic-labs/utils": "1.0.0
|
|
33
|
-
"@dynamic-labs/wallet-book": "1.0.0
|
|
34
|
-
"@dynamic-labs/wallet-connector-core": "1.0.0
|
|
30
|
+
"@dynamic-labs/rpc-providers": "1.0.0",
|
|
31
|
+
"@dynamic-labs/types": "1.0.0",
|
|
32
|
+
"@dynamic-labs/utils": "1.0.0",
|
|
33
|
+
"@dynamic-labs/wallet-book": "1.0.0",
|
|
34
|
+
"@dynamic-labs/wallet-connector-core": "1.0.0",
|
|
35
35
|
"eventemitter3": "5.0.1"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var InjectedWalletBase = require('./InjectedWalletBase.cjs');
|
|
6
|
+
|
|
7
|
+
class MagicEdenSol extends InjectedWalletBase.InjectedWalletBase {
|
|
8
|
+
constructor() {
|
|
9
|
+
super(...arguments);
|
|
10
|
+
this.name = 'MagicEdenSol';
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
exports.MagicEdenSol = MagicEdenSol;
|
package/src/injected/index.cjs
CHANGED
|
@@ -7,6 +7,7 @@ var ExodusSol = require('./ExodusSol.cjs');
|
|
|
7
7
|
var PhantomLedger = require('./PhantomLedger.cjs');
|
|
8
8
|
var Phantom = require('./Phantom.cjs');
|
|
9
9
|
var BackpackSol = require('./BackpackSol.cjs');
|
|
10
|
+
var MagicEdenSol = require('./MagicEdenSol.cjs');
|
|
10
11
|
|
|
11
12
|
const injectedWallets = [
|
|
12
13
|
BraveSol.BraveSol,
|
|
@@ -14,6 +15,7 @@ const injectedWallets = [
|
|
|
14
15
|
BackpackSol.BackpackSol,
|
|
15
16
|
PhantomLedger.PhantomLedger,
|
|
16
17
|
Phantom.Phantom,
|
|
18
|
+
MagicEdenSol.MagicEdenSol,
|
|
17
19
|
];
|
|
18
20
|
|
|
19
21
|
exports.injectedWallets = injectedWallets;
|
package/src/injected/index.js
CHANGED
|
@@ -3,6 +3,7 @@ import { ExodusSol } from './ExodusSol.js';
|
|
|
3
3
|
import { PhantomLedger } from './PhantomLedger.js';
|
|
4
4
|
import { Phantom } from './Phantom.js';
|
|
5
5
|
import { BackpackSol } from './BackpackSol.js';
|
|
6
|
+
import { MagicEdenSol } from './MagicEdenSol.js';
|
|
6
7
|
|
|
7
8
|
const injectedWallets = [
|
|
8
9
|
BraveSol,
|
|
@@ -10,6 +11,7 @@ const injectedWallets = [
|
|
|
10
11
|
BackpackSol,
|
|
11
12
|
PhantomLedger,
|
|
12
13
|
Phantom,
|
|
14
|
+
MagicEdenSol,
|
|
13
15
|
];
|
|
14
16
|
|
|
15
17
|
export { injectedWallets };
|
|
@@ -13,7 +13,8 @@ class SolProviderHelper {
|
|
|
13
13
|
return walletConnectorCore.ProviderLookup(this.allInstalledProviders(), providerFlags);
|
|
14
14
|
}
|
|
15
15
|
static allInstalledProviders() {
|
|
16
|
-
|
|
16
|
+
var _b;
|
|
17
|
+
return this.findSolanaProviders(window.solana).concat(this.findSolanaProviders(window.solflare), this.findSolanaProviders(window.glowSolana), this.findSolanaProviders(window.backpack), this.findSolanaProviders((_b = window.magicEden) === null || _b === void 0 ? void 0 : _b.solana));
|
|
17
18
|
}
|
|
18
19
|
static findSolanaProviders(solana) {
|
|
19
20
|
const solanaProviders = [];
|
|
@@ -137,6 +138,10 @@ SolProviderHelper.PhantomProvider = () => _a.installedProviderLookup([
|
|
|
137
138
|
{ flag: 'isBraveWallet', value: false },
|
|
138
139
|
{ flag: 'isExodus', value: false },
|
|
139
140
|
]);
|
|
141
|
+
SolProviderHelper.MagicEdenProvider = () => _a.installedProviderLookup([
|
|
142
|
+
{ flag: 'isMagicEden', value: true },
|
|
143
|
+
{ flag: 'isPhantom', value: false },
|
|
144
|
+
]);
|
|
140
145
|
SolProviderHelper.SolflareProvider = () => _a.installedProviderLookup([{ flag: 'isSolflare', value: true }]);
|
|
141
146
|
SolProviderHelper.BraveProvider = () => _a.installedProviderLookup([
|
|
142
147
|
{ flag: 'isPhantom', value: true },
|
|
@@ -153,6 +158,7 @@ SolProviderHelper.providers = {
|
|
|
153
158
|
coinbasesolana: _a.CoinbaseProvider,
|
|
154
159
|
exodussol: _a.ExodusProvider,
|
|
155
160
|
glow: _a.GlowProvider,
|
|
161
|
+
magicedensol: _a.MagicEdenProvider,
|
|
156
162
|
phantom: _a.PhantomProvider,
|
|
157
163
|
phantomledger: _a.PhantomProvider,
|
|
158
164
|
solflare: _a.SolflareProvider,
|
|
@@ -9,6 +9,7 @@ export declare class SolProviderHelper {
|
|
|
9
9
|
static GlowProvider: Provider;
|
|
10
10
|
static CoinbaseProvider: Provider;
|
|
11
11
|
static PhantomProvider: Provider;
|
|
12
|
+
static MagicEdenProvider: Provider;
|
|
12
13
|
static SolflareProvider: Provider;
|
|
13
14
|
static BraveProvider: Provider;
|
|
14
15
|
static ExodusProvider: Provider;
|
package/src/solProviderHelper.js
CHANGED
|
@@ -9,7 +9,8 @@ class SolProviderHelper {
|
|
|
9
9
|
return ProviderLookup(this.allInstalledProviders(), providerFlags);
|
|
10
10
|
}
|
|
11
11
|
static allInstalledProviders() {
|
|
12
|
-
|
|
12
|
+
var _b;
|
|
13
|
+
return this.findSolanaProviders(window.solana).concat(this.findSolanaProviders(window.solflare), this.findSolanaProviders(window.glowSolana), this.findSolanaProviders(window.backpack), this.findSolanaProviders((_b = window.magicEden) === null || _b === void 0 ? void 0 : _b.solana));
|
|
13
14
|
}
|
|
14
15
|
static findSolanaProviders(solana) {
|
|
15
16
|
const solanaProviders = [];
|
|
@@ -133,6 +134,10 @@ SolProviderHelper.PhantomProvider = () => _a.installedProviderLookup([
|
|
|
133
134
|
{ flag: 'isBraveWallet', value: false },
|
|
134
135
|
{ flag: 'isExodus', value: false },
|
|
135
136
|
]);
|
|
137
|
+
SolProviderHelper.MagicEdenProvider = () => _a.installedProviderLookup([
|
|
138
|
+
{ flag: 'isMagicEden', value: true },
|
|
139
|
+
{ flag: 'isPhantom', value: false },
|
|
140
|
+
]);
|
|
136
141
|
SolProviderHelper.SolflareProvider = () => _a.installedProviderLookup([{ flag: 'isSolflare', value: true }]);
|
|
137
142
|
SolProviderHelper.BraveProvider = () => _a.installedProviderLookup([
|
|
138
143
|
{ flag: 'isPhantom', value: true },
|
|
@@ -149,6 +154,7 @@ SolProviderHelper.providers = {
|
|
|
149
154
|
coinbasesolana: _a.CoinbaseProvider,
|
|
150
155
|
exodussol: _a.ExodusProvider,
|
|
151
156
|
glow: _a.GlowProvider,
|
|
157
|
+
magicedensol: _a.MagicEdenProvider,
|
|
152
158
|
phantom: _a.PhantomProvider,
|
|
153
159
|
phantomledger: _a.PhantomProvider,
|
|
154
160
|
solflare: _a.SolflareProvider,
|
package/src/types.d.ts
CHANGED
|
@@ -15,6 +15,9 @@ declare global {
|
|
|
15
15
|
solana?: ISolana;
|
|
16
16
|
solflare?: ISolana;
|
|
17
17
|
backpack?: IBackpackSolanaSigner;
|
|
18
|
+
magicEden?: {
|
|
19
|
+
solana: ISolana;
|
|
20
|
+
};
|
|
18
21
|
}
|
|
19
22
|
}
|
|
20
23
|
type PublicKey = {
|
|
@@ -57,6 +60,6 @@ export type IBackpackSolanaSigner = Omit<ISolanaSigner, 'signMessage'> & {
|
|
|
57
60
|
send: (transaction: Transaction, signers?: Signer[], options?: SendOptions, connection?: Connection, publicKey?: PublicKey) => Promise<TransactionSignature>;
|
|
58
61
|
};
|
|
59
62
|
export type ISolana = ISolanaSigner | IBackpackSolanaSigner;
|
|
60
|
-
export type ProviderFlag = 'isBraveWallet' | 'isGlow' | 'isPhantom' | 'isSolflare' | 'isExodus' | 'isBackpack';
|
|
63
|
+
export type ProviderFlag = 'isBraveWallet' | 'isGlow' | 'isPhantom' | 'isSolflare' | 'isExodus' | 'isBackpack' | 'isMagicEden';
|
|
61
64
|
export type EthProviderCondition = ProviderCondition<ProviderFlag>;
|
|
62
65
|
export {};
|