-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: DIP provider type definitions (#743)
* Draft PR commit * feat: DID merkle proofs (#744) * Add type definitions for the new dipSender runtime API * Update types with new spec 11000 * Update type definitions * Change keyIds input type * chore: support parties renaming (#751) Rename producer -> provider and receiver -> consumer * chore: update types for additional linked info (#759) Update types * feat: add `dipProvider` pallet for DID extrinsic signing (#764) Add dipProvider pallet for DID extrinsic signing * chore: set package version to 0.33.2-dip-0 * feat: error management (#802) * Error types * Update DIP provider runtime APIs types * Update packages version * feat: add versioning support (#806) * Add version type * Set package versions * Fix identity commitment version type * Update lock file * Changes based on KILTprotocol/kilt-node@1e338a4 * Set version to DIP version * Changes based on KILTprotocol/kilt-node@e23dbcc * Update type definitions * Revert package versions change * Revert yarn.lock changes * Set version to dip-2 * Revert package.json changes * Add runtime calls to Peregrine runtimes
- Loading branch information
Showing
4 changed files
with
132 additions
and
2 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,29 @@ | ||
/** | ||
* Copyright (c) 2018-2023, BOTLabs GmbH. | ||
* | ||
* This source code is licensed under the BSD 4-Clause "Original" license | ||
* found in the LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
import type { DefinitionsCall } from '@polkadot/types/types' | ||
|
||
export const calls: DefinitionsCall = { | ||
DipProvider: [ | ||
{ | ||
methods: { | ||
generate_proof: { | ||
description: | ||
'Generate a Merkle proof for the DIP protocol for the specified request parameters.', | ||
params: [ | ||
{ | ||
name: 'request', | ||
type: 'DipProofRequest', | ||
}, | ||
], | ||
type: 'Result<CompleteMerkleProof, RuntimeApiDipProofError>', | ||
}, | ||
}, | ||
version: 1, | ||
}, | ||
], | ||
} |
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,84 @@ | ||
/** | ||
* Copyright (c) 2018-2023, BOTLabs GmbH. | ||
* | ||
* This source code is licensed under the BSD 4-Clause "Original" license | ||
* found in the LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
import type { RegistryTypes } from '@polkadot/types/types' | ||
|
||
import { types10900 } from './types_10900.js' | ||
|
||
export const types11200: RegistryTypes = { | ||
...types10900, | ||
IdentityCommitmentVersion: 'u16', | ||
// DipProvider state_call | ||
DipProofRequest: { | ||
identifier: 'AccountId32', | ||
version: 'IdentityCommitmentVersion', | ||
keys: 'Vec<Hash>', | ||
accounts: 'Vec<PalletDidLookupLinkableAccountLinkableAccountId>', | ||
shouldIncludeWeb3Name: 'bool', | ||
}, | ||
CompleteMerkleProof: { | ||
root: 'MerkleRoot', | ||
proof: 'MerkleProof', | ||
}, | ||
MerkleRoot: 'Hash', | ||
MerkleProof: { | ||
blinded: 'BlindedLeaves', | ||
revealed: 'RevealedLeaves', | ||
}, | ||
BlindedLeaves: 'Vec<BlindedValue>', | ||
BlindedValue: 'Bytes', | ||
RevealedLeaves: 'Vec<RevealedLeaf>', | ||
RevealedLeaf: { | ||
_enum: { | ||
DidKey: '(DidKeyMerkleKey, DidKeyMerkleValue)', | ||
Web3Name: '(Web3NameMerkleKey, Web3NameMerkleValue)', | ||
LinkedAccount: '(LinkedAccountMerkleKey, LinkedAccountMerkleValue)', | ||
}, | ||
}, | ||
DidKeyMerkleKey: '(KeyId, KeyRelationship)', | ||
KeyId: 'Hash', | ||
KeyRelationship: { | ||
_enum: { | ||
Encryption: 'Null', | ||
Verification: 'VerificationRelationship', | ||
}, | ||
}, | ||
VerificationRelationship: { | ||
_enum: [ | ||
'Authentication', | ||
'CapabilityDelegation', | ||
'CapabilityInvocation', | ||
'AssertionMethod', | ||
], | ||
}, | ||
DidKeyMerkleValue: 'DidDidDetailsDidPublicKeyDetails', | ||
Web3NameMerkleKey: 'Text', | ||
Web3NameMerkleValue: 'BlockNumber', | ||
LinkedAccountMerkleKey: 'PalletDidLookupLinkableAccountLinkableAccountId', | ||
LinkedAccountMerkleValue: 'Null', | ||
RuntimeApiDipProofError: { | ||
_enum: { | ||
IdentityProvider: 'LinkedDidIdentityProviderError', | ||
MerkleProof: 'DidMerkleProofError', | ||
}, | ||
}, | ||
LinkedDidIdentityProviderError: { | ||
_enum: ['DidNotFound', 'DidDeleted', 'Internal'], | ||
}, | ||
DidIdentityProviderError: { | ||
_enum: ['DidNotFound', 'Internal'], | ||
}, | ||
DidMerkleProofError: { | ||
_enum: [ | ||
'UnsupportedVersion', | ||
'KeyNotFound', | ||
'LinkedAccountNotFound', | ||
'Web3NameNotFound', | ||
'Internal', | ||
], | ||
}, | ||
} |