@bsv/wallet-toolbox 2.1.7 → 2.1.9
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/CHANGELOG.md +13 -0
- package/docs/client.md +146 -224
- package/docs/services.md +64 -28
- package/docs/storage.md +2 -22
- package/docs/wallet.md +146 -224
- package/out/src/WalletPermissionsManager.d.ts.map +1 -1
- package/out/src/WalletPermissionsManager.js +12 -16
- package/out/src/WalletPermissionsManager.js.map +1 -1
- package/out/src/monitor/tasks/TaskSendWaiting.d.ts.map +1 -1
- package/out/src/monitor/tasks/TaskSendWaiting.js +8 -5
- package/out/src/monitor/tasks/TaskSendWaiting.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/__tests/createIdbChaintracks.test.js +4 -9
- package/out/src/services/chaintracker/chaintracks/__tests/createIdbChaintracks.test.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/configureChaintracksIngestors.d.ts +22 -0
- package/out/src/services/chaintracker/chaintracks/configureChaintracksIngestors.d.ts.map +1 -0
- package/out/src/services/chaintracker/chaintracks/configureChaintracksIngestors.js +54 -0
- package/out/src/services/chaintracker/chaintracks/configureChaintracksIngestors.js.map +1 -0
- package/out/src/services/chaintracker/chaintracks/createDefaultIdbChaintracksOptions.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/createDefaultIdbChaintracksOptions.js +3 -42
- package/out/src/services/chaintracker/chaintracks/createDefaultIdbChaintracksOptions.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/createDefaultKnexChaintracksOptions.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/createDefaultKnexChaintracksOptions.js +2 -41
- package/out/src/services/chaintracker/chaintracks/createDefaultKnexChaintracksOptions.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/createDefaultNoDbChaintracksOptions.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/createDefaultNoDbChaintracksOptions.js +3 -42
- package/out/src/services/chaintracker/chaintracks/createDefaultNoDbChaintracksOptions.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/util/BulkFileDataManager.d.ts +2 -20
- package/out/src/services/chaintracker/chaintracks/util/BulkFileDataManager.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/util/BulkFileDataManager.js +5 -55
- package/out/src/services/chaintracker/chaintracks/util/BulkFileDataManager.js.map +1 -1
- package/out/src/storage/WalletStorageManager.d.ts +1 -15
- package/out/src/storage/WalletStorageManager.d.ts.map +1 -1
- package/out/src/storage/WalletStorageManager.js +0 -54
- package/out/src/storage/WalletStorageManager.js.map +1 -1
- package/out/src/storage/methods/__test/offsetKey.test.js +133 -286
- package/out/src/storage/methods/__test/offsetKey.test.js.map +1 -1
- package/out/src/wab-client/auth-method-interactors/AuthMethodInteractor.d.ts +10 -3
- package/out/src/wab-client/auth-method-interactors/AuthMethodInteractor.d.ts.map +1 -1
- package/out/src/wab-client/auth-method-interactors/AuthMethodInteractor.js +34 -1
- package/out/src/wab-client/auth-method-interactors/AuthMethodInteractor.js.map +1 -1
- package/out/src/wab-client/auth-method-interactors/DevConsoleInteractor.d.ts +1 -19
- package/out/src/wab-client/auth-method-interactors/DevConsoleInteractor.d.ts.map +1 -1
- package/out/src/wab-client/auth-method-interactors/DevConsoleInteractor.js +0 -52
- package/out/src/wab-client/auth-method-interactors/DevConsoleInteractor.js.map +1 -1
- package/out/src/wab-client/auth-method-interactors/PersonaIDInteractor.d.ts +1 -3
- package/out/src/wab-client/auth-method-interactors/PersonaIDInteractor.d.ts.map +1 -1
- package/out/src/wab-client/auth-method-interactors/PersonaIDInteractor.js +0 -24
- package/out/src/wab-client/auth-method-interactors/PersonaIDInteractor.js.map +1 -1
- package/out/src/wab-client/auth-method-interactors/TwilioPhoneInteractor.d.ts +1 -19
- package/out/src/wab-client/auth-method-interactors/TwilioPhoneInteractor.d.ts.map +1 -1
- package/out/src/wab-client/auth-method-interactors/TwilioPhoneInteractor.js +0 -52
- package/out/src/wab-client/auth-method-interactors/TwilioPhoneInteractor.js.map +1 -1
- package/package.json +1 -1
|
@@ -13,58 +13,6 @@ class DevConsoleInteractor extends AuthMethodInteractor_1.AuthMethodInteractor {
|
|
|
13
13
|
super(...arguments);
|
|
14
14
|
this.methodType = 'DevConsole';
|
|
15
15
|
}
|
|
16
|
-
/**
|
|
17
|
-
* Start the DevConsole authentication on the server.
|
|
18
|
-
* - The server will generate an OTP code and log it to the console for development use.
|
|
19
|
-
* @param serverUrl - The base URL of the WAB server (e.g. http://localhost:3000)
|
|
20
|
-
* @param presentationKey - The 256-bit key the client is attempting to authenticate with
|
|
21
|
-
* @param payload - { phoneNumber: string } (identifier for the authentication)
|
|
22
|
-
* @returns - { success, message, data }
|
|
23
|
-
*/
|
|
24
|
-
async startAuth(serverUrl, presentationKey, payload) {
|
|
25
|
-
const res = await fetch(`${serverUrl}/auth/start`, {
|
|
26
|
-
method: 'POST',
|
|
27
|
-
headers: { 'Content-Type': 'application/json' },
|
|
28
|
-
body: JSON.stringify({
|
|
29
|
-
methodType: this.methodType,
|
|
30
|
-
presentationKey,
|
|
31
|
-
payload
|
|
32
|
-
})
|
|
33
|
-
});
|
|
34
|
-
if (!res.ok) {
|
|
35
|
-
return {
|
|
36
|
-
success: false,
|
|
37
|
-
message: `HTTP error ${res.status}`
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
return res.json();
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Complete the DevConsole authentication on the server.
|
|
44
|
-
* - The server will verify the OTP code that was generated and logged to the console.
|
|
45
|
-
* @param serverUrl - The base URL of the WAB server
|
|
46
|
-
* @param presentationKey - The 256-bit key
|
|
47
|
-
* @param payload - { phoneNumber: string, otp: string } (the identifier and OTP code from console)
|
|
48
|
-
* @returns - { success, message, presentationKey }
|
|
49
|
-
*/
|
|
50
|
-
async completeAuth(serverUrl, presentationKey, payload) {
|
|
51
|
-
const res = await fetch(`${serverUrl}/auth/complete`, {
|
|
52
|
-
method: 'POST',
|
|
53
|
-
headers: { 'Content-Type': 'application/json' },
|
|
54
|
-
body: JSON.stringify({
|
|
55
|
-
methodType: this.methodType,
|
|
56
|
-
presentationKey,
|
|
57
|
-
payload
|
|
58
|
-
})
|
|
59
|
-
});
|
|
60
|
-
if (!res.ok) {
|
|
61
|
-
return {
|
|
62
|
-
success: false,
|
|
63
|
-
message: `HTTP error ${res.status}`
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
return res.json();
|
|
67
|
-
}
|
|
68
16
|
}
|
|
69
17
|
exports.DevConsoleInteractor = DevConsoleInteractor;
|
|
70
18
|
//# sourceMappingURL=DevConsoleInteractor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DevConsoleInteractor.js","sourceRoot":"","sources":["../../../../src/wab-client/auth-method-interactors/DevConsoleInteractor.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"DevConsoleInteractor.js","sourceRoot":"","sources":["../../../../src/wab-client/auth-method-interactors/DevConsoleInteractor.ts"],"names":[],"mappings":";;;AAAA,iEAA6D;AAE7D;;;;;GAKG;AACH,MAAa,oBAAqB,SAAQ,2CAAoB;IAA9D;;QACS,eAAU,GAAG,YAAY,CAAA;IAClC,CAAC;CAAA;AAFD,oDAEC"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { AuthMethodInteractor
|
|
1
|
+
import { AuthMethodInteractor } from './AuthMethodInteractor';
|
|
2
2
|
export declare class PersonaIDInteractor extends AuthMethodInteractor {
|
|
3
3
|
methodType: string;
|
|
4
|
-
startAuth(serverUrl: string, presentationKey: string, payload: AuthPayload): Promise<StartAuthResponse>;
|
|
5
|
-
completeAuth(serverUrl: string, presentationKey: string, payload: AuthPayload): Promise<CompleteAuthResponse>;
|
|
6
4
|
}
|
|
7
5
|
//# sourceMappingURL=PersonaIDInteractor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PersonaIDInteractor.d.ts","sourceRoot":"","sources":["../../../../src/wab-client/auth-method-interactors/PersonaIDInteractor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,
|
|
1
|
+
{"version":3,"file":"PersonaIDInteractor.d.ts","sourceRoot":"","sources":["../../../../src/wab-client/auth-method-interactors/PersonaIDInteractor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAE7D,qBAAa,mBAAoB,SAAQ,oBAAoB;IACpD,UAAU,SAAc;CAChC"}
|
|
@@ -7,30 +7,6 @@ class PersonaIDInteractor extends AuthMethodInteractor_1.AuthMethodInteractor {
|
|
|
7
7
|
super(...arguments);
|
|
8
8
|
this.methodType = 'PersonaID';
|
|
9
9
|
}
|
|
10
|
-
async startAuth(serverUrl, presentationKey, payload) {
|
|
11
|
-
const res = await fetch(`${serverUrl}/auth/start`, {
|
|
12
|
-
method: 'POST',
|
|
13
|
-
headers: { 'Content-Type': 'application/json' },
|
|
14
|
-
body: JSON.stringify({
|
|
15
|
-
methodType: this.methodType,
|
|
16
|
-
presentationKey,
|
|
17
|
-
payload
|
|
18
|
-
})
|
|
19
|
-
});
|
|
20
|
-
return res.json();
|
|
21
|
-
}
|
|
22
|
-
async completeAuth(serverUrl, presentationKey, payload) {
|
|
23
|
-
const res = await fetch(`${serverUrl}/auth/complete`, {
|
|
24
|
-
method: 'POST',
|
|
25
|
-
headers: { 'Content-Type': 'application/json' },
|
|
26
|
-
body: JSON.stringify({
|
|
27
|
-
methodType: this.methodType,
|
|
28
|
-
presentationKey,
|
|
29
|
-
payload
|
|
30
|
-
})
|
|
31
|
-
});
|
|
32
|
-
return res.json();
|
|
33
|
-
}
|
|
34
10
|
}
|
|
35
11
|
exports.PersonaIDInteractor = PersonaIDInteractor;
|
|
36
12
|
//# sourceMappingURL=PersonaIDInteractor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PersonaIDInteractor.js","sourceRoot":"","sources":["../../../../src/wab-client/auth-method-interactors/PersonaIDInteractor.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"PersonaIDInteractor.js","sourceRoot":"","sources":["../../../../src/wab-client/auth-method-interactors/PersonaIDInteractor.ts"],"names":[],"mappings":";;;AAAA,iEAA6D;AAE7D,MAAa,mBAAoB,SAAQ,2CAAoB;IAA7D;;QACS,eAAU,GAAG,WAAW,CAAA;IACjC,CAAC;CAAA;AAFD,kDAEC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AuthMethodInteractor
|
|
1
|
+
import { AuthMethodInteractor } from './AuthMethodInteractor';
|
|
2
2
|
/**
|
|
3
3
|
* TwilioPhoneInteractor
|
|
4
4
|
*
|
|
@@ -6,23 +6,5 @@ import { AuthMethodInteractor, AuthPayload, StartAuthResponse, CompleteAuthRespo
|
|
|
6
6
|
*/
|
|
7
7
|
export declare class TwilioPhoneInteractor extends AuthMethodInteractor {
|
|
8
8
|
methodType: string;
|
|
9
|
-
/**
|
|
10
|
-
* Start the Twilio phone verification on the server.
|
|
11
|
-
* - The server will send an SMS code to the user’s phone, using Twilio Verify.
|
|
12
|
-
* @param serverUrl - The base URL of the WAB server (e.g. http://localhost:3000)
|
|
13
|
-
* @param presentationKey - The 256-bit key the client is attempting to authenticate with
|
|
14
|
-
* @param payload - { phoneNumber: string } (the phone number to verify)
|
|
15
|
-
* @returns - { success, message, data }
|
|
16
|
-
*/
|
|
17
|
-
startAuth(serverUrl: string, presentationKey: string, payload: AuthPayload): Promise<StartAuthResponse>;
|
|
18
|
-
/**
|
|
19
|
-
* Complete the Twilio phone verification on the server.
|
|
20
|
-
* - The server will verify the code with Twilio Verify’s verificationChecks endpoint.
|
|
21
|
-
* @param serverUrl - The base URL of the WAB server
|
|
22
|
-
* @param presentationKey - The 256-bit key
|
|
23
|
-
* @param payload - { phoneNumber: string, otp: string } (the code that was received via SMS)
|
|
24
|
-
* @returns - { success, message, presentationKey }
|
|
25
|
-
*/
|
|
26
|
-
completeAuth(serverUrl: string, presentationKey: string, payload: AuthPayload): Promise<CompleteAuthResponse>;
|
|
27
9
|
}
|
|
28
10
|
//# sourceMappingURL=TwilioPhoneInteractor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TwilioPhoneInteractor.d.ts","sourceRoot":"","sources":["../../../../src/wab-client/auth-method-interactors/TwilioPhoneInteractor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,
|
|
1
|
+
{"version":3,"file":"TwilioPhoneInteractor.d.ts","sourceRoot":"","sources":["../../../../src/wab-client/auth-method-interactors/TwilioPhoneInteractor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAE7D;;;;GAIG;AACH,qBAAa,qBAAsB,SAAQ,oBAAoB;IACtD,UAAU,SAAgB;CAClC"}
|
|
@@ -12,58 +12,6 @@ class TwilioPhoneInteractor extends AuthMethodInteractor_1.AuthMethodInteractor
|
|
|
12
12
|
super(...arguments);
|
|
13
13
|
this.methodType = 'TwilioPhone';
|
|
14
14
|
}
|
|
15
|
-
/**
|
|
16
|
-
* Start the Twilio phone verification on the server.
|
|
17
|
-
* - The server will send an SMS code to the user’s phone, using Twilio Verify.
|
|
18
|
-
* @param serverUrl - The base URL of the WAB server (e.g. http://localhost:3000)
|
|
19
|
-
* @param presentationKey - The 256-bit key the client is attempting to authenticate with
|
|
20
|
-
* @param payload - { phoneNumber: string } (the phone number to verify)
|
|
21
|
-
* @returns - { success, message, data }
|
|
22
|
-
*/
|
|
23
|
-
async startAuth(serverUrl, presentationKey, payload) {
|
|
24
|
-
const res = await fetch(`${serverUrl}/auth/start`, {
|
|
25
|
-
method: 'POST',
|
|
26
|
-
headers: { 'Content-Type': 'application/json' },
|
|
27
|
-
body: JSON.stringify({
|
|
28
|
-
methodType: this.methodType,
|
|
29
|
-
presentationKey,
|
|
30
|
-
payload
|
|
31
|
-
})
|
|
32
|
-
});
|
|
33
|
-
if (!res.ok) {
|
|
34
|
-
return {
|
|
35
|
-
success: false,
|
|
36
|
-
message: `HTTP error ${res.status}`
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
return res.json();
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Complete the Twilio phone verification on the server.
|
|
43
|
-
* - The server will verify the code with Twilio Verify’s verificationChecks endpoint.
|
|
44
|
-
* @param serverUrl - The base URL of the WAB server
|
|
45
|
-
* @param presentationKey - The 256-bit key
|
|
46
|
-
* @param payload - { phoneNumber: string, otp: string } (the code that was received via SMS)
|
|
47
|
-
* @returns - { success, message, presentationKey }
|
|
48
|
-
*/
|
|
49
|
-
async completeAuth(serverUrl, presentationKey, payload) {
|
|
50
|
-
const res = await fetch(`${serverUrl}/auth/complete`, {
|
|
51
|
-
method: 'POST',
|
|
52
|
-
headers: { 'Content-Type': 'application/json' },
|
|
53
|
-
body: JSON.stringify({
|
|
54
|
-
methodType: this.methodType,
|
|
55
|
-
presentationKey,
|
|
56
|
-
payload
|
|
57
|
-
})
|
|
58
|
-
});
|
|
59
|
-
if (!res.ok) {
|
|
60
|
-
return {
|
|
61
|
-
success: false,
|
|
62
|
-
message: `HTTP error ${res.status}`
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
return res.json();
|
|
66
|
-
}
|
|
67
15
|
}
|
|
68
16
|
exports.TwilioPhoneInteractor = TwilioPhoneInteractor;
|
|
69
17
|
//# sourceMappingURL=TwilioPhoneInteractor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TwilioPhoneInteractor.js","sourceRoot":"","sources":["../../../../src/wab-client/auth-method-interactors/TwilioPhoneInteractor.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"TwilioPhoneInteractor.js","sourceRoot":"","sources":["../../../../src/wab-client/auth-method-interactors/TwilioPhoneInteractor.ts"],"names":[],"mappings":";;;AAAA,iEAA6D;AAE7D;;;;GAIG;AACH,MAAa,qBAAsB,SAAQ,2CAAoB;IAA/D;;QACS,eAAU,GAAG,aAAa,CAAA;IACnC,CAAC;CAAA;AAFD,sDAEC"}
|