Identity

@baseline-protocol/identity

Baseline core identity package.

Installation

npm install @baseline-protocol/identity(npm package soon to be published)

Building

You can build the package locally with npm run build.

Organization Registry

Each organization registered within the OrgRegistry first generates a secp256k1 keypair and uses the Ethereum public address representation as "primary key" for future resolution. This key SHOULD NOT sign transactions. A best practice is to use an HD wallet to rotate keys, preventing any account from signing more than a single transaction.
Note that an organization may not update its address.
1
struct Org {
2
address orgAddress;
3
bytes32 name;
4
bytes messagingEndpoint;
5
bytes whisperKey;
6
bytes zkpPublicKey;
7
bytes metadata;
8
}
9
10
struct OrgInterfaces {
11
bytes32 groupName;
12
address tokenAddress;
13
address shieldAddress;
14
address verifierAddress;
15
}
16
17
mapping (address => Org) orgMap;
18
mapping (uint => OrgInterfaces) orgInterfaceMap;
19
uint orgInterfaceCount;
20
21
Org[] public orgs;
22
mapping(address => address) managerMap;
23
24
event RegisterOrg(
25
bytes32 _name,
26
address _address,
27
bytes _messagingEndpoint,
28
bytes _whisperKey,
29
bytes _zkpPublicKey,
30
bytes _metadata
31
);
32
33
event UpdateOrg(
34
bytes32 _name,
35
address _address,
36
bytes _messagingEndpoint,
37
bytes _whisperKey,
38
bytes _zkpPublicKey,
39
bytes _metadata
40
);
Copied!
Last modified 9mo ago