@dynamic-labs/utils 2.1.0-alpha.1 → 2.1.0-alpha.10
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 +79 -0
- package/package.json +4 -4
- package/src/bufferPolyfill.cjs +15 -0
- package/src/bufferPolyfill.js +13 -0
- package/src/bufferToBase64.cjs +1 -1
- package/src/bufferToBase64.d.ts +1 -1
- package/src/bufferToBase64.js +1 -1
- package/src/errors/MergeAccountsConfirmationError.cjs +2 -1
- package/src/errors/MergeAccountsConfirmationError.d.ts +9 -3
- package/src/errors/MergeAccountsConfirmationError.js +2 -1
- package/src/handleMobileWalletRedirect/handleMobileWalletRedirect.cjs +1 -1
- package/src/handleMobileWalletRedirect/handleMobileWalletRedirect.js +1 -1
- package/src/logger/logger.cjs +1 -1
- package/src/logger/logger.js +1 -1
- package/src/retryableFn.cjs +1 -1
- package/src/retryableFn.js +1 -1
- package/src/bufferPollyfill.cjs +0 -19
- package/src/bufferPollyfill.js +0 -17
- /package/src/{bufferPollyfill.d.ts → bufferPolyfill.d.ts} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,83 @@
|
|
|
1
1
|
|
|
2
|
+
## [2.1.0-alpha.10](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.9...v2.1.0-alpha.10) (2024-04-30)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* bump @coinbase/wallet-sdk to latest beta ([#5388](https://github.com/dynamic-labs/DynamicAuth/issues/5388)) ([9225546](https://github.com/dynamic-labs/DynamicAuth/commit/922554630ccf2ef98bc297521309918f922bc671))
|
|
8
|
+
|
|
9
|
+
## [2.1.0-alpha.9](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.8...v2.1.0-alpha.9) (2024-04-30)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
* headless create embedded wallet with optional passkey data parameter ([#5487](https://github.com/dynamic-labs/DynamicAuth/issues/5487)) ([891c3d7](https://github.com/dynamic-labs/DynamicAuth/commit/891c3d77a02a019140bcb8dd03b62b1afd69710e))
|
|
15
|
+
|
|
16
|
+
## [2.1.0-alpha.8](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.7...v2.1.0-alpha.8) (2024-04-26)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Bug Fixes
|
|
20
|
+
|
|
21
|
+
* display wallet tabs when linking a wallet ([#5491](https://github.com/dynamic-labs/DynamicAuth/issues/5491)) ([10fd6b4](https://github.com/dynamic-labs/DynamicAuth/commit/10fd6b4d9aec7596338c50e17f79f6be534cf2c1))
|
|
22
|
+
* ensure zerodev viem client handles eth_accounts call ([#5477](https://github.com/dynamic-labs/DynamicAuth/issues/5477)) ([1132e1e](https://github.com/dynamic-labs/DynamicAuth/commit/1132e1e8655b58e81cb56789453ba56a059f52ec))
|
|
23
|
+
* network with keplr ([#5485](https://github.com/dynamic-labs/DynamicAuth/issues/5485)) ([b86f2fc](https://github.com/dynamic-labs/DynamicAuth/commit/b86f2fce491f9752e80a86643916da9ac7fb9276))
|
|
24
|
+
* refetch nameservice data and display properly ([#5476](https://github.com/dynamic-labs/DynamicAuth/issues/5476)) ([2aee798](https://github.com/dynamic-labs/DynamicAuth/commit/2aee798846f69496201bec7aa52e7ec1f370b7c3))
|
|
25
|
+
* use embeddedWallet create response authToken in embeddedWalletCreated ([#5478](https://github.com/dynamic-labs/DynamicAuth/issues/5478)) ([51772da](https://github.com/dynamic-labs/DynamicAuth/commit/51772daf557a72984c757efd8301e2b510dc37f1))
|
|
26
|
+
|
|
27
|
+
## [2.1.0-alpha.7](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.6...v2.1.0-alpha.7) (2024-04-25)
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
### Bug Fixes
|
|
31
|
+
|
|
32
|
+
* restore embedded wallet session iframe element conflict ([#5474](https://github.com/dynamic-labs/DynamicAuth/issues/5474)) ([c157477](https://github.com/dynamic-labs/DynamicAuth/commit/c157477ea126b3130b13b711796bdd06215e7af1))
|
|
33
|
+
|
|
34
|
+
## [2.1.0-alpha.6](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.5...v2.1.0-alpha.6) (2024-04-24)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
### Bug Fixes
|
|
38
|
+
|
|
39
|
+
* embedded wallets headless session control fixes ([#5469](https://github.com/dynamic-labs/DynamicAuth/issues/5469)) ([92e6c35](https://github.com/dynamic-labs/DynamicAuth/commit/92e6c359d2710fd4f5f5a6fedc4acf6c4bab78ba))
|
|
40
|
+
|
|
41
|
+
## [2.1.0-alpha.5](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.4...v2.1.0-alpha.5) (2024-04-23)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
### Bug Fixes
|
|
45
|
+
|
|
46
|
+
* get embedded wallet checking the wrong chain enum ([#5458](https://github.com/dynamic-labs/DynamicAuth/issues/5458)) ([ed1c523](https://github.com/dynamic-labs/DynamicAuth/commit/ed1c523ca14cd4d21c00181ab40802f876c02b80))
|
|
47
|
+
|
|
48
|
+
## [2.1.0-alpha.4](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.3...v2.1.0-alpha.4) (2024-04-23)
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
### Features
|
|
52
|
+
|
|
53
|
+
* add email and sms to client auth module ([#5436](https://github.com/dynamic-labs/DynamicAuth/issues/5436)) ([5420476](https://github.com/dynamic-labs/DynamicAuth/commit/5420476d1ba38fd4f987f28e9aefbfb3e61ea2bf))
|
|
54
|
+
* headless create passkeys for embedded wallets ([#5395](https://github.com/dynamic-labs/DynamicAuth/issues/5395)) ([0b64099](https://github.com/dynamic-labs/DynamicAuth/commit/0b6409968457f65886248f0a0879e39ec3803fd0))
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
### Bug Fixes
|
|
58
|
+
|
|
59
|
+
* prevent wagmi from reconnect when DynamicContextProvider rerender ([#5446](https://github.com/dynamic-labs/DynamicAuth/issues/5446)) ([33337af](https://github.com/dynamic-labs/DynamicAuth/commit/33337af76786963cb3db7fa7c58c1292c529d0ac))
|
|
60
|
+
|
|
61
|
+
## [2.1.0-alpha.3](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.2...v2.1.0-alpha.3) (2024-04-23)
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
### Features
|
|
65
|
+
|
|
66
|
+
* add merge user accounts flow ([#5429](https://github.com/dynamic-labs/DynamicAuth/issues/5429)) ([41d4239](https://github.com/dynamic-labs/DynamicAuth/commit/41d423906625e28004ba8f20baf57847ed8bf5d0))
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
### Bug Fixes
|
|
70
|
+
|
|
71
|
+
* disconnect wallet on lock in connect-only ([#5422](https://github.com/dynamic-labs/DynamicAuth/issues/5422)) ([a26f9fe](https://github.com/dynamic-labs/DynamicAuth/commit/a26f9fe93cf8568f1482e10b831de98c77fb2a2d))
|
|
72
|
+
* useReactiveProxy to stop proxing when it finds a reactive value ([#5428](https://github.com/dynamic-labs/DynamicAuth/issues/5428)) ([838dce9](https://github.com/dynamic-labs/DynamicAuth/commit/838dce9ee953361e41772239a91adb1dd8d40234))
|
|
73
|
+
|
|
74
|
+
## [2.1.0-alpha.2](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.1...v2.1.0-alpha.2) (2024-04-19)
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
### Bug Fixes
|
|
78
|
+
|
|
79
|
+
* buffer polyfill for utils package ([#5404](https://github.com/dynamic-labs/DynamicAuth/issues/5404)) ([bd40441](https://github.com/dynamic-labs/DynamicAuth/commit/bd404414a2e51d79fad86d7603dae89628c225b9))
|
|
80
|
+
|
|
2
81
|
## [2.1.0-alpha.1](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.0...v2.1.0-alpha.1) (2024-04-18)
|
|
3
82
|
|
|
4
83
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/utils",
|
|
3
|
-
"version": "2.1.0-alpha.
|
|
3
|
+
"version": "2.1.0-alpha.10",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/dynamic-labs/DynamicAuth.git",
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
"./package.json": "./package.json"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@dynamic-labs/sdk-api-core": "0.0.
|
|
29
|
+
"@dynamic-labs/sdk-api-core": "0.0.432",
|
|
30
30
|
"tldts": "6.0.16",
|
|
31
|
-
"@dynamic-labs/logger": "2.1.0-alpha.
|
|
32
|
-
"@dynamic-labs/types": "2.1.0-alpha.
|
|
31
|
+
"@dynamic-labs/logger": "2.1.0-alpha.10",
|
|
32
|
+
"@dynamic-labs/types": "2.1.0-alpha.10",
|
|
33
33
|
"buffer": "6.0.3"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
var _ = require('buffer/');
|
|
5
|
+
|
|
6
|
+
/* eslint-disable */
|
|
7
|
+
/**
|
|
8
|
+
* This is needed for the browser to work with buffer
|
|
9
|
+
*/
|
|
10
|
+
if (typeof window !== 'undefined') {
|
|
11
|
+
window.global = globalThis;
|
|
12
|
+
if (!window.Buffer && typeof window.Buffer === 'undefined') {
|
|
13
|
+
Object.assign(window, { Buffer: _.Buffer });
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
import { Buffer } from 'buffer/index.js';
|
|
3
|
+
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
/**
|
|
6
|
+
* This is needed for the browser to work with buffer
|
|
7
|
+
*/
|
|
8
|
+
if (typeof window !== 'undefined') {
|
|
9
|
+
window.global = globalThis;
|
|
10
|
+
if (!window.Buffer && typeof window.Buffer === 'undefined') {
|
|
11
|
+
Object.assign(window, { Buffer });
|
|
12
|
+
}
|
|
13
|
+
}
|
package/src/bufferToBase64.cjs
CHANGED
package/src/bufferToBase64.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import './
|
|
1
|
+
import './bufferPolyfill';
|
|
2
2
|
export declare const bufferToBase64: (buf: Uint8Array) => string;
|
package/src/bufferToBase64.js
CHANGED
|
@@ -6,9 +6,10 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
6
6
|
var DynamicError = require('./DynamicError.cjs');
|
|
7
7
|
|
|
8
8
|
class MergeAccountsConfirmationError extends DynamicError.DynamicError {
|
|
9
|
-
constructor(code, mergeConflicts) {
|
|
9
|
+
constructor({ code, mergeConflicts, walletAddress, }) {
|
|
10
10
|
super('MergeAccountsConfirmationError', code);
|
|
11
11
|
this.mergeConflicts = mergeConflicts;
|
|
12
|
+
this.walletAddress = walletAddress;
|
|
12
13
|
}
|
|
13
14
|
}
|
|
14
15
|
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { MergeConflicts } from '@dynamic-labs/sdk-api-core';
|
|
2
2
|
import { DynamicError } from './DynamicError';
|
|
3
|
+
export type MergeAccountsConfirmationErrorProps = {
|
|
4
|
+
code: string;
|
|
5
|
+
mergeConflicts?: MergeConflicts;
|
|
6
|
+
walletAddress?: string;
|
|
7
|
+
};
|
|
3
8
|
export declare class MergeAccountsConfirmationError extends DynamicError {
|
|
4
|
-
mergeConflicts:
|
|
5
|
-
|
|
9
|
+
mergeConflicts: MergeConflicts | undefined;
|
|
10
|
+
walletAddress: string | undefined;
|
|
11
|
+
constructor({ code, mergeConflicts, walletAddress, }: MergeAccountsConfirmationErrorProps);
|
|
6
12
|
}
|
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
import { DynamicError } from './DynamicError.js';
|
|
3
3
|
|
|
4
4
|
class MergeAccountsConfirmationError extends DynamicError {
|
|
5
|
-
constructor(code, mergeConflicts) {
|
|
5
|
+
constructor({ code, mergeConflicts, walletAddress, }) {
|
|
6
6
|
super('MergeAccountsConfirmationError', code);
|
|
7
7
|
this.mergeConflicts = mergeConflicts;
|
|
8
|
+
this.walletAddress = walletAddress;
|
|
8
9
|
}
|
|
9
10
|
}
|
|
10
11
|
|
|
@@ -8,7 +8,7 @@ require('../errors/TransactionGasCannotBeSponsoredError.cjs');
|
|
|
8
8
|
require('../logger/logger.cjs');
|
|
9
9
|
var isMobile = require('../isMobile.cjs');
|
|
10
10
|
require('../../_virtual/_tslib.cjs');
|
|
11
|
-
require('../
|
|
11
|
+
require('../bufferPolyfill.cjs');
|
|
12
12
|
require('viem/chains');
|
|
13
13
|
require('tldts');
|
|
14
14
|
|
|
@@ -4,7 +4,7 @@ import '../errors/TransactionGasCannotBeSponsoredError.js';
|
|
|
4
4
|
import '../logger/logger.js';
|
|
5
5
|
import { isSamsungBrowser } from '../isMobile.js';
|
|
6
6
|
import '../../_virtual/_tslib.js';
|
|
7
|
-
import '../
|
|
7
|
+
import '../bufferPolyfill.js';
|
|
8
8
|
import 'viem/chains';
|
|
9
9
|
import 'tldts';
|
|
10
10
|
|
package/src/logger/logger.cjs
CHANGED
package/src/logger/logger.js
CHANGED
package/src/retryableFn.cjs
CHANGED
|
@@ -7,7 +7,7 @@ var _tslib = require('../_virtual/_tslib.cjs');
|
|
|
7
7
|
require('./errors/InsufficientFundsError.cjs');
|
|
8
8
|
require('./errors/TransactionGasCannotBeSponsoredError.cjs');
|
|
9
9
|
require('./logger/logger.cjs');
|
|
10
|
-
require('./
|
|
10
|
+
require('./bufferPolyfill.cjs');
|
|
11
11
|
var sleep = require('./sleep/sleep.cjs');
|
|
12
12
|
require('viem/chains');
|
|
13
13
|
require('tldts');
|
package/src/retryableFn.js
CHANGED
|
@@ -3,7 +3,7 @@ import { __awaiter } from '../_virtual/_tslib.js';
|
|
|
3
3
|
import './errors/InsufficientFundsError.js';
|
|
4
4
|
import './errors/TransactionGasCannotBeSponsoredError.js';
|
|
5
5
|
import './logger/logger.js';
|
|
6
|
-
import './
|
|
6
|
+
import './bufferPolyfill.js';
|
|
7
7
|
import { sleep } from './sleep/sleep.js';
|
|
8
8
|
import 'viem/chains';
|
|
9
9
|
import 'tldts';
|
package/src/bufferPollyfill.cjs
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
'use strict';
|
|
3
|
-
|
|
4
|
-
var _ = require('buffer/');
|
|
5
|
-
|
|
6
|
-
/* eslint-disable */
|
|
7
|
-
/**
|
|
8
|
-
* @walletconnect/client and @walletconnect/qrcode-modal use `global` and `Buffer`, respectively.
|
|
9
|
-
* This issue is captured here: https://github.com/WalletConnect/walletconnect-monorepo/issues/341
|
|
10
|
-
* Here are some GH issues of others facing the same problem:
|
|
11
|
-
* * https://github.com/WalletConnect/walletconnect-monorepo/issues/734
|
|
12
|
-
* * https://github.com/WalletConnect/walletconnect-monorepo/issues/748
|
|
13
|
-
*/
|
|
14
|
-
if (typeof window !== 'undefined') {
|
|
15
|
-
window.global = globalThis;
|
|
16
|
-
if (!window.Buffer && typeof _.Buffer === 'undefined') {
|
|
17
|
-
Object.assign(window, { Buffer: _.Buffer });
|
|
18
|
-
}
|
|
19
|
-
}
|
package/src/bufferPollyfill.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
import { Buffer } from 'buffer/index.js';
|
|
3
|
-
|
|
4
|
-
/* eslint-disable */
|
|
5
|
-
/**
|
|
6
|
-
* @walletconnect/client and @walletconnect/qrcode-modal use `global` and `Buffer`, respectively.
|
|
7
|
-
* This issue is captured here: https://github.com/WalletConnect/walletconnect-monorepo/issues/341
|
|
8
|
-
* Here are some GH issues of others facing the same problem:
|
|
9
|
-
* * https://github.com/WalletConnect/walletconnect-monorepo/issues/734
|
|
10
|
-
* * https://github.com/WalletConnect/walletconnect-monorepo/issues/748
|
|
11
|
-
*/
|
|
12
|
-
if (typeof window !== 'undefined') {
|
|
13
|
-
window.global = globalThis;
|
|
14
|
-
if (!window.Buffer && typeof Buffer === 'undefined') {
|
|
15
|
-
Object.assign(window, { Buffer });
|
|
16
|
-
}
|
|
17
|
-
}
|
|
File without changes
|