@dynamic-labs/midnight 4.76.0 → 4.77.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 +17 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +3 -2
- package/src/constants.cjs +15 -0
- package/src/constants.d.ts +8 -0
- package/src/constants.js +11 -0
- package/src/index.cjs +5 -0
- package/src/index.d.ts +2 -1
- package/src/index.js +1 -0
- package/src/types.d.ts +36 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,21 @@
|
|
|
1
1
|
|
|
2
|
+
## [4.77.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.76.0...v4.77.0) (2026-04-10)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* **midnight:** add types and chain constants ([#10851](https://github.com/dynamic-labs/dynamic-auth/issues/10851)) ([91620d2](https://github.com/dynamic-labs/dynamic-auth/commit/91620d21596c525d8d51ddb0c0ba7df456e3eb64))
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
* issue when linking new wallet via qr code when there's no active session ([#10878](https://github.com/dynamic-labs/dynamic-auth/issues/10878)) ([53cbae0](https://github.com/dynamic-labs/dynamic-auth/commit/53cbae0806665371e9214663e72e2f1fb7e1ac3f))
|
|
13
|
+
* **lint-staged:** exclude Playwright specs from jest pre-commit hook [DYNT-496] ([#10880](https://github.com/dynamic-labs/dynamic-auth/issues/10880)) ([d3c8a9a](https://github.com/dynamic-labs/dynamic-auth/commit/d3c8a9a59c855bb834dcedf2e18a2bd0eabcb420))
|
|
14
|
+
* **react-core:** exclude password setup cancellations from wallet creation failure metrics ([#10868](https://github.com/dynamic-labs/dynamic-auth/issues/10868)) ([685de16](https://github.com/dynamic-labs/dynamic-auth/commit/685de16f004f282e1b24114c3a18d8c02b7e48aa))
|
|
15
|
+
* **react-native:** adds eip7702 authorization ([#10904](https://github.com/dynamic-labs/dynamic-auth/issues/10904)) ([fa3e41f](https://github.com/dynamic-labs/dynamic-auth/commit/fa3e41f18aeca309c199003781e569bb425dda5d))
|
|
16
|
+
* **react-native:** remove crypto dependency ([#10871](https://github.com/dynamic-labs/dynamic-auth/issues/10871)) ([de4faa5](https://github.com/dynamic-labs/dynamic-auth/commit/de4faa5bd8bbb8fc321ed65f8b6ccfbaff1d00d3))
|
|
17
|
+
* **react-native:** unify session storage ([#10870](https://github.com/dynamic-labs/dynamic-auth/issues/10870)) ([0536ea0](https://github.com/dynamic-labs/dynamic-auth/commit/0536ea0a78f69b9952b21eec38b4868276215b46))
|
|
18
|
+
|
|
2
19
|
## [4.76.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.75.0...v4.76.0) (2026-04-06)
|
|
3
20
|
|
|
4
21
|
|
package/package.cjs
CHANGED
package/package.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/midnight",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.77.0",
|
|
4
4
|
"description": "A React SDK for implementing wallet web3 authentication and authorization to your website.",
|
|
5
5
|
"author": "Dynamic Labs, Inc.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
},
|
|
19
19
|
"homepage": "https://www.dynamic.xyz/",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@dynamic-labs/assert-package-version": "4.
|
|
21
|
+
"@dynamic-labs/assert-package-version": "4.77.0",
|
|
22
|
+
"@midnight-ntwrk/dapp-connector-api": "4.0.1"
|
|
22
23
|
}
|
|
23
24
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Midnight blockchain network identifiers.
|
|
8
|
+
* mainnet = 0, testnet = 1 (mirrors the chainId mapping).
|
|
9
|
+
*/
|
|
10
|
+
const MIDNIGHT_NETWORKS = {
|
|
11
|
+
MAINNET: 'midnight:mainnet',
|
|
12
|
+
TESTNET: 'midnight:testnet',
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
exports.MIDNIGHT_NETWORKS = MIDNIGHT_NETWORKS;
|
package/src/constants.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
/**
|
|
3
|
+
* Midnight blockchain network identifiers.
|
|
4
|
+
* mainnet = 0, testnet = 1 (mirrors the chainId mapping).
|
|
5
|
+
*/
|
|
6
|
+
const MIDNIGHT_NETWORKS = {
|
|
7
|
+
MAINNET: 'midnight:mainnet',
|
|
8
|
+
TESTNET: 'midnight:testnet',
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export { MIDNIGHT_NETWORKS };
|
package/src/index.cjs
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
4
6
|
var assertPackageVersion = require('@dynamic-labs/assert-package-version');
|
|
5
7
|
var _package = require('../package.cjs');
|
|
8
|
+
var constants = require('./constants.cjs');
|
|
6
9
|
|
|
7
10
|
assertPackageVersion.assertPackageVersion('@dynamic-labs/midnight', _package.version);
|
|
11
|
+
|
|
12
|
+
exports.MIDNIGHT_NETWORKS = constants.MIDNIGHT_NETWORKS;
|
package/src/index.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from './constants';
|
|
2
|
+
export * from './types';
|
package/src/index.js
CHANGED
package/src/types.d.ts
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { MIDNIGHT_NETWORKS } from './constants';
|
|
2
|
+
export type MidnightNetworkId = typeof MIDNIGHT_NETWORKS[keyof typeof MIDNIGHT_NETWORKS];
|
|
3
|
+
/**
|
|
4
|
+
* A single proof-based call to a Midnight contract circuit.
|
|
5
|
+
*/
|
|
6
|
+
export type MidnightCircuitCall = {
|
|
7
|
+
contractAddress: string;
|
|
8
|
+
circuitId: string;
|
|
9
|
+
inputs: Record<string, unknown>;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* A Midnight transaction consisting of one or more circuit calls.
|
|
13
|
+
*/
|
|
14
|
+
export type MidnightTransaction = {
|
|
15
|
+
networkId: MidnightNetworkId;
|
|
16
|
+
circuitCalls: MidnightCircuitCall[];
|
|
17
|
+
fee?: number;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Minimal interface for the Midnight wallet provider injected into window.
|
|
21
|
+
*
|
|
22
|
+
* Wallets that implement this interface (e.g. the 1am wallet) can be wrapped
|
|
23
|
+
* by MidnightWalletConnector.
|
|
24
|
+
*/
|
|
25
|
+
export type IMidnightWalletProvider = {
|
|
26
|
+
isConnected: boolean;
|
|
27
|
+
address: string | null | undefined;
|
|
28
|
+
connect(): Promise<{
|
|
29
|
+
address: string;
|
|
30
|
+
}>;
|
|
31
|
+
disconnect(): Promise<void>;
|
|
32
|
+
signMessage(message: string): Promise<string>;
|
|
33
|
+
submitTransaction(transaction: MidnightTransaction): Promise<string>;
|
|
34
|
+
getNetwork(): Promise<MidnightNetworkId>;
|
|
35
|
+
};
|
|
36
|
+
export type { InitialAPI as Midnight1amInitialAPI, ConnectedAPI as Midnight1amConnectedAPI, WalletConnectedAPI as Midnight1amWalletConnectedAPI, HintUsage as Midnight1amHintUsage, Configuration as Midnight1amConfiguration, ConnectionStatus as Midnight1amConnectionStatus, TxStatus as Midnight1amTxStatus, ExecutionStatus as Midnight1amExecutionStatus, HistoryEntry as Midnight1amHistoryEntry, DesiredOutput as Midnight1amDesiredOutput, DesiredInput as Midnight1amDesiredInput, TokenType as Midnight1amTokenType, SignDataOptions as Midnight1amSignDataOptions, Signature as Midnight1amSignature, KeyMaterialProvider as Midnight1amKeyMaterialProvider, ProvingProvider as Midnight1amProvingProvider, } from '@midnight-ntwrk/dapp-connector-api';
|