-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
104 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { describe, it } from "node:test"; | ||
import { defaultTestOptions, newCoreKitLogInInstance } from "./setup"; | ||
import { AsyncStorage, MemoryStorage, WEB3AUTH_NETWORK, Web3AuthMPCCoreKit } from "src"; | ||
import { deepEqual, deepStrictEqual, equal, strictEqual } from "node:assert"; | ||
|
||
|
||
describe('serialize deserialze mpc corekit', () => { | ||
it('serialize', async () => { | ||
const localMemoryStorage = new MemoryStorage(); | ||
const instance = await newCoreKitLogInInstance({ | ||
network: WEB3AUTH_NETWORK.DEVNET, | ||
manualSync: true, | ||
email: "[email protected]", | ||
storageInstance: localMemoryStorage, | ||
}) | ||
const options = defaultTestOptions({ network: WEB3AUTH_NETWORK.DEVNET, manualSync: true, storageInstance: localMemoryStorage }); | ||
const serialized = JSON.stringify(instance); | ||
console.log(serialized) | ||
const deserialized = await Web3AuthMPCCoreKit.fromJSON(JSON.parse(serialized), options); | ||
|
||
|
||
|
||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters