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

demo: Update demo-statement to remove registrars,judgements #243

Merged
merged 1 commit into from
Oct 3, 2024
Merged
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
16 changes: 0 additions & 16 deletions demo/src/func-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,6 @@ import { randomUUID } from 'crypto'
import { addNetworkMember } from './utils/createAuthorities'
import { createAccount } from './utils/createAccount'

import {
requestJudgement,
setIdentity,
setRegistrar,
provideJudgement,
} from './utils/createRegistrar'

function getChallenge(): string {
return Cord.Utils.UUID.generate()
}
Expand All @@ -27,7 +20,6 @@ async function main() {

// Step 1: Setup Membership
// Setup transaction author account - CORD Account.

console.log(`\n❄️ New Network Member`)
const authorityAuthorIdentity = Cord.Utils.Crypto.makeKeypairFromUri(
process.env.ANCHOR_URI ? process.env.ANCHOR_URI : '//Alice',
Expand All @@ -39,20 +31,12 @@ async function main() {
`🏦 Member (${authorityIdentity.type}): ${authorityIdentity.address}`
)
await addNetworkMember(authorityAuthorIdentity, authorityIdentity.address)
await setRegistrar(authorityAuthorIdentity, authorityIdentity.address)
console.log('✅ Network Authority created!')

// Setup network member account.
const { account: authorIdentity } = await createAccount()
console.log(`🏦 Member (${authorIdentity.type}): ${authorIdentity.address}`)
await addNetworkMember(authorityAuthorIdentity, authorIdentity.address)
console.log(`🔏 Member permissions updated`)
await setIdentity(authorIdentity)
console.log(`🔏 Member identity info updated`)
await requestJudgement(authorIdentity, authorityIdentity.address)
console.log(`🔏 Member identity judgement requested`)
await provideJudgement(authorityIdentity, authorIdentity.address)
console.log(`🔏 Member identity judgement provided`)
console.log('✅ Network Member added!')

// Step 2: Setup Identities
Expand Down