@bsv/sdk 1.2.2 → 1.2.4
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/dist/cjs/package.json +1 -1
- package/dist/cjs/src/auth/Certificate.js +1 -1
- package/dist/cjs/src/auth/Certificate.js.map +1 -1
- package/dist/cjs/src/overlay-tools/LookupResolver.js +8 -5
- package/dist/cjs/src/overlay-tools/LookupResolver.js.map +1 -1
- package/dist/cjs/src/overlay-tools/OverlayAdminTokenTemplate.js.map +1 -1
- package/dist/cjs/src/overlay-tools/SHIPBroadcaster.js +2 -1
- package/dist/cjs/src/overlay-tools/SHIPBroadcaster.js.map +1 -1
- package/dist/cjs/src/transaction/Beef.js +19 -10
- package/dist/cjs/src/transaction/Beef.js.map +1 -1
- package/dist/cjs/src/transaction/Transaction.js +38 -6
- package/dist/cjs/src/transaction/Transaction.js.map +1 -1
- package/dist/cjs/src/wallet/CachedKeyDeriver.js.map +1 -1
- package/dist/cjs/src/wallet/KeyDeriver.js.map +1 -1
- package/dist/cjs/src/wallet/ProtoWallet.js.map +1 -1
- package/dist/cjs/src/wallet/WalletClient.js.map +1 -1
- package/dist/cjs/src/wallet/WalletError.js.map +1 -1
- package/dist/cjs/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/esm/src/auth/Certificate.js +1 -1
- package/dist/esm/src/auth/Certificate.js.map +1 -1
- package/dist/esm/src/overlay-tools/LookupResolver.js +8 -5
- package/dist/esm/src/overlay-tools/LookupResolver.js.map +1 -1
- package/dist/esm/src/overlay-tools/OverlayAdminTokenTemplate.js.map +1 -1
- package/dist/esm/src/overlay-tools/SHIPBroadcaster.js +2 -1
- package/dist/esm/src/overlay-tools/SHIPBroadcaster.js.map +1 -1
- package/dist/esm/src/transaction/Beef.js +19 -10
- package/dist/esm/src/transaction/Beef.js.map +1 -1
- package/dist/esm/src/transaction/Transaction.js +38 -6
- package/dist/esm/src/transaction/Transaction.js.map +1 -1
- package/dist/esm/src/wallet/CachedKeyDeriver.js.map +1 -1
- package/dist/esm/src/wallet/KeyDeriver.js.map +1 -1
- package/dist/esm/src/wallet/ProtoWallet.js.map +1 -1
- package/dist/esm/src/wallet/WalletClient.js.map +1 -1
- package/dist/esm/src/wallet/WalletError.js.map +1 -1
- package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
- package/dist/types/src/auth/Certificate.d.ts.map +1 -1
- package/dist/types/src/overlay-tools/LookupResolver.d.ts +10 -3
- package/dist/types/src/overlay-tools/LookupResolver.d.ts.map +1 -1
- package/dist/types/src/overlay-tools/OverlayAdminTokenTemplate.d.ts.map +1 -1
- package/dist/types/src/overlay-tools/SHIPBroadcaster.d.ts.map +1 -1
- package/dist/types/src/transaction/Beef.d.ts.map +1 -1
- package/dist/types/src/transaction/Transaction.d.ts.map +1 -1
- package/dist/types/src/wallet/CachedKeyDeriver.d.ts.map +1 -1
- package/dist/types/src/wallet/KeyDeriver.d.ts.map +1 -1
- package/dist/types/src/wallet/ProtoWallet.d.ts.map +1 -1
- package/dist/types/src/wallet/Wallet.interfaces.d.ts +11 -11
- package/dist/types/src/wallet/Wallet.interfaces.d.ts.map +1 -1
- package/dist/types/src/wallet/WalletClient.d.ts.map +1 -1
- package/dist/types/src/wallet/WalletError.d.ts.map +1 -1
- package/dist/types/tsconfig.types.tsbuildinfo +1 -1
- package/dist/umd/bundle.js +1 -1
- package/docs/overlay-tools.md +19 -4
- package/package.json +1 -1
- package/src/auth/Certificate.ts +9 -9
- package/src/auth/index.ts +1 -1
- package/src/overlay-tools/LookupResolver.ts +25 -9
- package/src/overlay-tools/OverlayAdminTokenTemplate.ts +4 -4
- package/src/overlay-tools/SHIPBroadcaster.ts +11 -9
- package/src/overlay-tools/__tests/LookupResolver.test.ts +83 -42
- package/src/overlay-tools/__tests/SHIPBroadcaster.test.ts +5 -5
- package/src/overlay-tools/index.ts +1 -1
- package/src/transaction/Beef.ts +33 -48
- package/src/transaction/BeefParty.ts +4 -4
- package/src/transaction/BeefTx.ts +1 -1
- package/src/transaction/Transaction.ts +38 -10
- package/src/transaction/__tests/Transaction.test.ts +133 -4
- package/src/wallet/CachedKeyDeriver.ts +10 -10
- package/src/wallet/KeyDeriver.ts +8 -8
- package/src/wallet/ProtoWallet.ts +176 -176
- package/src/wallet/Wallet.interfaces.ts +19 -19
- package/src/wallet/WalletClient.ts +30 -30
- package/src/wallet/WalletError.ts +2 -2
|
@@ -39,11 +39,11 @@ export default class ProtoWallet implements Wallet {
|
|
|
39
39
|
privilegedError: string =
|
|
40
40
|
'ProtoWallet is a single-keyring wallet, operating without context about whether its configured keyring is privileged.'
|
|
41
41
|
|
|
42
|
-
constructor(rootKey: PrivateKey | 'anyone', KeyDeriverClass = KeyDeriver) {
|
|
42
|
+
constructor (rootKey: PrivateKey | 'anyone', KeyDeriverClass = KeyDeriver) {
|
|
43
43
|
this.keyDeriver = new KeyDeriverClass(rootKey)
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
async createAction(
|
|
46
|
+
async createAction (
|
|
47
47
|
args: {
|
|
48
48
|
description: DescriptionString5to50Bytes
|
|
49
49
|
inputs?: Array<{
|
|
@@ -79,29 +79,29 @@ export default class ProtoWallet implements Wallet {
|
|
|
79
79
|
},
|
|
80
80
|
originator?: OriginatorDomainNameStringUnder250Bytes
|
|
81
81
|
): Promise<{
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
82
|
+
txid?: TXIDHexString
|
|
83
|
+
tx?: BEEF
|
|
84
|
+
noSendChange?: OutpointString[]
|
|
85
|
+
sendWithResults?: Array<{
|
|
86
|
+
txid: TXIDHexString
|
|
87
|
+
status: 'unproven' | 'sending' | 'failed'
|
|
88
|
+
}>
|
|
89
|
+
signableTransaction?: {
|
|
90
|
+
tx: BEEF
|
|
91
|
+
reference: Base64String
|
|
92
|
+
}
|
|
93
|
+
}> {
|
|
94
94
|
throw new WalletError('ProtoWallet does not support creating transactions.', walletErrors.unsupportedAction)
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
async signAction(
|
|
97
|
+
async signAction (
|
|
98
98
|
args: {
|
|
99
99
|
spends: Record<
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
100
|
+
PositiveIntegerOrZero,
|
|
101
|
+
{
|
|
102
|
+
unlockingScript: HexString
|
|
103
|
+
sequenceNumber?: PositiveIntegerOrZero
|
|
104
|
+
}
|
|
105
105
|
>
|
|
106
106
|
reference: Base64String
|
|
107
107
|
options?: {
|
|
@@ -114,18 +114,18 @@ export default class ProtoWallet implements Wallet {
|
|
|
114
114
|
},
|
|
115
115
|
originator?: OriginatorDomainNameStringUnder250Bytes
|
|
116
116
|
): Promise<{
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
117
|
+
txid?: TXIDHexString
|
|
118
|
+
tx?: BEEF
|
|
119
|
+
noSendChange?: OutpointString[]
|
|
120
|
+
sendWithResults?: Array<{
|
|
121
|
+
txid: TXIDHexString
|
|
122
|
+
status: 'unproven' | 'sending' | 'failed'
|
|
123
|
+
}>
|
|
124
|
+
}> {
|
|
125
125
|
throw new WalletError('ProtoWallet does not support creating transactions.', walletErrors.unsupportedAction)
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
-
async abortAction(
|
|
128
|
+
async abortAction (
|
|
129
129
|
args: {
|
|
130
130
|
reference: Base64String
|
|
131
131
|
},
|
|
@@ -134,7 +134,7 @@ export default class ProtoWallet implements Wallet {
|
|
|
134
134
|
throw new WalletError('ProtoWallet does not support aborting transactions.', walletErrors.unsupportedAction)
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
-
async listActions(
|
|
137
|
+
async listActions (
|
|
138
138
|
args: {
|
|
139
139
|
labels: LabelStringUnder300Bytes[]
|
|
140
140
|
labelQueryMode?: 'any' | 'all'
|
|
@@ -149,47 +149,47 @@ export default class ProtoWallet implements Wallet {
|
|
|
149
149
|
},
|
|
150
150
|
originator?: OriginatorDomainNameStringUnder250Bytes
|
|
151
151
|
): Promise<{
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
satoshis: SatoshiValue
|
|
156
|
-
status:
|
|
157
|
-
| 'completed'
|
|
158
|
-
| 'unprocessed'
|
|
159
|
-
| 'sending'
|
|
160
|
-
| 'unproven'
|
|
161
|
-
| 'unsigned'
|
|
162
|
-
| 'nosend'
|
|
163
|
-
| 'nonfinal'
|
|
164
|
-
isOutgoing: boolean
|
|
165
|
-
description: DescriptionString5to50Bytes
|
|
166
|
-
labels?: LabelStringUnder300Bytes[]
|
|
167
|
-
version: PositiveIntegerOrZero
|
|
168
|
-
lockTime: PositiveIntegerOrZero
|
|
169
|
-
inputs?: Array<{
|
|
170
|
-
sourceOutpoint: OutpointString
|
|
171
|
-
sourceSatoshis: SatoshiValue
|
|
172
|
-
sourceLockingScript?: HexString
|
|
173
|
-
unlockingScript?: HexString
|
|
174
|
-
inputDescription: DescriptionString5to50Bytes
|
|
175
|
-
sequenceNumber: PositiveIntegerOrZero
|
|
176
|
-
}>
|
|
177
|
-
outputs?: Array<{
|
|
178
|
-
outputIndex: PositiveIntegerOrZero
|
|
152
|
+
totalActions: PositiveIntegerOrZero
|
|
153
|
+
actions: Array<{
|
|
154
|
+
txid: TXIDHexString
|
|
179
155
|
satoshis: SatoshiValue
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
156
|
+
status:
|
|
157
|
+
| 'completed'
|
|
158
|
+
| 'unprocessed'
|
|
159
|
+
| 'sending'
|
|
160
|
+
| 'unproven'
|
|
161
|
+
| 'unsigned'
|
|
162
|
+
| 'nosend'
|
|
163
|
+
| 'nonfinal'
|
|
164
|
+
isOutgoing: boolean
|
|
165
|
+
description: DescriptionString5to50Bytes
|
|
166
|
+
labels?: LabelStringUnder300Bytes[]
|
|
167
|
+
version: PositiveIntegerOrZero
|
|
168
|
+
lockTime: PositiveIntegerOrZero
|
|
169
|
+
inputs?: Array<{
|
|
170
|
+
sourceOutpoint: OutpointString
|
|
171
|
+
sourceSatoshis: SatoshiValue
|
|
172
|
+
sourceLockingScript?: HexString
|
|
173
|
+
unlockingScript?: HexString
|
|
174
|
+
inputDescription: DescriptionString5to50Bytes
|
|
175
|
+
sequenceNumber: PositiveIntegerOrZero
|
|
176
|
+
}>
|
|
177
|
+
outputs?: Array<{
|
|
178
|
+
outputIndex: PositiveIntegerOrZero
|
|
179
|
+
satoshis: SatoshiValue
|
|
180
|
+
lockingScript?: HexString
|
|
181
|
+
spendable: boolean
|
|
182
|
+
outputDescription: DescriptionString5to50Bytes
|
|
183
|
+
basket: BasketStringUnder300Bytes
|
|
184
|
+
tags: OutputTagStringUnder300Bytes[]
|
|
185
|
+
customInstructions?: string
|
|
186
|
+
}>
|
|
186
187
|
}>
|
|
187
|
-
}>
|
|
188
|
-
}> {
|
|
188
|
+
}> {
|
|
189
189
|
throw new WalletError('ProtoWallet does not support retrieving transactions.', walletErrors.unsupportedAction)
|
|
190
190
|
}
|
|
191
191
|
|
|
192
|
-
async internalizeAction(
|
|
192
|
+
async internalizeAction (
|
|
193
193
|
args: {
|
|
194
194
|
tx: BEEF
|
|
195
195
|
outputs: Array<{
|
|
@@ -214,7 +214,7 @@ export default class ProtoWallet implements Wallet {
|
|
|
214
214
|
throw new WalletError('ProtoWallet does not support internalizing transactions.', walletErrors.unsupportedAction)
|
|
215
215
|
}
|
|
216
216
|
|
|
217
|
-
async listOutputs(
|
|
217
|
+
async listOutputs (
|
|
218
218
|
args: {
|
|
219
219
|
basket: BasketStringUnder300Bytes
|
|
220
220
|
tags?: OutputTagStringUnder300Bytes[]
|
|
@@ -228,22 +228,22 @@ export default class ProtoWallet implements Wallet {
|
|
|
228
228
|
},
|
|
229
229
|
originator?: OriginatorDomainNameStringUnder250Bytes
|
|
230
230
|
): Promise<{
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
231
|
+
totalOutputs: PositiveIntegerOrZero
|
|
232
|
+
outputs: Array<{
|
|
233
|
+
outpoint: OutpointString
|
|
234
|
+
satoshis: SatoshiValue
|
|
235
|
+
lockingScript?: HexString
|
|
236
|
+
tx?: BEEF
|
|
237
|
+
spendable: true
|
|
238
|
+
customInstructions?: string
|
|
239
|
+
tags?: OutputTagStringUnder300Bytes[]
|
|
240
|
+
labels?: LabelStringUnder300Bytes[]
|
|
241
|
+
}>
|
|
242
|
+
}> {
|
|
243
243
|
throw new WalletError('ProtoWallet does not support retrieving outputs.', walletErrors.unsupportedAction)
|
|
244
244
|
}
|
|
245
245
|
|
|
246
|
-
async relinquishOutput(
|
|
246
|
+
async relinquishOutput (
|
|
247
247
|
args: {
|
|
248
248
|
basket: BasketStringUnder300Bytes
|
|
249
249
|
output: OutpointString
|
|
@@ -253,7 +253,7 @@ export default class ProtoWallet implements Wallet {
|
|
|
253
253
|
throw new WalletError('ProtoWallet does not support deleting outputs.', walletErrors.unsupportedAction)
|
|
254
254
|
}
|
|
255
255
|
|
|
256
|
-
async getPublicKey(
|
|
256
|
+
async getPublicKey (
|
|
257
257
|
args: {
|
|
258
258
|
identityKey?: true
|
|
259
259
|
protocolID?: [0 | 1 | 2, ProtocolString5To400Bytes]
|
|
@@ -284,7 +284,7 @@ export default class ProtoWallet implements Wallet {
|
|
|
284
284
|
}
|
|
285
285
|
}
|
|
286
286
|
|
|
287
|
-
async revealCounterpartyKeyLinkage(
|
|
287
|
+
async revealCounterpartyKeyLinkage (
|
|
288
288
|
args: {
|
|
289
289
|
counterparty: PubKeyHex
|
|
290
290
|
verifier: PubKeyHex
|
|
@@ -293,13 +293,13 @@ export default class ProtoWallet implements Wallet {
|
|
|
293
293
|
},
|
|
294
294
|
originator?: OriginatorDomainNameStringUnder250Bytes
|
|
295
295
|
): Promise<{
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
296
|
+
prover: PubKeyHex
|
|
297
|
+
verifier: PubKeyHex
|
|
298
|
+
counterparty: PubKeyHex
|
|
299
|
+
revelationTime: ISOTimestampString
|
|
300
|
+
encryptedLinkage: Byte[]
|
|
301
|
+
encryptedLinkageProof: Byte[]
|
|
302
|
+
}> {
|
|
303
303
|
if (args.privileged) {
|
|
304
304
|
throw new WalletError(this.privilegedError)
|
|
305
305
|
}
|
|
@@ -334,7 +334,7 @@ export default class ProtoWallet implements Wallet {
|
|
|
334
334
|
}
|
|
335
335
|
}
|
|
336
336
|
|
|
337
|
-
async revealSpecificKeyLinkage(
|
|
337
|
+
async revealSpecificKeyLinkage (
|
|
338
338
|
args: {
|
|
339
339
|
counterparty: PubKeyHex
|
|
340
340
|
verifier: PubKeyHex
|
|
@@ -345,15 +345,15 @@ export default class ProtoWallet implements Wallet {
|
|
|
345
345
|
},
|
|
346
346
|
originator?: OriginatorDomainNameStringUnder250Bytes
|
|
347
347
|
): Promise<{
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
348
|
+
prover: PubKeyHex
|
|
349
|
+
verifier: PubKeyHex
|
|
350
|
+
counterparty: PubKeyHex
|
|
351
|
+
protocolID: [0 | 1 | 2, ProtocolString5To400Bytes]
|
|
352
|
+
keyID: KeyIDStringUnder800Bytes
|
|
353
|
+
encryptedLinkage: Byte[]
|
|
354
|
+
encryptedLinkageProof: Byte[]
|
|
355
|
+
proofType: Byte
|
|
356
|
+
}> {
|
|
357
357
|
if (args.privileged) {
|
|
358
358
|
throw new WalletError(this.privilegedError)
|
|
359
359
|
}
|
|
@@ -387,7 +387,7 @@ export default class ProtoWallet implements Wallet {
|
|
|
387
387
|
}
|
|
388
388
|
}
|
|
389
389
|
|
|
390
|
-
async encrypt(
|
|
390
|
+
async encrypt (
|
|
391
391
|
args: {
|
|
392
392
|
plaintext: Byte[]
|
|
393
393
|
protocolID: [0 | 1 | 2, ProtocolString5To400Bytes]
|
|
@@ -409,7 +409,7 @@ export default class ProtoWallet implements Wallet {
|
|
|
409
409
|
return { ciphertext: key.encrypt(args.plaintext) as number[] }
|
|
410
410
|
}
|
|
411
411
|
|
|
412
|
-
async decrypt(
|
|
412
|
+
async decrypt (
|
|
413
413
|
args: {
|
|
414
414
|
ciphertext: Byte[]
|
|
415
415
|
protocolID: [0 | 1 | 2, ProtocolString5To400Bytes]
|
|
@@ -431,7 +431,7 @@ export default class ProtoWallet implements Wallet {
|
|
|
431
431
|
return { plaintext: key.decrypt(args.ciphertext) as number[] }
|
|
432
432
|
}
|
|
433
433
|
|
|
434
|
-
async createHmac(
|
|
434
|
+
async createHmac (
|
|
435
435
|
args: {
|
|
436
436
|
data: Byte[]
|
|
437
437
|
protocolID: [0 | 1 | 2, ProtocolString5To400Bytes]
|
|
@@ -453,7 +453,7 @@ export default class ProtoWallet implements Wallet {
|
|
|
453
453
|
return { hmac: Hash.sha256hmac(key.toArray(), args.data) }
|
|
454
454
|
}
|
|
455
455
|
|
|
456
|
-
async verifyHmac(
|
|
456
|
+
async verifyHmac (
|
|
457
457
|
args: {
|
|
458
458
|
data: Byte[]
|
|
459
459
|
hmac: Byte[]
|
|
@@ -480,7 +480,7 @@ export default class ProtoWallet implements Wallet {
|
|
|
480
480
|
return { valid }
|
|
481
481
|
}
|
|
482
482
|
|
|
483
|
-
async createSignature(
|
|
483
|
+
async createSignature (
|
|
484
484
|
args: {
|
|
485
485
|
data?: Byte[]
|
|
486
486
|
hashToDirectlySign?: Byte[]
|
|
@@ -507,7 +507,7 @@ export default class ProtoWallet implements Wallet {
|
|
|
507
507
|
return { signature: ECDSA.sign(new BigNumber(hash), key, true).toDER() as number[] }
|
|
508
508
|
}
|
|
509
509
|
|
|
510
|
-
async verifySignature(
|
|
510
|
+
async verifySignature (
|
|
511
511
|
args: {
|
|
512
512
|
data?: Byte[]
|
|
513
513
|
hashToDirectlyVerify?: Byte[]
|
|
@@ -541,7 +541,7 @@ export default class ProtoWallet implements Wallet {
|
|
|
541
541
|
return { valid }
|
|
542
542
|
}
|
|
543
543
|
|
|
544
|
-
async acquireCertificate(
|
|
544
|
+
async acquireCertificate (
|
|
545
545
|
args: {
|
|
546
546
|
type: Base64String
|
|
547
547
|
certifier: PubKeyHex
|
|
@@ -558,18 +558,18 @@ export default class ProtoWallet implements Wallet {
|
|
|
558
558
|
},
|
|
559
559
|
originator?: OriginatorDomainNameStringUnder250Bytes
|
|
560
560
|
): Promise<{
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
561
|
+
type: Base64String
|
|
562
|
+
subject: PubKeyHex
|
|
563
|
+
serialNumber: Base64String
|
|
564
|
+
certifier: PubKeyHex
|
|
565
|
+
revocationOutpoint: OutpointString
|
|
566
|
+
signature: HexString
|
|
567
|
+
fields: Record<CertificateFieldNameUnder50Bytes, string>
|
|
568
|
+
}> {
|
|
569
569
|
throw new WalletError('ProtoWallet does not support acquiring certificates.', walletErrors.unsupportedAction)
|
|
570
570
|
}
|
|
571
571
|
|
|
572
|
-
async listCertificates(
|
|
572
|
+
async listCertificates (
|
|
573
573
|
args: {
|
|
574
574
|
certifiers: PubKeyHex[]
|
|
575
575
|
types: Base64String[]
|
|
@@ -580,21 +580,21 @@ export default class ProtoWallet implements Wallet {
|
|
|
580
580
|
},
|
|
581
581
|
originator?: OriginatorDomainNameStringUnder250Bytes
|
|
582
582
|
): Promise<{
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
583
|
+
totalCertificates: PositiveIntegerOrZero
|
|
584
|
+
certificates: Array<{
|
|
585
|
+
type: Base64String
|
|
586
|
+
subject: PubKeyHex
|
|
587
|
+
serialNumber: Base64String
|
|
588
|
+
certifier: PubKeyHex
|
|
589
|
+
revocationOutpoint: OutpointString
|
|
590
|
+
signature: HexString
|
|
591
|
+
fields: Record<CertificateFieldNameUnder50Bytes, string>
|
|
592
|
+
}>
|
|
593
|
+
}> {
|
|
594
594
|
throw new WalletError('ProtoWallet does not support retrieving certificates.', walletErrors.unsupportedAction)
|
|
595
595
|
}
|
|
596
596
|
|
|
597
|
-
async proveCertificate(
|
|
597
|
+
async proveCertificate (
|
|
598
598
|
args: {
|
|
599
599
|
certificate: {
|
|
600
600
|
type: Base64String
|
|
@@ -612,12 +612,12 @@ export default class ProtoWallet implements Wallet {
|
|
|
612
612
|
},
|
|
613
613
|
originator?: OriginatorDomainNameStringUnder250Bytes
|
|
614
614
|
): Promise<{
|
|
615
|
-
|
|
616
|
-
|
|
615
|
+
keyringForVerifier: Record<CertificateFieldNameUnder50Bytes, Base64String>
|
|
616
|
+
}> {
|
|
617
617
|
throw new WalletError('ProtoWallet does not support proving certificates.', walletErrors.unsupportedAction)
|
|
618
618
|
}
|
|
619
619
|
|
|
620
|
-
async relinquishCertificate(
|
|
620
|
+
async relinquishCertificate (
|
|
621
621
|
args: {
|
|
622
622
|
type: Base64String
|
|
623
623
|
serialNumber: Base64String
|
|
@@ -628,7 +628,7 @@ export default class ProtoWallet implements Wallet {
|
|
|
628
628
|
throw new WalletError('ProtoWallet does not support deleting certificates.', walletErrors.unsupportedAction)
|
|
629
629
|
}
|
|
630
630
|
|
|
631
|
-
async discoverByIdentityKey(
|
|
631
|
+
async discoverByIdentityKey (
|
|
632
632
|
args: {
|
|
633
633
|
identityKey: PubKeyHex
|
|
634
634
|
limit?: PositiveIntegerDefault10Max10000
|
|
@@ -636,29 +636,29 @@ export default class ProtoWallet implements Wallet {
|
|
|
636
636
|
},
|
|
637
637
|
originator?: OriginatorDomainNameStringUnder250Bytes
|
|
638
638
|
): Promise<{
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
639
|
+
totalCertificates: PositiveIntegerOrZero
|
|
640
|
+
certificates: Array<{
|
|
641
|
+
type: Base64String
|
|
642
|
+
subject: PubKeyHex
|
|
643
|
+
serialNumber: Base64String
|
|
644
|
+
certifier: PubKeyHex
|
|
645
|
+
revocationOutpoint: OutpointString
|
|
646
|
+
signature: HexString
|
|
647
|
+
fields: Record<CertificateFieldNameUnder50Bytes, Base64String>
|
|
648
|
+
certifierInfo: {
|
|
649
|
+
name: EntityNameStringMax100Bytes
|
|
650
|
+
iconUrl: EntityIconURLStringMax500Bytes
|
|
651
|
+
description: DescriptionString5to50Bytes
|
|
652
|
+
trust: PositiveIntegerMax10
|
|
653
|
+
}
|
|
654
|
+
publiclyRevealedKeyring: Record<CertificateFieldNameUnder50Bytes, Base64String>
|
|
655
|
+
decryptedFields: Record<CertificateFieldNameUnder50Bytes, string>
|
|
656
|
+
}>
|
|
657
|
+
}> {
|
|
658
658
|
throw new WalletError('ProtoWallet does not support resolving identities.', walletErrors.unsupportedAction)
|
|
659
659
|
}
|
|
660
660
|
|
|
661
|
-
async discoverByAttributes(
|
|
661
|
+
async discoverByAttributes (
|
|
662
662
|
args: {
|
|
663
663
|
attributes: Record<CertificateFieldNameUnder50Bytes, string>
|
|
664
664
|
limit?: PositiveIntegerDefault10Max10000
|
|
@@ -666,64 +666,64 @@ export default class ProtoWallet implements Wallet {
|
|
|
666
666
|
},
|
|
667
667
|
originator?: OriginatorDomainNameStringUnder250Bytes
|
|
668
668
|
): Promise<{
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
669
|
+
totalCertificates: PositiveIntegerOrZero
|
|
670
|
+
certificates: Array<{
|
|
671
|
+
type: Base64String
|
|
672
|
+
subject: PubKeyHex
|
|
673
|
+
serialNumber: Base64String
|
|
674
|
+
certifier: PubKeyHex
|
|
675
|
+
revocationOutpoint: OutpointString
|
|
676
|
+
signature: HexString
|
|
677
|
+
fields: Record<CertificateFieldNameUnder50Bytes, Base64String>
|
|
678
|
+
certifierInfo: {
|
|
679
|
+
name: EntityNameStringMax100Bytes
|
|
680
|
+
iconUrl: EntityIconURLStringMax500Bytes
|
|
681
|
+
description: DescriptionString5to50Bytes
|
|
682
|
+
trust: PositiveIntegerMax10
|
|
683
|
+
}
|
|
684
|
+
publiclyRevealedKeyring: Record<CertificateFieldNameUnder50Bytes, Base64String>
|
|
685
|
+
decryptedFields: Record<CertificateFieldNameUnder50Bytes, string>
|
|
686
|
+
}>
|
|
687
|
+
}> {
|
|
688
688
|
throw new WalletError('ProtoWallet does not support resolving identities.', walletErrors.unsupportedAction)
|
|
689
689
|
}
|
|
690
690
|
|
|
691
|
-
async isAuthenticated(
|
|
691
|
+
async isAuthenticated (
|
|
692
692
|
args: {},
|
|
693
693
|
originator?: OriginatorDomainNameStringUnder250Bytes
|
|
694
694
|
): Promise<{ authenticated: boolean }> {
|
|
695
695
|
return { authenticated: true }
|
|
696
696
|
}
|
|
697
697
|
|
|
698
|
-
async waitForAuthentication(
|
|
698
|
+
async waitForAuthentication (
|
|
699
699
|
args: {},
|
|
700
700
|
originator?: OriginatorDomainNameStringUnder250Bytes
|
|
701
701
|
): Promise<{ authenticated: true }> {
|
|
702
702
|
return { authenticated: true }
|
|
703
703
|
}
|
|
704
704
|
|
|
705
|
-
async getHeight(
|
|
705
|
+
async getHeight (
|
|
706
706
|
args: {},
|
|
707
707
|
originator?: OriginatorDomainNameStringUnder250Bytes
|
|
708
708
|
): Promise<{ height: PositiveInteger }> {
|
|
709
709
|
throw new WalletError('ProtoWallet does not support blockchain tracking.', walletErrors.unsupportedAction)
|
|
710
710
|
}
|
|
711
711
|
|
|
712
|
-
async getHeaderForHeight(
|
|
712
|
+
async getHeaderForHeight (
|
|
713
713
|
args: { height: PositiveInteger },
|
|
714
714
|
originator?: OriginatorDomainNameStringUnder250Bytes
|
|
715
715
|
): Promise<{ header: HexString }> {
|
|
716
716
|
throw new WalletError('ProtoWallet does not support blockchain tracking.', walletErrors.unsupportedAction)
|
|
717
717
|
}
|
|
718
718
|
|
|
719
|
-
async getNetwork(
|
|
719
|
+
async getNetwork (
|
|
720
720
|
args: {},
|
|
721
721
|
originator?: OriginatorDomainNameStringUnder250Bytes
|
|
722
722
|
): Promise<{ network: 'mainnet' | 'testnet' }> {
|
|
723
723
|
return { network: 'mainnet' }
|
|
724
724
|
}
|
|
725
725
|
|
|
726
|
-
async getVersion(
|
|
726
|
+
async getVersion (
|
|
727
727
|
args: {},
|
|
728
728
|
originator?: OriginatorDomainNameStringUnder250Bytes
|
|
729
729
|
): Promise<{ version: VersionString7To30Bytes }> {
|