@oneaddress/partner-sdk 1.3.0 → 1.6.1
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 +221 -6
- package/README.md +301 -69
- package/dist/{chunk-O2RSPJVP.mjs → chunk-3VG6MTRH.mjs} +342 -14
- package/dist/{chunk-2QGC7BHC.mjs → chunk-TAZD6PFZ.mjs} +307 -40
- package/dist/edge.d.mts +1 -1
- package/dist/edge.d.ts +1 -1
- package/dist/edge.js +582 -72
- package/dist/edge.mjs +12 -2
- package/dist/index.d.mts +490 -33
- package/dist/index.d.ts +490 -33
- package/dist/index.js +696 -72
- package/dist/index.mjs +20 -2
- package/dist/{src-DYGFEKX6.mjs → src-ESYTJ2EY.mjs} +31 -1
- package/package.json +28 -13
package/dist/index.mjs
CHANGED
|
@@ -3,12 +3,21 @@ import {
|
|
|
3
3
|
SUPPORTED_VERSIONS,
|
|
4
4
|
canonicalD5LoaForm,
|
|
5
5
|
compareAddresses,
|
|
6
|
+
confirmUpdate,
|
|
6
7
|
createOneAddressHandler,
|
|
8
|
+
createSqlIdempotencyStore,
|
|
7
9
|
d5LoaRef,
|
|
8
10
|
decryptAddress,
|
|
9
11
|
decryptLoaEncrypted,
|
|
10
12
|
decryptSession,
|
|
11
13
|
fetchLoaPublicKey,
|
|
14
|
+
findMatchingStoredName,
|
|
15
|
+
formatAddressParts,
|
|
16
|
+
isEmailLike,
|
|
17
|
+
namePoolMatches,
|
|
18
|
+
readAddressParts,
|
|
19
|
+
sendVerifyResult,
|
|
20
|
+
toExpressHandler,
|
|
12
21
|
transformAddress,
|
|
13
22
|
transformSession,
|
|
14
23
|
validateAddress,
|
|
@@ -16,13 +25,13 @@ import {
|
|
|
16
25
|
verifyLOA,
|
|
17
26
|
verifySignature,
|
|
18
27
|
verifyWithGrace
|
|
19
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-3VG6MTRH.mjs";
|
|
20
29
|
import {
|
|
21
30
|
DEFAULT_REPLAY_WINDOW_SECS,
|
|
22
31
|
computeBlindIndex,
|
|
23
32
|
isFreshTimestamp,
|
|
24
33
|
normalizeForBlindIndex
|
|
25
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-TAZD6PFZ.mjs";
|
|
26
35
|
export {
|
|
27
36
|
CURRENT_VERSION,
|
|
28
37
|
DEFAULT_REPLAY_WINDOW_SECS,
|
|
@@ -30,15 +39,24 @@ export {
|
|
|
30
39
|
canonicalD5LoaForm,
|
|
31
40
|
compareAddresses,
|
|
32
41
|
computeBlindIndex,
|
|
42
|
+
confirmUpdate,
|
|
33
43
|
createOneAddressHandler,
|
|
44
|
+
createSqlIdempotencyStore,
|
|
34
45
|
d5LoaRef,
|
|
35
46
|
decryptAddress as decrypt,
|
|
36
47
|
decryptAddress,
|
|
37
48
|
decryptLoaEncrypted,
|
|
38
49
|
decryptSession,
|
|
39
50
|
fetchLoaPublicKey,
|
|
51
|
+
findMatchingStoredName,
|
|
52
|
+
formatAddressParts,
|
|
53
|
+
isEmailLike,
|
|
40
54
|
isFreshTimestamp,
|
|
55
|
+
namePoolMatches,
|
|
41
56
|
normalizeForBlindIndex,
|
|
57
|
+
readAddressParts,
|
|
58
|
+
sendVerifyResult,
|
|
59
|
+
toExpressHandler,
|
|
42
60
|
transformAddress as transform,
|
|
43
61
|
transformAddress,
|
|
44
62
|
transformSession,
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DEFAULT_REPLAY_WINDOW_SECS,
|
|
3
|
+
PARTNER_KEY_ATTESTATION_ALG,
|
|
4
|
+
PARTNER_KEY_ATTESTATION_V1,
|
|
5
|
+
REGISTRY_HEAD_ALG,
|
|
6
|
+
REGISTRY_HEAD_V1,
|
|
7
|
+
buildPartnerKeyAttestation,
|
|
8
|
+
buildRegistryHeadStatement,
|
|
9
|
+
cleanNameAliases,
|
|
3
10
|
computeBlindIndex,
|
|
4
11
|
computeCustomerBlindIndex,
|
|
5
12
|
decryptAddress,
|
|
@@ -12,15 +19,30 @@ import {
|
|
|
12
19
|
encryptSessionForPartner,
|
|
13
20
|
generateHybridPartnerKeyPair,
|
|
14
21
|
generatePartnerKeyPair,
|
|
22
|
+
headNamesKey,
|
|
23
|
+
isEmailLike,
|
|
15
24
|
isFreshTimestamp,
|
|
25
|
+
isIpLiteralHost,
|
|
16
26
|
isSafeWebhookUrl,
|
|
17
27
|
normaliseAddress,
|
|
18
28
|
normalizeForBlindIndex,
|
|
29
|
+
rootKeyIdFromSpki,
|
|
30
|
+
rootKeyIdFromSpkiB64,
|
|
19
31
|
signWebhookPayload,
|
|
32
|
+
verifyPartnerKeyAttestation,
|
|
33
|
+
verifyPartnerKeyAttestationWithRoots,
|
|
34
|
+
verifyRegistryHead,
|
|
20
35
|
verifyWebhookSignature
|
|
21
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-TAZD6PFZ.mjs";
|
|
22
37
|
export {
|
|
23
38
|
DEFAULT_REPLAY_WINDOW_SECS,
|
|
39
|
+
PARTNER_KEY_ATTESTATION_ALG,
|
|
40
|
+
PARTNER_KEY_ATTESTATION_V1,
|
|
41
|
+
REGISTRY_HEAD_ALG,
|
|
42
|
+
REGISTRY_HEAD_V1,
|
|
43
|
+
buildPartnerKeyAttestation,
|
|
44
|
+
buildRegistryHeadStatement,
|
|
45
|
+
cleanNameAliases,
|
|
24
46
|
computeBlindIndex,
|
|
25
47
|
computeCustomerBlindIndex,
|
|
26
48
|
decryptAddress,
|
|
@@ -33,10 +55,18 @@ export {
|
|
|
33
55
|
encryptSessionForPartner,
|
|
34
56
|
generateHybridPartnerKeyPair,
|
|
35
57
|
generatePartnerKeyPair,
|
|
58
|
+
headNamesKey,
|
|
59
|
+
isEmailLike,
|
|
36
60
|
isFreshTimestamp,
|
|
61
|
+
isIpLiteralHost,
|
|
37
62
|
isSafeWebhookUrl,
|
|
38
63
|
normaliseAddress,
|
|
39
64
|
normalizeForBlindIndex,
|
|
65
|
+
rootKeyIdFromSpki,
|
|
66
|
+
rootKeyIdFromSpkiB64,
|
|
40
67
|
signWebhookPayload,
|
|
68
|
+
verifyPartnerKeyAttestation,
|
|
69
|
+
verifyPartnerKeyAttestationWithRoots,
|
|
70
|
+
verifyRegistryHead,
|
|
41
71
|
verifyWebhookSignature
|
|
42
72
|
};
|
package/package.json
CHANGED
|
@@ -1,38 +1,53 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oneaddress/partner-sdk",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.1",
|
|
4
4
|
"description": "Official OneAddress partner integration SDK — webhook verification, address decryption (legacy + D5 session-envelope), LOA validation",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"exports": {
|
|
8
8
|
".": {
|
|
9
|
+
"types": "./dist/index.d.mts",
|
|
9
10
|
"import": "./dist/index.mjs",
|
|
10
|
-
"require": "./dist/index.js"
|
|
11
|
-
"types": "./dist/index.d.mts"
|
|
11
|
+
"require": "./dist/index.js"
|
|
12
12
|
},
|
|
13
13
|
"./edge": {
|
|
14
|
-
"
|
|
15
|
-
"
|
|
14
|
+
"types": "./dist/edge.d.mts",
|
|
15
|
+
"import": "./dist/edge.mjs"
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
|
-
"files": [
|
|
18
|
+
"files": [
|
|
19
|
+
"dist",
|
|
20
|
+
"README.md",
|
|
21
|
+
"CHANGELOG.md"
|
|
22
|
+
],
|
|
19
23
|
"publishConfig": {
|
|
20
24
|
"access": "public"
|
|
21
25
|
},
|
|
22
26
|
"scripts": {
|
|
23
|
-
"build": "tsup src/index.ts src/edge.ts --format esm,cjs --dts --clean",
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
+
"build": "tsup src/index.ts src/edge.ts --format esm,cjs --dts --dts-resolve --tsconfig tsconfig.build.json --clean",
|
|
28
|
+
"type-check": "tsc --noEmit",
|
|
29
|
+
"prepare": "tsup src/index.ts src/edge.ts --format esm,cjs --dts --dts-resolve --tsconfig tsconfig.build.json --clean",
|
|
30
|
+
"dev": "tsup src/index.ts src/edge.ts --format esm,cjs --dts --dts-resolve --tsconfig tsconfig.build.json --watch",
|
|
31
|
+
"test": "vitest run",
|
|
32
|
+
"test:dist": "vitest run src/dist-exports.test.ts"
|
|
27
33
|
},
|
|
28
|
-
"keywords": [
|
|
34
|
+
"keywords": [
|
|
35
|
+
"oneaddress",
|
|
36
|
+
"address",
|
|
37
|
+
"partner",
|
|
38
|
+
"webhook",
|
|
39
|
+
"sdk"
|
|
40
|
+
],
|
|
29
41
|
"license": "UNLICENSED",
|
|
30
|
-
"engines": {
|
|
42
|
+
"engines": {
|
|
43
|
+
"node": ">=18"
|
|
44
|
+
},
|
|
31
45
|
"devDependencies": {
|
|
32
46
|
"@oneaddress/crypto": "*",
|
|
47
|
+
"@oneaddress/name-match": "*",
|
|
33
48
|
"@oneaddress/protocol": "^0.1.0",
|
|
34
49
|
"tsup": "^8.0.0",
|
|
35
50
|
"typescript": "^5.0.0",
|
|
36
|
-
"vitest": "^1.
|
|
51
|
+
"vitest": "^4.1.10"
|
|
37
52
|
}
|
|
38
53
|
}
|