@kynesyslabs/demosdk 4.0.11 → 4.0.13
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/build/abstraction/Identities.js +10 -2
- package/build/abstraction/Identities.js.map +1 -1
- package/build/l2ps/channel/finalize.d.ts +63 -0
- package/build/l2ps/channel/finalize.js +85 -0
- package/build/l2ps/channel/finalize.js.map +1 -0
- package/build/l2ps/channel/index.d.ts +3 -0
- package/build/l2ps/channel/index.js +3 -0
- package/build/l2ps/channel/index.js.map +1 -1
- package/build/l2ps/channel/negotiate.d.ts +106 -0
- package/build/l2ps/channel/negotiate.js +206 -0
- package/build/l2ps/channel/negotiate.js.map +1 -0
- package/build/l2ps/channel/transport.d.ts +117 -0
- package/build/l2ps/channel/transport.js +178 -0
- package/build/l2ps/channel/transport.js.map +1 -0
- package/build/websdk/BroadcastFailedError.js.map +1 -1
- package/build/websdk/DemosTransactions.d.ts +2 -2
- package/build/websdk/DemosTransactions.js +3 -3
- package/build/websdk/TransportError.js.map +1 -1
- package/build/websdk/demosclass.d.ts +81 -1
- package/build/websdk/demosclass.js +84 -1
- package/build/websdk/demosclass.js.map +1 -1
- package/build/websdk/index.d.ts +1 -0
- package/build/websdk/index.js +3 -0
- package/build/websdk/index.js.map +1 -1
- package/build/websdk/programmatic/ProgrammaticTx.d.ts +118 -0
- package/build/websdk/programmatic/ProgrammaticTx.js +56 -0
- package/build/websdk/programmatic/ProgrammaticTx.js.map +1 -0
- package/build/websdk/programmatic/attest.d.ts +396 -0
- package/build/websdk/programmatic/attest.js +398 -0
- package/build/websdk/programmatic/attest.js.map +1 -0
- package/build/websdk/programmatic/bridge.d.ts +36 -0
- package/build/websdk/programmatic/bridge.js +37 -0
- package/build/websdk/programmatic/bridge.js.map +1 -0
- package/build/websdk/programmatic/context.d.ts +26 -0
- package/build/websdk/programmatic/context.js +9 -0
- package/build/websdk/programmatic/context.js.map +1 -0
- package/build/websdk/programmatic/contracts.d.ts +79 -0
- package/build/websdk/programmatic/contracts.js +81 -0
- package/build/websdk/programmatic/contracts.js.map +1 -0
- package/build/websdk/programmatic/d402.d.ts +33 -0
- package/build/websdk/programmatic/d402.js +35 -0
- package/build/websdk/programmatic/d402.js.map +1 -0
- package/build/websdk/programmatic/demoswork.d.ts +37 -0
- package/build/websdk/programmatic/demoswork.js +38 -0
- package/build/websdk/programmatic/demoswork.js.map +1 -0
- package/build/websdk/programmatic/errors.d.ts +20 -0
- package/build/websdk/programmatic/errors.js +24 -0
- package/build/websdk/programmatic/errors.js.map +1 -0
- package/build/websdk/programmatic/escrow.d.ts +75 -0
- package/build/websdk/programmatic/escrow.js +74 -0
- package/build/websdk/programmatic/escrow.js.map +1 -0
- package/build/websdk/programmatic/governance.d.ts +59 -0
- package/build/websdk/programmatic/governance.js +44 -0
- package/build/websdk/programmatic/governance.js.map +1 -0
- package/build/websdk/programmatic/index.d.ts +30 -0
- package/build/websdk/programmatic/index.js +31 -0
- package/build/websdk/programmatic/index.js.map +1 -0
- package/build/websdk/programmatic/ipfs.d.ts +74 -0
- package/build/websdk/programmatic/ipfs.js +103 -0
- package/build/websdk/programmatic/ipfs.js.map +1 -0
- package/build/websdk/programmatic/pay.d.ts +36 -0
- package/build/websdk/programmatic/pay.js +37 -0
- package/build/websdk/programmatic/pay.js.map +1 -0
- package/build/websdk/programmatic/runner.d.ts +30 -0
- package/build/websdk/programmatic/runner.js +186 -0
- package/build/websdk/programmatic/runner.js.map +1 -0
- package/build/websdk/programmatic/storage.d.ts +49 -0
- package/build/websdk/programmatic/storage.js +49 -0
- package/build/websdk/programmatic/storage.js.map +1 -0
- package/build/websdk/programmatic/tokens.d.ts +155 -0
- package/build/websdk/programmatic/tokens.js +157 -0
- package/build/websdk/programmatic/tokens.js.map +1 -0
- package/build/websdk/programmatic/types.d.ts +95 -0
- package/build/websdk/programmatic/types.js +8 -0
- package/build/websdk/programmatic/types.js.map +1 -0
- package/build/websdk/programmatic/validator.d.ts +63 -0
- package/build/websdk/programmatic/validator.js +64 -0
- package/build/websdk/programmatic/validator.js.map +1 -0
- package/build/websdk/programmatic/xm.d.ts +36 -0
- package/build/websdk/programmatic/xm.js +37 -0
- package/build/websdk/programmatic/xm.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,396 @@
|
|
|
1
|
+
import type { UnifiedDomainResolution } from "../../abstraction/types/UDResolution";
|
|
2
|
+
import type { DiscordProof, EthosIdentityRemoveData, EthosWalletIdentity, GithubProof, HumanPassportIdentityData, InferFromSignaturePayload, NomisWalletIdentity, TelegramSignedAttestation, TLSNIdentityContext, TLSNotaryPresentation, TLSNProofRanges, TwitterProof, XMCoreTargetIdentityPayload } from "../../types/abstraction";
|
|
3
|
+
import type { PQCAlgorithm } from "../../types/cryptography";
|
|
4
|
+
import type { IStartProxyParams, IWeb2Result } from "../../types/web2";
|
|
5
|
+
import type { ProgrammaticContext } from "./context";
|
|
6
|
+
import type { ProgrammaticTxOptions, ProgrammaticTxResult } from "./types";
|
|
7
|
+
/**
|
|
8
|
+
* Identity-attestation transactions as one-call programmatic transactions.
|
|
9
|
+
*
|
|
10
|
+
* Groups the web2 identity proofs (GitHub, Twitter/X, Discord, Telegram,
|
|
11
|
+
* domain) and their removal into a single namespace. Each builder collapses
|
|
12
|
+
* the classic `infer → confirm → broadcast` flow into one call that
|
|
13
|
+
* auto-broadcasts within the configured fee ceiling: the `Identities.*`
|
|
14
|
+
* builders sign + confirm internally and return an already-confirmed
|
|
15
|
+
* `RPCResponseWithValidityData`, which the shared runner (via `ctx.run`)
|
|
16
|
+
* detects and forwards straight to broadcast without re-confirming.
|
|
17
|
+
*
|
|
18
|
+
* Also exposes {@link dahr}, the DAHR web2-proxy attestation. Unlike the
|
|
19
|
+
* identity builders, DAHR does its own sign + confirm + broadcast lifecycle
|
|
20
|
+
* server-side, so it bypasses `ctx.run` entirely and does not honour
|
|
21
|
+
* {@link ProgrammaticTxOptions}.
|
|
22
|
+
*/
|
|
23
|
+
export declare function createAttestNamespace(ctx: ProgrammaticContext): {
|
|
24
|
+
/**
|
|
25
|
+
* Link a GitHub identity to the connected wallet, end to end.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```ts
|
|
29
|
+
* await demos.run.attest.github(
|
|
30
|
+
* "https://gist.github.com/user/abc123",
|
|
31
|
+
* )
|
|
32
|
+
* ```
|
|
33
|
+
*
|
|
34
|
+
* @param proof - The GitHub gist/raw proof URL.
|
|
35
|
+
* @param referralCode - Optional referral code for incentive points.
|
|
36
|
+
* @param opts - Fee ceiling / confirmation strategy / wait behaviour.
|
|
37
|
+
*/
|
|
38
|
+
github: (proof: GithubProof, referralCode?: string, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>;
|
|
39
|
+
/**
|
|
40
|
+
* Link a Twitter/X identity to the connected wallet, end to end.
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* ```ts
|
|
44
|
+
* await demos.run.attest.twitter("https://x.com/user/status/123")
|
|
45
|
+
* ```
|
|
46
|
+
*
|
|
47
|
+
* @param proof - The tweet proof URL.
|
|
48
|
+
* @param referralCode - Optional referral code for incentive points.
|
|
49
|
+
* @param opts - Fee ceiling / confirmation strategy / wait behaviour.
|
|
50
|
+
*/
|
|
51
|
+
twitter: (proof: TwitterProof, referralCode?: string, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>;
|
|
52
|
+
/**
|
|
53
|
+
* Link a Discord identity to the connected wallet, end to end.
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```ts
|
|
57
|
+
* await demos.run.attest.discord(
|
|
58
|
+
* "https://discord.com/channels/guild/chan/msg",
|
|
59
|
+
* )
|
|
60
|
+
* ```
|
|
61
|
+
*
|
|
62
|
+
* @param proof - The Discord message proof URL.
|
|
63
|
+
* @param referralCode - Optional referral code for incentive points.
|
|
64
|
+
* @param opts - Fee ceiling / confirmation strategy / wait behaviour.
|
|
65
|
+
*/
|
|
66
|
+
discord: (proof: DiscordProof, referralCode?: string, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>;
|
|
67
|
+
/**
|
|
68
|
+
* Link a Telegram identity to the connected wallet, end to end.
|
|
69
|
+
*
|
|
70
|
+
* @example
|
|
71
|
+
* ```ts
|
|
72
|
+
* await demos.run.attest.telegram(signedAttestation)
|
|
73
|
+
* ```
|
|
74
|
+
*
|
|
75
|
+
* @param attestation - The signed Telegram bot attestation.
|
|
76
|
+
* @param referralCode - Optional referral code for incentive points.
|
|
77
|
+
* @param opts - Fee ceiling / confirmation strategy / wait behaviour.
|
|
78
|
+
*/
|
|
79
|
+
telegram: (attestation: TelegramSignedAttestation, referralCode?: string, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>;
|
|
80
|
+
/**
|
|
81
|
+
* Link a domain identity (CCI) to the connected wallet, end to end.
|
|
82
|
+
*
|
|
83
|
+
* Requires the proof payload from
|
|
84
|
+
* `Identities.createDomainProofPayload` to already be hosted at
|
|
85
|
+
* `https://<host>/.well-known/demos-cci.txt`.
|
|
86
|
+
*
|
|
87
|
+
* @example
|
|
88
|
+
* ```ts
|
|
89
|
+
* await demos.run.attest.domain("example.com")
|
|
90
|
+
* ```
|
|
91
|
+
*
|
|
92
|
+
* @param hostname - The domain being claimed (e.g. "example.com"). A
|
|
93
|
+
* full URL is also accepted; only the host is used.
|
|
94
|
+
* @param referralCode - Optional referral code for incentive points.
|
|
95
|
+
* @param opts - Fee ceiling / confirmation strategy / wait behaviour.
|
|
96
|
+
*/
|
|
97
|
+
domain: (hostname: string, referralCode?: string, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>;
|
|
98
|
+
/**
|
|
99
|
+
* Remove a web2 identity from the connected wallet, end to end.
|
|
100
|
+
*
|
|
101
|
+
* @example
|
|
102
|
+
* ```ts
|
|
103
|
+
* await demos.run.attest.removeWeb2({
|
|
104
|
+
* context: "github",
|
|
105
|
+
* username: "octocat",
|
|
106
|
+
* })
|
|
107
|
+
* ```
|
|
108
|
+
*
|
|
109
|
+
* @param payload - The identity to unlink (`context` + `username`).
|
|
110
|
+
* @param opts - Fee ceiling / confirmation strategy / wait behaviour.
|
|
111
|
+
*/
|
|
112
|
+
removeWeb2: (payload: {
|
|
113
|
+
context: string;
|
|
114
|
+
username: string;
|
|
115
|
+
}, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>;
|
|
116
|
+
/**
|
|
117
|
+
* Link a crosschain (XM) identity from a signature, end to end.
|
|
118
|
+
*
|
|
119
|
+
* @example
|
|
120
|
+
* ```ts
|
|
121
|
+
* await demos.run.attest.xm({
|
|
122
|
+
* chain: "eth",
|
|
123
|
+
* subchain: "mainnet",
|
|
124
|
+
* targetAddress: "0x...",
|
|
125
|
+
* signature: "0x...",
|
|
126
|
+
* })
|
|
127
|
+
* ```
|
|
128
|
+
*
|
|
129
|
+
* @param payload - The signature-inference payload identifying the
|
|
130
|
+
* crosschain address to link.
|
|
131
|
+
* @param referralCode - Optional referral code for incentive points.
|
|
132
|
+
* @param opts - Fee ceiling / confirmation strategy / wait behaviour.
|
|
133
|
+
*/
|
|
134
|
+
xm: (payload: InferFromSignaturePayload, referralCode?: string, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>;
|
|
135
|
+
/**
|
|
136
|
+
* Remove a crosschain (XM) identity from the connected wallet, end to
|
|
137
|
+
* end.
|
|
138
|
+
*
|
|
139
|
+
* @example
|
|
140
|
+
* ```ts
|
|
141
|
+
* await demos.run.attest.removeXm({
|
|
142
|
+
* chain: "eth",
|
|
143
|
+
* subchain: "mainnet",
|
|
144
|
+
* targetAddress: "0x...",
|
|
145
|
+
* })
|
|
146
|
+
* ```
|
|
147
|
+
*
|
|
148
|
+
* @param payload - The crosschain identity to unlink.
|
|
149
|
+
* @param opts - Fee ceiling / confirmation strategy / wait behaviour.
|
|
150
|
+
*/
|
|
151
|
+
removeXm: (payload: XMCoreTargetIdentityPayload, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>;
|
|
152
|
+
/**
|
|
153
|
+
* Bind post-quantum (PQC) identities to the connected wallet, end to
|
|
154
|
+
* end.
|
|
155
|
+
*
|
|
156
|
+
* Generates the requested PQC keypairs, signs each address with the
|
|
157
|
+
* wallet's ed25519 key, and links them on the GCR.
|
|
158
|
+
*
|
|
159
|
+
* @example
|
|
160
|
+
* ```ts
|
|
161
|
+
* // Bind every supported PQC algorithm:
|
|
162
|
+
* await demos.run.attest.pqc()
|
|
163
|
+
* // Or a specific subset:
|
|
164
|
+
* await demos.run.attest.pqc(["ml-dsa-65"])
|
|
165
|
+
* ```
|
|
166
|
+
*
|
|
167
|
+
* @param algorithms - The PQC algorithms to bind, or `"all"` (default)
|
|
168
|
+
* to bind every supported algorithm.
|
|
169
|
+
* @param opts - Fee ceiling / confirmation strategy / wait behaviour.
|
|
170
|
+
*/
|
|
171
|
+
pqc: (algorithms?: "all" | PQCAlgorithm[], opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>;
|
|
172
|
+
/**
|
|
173
|
+
* Remove post-quantum (PQC) identities from the connected wallet, end
|
|
174
|
+
* to end.
|
|
175
|
+
*
|
|
176
|
+
* @example
|
|
177
|
+
* ```ts
|
|
178
|
+
* await demos.run.attest.removePqc()
|
|
179
|
+
* ```
|
|
180
|
+
*
|
|
181
|
+
* @param algorithms - The PQC algorithms to remove, or `"all"`
|
|
182
|
+
* (default) to remove every supported algorithm.
|
|
183
|
+
* @param opts - Fee ceiling / confirmation strategy / wait behaviour.
|
|
184
|
+
*/
|
|
185
|
+
removePqc: (algorithms?: "all" | PQCAlgorithm[], opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>;
|
|
186
|
+
/**
|
|
187
|
+
* Link an Unstoppable Domain identity to the connected wallet, end to
|
|
188
|
+
* end.
|
|
189
|
+
*
|
|
190
|
+
* The signing address must be the owner or an authorized address in the
|
|
191
|
+
* supplied {@link UnifiedDomainResolution} (resolve it first via
|
|
192
|
+
* `Identities.resolveUDDomain`), and must have signed the challenge.
|
|
193
|
+
*
|
|
194
|
+
* @example
|
|
195
|
+
* ```ts
|
|
196
|
+
* const resolution = await demos.abstraction.identities.resolveUDDomain(
|
|
197
|
+
* demos,
|
|
198
|
+
* "brad.crypto",
|
|
199
|
+
* )
|
|
200
|
+
* await demos.run.attest.ud(
|
|
201
|
+
* signingAddress,
|
|
202
|
+
* signature,
|
|
203
|
+
* challenge,
|
|
204
|
+
* resolution,
|
|
205
|
+
* )
|
|
206
|
+
* ```
|
|
207
|
+
*
|
|
208
|
+
* @param signingAddress - The address used to sign the challenge (owner
|
|
209
|
+
* or authorized on the domain).
|
|
210
|
+
* @param signature - The signature over the challenge message.
|
|
211
|
+
* @param challenge - The challenge message that was signed.
|
|
212
|
+
* @param resolutionData - The resolved domain data (owner, network,
|
|
213
|
+
* registry type, authorized addresses).
|
|
214
|
+
* @param referralCode - Optional referral code for incentive points.
|
|
215
|
+
* @param opts - Fee ceiling / confirmation strategy / wait behaviour.
|
|
216
|
+
*/
|
|
217
|
+
ud: (signingAddress: string, signature: string, challenge: string, resolutionData: UnifiedDomainResolution, referralCode?: string, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>;
|
|
218
|
+
/**
|
|
219
|
+
* Remove an Unstoppable Domain identity from the connected wallet, end
|
|
220
|
+
* to end.
|
|
221
|
+
*
|
|
222
|
+
* @example
|
|
223
|
+
* ```ts
|
|
224
|
+
* await demos.run.attest.removeUd("brad.crypto")
|
|
225
|
+
* ```
|
|
226
|
+
*
|
|
227
|
+
* @param domain - The UD domain to unlink (e.g. "brad.crypto").
|
|
228
|
+
* @param opts - Fee ceiling / confirmation strategy / wait behaviour.
|
|
229
|
+
*/
|
|
230
|
+
removeUd: (domain: string, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>;
|
|
231
|
+
/**
|
|
232
|
+
* Link a Nomis wallet identity to the connected wallet, end to end.
|
|
233
|
+
*
|
|
234
|
+
* @example
|
|
235
|
+
* ```ts
|
|
236
|
+
* await demos.run.attest.nomis({
|
|
237
|
+
* walletAddress: "0x...",
|
|
238
|
+
* chain: "evm",
|
|
239
|
+
* subchain: "mainnet",
|
|
240
|
+
* score: 42,
|
|
241
|
+
* })
|
|
242
|
+
* ```
|
|
243
|
+
*
|
|
244
|
+
* @param payload - The Nomis wallet identity data to link.
|
|
245
|
+
* @param opts - Fee ceiling / confirmation strategy / wait behaviour.
|
|
246
|
+
*/
|
|
247
|
+
nomis: (payload: NomisWalletIdentity, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>;
|
|
248
|
+
/**
|
|
249
|
+
* Remove a Nomis wallet identity from the connected wallet, end to end.
|
|
250
|
+
*
|
|
251
|
+
* @example
|
|
252
|
+
* ```ts
|
|
253
|
+
* await demos.run.attest.removeNomis({
|
|
254
|
+
* walletAddress: "0x...",
|
|
255
|
+
* chain: "evm",
|
|
256
|
+
* subchain: "mainnet",
|
|
257
|
+
* })
|
|
258
|
+
* ```
|
|
259
|
+
*
|
|
260
|
+
* @param payload - The Nomis wallet identity data identifying the
|
|
261
|
+
* identity to remove.
|
|
262
|
+
* @param opts - Fee ceiling / confirmation strategy / wait behaviour.
|
|
263
|
+
*/
|
|
264
|
+
removeNomis: (payload: NomisWalletIdentity, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>;
|
|
265
|
+
/**
|
|
266
|
+
* Link a Human Passport identity to the connected wallet, end to end.
|
|
267
|
+
*
|
|
268
|
+
* @example
|
|
269
|
+
* ```ts
|
|
270
|
+
* await demos.run.attest.humanpassport({
|
|
271
|
+
* address: "0x...",
|
|
272
|
+
* verificationMethod: "api",
|
|
273
|
+
* })
|
|
274
|
+
* ```
|
|
275
|
+
*
|
|
276
|
+
* @param payload - The Human Passport identity data to link.
|
|
277
|
+
* @param opts - Fee ceiling / confirmation strategy / wait behaviour.
|
|
278
|
+
*/
|
|
279
|
+
humanpassport: (payload: HumanPassportIdentityData, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>;
|
|
280
|
+
/**
|
|
281
|
+
* Remove a Human Passport identity from the connected wallet, end to
|
|
282
|
+
* end.
|
|
283
|
+
*
|
|
284
|
+
* @example
|
|
285
|
+
* ```ts
|
|
286
|
+
* await demos.run.attest.removeHumanpassport("0x...")
|
|
287
|
+
* ```
|
|
288
|
+
*
|
|
289
|
+
* @param address - The EVM address of the Human Passport identity to
|
|
290
|
+
* remove.
|
|
291
|
+
* @param opts - Fee ceiling / confirmation strategy / wait behaviour.
|
|
292
|
+
*/
|
|
293
|
+
removeHumanpassport: (address: string, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>;
|
|
294
|
+
/**
|
|
295
|
+
* Link an Ethos wallet identity to the connected wallet, end to end.
|
|
296
|
+
*
|
|
297
|
+
* @example
|
|
298
|
+
* ```ts
|
|
299
|
+
* await demos.run.attest.ethos({
|
|
300
|
+
* chain: "evm",
|
|
301
|
+
* subchain: "mainnet",
|
|
302
|
+
* address: "0x...",
|
|
303
|
+
* score: 1600,
|
|
304
|
+
* lastSyncedAt: new Date().toISOString(),
|
|
305
|
+
* })
|
|
306
|
+
* ```
|
|
307
|
+
*
|
|
308
|
+
* @param payload - The Ethos wallet identity data to link.
|
|
309
|
+
* @param opts - Fee ceiling / confirmation strategy / wait behaviour.
|
|
310
|
+
*/
|
|
311
|
+
ethos: (payload: EthosWalletIdentity, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>;
|
|
312
|
+
/**
|
|
313
|
+
* Remove an Ethos wallet identity from the connected wallet, end to
|
|
314
|
+
* end.
|
|
315
|
+
*
|
|
316
|
+
* @example
|
|
317
|
+
* ```ts
|
|
318
|
+
* await demos.run.attest.removeEthos({
|
|
319
|
+
* chain: "evm",
|
|
320
|
+
* subchain: "mainnet",
|
|
321
|
+
* address: "0x...",
|
|
322
|
+
* })
|
|
323
|
+
* ```
|
|
324
|
+
*
|
|
325
|
+
* @param payload - The identifying data (chain, subchain, address) for
|
|
326
|
+
* the Ethos identity to remove.
|
|
327
|
+
* @param opts - Fee ceiling / confirmation strategy / wait behaviour.
|
|
328
|
+
*/
|
|
329
|
+
removeEthos: (payload: EthosIdentityRemoveData, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>;
|
|
330
|
+
/**
|
|
331
|
+
* Link a web2 identity via a TLSNotary attestation, end to end.
|
|
332
|
+
*
|
|
333
|
+
* The proof and its associated fields come from a TLSNotary
|
|
334
|
+
* presentation over the platform's API (GitHub, Discord, or Telegram).
|
|
335
|
+
*
|
|
336
|
+
* @example
|
|
337
|
+
* ```ts
|
|
338
|
+
* await demos.run.attest.tlsn(
|
|
339
|
+
* "github",
|
|
340
|
+
* presentation,
|
|
341
|
+
* recvHash,
|
|
342
|
+
* proofRanges,
|
|
343
|
+
* revealedRecv,
|
|
344
|
+
* "octocat",
|
|
345
|
+
* 583231,
|
|
346
|
+
* )
|
|
347
|
+
* ```
|
|
348
|
+
*
|
|
349
|
+
* @param context - The platform context ("github", "discord", or
|
|
350
|
+
* "telegram").
|
|
351
|
+
* @param proof - The TLSNotary presentation.
|
|
352
|
+
* @param recvHash - The hash of the proven received transcript.
|
|
353
|
+
* @param proofRanges - The revealed byte ranges of the transcript.
|
|
354
|
+
* @param revealedRecv - The revealed received transcript bytes.
|
|
355
|
+
* @param username - The username from the proven response.
|
|
356
|
+
* @param userId - The user id from the proven response.
|
|
357
|
+
* @param referralCode - Optional referral code for incentive points.
|
|
358
|
+
* @param opts - Fee ceiling / confirmation strategy / wait behaviour.
|
|
359
|
+
*/
|
|
360
|
+
tlsn: (context: TLSNIdentityContext, proof: TLSNotaryPresentation, recvHash: string, proofRanges: TLSNProofRanges, revealedRecv: number[], username: string, userId: string | number, referralCode?: string, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>;
|
|
361
|
+
/**
|
|
362
|
+
* Remove a web2 identity that was added via TLSNotary, end to end.
|
|
363
|
+
*
|
|
364
|
+
* @example
|
|
365
|
+
* ```ts
|
|
366
|
+
* await demos.run.attest.removeTlsn("github", "octocat")
|
|
367
|
+
* ```
|
|
368
|
+
*
|
|
369
|
+
* @param context - The platform context ("github", "discord", or
|
|
370
|
+
* "telegram").
|
|
371
|
+
* @param username - The username to remove.
|
|
372
|
+
* @param opts - Fee ceiling / confirmation strategy / wait behaviour.
|
|
373
|
+
*/
|
|
374
|
+
removeTlsn: (context: TLSNIdentityContext, username: string, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>;
|
|
375
|
+
/**
|
|
376
|
+
* Run a DAHR web2-proxy attestation.
|
|
377
|
+
*
|
|
378
|
+
* Unlike the identity builders above, DAHR does not go through
|
|
379
|
+
* `ctx.run`: the web2 proxy performs its own sign + confirm +
|
|
380
|
+
* broadcast lifecycle server-side. As a result
|
|
381
|
+
* {@link ProgrammaticTxOptions} (e.g. `maxFee`, `confirm`) do not
|
|
382
|
+
* apply here — there is no local confirm/broadcast stage to govern.
|
|
383
|
+
*
|
|
384
|
+
* @example
|
|
385
|
+
* ```ts
|
|
386
|
+
* const result = await demos.run.attest.dahr({
|
|
387
|
+
* url: "https://api.example.com/me",
|
|
388
|
+
* method: "GET",
|
|
389
|
+
* })
|
|
390
|
+
* ```
|
|
391
|
+
*
|
|
392
|
+
* @param params - The proxy request parameters (url, method, options).
|
|
393
|
+
* @returns The web2 proxy result, including the attested response.
|
|
394
|
+
*/
|
|
395
|
+
dahr: (params: IStartProxyParams) => Promise<IWeb2Result>;
|
|
396
|
+
};
|