@ayanworks/polygon-did-registry-contract 2.0.1-alpha.8 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Apache License
1
+ Apache License
2
2
  Version 2.0, January 2004
3
3
  http://www.apache.org/licenses/
4
4
 
@@ -186,7 +186,7 @@
186
186
  same "printed page" as the copyright notice for easier
187
187
  identification within third-party archives.
188
188
 
189
- Copyright 2022 AyanWorks
189
+ Copyright [yyyy] [name of copyright owner]
190
190
 
191
191
  Licensed under the Apache License, Version 2.0 (the "License");
192
192
  you may not use this file except in compliance with the License.
@@ -198,4 +198,4 @@
198
198
  distributed under the License is distributed on an "AS IS" BASIS,
199
199
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
200
  See the License for the specific language governing permissions and
201
- limitations under the License.
201
+ limitations under the License.
@@ -0,0 +1,42 @@
1
+ //#region artifacts/contracts/PolygonDidRegistry.sol/PolygonDidRegistry.json.d.ts
2
+ declare let _format: string;
3
+ declare let contractName: string;
4
+ declare let sourceName: string;
5
+ declare let abi: ({
6
+ anonymous: boolean;
7
+ inputs: {
8
+ indexed: boolean;
9
+ internalType: string;
10
+ name: string;
11
+ type: string;
12
+ }[];
13
+ name: string;
14
+ type: string;
15
+ outputs?: undefined;
16
+ stateMutability?: undefined;
17
+ } | {
18
+ inputs: {
19
+ internalType: string;
20
+ name: string;
21
+ type: string;
22
+ }[];
23
+ name: string;
24
+ outputs: {
25
+ internalType: string;
26
+ name: string;
27
+ type: string;
28
+ }[];
29
+ stateMutability: string;
30
+ type: string;
31
+ anonymous?: undefined;
32
+ })[];
33
+ declare let bytecode: string;
34
+ declare let deployedBytecode: string;
35
+ declare let linkReferences: {};
36
+ declare let deployedLinkReferences: {};
37
+ declare namespace __json_default_export {
38
+ export { _format, contractName, sourceName, abi, bytecode, deployedBytecode, linkReferences, deployedLinkReferences };
39
+ }
40
+ //#endregion
41
+ export { __json_default_export };
42
+ //# sourceMappingURL=PolygonDidRegistry.json.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PolygonDidRegistry.json.d.mts","names":["_format","contractName","sourceName","abi","anonymous","inputs","indexed","internalType","name","type","outputs","stateMutability","bytecode","deployedBytecode","linkReferences","deployedLinkReferences","__json_default_export","default"],"sources":["../../../../artifacts/contracts/PolygonDidRegistry.sol/PolygonDidRegistry.json.d.ts"],"mappings":";YAAWA,OAAAA;AAAAA,YACAC,YAAAA;AAAAA,YACAC,UAAAA;AAAAA,YACAC,GAAAA;EACPC,SAAAA;EACAC,MAAAA;IACIC,OAAAA;IACAC,YAAAA;IACAC,IAAAA;IACAC,IAAAA;EAAAA;EAEJD,IAAAA;EACAC,IAAAA;EACAC,OAAAA;EACAC,eAAAA;AAAAA;EAEAN,MAAAA;IACIE,YAAAA;IACAC,IAAAA;IACAC,IAAAA;EAAAA;EAEJD,IAAAA;EACAE,OAAAA;IACIH,YAAAA;IACAC,IAAAA;IACAC,IAAAA;EAAAA;EAEJE,eAAAA;EACAF,IAAAA;EACAL,SAAAA;AAAAA;AAAAA,YAEOQ,QAAAA;AAAAA,YACAC,gBAAAA;AAAAA,YACAC,cAAAA;AAAAA,YACAC,sBAAAA;AAAAA,kBAEOC,qBAAAA;EAAAA,SACPhB,OAAAA,EAASC,YAAAA,EAAcC,UAAAA,EAAYC,GAAAA,EAAKS,QAAAA,EAAUC,gBAAAA,EAAkBC,cAAAA,EAAgBC,sBAAAA;AAAAA"}
@@ -0,0 +1,281 @@
1
+ //#region artifacts/contracts/PolygonDidRegistry.sol/PolygonDidRegistry.json
2
+ var PolygonDidRegistry_default = {
3
+ _format: "hh-sol-artifact-1",
4
+ contractName: "PolygonDidRegistry",
5
+ sourceName: "contracts/PolygonDidRegistry.sol",
6
+ abi: [
7
+ {
8
+ "anonymous": false,
9
+ "inputs": [{
10
+ "indexed": false,
11
+ "internalType": "address",
12
+ "name": "id",
13
+ "type": "address"
14
+ }, {
15
+ "indexed": false,
16
+ "internalType": "string",
17
+ "name": "doc",
18
+ "type": "string"
19
+ }],
20
+ "name": "DIDCreated",
21
+ "type": "event"
22
+ },
23
+ {
24
+ "anonymous": false,
25
+ "inputs": [{
26
+ "indexed": false,
27
+ "internalType": "address",
28
+ "name": "id",
29
+ "type": "address"
30
+ }, {
31
+ "indexed": false,
32
+ "internalType": "string",
33
+ "name": "doc",
34
+ "type": "string"
35
+ }],
36
+ "name": "DIDUpdated",
37
+ "type": "event"
38
+ },
39
+ {
40
+ "anonymous": false,
41
+ "inputs": [
42
+ {
43
+ "indexed": false,
44
+ "internalType": "address",
45
+ "name": "_id",
46
+ "type": "address"
47
+ },
48
+ {
49
+ "indexed": false,
50
+ "internalType": "string",
51
+ "name": "_resourceId",
52
+ "type": "string"
53
+ },
54
+ {
55
+ "indexed": false,
56
+ "internalType": "string",
57
+ "name": "_resourcePayload",
58
+ "type": "string"
59
+ }
60
+ ],
61
+ "name": "ResourceAdded",
62
+ "type": "event"
63
+ },
64
+ {
65
+ "anonymous": false,
66
+ "inputs": [{
67
+ "indexed": false,
68
+ "internalType": "address",
69
+ "name": "newOwner",
70
+ "type": "address"
71
+ }],
72
+ "name": "TransferOwnership",
73
+ "type": "event"
74
+ },
75
+ {
76
+ "inputs": [
77
+ {
78
+ "internalType": "address",
79
+ "name": "_id",
80
+ "type": "address"
81
+ },
82
+ {
83
+ "internalType": "string",
84
+ "name": "_resourceId",
85
+ "type": "string"
86
+ },
87
+ {
88
+ "internalType": "string",
89
+ "name": "_resourcePayload",
90
+ "type": "string"
91
+ }
92
+ ],
93
+ "name": "addResource",
94
+ "outputs": [
95
+ {
96
+ "internalType": "address",
97
+ "name": "",
98
+ "type": "address"
99
+ },
100
+ {
101
+ "internalType": "string",
102
+ "name": "",
103
+ "type": "string"
104
+ },
105
+ {
106
+ "internalType": "string",
107
+ "name": "",
108
+ "type": "string"
109
+ }
110
+ ],
111
+ "stateMutability": "nonpayable",
112
+ "type": "function"
113
+ },
114
+ {
115
+ "inputs": [{
116
+ "internalType": "address",
117
+ "name": "_id",
118
+ "type": "address"
119
+ }, {
120
+ "internalType": "string",
121
+ "name": "_doc",
122
+ "type": "string"
123
+ }],
124
+ "name": "createDID",
125
+ "outputs": [
126
+ {
127
+ "internalType": "address",
128
+ "name": "controller",
129
+ "type": "address"
130
+ },
131
+ {
132
+ "internalType": "uint256",
133
+ "name": "created",
134
+ "type": "uint256"
135
+ },
136
+ {
137
+ "internalType": "uint256",
138
+ "name": "updated",
139
+ "type": "uint256"
140
+ },
141
+ {
142
+ "internalType": "string",
143
+ "name": "didDoc",
144
+ "type": "string"
145
+ }
146
+ ],
147
+ "stateMutability": "nonpayable",
148
+ "type": "function"
149
+ },
150
+ {
151
+ "inputs": [{
152
+ "internalType": "address",
153
+ "name": "_id",
154
+ "type": "address"
155
+ }],
156
+ "name": "getAllResources",
157
+ "outputs": [{
158
+ "internalType": "string[]",
159
+ "name": "",
160
+ "type": "string[]"
161
+ }],
162
+ "stateMutability": "view",
163
+ "type": "function"
164
+ },
165
+ {
166
+ "inputs": [{
167
+ "internalType": "address",
168
+ "name": "_id",
169
+ "type": "address"
170
+ }],
171
+ "name": "getDIDDoc",
172
+ "outputs": [{
173
+ "internalType": "string",
174
+ "name": "",
175
+ "type": "string"
176
+ }, {
177
+ "internalType": "string[]",
178
+ "name": "",
179
+ "type": "string[]"
180
+ }],
181
+ "stateMutability": "view",
182
+ "type": "function"
183
+ },
184
+ {
185
+ "inputs": [],
186
+ "name": "getOwner",
187
+ "outputs": [{
188
+ "internalType": "address",
189
+ "name": "_owner",
190
+ "type": "address"
191
+ }],
192
+ "stateMutability": "view",
193
+ "type": "function"
194
+ },
195
+ {
196
+ "inputs": [{
197
+ "internalType": "address",
198
+ "name": "_id",
199
+ "type": "address"
200
+ }, {
201
+ "internalType": "string",
202
+ "name": "_resourceId",
203
+ "type": "string"
204
+ }],
205
+ "name": "getResource",
206
+ "outputs": [{
207
+ "internalType": "string",
208
+ "name": "",
209
+ "type": "string"
210
+ }],
211
+ "stateMutability": "view",
212
+ "type": "function"
213
+ },
214
+ {
215
+ "inputs": [],
216
+ "name": "initialize",
217
+ "outputs": [],
218
+ "stateMutability": "nonpayable",
219
+ "type": "function"
220
+ },
221
+ {
222
+ "inputs": [{
223
+ "internalType": "address",
224
+ "name": "_newOwner",
225
+ "type": "address"
226
+ }],
227
+ "name": "transferOwnership",
228
+ "outputs": [{
229
+ "internalType": "string",
230
+ "name": "",
231
+ "type": "string"
232
+ }],
233
+ "stateMutability": "nonpayable",
234
+ "type": "function"
235
+ },
236
+ {
237
+ "inputs": [{
238
+ "internalType": "address",
239
+ "name": "_id",
240
+ "type": "address"
241
+ }, {
242
+ "internalType": "string",
243
+ "name": "_doc",
244
+ "type": "string"
245
+ }],
246
+ "name": "updateDIDDoc",
247
+ "outputs": [
248
+ {
249
+ "internalType": "address",
250
+ "name": "controller",
251
+ "type": "address"
252
+ },
253
+ {
254
+ "internalType": "uint256",
255
+ "name": "created",
256
+ "type": "uint256"
257
+ },
258
+ {
259
+ "internalType": "uint256",
260
+ "name": "updated",
261
+ "type": "uint256"
262
+ },
263
+ {
264
+ "internalType": "string",
265
+ "name": "didDoc",
266
+ "type": "string"
267
+ }
268
+ ],
269
+ "stateMutability": "nonpayable",
270
+ "type": "function"
271
+ }
272
+ ],
273
+ bytecode: "0x608060405234801561001057600080fd5b506113f7806100206000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c8063893d20e811610066578063893d20e814610110578063b77975271461012b578063c02d8e901461014c578063d4b9d14a1461016c578063f2fde38b1461017f57600080fd5b80630b50af3a1461009857806334303fc7146100c357806363d61166146100e35780638129fc1c14610106575b600080fd5b6100ab6100a6366004610ebb565b610192565b6040516100ba93929190610f7f565b60405180910390f35b6100d66100d1366004610fbf565b610338565b6040516100ba919061100d565b6100f66100f1366004610fbf565b610402565b6040516100ba9493929190611027565b61010e610607565b005b6000546040516001600160a01b0390911681526020016100ba565b61013e610139366004611054565b6106d7565b6040516100ba9291906110c7565b61015f61015a366004611054565b61092e565b6040516100ba91906110f5565b6100f661017a366004610fbf565b610ad6565b6100d661018d366004611054565b610c6b565b6001600160a01b038084166000908152600160205260408120549091606091829187911633146101dd5760405162461bcd60e51b81526004016101d490611108565b60405180910390fd5b6001600160a01b03871661022e5760405162461bcd60e51b8152602060048201526018602482015277125b9d985b1a59081859191c995cdcc81c1c9bdd9a59195960421b60448201526064016101d4565b6001600160a01b03871660009081526002602052604090819020905161025590889061115b565b9081526020016040518091039020805461026e90611177565b90506000036102ab576001600160a01b0387166000908152600360209081526040822080546001810182559083529120016102a98782611200565b505b6001600160a01b0387166000908152600260205260409081902090518691906102d590899061115b565b908152602001604051809103902090816102ef9190611200565b507f3ca597429c9c2c28edc44f100c640f078525bd8c70c80e6123233864b6d604e087878760405161032393929190610f7f565b60405180910390a15094959394509192915050565b6001600160a01b0382166000908152600260205260409081902090516060919061036390849061115b565b9081526020016040518091039020805461037c90611177565b80601f01602080910402602001604051908101604052809291908181526020018280546103a890611177565b80156103f55780601f106103ca576101008083540402835291602001916103f5565b820191906000526020600020905b8154815290600101906020018083116103d857829003601f168201915b5050505050905092915050565b6000808060606001600160a01b0386166104595760405162461bcd60e51b8152602060048201526018602482015277125b9d985b1a59081859191c995cdcc81c1c9bdd9a59195960421b60448201526064016101d4565b6001600160a01b03808716600081815260016020526040902054909116036104b75760405162461bcd60e51b815260206004820152601160248201527011125108185b1c9958591e48195e1a5cdd607a1b60448201526064016101d4565b6001600160a01b038616600081815260016020819052604090912080546001600160a01b03191690921782554290820181905560028201556003016104fc8682611200565b507f1b7934654ba536b6962955e057ce42885353bbaad8c605a5ce0678e632f28410868660405161052e9291906112c0565b60405180910390a16001600160a01b03808716600090815260016020819052604090912080549181015460028201546003909201805493909416939092819061057690611177565b80601f01602080910402602001604051908101604052809291908181526020018280546105a290611177565b80156105ef5780601f106105c4576101008083540402835291602001916105ef565b820191906000526020600020905b8154815290600101906020018083116105d257829003601f168201915b50505050509050935093509350935092959194509250565b60045460ff16156106715760405162461bcd60e51b815260206004820152602e60248201527f436f6e747261637420696e7374616e63652068617320616c726561647920626560448201526d195b881a5b9a5d1a585b1a5e995960921b60648201526084016101d4565b6004805460ff19166001179055336106c35760405162461bcd60e51b8152602060048201526015602482015274496e76616c6964206f776e6572206164647265737360581b60448201526064016101d4565b600080546001600160a01b03191633179055565b6001600160a01b038116600090815260036020526040812054606091829167ffffffffffffffff81111561070d5761070d610e18565b60405190808252806020026020018201604052801561074057816020015b606081526020019060019003908161072b5790505b50905060005b6001600160a01b038516600090815260036020526040902054811015610879576001600160a01b0385166000908152600260209081526040808320600390925290912080548390811061079b5761079b6112ec565b906000526020600020016040516107b29190611302565b908152602001604051809103902080546107cb90611177565b80601f01602080910402602001604051908101604052809291908181526020018280546107f790611177565b80156108445780601f1061081957610100808354040283529160200191610844565b820191906000526020600020905b81548152906001019060200180831161082757829003601f168201915b505050505082828151811061085b5761085b6112ec565b6020026020010181905250808061087190611378565b915050610746565b506001600160a01b03841660009081526001602052604090206003018054829082906108a490611177565b80601f01602080910402602001604051908101604052809291908181526020018280546108d090611177565b801561091d5780601f106108f25761010080835404028352916020019161091d565b820191906000526020600020905b81548152906001019060200180831161090057829003601f168201915b505050505091509250925050915091565b6001600160a01b0381166000908152600360205260408120546060919067ffffffffffffffff81111561096357610963610e18565b60405190808252806020026020018201604052801561099657816020015b60608152602001906001900390816109815790505b50905060005b6001600160a01b038416600090815260036020526040902054811015610acf576001600160a01b038416600090815260026020908152604080832060039092529091208054839081106109f1576109f16112ec565b90600052602060002001604051610a089190611302565b90815260200160405180910390208054610a2190611177565b80601f0160208091040260200160405190810160405280929190818152602001828054610a4d90611177565b8015610a9a5780601f10610a6f57610100808354040283529160200191610a9a565b820191906000526020600020905b815481529060010190602001808311610a7d57829003601f168201915b5050505050828281518110610ab157610ab16112ec565b60200260200101819052508080610ac790611378565b91505061099c565b5092915050565b6001600160a01b038083166000908152600160205260408120549091829182916060918791163314610b1a5760405162461bcd60e51b81526004016101d490611108565b6001600160a01b0387166000908152600160205260409020600301610b3f8782611200565b506001600160a01b0387166000908152600160205260409081902042600290910155517fa0016473004b22caf3cbe32658844f4dfe20b54f72612d0ea625cc07ca3a192b90610b9190899089906112c0565b60405180910390a16001600160a01b038088166000908152600160208190526040909120805491810154600282015460039092018054939094169390928190610bd990611177565b80601f0160208091040260200160405190810160405280929190818152602001828054610c0590611177565b8015610c525780601f10610c2757610100808354040283529160200191610c52565b820191906000526020600020905b815481529060010190602001808311610c3557829003601f168201915b5050505050905094509450945094505092959194509250565b6000546060906001600160a01b03163314610cc85760405162461bcd60e51b815260206004820152601f60248201527f6d6573736167652073656e646572206973206e6f7420746865206f776e65720060448201526064016101d4565b6001600160a01b038216610d165760405162461bcd60e51b8152602060048201526015602482015274496e76616c6964206f776e6572206164647265737360581b60448201526064016101d4565b6000546001600160a01b03808416911603610d8f5760405162461bcd60e51b815260206004820152603360248201527f4f776e6572736869702063616e6e6f74206265207472616e73666572726564206044820152721d1bc81d1a19481cd85b59481858d8dbdd5b9d606a1b60648201526084016101d4565b600080546001600160a01b0319166001600160a01b0384169081179091556040519081527fcfaaa26691e16e66e73290fc725eee1a6b4e0e693a1640484937aac25ffb55a49060200160405180910390a16040518060600160405280602281526020016113a06022913990505b919050565b80356001600160a01b0381168114610dfc57600080fd5b634e487b7160e01b600052604160045260246000fd5b600082601f830112610e3f57600080fd5b813567ffffffffffffffff80821115610e5a57610e5a610e18565b604051601f8301601f19908116603f01168101908282118183101715610e8257610e82610e18565b81604052838152866020858801011115610e9b57600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600060608486031215610ed057600080fd5b610ed984610e01565b9250602084013567ffffffffffffffff80821115610ef657600080fd5b610f0287838801610e2e565b93506040860135915080821115610f1857600080fd5b50610f2586828701610e2e565b9150509250925092565b60005b83811015610f4a578181015183820152602001610f32565b50506000910152565b60008151808452610f6b816020860160208601610f2f565b601f01601f19169290920160200192915050565b6001600160a01b0384168152606060208201819052600090610fa390830185610f53565b8281036040840152610fb58185610f53565b9695505050505050565b60008060408385031215610fd257600080fd5b610fdb83610e01565b9150602083013567ffffffffffffffff811115610ff757600080fd5b61100385828601610e2e565b9150509250929050565b6020815260006110206020830184610f53565b9392505050565b60018060a01b0385168152836020820152826040820152608060608201526000610fb56080830184610f53565b60006020828403121561106657600080fd5b61102082610e01565b600082825180855260208086019550808260051b84010181860160005b848110156110ba57601f198684030189526110a8838351610f53565b9884019892509083019060010161108c565b5090979650505050505050565b6040815260006110da6040830185610f53565b82810360208401526110ec818561106f565b95945050505050565b602081526000611020602083018461106f565b60208082526033908201527f6d6573736167652073656e646572206973206e6f742074686520636f6e74726f6040820152726c6c6572206f66207468652044494420446f6360681b606082015260800190565b6000825161116d818460208701610f2f565b9190910192915050565b600181811c9082168061118b57607f821691505b6020821081036111ab57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156111fb57600081815260208120601f850160051c810160208610156111d85750805b601f850160051c820191505b818110156111f7578281556001016111e4565b5050505b505050565b815167ffffffffffffffff81111561121a5761121a610e18565b61122e816112288454611177565b846111b1565b602080601f831160018114611263576000841561124b5750858301515b600019600386901b1c1916600185901b1785556111f7565b600085815260208120601f198616915b8281101561129257888601518255948401946001909101908401611273565b50858210156112b05787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6001600160a01b03831681526040602082018190526000906112e490830184610f53565b949350505050565b634e487b7160e01b600052603260045260246000fd5b600080835461131081611177565b60018281168015611328576001811461133d5761136c565b60ff198416875282151583028701945061136c565b8760005260208060002060005b858110156113635781548a82015290840190820161134a565b50505082870194505b50929695505050505050565b60006001820161139857634e487b7160e01b600052601160045260246000fd5b506001019056fe4f776e657273686970207472616e73666572726564207375636365737366756c6c79a2646970667358221220a6a4f5aa40c888fa264070103f3e25b5b252855a20603304e9a26ed96d82655b64736f6c63430008100033",
274
+ deployedBytecode: "0x608060405234801561001057600080fd5b50600436106100935760003560e01c8063893d20e811610066578063893d20e814610110578063b77975271461012b578063c02d8e901461014c578063d4b9d14a1461016c578063f2fde38b1461017f57600080fd5b80630b50af3a1461009857806334303fc7146100c357806363d61166146100e35780638129fc1c14610106575b600080fd5b6100ab6100a6366004610ebb565b610192565b6040516100ba93929190610f7f565b60405180910390f35b6100d66100d1366004610fbf565b610338565b6040516100ba919061100d565b6100f66100f1366004610fbf565b610402565b6040516100ba9493929190611027565b61010e610607565b005b6000546040516001600160a01b0390911681526020016100ba565b61013e610139366004611054565b6106d7565b6040516100ba9291906110c7565b61015f61015a366004611054565b61092e565b6040516100ba91906110f5565b6100f661017a366004610fbf565b610ad6565b6100d661018d366004611054565b610c6b565b6001600160a01b038084166000908152600160205260408120549091606091829187911633146101dd5760405162461bcd60e51b81526004016101d490611108565b60405180910390fd5b6001600160a01b03871661022e5760405162461bcd60e51b8152602060048201526018602482015277125b9d985b1a59081859191c995cdcc81c1c9bdd9a59195960421b60448201526064016101d4565b6001600160a01b03871660009081526002602052604090819020905161025590889061115b565b9081526020016040518091039020805461026e90611177565b90506000036102ab576001600160a01b0387166000908152600360209081526040822080546001810182559083529120016102a98782611200565b505b6001600160a01b0387166000908152600260205260409081902090518691906102d590899061115b565b908152602001604051809103902090816102ef9190611200565b507f3ca597429c9c2c28edc44f100c640f078525bd8c70c80e6123233864b6d604e087878760405161032393929190610f7f565b60405180910390a15094959394509192915050565b6001600160a01b0382166000908152600260205260409081902090516060919061036390849061115b565b9081526020016040518091039020805461037c90611177565b80601f01602080910402602001604051908101604052809291908181526020018280546103a890611177565b80156103f55780601f106103ca576101008083540402835291602001916103f5565b820191906000526020600020905b8154815290600101906020018083116103d857829003601f168201915b5050505050905092915050565b6000808060606001600160a01b0386166104595760405162461bcd60e51b8152602060048201526018602482015277125b9d985b1a59081859191c995cdcc81c1c9bdd9a59195960421b60448201526064016101d4565b6001600160a01b03808716600081815260016020526040902054909116036104b75760405162461bcd60e51b815260206004820152601160248201527011125108185b1c9958591e48195e1a5cdd607a1b60448201526064016101d4565b6001600160a01b038616600081815260016020819052604090912080546001600160a01b03191690921782554290820181905560028201556003016104fc8682611200565b507f1b7934654ba536b6962955e057ce42885353bbaad8c605a5ce0678e632f28410868660405161052e9291906112c0565b60405180910390a16001600160a01b03808716600090815260016020819052604090912080549181015460028201546003909201805493909416939092819061057690611177565b80601f01602080910402602001604051908101604052809291908181526020018280546105a290611177565b80156105ef5780601f106105c4576101008083540402835291602001916105ef565b820191906000526020600020905b8154815290600101906020018083116105d257829003601f168201915b50505050509050935093509350935092959194509250565b60045460ff16156106715760405162461bcd60e51b815260206004820152602e60248201527f436f6e747261637420696e7374616e63652068617320616c726561647920626560448201526d195b881a5b9a5d1a585b1a5e995960921b60648201526084016101d4565b6004805460ff19166001179055336106c35760405162461bcd60e51b8152602060048201526015602482015274496e76616c6964206f776e6572206164647265737360581b60448201526064016101d4565b600080546001600160a01b03191633179055565b6001600160a01b038116600090815260036020526040812054606091829167ffffffffffffffff81111561070d5761070d610e18565b60405190808252806020026020018201604052801561074057816020015b606081526020019060019003908161072b5790505b50905060005b6001600160a01b038516600090815260036020526040902054811015610879576001600160a01b0385166000908152600260209081526040808320600390925290912080548390811061079b5761079b6112ec565b906000526020600020016040516107b29190611302565b908152602001604051809103902080546107cb90611177565b80601f01602080910402602001604051908101604052809291908181526020018280546107f790611177565b80156108445780601f1061081957610100808354040283529160200191610844565b820191906000526020600020905b81548152906001019060200180831161082757829003601f168201915b505050505082828151811061085b5761085b6112ec565b6020026020010181905250808061087190611378565b915050610746565b506001600160a01b03841660009081526001602052604090206003018054829082906108a490611177565b80601f01602080910402602001604051908101604052809291908181526020018280546108d090611177565b801561091d5780601f106108f25761010080835404028352916020019161091d565b820191906000526020600020905b81548152906001019060200180831161090057829003601f168201915b505050505091509250925050915091565b6001600160a01b0381166000908152600360205260408120546060919067ffffffffffffffff81111561096357610963610e18565b60405190808252806020026020018201604052801561099657816020015b60608152602001906001900390816109815790505b50905060005b6001600160a01b038416600090815260036020526040902054811015610acf576001600160a01b038416600090815260026020908152604080832060039092529091208054839081106109f1576109f16112ec565b90600052602060002001604051610a089190611302565b90815260200160405180910390208054610a2190611177565b80601f0160208091040260200160405190810160405280929190818152602001828054610a4d90611177565b8015610a9a5780601f10610a6f57610100808354040283529160200191610a9a565b820191906000526020600020905b815481529060010190602001808311610a7d57829003601f168201915b5050505050828281518110610ab157610ab16112ec565b60200260200101819052508080610ac790611378565b91505061099c565b5092915050565b6001600160a01b038083166000908152600160205260408120549091829182916060918791163314610b1a5760405162461bcd60e51b81526004016101d490611108565b6001600160a01b0387166000908152600160205260409020600301610b3f8782611200565b506001600160a01b0387166000908152600160205260409081902042600290910155517fa0016473004b22caf3cbe32658844f4dfe20b54f72612d0ea625cc07ca3a192b90610b9190899089906112c0565b60405180910390a16001600160a01b038088166000908152600160208190526040909120805491810154600282015460039092018054939094169390928190610bd990611177565b80601f0160208091040260200160405190810160405280929190818152602001828054610c0590611177565b8015610c525780601f10610c2757610100808354040283529160200191610c52565b820191906000526020600020905b815481529060010190602001808311610c3557829003601f168201915b5050505050905094509450945094505092959194509250565b6000546060906001600160a01b03163314610cc85760405162461bcd60e51b815260206004820152601f60248201527f6d6573736167652073656e646572206973206e6f7420746865206f776e65720060448201526064016101d4565b6001600160a01b038216610d165760405162461bcd60e51b8152602060048201526015602482015274496e76616c6964206f776e6572206164647265737360581b60448201526064016101d4565b6000546001600160a01b03808416911603610d8f5760405162461bcd60e51b815260206004820152603360248201527f4f776e6572736869702063616e6e6f74206265207472616e73666572726564206044820152721d1bc81d1a19481cd85b59481858d8dbdd5b9d606a1b60648201526084016101d4565b600080546001600160a01b0319166001600160a01b0384169081179091556040519081527fcfaaa26691e16e66e73290fc725eee1a6b4e0e693a1640484937aac25ffb55a49060200160405180910390a16040518060600160405280602281526020016113a06022913990505b919050565b80356001600160a01b0381168114610dfc57600080fd5b634e487b7160e01b600052604160045260246000fd5b600082601f830112610e3f57600080fd5b813567ffffffffffffffff80821115610e5a57610e5a610e18565b604051601f8301601f19908116603f01168101908282118183101715610e8257610e82610e18565b81604052838152866020858801011115610e9b57600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600060608486031215610ed057600080fd5b610ed984610e01565b9250602084013567ffffffffffffffff80821115610ef657600080fd5b610f0287838801610e2e565b93506040860135915080821115610f1857600080fd5b50610f2586828701610e2e565b9150509250925092565b60005b83811015610f4a578181015183820152602001610f32565b50506000910152565b60008151808452610f6b816020860160208601610f2f565b601f01601f19169290920160200192915050565b6001600160a01b0384168152606060208201819052600090610fa390830185610f53565b8281036040840152610fb58185610f53565b9695505050505050565b60008060408385031215610fd257600080fd5b610fdb83610e01565b9150602083013567ffffffffffffffff811115610ff757600080fd5b61100385828601610e2e565b9150509250929050565b6020815260006110206020830184610f53565b9392505050565b60018060a01b0385168152836020820152826040820152608060608201526000610fb56080830184610f53565b60006020828403121561106657600080fd5b61102082610e01565b600082825180855260208086019550808260051b84010181860160005b848110156110ba57601f198684030189526110a8838351610f53565b9884019892509083019060010161108c565b5090979650505050505050565b6040815260006110da6040830185610f53565b82810360208401526110ec818561106f565b95945050505050565b602081526000611020602083018461106f565b60208082526033908201527f6d6573736167652073656e646572206973206e6f742074686520636f6e74726f6040820152726c6c6572206f66207468652044494420446f6360681b606082015260800190565b6000825161116d818460208701610f2f565b9190910192915050565b600181811c9082168061118b57607f821691505b6020821081036111ab57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156111fb57600081815260208120601f850160051c810160208610156111d85750805b601f850160051c820191505b818110156111f7578281556001016111e4565b5050505b505050565b815167ffffffffffffffff81111561121a5761121a610e18565b61122e816112288454611177565b846111b1565b602080601f831160018114611263576000841561124b5750858301515b600019600386901b1c1916600185901b1785556111f7565b600085815260208120601f198616915b8281101561129257888601518255948401946001909101908401611273565b50858210156112b05787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6001600160a01b03831681526040602082018190526000906112e490830184610f53565b949350505050565b634e487b7160e01b600052603260045260246000fd5b600080835461131081611177565b60018281168015611328576001811461133d5761136c565b60ff198416875282151583028701945061136c565b8760005260208060002060005b858110156113635781548a82015290840190820161134a565b50505082870194505b50929695505050505050565b60006001820161139857634e487b7160e01b600052601160045260246000fd5b506001019056fe4f776e657273686970207472616e73666572726564207375636365737366756c6c79a2646970667358221220a6a4f5aa40c888fa264070103f3e25b5b252855a20603304e9a26ed96d82655b64736f6c63430008100033",
275
+ linkReferences: {},
276
+ deployedLinkReferences: {}
277
+ };
278
+
279
+ //#endregion
280
+ export { PolygonDidRegistry_default as default };
281
+ //# sourceMappingURL=PolygonDidRegistry.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PolygonDidRegistry.mjs","names":[],"sources":["../../../../artifacts/contracts/PolygonDidRegistry.sol/PolygonDidRegistry.json"],"sourcesContent":[""],"mappings":""}
@@ -0,0 +1,2 @@
1
+ import { __json_default_export } from "./artifacts/contracts/PolygonDidRegistry.sol/PolygonDidRegistry.json.mjs";
2
+ export { __json_default_export as default };
@@ -0,0 +1,8 @@
1
+ import PolygonDidRegistry_default from "./artifacts/contracts/PolygonDidRegistry.sol/PolygonDidRegistry.mjs";
2
+
3
+ //#region src/index.ts
4
+ var src_default = PolygonDidRegistry_default;
5
+
6
+ //#endregion
7
+ export { src_default as default };
8
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","names":["DidRegistryContract"],"sources":["../src/index.ts"],"sourcesContent":["import DidRegistryContract from '../artifacts/contracts/PolygonDidRegistry.sol/PolygonDidRegistry.json'\nexport default DidRegistryContract\n"],"mappings":";;;AACA,kBAAeA"}
package/package.json CHANGED
@@ -1,57 +1,41 @@
1
1
  {
2
2
  "name": "@ayanworks/polygon-did-registry-contract",
3
- "version": "2.0.1-alpha.8",
3
+ "version": "4.0.0",
4
4
  "description": "Smart Contract to register DID on Polygon",
5
- "main": "build/index.js",
6
- "directories": {
7
- "test": "test"
8
- },
9
- "scripts": {
10
- "deploy": "node deploy.js",
11
- "test": "node --require ts-node/register --test ./tests/polygon_did_registry_test.test.js",
12
- "clean": "rm -rf build",
13
- "clean:deps": "pnpm clean && rm -rf node_modules",
14
- "build": "pnpm clean && pnpm build:sol && tsc",
15
- "build:sol": "node --require ts-node/register ./compile.ts",
16
- "prettier": "prettier --ignore-path .prettierignore .",
17
- "check-format": "pnpm prettier --list-different",
18
- "check-types": "pnpm build --noEmit",
19
- "format": "pnpm prettier --write",
20
- "release": "release-it"
21
- },
22
- "license": "MIT",
23
- "devDependencies": {
24
- "@nomicfoundation/hardhat-ethers": "^3.0.5",
25
- "@nomicfoundation/hardhat-verify": "^2.0.3",
26
- "@openzeppelin/hardhat-upgrades": "^3.0.1",
27
- "@types/fs-extra": "^11.0.1",
28
- "@types/node": "^18.17.0",
29
- "dotenv": "^16.0.2",
30
- "eslint": "^8.23.1",
31
- "ethers": "^6.9.0",
32
- "fs-extra": "^11.1.1",
33
- "hardhat": "^2.19.4",
34
- "mocha": "^7.0.0",
35
- "prettier": "^3.0.2",
36
- "release-it": "^16.3.0",
37
- "solc": "0.8.16",
38
- "ts-node": "^10.9.1",
39
- "typescript": "^5.1.6"
5
+ "files": [
6
+ "build"
7
+ ],
8
+ "license": "Apache-2.0",
9
+ "publishConfig": {
10
+ "access": "public"
40
11
  },
12
+ "homepage": "https://github.com/ayanworks/polygon-did-modules/tree/main/packages/did-registry-contract",
41
13
  "repository": {
42
14
  "type": "git",
43
- "url": "git+https://github.com/ayanworks/polygon-did-registry-contract"
15
+ "url": "https://github.com/ayanworks/polygon-did-modules",
16
+ "directory": "packages/did-registry-contract"
44
17
  },
45
- "keywords": [
46
- "did-method"
47
- ],
48
- "author": "Ajay Jadhav <ajay@ayanworks.com>",
49
- "contributors": [
50
- "Anusha Garg <anusha.garg@ayanworks.com>, Shashank Kulkarni <shashank.kulkarni@ayanworks.com>"
51
- ],
52
- "bugs": {
53
- "url": "https://github.com/ayanworks/polygon-did-registry-contract/issues"
18
+ "devDependencies": {
19
+ "@nomicfoundation/hardhat-ethers": "^3.0.8",
20
+ "@nomicfoundation/hardhat-verify": "^2.0.12",
21
+ "@openzeppelin/hardhat-upgrades": "^3.6.0",
22
+ "@types/node": "^20.19.25",
23
+ "ethers": "^6.16.0",
24
+ "hardhat": "^2.22.0",
25
+ "ts-node": "^10.9.2",
26
+ "typescript": "~5.9.3",
27
+ "vitest": "^4.0.18"
28
+ },
29
+ "scripts": {
30
+ "compile:sol": "hardhat compile",
31
+ "build": "pnpm compile:sol && tsdown --config-loader unconfig",
32
+ "deploy": "hardhat run scripts/deploy.ts --network amoy",
33
+ "test": "pnpm compile:sol && vitest run"
54
34
  },
55
- "homepage": "https://github.com/ayanworks/polygon-did-registry-contract#readme",
56
- "dependencies": {}
57
- }
35
+ "types": "./build/index.d.mts",
36
+ "module": "./build/index.mjs",
37
+ "exports": {
38
+ ".": "./build/index.mjs",
39
+ "./package.json": "./package.json"
40
+ }
41
+ }
package/.env.sample DELETED
@@ -1,4 +0,0 @@
1
- RPCURL=""
2
- SIGNER=""
3
- CONTRACT=""
4
- VERIFICATION_KEY=""
@@ -1,85 +0,0 @@
1
- name: 'Pipeline'
2
-
3
- concurrency:
4
- # Cancel previous runs that are not completed yet
5
- group: ${{ github.workflow }}-${{ github.ref }}
6
- cancel-in-progress: true
7
-
8
- on:
9
- push:
10
- branches: ['main']
11
-
12
- pull_request:
13
- types: [opened, synchronize]
14
-
15
- workflow_dispatch:
16
- inputs:
17
- release-type:
18
- description: 'Type of release (major, minor, patch, alpha)'
19
- required: true
20
- default: alpha
21
- type: choice
22
- options:
23
- - major
24
- - minor
25
- - patch
26
- - alpha
27
-
28
- jobs:
29
- continuous-integration:
30
- name: 'Continuous Integration'
31
- runs-on: ubuntu-latest
32
-
33
- steps:
34
- - uses: actions/checkout@v3
35
-
36
- - uses: pnpm/action-setup@v2
37
- with:
38
- version: 9.0.1
39
-
40
- - name: Install dependencies
41
- run: pnpm install
42
-
43
- - name: Check formatting
44
- run: pnpm check-format
45
-
46
- continuous-deployment:
47
- if: github.event_name == 'workflow_dispatch'
48
-
49
- name: 'Continuous Deployment'
50
- runs-on: ubuntu-latest
51
- needs: ['continuous-integration']
52
-
53
- steps:
54
- - uses: actions/checkout@v3
55
- with:
56
- token: ${{ secrets.GH_TOKEN }}
57
-
58
- - uses: pnpm/action-setup@v2
59
- with:
60
- version: 9.0.1
61
-
62
- - name: Install dependencies
63
- run: pnpm install
64
-
65
- - name: Build
66
- run: pnpm build
67
-
68
- - name: Initialize the NPM config
69
- env:
70
- NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
71
- run: npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN
72
-
73
- - name: Publish
74
- env:
75
- NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
76
- run: |
77
- echo ${{ inputs.release-type }}
78
- git config --global user.email "amit.padmani@ayanworks.com"
79
- git config --global user.name "Amit Padmani"
80
-
81
- if [ ${{ inputs.release-type }} == 'alpha' ]; then
82
- pnpm release --preRelease=${{ inputs.release-type }} --npm.tag=alpha
83
- else
84
- pnpm release ${{ inputs.release-type }} --npm.tag=latest
85
- fi