Skip to content

Commit

Permalink
chore: update abi interfaces for public directory/chain of trust v1 c…
Browse files Browse the repository at this point in the history
…ontracts - update identity library version
  • Loading branch information
eum602 committed Jul 29, 2023
1 parent 0588d64 commit 30a0e7f
Show file tree
Hide file tree
Showing 9 changed files with 120 additions and 64 deletions.
4 changes: 2 additions & 2 deletions .example.env
Original file line number Diff line number Diff line change
Expand Up @@ -80,5 +80,5 @@ SECP256K1_SIGN_ETHEREUM_TRANSACTION=/secp256k1/sign/ethereum-tx
SECP256K1_SIGN_LACCHAIN_TRANSACTION=/secp256k1/sign/lacchain-tx

# Core business variables for this repo
# PUBLIC_DIRECTORY_CONTRACT_ADDRESS = '0xA4C2dAFD7eaE7CBe86EB6bf9f3b842C3df2607C0' # optional. There is a hardcoded value in the souce code
# CHAIN_OF_TRUST_CONTRACT_ADDRESS = '0xEBB6854aa875867f684dd1d2338eC20908039c67' # optional. There is a hardcoded value in the souce code
# PUBLIC_DIRECTORY_CONTRACT_ADDRESS = '0x6D6832304795C5f2D554c8877BFA07DD8d78A80F' # 20/06/2024 optional. There is a hardcoded value in the souce code
# CHAIN_OF_TRUST_CONTRACT_ADDRESS = '0x25a64325d73cB7226EBcC390600ccB6a7557e4f1' # optional. There is a hardcoded value in the souce code
4 changes: 2 additions & 2 deletions .example.env.dev
Original file line number Diff line number Diff line change
Expand Up @@ -79,5 +79,5 @@ SECP256K1_SIGN_ETHEREUM_TRANSACTION=/secp256k1/sign/ethereum-tx
SECP256K1_SIGN_LACCHAIN_TRANSACTION=/secp256k1/sign/lacchain-tx

