@propxchain/core-client 0.1.0 → 0.2.0-canary.7
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/dist/auth.d.ts +17 -0
- package/dist/auth.d.ts.map +1 -0
- package/dist/auth.js +15 -0
- package/dist/auth.js.map +1 -0
- package/dist/canisters/document_verification/document_verification.did.d.ts +7 -0
- package/dist/canisters/document_verification/document_verification.did.d.ts.map +1 -0
- package/dist/canisters/document_verification/document_verification.did.js +96 -0
- package/dist/canisters/document_verification/document_verification.did.js.map +1 -0
- package/dist/canisters/document_verification/index.d.ts +4 -0
- package/dist/canisters/document_verification/index.d.ts.map +1 -0
- package/dist/canisters/document_verification/index.js +2 -0
- package/dist/canisters/document_verification/index.js.map +1 -0
- package/dist/canisters/email_service/email_service.did.d.ts +7 -0
- package/dist/canisters/email_service/email_service.did.d.ts.map +1 -0
- package/dist/canisters/email_service/email_service.did.js +36 -0
- package/dist/canisters/email_service/email_service.did.js.map +1 -0
- package/dist/canisters/email_service/index.d.ts +4 -0
- package/dist/canisters/email_service/index.d.ts.map +1 -0
- package/dist/canisters/email_service/index.js +2 -0
- package/dist/canisters/email_service/index.js.map +1 -0
- package/dist/canisters/land_registry_integration/index.d.ts +4 -0
- package/dist/canisters/land_registry_integration/index.d.ts.map +1 -0
- package/dist/canisters/land_registry_integration/index.js +2 -0
- package/dist/canisters/land_registry_integration/index.js.map +1 -0
- package/dist/canisters/land_registry_integration/land_registry_integration.did.d.ts +7 -0
- package/dist/canisters/land_registry_integration/land_registry_integration.did.d.ts.map +1 -0
- package/dist/canisters/land_registry_integration/land_registry_integration.did.js +145 -0
- package/dist/canisters/land_registry_integration/land_registry_integration.did.js.map +1 -0
- package/dist/canisters/property_registry/index.d.ts +4 -0
- package/dist/canisters/property_registry/index.d.ts.map +1 -0
- package/dist/canisters/property_registry/index.js +2 -0
- package/dist/canisters/property_registry/index.js.map +1 -0
- package/dist/canisters/property_registry/property_registry.did.d.ts +7 -0
- package/dist/canisters/property_registry/property_registry.did.d.ts.map +1 -0
- package/dist/canisters/property_registry/property_registry.did.js +58 -0
- package/dist/canisters/property_registry/property_registry.did.js.map +1 -0
- package/dist/client.d.ts +5 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +13 -0
- package/dist/client.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/mock.d.ts +9 -1
- package/dist/mock.d.ts.map +1 -1
- package/dist/mock.js +42 -0
- package/dist/mock.js.map +1 -1
- package/dist/types.d.ts +13 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +4 -0
- package/dist/types.js.map +1 -1
- package/package.json +10 -4
- package/src/auth.ts +26 -0
- package/src/canisters/document_verification/document_verification.did +98 -0
- package/src/canisters/document_verification/document_verification.did.d.ts +112 -0
- package/src/canisters/document_verification/document_verification.did.js +139 -0
- package/src/canisters/document_verification/index.ts +5 -0
- package/src/canisters/email_service/email_service.did +37 -0
- package/src/canisters/email_service/email_service.did.d.ts +45 -0
- package/src/canisters/email_service/email_service.did.js +63 -0
- package/src/canisters/email_service/index.ts +5 -0
- package/src/canisters/land_registry_integration/index.ts +5 -0
- package/src/canisters/land_registry_integration/land_registry_integration.did +169 -0
- package/src/canisters/land_registry_integration/land_registry_integration.did.d.ts +157 -0
- package/src/canisters/land_registry_integration/land_registry_integration.did.js +182 -0
- package/src/canisters/property_registry/index.ts +5 -0
- package/src/canisters/property_registry/property_registry.did +78 -0
- package/src/canisters/property_registry/property_registry.did.d.ts +71 -0
- package/src/canisters/property_registry/property_registry.did.js +77 -0
- package/src/client.ts +29 -0
- package/src/index.ts +18 -0
- package/src/mock.ts +50 -0
- package/src/types.ts +20 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
type Time = int;
|
|
2
|
+
type Result_3 =
|
|
3
|
+
variant {
|
|
4
|
+
err: text;
|
|
5
|
+
ok: vec text;
|
|
6
|
+
};
|
|
7
|
+
type Result_2 =
|
|
8
|
+
variant {
|
|
9
|
+
err: text;
|
|
10
|
+
ok: text;
|
|
11
|
+
};
|
|
12
|
+
type Result_1 =
|
|
13
|
+
variant {
|
|
14
|
+
err: text;
|
|
15
|
+
ok: ChainPropertyView;
|
|
16
|
+
};
|
|
17
|
+
type Result =
|
|
18
|
+
variant {
|
|
19
|
+
err: text;
|
|
20
|
+
ok;
|
|
21
|
+
};
|
|
22
|
+
type PropertyStatus =
|
|
23
|
+
variant {
|
|
24
|
+
Cancelled;
|
|
25
|
+
Completed;
|
|
26
|
+
InTransaction;
|
|
27
|
+
Listed;
|
|
28
|
+
};
|
|
29
|
+
type Property =
|
|
30
|
+
record {
|
|
31
|
+
address: text;
|
|
32
|
+
anonymousPropertyId: text;
|
|
33
|
+
chainPosition: opt nat;
|
|
34
|
+
createdAt: Time;
|
|
35
|
+
description: text;
|
|
36
|
+
documentsComplete: bool;
|
|
37
|
+
financingComplete: bool;
|
|
38
|
+
id: nat;
|
|
39
|
+
isVerified: bool;
|
|
40
|
+
linkedProperties: vec text;
|
|
41
|
+
owner: principal;
|
|
42
|
+
price: nat;
|
|
43
|
+
propertyType: text;
|
|
44
|
+
searchesComplete: bool;
|
|
45
|
+
size: nat;
|
|
46
|
+
status: PropertyStatus;
|
|
47
|
+
transactionId: opt text;
|
|
48
|
+
};
|
|
49
|
+
type ChainPropertyView =
|
|
50
|
+
record {
|
|
51
|
+
anonymousId: text;
|
|
52
|
+
documentsComplete: bool;
|
|
53
|
+
financingComplete: bool;
|
|
54
|
+
progressPercentage: nat;
|
|
55
|
+
role: text;
|
|
56
|
+
searchesComplete: bool;
|
|
57
|
+
status: PropertyStatus;
|
|
58
|
+
};
|
|
59
|
+
service : {
|
|
60
|
+
buildPropertyChain: (rootPropertyId: text) -> (Result_3);
|
|
61
|
+
canViewFullPropertyDetails: (propertyId: text, requesterId: principal) ->
|
|
62
|
+
(bool) query;
|
|
63
|
+
generateAnonymousPropertyId: (propertyId: text) -> (Result_2);
|
|
64
|
+
getAllProperties: () -> (vec Property) query;
|
|
65
|
+
getCycles: () -> (nat) query;
|
|
66
|
+
getProperty: (id: nat) -> (opt Property) query;
|
|
67
|
+
getPropertyForChainView: (propertyId: text, requesterId: principal) ->
|
|
68
|
+
(Result_1) query;
|
|
69
|
+
registerProperty: (address: text, price: nat, size: nat, propertyType:
|
|
70
|
+
text, description: text) -> (nat);
|
|
71
|
+
transferOwnership: (propertyId: nat, newOwner: principal) -> (bool);
|
|
72
|
+
updatePropertyProgress: (propertyId: nat, documentsComplete: bool,
|
|
73
|
+
searchesComplete: bool, financingComplete: bool) -> (Result);
|
|
74
|
+
updatePropertyStatus: (propertyId: nat, status: PropertyStatus) -> (Result);
|
|
75
|
+
updatePropertyTransaction: (propertyId: nat, transactionId: opt text,
|
|
76
|
+
chainPosition: opt nat, linkedProperties: vec text) -> (Result);
|
|
77
|
+
verifyProperty: (id: nat) -> (bool);
|
|
78
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import type { Principal } from '@dfinity/principal';
|
|
2
|
+
import type { ActorMethod } from '@dfinity/agent';
|
|
3
|
+
import type { IDL } from '@dfinity/candid';
|
|
4
|
+
|
|
5
|
+
export interface ChainPropertyView {
|
|
6
|
+
'status' : PropertyStatus,
|
|
7
|
+
'progressPercentage' : bigint,
|
|
8
|
+
'role' : string,
|
|
9
|
+
'documentsComplete' : boolean,
|
|
10
|
+
'financingComplete' : boolean,
|
|
11
|
+
'searchesComplete' : boolean,
|
|
12
|
+
'anonymousId' : string,
|
|
13
|
+
}
|
|
14
|
+
export interface Property {
|
|
15
|
+
'id' : bigint,
|
|
16
|
+
'anonymousPropertyId' : string,
|
|
17
|
+
'status' : PropertyStatus,
|
|
18
|
+
'propertyType' : string,
|
|
19
|
+
'owner' : Principal,
|
|
20
|
+
'createdAt' : Time,
|
|
21
|
+
'size' : bigint,
|
|
22
|
+
'documentsComplete' : boolean,
|
|
23
|
+
'description' : string,
|
|
24
|
+
'isVerified' : boolean,
|
|
25
|
+
'linkedProperties' : Array<string>,
|
|
26
|
+
'address' : string,
|
|
27
|
+
'chainPosition' : [] | [bigint],
|
|
28
|
+
'financingComplete' : boolean,
|
|
29
|
+
'price' : bigint,
|
|
30
|
+
'searchesComplete' : boolean,
|
|
31
|
+
'transactionId' : [] | [string],
|
|
32
|
+
}
|
|
33
|
+
export type PropertyStatus = { 'Listed' : null } |
|
|
34
|
+
{ 'InTransaction' : null } |
|
|
35
|
+
{ 'Cancelled' : null } |
|
|
36
|
+
{ 'Completed' : null };
|
|
37
|
+
export type Result = { 'ok' : null } |
|
|
38
|
+
{ 'err' : string };
|
|
39
|
+
export type Result_1 = { 'ok' : ChainPropertyView } |
|
|
40
|
+
{ 'err' : string };
|
|
41
|
+
export type Result_2 = { 'ok' : string } |
|
|
42
|
+
{ 'err' : string };
|
|
43
|
+
export type Result_3 = { 'ok' : Array<string> } |
|
|
44
|
+
{ 'err' : string };
|
|
45
|
+
export type Time = bigint;
|
|
46
|
+
export interface _SERVICE {
|
|
47
|
+
'buildPropertyChain' : ActorMethod<[string], Result_3>,
|
|
48
|
+
'canViewFullPropertyDetails' : ActorMethod<[string, Principal], boolean>,
|
|
49
|
+
'generateAnonymousPropertyId' : ActorMethod<[string], Result_2>,
|
|
50
|
+
'getAllProperties' : ActorMethod<[], Array<Property>>,
|
|
51
|
+
'getCycles' : ActorMethod<[], bigint>,
|
|
52
|
+
'getProperty' : ActorMethod<[bigint], [] | [Property]>,
|
|
53
|
+
'getPropertyForChainView' : ActorMethod<[string, Principal], Result_1>,
|
|
54
|
+
'registerProperty' : ActorMethod<
|
|
55
|
+
[string, bigint, bigint, string, string],
|
|
56
|
+
bigint
|
|
57
|
+
>,
|
|
58
|
+
'transferOwnership' : ActorMethod<[bigint, Principal], boolean>,
|
|
59
|
+
'updatePropertyProgress' : ActorMethod<
|
|
60
|
+
[bigint, boolean, boolean, boolean],
|
|
61
|
+
Result
|
|
62
|
+
>,
|
|
63
|
+
'updatePropertyStatus' : ActorMethod<[bigint, PropertyStatus], Result>,
|
|
64
|
+
'updatePropertyTransaction' : ActorMethod<
|
|
65
|
+
[bigint, [] | [string], [] | [bigint], Array<string>],
|
|
66
|
+
Result
|
|
67
|
+
>,
|
|
68
|
+
'verifyProperty' : ActorMethod<[bigint], boolean>,
|
|
69
|
+
}
|
|
70
|
+
export declare const idlFactory: IDL.InterfaceFactory;
|
|
71
|
+
export declare const init: (args: { IDL: typeof IDL }) => IDL.Type[];
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
export const idlFactory = ({ IDL }) => {
|
|
2
|
+
const Result_3 = IDL.Variant({ 'ok' : IDL.Vec(IDL.Text), 'err' : IDL.Text });
|
|
3
|
+
const Result_2 = IDL.Variant({ 'ok' : IDL.Text, 'err' : IDL.Text });
|
|
4
|
+
const PropertyStatus = IDL.Variant({
|
|
5
|
+
'Listed' : IDL.Null,
|
|
6
|
+
'InTransaction' : IDL.Null,
|
|
7
|
+
'Cancelled' : IDL.Null,
|
|
8
|
+
'Completed' : IDL.Null,
|
|
9
|
+
});
|
|
10
|
+
const Time = IDL.Int;
|
|
11
|
+
const Property = IDL.Record({
|
|
12
|
+
'id' : IDL.Nat,
|
|
13
|
+
'anonymousPropertyId' : IDL.Text,
|
|
14
|
+
'status' : PropertyStatus,
|
|
15
|
+
'propertyType' : IDL.Text,
|
|
16
|
+
'owner' : IDL.Principal,
|
|
17
|
+
'createdAt' : Time,
|
|
18
|
+
'size' : IDL.Nat,
|
|
19
|
+
'documentsComplete' : IDL.Bool,
|
|
20
|
+
'description' : IDL.Text,
|
|
21
|
+
'isVerified' : IDL.Bool,
|
|
22
|
+
'linkedProperties' : IDL.Vec(IDL.Text),
|
|
23
|
+
'address' : IDL.Text,
|
|
24
|
+
'chainPosition' : IDL.Opt(IDL.Nat),
|
|
25
|
+
'financingComplete' : IDL.Bool,
|
|
26
|
+
'price' : IDL.Nat,
|
|
27
|
+
'searchesComplete' : IDL.Bool,
|
|
28
|
+
'transactionId' : IDL.Opt(IDL.Text),
|
|
29
|
+
});
|
|
30
|
+
const ChainPropertyView = IDL.Record({
|
|
31
|
+
'status' : PropertyStatus,
|
|
32
|
+
'progressPercentage' : IDL.Nat,
|
|
33
|
+
'role' : IDL.Text,
|
|
34
|
+
'documentsComplete' : IDL.Bool,
|
|
35
|
+
'financingComplete' : IDL.Bool,
|
|
36
|
+
'searchesComplete' : IDL.Bool,
|
|
37
|
+
'anonymousId' : IDL.Text,
|
|
38
|
+
});
|
|
39
|
+
const Result_1 = IDL.Variant({ 'ok' : ChainPropertyView, 'err' : IDL.Text });
|
|
40
|
+
const Result = IDL.Variant({ 'ok' : IDL.Null, 'err' : IDL.Text });
|
|
41
|
+
return IDL.Service({
|
|
42
|
+
'buildPropertyChain' : IDL.Func([IDL.Text], [Result_3], []),
|
|
43
|
+
'canViewFullPropertyDetails' : IDL.Func(
|
|
44
|
+
[IDL.Text, IDL.Principal],
|
|
45
|
+
[IDL.Bool],
|
|
46
|
+
['query'],
|
|
47
|
+
),
|
|
48
|
+
'generateAnonymousPropertyId' : IDL.Func([IDL.Text], [Result_2], []),
|
|
49
|
+
'getAllProperties' : IDL.Func([], [IDL.Vec(Property)], ['query']),
|
|
50
|
+
'getCycles' : IDL.Func([], [IDL.Nat], ['query']),
|
|
51
|
+
'getProperty' : IDL.Func([IDL.Nat], [IDL.Opt(Property)], ['query']),
|
|
52
|
+
'getPropertyForChainView' : IDL.Func(
|
|
53
|
+
[IDL.Text, IDL.Principal],
|
|
54
|
+
[Result_1],
|
|
55
|
+
['query'],
|
|
56
|
+
),
|
|
57
|
+
'registerProperty' : IDL.Func(
|
|
58
|
+
[IDL.Text, IDL.Nat, IDL.Nat, IDL.Text, IDL.Text],
|
|
59
|
+
[IDL.Nat],
|
|
60
|
+
[],
|
|
61
|
+
),
|
|
62
|
+
'transferOwnership' : IDL.Func([IDL.Nat, IDL.Principal], [IDL.Bool], []),
|
|
63
|
+
'updatePropertyProgress' : IDL.Func(
|
|
64
|
+
[IDL.Nat, IDL.Bool, IDL.Bool, IDL.Bool],
|
|
65
|
+
[Result],
|
|
66
|
+
[],
|
|
67
|
+
),
|
|
68
|
+
'updatePropertyStatus' : IDL.Func([IDL.Nat, PropertyStatus], [Result], []),
|
|
69
|
+
'updatePropertyTransaction' : IDL.Func(
|
|
70
|
+
[IDL.Nat, IDL.Opt(IDL.Text), IDL.Opt(IDL.Nat), IDL.Vec(IDL.Text)],
|
|
71
|
+
[Result],
|
|
72
|
+
[],
|
|
73
|
+
),
|
|
74
|
+
'verifyProperty' : IDL.Func([IDL.Nat], [IDL.Bool], []),
|
|
75
|
+
});
|
|
76
|
+
};
|
|
77
|
+
export const init = ({ IDL }) => { return []; };
|
package/src/client.ts
CHANGED
|
@@ -3,11 +3,19 @@ import { idlFactory as transactionManagerIdl } from "./canisters/transaction_man
|
|
|
3
3
|
import { idlFactory as documentStorageIdl } from "./canisters/document_storage/index.js";
|
|
4
4
|
import { idlFactory as userManagementIdl } from "./canisters/user_management/index.js";
|
|
5
5
|
import { idlFactory as ledgerManagerIdl } from "./canisters/ledger_manager/index.js";
|
|
6
|
+
import { idlFactory as propertyRegistryIdl } from "./canisters/property_registry/index.js";
|
|
7
|
+
import { idlFactory as documentVerificationIdl } from "./canisters/document_verification/index.js";
|
|
8
|
+
import { idlFactory as emailServiceIdl } from "./canisters/email_service/index.js";
|
|
9
|
+
import { idlFactory as landRegistryIntegrationIdl } from "./canisters/land_registry_integration/index.js";
|
|
6
10
|
import type {
|
|
7
11
|
TransactionManagerService,
|
|
8
12
|
DocumentStorageService,
|
|
9
13
|
UserManagementService,
|
|
10
14
|
LedgerManagerService,
|
|
15
|
+
PropertyRegistryService,
|
|
16
|
+
DocumentVerificationService,
|
|
17
|
+
EmailServiceService,
|
|
18
|
+
LandRegistryIntegrationService,
|
|
11
19
|
} from "./types.js";
|
|
12
20
|
import {
|
|
13
21
|
MAINNET_CANISTER_IDS,
|
|
@@ -30,6 +38,10 @@ export class PropXchainClient implements IPropXchainClient {
|
|
|
30
38
|
readonly documentStorage: DocumentStorageService;
|
|
31
39
|
readonly userManagement: UserManagementService;
|
|
32
40
|
readonly ledgerManager: LedgerManagerService;
|
|
41
|
+
readonly propertyRegistry: PropertyRegistryService;
|
|
42
|
+
readonly documentVerification: DocumentVerificationService;
|
|
43
|
+
readonly emailService: EmailServiceService;
|
|
44
|
+
readonly landRegistryIntegration: LandRegistryIntegrationService;
|
|
33
45
|
readonly auditTrail: AuditTrailStub;
|
|
34
46
|
readonly agentHarness: AgentHarnessStub;
|
|
35
47
|
|
|
@@ -71,6 +83,23 @@ export class PropXchainClient implements IPropXchainClient {
|
|
|
71
83
|
ledgerManagerIdl,
|
|
72
84
|
{ agent, canisterId: canisterIds.ledgerManager },
|
|
73
85
|
);
|
|
86
|
+
this.propertyRegistry = Actor.createActor<PropertyRegistryService>(
|
|
87
|
+
propertyRegistryIdl,
|
|
88
|
+
{ agent, canisterId: canisterIds.propertyRegistry },
|
|
89
|
+
);
|
|
90
|
+
this.documentVerification = Actor.createActor<DocumentVerificationService>(
|
|
91
|
+
documentVerificationIdl,
|
|
92
|
+
{ agent, canisterId: canisterIds.documentVerification },
|
|
93
|
+
);
|
|
94
|
+
this.emailService = Actor.createActor<EmailServiceService>(
|
|
95
|
+
emailServiceIdl,
|
|
96
|
+
{ agent, canisterId: canisterIds.emailService },
|
|
97
|
+
);
|
|
98
|
+
this.landRegistryIntegration =
|
|
99
|
+
Actor.createActor<LandRegistryIntegrationService>(
|
|
100
|
+
landRegistryIntegrationIdl,
|
|
101
|
+
{ agent, canisterId: canisterIds.landRegistryIntegration },
|
|
102
|
+
);
|
|
74
103
|
this.auditTrail = createAuditTrailStub();
|
|
75
104
|
this.agentHarness = createAgentHarnessStub();
|
|
76
105
|
}
|
package/src/index.ts
CHANGED
|
@@ -27,4 +27,22 @@ export {
|
|
|
27
27
|
type DocumentStorageService,
|
|
28
28
|
type UserManagementService,
|
|
29
29
|
type LedgerManagerService,
|
|
30
|
+
type PropertyRegistryService,
|
|
31
|
+
type DocumentVerificationService,
|
|
32
|
+
type EmailServiceService,
|
|
33
|
+
type LandRegistryIntegrationService,
|
|
30
34
|
} from "./types.js";
|
|
35
|
+
export {
|
|
36
|
+
Principal,
|
|
37
|
+
Ed25519KeyIdentity,
|
|
38
|
+
AuthClient,
|
|
39
|
+
Actor,
|
|
40
|
+
HttpAgent,
|
|
41
|
+
type Identity,
|
|
42
|
+
type ActorSubclass,
|
|
43
|
+
type ActorConfig,
|
|
44
|
+
type ActorMethod,
|
|
45
|
+
type AuthClientCreateOptions,
|
|
46
|
+
type AuthClientLoginOptions,
|
|
47
|
+
type IdbStorage,
|
|
48
|
+
} from "./auth.js";
|
package/src/mock.ts
CHANGED
|
@@ -5,6 +5,10 @@ import type {
|
|
|
5
5
|
DocumentStorageService,
|
|
6
6
|
UserManagementService,
|
|
7
7
|
LedgerManagerService,
|
|
8
|
+
PropertyRegistryService,
|
|
9
|
+
DocumentVerificationService,
|
|
10
|
+
EmailServiceService,
|
|
11
|
+
LandRegistryIntegrationService,
|
|
8
12
|
} from "./types.js";
|
|
9
13
|
import {
|
|
10
14
|
createAuditTrailStub,
|
|
@@ -87,11 +91,53 @@ export function createMockLedgerManager(): LedgerManagerService {
|
|
|
87
91
|
});
|
|
88
92
|
}
|
|
89
93
|
|
|
94
|
+
export function createMockPropertyRegistry(): PropertyRegistryService {
|
|
95
|
+
return mockService<PropertyRegistryService>({
|
|
96
|
+
getAllProperties: async () => [],
|
|
97
|
+
getProperty: async () => [],
|
|
98
|
+
verifyProperty: async () => false,
|
|
99
|
+
transferOwnership: async () => false,
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export function createMockDocumentVerification(): DocumentVerificationService {
|
|
104
|
+
return mockService<DocumentVerificationService>({
|
|
105
|
+
getPropertyDocuments: async () => [],
|
|
106
|
+
getUnverifiedDocuments: async () => [],
|
|
107
|
+
getDocumentVerifications: async () => [],
|
|
108
|
+
getStats: async () => ({
|
|
109
|
+
totalDocuments: 0n,
|
|
110
|
+
verifiedDocuments: 0n,
|
|
111
|
+
unverifiedDocuments: 0n,
|
|
112
|
+
}),
|
|
113
|
+
getAuditLogs: async () => [],
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export function createMockEmailService(): EmailServiceService {
|
|
118
|
+
return mockService<EmailServiceService>({
|
|
119
|
+
getAllNotifications: async () => [],
|
|
120
|
+
getUnprocessedCount: async () => 0n,
|
|
121
|
+
getUnprocessedNotifications: async () => [],
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export function createMockLandRegistryIntegration(): LandRegistryIntegrationService {
|
|
126
|
+
return mockService<LandRegistryIntegrationService>({
|
|
127
|
+
get_all_transactions: async () => [],
|
|
128
|
+
get_all_pending_land_registry_submissions: async () => [],
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
|
|
90
132
|
export class MockPropXchainClient implements IPropXchainClient {
|
|
91
133
|
readonly transactionManager: TransactionManagerService;
|
|
92
134
|
readonly documentStorage: DocumentStorageService;
|
|
93
135
|
readonly userManagement: UserManagementService;
|
|
94
136
|
readonly ledgerManager: LedgerManagerService;
|
|
137
|
+
readonly propertyRegistry: PropertyRegistryService;
|
|
138
|
+
readonly documentVerification: DocumentVerificationService;
|
|
139
|
+
readonly emailService: EmailServiceService;
|
|
140
|
+
readonly landRegistryIntegration: LandRegistryIntegrationService;
|
|
95
141
|
readonly auditTrail: AuditTrailStub;
|
|
96
142
|
readonly agentHarness: AgentHarnessStub;
|
|
97
143
|
|
|
@@ -100,6 +146,10 @@ export class MockPropXchainClient implements IPropXchainClient {
|
|
|
100
146
|
this.documentStorage = createMockDocumentStorage();
|
|
101
147
|
this.userManagement = createMockUserManagement();
|
|
102
148
|
this.ledgerManager = createMockLedgerManager();
|
|
149
|
+
this.propertyRegistry = createMockPropertyRegistry();
|
|
150
|
+
this.documentVerification = createMockDocumentVerification();
|
|
151
|
+
this.emailService = createMockEmailService();
|
|
152
|
+
this.landRegistryIntegration = createMockLandRegistryIntegration();
|
|
103
153
|
this.auditTrail = createAuditTrailStub();
|
|
104
154
|
this.agentHarness = createAgentHarnessStub();
|
|
105
155
|
}
|
package/src/types.ts
CHANGED
|
@@ -3,6 +3,10 @@ import type { TransactionManagerService } from "./canisters/transaction_manager/
|
|
|
3
3
|
import type { DocumentStorageService } from "./canisters/document_storage/index.js";
|
|
4
4
|
import type { UserManagementService } from "./canisters/user_management/index.js";
|
|
5
5
|
import type { LedgerManagerService } from "./canisters/ledger_manager/index.js";
|
|
6
|
+
import type { PropertyRegistryService } from "./canisters/property_registry/index.js";
|
|
7
|
+
import type { DocumentVerificationService } from "./canisters/document_verification/index.js";
|
|
8
|
+
import type { EmailServiceService } from "./canisters/email_service/index.js";
|
|
9
|
+
import type { LandRegistryIntegrationService } from "./canisters/land_registry_integration/index.js";
|
|
6
10
|
import type { AuditTrailStub, AgentHarnessStub } from "./stubs.js";
|
|
7
11
|
|
|
8
12
|
export interface CanisterIds {
|
|
@@ -10,6 +14,10 @@ export interface CanisterIds {
|
|
|
10
14
|
documentStorage: string;
|
|
11
15
|
userManagement: string;
|
|
12
16
|
ledgerManager: string;
|
|
17
|
+
propertyRegistry: string;
|
|
18
|
+
documentVerification: string;
|
|
19
|
+
emailService: string;
|
|
20
|
+
landRegistryIntegration: string;
|
|
13
21
|
}
|
|
14
22
|
|
|
15
23
|
export const MAINNET_CANISTER_IDS: CanisterIds = {
|
|
@@ -17,6 +25,10 @@ export const MAINNET_CANISTER_IDS: CanisterIds = {
|
|
|
17
25
|
documentStorage: "646az-pqaaa-aaaaa-qczja-cai",
|
|
18
26
|
userManagement: "lmizp-piaaa-aaaaa-qcwwq-cai",
|
|
19
27
|
ledgerManager: "hty74-maaaa-aaaaa-qcxza-cai",
|
|
28
|
+
propertyRegistry: "l6oow-dyaaa-aaaaa-qcwvq-cai",
|
|
29
|
+
documentVerification: "xand7-wiaaa-aaaah-arlea-cai",
|
|
30
|
+
emailService: "5by6v-qyaaa-aaaaa-qc65a-cai",
|
|
31
|
+
landRegistryIntegration: "o4flv-xaaaa-aaaaa-qdaeq-cai",
|
|
20
32
|
};
|
|
21
33
|
|
|
22
34
|
export interface PropXchainClientOptions {
|
|
@@ -32,6 +44,10 @@ export interface IPropXchainClient {
|
|
|
32
44
|
readonly documentStorage: DocumentStorageService;
|
|
33
45
|
readonly userManagement: UserManagementService;
|
|
34
46
|
readonly ledgerManager: LedgerManagerService;
|
|
47
|
+
readonly propertyRegistry: PropertyRegistryService;
|
|
48
|
+
readonly documentVerification: DocumentVerificationService;
|
|
49
|
+
readonly emailService: EmailServiceService;
|
|
50
|
+
readonly landRegistryIntegration: LandRegistryIntegrationService;
|
|
35
51
|
readonly auditTrail: AuditTrailStub;
|
|
36
52
|
readonly agentHarness: AgentHarnessStub;
|
|
37
53
|
}
|
|
@@ -41,4 +57,8 @@ export type {
|
|
|
41
57
|
DocumentStorageService,
|
|
42
58
|
UserManagementService,
|
|
43
59
|
LedgerManagerService,
|
|
60
|
+
PropertyRegistryService,
|
|
61
|
+
DocumentVerificationService,
|
|
62
|
+
EmailServiceService,
|
|
63
|
+
LandRegistryIntegrationService,
|
|
44
64
|
};
|