@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.
Files changed (74) hide show
  1. package/dist/auth.d.ts +17 -0
  2. package/dist/auth.d.ts.map +1 -0
  3. package/dist/auth.js +15 -0
  4. package/dist/auth.js.map +1 -0
  5. package/dist/canisters/document_verification/document_verification.did.d.ts +7 -0
  6. package/dist/canisters/document_verification/document_verification.did.d.ts.map +1 -0
  7. package/dist/canisters/document_verification/document_verification.did.js +96 -0
  8. package/dist/canisters/document_verification/document_verification.did.js.map +1 -0
  9. package/dist/canisters/document_verification/index.d.ts +4 -0
  10. package/dist/canisters/document_verification/index.d.ts.map +1 -0
  11. package/dist/canisters/document_verification/index.js +2 -0
  12. package/dist/canisters/document_verification/index.js.map +1 -0
  13. package/dist/canisters/email_service/email_service.did.d.ts +7 -0
  14. package/dist/canisters/email_service/email_service.did.d.ts.map +1 -0
  15. package/dist/canisters/email_service/email_service.did.js +36 -0
  16. package/dist/canisters/email_service/email_service.did.js.map +1 -0
  17. package/dist/canisters/email_service/index.d.ts +4 -0
  18. package/dist/canisters/email_service/index.d.ts.map +1 -0
  19. package/dist/canisters/email_service/index.js +2 -0
  20. package/dist/canisters/email_service/index.js.map +1 -0
  21. package/dist/canisters/land_registry_integration/index.d.ts +4 -0
  22. package/dist/canisters/land_registry_integration/index.d.ts.map +1 -0
  23. package/dist/canisters/land_registry_integration/index.js +2 -0
  24. package/dist/canisters/land_registry_integration/index.js.map +1 -0
  25. package/dist/canisters/land_registry_integration/land_registry_integration.did.d.ts +7 -0
  26. package/dist/canisters/land_registry_integration/land_registry_integration.did.d.ts.map +1 -0
  27. package/dist/canisters/land_registry_integration/land_registry_integration.did.js +145 -0
  28. package/dist/canisters/land_registry_integration/land_registry_integration.did.js.map +1 -0
  29. package/dist/canisters/property_registry/index.d.ts +4 -0
  30. package/dist/canisters/property_registry/index.d.ts.map +1 -0
  31. package/dist/canisters/property_registry/index.js +2 -0
  32. package/dist/canisters/property_registry/index.js.map +1 -0
  33. package/dist/canisters/property_registry/property_registry.did.d.ts +7 -0
  34. package/dist/canisters/property_registry/property_registry.did.d.ts.map +1 -0
  35. package/dist/canisters/property_registry/property_registry.did.js +58 -0
  36. package/dist/canisters/property_registry/property_registry.did.js.map +1 -0
  37. package/dist/client.d.ts +5 -1
  38. package/dist/client.d.ts.map +1 -1
  39. package/dist/client.js +13 -0
  40. package/dist/client.js.map +1 -1
  41. package/dist/index.d.ts +2 -1
  42. package/dist/index.d.ts.map +1 -1
  43. package/dist/index.js +1 -0
  44. package/dist/index.js.map +1 -1
  45. package/dist/mock.d.ts +9 -1
  46. package/dist/mock.d.ts.map +1 -1
  47. package/dist/mock.js +42 -0
  48. package/dist/mock.js.map +1 -1
  49. package/dist/types.d.ts +13 -1
  50. package/dist/types.d.ts.map +1 -1
  51. package/dist/types.js +4 -0
  52. package/dist/types.js.map +1 -1
  53. package/package.json +10 -4
  54. package/src/auth.ts +26 -0
  55. package/src/canisters/document_verification/document_verification.did +98 -0
  56. package/src/canisters/document_verification/document_verification.did.d.ts +112 -0
  57. package/src/canisters/document_verification/document_verification.did.js +139 -0
  58. package/src/canisters/document_verification/index.ts +5 -0
  59. package/src/canisters/email_service/email_service.did +37 -0
  60. package/src/canisters/email_service/email_service.did.d.ts +45 -0
  61. package/src/canisters/email_service/email_service.did.js +63 -0
  62. package/src/canisters/email_service/index.ts +5 -0
  63. package/src/canisters/land_registry_integration/index.ts +5 -0
  64. package/src/canisters/land_registry_integration/land_registry_integration.did +169 -0
  65. package/src/canisters/land_registry_integration/land_registry_integration.did.d.ts +157 -0
  66. package/src/canisters/land_registry_integration/land_registry_integration.did.js +182 -0
  67. package/src/canisters/property_registry/index.ts +5 -0
  68. package/src/canisters/property_registry/property_registry.did +78 -0
  69. package/src/canisters/property_registry/property_registry.did.d.ts +71 -0
  70. package/src/canisters/property_registry/property_registry.did.js +77 -0
  71. package/src/client.ts +29 -0
  72. package/src/index.ts +18 -0
  73. package/src/mock.ts +50 -0
  74. package/src/types.ts +20 -0