# Core business variables for this repo
# PUBLIC_DIRECTORY_CONTRACT_ADDRESS = '0xA4C2dAFD7eaE7CBe86EB6bf9f3b842C3df2607C0' # optional. There is a hardcoded value in the souce code
# CHAIN_OF_TRUST_CONTRACT_ADDRESS = '0xEBB6854aa875867f684dd1d2338eC20908039c67' # optional. There is a hardcoded value in the souce code
# PUBLIC_DIRECTORY_CONTRACT_ADDRESS = '0x6D6832304795C5f2D554c8877BFA07DD8d78A80F' # 20/06/2024 optional. There is a hardcoded value in the souce code
# CHAIN_OF_TRUST_CONTRACT_ADDRESS = '0x25a64325d73cB7226EBcC390600ccB6a7557e4f1' # optional. There is a hardcoded value in the souce code
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lacpass-chain-of-trust",
"version": "0.0.9",
"version": "0.0.11",
"description": "Rest api for laccpass Chain Of Trust built on top of Lacchain",
"main": "dist/src/index.js",
"types": "dist/src/index.d.ts",
Expand Down Expand Up @@ -85,7 +85,7 @@
"express-rate-limit": "^6.3.0",
"helmet": "^5.0.2",
"jsonwebtoken": "^9.0.0",
"lacpass-identity": "^0.0.25",
"lacpass-identity": "^0.0.26",
"morgan": "^1.10.0",
"multer": "^1.4.4",
"nodemailer": "^6.7.3",
Expand Down
2 changes: 1 addition & 1 deletion src/config/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CHAIN_OF_TRUST } from '@constants/lacchain/chain.of.trust.address';
import { CHAIN_OF_TRUST } from '../constants/lacchain/chain.of.trust.address';
import { PUBLIC_DIRECTORY } from '../constants/lacchain/public.directory.address';
import { randomUUID } from 'crypto';
import { config } from 'dotenv';
Expand Down
68 changes: 38 additions & 30 deletions src/constants/lacchain/chain.of.trust.abi.ts
Original file line number Diff line number Diff line change
@@ -1,39 +1,16 @@
export const CHAIN_OF_TRUST_ABI = [
{
anonymous: false,
inputs: [
{
internalType: 'address',
name: 'trustedForwarderAddress',
type: 'address'
},
{
internalType: 'uint8',
name: 'chainDepth',
type: 'uint8'
},
{
internalType: 'string',
name: 'did',
type: 'string'
},
{
internalType: 'address',
name: 'rootEntityManager',
type: 'address'
},
{
internalType: 'uint8',
name: 'revokeMode',
type: 'uint8'
},
{
internalType: 'bool',
name: 'rootMaintainer',
type: 'bool'
indexed: false,
internalType: 'uint256',
name: 'contractPrevBlock',
type: 'uint256'
}
],
stateMutability: 'nonpayable',
type: 'constructor'
name: 'ContractChange',
type: 'event'
},
{
anonymous: false,
Expand Down Expand Up @@ -171,6 +148,19 @@ export const CHAIN_OF_TRUST_ABI = [
name: 'GroupMemberRevoked',
type: 'event'
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: 'uint8',
name: 'version',
type: 'uint8'
}
],
name: 'Initialized',
type: 'event'
},
{
anonymous: false,
inputs: [
Expand Down Expand Up @@ -560,6 +550,11 @@ export const CHAIN_OF_TRUST_ABI = [
internalType: 'address',
name: 'newRootManager',
type: 'address'
},
{
internalType: 'string',
name: 'did',
type: 'string'
}
],
name: 'transferRoot',
Expand Down Expand Up @@ -666,5 +661,18 @@ export const CHAIN_OF_TRUST_ABI = [
outputs: [],
stateMutability: 'nonpayable',
type: 'function'
},
{
inputs: [],
name: 'version',
outputs: [
{
internalType: 'uint16',
name: '',
type: 'uint16'
}
],
stateMutability: 'view',
type: 'function'
}
];
2 changes: 1 addition & 1 deletion src/constants/lacchain/chain.of.trust.address.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export const CHAIN_OF_TRUST: Map<string, string> = new Map<string, string>();
CHAIN_OF_TRUST.set('0x9e55c', '0xEBB6854aa875867f684dd1d2338eC20908039c67');
CHAIN_OF_TRUST.set('0x9e55c', '0x25a64325d73cB7226EBcC390600ccB6a7557e4f1');
76 changes: 63 additions & 13 deletions src/constants/lacchain/public.directory.abi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,19 @@ export const PUBLIC_DIRECTORY_ABI = [
name: 'CoTChange',
type: 'event'
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: 'uint256',
name: 'contractPrevBlock',
type: 'uint256'
}
],
name: 'ContractChange',
type: 'event'
},
{
anonymous: false,
inputs: [
Expand Down Expand Up @@ -293,6 +306,38 @@ export const PUBLIC_DIRECTORY_ABI = [
stateMutability: 'nonpayable',
type: 'function'
},
{
inputs: [
{
internalType: 'uint256',
name: '',
type: 'uint256'
}
],
name: 'changed',
outputs: [
{
internalType: 'uint256',
name: '',
type: 'uint256'
}
],
stateMutability: 'view',
type: 'function'
},
{
inputs: [],
name: 'contractPrevBlock',
outputs: [
{
internalType: 'uint256',
name: '',
type: 'uint256'
}
],
stateMutability: 'view',
type: 'function'
},
{
inputs: [
{
Expand Down Expand Up @@ -368,6 +413,11 @@ export const PUBLIC_DIRECTORY_ABI = [
name: 'memberData',
type: 'tuple'
},
{
internalType: 'uint256',
name: 'lastBlockChange',
type: 'uint256'
},
{
internalType: 'uint256',
name: 'memberId',
Expand Down Expand Up @@ -498,19 +548,6 @@ export const PUBLIC_DIRECTORY_ABI = [
stateMutability: 'view',
type: 'function'
},
{
inputs: [],
name: 'prevBlock',
outputs: [
{
internalType: 'uint256',
name: '',
type: 'uint256'
}
],
stateMutability: 'view',
type: 'function'
},
{
inputs: [],
name: 'proxiableUUID',
Expand Down Expand Up @@ -627,5 +664,18 @@ export const PUBLIC_DIRECTORY_ABI = [
outputs: [],
stateMutability: 'payable',
type: 'function'
},
{
inputs: [],
name: 'version',
outputs: [
{
internalType: 'uint16',
name: '',
type: 'uint16'
}
],
stateMutability: 'view',
type: 'function'
}
];
2 changes: 1 addition & 1 deletion src/constants/lacchain/public.directory.address.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export const PUBLIC_DIRECTORY: Map<string, string> = new Map<string, string>();
PUBLIC_DIRECTORY.set('0x9e55c', '0x4A1bD1198890af301AF9b6F3a3a11952a86C1c8e');
PUBLIC_DIRECTORY.set('0x9e55c', '0x6D6832304795C5f2D554c8877BFA07DD8d78A80F');
22 changes: 10 additions & 12 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2477,13 +2477,6 @@ caseless@~0.12.0:
resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc"
integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=

cbor@^8.1.0:
version "8.1.0"
resolved "https://registry.yarnpkg.com/cbor/-/cbor-8.1.0.tgz#cfc56437e770b73417a2ecbfc9caf6b771af60d5"
integrity sha512-DwGjNW9omn6EwP70aXsn7FQJx5kO12tX0bZkaTjzdVFM6/7nhA4t0EENocKGx6D2Bch9PE2KzCUf5SceBdeijg==
dependencies:
nofilter "^3.1.0"

cbor@^9.0.0:
version "9.0.0"
resolved "https://registry.yarnpkg.com/cbor/-/cbor-9.0.0.tgz#0e0eb623f076d41fafc6a7360b664153e2f1473c"
Expand Down Expand Up @@ -5393,6 +5386,11 @@ [email protected]:
resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.0.tgz#5b1f397afc75d677bde8bcfc0e47e1f9a3d9a898"
integrity sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=

json-canonicalize@^1.0.6:
version "1.0.6"
resolved "https://registry.yarnpkg.com/json-canonicalize/-/json-canonicalize-1.0.6.tgz#c63dc9b909db322fec058320a0f81aef6569b257"
integrity sha512-kP2iYpOS5SZHYhIaR1t9oG80d4uTY3jPoaBj+nimy3njtJk8+sRsVatN8pyJRDRtk9Su3+6XqA2U8k0dByJBUQ==

json-parse-even-better-errors@^2.3.0:
version "2.3.1"
resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d"
Expand Down Expand Up @@ -5600,17 +5598,16 @@ koa@^2.8.2:
type-is "^1.6.16"
vary "^1.1.2"

lacpass-identity@^0.0.25:
version "0.0.25"
resolved "https://registry.yarnpkg.com/lacpass-identity/-/lacpass-identity-0.0.25.tgz#b7f2097ea89384745375d890b364e68019201697"
integrity sha512-SoMJbErLpbAt6eWMa2OD+nrPz29UaW5OXyposJgb04slg+m5UArk21EXqZ+AcRUEuf1nx+PhRSQPYOYFFEenPg==
lacpass-identity@^0.0.26:
version "0.0.26"
resolved "https://registry.yarnpkg.com/lacpass-identity/-/lacpass-identity-0.0.26.tgz#2e068482a85d93c4480aca6e3e414cdf0a38a2c1"
integrity sha512-Bj4zL/+DTf9YQzmZpRJb3d49dfjmGwq/ob7dYZyNC0R+GoudxoTO95eCZ6OMRXoZqJ97VuadLMaZ+wOZDrjOog==
dependencies:
"@lacchain/gas-model-provider" "^1.0.1"
aws-sdk "^2.1116.0"
base-x "^4.0.0"
bcrypt "^5.1.0"
body-parser "^1.20.0"
cbor "^8.1.0"
class-transformer "^0.5.1"
class-validator "^0.12.2"
class-validator-jsonschema "^2.2.0"
Expand All @@ -5621,6 +5618,7 @@ lacpass-identity@^0.0.25:
express-formidable "^1.2.0"
express-rate-limit "^6.3.0"
helmet "^5.0.2"
json-canonicalize "^1.0.6"
jsonwebtoken "^9.0.0"
lacpass-key-manager "^0.0.17"
morgan "^1.10.0"
Expand Down

0 comments on commit 30a0e7f

Please sign in to comment.