Skip to content

Commit 22141aa

Browse files
committed
originator
1 parent ca0899c commit 22141aa

File tree

2 files changed

+11
-27
lines changed

2 files changed

+11
-27
lines changed

src/identity/IdentityClient.ts

Lines changed: 11 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ export class IdentityClient {
101101
options: {
102102
randomizeOutputs: false
103103
}
104-
})
104+
}, this.originator)
105105

106106
if (tx !== undefined) {
107107
// Submit the transaction to an overlay
@@ -133,12 +133,6 @@ export class IdentityClient {
133133
}
134134

135135
const { certificates } = await this.wallet.discoverByIdentityKey(args, this.originator)
136-
137-
// TODO JACKIE REEEEEEEEEEEEEE
138-
certificates.forEach(cert => {
139-
console.log(cert.serialNumber)
140-
})
141-
142136
return certificates.map(cert => {
143137
return IdentityClient.parseIdentity(cert)
144138
})
@@ -169,24 +163,19 @@ export class IdentityClient {
169163
// Guard if certificates might be absent
170164
const certs = certificatesResult?.certificates ?? []
171165

172-
console.log('reeeeeeeeee', certs)
173-
174166
// Parse certificates and substitute with contacts where available
175167
return certs.map(cert =>
176168
contactByKey.get(cert.subject) ?? IdentityClient.parseIdentity(cert)
177169
)
178170
}
179171

180172
/**
181-
* TODO: Implement once revocation overlay is created JACKIE REEEEEEEE
182173
* Remove public certificate revelation from overlay services by spending the identity token
183174
* @param serialNumber - Unique serial number of the certificate to revoke revelation
184175
*/
185176
async revokeCertificateRevelation(
186177
serialNumber: Base64String
187178
): Promise<BroadcastResponse | BroadcastFailure> {
188-
debugger
189-
190179
// 1. Find existing UTXO
191180
const lookupResolver = new LookupResolver({
192181
networkPreset: (await this.wallet.getNetwork({})).network
@@ -198,8 +187,6 @@ export class IdentityClient {
198187
}
199188
})
200189

201-
console.log(result)
202-
203190
let outpoint: string
204191
let lockingScript: LockingScript | undefined
205192
if (result.type === 'output-list') {
@@ -224,15 +211,15 @@ export class IdentityClient {
224211
options: {
225212
randomizeOutputs: false
226213
}
227-
})
214+
}, this.originator)
228215

229216
if (signableTransaction === undefined) {
230217
throw new Error('Failed to create signable transaction')
231218
}
232219

233220
const partialTx = Transaction.fromBEEF(signableTransaction.tx)
234221

235-
const unlocker = new PushDrop(this.wallet).unlock(
222+
const unlocker = new PushDrop(this.wallet, this.originator).unlock(
236223
this.options.protocolID,
237224
this.options.keyID,
238225
'anyone'
@@ -247,19 +234,17 @@ export class IdentityClient {
247234
unlockingScript: unlockingScript.toHex()
248235
}
249236
}
250-
})
237+
}, this.originator)
251238

252239
// 4. Return broadcast status
253240
// Submit the transaction to an overlay
254-
255-
console.log("REEEEEEE")
256-
const broadcaster = new SHIPBroadcaster(['tm_identity'])
257-
console.log("REEEEEEE 2")
258-
259-
const broadcastResult = await broadcaster.broadcast(Transaction.fromAtomicBEEF(signedTx as number[]))
260-
console.log(broadcastResult)
261-
262-
return broadcastResult // await broadcaster.broadcast(Transaction.fromAtomicBEEF(signedTx as number[]))
241+
const broadcaster = new SHIPBroadcaster(['tm_identity'], {
242+
networkPreset: (await this.wallet.getNetwork({})).network,
243+
requireAcknowledgmentFromAllHostsForTopics: [],
244+
requireAcknowledgmentFromAnyHostForTopics: [],
245+
requireAcknowledgmentFromSpecificHostsForTopics: {'tm_identity': []},
246+
});
247+
return await broadcaster.broadcast(Transaction.fromAtomicBEEF(signedTx as number[]))
263248
}
264249

265250
/**

src/wallet/substrates/WalletWireTransceiver.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1780,7 +1780,6 @@ export default class WalletWireTransceiver implements WalletInterface {
17801780
},
17811781
originator?: OriginatorDomainNameStringUnder250Bytes
17821782
): Promise<{ relinquished: true }> {
1783-
debugger
17841783
const paramWriter = new Utils.Writer()
17851784
const typeAsArray = Utils.toArray(args.type, 'base64')
17861785
paramWriter.write(typeAsArray)

0 commit comments

Comments
 (0)