Skip to content

Commit

Permalink
feat!: rename DidDetails to DidDocument (#620)
Browse files Browse the repository at this point in the history
  • Loading branch information
arty-name authored Sep 6, 2022
1 parent ddcf632 commit ccb8475
Show file tree
Hide file tree
Showing 45 changed files with 565 additions and 591 deletions.
6 changes: 3 additions & 3 deletions packages/core/src/__integrationtests__/AccountLinking.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
} from '@kiltprotocol/testing'
import { ss58Format } from '@kiltprotocol/utils'
import type {
DidDetails,
DidDocument,
KeyringPair,
KiltKeyringPair,
} from '@kiltprotocol/types'
Expand Down Expand Up @@ -46,9 +46,9 @@ beforeAll(async () => {
}, 40_000)

describe('When there is an on-chain DID', () => {
let did: DidDetails
let did: DidDocument
let didKey: KeyTool
let newDid: DidDetails
let newDid: DidDocument
let newDidKey: KeyTool

describe('and a tx sender willing to link its account', () => {
Expand Down
8 changes: 4 additions & 4 deletions packages/core/src/__integrationtests__/Attestation.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*/

import type {
DidDetails,
DidDocument,
IAttestation,
ICredential,
KiltKeyringPair,
Expand All @@ -37,13 +37,13 @@ import {
} from './utils'

let tokenHolder: KiltKeyringPair
let attester: DidDetails
let attester: DidDocument
let attesterKey: KeyTool

let anotherAttester: DidDetails
let anotherAttester: DidDocument
let anotherAttesterKey: KeyTool

let claimer: DidDetails
let claimer: DidDocument
let claimerKey: KeyTool

beforeAll(async () => {
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/__integrationtests__/Ctypes.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* @group integration/ctype
*/

import { DidDetails, ICType, KiltKeyringPair } from '@kiltprotocol/types'
import { DidDocument, ICType, KiltKeyringPair } from '@kiltprotocol/types'
import * as Did from '@kiltprotocol/did'
import {
createFullDidFromSeed,
Expand All @@ -31,7 +31,7 @@ beforeAll(async () => {
}, 30_000)

describe('When there is an CtypeCreator and a verifier', () => {
let ctypeCreator: DidDetails
let ctypeCreator: DidDocument
let paymentAccount: KiltKeyringPair
let ctypeCounter = 0
let key: KeyTool
Expand Down
20 changes: 10 additions & 10 deletions packages/core/src/__integrationtests__/Delegation.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*/

import type {
DidDetails,
DidDocument,
ICType,
IDelegationNode,
KiltKeyringPair,
Expand Down Expand Up @@ -44,17 +44,17 @@ import {
} from '../delegation/DelegationNode.chain'

let paymentAccount: KiltKeyringPair
let root: DidDetails
let root: DidDocument
let rootKey: KeyTool

let claimer: DidDetails
let claimer: DidDocument
let claimerKey: KeyTool

let attester: DidDetails
let attester: DidDocument
let attesterKey: KeyTool

async function writeHierarchy(
delegator: DidDetails,
delegator: DidDocument,
ctypeHash: ICType['hash'],
sign: SignCallback
): Promise<DelegationNode> {
Expand All @@ -79,8 +79,8 @@ async function writeHierarchy(
async function addDelegation(
hierarchyId: IDelegationNode['id'],
parentId: DelegationNode['id'],
delegator: DidDetails,
delegate: DidDetails,
delegator: DidDocument,
delegate: DidDocument,
delegatorSign: SignCallback,
delegateSign: SignCallback,
permissions: PermissionType[] = [Permission.ATTEST, Permission.DELEGATE]
Expand Down Expand Up @@ -226,11 +226,11 @@ describe('and attestation rights have been delegated', () => {
})

describe('revocation', () => {
let delegator: DidDetails
let delegator: DidDocument
let delegatorSign: SignCallback
let firstDelegate: DidDetails
let firstDelegate: DidDocument
let firstDelegateSign: SignCallback
let secondDelegate: DidDetails
let secondDelegate: DidDocument
let secondDelegateSign: SignCallback

beforeAll(() => {
Expand Down
34 changes: 17 additions & 17 deletions packages/core/src/__integrationtests__/Deposit.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
makeSigningKeyTool,
} from '@kiltprotocol/testing'
import {
DidDetails,
DidDocument,
IAttestation,
ICredential,
KeyringPair,
Expand Down Expand Up @@ -51,7 +51,7 @@ let storedEndpointsCount: BN

async function checkDeleteFullDid(
identity: KiltKeyringPair,
fullDid: DidDetails,
fullDid: DidDocument,
sign: SignCallback
): Promise<boolean> {
storedEndpointsCount = await Did.Chain.queryEndpointsCounts(fullDid.uri)
Expand All @@ -75,7 +75,7 @@ async function checkDeleteFullDid(

async function checkReclaimFullDid(
identity: KeyringPair,
fullDid: DidDetails
fullDid: DidDocument
): Promise<boolean> {
storedEndpointsCount = await Did.Chain.queryEndpointsCounts(fullDid.uri)
tx = await Did.Chain.getReclaimDepositExtrinsic(
Expand All @@ -99,7 +99,7 @@ async function checkReclaimFullDid(

async function checkRemoveFullDidAttestation(
identity: KiltKeyringPair,
fullDid: DidDetails,
fullDid: DidDocument,
sign: SignCallback,
credential: ICredential
): Promise<boolean> {
Expand Down Expand Up @@ -142,7 +142,7 @@ async function checkRemoveFullDidAttestation(

async function checkReclaimFullDidAttestation(
identity: KiltKeyringPair,
fullDid: DidDetails,
fullDid: DidDocument,
sign: SignCallback,
credential: ICredential
): Promise<boolean> {
Expand Down Expand Up @@ -179,7 +179,7 @@ async function checkReclaimFullDidAttestation(

async function checkDeletedDidReclaimAttestation(
identity: KiltKeyringPair,
fullDid: DidDetails,
fullDid: DidDocument,
sign: SignCallback,
credential: ICredential
): Promise<void> {
Expand Down Expand Up @@ -211,7 +211,7 @@ async function checkDeletedDidReclaimAttestation(

async function checkWeb3Deposit(
identity: KiltKeyringPair,
fullDid: DidDetails,
fullDid: DidDocument,
sign: SignCallback
): Promise<boolean> {
const web3Name = 'test-web3name'
Expand Down Expand Up @@ -306,16 +306,16 @@ beforeAll(async () => {
}, 120_000)

describe('Different deposits scenarios', () => {
let testFullDidOne: DidDetails
let testFullDidTwo: DidDetails
let testFullDidThree: DidDetails
let testFullDidFour: DidDetails
let testFullDidFive: DidDetails
let testFullDidSix: DidDetails
let testFullDidSeven: DidDetails
let testFullDidEight: DidDetails
let testFullDidNine: DidDetails
let testFullDidTen: DidDetails
let testFullDidOne: DidDocument
let testFullDidTwo: DidDocument
let testFullDidThree: DidDocument
let testFullDidFour: DidDocument
let testFullDidFive: DidDocument
let testFullDidSix: DidDocument
let testFullDidSeven: DidDocument
let testFullDidEight: DidDocument
let testFullDidNine: DidDocument
let testFullDidTen: DidDocument

beforeAll(async () => {
const testDidFive = await createMinimalLightDidFromKeypair(keys[4].keypair)
Expand Down
Loading

0 comments on commit ccb8475

Please sign in to comment.