@andrewkimjoseph/celina 0.4.0 → 0.4.2
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/bin/wrapper.js +2 -0
- package/package.json +5 -44
- package/LICENSE +0 -21
- package/README.md +0 -292
- package/assets/logo-black.png +0 -0
- package/assets/logo-yellow.png +0 -0
- package/assets/logo.png +0 -0
- package/bin/cli.js +0 -2
- package/build/abis/aave-pool.d.ts +0 -37
- package/build/abis/aave-pool.js +0 -26
- package/build/abis/aave-pool.js.map +0 -1
- package/build/abis/gooddollar-identity.d.ts +0 -61
- package/build/abis/gooddollar-identity.js +0 -38
- package/build/abis/gooddollar-identity.js.map +0 -1
- package/build/abis/self-registry.d.ts +0 -194
- package/build/abis/self-registry.js +0 -120
- package/build/abis/self-registry.js.map +0 -1
- package/build/clients/celo-client.d.ts +0 -13
- package/build/clients/celo-client.js +0 -39
- package/build/clients/celo-client.js.map +0 -1
- package/build/clients/ens-client.d.ts +0 -10
- package/build/clients/ens-client.js +0 -23
- package/build/clients/ens-client.js.map +0 -1
- package/build/clients/mento-sdk.d.ts +0 -2
- package/build/clients/mento-sdk.js +0 -9
- package/build/clients/mento-sdk.js.map +0 -1
- package/build/clients/self-api.d.ts +0 -82
- package/build/clients/self-api.js +0 -242
- package/build/clients/self-api.js.map +0 -1
- package/build/config/aave.d.ts +0 -11
- package/build/config/aave.js +0 -55
- package/build/config/aave.js.map +0 -1
- package/build/config/celina-tag.d.ts +0 -1
- package/build/config/celina-tag.js +0 -3
- package/build/config/celina-tag.js.map +0 -1
- package/build/config/chains.d.ts +0 -935
- package/build/config/chains.js +0 -251
- package/build/config/chains.js.map +0 -1
- package/build/config/env.d.ts +0 -7
- package/build/config/env.js +0 -9
- package/build/config/env.js.map +0 -1
- package/build/config/gooddollar.d.ts +0 -1
- package/build/config/gooddollar.js +0 -2
- package/build/config/gooddollar.js.map +0 -1
- package/build/config/load-env.d.ts +0 -1
- package/build/config/load-env.js +0 -4
- package/build/config/load-env.js.map +0 -1
- package/build/config/self.d.ts +0 -22
- package/build/config/self.js +0 -27
- package/build/config/self.js.map +0 -1
- package/build/context/app-context.d.ts +0 -28
- package/build/context/app-context.js +0 -28
- package/build/context/app-context.js.map +0 -1
- package/build/index.d.ts +0 -2
- package/build/index.js +0 -17
- package/build/index.js.map +0 -1
- package/build/schemas/common.d.ts +0 -6
- package/build/schemas/common.js +0 -24
- package/build/schemas/common.js.map +0 -1
- package/build/server/create-server.d.ts +0 -2
- package/build/server/create-server.js +0 -23
- package/build/server/create-server.js.map +0 -1
- package/build/server/instructions.d.ts +0 -1
- package/build/server/instructions.js +0 -22
- package/build/server/instructions.js.map +0 -1
- package/build/services/aave.service.d.ts +0 -29
- package/build/services/aave.service.js +0 -166
- package/build/services/aave.service.js.map +0 -1
- package/build/services/account.service.d.ts +0 -13
- package/build/services/account.service.js +0 -23
- package/build/services/account.service.js.map +0 -1
- package/build/services/blockchain.service.d.ts +0 -40
- package/build/services/blockchain.service.js +0 -81
- package/build/services/blockchain.service.js.map +0 -1
- package/build/services/ens.service.d.ts +0 -30
- package/build/services/ens.service.js +0 -78
- package/build/services/ens.service.js.map +0 -1
- package/build/services/gooddollar.service.d.ts +0 -38
- package/build/services/gooddollar.service.js +0 -127
- package/build/services/gooddollar.service.js.map +0 -1
- package/build/services/mento-fx.service.d.ts +0 -71
- package/build/services/mento-fx.service.js +0 -261
- package/build/services/mento-fx.service.js.map +0 -1
- package/build/services/self-session-store.d.ts +0 -19
- package/build/services/self-session-store.js +0 -28
- package/build/services/self-session-store.js.map +0 -1
- package/build/services/self.service.d.ts +0 -247
- package/build/services/self.service.js +0 -685
- package/build/services/self.service.js.map +0 -1
- package/build/services/token.service.d.ts +0 -54
- package/build/services/token.service.js +0 -147
- package/build/services/token.service.js.map +0 -1
- package/build/services/transaction.service.d.ts +0 -24
- package/build/services/transaction.service.js +0 -112
- package/build/services/transaction.service.js.map +0 -1
- package/build/tools/aave.tools.d.ts +0 -2
- package/build/tools/aave.tools.js +0 -55
- package/build/tools/aave.tools.js.map +0 -1
- package/build/tools/blockchain.tools.d.ts +0 -3
- package/build/tools/blockchain.tools.js +0 -88
- package/build/tools/blockchain.tools.js.map +0 -1
- package/build/tools/ens.tools.d.ts +0 -2
- package/build/tools/ens.tools.js +0 -27
- package/build/tools/ens.tools.js.map +0 -1
- package/build/tools/gooddollar.tools.d.ts +0 -2
- package/build/tools/gooddollar.tools.js +0 -23
- package/build/tools/gooddollar.tools.js.map +0 -1
- package/build/tools/helpers.d.ts +0 -3
- package/build/tools/helpers.js +0 -16
- package/build/tools/helpers.js.map +0 -1
- package/build/tools/index.d.ts +0 -5
- package/build/tools/index.js +0 -25
- package/build/tools/index.js.map +0 -1
- package/build/tools/mento-fx.tools.d.ts +0 -2
- package/build/tools/mento-fx.tools.js +0 -80
- package/build/tools/mento-fx.tools.js.map +0 -1
- package/build/tools/self.tools.d.ts +0 -2
- package/build/tools/self.tools.js +0 -242
- package/build/tools/self.tools.js.map +0 -1
- package/build/tools/token.tools.d.ts +0 -2
- package/build/tools/token.tools.js +0 -62
- package/build/tools/token.tools.js.map +0 -1
- package/build/tools/transaction.tools.d.ts +0 -2
- package/build/tools/transaction.tools.js +0 -49
- package/build/tools/transaction.tools.js.map +0 -1
- package/build/tools/types.d.ts +0 -5
- package/build/tools/types.js +0 -2
- package/build/tools/types.js.map +0 -1
- package/build/utils/erc20-allowance-storage.d.ts +0 -7
- package/build/utils/erc20-allowance-storage.js +0 -44
- package/build/utils/erc20-allowance-storage.js.map +0 -1
- package/build/utils/format-date.d.ts +0 -1
- package/build/utils/format-date.js +0 -12
- package/build/utils/format-date.js.map +0 -1
- package/build/utils/self-format.d.ts +0 -16
- package/build/utils/self-format.js +0 -59
- package/build/utils/self-format.js.map +0 -1
- package/build/utils/self-signing.d.ts +0 -4
- package/build/utils/self-signing.js +0 -38
- package/build/utils/self-signing.js.map +0 -1
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
export declare const selfRegistryAbi: readonly [{
|
|
2
|
-
readonly name: "isVerifiedAgent";
|
|
3
|
-
readonly type: "function";
|
|
4
|
-
readonly stateMutability: "view";
|
|
5
|
-
readonly inputs: readonly [{
|
|
6
|
-
readonly name: "agentPubKey";
|
|
7
|
-
readonly type: "bytes32";
|
|
8
|
-
}];
|
|
9
|
-
readonly outputs: readonly [{
|
|
10
|
-
readonly name: "";
|
|
11
|
-
readonly type: "bool";
|
|
12
|
-
}];
|
|
13
|
-
}, {
|
|
14
|
-
readonly name: "getAgentId";
|
|
15
|
-
readonly type: "function";
|
|
16
|
-
readonly stateMutability: "view";
|
|
17
|
-
readonly inputs: readonly [{
|
|
18
|
-
readonly name: "agentPubKey";
|
|
19
|
-
readonly type: "bytes32";
|
|
20
|
-
}];
|
|
21
|
-
readonly outputs: readonly [{
|
|
22
|
-
readonly name: "";
|
|
23
|
-
readonly type: "uint256";
|
|
24
|
-
}];
|
|
25
|
-
}, {
|
|
26
|
-
readonly name: "hasHumanProof";
|
|
27
|
-
readonly type: "function";
|
|
28
|
-
readonly stateMutability: "view";
|
|
29
|
-
readonly inputs: readonly [{
|
|
30
|
-
readonly name: "agentId";
|
|
31
|
-
readonly type: "uint256";
|
|
32
|
-
}];
|
|
33
|
-
readonly outputs: readonly [{
|
|
34
|
-
readonly name: "";
|
|
35
|
-
readonly type: "bool";
|
|
36
|
-
}];
|
|
37
|
-
}, {
|
|
38
|
-
readonly name: "getHumanNullifier";
|
|
39
|
-
readonly type: "function";
|
|
40
|
-
readonly stateMutability: "view";
|
|
41
|
-
readonly inputs: readonly [{
|
|
42
|
-
readonly name: "agentId";
|
|
43
|
-
readonly type: "uint256";
|
|
44
|
-
}];
|
|
45
|
-
readonly outputs: readonly [{
|
|
46
|
-
readonly name: "";
|
|
47
|
-
readonly type: "uint256";
|
|
48
|
-
}];
|
|
49
|
-
}, {
|
|
50
|
-
readonly name: "getAgentCountForHuman";
|
|
51
|
-
readonly type: "function";
|
|
52
|
-
readonly stateMutability: "view";
|
|
53
|
-
readonly inputs: readonly [{
|
|
54
|
-
readonly name: "nullifier";
|
|
55
|
-
readonly type: "uint256";
|
|
56
|
-
}];
|
|
57
|
-
readonly outputs: readonly [{
|
|
58
|
-
readonly name: "";
|
|
59
|
-
readonly type: "uint256";
|
|
60
|
-
}];
|
|
61
|
-
}, {
|
|
62
|
-
readonly name: "getProofProvider";
|
|
63
|
-
readonly type: "function";
|
|
64
|
-
readonly stateMutability: "view";
|
|
65
|
-
readonly inputs: readonly [{
|
|
66
|
-
readonly name: "agentId";
|
|
67
|
-
readonly type: "uint256";
|
|
68
|
-
}];
|
|
69
|
-
readonly outputs: readonly [{
|
|
70
|
-
readonly name: "";
|
|
71
|
-
readonly type: "address";
|
|
72
|
-
}];
|
|
73
|
-
}, {
|
|
74
|
-
readonly name: "selfProofProvider";
|
|
75
|
-
readonly type: "function";
|
|
76
|
-
readonly stateMutability: "view";
|
|
77
|
-
readonly inputs: readonly [];
|
|
78
|
-
readonly outputs: readonly [{
|
|
79
|
-
readonly name: "";
|
|
80
|
-
readonly type: "address";
|
|
81
|
-
}];
|
|
82
|
-
}, {
|
|
83
|
-
readonly name: "getAgentCredentials";
|
|
84
|
-
readonly type: "function";
|
|
85
|
-
readonly stateMutability: "view";
|
|
86
|
-
readonly inputs: readonly [{
|
|
87
|
-
readonly name: "agentId";
|
|
88
|
-
readonly type: "uint256";
|
|
89
|
-
}];
|
|
90
|
-
readonly outputs: readonly [{
|
|
91
|
-
readonly name: "";
|
|
92
|
-
readonly type: "tuple";
|
|
93
|
-
readonly components: readonly [{
|
|
94
|
-
readonly name: "issuingState";
|
|
95
|
-
readonly type: "string";
|
|
96
|
-
}, {
|
|
97
|
-
readonly name: "name";
|
|
98
|
-
readonly type: "string[]";
|
|
99
|
-
}, {
|
|
100
|
-
readonly name: "idNumber";
|
|
101
|
-
readonly type: "string";
|
|
102
|
-
}, {
|
|
103
|
-
readonly name: "nationality";
|
|
104
|
-
readonly type: "string";
|
|
105
|
-
}, {
|
|
106
|
-
readonly name: "dateOfBirth";
|
|
107
|
-
readonly type: "string";
|
|
108
|
-
}, {
|
|
109
|
-
readonly name: "gender";
|
|
110
|
-
readonly type: "string";
|
|
111
|
-
}, {
|
|
112
|
-
readonly name: "expiryDate";
|
|
113
|
-
readonly type: "string";
|
|
114
|
-
}, {
|
|
115
|
-
readonly name: "olderThan";
|
|
116
|
-
readonly type: "uint256";
|
|
117
|
-
}, {
|
|
118
|
-
readonly name: "ofac";
|
|
119
|
-
readonly type: "bool[3]";
|
|
120
|
-
}];
|
|
121
|
-
}];
|
|
122
|
-
}, {
|
|
123
|
-
readonly name: "agentRegisteredAt";
|
|
124
|
-
readonly type: "function";
|
|
125
|
-
readonly stateMutability: "view";
|
|
126
|
-
readonly inputs: readonly [{
|
|
127
|
-
readonly name: "agentId";
|
|
128
|
-
readonly type: "uint256";
|
|
129
|
-
}];
|
|
130
|
-
readonly outputs: readonly [{
|
|
131
|
-
readonly name: "";
|
|
132
|
-
readonly type: "uint256";
|
|
133
|
-
}];
|
|
134
|
-
}, {
|
|
135
|
-
readonly name: "proofExpiresAt";
|
|
136
|
-
readonly type: "function";
|
|
137
|
-
readonly stateMutability: "view";
|
|
138
|
-
readonly inputs: readonly [{
|
|
139
|
-
readonly name: "agentId";
|
|
140
|
-
readonly type: "uint256";
|
|
141
|
-
}];
|
|
142
|
-
readonly outputs: readonly [{
|
|
143
|
-
readonly name: "";
|
|
144
|
-
readonly type: "uint256";
|
|
145
|
-
}];
|
|
146
|
-
}, {
|
|
147
|
-
readonly name: "isProofFresh";
|
|
148
|
-
readonly type: "function";
|
|
149
|
-
readonly stateMutability: "view";
|
|
150
|
-
readonly inputs: readonly [{
|
|
151
|
-
readonly name: "agentId";
|
|
152
|
-
readonly type: "uint256";
|
|
153
|
-
}];
|
|
154
|
-
readonly outputs: readonly [{
|
|
155
|
-
readonly name: "";
|
|
156
|
-
readonly type: "bool";
|
|
157
|
-
}];
|
|
158
|
-
}, {
|
|
159
|
-
readonly name: "getAgentsForNullifier";
|
|
160
|
-
readonly type: "function";
|
|
161
|
-
readonly stateMutability: "view";
|
|
162
|
-
readonly inputs: readonly [{
|
|
163
|
-
readonly name: "nullifier";
|
|
164
|
-
readonly type: "uint256";
|
|
165
|
-
}];
|
|
166
|
-
readonly outputs: readonly [{
|
|
167
|
-
readonly name: "";
|
|
168
|
-
readonly type: "uint256[]";
|
|
169
|
-
}];
|
|
170
|
-
}, {
|
|
171
|
-
readonly name: "ownerOf";
|
|
172
|
-
readonly type: "function";
|
|
173
|
-
readonly stateMutability: "view";
|
|
174
|
-
readonly inputs: readonly [{
|
|
175
|
-
readonly name: "tokenId";
|
|
176
|
-
readonly type: "uint256";
|
|
177
|
-
}];
|
|
178
|
-
readonly outputs: readonly [{
|
|
179
|
-
readonly name: "";
|
|
180
|
-
readonly type: "address";
|
|
181
|
-
}];
|
|
182
|
-
}, {
|
|
183
|
-
readonly name: "updateAgentMetadata";
|
|
184
|
-
readonly type: "function";
|
|
185
|
-
readonly stateMutability: "nonpayable";
|
|
186
|
-
readonly inputs: readonly [{
|
|
187
|
-
readonly name: "agentId";
|
|
188
|
-
readonly type: "uint256";
|
|
189
|
-
}, {
|
|
190
|
-
readonly name: "metadata";
|
|
191
|
-
readonly type: "string";
|
|
192
|
-
}];
|
|
193
|
-
readonly outputs: readonly [];
|
|
194
|
-
}];
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
export const selfRegistryAbi = [
|
|
2
|
-
{
|
|
3
|
-
name: "isVerifiedAgent",
|
|
4
|
-
type: "function",
|
|
5
|
-
stateMutability: "view",
|
|
6
|
-
inputs: [{ name: "agentPubKey", type: "bytes32" }],
|
|
7
|
-
outputs: [{ name: "", type: "bool" }],
|
|
8
|
-
},
|
|
9
|
-
{
|
|
10
|
-
name: "getAgentId",
|
|
11
|
-
type: "function",
|
|
12
|
-
stateMutability: "view",
|
|
13
|
-
inputs: [{ name: "agentPubKey", type: "bytes32" }],
|
|
14
|
-
outputs: [{ name: "", type: "uint256" }],
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
name: "hasHumanProof",
|
|
18
|
-
type: "function",
|
|
19
|
-
stateMutability: "view",
|
|
20
|
-
inputs: [{ name: "agentId", type: "uint256" }],
|
|
21
|
-
outputs: [{ name: "", type: "bool" }],
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
name: "getHumanNullifier",
|
|
25
|
-
type: "function",
|
|
26
|
-
stateMutability: "view",
|
|
27
|
-
inputs: [{ name: "agentId", type: "uint256" }],
|
|
28
|
-
outputs: [{ name: "", type: "uint256" }],
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
name: "getAgentCountForHuman",
|
|
32
|
-
type: "function",
|
|
33
|
-
stateMutability: "view",
|
|
34
|
-
inputs: [{ name: "nullifier", type: "uint256" }],
|
|
35
|
-
outputs: [{ name: "", type: "uint256" }],
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
name: "getProofProvider",
|
|
39
|
-
type: "function",
|
|
40
|
-
stateMutability: "view",
|
|
41
|
-
inputs: [{ name: "agentId", type: "uint256" }],
|
|
42
|
-
outputs: [{ name: "", type: "address" }],
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
name: "selfProofProvider",
|
|
46
|
-
type: "function",
|
|
47
|
-
stateMutability: "view",
|
|
48
|
-
inputs: [],
|
|
49
|
-
outputs: [{ name: "", type: "address" }],
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
name: "getAgentCredentials",
|
|
53
|
-
type: "function",
|
|
54
|
-
stateMutability: "view",
|
|
55
|
-
inputs: [{ name: "agentId", type: "uint256" }],
|
|
56
|
-
outputs: [
|
|
57
|
-
{
|
|
58
|
-
name: "",
|
|
59
|
-
type: "tuple",
|
|
60
|
-
components: [
|
|
61
|
-
{ name: "issuingState", type: "string" },
|
|
62
|
-
{ name: "name", type: "string[]" },
|
|
63
|
-
{ name: "idNumber", type: "string" },
|
|
64
|
-
{ name: "nationality", type: "string" },
|
|
65
|
-
{ name: "dateOfBirth", type: "string" },
|
|
66
|
-
{ name: "gender", type: "string" },
|
|
67
|
-
{ name: "expiryDate", type: "string" },
|
|
68
|
-
{ name: "olderThan", type: "uint256" },
|
|
69
|
-
{ name: "ofac", type: "bool[3]" },
|
|
70
|
-
],
|
|
71
|
-
},
|
|
72
|
-
],
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
name: "agentRegisteredAt",
|
|
76
|
-
type: "function",
|
|
77
|
-
stateMutability: "view",
|
|
78
|
-
inputs: [{ name: "agentId", type: "uint256" }],
|
|
79
|
-
outputs: [{ name: "", type: "uint256" }],
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
name: "proofExpiresAt",
|
|
83
|
-
type: "function",
|
|
84
|
-
stateMutability: "view",
|
|
85
|
-
inputs: [{ name: "agentId", type: "uint256" }],
|
|
86
|
-
outputs: [{ name: "", type: "uint256" }],
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
name: "isProofFresh",
|
|
90
|
-
type: "function",
|
|
91
|
-
stateMutability: "view",
|
|
92
|
-
inputs: [{ name: "agentId", type: "uint256" }],
|
|
93
|
-
outputs: [{ name: "", type: "bool" }],
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
name: "getAgentsForNullifier",
|
|
97
|
-
type: "function",
|
|
98
|
-
stateMutability: "view",
|
|
99
|
-
inputs: [{ name: "nullifier", type: "uint256" }],
|
|
100
|
-
outputs: [{ name: "", type: "uint256[]" }],
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
name: "ownerOf",
|
|
104
|
-
type: "function",
|
|
105
|
-
stateMutability: "view",
|
|
106
|
-
inputs: [{ name: "tokenId", type: "uint256" }],
|
|
107
|
-
outputs: [{ name: "", type: "address" }],
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
name: "updateAgentMetadata",
|
|
111
|
-
type: "function",
|
|
112
|
-
stateMutability: "nonpayable",
|
|
113
|
-
inputs: [
|
|
114
|
-
{ name: "agentId", type: "uint256" },
|
|
115
|
-
{ name: "metadata", type: "string" },
|
|
116
|
-
],
|
|
117
|
-
outputs: [],
|
|
118
|
-
},
|
|
119
|
-
];
|
|
120
|
-
//# sourceMappingURL=self-registry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"self-registry.js","sourceRoot":"","sources":["../../src/abis/self-registry.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B;QACE,IAAI,EAAE,iBAAiB;QACvB,IAAI,EAAE,UAAU;QAChB,eAAe,EAAE,MAAM;QACvB,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;QAClD,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;KACtC;IACD;QACE,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE,UAAU;QAChB,eAAe,EAAE,MAAM;QACvB,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;QAClD,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;KACzC;IACD;QACE,IAAI,EAAE,eAAe;QACrB,IAAI,EAAE,UAAU;QAChB,eAAe,EAAE,MAAM;QACvB,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;QAC9C,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;KACtC;IACD;QACE,IAAI,EAAE,mBAAmB;QACzB,IAAI,EAAE,UAAU;QAChB,eAAe,EAAE,MAAM;QACvB,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;QAC9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,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;QAChD,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;KAC3C;IACD;QACE,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,UAAU;QAChB,eAAe,EAAE,MAAM;QACvB,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;QAC9C,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;KACzC;IACD;QACE,IAAI,EAAE,qBAAqB;QAC3B,IAAI,EAAE,UAAU;QAChB,eAAe,EAAE,YAAY;QAC7B,MAAM,EAAE;YACN,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE;YACpC,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE;SACrC;QACD,OAAO,EAAE,EAAE;KACZ;CACqB,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { type PublicClient, type WalletClient } from "viem";
|
|
2
|
-
import type { AppConfig } from "../config/env.js";
|
|
3
|
-
export interface CeloClients {
|
|
4
|
-
public: PublicClient;
|
|
5
|
-
wallet?: WalletClient;
|
|
6
|
-
accountAddress?: `0x${string}`;
|
|
7
|
-
}
|
|
8
|
-
export declare class CeloClientFactory {
|
|
9
|
-
private readonly config;
|
|
10
|
-
private clients;
|
|
11
|
-
constructor(config: AppConfig);
|
|
12
|
-
getClients(): CeloClients;
|
|
13
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { createPublicClient, createWalletClient, http, } from "viem";
|
|
2
|
-
import { privateKeyToAccount } from "viem/accounts";
|
|
3
|
-
import { CHAIN, DEFAULT_RPC_URL } from "../config/chains.js";
|
|
4
|
-
export class CeloClientFactory {
|
|
5
|
-
config;
|
|
6
|
-
clients = null;
|
|
7
|
-
constructor(config) {
|
|
8
|
-
this.config = config;
|
|
9
|
-
}
|
|
10
|
-
getClients() {
|
|
11
|
-
if (this.clients) {
|
|
12
|
-
return this.clients;
|
|
13
|
-
}
|
|
14
|
-
const rpcUrl = this.config.rpcUrl ?? DEFAULT_RPC_URL;
|
|
15
|
-
const transport = http(rpcUrl);
|
|
16
|
-
const publicClient = createPublicClient({
|
|
17
|
-
chain: CHAIN,
|
|
18
|
-
transport,
|
|
19
|
-
});
|
|
20
|
-
let wallet;
|
|
21
|
-
let accountAddress;
|
|
22
|
-
if (this.config.privateKey) {
|
|
23
|
-
const account = privateKeyToAccount(this.config.privateKey);
|
|
24
|
-
accountAddress = account.address;
|
|
25
|
-
wallet = createWalletClient({
|
|
26
|
-
account,
|
|
27
|
-
chain: CHAIN,
|
|
28
|
-
transport,
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
this.clients = {
|
|
32
|
-
public: publicClient,
|
|
33
|
-
wallet,
|
|
34
|
-
accountAddress,
|
|
35
|
-
};
|
|
36
|
-
return this.clients;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
//# sourceMappingURL=celo-client.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"celo-client.js","sourceRoot":"","sources":["../../src/clients/celo-client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,IAAI,GAGL,MAAM,MAAM,CAAC;AACd,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAEpD,OAAO,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAQ7D,MAAM,OAAO,iBAAiB;IAGC;IAFrB,OAAO,GAAuB,IAAI,CAAC;IAE3C,YAA6B,MAAiB;QAAjB,WAAM,GAAN,MAAM,CAAW;IAAG,CAAC;IAElD,UAAU;QACR,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YACjB,OAAO,IAAI,CAAC,OAAO,CAAC;QACtB,CAAC;QAED,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,IAAI,eAAe,CAAC;QACrD,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC;QAC/B,MAAM,YAAY,GAAG,kBAAkB,CAAC;YACtC,KAAK,EAAE,KAAK;YACZ,SAAS;SACV,CAAiB,CAAC;QAEnB,IAAI,MAAgC,CAAC;QACrC,IAAI,cAAyC,CAAC;QAE9C,IAAI,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC;YAC3B,MAAM,OAAO,GAAG,mBAAmB,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;YAC5D,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC;YACjC,MAAM,GAAG,kBAAkB,CAAC;gBAC1B,OAAO;gBACP,KAAK,EAAE,KAAK;gBACZ,SAAS;aACV,CAAC,CAAC;QACL,CAAC;QAED,IAAI,CAAC,OAAO,GAAG;YACb,MAAM,EAAE,YAAY;YACpB,MAAM;YACN,cAAc;SACf,CAAC;QAEF,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;CACF"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { type PublicClient } from "viem";
|
|
2
|
-
import type { AppConfig } from "../config/env.js";
|
|
3
|
-
export declare const DEFAULT_ETH_RPC_URL = "https://ethereum.publicnode.com";
|
|
4
|
-
export declare const ENS_CCIP_GATEWAY = "https://ccip.ens.xyz";
|
|
5
|
-
export declare class EnsClientFactory {
|
|
6
|
-
private readonly config;
|
|
7
|
-
private client;
|
|
8
|
-
constructor(config: AppConfig);
|
|
9
|
-
getClient(): PublicClient;
|
|
10
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { createPublicClient, http } from "viem";
|
|
2
|
-
import { mainnet } from "viem/chains";
|
|
3
|
-
export const DEFAULT_ETH_RPC_URL = "https://ethereum.publicnode.com";
|
|
4
|
-
export const ENS_CCIP_GATEWAY = "https://ccip.ens.xyz";
|
|
5
|
-
export class EnsClientFactory {
|
|
6
|
-
config;
|
|
7
|
-
client = null;
|
|
8
|
-
constructor(config) {
|
|
9
|
-
this.config = config;
|
|
10
|
-
}
|
|
11
|
-
getClient() {
|
|
12
|
-
if (this.client) {
|
|
13
|
-
return this.client;
|
|
14
|
-
}
|
|
15
|
-
const rpcUrl = this.config.ethRpcUrl ?? DEFAULT_ETH_RPC_URL;
|
|
16
|
-
this.client = createPublicClient({
|
|
17
|
-
chain: mainnet,
|
|
18
|
-
transport: http(rpcUrl, { timeout: 15_000 }),
|
|
19
|
-
});
|
|
20
|
-
return this.client;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
//# sourceMappingURL=ens-client.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ens-client.js","sourceRoot":"","sources":["../../src/clients/ens-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,IAAI,EAAqB,MAAM,MAAM,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAGtC,MAAM,CAAC,MAAM,mBAAmB,GAAG,iCAAiC,CAAC;AAErE,MAAM,CAAC,MAAM,gBAAgB,GAAG,sBAAsB,CAAC;AAEvD,MAAM,OAAO,gBAAgB;IAGE;IAFrB,MAAM,GAAwB,IAAI,CAAC;IAE3C,YAA6B,MAAiB;QAAjB,WAAM,GAAN,MAAM,CAAW;IAAG,CAAC;IAElD,SAAS;QACP,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YAChB,OAAO,IAAI,CAAC,MAAM,CAAC;QACrB,CAAC;QAED,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,SAAS,IAAI,mBAAmB,CAAC;QAC5D,IAAI,CAAC,MAAM,GAAG,kBAAkB,CAAC;YAC/B,KAAK,EAAE,OAAO;YACd,SAAS,EAAE,IAAI,CAAC,MAAM,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;SAC7C,CAAC,CAAC;QAEH,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;CACF"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export declare const Mento: typeof import("@mento-protocol/mento-sdk").Mento, ChainId: typeof import("@mento-protocol/mento-sdk").ChainId, deadlineFromMinutes: typeof import("@mento-protocol/mento-sdk").deadlineFromMinutes, RouteNotFoundError: typeof import("@mento-protocol/mento-sdk").RouteNotFoundError, FXMarketClosedError: typeof import("@mento-protocol/mento-sdk").FXMarketClosedError;
|
|
2
|
-
export type { CallParams } from "@mento-protocol/mento-sdk";
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { createRequire } from "node:module";
|
|
2
|
-
/**
|
|
3
|
-
* @mento-protocol/mento-sdk's ESM build omits .js extensions on internal imports.
|
|
4
|
-
* Load the CJS entry via createRequire until upstream fixes exports.
|
|
5
|
-
*/
|
|
6
|
-
const require = createRequire(import.meta.url);
|
|
7
|
-
const mentoSdk = require("@mento-protocol/mento-sdk");
|
|
8
|
-
export const { Mento, ChainId, deadlineFromMinutes, RouteNotFoundError, FXMarketClosedError, } = mentoSdk;
|
|
9
|
-
//# sourceMappingURL=mento-sdk.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mento-sdk.js","sourceRoot":"","sources":["../../src/clients/mento-sdk.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C;;;GAGG;AACH,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAE/C,MAAM,QAAQ,GAAG,OAAO,CAAC,2BAA2B,CAA+C,CAAC;AAEpG,MAAM,CAAC,MAAM,EACX,KAAK,EACL,OAAO,EACP,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,GACpB,GAAG,QAAQ,CAAC"}
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { type SelfRegistrationMode } from "../config/self.js";
|
|
2
|
-
export declare class SelfApiError extends Error {
|
|
3
|
-
constructor(message: string);
|
|
4
|
-
}
|
|
5
|
-
export declare class SelfExpiredSessionError extends Error {
|
|
6
|
-
constructor(message?: string);
|
|
7
|
-
}
|
|
8
|
-
export interface SelfRegistrationDisclosures {
|
|
9
|
-
minimumAge?: number;
|
|
10
|
-
ofac?: boolean;
|
|
11
|
-
}
|
|
12
|
-
export interface SelfRegistrationResult {
|
|
13
|
-
agentId: number;
|
|
14
|
-
agentAddress: string;
|
|
15
|
-
credentials?: unknown;
|
|
16
|
-
txHash?: string;
|
|
17
|
-
}
|
|
18
|
-
export interface SelfRefreshResult {
|
|
19
|
-
proofExpiresAt: Date;
|
|
20
|
-
}
|
|
21
|
-
export interface SelfRegistrationSession {
|
|
22
|
-
sessionToken: string;
|
|
23
|
-
stage: string;
|
|
24
|
-
deepLink: string;
|
|
25
|
-
scanUrl?: string;
|
|
26
|
-
agentAddress: string;
|
|
27
|
-
expiresAt: string;
|
|
28
|
-
timeRemainingMs?: number;
|
|
29
|
-
humanInstructions: string[];
|
|
30
|
-
waitForCompletion(opts?: {
|
|
31
|
-
timeoutMs?: number;
|
|
32
|
-
pollIntervalMs?: number;
|
|
33
|
-
}): Promise<SelfRegistrationResult>;
|
|
34
|
-
exportKey(): Promise<string>;
|
|
35
|
-
}
|
|
36
|
-
export interface SelfRefreshSession {
|
|
37
|
-
sessionToken: string;
|
|
38
|
-
stage: string;
|
|
39
|
-
deepLink: string;
|
|
40
|
-
scanUrl?: string;
|
|
41
|
-
expiresAt: string;
|
|
42
|
-
timeRemainingMs?: number;
|
|
43
|
-
humanInstructions: string[];
|
|
44
|
-
waitForCompletion(opts?: {
|
|
45
|
-
timeoutMs?: number;
|
|
46
|
-
pollIntervalMs?: number;
|
|
47
|
-
}): Promise<SelfRefreshResult>;
|
|
48
|
-
}
|
|
49
|
-
export interface SelfDeregistrationSession {
|
|
50
|
-
sessionToken: string;
|
|
51
|
-
stage: string;
|
|
52
|
-
deepLink: string;
|
|
53
|
-
scanUrl?: string;
|
|
54
|
-
expiresAt: string;
|
|
55
|
-
timeRemainingMs?: number;
|
|
56
|
-
humanInstructions: string[];
|
|
57
|
-
waitForCompletion(opts?: {
|
|
58
|
-
timeoutMs?: number;
|
|
59
|
-
pollIntervalMs?: number;
|
|
60
|
-
}): Promise<void>;
|
|
61
|
-
}
|
|
62
|
-
export declare function requestRegistration(opts: {
|
|
63
|
-
mode?: SelfRegistrationMode;
|
|
64
|
-
disclosures?: SelfRegistrationDisclosures;
|
|
65
|
-
humanAddress?: string;
|
|
66
|
-
agentName?: string;
|
|
67
|
-
agentDescription?: string;
|
|
68
|
-
apiBase?: string;
|
|
69
|
-
}): Promise<SelfRegistrationSession>;
|
|
70
|
-
export declare function requestDeregistration(opts: {
|
|
71
|
-
agentAddress: string;
|
|
72
|
-
disclosures?: SelfRegistrationDisclosures;
|
|
73
|
-
apiBase?: string;
|
|
74
|
-
}): Promise<SelfDeregistrationSession>;
|
|
75
|
-
export declare function requestProofRefresh(opts: {
|
|
76
|
-
agentId: number;
|
|
77
|
-
disclosures?: SelfRegistrationDisclosures;
|
|
78
|
-
apiBase?: string;
|
|
79
|
-
}): Promise<SelfRefreshSession>;
|
|
80
|
-
export declare function getAgentInfo(agentId: number, apiBase?: string): Promise<Record<string, unknown>>;
|
|
81
|
-
export declare function getAgentsForHuman(address: string, apiBase?: string): Promise<Record<string, unknown>>;
|
|
82
|
-
export declare function selfQrUrl(sessionToken: string, apiBase?: string): string;
|