@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.
- package/README.md +115 -0
- package/dist/canisters/document_storage/document_storage.did.d.ts +7 -0
- package/dist/canisters/document_storage/document_storage.did.d.ts.map +1 -0
- package/dist/canisters/document_storage/document_storage.did.js +82 -0
- package/dist/canisters/document_storage/document_storage.did.js.map +1 -0
- package/dist/canisters/document_storage/index.d.ts +4 -0
- package/dist/canisters/document_storage/index.d.ts.map +1 -0
- package/dist/canisters/document_storage/index.js +2 -0
- package/dist/canisters/document_storage/index.js.map +1 -0
- package/dist/canisters/ledger_manager/index.d.ts +4 -0
- package/dist/canisters/ledger_manager/index.d.ts.map +1 -0
- package/dist/canisters/ledger_manager/index.js +2 -0
- package/dist/canisters/ledger_manager/index.js.map +1 -0
- package/dist/canisters/ledger_manager/ledger_manager.did.d.ts +7 -0
- package/dist/canisters/ledger_manager/ledger_manager.did.d.ts.map +1 -0
- package/dist/canisters/ledger_manager/ledger_manager.did.js +138 -0
- package/dist/canisters/ledger_manager/ledger_manager.did.js.map +1 -0
- package/dist/canisters/transaction_manager/index.d.ts +4 -0
- package/dist/canisters/transaction_manager/index.d.ts.map +1 -0
- package/dist/canisters/transaction_manager/index.js +2 -0
- package/dist/canisters/transaction_manager/index.js.map +1 -0
- package/dist/canisters/transaction_manager/transaction_manager.did.d.ts +7 -0
- package/dist/canisters/transaction_manager/transaction_manager.did.d.ts.map +1 -0
- package/dist/canisters/transaction_manager/transaction_manager.did.js +515 -0
- package/dist/canisters/transaction_manager/transaction_manager.did.js.map +1 -0
- package/dist/canisters/user_management/index.d.ts +4 -0
- package/dist/canisters/user_management/index.d.ts.map +1 -0
- package/dist/canisters/user_management/index.js +2 -0
- package/dist/canisters/user_management/index.js.map +1 -0
- package/dist/canisters/user_management/user_management.did.d.ts +7 -0
- package/dist/canisters/user_management/user_management.did.d.ts.map +1 -0
- package/dist/canisters/user_management/user_management.did.js +137 -0
- package/dist/canisters/user_management/user_management.did.js.map +1 -0
- package/dist/client.d.ts +13 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +41 -0
- package/dist/client.js.map +1 -0
- package/dist/errors.d.ts +8 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +22 -0
- package/dist/errors.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -0
- package/dist/mock.d.ts +22 -0
- package/dist/mock.d.ts.map +1 -0
- package/dist/mock.js +94 -0
- package/dist/mock.js.map +1 -0
- package/dist/retry.d.ts +11 -0
- package/dist/retry.d.ts.map +1 -0
- package/dist/retry.js +22 -0
- package/dist/retry.js.map +1 -0
- package/dist/stubs.d.ts +34 -0
- package/dist/stubs.d.ts.map +1 -0
- package/dist/stubs.js +17 -0
- package/dist/stubs.js.map +1 -0
- package/dist/types.d.ts +30 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +7 -0
- package/dist/types.js.map +1 -0
- package/package.json +58 -0
- package/src/canisters/document_storage/document_storage.did +89 -0
- package/src/canisters/document_storage/document_storage.did.d.ts +82 -0
- package/src/canisters/document_storage/document_storage.did.js +121 -0
- package/src/canisters/document_storage/index.ts +5 -0
- package/src/canisters/ledger_manager/index.ts +5 -0
- package/src/canisters/ledger_manager/ledger_manager.did +154 -0
- package/src/canisters/ledger_manager/ledger_manager.did.d.ts +139 -0
- package/src/canisters/ledger_manager/ledger_manager.did.js +181 -0
- package/src/canisters/transaction_manager/index.ts +5 -0
- package/src/canisters/transaction_manager/transaction_manager.did +599 -0
- package/src/canisters/transaction_manager/transaction_manager.did.d.ts +517 -0
- package/src/canisters/transaction_manager/transaction_manager.did.js +638 -0
- package/src/canisters/user_management/index.ts +5 -0
- package/src/canisters/user_management/user_management.did +147 -0
- package/src/canisters/user_management/user_management.did.d.ts +148 -0
- package/src/canisters/user_management/user_management.did.js +192 -0
- package/src/client.ts +77 -0
- package/src/errors.ts +31 -0
- package/src/index.ts +30 -0
- package/src/mock.ts +120 -0
- package/src/retry.ts +44 -0
- package/src/stubs.ts +60 -0
- 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 []; };
|