@@ -0,0 +1,45 @@
1
+ import type { Principal } from '@dfinity/principal';
2
+ import type { ActorMethod } from '@dfinity/agent';
3
+ import type { IDL } from '@dfinity/candid';
4
+
5
+ export type ContactType = { 'support' : null } |
6
+ { 'partners' : null } |
7
+ { 'sales' : null };
8
+ export interface EmailNotification {
9
+ 'id' : bigint,
10
+ 'userType' : [] | [string],
11
+ 'contactType' : ContactType,
12
+ 'subject' : string,
13
+ 'partnerType' : [] | [string],
14
+ 'name' : string,
15
+ 'volume' : [] | [string],
16
+ 'email' : string,
17
+ 'website' : [] | [string],
18
+ 'company' : [] | [string],
19
+ 'message' : string,
20
+ 'timestamp' : bigint,
21
+ 'phone' : [] | [string],
22
+ 'processed' : boolean,
23
+ }
24
+ export interface _SERVICE {
25
+ 'formatNotificationAsEmail' : ActorMethod<[bigint], [] | [string]>,
26
+ 'getAllNotifications' : ActorMethod<[], Array<EmailNotification>>,
27
+ 'getNotification' : ActorMethod<[bigint], [] | [EmailNotification]>,
28
+ 'getUnprocessedCount' : ActorMethod<[], bigint>,
29
+ 'getUnprocessedNotifications' : ActorMethod<[], Array<EmailNotification>>,
30
+ 'markAsProcessed' : ActorMethod<[bigint], boolean>,
31
+ 'submitPartnerInquiry' : ActorMethod<
32
+ [string, string, string, string, string, string],
33
+ bigint
34
+ >,
35
+ 'submitSalesInquiry' : ActorMethod<
36
+ [string, string, string, string, string, string, string],
37
+ bigint
38
+ >,
39
+ 'submitSupportRequest' : ActorMethod<
40
+ [string, string, string, string],
41
+ bigint
42
+ >,
43
+ }
44
+ export declare const idlFactory: IDL.InterfaceFactory;
45
+ export declare const init: (args: { IDL: typeof IDL }) => IDL.Type[];
@@ -0,0 +1,63 @@
1
+ export const idlFactory = ({ IDL }) => {
2
+ const ContactType = IDL.Variant({
3
+ 'support' : IDL.Null,
4
+ 'partners' : IDL.Null,
5
+ 'sales' : IDL.Null,
6
+ });
7
+ const EmailNotification = IDL.Record({
8
+ 'id' : IDL.Nat,
9
+ 'userType' : IDL.Opt(IDL.Text),
10
+ 'contactType' : ContactType,
11
+ 'subject' : IDL.Text,
12
+ 'partnerType' : IDL.Opt(IDL.Text),
13
+ 'name' : IDL.Text,
14
+ 'volume' : IDL.Opt(IDL.Text),
15
+ 'email' : IDL.Text,
16
+ 'website' : IDL.Opt(IDL.Text),
17
+ 'company' : IDL.Opt(IDL.Text),
18
+ 'message' : IDL.Text,
19
+ 'timestamp' : IDL.Int,
20
+ 'phone' : IDL.Opt(IDL.Text),
21
+ 'processed' : IDL.Bool,
22
+ });
23
+ return IDL.Service({
24
+ 'formatNotificationAsEmail' : IDL.Func(
25
+ [IDL.Nat],
26
+ [IDL.Opt(IDL.Text)],
27
+ ['query'],
28
+ ),
29
+ 'getAllNotifications' : IDL.Func(
30
+ [],
31
+ [IDL.Vec(EmailNotification)],
32
+ ['query'],
33
+ ),
34
+ 'getNotification' : IDL.Func(
35
+ [IDL.Nat],
36
+ [IDL.Opt(EmailNotification)],
37
+ ['query'],
38
+ ),
39
+ 'getUnprocessedCount' : IDL.Func([], [IDL.Nat], ['query']),
40
+ 'getUnprocessedNotifications' : IDL.Func(
41
+ [],
42
+ [IDL.Vec(EmailNotification)],
43
+ ['query'],
44
+ ),
45
+ 'markAsProcessed' : IDL.Func([IDL.Nat], [IDL.Bool], []),
46
+ 'submitPartnerInquiry' : IDL.Func(
47
+ [IDL.Text, IDL.Text, IDL.Text, IDL.Text, IDL.Text, IDL.Text],
48
+ [IDL.Nat],
49
+ [],
50
+ ),
51
+ 'submitSalesInquiry' : IDL.Func(
52
+ [IDL.Text, IDL.Text, IDL.Text, IDL.Text, IDL.Text, IDL.Text, IDL.Text],
53
+ [IDL.Nat],
54
+ [],
55
+ ),
56
+ 'submitSupportRequest' : IDL.Func(
57
+ [IDL.Text, IDL.Text, IDL.Text, IDL.Text],
58
+ [IDL.Nat],
59
+ [],
60
+ ),
61
+ });
62
+ };
63
+ export const init = ({ IDL }) => { return []; };
@@ -0,0 +1,5 @@
1
+ export { idlFactory } from "./email_service.did.js";
2
+ export type {
3
+ _SERVICE as EmailServiceService,
4
+ } from "./email_service.did.js";
5
+ export type * from "./email_service.did.js";
@@ -0,0 +1,5 @@
1
+ export { idlFactory } from "./land_registry_integration.did.js";
2
+ export type {
3
+ _SERVICE as LandRegistryIntegrationService,
4
+ } from "./land_registry_integration.did.js";
5
+ export type * from "./land_registry_integration.did.js";
@@ -0,0 +1,169 @@
1
+ type TransactionStatus =
2
+ variant {
3
+ confirmed;
4
+ failed;
5
+ pending_api_call;
6
+ requires_manual_review;
7
+ sent_to_lr;
8
+ };
9
+ type Result_4 =
10
+ variant {
11
+ err: text;
12
+ ok: LandRegistryAPIResponse;
13
+ };
14
+ type Result_3 =
15
+ variant {
16
+ err: text;
17
+ ok: nat32;
18
+ };
19
+ type Result_2 =
20
+ variant {
21
+ err: text;
22
+ ok: OwnershipTransferPayload;
23
+ };
24
+ type Result_1 =
25
+ variant {
26
+ err: text;
27
+ ok: text;
28
+ };
29
+ type Result =
30
+ variant {
31
+ err: text;
32
+ ok: bool;
33
+ };
34
+ type Period =
35
+ variant {
36
+ day;
37
+ month;
38
+ week;
39
+ year;
40
+ };
41
+ type OwnershipTransferPayload =
42
+ record {
43
+ blockchainCompletionProof: text;
44
+ blockchainCompletionTimestamp: int;
45
+ blockchainProofHash: text;
46
+ buyerSolicitorSignature: text;
47
+ contractExchangeTimestamp: int;
48
+ conveyancerDetails: ConveyancerInfo;
49
+ newOwnerDetails: NewOwnerInfo;
50
+ postcode: text;
51
+ previousOwner: text;
52
+ propertyAddress: text;
53
+ sellerSolicitorSignature: text;
54
+ titleNumber: text;
55
+ transactionAmount: nat64;
56
+ transactionDate: int;
57
+ transferID: text;
58
+ };
59
+ type NewOwnerInfo =
60
+ record {
61
+ address: text;
62
+ contactEmail: text;
63
+ name: text;
64
+ };
65
+ type LandRegistryTransactionRecord =
66
+ record {
67
+ apiResponse: opt LandRegistryAPIResponse;
68
+ blockchainTransactionID: text;
69
+ createdAt: int;
70
+ landRegistryPayload: OwnershipTransferPayload;
71
+ lastUpdated: int;
72
+ maxRetries: nat32;
73
+ nextRetryTime: opt int;
74
+ retryCount: nat32;
75
+ status: TransactionStatus;
76
+ transactionID: text;
77
+ };
78
+ type LandRegistryStats =
79
+ record {
80
+ avgTimeToRegistration: nat32;
81
+ failed: nat32;
82
+ pending: nat32;
83
+ successful: nat32;
84
+ totalSubmissions: nat32;
85
+ };
86
+ type LandRegistryAPIResponse =
87
+ record {
88
+ errorMessage: opt text;
89
+ estimatedCompletionTime: int;
90
+ landRegistryConfirmationNumber: text;
91
+ processedTimestamp: opt int;
92
+ receivedTimestamp: int;
93
+ registeredTimestamp: opt int;
94
+ responseID: text;
95
+ status: LRStatus;
96
+ };
97
+ type LandRegistryAPICredentials =
98
+ record {
99
+ apiEndpoint: text;
100
+ apiKey: text;
101
+ authenticationType: AuthenticationType;
102
+ environment: Environment;
103
+ lastValidated: int;
104
+ };
105
+ type LRStatus =
106
+ variant {
107
+ failed;
108
+ processing;
109
+ received;
110
+ registered;
111
+ };
112
+ type Environment =
113
+ variant {
114
+ production;
115
+ sandbox;
116
+ };
117
+ type ConveyancerInfo =
118
+ record {
119
+ contactEmail: text;
120
+ licenseNumber: text;
121
+ name: text;
122
+ };
123
+ type AuthenticationType =
124
+ variant {
125
+ api_key;
126
+ oauth2;
127
+ };
128
+ service : {
129
+ check_land_registry_status: (transactionID: text) ->
130
+ (opt LandRegistryTransactionRecord) query;
131
+ configure_land_registry_api: (credentials: LandRegistryAPICredentials) ->
132
+ (Result_1);
133
+ getCycles: () -> (nat) query;
134
+ get_all_pending_land_registry_submissions: (companyAccountID: text) ->
135
+ (vec LandRegistryTransactionRecord) query;
136
+ get_all_transactions: () ->
137
+ (vec record {
138
+ text;
139
+ LandRegistryTransactionRecord;
140
+ }) query;
141
+ get_land_registry_stats: (companyAccountID: text, period: Period) ->
142
+ (LandRegistryStats) query;
143
+ get_land_registry_status: () ->
144
+ (opt
145
+ record {
146
+ apiEndpoint: text;
147
+ environment: Environment;
148
+ lastValidated: int;
149
+ }) query;
150
+ get_lr_response: (confirmationID: text) -> (Result_4) query;
151
+ log_land_registry_error: (transactionID: text, errorDetails: text) ->
152
+ (Result_3);
153
+ prepare_ownership_transfer_payload: (transactionID: text,
154
+ blockchainTransactionID: text, propertyAddress: text, postcode: text,
155
+ titleNumber: text, previousOwner: text, newOwnerDetails: NewOwnerInfo,
156
+ conveyancerDetails: ConveyancerInfo, transactionAmount: nat64,
157
+ buyerSolicitorSignature: text, sellerSolicitorSignature: text,
158
+ blockchainProofHash: text, blockchainCompletionProof: text,
159
+ contractExchangeTimestamp: int, blockchainCompletionTimestamp: int) ->
160
+ (Result_2);
161
+ receive_land_registry_callback: (callbackData: LandRegistryAPIResponse) ->
162
+ (Result_1);
163
+ retry_failed_land_registry_transmission: (transactionID: text) ->
164
+ (Result_1);
165
+ send_to_land_registry: (transactionID: text) -> (Result_1);
166
+ simulate_land_registry_processing: (confirmationNumber: text) -> (Result_1);
167
+ validate_land_registry_connection: () -> (Result);
168
+ verify_land_registry_receipt: (transactionID: text) -> (Result);
169
+ }
@@ -0,0 +1,157 @@
1
+ import type { Principal } from '@dfinity/principal';
2
+ import type { ActorMethod } from '@dfinity/agent';
3
+ import type { IDL } from '@dfinity/candid';
4
+
5
+ export type AuthenticationType = { 'api_key' : null } |
6
+ { 'oauth2' : null };
7
+ export interface ConveyancerInfo {
8
+ 'name' : string,
9
+ 'contactEmail' : string,
10
+ 'licenseNumber' : string,
11
+ }
12
+ export type Environment = { 'sandbox' : null } |
13
+ { 'production' : null };
14
+ export type LRStatus = { 'processing' : null } |
15
+ { 'received' : null } |
16
+ { 'failed' : null } |
17
+ { 'registered' : null };
18
+ export interface LandRegistryAPICredentials {
19
+ 'authenticationType' : AuthenticationType,
20
+ 'lastValidated' : bigint,
21
+ 'apiEndpoint' : string,
22
+ 'apiKey' : string,
23
+ 'environment' : Environment,
24
+ }
25
+ export interface LandRegistryAPIResponse {
26
+ 'status' : LRStatus,
27
+ 'registeredTimestamp' : [] | [bigint],
28
+ 'processedTimestamp' : [] | [bigint],
29
+ 'errorMessage' : [] | [string],
30
+ 'receivedTimestamp' : bigint,
31
+ 'responseID' : string,
32
+ 'estimatedCompletionTime' : bigint,
33
+ 'landRegistryConfirmationNumber' : string,
34
+ }
35
+ export interface LandRegistryStats {
36
+ 'pending' : number,
37
+ 'totalSubmissions' : number,
38
+ 'avgTimeToRegistration' : number,
39
+ 'successful' : number,
40
+ 'failed' : number,
41
+ }
42
+ export interface LandRegistryTransactionRecord {
43
+ 'status' : TransactionStatus,
44
+ 'createdAt' : bigint,
45
+ 'lastUpdated' : bigint,
46
+ 'maxRetries' : number,
47
+ 'landRegistryPayload' : OwnershipTransferPayload,
48
+ 'retryCount' : number,
49
+ 'nextRetryTime' : [] | [bigint],
50
+ 'blockchainTransactionID' : string,
51
+ 'apiResponse' : [] | [LandRegistryAPIResponse],
52
+ 'transactionID' : string,
53
+ }
54
+ export interface NewOwnerInfo {
55
+ 'name' : string,
56
+ 'address' : string,
57
+ 'contactEmail' : string,
58
+ }
59
+ export interface OwnershipTransferPayload {
60
+ 'transactionDate' : bigint,
61
+ 'postcode' : string,
62
+ 'sellerSolicitorSignature' : string,
63
+ 'buyerSolicitorSignature' : string,
64
+ 'titleNumber' : string,
65
+ 'newOwnerDetails' : NewOwnerInfo,
66
+ 'blockchainCompletionProof' : string,
67
+ 'previousOwner' : string,
68
+ 'propertyAddress' : string,
69
+ 'contractExchangeTimestamp' : bigint,
70
+ 'blockchainProofHash' : string,
71
+ 'transactionAmount' : bigint,
72
+ 'transferID' : string,
73
+ 'conveyancerDetails' : ConveyancerInfo,
74
+ 'blockchainCompletionTimestamp' : bigint,
75
+ }
76
+ export type Period = { 'day' : null } |
77
+ { 'month' : null } |
78
+ { 'week' : null } |
79
+ { 'year' : null };
80
+ export type Result = { 'ok' : boolean } |
81
+ { 'err' : string };
82
+ export type Result_1 = { 'ok' : string } |
83
+ { 'err' : string };
84
+ export type Result_2 = { 'ok' : OwnershipTransferPayload } |
85
+ { 'err' : string };
86
+ export type Result_3 = { 'ok' : number } |
87
+ { 'err' : string };
88
+ export type Result_4 = { 'ok' : LandRegistryAPIResponse } |
89
+ { 'err' : string };
90
+ export type TransactionStatus = { 'sent_to_lr' : null } |
91
+ { 'requires_manual_review' : null } |
92
+ { 'pending_api_call' : null } |
93
+ { 'confirmed' : null } |
94
+ { 'failed' : null };
95
+ export interface _SERVICE {
96
+ 'check_land_registry_status' : ActorMethod<
97
+ [string],
98
+ [] | [LandRegistryTransactionRecord]
99
+ >,
100
+ 'configure_land_registry_api' : ActorMethod<
101
+ [LandRegistryAPICredentials],
102
+ Result_1
103
+ >,
104
+ 'getCycles' : ActorMethod<[], bigint>,
105
+ 'get_all_pending_land_registry_submissions' : ActorMethod<
106
+ [string],
107
+ Array<LandRegistryTransactionRecord>
108
+ >,
109
+ 'get_all_transactions' : ActorMethod<
110
+ [],
111
+ Array<[string, LandRegistryTransactionRecord]>
112
+ >,
113
+ 'get_land_registry_stats' : ActorMethod<[string, Period], LandRegistryStats>,
114
+ 'get_land_registry_status' : ActorMethod<
115
+ [],
116
+ [] | [
117
+ {
118
+ 'lastValidated' : bigint,
119
+ 'apiEndpoint' : string,
120
+ 'environment' : Environment,
121
+ }
122
+ ]
123
+ >,
124
+ 'get_lr_response' : ActorMethod<[string], Result_4>,
125
+ 'log_land_registry_error' : ActorMethod<[string, string], Result_3>,
126
+ 'prepare_ownership_transfer_payload' : ActorMethod<
127
+ [
128
+ string,
129
+ string,
130
+ string,
131
+ string,
132
+ string,
133
+ string,
134
+ NewOwnerInfo,
135
+ ConveyancerInfo,
136
+ bigint,
137
+ string,
138
+ string,
139
+ string,
140
+ string,
141
+ bigint,
142
+ bigint,
143
+ ],
144
+ Result_2
145
+ >,
146
+ 'receive_land_registry_callback' : ActorMethod<
147
+ [LandRegistryAPIResponse],
148
+ Result_1
149
+ >,
150
+ 'retry_failed_land_registry_transmission' : ActorMethod<[string], Result_1>,
151
+ 'send_to_land_registry' : ActorMethod<[string], Result_1>,
152
+ 'simulate_land_registry_processing' : ActorMethod<[string], Result_1>,
153
+ 'validate_land_registry_connection' : ActorMethod<[], Result>,
154
+ 'verify_land_registry_receipt' : ActorMethod<[string], Result>,
155
+ }
156
+ export declare const idlFactory: IDL.InterfaceFactory;
157
+ export declare const init: (args: { IDL: typeof IDL }) => IDL.Type[];
@@ -0,0 +1,182 @@
1
+ export const idlFactory = ({ IDL }) => {
2
+ const TransactionStatus = IDL.Variant({
3
+ 'sent_to_lr' : IDL.Null,
4
+ 'requires_manual_review' : IDL.Null,
5
+ 'pending_api_call' : IDL.Null,
6
+ 'confirmed' : IDL.Null,
7
+ 'failed' : IDL.Null,
8
+ });
9
+ const NewOwnerInfo = IDL.Record({
10
+ 'name' : IDL.Text,
11
+ 'address' : IDL.Text,
12
+ 'contactEmail' : IDL.Text,
13
+ });
14
+ const ConveyancerInfo = IDL.Record({
15
+ 'name' : IDL.Text,
16
+ 'contactEmail' : IDL.Text,
17
+ 'licenseNumber' : IDL.Text,
18
+ });
19
+ const OwnershipTransferPayload = IDL.Record({
20
+ 'transactionDate' : IDL.Int,
21
+ 'postcode' : IDL.Text,
22
+ 'sellerSolicitorSignature' : IDL.Text,
23
+ 'buyerSolicitorSignature' : IDL.Text,
24
+ 'titleNumber' : IDL.Text,
25
+ 'newOwnerDetails' : NewOwnerInfo,
26
+ 'blockchainCompletionProof' : IDL.Text,
27
+ 'previousOwner' : IDL.Text,
28
+ 'propertyAddress' : IDL.Text,
29
+ 'contractExchangeTimestamp' : IDL.Int,
30
+ 'blockchainProofHash' : IDL.Text,
31
+ 'transactionAmount' : IDL.Nat64,
32
+ 'transferID' : IDL.Text,
33
+ 'conveyancerDetails' : ConveyancerInfo,
34
+ 'blockchainCompletionTimestamp' : IDL.Int,
35
+ });
36
+ const LRStatus = IDL.Variant({
37
+ 'processing' : IDL.Null,
38
+ 'received' : IDL.Null,
39
+ 'failed' : IDL.Null,
40
+ 'registered' : IDL.Null,
41
+ });
42
+ const LandRegistryAPIResponse = IDL.Record({
43
+ 'status' : LRStatus,
44
+ 'registeredTimestamp' : IDL.Opt(IDL.Int),
45
+ 'processedTimestamp' : IDL.Opt(IDL.Int),
46
+ 'errorMessage' : IDL.Opt(IDL.Text),
47
+ 'receivedTimestamp' : IDL.Int,
48
+ 'responseID' : IDL.Text,
49
+ 'estimatedCompletionTime' : IDL.Int,
50
+ 'landRegistryConfirmationNumber' : IDL.Text,
51
+ });
52
+ const LandRegistryTransactionRecord = IDL.Record({
53
+ 'status' : TransactionStatus,
54
+ 'createdAt' : IDL.Int,
55
+ 'lastUpdated' : IDL.Int,
56
+ 'maxRetries' : IDL.Nat32,
57
+ 'landRegistryPayload' : OwnershipTransferPayload,
58
+ 'retryCount' : IDL.Nat32,
59
+ 'nextRetryTime' : IDL.Opt(IDL.Int),
60
+ 'blockchainTransactionID' : IDL.Text,
61
+ 'apiResponse' : IDL.Opt(LandRegistryAPIResponse),
62
+ 'transactionID' : IDL.Text,
63
+ });
64
+ const AuthenticationType = IDL.Variant({
65
+ 'api_key' : IDL.Null,
66
+ 'oauth2' : IDL.Null,
67
+ });
68
+ const Environment = IDL.Variant({
69
+ 'sandbox' : IDL.Null,
70
+ 'production' : IDL.Null,
71
+ });
72
+ const LandRegistryAPICredentials = IDL.Record({
73
+ 'authenticationType' : AuthenticationType,
74
+ 'lastValidated' : IDL.Int,
75
+ 'apiEndpoint' : IDL.Text,
76
+ 'apiKey' : IDL.Text,
77
+ 'environment' : Environment,
78
+ });
79
+ const Result_1 = IDL.Variant({ 'ok' : IDL.Text, 'err' : IDL.Text });
80
+ const Period = IDL.Variant({
81
+ 'day' : IDL.Null,
82
+ 'month' : IDL.Null,
83
+ 'week' : IDL.Null,
84
+ 'year' : IDL.Null,
85
+ });
86
+ const LandRegistryStats = IDL.Record({
87
+ 'pending' : IDL.Nat32,
88
+ 'totalSubmissions' : IDL.Nat32,
89
+ 'avgTimeToRegistration' : IDL.Nat32,
90
+ 'successful' : IDL.Nat32,
91
+ 'failed' : IDL.Nat32,
92
+ });
93
+ const Result_4 = IDL.Variant({
94
+ 'ok' : LandRegistryAPIResponse,
95
+ 'err' : IDL.Text,
96
+ });
97
+ const Result_3 = IDL.Variant({ 'ok' : IDL.Nat32, 'err' : IDL.Text });
98
+ const Result_2 = IDL.Variant({
99
+ 'ok' : OwnershipTransferPayload,
100
+ 'err' : IDL.Text,
101
+ });
102
+ const Result = IDL.Variant({ 'ok' : IDL.Bool, 'err' : IDL.Text });
103
+ return IDL.Service({
104
+ 'check_land_registry_status' : IDL.Func(
105
+ [IDL.Text],
106
+ [IDL.Opt(LandRegistryTransactionRecord)],
107
+ ['query'],
108
+ ),
109
+ 'configure_land_registry_api' : IDL.Func(
110
+ [LandRegistryAPICredentials],
111
+ [Result_1],
112
+ [],
113
+ ),
114
+ 'getCycles' : IDL.Func([], [IDL.Nat], ['query']),
115
+ 'get_all_pending_land_registry_submissions' : IDL.Func(
116
+ [IDL.Text],
117
+ [IDL.Vec(LandRegistryTransactionRecord)],
118
+ ['query'],
119
+ ),
120
+ 'get_all_transactions' : IDL.Func(
121
+ [],
122
+ [IDL.Vec(IDL.Tuple(IDL.Text, LandRegistryTransactionRecord))],
123
+ ['query'],
124
+ ),
125
+ 'get_land_registry_stats' : IDL.Func(
126
+ [IDL.Text, Period],
127
+ [LandRegistryStats],
128
+ ['query'],
129
+ ),
130
+ 'get_land_registry_status' : IDL.Func(
131
+ [],
132
+ [
133
+ IDL.Opt(
134
+ IDL.Record({
135
+ 'lastValidated' : IDL.Int,
136
+ 'apiEndpoint' : IDL.Text,
137
+ 'environment' : Environment,
138
+ })
139
+ ),
140
+ ],
141
+ ['query'],
142
+ ),
143
+ 'get_lr_response' : IDL.Func([IDL.Text], [Result_4], ['query']),
144
+ 'log_land_registry_error' : IDL.Func([IDL.Text, IDL.Text], [Result_3], []),
145
+ 'prepare_ownership_transfer_payload' : IDL.Func(
146
+ [
147
+ IDL.Text,
148
+ IDL.Text,
149
+ IDL.Text,
150
+ IDL.Text,
151
+ IDL.Text,
152
+ IDL.Text,
153
+ NewOwnerInfo,
154
+ ConveyancerInfo,
155
+ IDL.Nat64,
156
+ IDL.Text,
157
+ IDL.Text,
158
+ IDL.Text,
159
+ IDL.Text,
160
+ IDL.Int,
161
+ IDL.Int,
162
+ ],
163
+ [Result_2],
164
+ [],
165
+ ),
166
+ 'receive_land_registry_callback' : IDL.Func(
167
+ [LandRegistryAPIResponse],
168
+ [Result_1],
169
+ [],
170
+ ),
171
+ 'retry_failed_land_registry_transmission' : IDL.Func(
172
+ [IDL.Text],
173
+ [Result_1],
174
+ [],
175
+ ),
176
+ 'send_to_land_registry' : IDL.Func([IDL.Text], [Result_1], []),
177
+ 'simulate_land_registry_processing' : IDL.Func([IDL.Text], [Result_1], []),
178
+ 'validate_land_registry_connection' : IDL.Func([], [Result], []),
179
+ 'verify_land_registry_receipt' : IDL.Func([IDL.Text], [Result], []),
180
+ });
181
+ };
182
+ export const init = ({ IDL }) => { return []; };
@@ -0,0 +1,5 @@
1
+ export { idlFactory } from "./property_registry.did.js";
2
+ export type {
3
+ _SERVICE as PropertyRegistryService,
4
+ } from "./property_registry.did.js";
5
+ export type * from "./property_registry.did.js";