@bsv/sdk 1.3.2 → 1.3.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/certificates/Certificate.js +3 -4
- package/dist/cjs/src/auth/certificates/Certificate.js.map +1 -1
- package/dist/cjs/src/auth/certificates/MasterCertificate.js.map +1 -1
- package/dist/cjs/src/auth/utils/certificateHelpers.js +2 -2
- package/dist/cjs/src/auth/utils/certificateHelpers.js.map +1 -1
- package/dist/cjs/src/wallet/CachedKeyDeriver.js +11 -14
- package/dist/cjs/src/wallet/CachedKeyDeriver.js.map +1 -1
- package/dist/cjs/src/wallet/KeyDeriver.js +14 -11
- package/dist/cjs/src/wallet/KeyDeriver.js.map +1 -1
- package/dist/cjs/src/wallet/ProtoWallet.js +53 -111
- 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/substrates/WalletWireTransceiver.js +1 -0
- package/dist/cjs/src/wallet/substrates/WalletWireTransceiver.js.map +1 -1
- package/dist/cjs/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/esm/src/auth/certificates/Certificate.js +4 -5
- package/dist/esm/src/auth/certificates/Certificate.js.map +1 -1
- package/dist/esm/src/auth/certificates/MasterCertificate.js.map +1 -1
- package/dist/esm/src/auth/utils/certificateHelpers.js +2 -2
- package/dist/esm/src/auth/utils/certificateHelpers.js.map +1 -1
- package/dist/esm/src/wallet/CachedKeyDeriver.js +10 -10
- package/dist/esm/src/wallet/CachedKeyDeriver.js.map +1 -1
- package/dist/esm/src/wallet/KeyDeriver.js +15 -12
- package/dist/esm/src/wallet/KeyDeriver.js.map +1 -1
- package/dist/esm/src/wallet/ProtoWallet.js +53 -76
- 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/substrates/WalletWireTransceiver.js +1 -0
- package/dist/esm/src/wallet/substrates/WalletWireTransceiver.js.map +1 -1
- package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
- package/dist/types/src/auth/certificates/Certificate.d.ts +2 -2
- package/dist/types/src/auth/certificates/Certificate.d.ts.map +1 -1
- package/dist/types/src/auth/certificates/MasterCertificate.d.ts +2 -2
- package/dist/types/src/auth/certificates/MasterCertificate.d.ts.map +1 -1
- package/dist/types/src/auth/utils/certificateHelpers.d.ts +5 -5
- package/dist/types/src/auth/utils/certificateHelpers.d.ts.map +1 -1
- package/dist/types/src/wallet/CachedKeyDeriver.d.ts +16 -15
- package/dist/types/src/wallet/CachedKeyDeriver.d.ts.map +1 -1
- package/dist/types/src/wallet/KeyDeriver.d.ts +74 -18
- package/dist/types/src/wallet/KeyDeriver.d.ts.map +1 -1
- package/dist/types/src/wallet/ProtoWallet.d.ts +31 -407
- package/dist/types/src/wallet/ProtoWallet.d.ts.map +1 -1
- package/dist/types/src/wallet/Wallet.interfaces.d.ts +201 -169
- package/dist/types/src/wallet/Wallet.interfaces.d.ts.map +1 -1
- package/dist/types/src/wallet/WalletClient.d.ts +2 -3
- package/dist/types/src/wallet/WalletClient.d.ts.map +1 -1
- package/dist/types/src/wallet/substrates/HTTPWalletJSON.d.ts +1 -1
- package/dist/types/src/wallet/substrates/HTTPWalletJSON.d.ts.map +1 -1
- package/dist/types/src/wallet/substrates/WalletWireTransceiver.d.ts +1 -1
- package/dist/types/src/wallet/substrates/WalletWireTransceiver.d.ts.map +1 -1
- package/dist/types/src/wallet/substrates/XDM.d.ts +2 -2
- package/dist/types/src/wallet/substrates/XDM.d.ts.map +1 -1
- package/dist/types/src/wallet/substrates/window.CWI.d.ts +2 -2
- package/dist/types/src/wallet/substrates/window.CWI.d.ts.map +1 -1
- package/dist/types/tsconfig.types.tsbuildinfo +1 -1
- package/dist/umd/bundle.js +1 -1
- package/docs/auth.md +12 -12
- package/docs/wallet-substrates.md +6 -6
- package/docs/wallet.md +897 -983
- package/package.json +1 -1
- package/src/auth/certificates/Certificate.ts +6 -6
- package/src/auth/certificates/MasterCertificate.ts +3 -2
- package/src/auth/utils/certificateHelpers.ts +5 -5
- package/src/wallet/CachedKeyDeriver.ts +22 -21
- package/src/wallet/KeyDeriver.ts +89 -22
- package/src/wallet/ProtoWallet.ts +105 -550
- package/src/wallet/Wallet.interfaces.ts +259 -176
- package/src/wallet/WalletClient.ts +2 -1
- package/src/wallet/__tests/ProtoWallet.test.ts +0 -53
- package/src/wallet/substrates/HTTPWalletJSON.ts +1 -1
- package/src/wallet/substrates/WalletWireTransceiver.ts +2 -1
- package/src/wallet/substrates/XDM.ts +2 -2
- package/src/wallet/substrates/__tests/WalletWire.integration.test.ts +22 -22
- package/src/wallet/substrates/window.CWI.ts +2 -2
|
@@ -4,6 +4,7 @@ import XDMSubstrate from './substrates/XDM.js'
|
|
|
4
4
|
import WalletWireTransceiver from './substrates/WalletWireTransceiver.js'
|
|
5
5
|
import HTTPWalletWire from './substrates/HTTPWalletWire.js'
|
|
6
6
|
import HTTPWalletJSON from './substrates/HTTPWalletJSON.js'
|
|
7
|
+
import { AuthenticatedResult } from './Wallet.interfaces.js'
|
|
7
8
|
|
|
8
9
|
const MAX_XDM_RESPONSE_WAIT = 200
|
|
9
10
|
|
|
@@ -177,7 +178,7 @@ export default class WalletClient implements Wallet {
|
|
|
177
178
|
return await (this.substrate as Wallet).discoverByAttributes(args, this.originator)
|
|
178
179
|
}
|
|
179
180
|
|
|
180
|
-
async isAuthenticated (args: {} = {}): Promise<
|
|
181
|
+
async isAuthenticated (args: {} = {}): Promise<AuthenticatedResult> {
|
|
181
182
|
await this.connectToSubstrate()
|
|
182
183
|
return await (this.substrate as Wallet).isAuthenticated(args, this.originator)
|
|
183
184
|
}
|
|
@@ -6,52 +6,6 @@ const sampleData = [3, 1, 4, 1, 5, 9]
|
|
|
6
6
|
describe('ProtoWallet', () => {
|
|
7
7
|
it('Throws when functions are not supported', async () => {
|
|
8
8
|
const wallet = new ProtoWallet('anyone')
|
|
9
|
-
await expect(() => {
|
|
10
|
-
return (wallet as any).createAction()
|
|
11
|
-
}).rejects.toThrow()
|
|
12
|
-
await expect(() => {
|
|
13
|
-
return (wallet as any).abortAction()
|
|
14
|
-
}).rejects.toThrow()
|
|
15
|
-
await expect(() => {
|
|
16
|
-
return (wallet as any).signAction()
|
|
17
|
-
}).rejects.toThrow()
|
|
18
|
-
await expect(() => {
|
|
19
|
-
return (wallet as any).listOutputs()
|
|
20
|
-
}).rejects.toThrow()
|
|
21
|
-
await expect(() => {
|
|
22
|
-
return (wallet as any).relinquishOutput()
|
|
23
|
-
}).rejects.toThrow()
|
|
24
|
-
await expect(() => {
|
|
25
|
-
return (wallet as any).listActions()
|
|
26
|
-
}).rejects.toThrow()
|
|
27
|
-
await expect(() => {
|
|
28
|
-
return (wallet as any).internalizeAction()
|
|
29
|
-
}).rejects.toThrow()
|
|
30
|
-
await expect(() => {
|
|
31
|
-
return (wallet as any).acquireCertificate()
|
|
32
|
-
}).rejects.toThrow()
|
|
33
|
-
await expect(() => {
|
|
34
|
-
return (wallet as any).proveCertificate()
|
|
35
|
-
}).rejects.toThrow()
|
|
36
|
-
await expect(() => {
|
|
37
|
-
return (wallet as any).listCertificates()
|
|
38
|
-
}).rejects.toThrow()
|
|
39
|
-
await expect(() => {
|
|
40
|
-
return (wallet as any).relinquishCertificate()
|
|
41
|
-
}).rejects.toThrow()
|
|
42
|
-
await expect(() => {
|
|
43
|
-
return (wallet as any).getHeight()
|
|
44
|
-
}).rejects.toThrow()
|
|
45
|
-
await expect(() => {
|
|
46
|
-
return (wallet as any).getHeaderForHeight()
|
|
47
|
-
}).rejects.toThrow()
|
|
48
|
-
// TODO: Remove these two from the throw list once they are implemented.
|
|
49
|
-
await expect(() => {
|
|
50
|
-
return (wallet as any).discoverByIdentityKey()
|
|
51
|
-
}).rejects.toThrow()
|
|
52
|
-
await expect(() => {
|
|
53
|
-
return (wallet as any).discoverByAttributes()
|
|
54
|
-
}).rejects.toThrow()
|
|
55
9
|
})
|
|
56
10
|
it('Throws the privileged error when the privileged flag is set', async () => {
|
|
57
11
|
const wallet = new ProtoWallet('anyone')
|
|
@@ -339,13 +293,6 @@ describe('ProtoWallet', () => {
|
|
|
339
293
|
counterparty: counterpartyKey.toPublicKey().toString()
|
|
340
294
|
})).rejects.toThrow()
|
|
341
295
|
})
|
|
342
|
-
it('Returns the expected version, network, and authentication status', async () => {
|
|
343
|
-
const wallet = new ProtoWallet('anyone')
|
|
344
|
-
expect(await wallet.getVersion({})).toEqual({ version: 'proto-1.0.0' })
|
|
345
|
-
expect(await wallet.getNetwork({})).toEqual({ network: 'mainnet' })
|
|
346
|
-
expect(await wallet.isAuthenticated({})).toEqual({ authenticated: true })
|
|
347
|
-
expect(await wallet.waitForAuthentication({})).toEqual({ authenticated: true })
|
|
348
|
-
})
|
|
349
296
|
it('Uses anyone for creating signatures and self for other operations if no counterparty is provided', async () => {
|
|
350
297
|
const userKey = PrivateKey.fromRandom()
|
|
351
298
|
const user = new ProtoWallet(userKey)
|
|
@@ -117,7 +117,7 @@ export default class HTTPWalletJSON implements Wallet {
|
|
|
117
117
|
return await this.api('discoverByAttributes', args)
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
-
async isAuthenticated(args: {}): Promise<{ authenticated:
|
|
120
|
+
async isAuthenticated(args: {}): Promise<{ authenticated: true }> {
|
|
121
121
|
return await this.api('isAuthenticated', args)
|
|
122
122
|
}
|
|
123
123
|
|
|
@@ -1411,8 +1411,9 @@ export default class WalletWireTransceiver implements Wallet {
|
|
|
1411
1411
|
return this.parseDiscoveryResult(result)
|
|
1412
1412
|
}
|
|
1413
1413
|
|
|
1414
|
-
async isAuthenticated(args: {}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{ authenticated:
|
|
1414
|
+
async isAuthenticated(args: {}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{ authenticated: true }> {
|
|
1415
1415
|
const result = await this.transmit('isAuthenticated', originator)
|
|
1416
|
+
// @ts-ignore
|
|
1416
1417
|
return { authenticated: !!result[0] }
|
|
1417
1418
|
}
|
|
1418
1419
|
|
|
@@ -63,7 +63,7 @@ export default class XDMSubstrate implements Wallet {
|
|
|
63
63
|
return await this.invoke('internalizeAction', args)
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
async listOutputs(args: { basket: BasketStringUnder300Bytes, tags?: OutputTagStringUnder300Bytes[], tagQueryMode?: 'all' | 'any', include?: 'locking scripts' | 'entire transactions', includeCustomInstructions?: BooleanDefaultFalse, includeTags?: BooleanDefaultFalse, includeLabels?: BooleanDefaultFalse, limit?: PositiveIntegerDefault10Max10000, offset?: PositiveIntegerOrZero }): Promise<{ totalOutputs: PositiveIntegerOrZero, outputs: Array<{ outpoint: OutpointString, satoshis: SatoshiValue, lockingScript?: HexString, tx?: BEEF, spendable:
|
|
66
|
+
async listOutputs(args: { basket: BasketStringUnder300Bytes, tags?: OutputTagStringUnder300Bytes[], tagQueryMode?: 'all' | 'any', include?: 'locking scripts' | 'entire transactions', includeCustomInstructions?: BooleanDefaultFalse, includeTags?: BooleanDefaultFalse, includeLabels?: BooleanDefaultFalse, limit?: PositiveIntegerDefault10Max10000, offset?: PositiveIntegerOrZero }): Promise<{ totalOutputs: PositiveIntegerOrZero, outputs: Array<{ outpoint: OutpointString, satoshis: SatoshiValue, lockingScript?: HexString, tx?: BEEF, spendable: boolean, customInstructions?: string, tags?: OutputTagStringUnder300Bytes[], labels?: LabelStringUnder300Bytes[] }> }> {
|
|
67
67
|
return await this.invoke('listOutputs', args)
|
|
68
68
|
}
|
|
69
69
|
|
|
@@ -131,7 +131,7 @@ export default class XDMSubstrate implements Wallet {
|
|
|
131
131
|
return await this.invoke('discoverByAttributes', args)
|
|
132
132
|
}
|
|
133
133
|
|
|
134
|
-
async isAuthenticated(args: {}): Promise<{ authenticated:
|
|
134
|
+
async isAuthenticated(args: {}): Promise<{ authenticated: true }> {
|
|
135
135
|
return await this.invoke('isAuthenticated', args)
|
|
136
136
|
}
|
|
137
137
|
|
|
@@ -1361,7 +1361,7 @@ describe('WalletWire Integration Tests', () => {
|
|
|
1361
1361
|
serialNumber: Utils.toBase64(new Array(32).fill(2)),
|
|
1362
1362
|
certifier: '02' + 'b'.repeat(64),
|
|
1363
1363
|
revocationOutpoint: 'deadbeef20248806deadbeef20248806deadbeef20248806deadbeef20248806.0',
|
|
1364
|
-
signature: '
|
|
1364
|
+
signature: '3045022100e4d03d959697ed191f9ef7ae7deacd3118b8693d18da0fd76e4ad92664ce05cf02200d753951e766cbf2d2b306e08921c06341d2de67ab75389bf84caf954ee40e88',
|
|
1365
1365
|
fields: {
|
|
1366
1366
|
field1: 'value1',
|
|
1367
1367
|
field2: 'value2'
|
|
@@ -1383,7 +1383,7 @@ describe('WalletWire Integration Tests', () => {
|
|
|
1383
1383
|
},
|
|
1384
1384
|
serialNumber: Utils.toBase64(new Array(32).fill(2)),
|
|
1385
1385
|
revocationOutpoint: 'deadbeef20248806deadbeef20248806deadbeef20248806deadbeef20248806.0',
|
|
1386
|
-
signature: '
|
|
1386
|
+
signature: '3045022100e4d03d959697ed191f9ef7ae7deacd3118b8693d18da0fd76e4ad92664ce05cf02200d753951e766cbf2d2b306e08921c06341d2de67ab75389bf84caf954ee40e88',
|
|
1387
1387
|
keyringRevealer: 'certifier',
|
|
1388
1388
|
keyringForSubject: {}
|
|
1389
1389
|
}
|
|
@@ -1405,7 +1405,7 @@ describe('WalletWire Integration Tests', () => {
|
|
|
1405
1405
|
serialNumber: Utils.toBase64(new Array(32).fill(2)),
|
|
1406
1406
|
certifier: '02' + 'b'.repeat(64),
|
|
1407
1407
|
revocationOutpoint: 'deadbeef20248806deadbeef20248806deadbeef20248806deadbeef20248806.0',
|
|
1408
|
-
signature: '
|
|
1408
|
+
signature: '3045022100e4d03d959697ed191f9ef7ae7deacd3118b8693d18da0fd76e4ad92664ce05cf02200d753951e766cbf2d2b306e08921c06341d2de67ab75389bf84caf954ee40e88',
|
|
1409
1409
|
fields: {
|
|
1410
1410
|
field1: 'value1',
|
|
1411
1411
|
field2: 'value2'
|
|
@@ -1427,7 +1427,7 @@ describe('WalletWire Integration Tests', () => {
|
|
|
1427
1427
|
},
|
|
1428
1428
|
serialNumber: Utils.toBase64(new Array(32).fill(2)),
|
|
1429
1429
|
revocationOutpoint: 'deadbeef20248806deadbeef20248806deadbeef20248806deadbeef20248806.0',
|
|
1430
|
-
signature: '
|
|
1430
|
+
signature: '3045022100e4d03d959697ed191f9ef7ae7deacd3118b8693d18da0fd76e4ad92664ce05cf02200d753951e766cbf2d2b306e08921c06341d2de67ab75389bf84caf954ee40e88',
|
|
1431
1431
|
keyringRevealer: 'certifier' as 'certifier',
|
|
1432
1432
|
keyringForSubject: {
|
|
1433
1433
|
field1: Utils.toBase64([0x01, 0x02, 0x03]),
|
|
@@ -1453,7 +1453,7 @@ describe('WalletWire Integration Tests', () => {
|
|
|
1453
1453
|
serialNumber: Utils.toBase64(new Array(32).fill(2)),
|
|
1454
1454
|
certifier: '02' + 'b'.repeat(64),
|
|
1455
1455
|
revocationOutpoint: 'deadbeef20248806deadbeef20248806deadbeef20248806deadbeef20248806.0',
|
|
1456
|
-
signature: '
|
|
1456
|
+
signature: '3045022100e4d03d959697ed191f9ef7ae7deacd3118b8693d18da0fd76e4ad92664ce05cf02200d753951e766cbf2d2b306e08921c06341d2de67ab75389bf84caf954ee40e88',
|
|
1457
1457
|
fields: {
|
|
1458
1458
|
field1: 'value1',
|
|
1459
1459
|
field2: 'value2'
|
|
@@ -1476,7 +1476,7 @@ describe('WalletWire Integration Tests', () => {
|
|
|
1476
1476
|
},
|
|
1477
1477
|
serialNumber: Utils.toBase64(new Array(32).fill(2)),
|
|
1478
1478
|
revocationOutpoint: 'deadbeef20248806deadbeef20248806deadbeef20248806deadbeef20248806.0',
|
|
1479
|
-
signature: '
|
|
1479
|
+
signature: '3045022100e4d03d959697ed191f9ef7ae7deacd3118b8693d18da0fd76e4ad92664ce05cf02200d753951e766cbf2d2b306e08921c06341d2de67ab75389bf84caf954ee40e88',
|
|
1480
1480
|
keyringRevealer: keyringRevealerPubKey,
|
|
1481
1481
|
keyringForSubject: {
|
|
1482
1482
|
field1: Utils.toBase64([0x01, 0x02, 0x03]),
|
|
@@ -1502,7 +1502,7 @@ describe('WalletWire Integration Tests', () => {
|
|
|
1502
1502
|
serialNumber: Utils.toBase64(new Array(32).fill(2)),
|
|
1503
1503
|
certifier: '02' + 'b'.repeat(64),
|
|
1504
1504
|
revocationOutpoint: 'cafebabedeadbeefcafebabedeadbeefdeadbeefdeadbeefdeadbeefdeadbeef.1',
|
|
1505
|
-
signature: '
|
|
1505
|
+
signature: '3045022100e4d03d959697ed191f9ef7ae7deacd3118b8693d18da0fd76e4ad92664ce05cf02200d753951e766cbf2d2b306e08921c06341d2de67ab75389bf84caf954ee40e88',
|
|
1506
1506
|
fields: {
|
|
1507
1507
|
field3: 'value3',
|
|
1508
1508
|
field4: 'value4'
|
|
@@ -1543,7 +1543,7 @@ describe('WalletWire Integration Tests', () => {
|
|
|
1543
1543
|
serialNumber: Utils.toBase64(new Array(32).fill(2)),
|
|
1544
1544
|
certifier: '02' + 'b'.repeat(64),
|
|
1545
1545
|
revocationOutpoint: 'beadbeadbeadbeadbeadbeadbeadbeadbeadbeadbeadbeadbeadbeadbeadbead.2',
|
|
1546
|
-
signature: '
|
|
1546
|
+
signature: '3045022100e4d03d959697ed191f9ef7ae7deacd3118b8693d18da0fd76e4ad92664ce05cf02200d753951e766cbf2d2b306e08921c06341d2de67ab75389bf84caf954ee40e88',
|
|
1547
1547
|
fields: {
|
|
1548
1548
|
field5: 'value5'
|
|
1549
1549
|
}
|
|
@@ -1563,7 +1563,7 @@ describe('WalletWire Integration Tests', () => {
|
|
|
1563
1563
|
},
|
|
1564
1564
|
serialNumber: Utils.toBase64(new Array(32).fill(2)),
|
|
1565
1565
|
revocationOutpoint: 'beadbeadbeadbeadbeadbeadbeadbeadbeadbeadbeadbeadbeadbeadbeadbead.2',
|
|
1566
|
-
signature: '
|
|
1566
|
+
signature: '3045022100e4d03d959697ed191f9ef7ae7deacd3118b8693d18da0fd76e4ad92664ce05cf02200d753951e766cbf2d2b306e08921c06341d2de67ab75389bf84caf954ee40e88',
|
|
1567
1567
|
keyringRevealer: 'certifier' as 'certifier',
|
|
1568
1568
|
keyringForSubject: {} // Empty keyring
|
|
1569
1569
|
}
|
|
@@ -1592,7 +1592,7 @@ describe('WalletWire Integration Tests', () => {
|
|
|
1592
1592
|
serialNumber: Utils.toBase64(new Array(32).fill(2)),
|
|
1593
1593
|
certifier: '02' + 'b'.repeat(64),
|
|
1594
1594
|
revocationOutpoint: 'deadbeef20248806deadbeef20248806deadbeef20248806deadbeef20248806.0',
|
|
1595
|
-
signature: '
|
|
1595
|
+
signature: '3045022100e4d03d959697ed191f9ef7ae7deacd3118b8693d18da0fd76e4ad92664ce05cf02200d753951e766cbf2d2b306e08921c06341d2de67ab75389bf84caf954ee40e88',
|
|
1596
1596
|
fields: {
|
|
1597
1597
|
field1: 'value1',
|
|
1598
1598
|
field2: 'value2'
|
|
@@ -1629,7 +1629,7 @@ describe('WalletWire Integration Tests', () => {
|
|
|
1629
1629
|
serialNumber: Utils.toBase64(new Array(32).fill(2)),
|
|
1630
1630
|
certifier: '02' + 'b'.repeat(64),
|
|
1631
1631
|
revocationOutpoint: 'deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef.0',
|
|
1632
|
-
signature: '
|
|
1632
|
+
signature: '3045022100e4d03d959697ed191f9ef7ae7deacd3118b8693d18da0fd76e4ad92664ce05cf02200d753951e766cbf2d2b306e08921c06341d2de67ab75389bf84caf954ee40e88',
|
|
1633
1633
|
fields: {
|
|
1634
1634
|
field1: 'value1',
|
|
1635
1635
|
field2: 'value2'
|
|
@@ -1641,7 +1641,7 @@ describe('WalletWire Integration Tests', () => {
|
|
|
1641
1641
|
serialNumber: Utils.toBase64(new Array(32).fill(2)),
|
|
1642
1642
|
certifier: '02' + 'b'.repeat(64),
|
|
1643
1643
|
revocationOutpoint: 'cafebabecafebabecafebabecafebabecafebabecafebabecafebabecafebabe.1',
|
|
1644
|
-
signature: '
|
|
1644
|
+
signature: '3045022100e4d03d959697ed191f9ef7ae7deacd3118b8693d18da0fd76e4ad92664ce05cf02200d753951e766cbf2d2b306e08921c06341d2de67ab75389bf84caf954ee40e88',
|
|
1645
1645
|
fields: {
|
|
1646
1646
|
field3: 'value3',
|
|
1647
1647
|
field4: 'value4',
|
|
@@ -1688,7 +1688,7 @@ describe('WalletWire Integration Tests', () => {
|
|
|
1688
1688
|
serialNumber: Utils.toBase64(new Array(32).fill(2)),
|
|
1689
1689
|
certifier: '02' + 'e'.repeat(64),
|
|
1690
1690
|
revocationOutpoint: 'cafecafecafecafecafecafecafecafecafecafecafecafecafecafecafecafe.2',
|
|
1691
|
-
signature: '
|
|
1691
|
+
signature: '3045022100e4d03d959697ed191f9ef7ae7deacd3118b8693d18da0fd76e4ad92664ce05cf02200d753951e766cbf2d2b306e08921c06341d2de67ab75389bf84caf954ee40e88',
|
|
1692
1692
|
fields: {
|
|
1693
1693
|
field6: 'value6'
|
|
1694
1694
|
}
|
|
@@ -1738,7 +1738,7 @@ describe('WalletWire Integration Tests', () => {
|
|
|
1738
1738
|
serialNumber: Utils.toBase64(new Array(32).fill(2)),
|
|
1739
1739
|
certifier: '02' + 'b'.repeat(64),
|
|
1740
1740
|
revocationOutpoint: 'deadbeef20248806deadbeef20248806deadbeef20248806deadbeef20248806.0',
|
|
1741
|
-
signature: '
|
|
1741
|
+
signature: '3045022100e4d03d959697ed191f9ef7ae7deacd3118b8693d18da0fd76e4ad92664ce05cf02200d753951e766cbf2d2b306e08921c06341d2de67ab75389bf84caf954ee40e88',
|
|
1742
1742
|
fields: {
|
|
1743
1743
|
field1: 'value1',
|
|
1744
1744
|
field2: 'value2'
|
|
@@ -1772,7 +1772,7 @@ describe('WalletWire Integration Tests', () => {
|
|
|
1772
1772
|
serialNumber: Utils.toBase64(new Array(32).fill(2)),
|
|
1773
1773
|
certifier: '02' + 'b'.repeat(64),
|
|
1774
1774
|
revocationOutpoint: 'deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef.0',
|
|
1775
|
-
signature: '
|
|
1775
|
+
signature: '3045022100e4d03d959697ed191f9ef7ae7deacd3118b8693d18da0fd76e4ad92664ce05cf02200d753951e766cbf2d2b306e08921c06341d2de67ab75389bf84caf954ee40e88',
|
|
1776
1776
|
fields: {
|
|
1777
1777
|
field1: 'value1',
|
|
1778
1778
|
field2: 'value2',
|
|
@@ -1806,7 +1806,7 @@ describe('WalletWire Integration Tests', () => {
|
|
|
1806
1806
|
serialNumber: Utils.toBase64(new Array(32).fill(2)),
|
|
1807
1807
|
certifier: '02' + 'b'.repeat(64),
|
|
1808
1808
|
revocationOutpoint: 'cafebabecafebabecafebabecafebabecafebabecafebabecafebabecafebabe.1',
|
|
1809
|
-
signature: '
|
|
1809
|
+
signature: '3045022100e4d03d959697ed191f9ef7ae7deacd3118b8693d18da0fd76e4ad92664ce05cf02200d753951e766cbf2d2b306e08921c06341d2de67ab75389bf84caf954ee40e88',
|
|
1810
1810
|
fields: {
|
|
1811
1811
|
field4: 'value4',
|
|
1812
1812
|
field5: 'value5'
|
|
@@ -1917,7 +1917,7 @@ describe('WalletWire Integration Tests', () => {
|
|
|
1917
1917
|
serialNumber: Utils.toBase64(new Array(32).fill(2)),
|
|
1918
1918
|
certifier: '02' + 'b'.repeat(64),
|
|
1919
1919
|
revocationOutpoint: 'deadbeef20248806deadbeef20248806deadbeef20248806deadbeef20248806.0',
|
|
1920
|
-
signature: '
|
|
1920
|
+
signature: '3045022100e4d03d959697ed191f9ef7ae7deacd3118b8693d18da0fd76e4ad92664ce05cf02200d753951e766cbf2d2b306e08921c06341d2de67ab75389bf84caf954ee40e88',
|
|
1921
1921
|
fields: {},
|
|
1922
1922
|
certifierInfo: {
|
|
1923
1923
|
name: 'Test Certifier',
|
|
@@ -1958,7 +1958,7 @@ describe('WalletWire Integration Tests', () => {
|
|
|
1958
1958
|
serialNumber: Utils.toBase64(new Array(32).fill(2)),
|
|
1959
1959
|
certifier: '02' + 'b'.repeat(64),
|
|
1960
1960
|
revocationOutpoint: 'deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef.0',
|
|
1961
|
-
signature: '
|
|
1961
|
+
signature: '3045022100e4d03d959697ed191f9ef7ae7deacd3118b8693d18da0fd76e4ad92664ce05cf02200d753951e766cbf2d2b306e08921c06341d2de67ab75389bf84caf954ee40e88',
|
|
1962
1962
|
fields: {},
|
|
1963
1963
|
certifierInfo: {
|
|
1964
1964
|
name: 'Test Certifier',
|
|
@@ -2001,7 +2001,7 @@ describe('WalletWire Integration Tests', () => {
|
|
|
2001
2001
|
serialNumber: Utils.toBase64(new Array(32).fill(2)),
|
|
2002
2002
|
certifier: '02' + 'b'.repeat(64),
|
|
2003
2003
|
revocationOutpoint: 'deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef.0',
|
|
2004
|
-
signature: '
|
|
2004
|
+
signature: '3045022100e4d03d959697ed191f9ef7ae7deacd3118b8693d18da0fd76e4ad92664ce05cf02200d753951e766cbf2d2b306e08921c06341d2de67ab75389bf84caf954ee40e88',
|
|
2005
2005
|
fields: {},
|
|
2006
2006
|
certifierInfo: {
|
|
2007
2007
|
name: 'Certifier One',
|
|
@@ -2022,7 +2022,7 @@ describe('WalletWire Integration Tests', () => {
|
|
|
2022
2022
|
serialNumber: Utils.toBase64(new Array(32).fill(2)),
|
|
2023
2023
|
certifier: '02' + 'c'.repeat(64),
|
|
2024
2024
|
revocationOutpoint: 'cafebabecafebabecafebabecafebabecafebabecafebabecafebabecafebabe.1',
|
|
2025
|
-
signature: '
|
|
2025
|
+
signature: '3045022100e4d03d959697ed191f9ef7ae7deacd3118b8693d18da0fd76e4ad92664ce05cf02200d753951e766cbf2d2b306e08921c06341d2de67ab75389bf84caf954ee40e88',
|
|
2026
2026
|
fields: {},
|
|
2027
2027
|
certifierInfo: {
|
|
2028
2028
|
name: 'Certifier Two',
|
|
@@ -2070,7 +2070,7 @@ describe('WalletWire Integration Tests', () => {
|
|
|
2070
2070
|
serialNumber: Utils.toBase64(new Array(32).fill(2)),
|
|
2071
2071
|
certifier: '02' + 'b'.repeat(64),
|
|
2072
2072
|
revocationOutpoint: 'deadbeef20248806deadbeef20248806deadbeef20248806deadbeef20248806.0',
|
|
2073
|
-
signature: '
|
|
2073
|
+
signature: '3045022100e4d03d959697ed191f9ef7ae7deacd3118b8693d18da0fd76e4ad92664ce05cf02200d753951e766cbf2d2b306e08921c06341d2de67ab75389bf84caf954ee40e88',
|
|
2074
2074
|
fields: {},
|
|
2075
2075
|
certifierInfo: {
|
|
2076
2076
|
name: 'Test Certifier',
|
|
@@ -2128,7 +2128,7 @@ describe('WalletWire Integration Tests', () => {
|
|
|
2128
2128
|
serialNumber: Utils.toBase64(new Array(32).fill(2)),
|
|
2129
2129
|
certifier: '02' + 'e'.repeat(64),
|
|
2130
2130
|
revocationOutpoint: 'beadbeadbeadbeadbeadbeadbeadbeadbeadbeadbeadbeadbeadbeadbeadbead.2',
|
|
2131
|
-
signature: '
|
|
2131
|
+
signature: '3045022100e4d03d959697ed191f9ef7ae7deacd3118b8693d18da0fd76e4ad92664ce05cf02200d753951e766cbf2d2b306e08921c06341d2de67ab75389bf84caf954ee40e88',
|
|
2132
2132
|
fields: {},
|
|
2133
2133
|
certifierInfo: {
|
|
2134
2134
|
name: 'Certifier Three',
|
|
@@ -39,7 +39,7 @@ export default class WindowCWISubstrate implements Wallet {
|
|
|
39
39
|
return this.CWI.internalizeAction(args, originator)
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
async listOutputs(args: { basket: BasketStringUnder300Bytes, tags?: OutputTagStringUnder300Bytes[], tagQueryMode?: 'all' | 'any', include?: 'locking scripts' | 'entire transactions', includeCustomInstructions?: BooleanDefaultFalse, includeTags?: BooleanDefaultFalse, includeLabels?: BooleanDefaultFalse, limit?: PositiveIntegerDefault10Max10000, offset?: PositiveIntegerOrZero }, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{ totalOutputs: PositiveIntegerOrZero, outputs: Array<{ outpoint: OutpointString, satoshis: SatoshiValue, lockingScript?: HexString, tx?: BEEF, spendable:
|
|
42
|
+
async listOutputs(args: { basket: BasketStringUnder300Bytes, tags?: OutputTagStringUnder300Bytes[], tagQueryMode?: 'all' | 'any', include?: 'locking scripts' | 'entire transactions', includeCustomInstructions?: BooleanDefaultFalse, includeTags?: BooleanDefaultFalse, includeLabels?: BooleanDefaultFalse, limit?: PositiveIntegerDefault10Max10000, offset?: PositiveIntegerOrZero }, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{ totalOutputs: PositiveIntegerOrZero, outputs: Array<{ outpoint: OutpointString, satoshis: SatoshiValue, lockingScript?: HexString, tx?: BEEF, spendable: boolean, customInstructions?: string, tags?: OutputTagStringUnder300Bytes[], labels?: LabelStringUnder300Bytes[] }> }> {
|
|
43
43
|
return this.CWI.listOutputs(args, originator)
|
|
44
44
|
}
|
|
45
45
|
|
|
@@ -107,7 +107,7 @@ export default class WindowCWISubstrate implements Wallet {
|
|
|
107
107
|
return this.CWI.discoverByAttributes(args, originator)
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
-
async isAuthenticated(args: {}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{ authenticated:
|
|
110
|
+
async isAuthenticated(args: {}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{ authenticated: true }> {
|
|
111
111
|
return this.CWI.isAuthenticated(args, originator)
|
|
112
112
|
}
|
|
113
113
|
|