@propxchain/core-client 0.1.0-canary.3

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 (85) hide show
  1. package/README.md +115 -0
  2. package/dist/canisters/document_storage/document_storage.did.d.ts +7 -0
  3. package/dist/canisters/document_storage/document_storage.did.d.ts.map +1 -0
  4. package/dist/canisters/document_storage/document_storage.did.js +82 -0
  5. package/dist/canisters/document_storage/document_storage.did.js.map +1 -0
  6. package/dist/canisters/document_storage/index.d.ts +4 -0
  7. package/dist/canisters/document_storage/index.d.ts.map +1 -0
  8. package/dist/canisters/document_storage/index.js +2 -0
  9. package/dist/canisters/document_storage/index.js.map +1 -0
  10. package/dist/canisters/ledger_manager/index.d.ts +4 -0
  11. package/dist/canisters/ledger_manager/index.d.ts.map +1 -0
  12. package/dist/canisters/ledger_manager/index.js +2 -0
  13. package/dist/canisters/ledger_manager/index.js.map +1 -0
  14. package/dist/canisters/ledger_manager/ledger_manager.did.d.ts +7 -0
  15. package/dist/canisters/ledger_manager/ledger_manager.did.d.ts.map +1 -0
  16. package/dist/canisters/ledger_manager/ledger_manager.did.js +138 -0
  17. package/dist/canisters/ledger_manager/ledger_manager.did.js.map +1 -0
  18. package/dist/canisters/transaction_manager/index.d.ts +4 -0
  19. package/dist/canisters/transaction_manager/index.d.ts.map +1 -0
  20. package/dist/canisters/transaction_manager/index.js +2 -0
  21. package/dist/canisters/transaction_manager/index.js.map +1 -0
  22. package/dist/canisters/transaction_manager/transaction_manager.did.d.ts +7 -0
  23. package/dist/canisters/transaction_manager/transaction_manager.did.d.ts.map +1 -0
  24. package/dist/canisters/transaction_manager/transaction_manager.did.js +515 -0
  25. package/dist/canisters/transaction_manager/transaction_manager.did.js.map +1 -0
  26. package/dist/canisters/user_management/index.d.ts +4 -0
  27. package/dist/canisters/user_management/index.d.ts.map +1 -0
  28. package/dist/canisters/user_management/index.js +2 -0
  29. package/dist/canisters/user_management/index.js.map +1 -0
  30. package/dist/canisters/user_management/user_management.did.d.ts +7 -0
  31. package/dist/canisters/user_management/user_management.did.d.ts.map +1 -0
  32. package/dist/canisters/user_management/user_management.did.js +137 -0
  33. package/dist/canisters/user_management/user_management.did.js.map +1 -0
  34. package/dist/client.d.ts +13 -0
  35. package/dist/client.d.ts.map +1 -0
  36. package/dist/client.js +41 -0
  37. package/dist/client.js.map +1 -0
  38. package/dist/errors.d.ts +8 -0
  39. package/dist/errors.d.ts.map +1 -0
  40. package/dist/errors.js +22 -0
  41. package/dist/errors.js.map +1 -0
  42. package/dist/index.d.ts +7 -0
  43. package/dist/index.d.ts.map +1 -0
  44. package/dist/index.js +7 -0
  45. package/dist/index.js.map +1 -0
  46. package/dist/mock.d.ts +22 -0
  47. package/dist/mock.d.ts.map +1 -0
  48. package/dist/mock.js +94 -0
  49. package/dist/mock.js.map +1 -0
  50. package/dist/retry.d.ts +11 -0
  51. package/dist/retry.d.ts.map +1 -0
  52. package/dist/retry.js +22 -0
  53. package/dist/retry.js.map +1 -0
  54. package/dist/stubs.d.ts +34 -0
  55. package/dist/stubs.d.ts.map +1 -0
  56. package/dist/stubs.js +17 -0
  57. package/dist/stubs.js.map +1 -0
  58. package/dist/types.d.ts +30 -0
  59. package/dist/types.d.ts.map +1 -0
  60. package/dist/types.js +7 -0
  61. package/dist/types.js.map +1 -0
  62. package/package.json +58 -0
  63. package/src/canisters/document_storage/document_storage.did +89 -0
  64. package/src/canisters/document_storage/document_storage.did.d.ts +82 -0
  65. package/src/canisters/document_storage/document_storage.did.js +121 -0
  66. package/src/canisters/document_storage/index.ts +5 -0
  67. package/src/canisters/ledger_manager/index.ts +5 -0
  68. package/src/canisters/ledger_manager/ledger_manager.did +154 -0
  69. package/src/canisters/ledger_manager/ledger_manager.did.d.ts +139 -0
  70. package/src/canisters/ledger_manager/ledger_manager.did.js +181 -0
  71. package/src/canisters/transaction_manager/index.ts +5 -0
  72. package/src/canisters/transaction_manager/transaction_manager.did +599 -0
  73. package/src/canisters/transaction_manager/transaction_manager.did.d.ts +517 -0
  74. package/src/canisters/transaction_manager/transaction_manager.did.js +638 -0
  75. package/src/canisters/user_management/index.ts +5 -0
  76. package/src/canisters/user_management/user_management.did +147 -0
  77. package/src/canisters/user_management/user_management.did.d.ts +148 -0
  78. package/src/canisters/user_management/user_management.did.js +192 -0
  79. package/src/client.ts +77 -0
  80. package/src/errors.ts +31 -0
  81. package/src/index.ts +30 -0
  82. package/src/mock.ts +120 -0
  83. package/src/retry.ts +44 -0
  84. package/src/stubs.ts +60 -0
  85. package/src/types.ts +44 -0
