-
Notifications
You must be signed in to change notification settings - Fork 7
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
cmd
committed
Jan 25, 2024
1 parent
b3664b4
commit 0299302
Showing
49 changed files
with
804 additions
and
689 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,4 +7,6 @@ node_modules | |
TODO.md | ||
NOTES.md | ||
*.log | ||
.env* | ||
.env* | ||
|
||
src/**/_* |
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,6 @@ | ||
import { EscrowClient } from '@scrow/core/client' | ||
|
||
import { config } from './00_demo_config.js' | ||
|
||
// Create a new client. | ||
export const client = new EscrowClient(config) |
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 |
---|---|---|
@@ -1,21 +1,22 @@ | ||
import { Seed, Signer, Wallet } from '@cmdcode/signer' | ||
import { EscrowSigner } from '@scrow/core/client' | ||
import { client_config } from './01_create_client.js' | ||
|
||
const aliases = [ 'alice', 'bob', 'carol' ] | ||
import { config, members } from './00_demo_config.js' | ||
|
||
|
||
function create_signer (alias : string) { | ||
|
||
const seed = Seed.import.from_char(alias) | ||
|
||
const xpub = Wallet.create({ seed }).xpub | ||
|
||
const signer_config = { | ||
...client_config, | ||
...config, | ||
signer : new Signer({ seed }), | ||
wallet : new Wallet(xpub) | ||
} | ||
|
||
return new EscrowSigner(signer_config) | ||
} | ||
|
||
export const members = aliases.map(e => create_signer(e)) | ||
export const signers = members.map(e => create_signer(e)) |
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
Oops, something went wrong.