@1sat/actions 0.0.45 → 0.0.47
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/constants.d.ts +1 -1
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +1 -1
- package/dist/constants.js.map +1 -1
- package/dist/identity/index.d.ts +81 -0
- package/dist/identity/index.d.ts.map +1 -0
- package/dist/identity/index.js +433 -0
- package/dist/identity/index.js.map +1 -0
- package/dist/index.d.ts +5 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -2
- package/dist/index.js.map +1 -1
- package/dist/inscriptions/index.d.ts.map +1 -1
- package/dist/inscriptions/index.js +29 -4
- package/dist/inscriptions/index.js.map +1 -1
- package/dist/locks/index.d.ts.map +1 -1
- package/dist/locks/index.js +2 -2
- package/dist/locks/index.js.map +1 -1
- package/dist/opns/index.d.ts.map +1 -1
- package/dist/opns/index.js +4 -23
- package/dist/opns/index.js.map +1 -1
- package/dist/ordinals/index.d.ts.map +1 -1
- package/dist/ordinals/index.js +54 -15
- package/dist/ordinals/index.js.map +1 -1
- package/dist/paymail.d.ts.map +1 -1
- package/dist/paymail.js +1 -1
- package/dist/paymail.js.map +1 -1
- package/dist/payments/index.d.ts.map +1 -1
- package/dist/payments/index.js +3 -1
- package/dist/payments/index.js.map +1 -1
- package/dist/signing/aip.d.ts +13 -0
- package/dist/signing/aip.d.ts.map +1 -0
- package/dist/signing/aip.js +51 -0
- package/dist/signing/aip.js.map +1 -0
- package/dist/signing/index.d.ts +1 -0
- package/dist/signing/index.d.ts.map +1 -1
- package/dist/signing/index.js +2 -1
- package/dist/signing/index.js.map +1 -1
- package/dist/signing/sigma.d.ts.map +1 -1
- package/dist/signing/sigma.js +22 -10
- package/dist/signing/sigma.js.map +1 -1
- package/dist/social/index.d.ts +28 -0
- package/dist/social/index.d.ts.map +1 -0
- package/dist/social/index.js +119 -0
- package/dist/social/index.js.map +1 -0
- package/dist/sweep/index.d.ts.map +1 -1
- package/dist/sweep/index.js +31 -15
- package/dist/sweep/index.js.map +1 -1
- package/dist/sync/index.d.ts +5 -2
- package/dist/sync/index.d.ts.map +1 -1
- package/dist/sync/index.js +28 -229
- package/dist/sync/index.js.map +1 -1
- package/dist/sync/syncMessages.d.ts +20 -0
- package/dist/sync/syncMessages.d.ts.map +1 -0
- package/dist/sync/syncMessages.js +94 -0
- package/dist/sync/syncMessages.js.map +1 -0
- package/dist/tokens/index.d.ts.map +1 -1
- package/dist/tokens/index.js +36 -6
- package/dist/tokens/index.js.map +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/utils/completeSignedAction.d.ts +1 -1
- package/dist/utils/completeSignedAction.d.ts.map +1 -1
- package/dist/utils/completeSignedAction.js.map +1 -1
- package/dist/utils/createTrackedAction.d.ts.map +1 -1
- package/dist/utils/createTrackedAction.js +1 -1
- package/dist/utils/createTrackedAction.js.map +1 -1
- package/dist/utils/internalizeBeef.d.ts +45 -0
- package/dist/utils/internalizeBeef.d.ts.map +1 -0
- package/dist/utils/internalizeBeef.js +252 -0
- package/dist/utils/internalizeBeef.js.map +1 -0
- package/dist/utils/resolveBeef.d.ts.map +1 -1
- package/dist/utils/resolveBeef.js.map +1 -1
- package/package.json +2 -2
package/dist/constants.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { BAP_KEY_ID, BAP_PROTOCOL_ID, BSV21_BASKET, BSV21_FEE_SATS, BSV21_PROTOCOL, EXCHANGE_RATE_CACHE_TTL, FUNDING_BASKET, LOCK_BASKET, LOCK_PREFIX, LOCK_SUFFIX, MAX_INSCRIPTION_BYTES, MIN_UNLOCK_SATS, MESSAGE_SIGNING_PROTOCOL, ONESAT_MAINNET_CONTENT_URL, ONESAT_MAINNET_URL, ONESAT_PROTOCOL, ONESAT_TESTNET_CONTENT_URL, ONESAT_TESTNET_URL, OPNS_BASKET, ORDINALS_BASKET, SIGMA_BASKET, ORD_LOCK_PREFIX, ORD_LOCK_SUFFIX, WOC_MAINNET_URL, WOC_TESTNET_URL, } from '@1sat/types';
|
|
1
|
+
export { BAP_BASKET, BAP_BITCOM_ADDRESS, BAP_KEY_ID, BAP_PROTOCOL_ID, BSV21_BASKET, BSV21_FEE_SATS, BSV21_PROTOCOL, EXCHANGE_RATE_CACHE_TTL, FUNDING_BASKET, LOCK_BASKET, LOCK_PREFIX, LOCK_SUFFIX, MAX_INSCRIPTION_BYTES, MIN_UNLOCK_SATS, MESSAGE_SIGNING_PROTOCOL, ONESAT_MAINNET_CONTENT_URL, ONESAT_MAINNET_URL, ONESAT_PROTOCOL, ONESAT_TESTNET_CONTENT_URL, ONESAT_TESTNET_URL, OPNS_BASKET, ORDINALS_BASKET, BSOCIAL_BASKET, SIGMA_BASKET, ORD_LOCK_PREFIX, ORD_LOCK_SUFFIX, WOC_MAINNET_URL, WOC_TESTNET_URL, } from '@1sat/types';
|
|
2
2
|
//# sourceMappingURL=constants.d.ts.map
|
package/dist/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,UAAU,EACV,eAAe,EACf,YAAY,EACZ,cAAc,EACd,cAAc,EACd,uBAAuB,EACvB,cAAc,EACd,WAAW,EACX,WAAW,EACX,WAAW,EACX,qBAAqB,EACrB,eAAe,EACf,wBAAwB,EACxB,0BAA0B,EAC1B,kBAAkB,EAClB,eAAe,EACf,0BAA0B,EAC1B,kBAAkB,EAClB,WAAW,EACX,eAAe,EACf,YAAY,EACZ,eAAe,EACf,eAAe,EACf,eAAe,EACf,eAAe,GACf,MAAM,aAAa,CAAA"}
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,UAAU,EACV,kBAAkB,EAClB,UAAU,EACV,eAAe,EACf,YAAY,EACZ,cAAc,EACd,cAAc,EACd,uBAAuB,EACvB,cAAc,EACd,WAAW,EACX,WAAW,EACX,WAAW,EACX,qBAAqB,EACrB,eAAe,EACf,wBAAwB,EACxB,0BAA0B,EAC1B,kBAAkB,EAClB,eAAe,EACf,0BAA0B,EAC1B,kBAAkB,EAClB,WAAW,EACX,eAAe,EACf,cAAc,EACd,YAAY,EACZ,eAAe,EACf,eAAe,EACf,eAAe,EACf,eAAe,GACf,MAAM,aAAa,CAAA"}
|
package/dist/constants.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { BAP_KEY_ID, BAP_PROTOCOL_ID, BSV21_BASKET, BSV21_FEE_SATS, BSV21_PROTOCOL, EXCHANGE_RATE_CACHE_TTL, FUNDING_BASKET, LOCK_BASKET, LOCK_PREFIX, LOCK_SUFFIX, MAX_INSCRIPTION_BYTES, MIN_UNLOCK_SATS, MESSAGE_SIGNING_PROTOCOL, ONESAT_MAINNET_CONTENT_URL, ONESAT_MAINNET_URL, ONESAT_PROTOCOL, ONESAT_TESTNET_CONTENT_URL, ONESAT_TESTNET_URL, OPNS_BASKET, ORDINALS_BASKET, SIGMA_BASKET, ORD_LOCK_PREFIX, ORD_LOCK_SUFFIX, WOC_MAINNET_URL, WOC_TESTNET_URL, } from '@1sat/types';
|
|
1
|
+
export { BAP_BASKET, BAP_BITCOM_ADDRESS, BAP_KEY_ID, BAP_PROTOCOL_ID, BSV21_BASKET, BSV21_FEE_SATS, BSV21_PROTOCOL, EXCHANGE_RATE_CACHE_TTL, FUNDING_BASKET, LOCK_BASKET, LOCK_PREFIX, LOCK_SUFFIX, MAX_INSCRIPTION_BYTES, MIN_UNLOCK_SATS, MESSAGE_SIGNING_PROTOCOL, ONESAT_MAINNET_CONTENT_URL, ONESAT_MAINNET_URL, ONESAT_PROTOCOL, ONESAT_TESTNET_CONTENT_URL, ONESAT_TESTNET_URL, OPNS_BASKET, ORDINALS_BASKET, BSOCIAL_BASKET, SIGMA_BASKET, ORD_LOCK_PREFIX, ORD_LOCK_SUFFIX, WOC_MAINNET_URL, WOC_TESTNET_URL, } from '@1sat/types';
|
|
2
2
|
//# sourceMappingURL=constants.js.map
|
package/dist/constants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,UAAU,EACV,eAAe,EACf,YAAY,EACZ,cAAc,EACd,cAAc,EACd,uBAAuB,EACvB,cAAc,EACd,WAAW,EACX,WAAW,EACX,WAAW,EACX,qBAAqB,EACrB,eAAe,EACf,wBAAwB,EACxB,0BAA0B,EAC1B,kBAAkB,EAClB,eAAe,EACf,0BAA0B,EAC1B,kBAAkB,EAClB,WAAW,EACX,eAAe,EACf,YAAY,EACZ,eAAe,EACf,eAAe,EACf,eAAe,EACf,eAAe,GACf,MAAM,aAAa,CAAA"}
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,UAAU,EACV,kBAAkB,EAClB,UAAU,EACV,eAAe,EACf,YAAY,EACZ,cAAc,EACd,cAAc,EACd,uBAAuB,EACvB,cAAc,EACd,WAAW,EACX,WAAW,EACX,WAAW,EACX,qBAAqB,EACrB,eAAe,EACf,wBAAwB,EACxB,0BAA0B,EAC1B,kBAAkB,EAClB,eAAe,EACf,0BAA0B,EAC1B,kBAAkB,EAClB,WAAW,EACX,eAAe,EACf,cAAc,EACd,YAAY,EACZ,eAAe,EACf,eAAe,EACf,eAAe,EACf,eAAe,GACf,MAAM,aAAa,CAAA"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Identity Module
|
|
3
|
+
*
|
|
4
|
+
* BAP identity actions: attestations and alias/profile updates.
|
|
5
|
+
* Uses the wallet's BAP signing key ([1, "bapid"] / "identity") via applyAip.
|
|
6
|
+
*
|
|
7
|
+
* Prerequisite: Sigma Identity must seed the wallet's `bap` basket with
|
|
8
|
+
* an output tagged `type:id` and `bapId:<hash>` so actions can resolve
|
|
9
|
+
* the BAP identity key from wallet state.
|
|
10
|
+
*/
|
|
11
|
+
import type { Action, OneSatContext } from '../types';
|
|
12
|
+
/**
|
|
13
|
+
* Resolve the BAP identity key from the wallet's `bap` basket.
|
|
14
|
+
*
|
|
15
|
+
* Looks for an output tagged `type:id` and extracts the `bapId:` tag value.
|
|
16
|
+
* Returns null if no identity output exists (Sigma Identity hasn't seeded
|
|
17
|
+
* the wallet yet).
|
|
18
|
+
*/
|
|
19
|
+
export declare function resolveBapId(ctx: OneSatContext): Promise<string | null>;
|
|
20
|
+
export interface PublishIdentityRequest {
|
|
21
|
+
/** Pre-signed BAP ID locking script hex (AIP-signed with root key) */
|
|
22
|
+
signedScript: string;
|
|
23
|
+
}
|
|
24
|
+
export interface AttestRequest {
|
|
25
|
+
/** SHA-256 hash of the attestation URN (urn:bap:id:attribute:value:nonce) */
|
|
26
|
+
attestationHash: string;
|
|
27
|
+
/** Attestation sequence number (default "0") */
|
|
28
|
+
counter?: string;
|
|
29
|
+
}
|
|
30
|
+
export interface UpdateProfileRequest {
|
|
31
|
+
/** Schema.org profile data (e.g. { "@type": "Person", "name": "Alice" }) */
|
|
32
|
+
profile: Record<string, unknown>;
|
|
33
|
+
}
|
|
34
|
+
export interface IdentityResponse {
|
|
35
|
+
txid?: string;
|
|
36
|
+
rawtx?: string;
|
|
37
|
+
error?: string;
|
|
38
|
+
}
|
|
39
|
+
export interface ProfileResponse {
|
|
40
|
+
bapId?: string;
|
|
41
|
+
profile?: Record<string, unknown>;
|
|
42
|
+
error?: string;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Publish a BAP ID record using a pre-signed locking script.
|
|
46
|
+
*
|
|
47
|
+
* The caller (Sigma Identity) signs the ID OP_RETURN with the root key
|
|
48
|
+
* via PrivateKeySigner + AIP. This action validates the script, verifies
|
|
49
|
+
* the AIP signature, confirms the currentAddress matches this wallet,
|
|
50
|
+
* then funds the transaction via the BRC-100 wallet. The output lands
|
|
51
|
+
* in the `bap` basket so that resolveBapId() can find it.
|
|
52
|
+
*
|
|
53
|
+
* For Droplit-funded onboarding, use internalizeAction() directly instead.
|
|
54
|
+
*/
|
|
55
|
+
export declare const publishIdentity: Action<PublishIdentityRequest, IdentityResponse>;
|
|
56
|
+
/**
|
|
57
|
+
* Publish a BAP ATTEST transaction.
|
|
58
|
+
*
|
|
59
|
+
* OP_RETURN: BAP_PREFIX | "ATTEST" | attestation_hash | counter
|
|
60
|
+
* Signed with AIP via the wallet's BAP signing key.
|
|
61
|
+
*/
|
|
62
|
+
export declare const attest: Action<AttestRequest, IdentityResponse>;
|
|
63
|
+
/**
|
|
64
|
+
* Publish a BAP ALIAS transaction to update the identity's profile.
|
|
65
|
+
*
|
|
66
|
+
* OP_RETURN: BAP_PREFIX | "ALIAS" | bap_id | profile_json
|
|
67
|
+
* Signed with AIP via the wallet's BAP signing key.
|
|
68
|
+
*
|
|
69
|
+
* The BAP ID is resolved from the wallet's `bap` basket (seeded by Sigma Identity).
|
|
70
|
+
*/
|
|
71
|
+
export declare const updateProfile: Action<UpdateProfileRequest, IdentityResponse>;
|
|
72
|
+
/**
|
|
73
|
+
* Read the current BAP profile (alias) from the wallet's `bap` basket.
|
|
74
|
+
*
|
|
75
|
+
* Parses the ALIAS OP_RETURN locking script to extract the profile JSON.
|
|
76
|
+
* If duplicate alias outputs exist, keeps the first and relinquishes the rest.
|
|
77
|
+
*/
|
|
78
|
+
export declare const getProfile: Action<Record<string, never>, ProfileResponse>;
|
|
79
|
+
/** All identity actions for registry */
|
|
80
|
+
export declare const identityActions: (Action<PublishIdentityRequest, IdentityResponse> | Action<AttestRequest, IdentityResponse> | Action<UpdateProfileRequest, IdentityResponse> | Action<Record<string, never>, ProfileResponse>)[];
|
|
81
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts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AK,CAAC,EAAE,eAAe,CAyDrE,CAAA;AAED,wCAAwC;AACxC,eAAO,MAAM,eAAe,kMAAuD,CAAA"}
|
|
@@ -0,0 +1,433 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Identity Module
|
|
3
|
+
*
|
|
4
|
+
* BAP identity actions: attestations and alias/profile updates.
|
|
5
|
+
* Uses the wallet's BAP signing key ([1, "bapid"] / "identity") via applyAip.
|
|
6
|
+
*
|
|
7
|
+
* Prerequisite: Sigma Identity must seed the wallet's `bap` basket with
|
|
8
|
+
* an output tagged `type:id` and `bapId:<hash>` so actions can resolve
|
|
9
|
+
* the BAP identity key from wallet state.
|
|
10
|
+
*/
|
|
11
|
+
import { BSM, BigNumber, OP, PublicKey, Script, Signature, Utils, } from '@bsv/sdk';
|
|
12
|
+
import { BAP_BASKET, BAP_BITCOM_ADDRESS, BAP_KEY_ID, BAP_PROTOCOL_ID, } from '../constants';
|
|
13
|
+
import { applyAip } from '../signing/aip';
|
|
14
|
+
const { toArray, toUTF8 } = Utils;
|
|
15
|
+
const AIP_PREFIX = '15PciHG22SNLQJXMoSUaWVi7WSqc7hCfva';
|
|
16
|
+
// ============================================================================
|
|
17
|
+
// BAP ID Resolution
|
|
18
|
+
// ============================================================================
|
|
19
|
+
/**
|
|
20
|
+
* Resolve the BAP identity key from the wallet's `bap` basket.
|
|
21
|
+
*
|
|
22
|
+
* Looks for an output tagged `type:id` and extracts the `bapId:` tag value.
|
|
23
|
+
* Returns null if no identity output exists (Sigma Identity hasn't seeded
|
|
24
|
+
* the wallet yet).
|
|
25
|
+
*/
|
|
26
|
+
export async function resolveBapId(ctx) {
|
|
27
|
+
const result = await ctx.wallet.listOutputs({
|
|
28
|
+
basket: BAP_BASKET,
|
|
29
|
+
tags: ['type:id'],
|
|
30
|
+
includeTags: true,
|
|
31
|
+
limit: 1,
|
|
32
|
+
});
|
|
33
|
+
if (!result.outputs.length)
|
|
34
|
+
return null;
|
|
35
|
+
const output = result.outputs[0];
|
|
36
|
+
const bapIdTag = output.tags?.find((t) => t.startsWith('bapId:'));
|
|
37
|
+
if (!bapIdTag)
|
|
38
|
+
return null;
|
|
39
|
+
return bapIdTag.slice('bapId:'.length);
|
|
40
|
+
}
|
|
41
|
+
// ============================================================================
|
|
42
|
+
// Actions
|
|
43
|
+
// ============================================================================
|
|
44
|
+
/**
|
|
45
|
+
* Parse and validate a BAP ID locking script.
|
|
46
|
+
*
|
|
47
|
+
* Expected format:
|
|
48
|
+
* OP_FALSE OP_RETURN <BAP_PREFIX> <"ID"> <bapId> <currentAddress> | <AIP_PREFIX> <algorithm> <address> <signature>
|
|
49
|
+
*
|
|
50
|
+
* Validates:
|
|
51
|
+
* 1. Script structure (BAP prefix, "ID" command, required fields)
|
|
52
|
+
* 2. AIP signature over the OP_RETURN content
|
|
53
|
+
* 3. currentAddress matches the wallet's BAP-derived key
|
|
54
|
+
*/
|
|
55
|
+
async function validateBapIdScript(ctx, script) {
|
|
56
|
+
const chunks = script.chunks;
|
|
57
|
+
// Minimum: OP_FALSE OP_RETURN BAP_PREFIX "ID" bapId currentAddress | AIP_PREFIX algorithm address signature
|
|
58
|
+
if (chunks.length < 10) {
|
|
59
|
+
return { error: 'invalid-script: too few chunks' };
|
|
60
|
+
}
|
|
61
|
+
// Verify OP_FALSE OP_RETURN prefix
|
|
62
|
+
if (chunks[0].op !== OP.OP_FALSE || chunks[1].op !== OP.OP_RETURN) {
|
|
63
|
+
return { error: 'invalid-script: missing OP_FALSE OP_RETURN' };
|
|
64
|
+
}
|
|
65
|
+
// Verify BAP prefix
|
|
66
|
+
const prefix = chunks[2]?.data
|
|
67
|
+
? toUTF8(Array.from(chunks[2].data))
|
|
68
|
+
: '';
|
|
69
|
+
if (prefix !== BAP_BITCOM_ADDRESS) {
|
|
70
|
+
return { error: 'invalid-script: not a BAP record' };
|
|
71
|
+
}
|
|
72
|
+
// Verify "ID" command
|
|
73
|
+
const command = chunks[3]?.data
|
|
74
|
+
? toUTF8(Array.from(chunks[3].data))
|
|
75
|
+
: '';
|
|
76
|
+
if (command !== 'ID') {
|
|
77
|
+
return { error: 'invalid-script: not a BAP ID record' };
|
|
78
|
+
}
|
|
79
|
+
// Extract bapId and currentAddress
|
|
80
|
+
const bapIdData = chunks[4]?.data;
|
|
81
|
+
const currentAddressData = chunks[5]?.data;
|
|
82
|
+
if (!bapIdData || !currentAddressData) {
|
|
83
|
+
return { error: 'invalid-script: missing bapId or currentAddress' };
|
|
84
|
+
}
|
|
85
|
+
const bapId = toUTF8(Array.from(bapIdData));
|
|
86
|
+
const currentAddress = toUTF8(Array.from(currentAddressData));
|
|
87
|
+
// Find the pipe delimiter and AIP suffix
|
|
88
|
+
let aipStart = -1;
|
|
89
|
+
for (let i = 6; i < chunks.length; i++) {
|
|
90
|
+
const data = chunks[i]?.data;
|
|
91
|
+
if (data && toUTF8(Array.from(data)) === '|') {
|
|
92
|
+
aipStart = i + 1;
|
|
93
|
+
break;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
if (aipStart < 0 || aipStart + 3 >= chunks.length) {
|
|
97
|
+
return { error: 'invalid-script: missing AIP signature' };
|
|
98
|
+
}
|
|
99
|
+
// Verify AIP prefix
|
|
100
|
+
const aipPrefixData = chunks[aipStart]?.data;
|
|
101
|
+
if (!aipPrefixData || toUTF8(Array.from(aipPrefixData)) !== AIP_PREFIX) {
|
|
102
|
+
return { error: 'invalid-script: invalid AIP prefix' };
|
|
103
|
+
}
|
|
104
|
+
const aipAddressData = chunks[aipStart + 2]?.data;
|
|
105
|
+
const aipSigBytes = chunks[aipStart + 3]?.data;
|
|
106
|
+
if (!aipAddressData || !aipSigBytes) {
|
|
107
|
+
return { error: 'invalid-script: incomplete AIP signature' };
|
|
108
|
+
}
|
|
109
|
+
const aipAddress = toUTF8(Array.from(aipAddressData));
|
|
110
|
+
// Build the AIP message buffer (OP_RETURN + all push data before the pipe)
|
|
111
|
+
const message = [OP.OP_RETURN];
|
|
112
|
+
for (let i = 2; i < chunks.length; i++) {
|
|
113
|
+
const data = chunks[i]?.data;
|
|
114
|
+
if (data && toUTF8(Array.from(data)) === '|')
|
|
115
|
+
break;
|
|
116
|
+
if (data && data.length > 0) {
|
|
117
|
+
message.push(...Array.from(data));
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
// Verify AIP signature
|
|
121
|
+
const bsmHash = BSM.magicHash(message);
|
|
122
|
+
const sig = Signature.fromCompact(Utils.toBase64(Array.from(aipSigBytes)), 'base64');
|
|
123
|
+
let sigValid = false;
|
|
124
|
+
for (let recovery = 0; recovery < 4; recovery++) {
|
|
125
|
+
try {
|
|
126
|
+
const pubKey = sig.RecoverPublicKey(recovery, new BigNumber(bsmHash));
|
|
127
|
+
if (BSM.verify(message, sig, pubKey) &&
|
|
128
|
+
pubKey.toAddress() === aipAddress) {
|
|
129
|
+
sigValid = true;
|
|
130
|
+
break;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
catch {
|
|
134
|
+
// try next recovery factor
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
if (!sigValid) {
|
|
138
|
+
return { error: 'invalid-signature: AIP signature verification failed' };
|
|
139
|
+
}
|
|
140
|
+
// Verify currentAddress matches this wallet's BAP-derived key
|
|
141
|
+
const { publicKey: walletBapPubKey } = await ctx.wallet.getPublicKey({
|
|
142
|
+
protocolID: BAP_PROTOCOL_ID,
|
|
143
|
+
keyID: BAP_KEY_ID,
|
|
144
|
+
counterparty: 'self',
|
|
145
|
+
});
|
|
146
|
+
const walletBapAddress = PublicKey.fromString(walletBapPubKey).toAddress();
|
|
147
|
+
if (currentAddress !== walletBapAddress) {
|
|
148
|
+
return {
|
|
149
|
+
error: `address-mismatch: script currentAddress ${currentAddress} does not match wallet BAP address ${walletBapAddress}`,
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
return { bapId, currentAddress };
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Publish a BAP ID record using a pre-signed locking script.
|
|
156
|
+
*
|
|
157
|
+
* The caller (Sigma Identity) signs the ID OP_RETURN with the root key
|
|
158
|
+
* via PrivateKeySigner + AIP. This action validates the script, verifies
|
|
159
|
+
* the AIP signature, confirms the currentAddress matches this wallet,
|
|
160
|
+
* then funds the transaction via the BRC-100 wallet. The output lands
|
|
161
|
+
* in the `bap` basket so that resolveBapId() can find it.
|
|
162
|
+
*
|
|
163
|
+
* For Droplit-funded onboarding, use internalizeAction() directly instead.
|
|
164
|
+
*/
|
|
165
|
+
export const publishIdentity = {
|
|
166
|
+
meta: {
|
|
167
|
+
name: 'publishIdentity',
|
|
168
|
+
description: 'Publish a BAP ID record from a pre-signed script, funded by the wallet',
|
|
169
|
+
category: 'identity',
|
|
170
|
+
inputSchema: {
|
|
171
|
+
type: 'object',
|
|
172
|
+
properties: {
|
|
173
|
+
signedScript: {
|
|
174
|
+
type: 'string',
|
|
175
|
+
description: 'Pre-signed BAP ID locking script hex (AIP-signed with root key)',
|
|
176
|
+
},
|
|
177
|
+
},
|
|
178
|
+
required: ['signedScript'],
|
|
179
|
+
},
|
|
180
|
+
},
|
|
181
|
+
async execute(ctx, input) {
|
|
182
|
+
try {
|
|
183
|
+
const script = Script.fromHex(input.signedScript);
|
|
184
|
+
const validation = await validateBapIdScript(ctx, script);
|
|
185
|
+
if ('error' in validation) {
|
|
186
|
+
return { error: validation.error };
|
|
187
|
+
}
|
|
188
|
+
const { bapId } = validation;
|
|
189
|
+
const result = await ctx.wallet.createAction({
|
|
190
|
+
description: 'BAP identity publication',
|
|
191
|
+
outputs: [
|
|
192
|
+
{
|
|
193
|
+
lockingScript: input.signedScript,
|
|
194
|
+
satoshis: 0,
|
|
195
|
+
outputDescription: 'BAP ID',
|
|
196
|
+
basket: BAP_BASKET,
|
|
197
|
+
tags: ['type:id', `bapId:${bapId}`],
|
|
198
|
+
},
|
|
199
|
+
],
|
|
200
|
+
options: {
|
|
201
|
+
signAndProcess: true,
|
|
202
|
+
acceptDelayedBroadcast: false,
|
|
203
|
+
randomizeOutputs: false,
|
|
204
|
+
},
|
|
205
|
+
});
|
|
206
|
+
if (!result.txid)
|
|
207
|
+
return { error: 'no-txid-returned' };
|
|
208
|
+
return {
|
|
209
|
+
txid: result.txid,
|
|
210
|
+
rawtx: result.tx ? Utils.toHex(result.tx) : undefined,
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
catch (error) {
|
|
214
|
+
console.error('[publishIdentity]', error);
|
|
215
|
+
return {
|
|
216
|
+
error: error instanceof Error ? error.message : 'unknown-error',
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
};
|
|
221
|
+
/**
|
|
222
|
+
* Publish a BAP ATTEST transaction.
|
|
223
|
+
*
|
|
224
|
+
* OP_RETURN: BAP_PREFIX | "ATTEST" | attestation_hash | counter
|
|
225
|
+
* Signed with AIP via the wallet's BAP signing key.
|
|
226
|
+
*/
|
|
227
|
+
export const attest = {
|
|
228
|
+
meta: {
|
|
229
|
+
name: 'attest',
|
|
230
|
+
description: 'Publish a BAP attestation signed with BAP identity',
|
|
231
|
+
category: 'identity',
|
|
232
|
+
inputSchema: {
|
|
233
|
+
type: 'object',
|
|
234
|
+
properties: {
|
|
235
|
+
attestationHash: {
|
|
236
|
+
type: 'string',
|
|
237
|
+
description: 'SHA-256 hash of the attestation URN (urn:bap:id:attribute:value:nonce)',
|
|
238
|
+
},
|
|
239
|
+
counter: {
|
|
240
|
+
type: 'string',
|
|
241
|
+
description: 'Attestation sequence number (default "0")',
|
|
242
|
+
},
|
|
243
|
+
},
|
|
244
|
+
required: ['attestationHash'],
|
|
245
|
+
},
|
|
246
|
+
},
|
|
247
|
+
async execute(ctx, input) {
|
|
248
|
+
try {
|
|
249
|
+
const script = new Script();
|
|
250
|
+
script.writeOpCode(OP.OP_FALSE);
|
|
251
|
+
script.writeOpCode(OP.OP_RETURN);
|
|
252
|
+
script.writeBin(toArray(BAP_BITCOM_ADDRESS));
|
|
253
|
+
script.writeBin(toArray('ATTEST'));
|
|
254
|
+
script.writeBin(toArray(input.attestationHash));
|
|
255
|
+
script.writeBin(toArray(input.counter ?? '0'));
|
|
256
|
+
const signedScript = await applyAip(ctx, script);
|
|
257
|
+
const result = await ctx.wallet.createAction({
|
|
258
|
+
description: 'BAP attestation',
|
|
259
|
+
outputs: [
|
|
260
|
+
{
|
|
261
|
+
lockingScript: signedScript.toHex(),
|
|
262
|
+
satoshis: 0,
|
|
263
|
+
outputDescription: 'BAP ATTEST',
|
|
264
|
+
basket: BAP_BASKET,
|
|
265
|
+
tags: ['type:attest', `hash:${input.attestationHash}`],
|
|
266
|
+
},
|
|
267
|
+
],
|
|
268
|
+
options: {
|
|
269
|
+
signAndProcess: true,
|
|
270
|
+
acceptDelayedBroadcast: false,
|
|
271
|
+
randomizeOutputs: false,
|
|
272
|
+
},
|
|
273
|
+
});
|
|
274
|
+
if (!result.txid)
|
|
275
|
+
return { error: 'no-txid-returned' };
|
|
276
|
+
return {
|
|
277
|
+
txid: result.txid,
|
|
278
|
+
rawtx: result.tx ? Utils.toHex(result.tx) : undefined,
|
|
279
|
+
};
|
|
280
|
+
}
|
|
281
|
+
catch (error) {
|
|
282
|
+
console.error('[attest]', error);
|
|
283
|
+
return {
|
|
284
|
+
error: error instanceof Error ? error.message : 'unknown-error',
|
|
285
|
+
};
|
|
286
|
+
}
|
|
287
|
+
},
|
|
288
|
+
};
|
|
289
|
+
/**
|
|
290
|
+
* Publish a BAP ALIAS transaction to update the identity's profile.
|
|
291
|
+
*
|
|
292
|
+
* OP_RETURN: BAP_PREFIX | "ALIAS" | bap_id | profile_json
|
|
293
|
+
* Signed with AIP via the wallet's BAP signing key.
|
|
294
|
+
*
|
|
295
|
+
* The BAP ID is resolved from the wallet's `bap` basket (seeded by Sigma Identity).
|
|
296
|
+
*/
|
|
297
|
+
export const updateProfile = {
|
|
298
|
+
meta: {
|
|
299
|
+
name: 'updateProfile',
|
|
300
|
+
description: 'Update BAP identity profile signed with BAP identity',
|
|
301
|
+
category: 'identity',
|
|
302
|
+
inputSchema: {
|
|
303
|
+
type: 'object',
|
|
304
|
+
properties: {
|
|
305
|
+
profile: {
|
|
306
|
+
type: 'object',
|
|
307
|
+
description: 'Schema.org profile data (e.g. { "@type": "Person", "name": "Alice" })',
|
|
308
|
+
},
|
|
309
|
+
},
|
|
310
|
+
required: ['profile'],
|
|
311
|
+
},
|
|
312
|
+
},
|
|
313
|
+
async execute(ctx, input) {
|
|
314
|
+
try {
|
|
315
|
+
const bapId = await resolveBapId(ctx);
|
|
316
|
+
if (!bapId) {
|
|
317
|
+
return {
|
|
318
|
+
error: 'no-bap-identity: publish identity via Sigma Identity first',
|
|
319
|
+
};
|
|
320
|
+
}
|
|
321
|
+
// Find existing alias outputs to relinquish after the new one is created
|
|
322
|
+
const existing = await ctx.wallet.listOutputs({
|
|
323
|
+
basket: BAP_BASKET,
|
|
324
|
+
tags: ['type:alias'],
|
|
325
|
+
limit: 100,
|
|
326
|
+
});
|
|
327
|
+
const script = new Script();
|
|
328
|
+
script.writeOpCode(OP.OP_FALSE);
|
|
329
|
+
script.writeOpCode(OP.OP_RETURN);
|
|
330
|
+
script.writeBin(toArray(BAP_BITCOM_ADDRESS));
|
|
331
|
+
script.writeBin(toArray('ALIAS'));
|
|
332
|
+
script.writeBin(toArray(bapId));
|
|
333
|
+
script.writeBin(toArray(JSON.stringify(input.profile)));
|
|
334
|
+
const signedScript = await applyAip(ctx, script);
|
|
335
|
+
const result = await ctx.wallet.createAction({
|
|
336
|
+
description: 'BAP alias update',
|
|
337
|
+
outputs: [
|
|
338
|
+
{
|
|
339
|
+
lockingScript: signedScript.toHex(),
|
|
340
|
+
satoshis: 0,
|
|
341
|
+
outputDescription: 'BAP ALIAS',
|
|
342
|
+
basket: BAP_BASKET,
|
|
343
|
+
tags: ['type:alias', `bapId:${bapId}`],
|
|
344
|
+
},
|
|
345
|
+
],
|
|
346
|
+
options: {
|
|
347
|
+
signAndProcess: true,
|
|
348
|
+
acceptDelayedBroadcast: false,
|
|
349
|
+
randomizeOutputs: false,
|
|
350
|
+
},
|
|
351
|
+
});
|
|
352
|
+
if (!result.txid)
|
|
353
|
+
return { error: 'no-txid-returned' };
|
|
354
|
+
// Relinquish old alias outputs now that the new one is committed
|
|
355
|
+
for (const old of existing.outputs) {
|
|
356
|
+
await ctx.wallet.relinquishOutput({
|
|
357
|
+
basket: BAP_BASKET,
|
|
358
|
+
output: old.outpoint,
|
|
359
|
+
});
|
|
360
|
+
}
|
|
361
|
+
return {
|
|
362
|
+
txid: result.txid,
|
|
363
|
+
rawtx: result.tx ? Utils.toHex(result.tx) : undefined,
|
|
364
|
+
};
|
|
365
|
+
}
|
|
366
|
+
catch (error) {
|
|
367
|
+
console.error('[updateProfile]', error);
|
|
368
|
+
return {
|
|
369
|
+
error: error instanceof Error ? error.message : 'unknown-error',
|
|
370
|
+
};
|
|
371
|
+
}
|
|
372
|
+
},
|
|
373
|
+
};
|
|
374
|
+
/**
|
|
375
|
+
* Read the current BAP profile (alias) from the wallet's `bap` basket.
|
|
376
|
+
*
|
|
377
|
+
* Parses the ALIAS OP_RETURN locking script to extract the profile JSON.
|
|
378
|
+
* If duplicate alias outputs exist, keeps the first and relinquishes the rest.
|
|
379
|
+
*/
|
|
380
|
+
export const getProfile = {
|
|
381
|
+
meta: {
|
|
382
|
+
name: 'getProfile',
|
|
383
|
+
description: 'Read current BAP identity profile from wallet',
|
|
384
|
+
category: 'identity',
|
|
385
|
+
inputSchema: {
|
|
386
|
+
type: 'object',
|
|
387
|
+
properties: {},
|
|
388
|
+
},
|
|
389
|
+
},
|
|
390
|
+
async execute(ctx) {
|
|
391
|
+
try {
|
|
392
|
+
const result = await ctx.wallet.listOutputs({
|
|
393
|
+
basket: BAP_BASKET,
|
|
394
|
+
tags: ['type:alias'],
|
|
395
|
+
include: 'locking scripts',
|
|
396
|
+
includeTags: true,
|
|
397
|
+
limit: 100,
|
|
398
|
+
});
|
|
399
|
+
if (!result.outputs.length) {
|
|
400
|
+
return { error: 'no-profile: no alias output in wallet' };
|
|
401
|
+
}
|
|
402
|
+
// Parse profile from the first output's locking script
|
|
403
|
+
const primary = result.outputs[0];
|
|
404
|
+
const script = Script.fromHex(primary.lockingScript ?? '');
|
|
405
|
+
// Script: OP_FALSE OP_RETURN <BAP_PREFIX> <"ALIAS"> <bapId> <profileJson> [| AIP...]
|
|
406
|
+
// Chunks: [0]=OP_FALSE [1]=OP_RETURN [2]=BAP_PREFIX [3]="ALIAS" [4]=bapId [5]=profileJson
|
|
407
|
+
const bapIdChunk = script.chunks[4]?.data;
|
|
408
|
+
const profileChunk = script.chunks[5]?.data;
|
|
409
|
+
if (!bapIdChunk || !profileChunk) {
|
|
410
|
+
return { error: 'malformed-alias: could not parse locking script' };
|
|
411
|
+
}
|
|
412
|
+
const bapId = Utils.toUTF8(Array.from(bapIdChunk));
|
|
413
|
+
const profile = JSON.parse(Utils.toUTF8(Array.from(profileChunk)));
|
|
414
|
+
// Relinquish duplicates
|
|
415
|
+
for (const dup of result.outputs.slice(1)) {
|
|
416
|
+
await ctx.wallet.relinquishOutput({
|
|
417
|
+
basket: BAP_BASKET,
|
|
418
|
+
output: dup.outpoint,
|
|
419
|
+
});
|
|
420
|
+
}
|
|
421
|
+
return { bapId, profile };
|
|
422
|
+
}
|
|
423
|
+
catch (error) {
|
|
424
|
+
console.error('[getProfile]', error);
|
|
425
|
+
return {
|
|
426
|
+
error: error instanceof Error ? error.message : 'unknown-error',
|
|
427
|
+
};
|
|
428
|
+
}
|
|
429
|
+
},
|
|
430
|
+
};
|
|
431
|
+
/** All identity actions for registry */
|
|
432
|
+
export const identityActions = [publishIdentity, attest, updateProfile, getProfile];
|
|
433
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/identity/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EACN,GAAG,EACH,SAAS,EACT,EAAE,EACF,SAAS,EACT,MAAM,EACN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AK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe;aAC/D,CAAA;QACF,CAAC;IACF,CAAC;CACD,CAAA;AAED,wCAAwC;AACxC,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,eAAe,EAAE,MAAM,EAAE,aAAa,EAAE,UAAU,CAAC,CAAA"}
|
package/dist/index.d.ts
CHANGED
|
@@ -8,9 +8,10 @@ export { type Action, type ActionCategory, type ActionLogEntry, type ActionMetad
|
|
|
8
8
|
export { ActionRegistry, actionRegistry, type McpTool } from './registry';
|
|
9
9
|
export * from './constants';
|
|
10
10
|
export { signP2PKHInput } from './utils/signP2PKH';
|
|
11
|
-
export { completeSignedAction, type CompleteSignedActionResult, type SigningCallback } from './utils/completeSignedAction';
|
|
12
|
-
export { createTrackedAction, randomActionId } from './utils/createTrackedAction';
|
|
11
|
+
export { completeSignedAction, type CompleteSignedActionResult, type SigningCallback, } from './utils/completeSignedAction';
|
|
12
|
+
export { createTrackedAction, randomActionId, } from './utils/createTrackedAction';
|
|
13
13
|
export { resolveBeef, extractIdTag } from './utils/resolveBeef';
|
|
14
|
+
export { internalizeBeef, type InternalizeBeefOptions, type InternalizeBeefResult, type OutputDerivation, } from './utils/internalizeBeef';
|
|
14
15
|
export * from './addresses';
|
|
15
16
|
export * from './payments';
|
|
16
17
|
export * from './ordinals';
|
|
@@ -18,6 +19,8 @@ export * from './tokens';
|
|
|
18
19
|
export * from './inscriptions';
|
|
19
20
|
export * from './locks';
|
|
20
21
|
export * from './signing';
|
|
22
|
+
export * from './social';
|
|
23
|
+
export * from './identity';
|
|
21
24
|
export * from './opns';
|
|
22
25
|
export * from './sweep';
|
|
23
26
|
export * from './sync';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EACN,KAAK,M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AACxB,cAAc,YAAY,CAAA;AAC1B,cAAc,QAAQ,CAAA;AAGtB,cAAc,SAAS,CAAA;AAGvB,cAAc,QAAQ,CAAA;AAgCtB,YAAY,EACX,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,eAAe,EACf,iBAAiB,EACjB,eAAe,EACf,YAAY,GACZ,MAAM,UAAU,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -12,9 +12,10 @@ export { ActionRegistry, actionRegistry } from './registry';
|
|
|
12
12
|
export * from './constants';
|
|
13
13
|
// Export shared utilities
|
|
14
14
|
export { signP2PKHInput } from './utils/signP2PKH';
|
|
15
|
-
export { completeSignedAction } from './utils/completeSignedAction';
|
|
16
|
-
export { createTrackedAction, randomActionId } from './utils/createTrackedAction';
|
|
15
|
+
export { completeSignedAction, } from './utils/completeSignedAction';
|
|
16
|
+
export { createTrackedAction, randomActionId, } from './utils/createTrackedAction';
|
|
17
17
|
export { resolveBeef, extractIdTag } from './utils/resolveBeef';
|
|
18
|
+
export { internalizeBeef, } from './utils/internalizeBeef';
|
|
18
19
|
// Export module actions and types
|
|
19
20
|
export * from './addresses';
|
|
20
21
|
export * from './payments';
|
|
@@ -23,12 +24,15 @@ export * from './tokens';
|
|
|
23
24
|
export * from './inscriptions';
|
|
24
25
|
export * from './locks';
|
|
25
26
|
export * from './signing';
|
|
27
|
+
export * from './social';
|
|
28
|
+
export * from './identity';
|
|
26
29
|
export * from './opns';
|
|
27
30
|
// Export sweep module (uses external signing, not action-based)
|
|
28
31
|
export * from './sweep';
|
|
29
32
|
// Export sync module
|
|
30
33
|
export * from './sync';
|
|
31
34
|
import { addressesActions } from './addresses';
|
|
35
|
+
import { identityActions } from './identity';
|
|
32
36
|
import { inscriptionsActions } from './inscriptions';
|
|
33
37
|
import { locksActions } from './locks';
|
|
34
38
|
import { opnsActions } from './opns';
|
|
@@ -36,17 +40,20 @@ import { ordinalsActions } from './ordinals';
|
|
|
36
40
|
import { paymentsActions } from './payments';
|
|
37
41
|
import { actionRegistry } from './registry';
|
|
38
42
|
import { signingActions } from './signing';
|
|
43
|
+
import { socialActions } from './social';
|
|
39
44
|
import { sweepActions } from './sweep';
|
|
40
45
|
import { syncActions } from './sync';
|
|
41
46
|
import { tokensActions } from './tokens';
|
|
42
47
|
actionRegistry.registerAll([
|
|
43
48
|
...addressesActions,
|
|
49
|
+
...identityActions,
|
|
44
50
|
...paymentsActions,
|
|
45
51
|
...ordinalsActions,
|
|
46
52
|
...tokensActions,
|
|
47
53
|
...inscriptionsActions,
|
|
48
54
|
...locksActions,
|
|
49
55
|
...signingActions,
|
|
56
|
+
...socialActions,
|
|
50
57
|
...sweepActions,
|
|
51
58
|
...opnsActions,
|
|
52
59
|
...syncActions,
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,kCAAkC;AAClC,OAAO,EAON,aAAa,GACb,MAAM,SAAS,CAAA;AAEhB,yBAAyB;AACzB,OAAO,EAAE,cAAc,EAAE,cAAc,EAAgB,MAAM,YAAY,CAAA;AAEzE,mBAAmB;AACnB,cAAc,aAAa,CAAA;AAE3B,0BAA0B;AAC1B,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAClD,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,kCAAkC;AAClC,OAAO,EAON,aAAa,GACb,MAAM,SAAS,CAAA;AAEhB,yBAAyB;AACzB,OAAO,EAAE,cAAc,EAAE,cAAc,EAAgB,MAAM,YAAY,CAAA;AAEzE,mBAAmB;AACnB,cAAc,aAAa,CAAA;AAE3B,0BAA0B;AAC1B,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAClD,OAAO,EACN,oBAAoB,GAGpB,MAAM,8BAA8B,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