@@ -0,0 +1,181 @@
1
+ export const idlFactory = ({ IDL }) => {
2
+ const TransactionRole = IDL.Variant({
3
+ 'agent' : IDL.Null,
4
+ 'solicitor' : IDL.Null,
5
+ 'seller' : IDL.Null,
6
+ 'buyer' : IDL.Null,
7
+ });
8
+ const Counterparty = IDL.Record({
9
+ 'accountID' : IDL.Text,
10
+ 'name' : IDL.Text,
11
+ });
12
+ const TeamMemberRole = IDL.Variant({
13
+ 'manager' : IDL.Null,
14
+ 'admin' : IDL.Null,
15
+ 'viewer' : IDL.Null,
16
+ });
17
+ const TeamPermissions = IDL.Record({
18
+ 'canSign' : IDL.Bool,
19
+ 'canInitiate' : IDL.Bool,
20
+ 'canViewAnalytics' : IDL.Bool,
21
+ 'canManageTeam' : IDL.Bool,
22
+ });
23
+ const AccountType = IDL.Variant({
24
+ 'company' : IDL.Null,
25
+ 'individual' : IDL.Null,
26
+ });
27
+ const BlockchainEfficiencyMetrics = IDL.Record({
28
+ 'avgBlockchainCompletionDays' : IDL.Nat,
29
+ 'totalCostSaved' : IDL.Nat,
30
+ 'avgTraditionalCompletionDays' : IDL.Nat,
31
+ 'timeReductionPercent' : IDL.Nat,
32
+ 'avgTraditionalCost' : IDL.Nat,
33
+ 'avgBlockchainCost' : IDL.Nat,
34
+ 'transactionsCompleted' : IDL.Nat,
35
+ 'costReductionPercent' : IDL.Nat,
36
+ 'totalTimeSavedDays' : IDL.Nat,
37
+ });
38
+ const CompanyLedger = IDL.Record({
39
+ 'companyAccountID' : IDL.Text,
40
+ 'avgCompletionTime' : IDL.Nat,
41
+ 'costSavings' : IDL.Nat,
42
+ 'completedThisMonth' : IDL.Nat,
43
+ 'activeTransactions' : IDL.Nat,
44
+ 'teamMemberCount' : IDL.Nat,
45
+ 'totalTransactions' : IDL.Nat,
46
+ });
47
+ const Time = IDL.Int;
48
+ const CompanyTeamMember = IDL.Record({
49
+ 'memberID' : IDL.Text,
50
+ 'permissions' : TeamPermissions,
51
+ 'accountID' : IDL.Text,
52
+ 'joinDate' : Time,
53
+ 'name' : IDL.Text,
54
+ 'role' : TeamMemberRole,
55
+ 'email' : IDL.Text,
56
+ });
57
+ const Analytics = IDL.Record({
58
+ 'transactionVolume' : IDL.Nat,
59
+ 'avgCompletionTime' : IDL.Nat,
60
+ 'period' : IDL.Text,
61
+ 'totalCostSavings' : IDL.Nat,
62
+ 'completedTransactions' : IDL.Nat,
63
+ 'totalTransactions' : IDL.Nat,
64
+ });
65
+ const UserAccount = IDL.Record({
66
+ 'taxID' : IDL.Opt(IDL.Text),
67
+ 'accountID' : IDL.Text,
68
+ 'name' : IDL.Text,
69
+ 'isActive' : IDL.Bool,
70
+ 'email' : IDL.Text,
71
+ 'accountType' : AccountType,
72
+ 'companyName' : IDL.Opt(IDL.Text),
73
+ 'registrationDate' : Time,
74
+ });
75
+ const TransactionStatus = IDL.Variant({
76
+ 'active' : IDL.Null,
77
+ 'pending' : IDL.Null,
78
+ 'completed' : IDL.Null,
79
+ 'failed' : IDL.Null,
80
+ });
81
+ const VerificationStatus = IDL.Variant({
82
+ 'verified' : IDL.Null,
83
+ 'pending' : IDL.Null,
84
+ 'failed' : IDL.Null,
85
+ });
86
+ const DocumentVerification = IDL.Record({
87
+ 'mortgageApproval' : VerificationStatus,
88
+ 'propertyDeed' : VerificationStatus,
89
+ 'landRegistryConfirm' : VerificationStatus,
90
+ 'surveyReport' : VerificationStatus,
91
+ });
92
+ const UserLedgerEntry = IDL.Record({
93
+ 'completedDate' : IDL.Opt(Time),
94
+ 'initiatedDate' : Time,
95
+ 'status' : TransactionStatus,
96
+ 'accountID' : IDL.Text,
97
+ 'documentStatus' : DocumentVerification,
98
+ 'costsSaved' : IDL.Nat,
99
+ 'propertyAddress' : IDL.Text,
100
+ 'entryID' : IDL.Text,
101
+ 'propertyValue' : IDL.Nat,
102
+ 'roleInTransaction' : TransactionRole,
103
+ 'counterparties' : IDL.Vec(Counterparty),
104
+ 'transactionID' : IDL.Text,
105
+ });
106
+ const Result = IDL.Variant({ 'ok' : IDL.Text, 'err' : IDL.Text });
107
+ return IDL.Service({
108
+ 'addTransactionToLedger' : IDL.Func(
109
+ [
110
+ IDL.Text,
111
+ IDL.Text,
112
+ TransactionRole,
113
+ IDL.Text,
114
+ IDL.Nat,
115
+ IDL.Vec(Counterparty),
116
+ ],
117
+ [IDL.Bool],
118
+ [],
119
+ ),
120
+ 'createCompanyTeamMember' : IDL.Func(
121
+ [IDL.Text, IDL.Text, IDL.Text, TeamMemberRole, TeamPermissions],
122
+ [IDL.Text],
123
+ [],
124
+ ),
125
+ 'createUserAccount' : IDL.Func(
126
+ [IDL.Text, IDL.Text, AccountType, IDL.Opt(IDL.Text), IDL.Opt(IDL.Text)],
127
+ [IDL.Text],
128
+ [],
129
+ ),
130
+ 'getBlockchainEfficiencyMetrics' : IDL.Func(
131
+ [IDL.Text],
132
+ [BlockchainEfficiencyMetrics],
133
+ ['query'],
134
+ ),
135
+ 'getCompanyLedger' : IDL.Func([IDL.Text], [CompanyLedger], ['query']),
136
+ 'getCompanyTeamMembers' : IDL.Func(
137
+ [IDL.Text],
138
+ [IDL.Vec(CompanyTeamMember)],
139
+ ['query'],
140
+ ),
141
+ 'getCycles' : IDL.Func([], [IDL.Nat], ['query']),
142
+ 'getGlobalBlockchainStats' : IDL.Func(
143
+ [],
144
+ [BlockchainEfficiencyMetrics],
145
+ ['query'],
146
+ ),
147
+ 'getLedgerAnalytics' : IDL.Func(
148
+ [IDL.Text, IDL.Text],
149
+ [Analytics],
150
+ ['query'],
151
+ ),
152
+ 'getMyAccount' : IDL.Func([], [IDL.Opt(UserAccount)], ['query']),
153
+ 'getMyLedger' : IDL.Func([], [IDL.Vec(UserLedgerEntry)], ['query']),
154
+ 'getUserAccount' : IDL.Func([IDL.Text], [IDL.Opt(UserAccount)], ['query']),
155
+ 'getUserLedger' : IDL.Func(
156
+ [IDL.Text],
157
+ [IDL.Vec(UserLedgerEntry)],
158
+ ['query'],
159
+ ),
160
+ 'setDocumentVerificationCanister' : IDL.Func([IDL.Principal], [], []),
161
+ 'setPropertyRegistryCanister' : IDL.Func([IDL.Principal], [], []),
162
+ 'setTransactionManagerCanister' : IDL.Func([IDL.Principal], [], []),
163
+ 'setUserManagementCanister' : IDL.Func([IDL.Principal], [], []),
164
+ 'syncTransactionToLedger' : IDL.Func(
165
+ [IDL.Nat, IDL.Principal],
166
+ [Result],
167
+ [],
168
+ ),
169
+ 'updateTeamMemberPermissions' : IDL.Func(
170
+ [IDL.Text, IDL.Text, TeamPermissions],
171
+ [IDL.Bool],
172
+ [],
173
+ ),
174
+ 'updateTransactionStatus' : IDL.Func(
175
+ [IDL.Text, IDL.Text, TransactionStatus],
176
+ [IDL.Bool],
177
+ [],
178
+ ),
179
+ });
180
+ };
181
+ export const init = ({ IDL }) => { return []; };
@@ -0,0 +1,5 @@
1
+ export { idlFactory } from "./transaction_manager.did.js";
2
+ export type {
3
+ _SERVICE as TransactionManagerService,
4
+ } from "./transaction_manager.did.js";
5
+ export type * from "./transaction_manager.did.js";