Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Coordinated multisig interaction and rotation #105

Merged
merged 7 commits into from
Sep 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 8 additions & 17 deletions examples/integration-scripts/challenge.ts
Original file line number Diff line number Diff line change
@@ -1,24 +1,13 @@
import { strict as assert } from "assert";
import { strict as assert } from "assert"
import signify from "signify-ts"

let signify: any;
const url = "http://127.0.0.1:3901"
const boot_url = "http://127.0.0.1:3903"

// @ts-ignore
import('signify-ts').then(
(module) => {
signify = module
signify.ready().then(() => {
console.log("*** Starting CHALLENGE test ***");
run().then(() => {
console.log("*** Test complete ***")
});
});
}
)
await run()

async function run() {

await signify.ready()
// Boot two clients
const bran1 = signify.randomPasscode()
const bran2 = signify.randomPasscode()
Expand All @@ -40,13 +29,14 @@ async function run() {
assert.equal(challenge1_big.words.length, 24)

// Create two identifiers, one for each client
let op1 = await client1.identifiers().create('alice', {
let icpResult1 = await client1.identifiers().create('alice', {
toad: 3,
wits: [
"BBilc4-L3tFUnfM_wJr4S4OJanAv_VmF_dJNN6vkf2Ha",
"BLskRTInXnMxWaGqcpSyMgo0nYbalW99cGZESrz3zapM",
"BIKKuvBwpmDVA4Ds-EpL5bt9OqPzWPja2LigFYZN2YfX"]
})
let op1 = await icpResult1.op()
while (!op1["done"] ) {
op1 = await client1.operations().get(op1.name);
await new Promise(resolve => setTimeout(resolve, 1000));
Expand All @@ -55,13 +45,14 @@ async function run() {
await client1.identifiers().addEndRole("alice", 'agent', client1!.agent!.pre)
console.log("Alice's AID:", aid1.i)

let op2 = await client2.identifiers().create('bob', {
let icpResult2 = await client2.identifiers().create('bob', {
toad: 3,
wits: [
"BBilc4-L3tFUnfM_wJr4S4OJanAv_VmF_dJNN6vkf2Ha",
"BLskRTInXnMxWaGqcpSyMgo0nYbalW99cGZESrz3zapM",
"BIKKuvBwpmDVA4Ds-EpL5bt9OqPzWPja2LigFYZN2YfX"]
})
let op2 = await icpResult2.op()
while (!op2["done"] ) {
op2 = await client2.operations().get(op2.name);
await new Promise(resolve => setTimeout(resolve, 1000));
Expand Down
19 changes: 4 additions & 15 deletions examples/integration-scripts/credentials.ts
Original file line number Diff line number Diff line change
@@ -1,24 +1,13 @@
import { strict as assert } from "assert";
import { strict as assert } from "assert"
import signify from "signify-ts"

let signify: any;
const url = "http://127.0.0.1:3901"
const boot_url = "http://127.0.0.1:3903"

// @ts-ignore
import('signify-ts').then(
(module) => {
signify = module
signify.ready().then(() => {
console.log("*** Starting CREDENTIALS test ***");
run().then(() => {
console.log("*** Test complete ***")
});
});
}
)
await run()

async function run() {

await signify.ready()
// Boot three clients
const bran1 = signify.randomPasscode()
const bran2 = signify.randomPasscode()
Expand Down
19 changes: 4 additions & 15 deletions examples/integration-scripts/delegation.ts
Original file line number Diff line number Diff line change
@@ -1,24 +1,13 @@
import { strict as assert } from "assert";
import { strict as assert } from "assert"
import signify from "signify-ts"

let signify: any;
const url = "http://127.0.0.1:3901"
const boot_url = "http://127.0.0.1:3903"

// @ts-ignore
import('signify-ts').then(
(module) => {
signify = module
signify.ready().then(() => {
console.log("*** Starting DELEGATION test ***");
run().then(() => {
console.log("*** Test complete ***")
});
});
}
)
await run()

async function run() {

await signify.ready()
// Boot two clients
const bran1 = signify.randomPasscode()
const bran2 = signify.randomPasscode()
Expand Down
Loading
Loading