xpi-ts 0.2.22 → 0.2.24

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.
Files changed (172) hide show
  1. package/dist/cjs/lib/bitcore/crypto/point.js +2 -2
  2. package/dist/cjs/lib/bitcore/index.js +162 -162
  3. package/dist/esm/lib/bitcore/crypto/point.js +2 -2
  4. package/dist/esm/lib/bitcore/index.js +42 -42
  5. package/dist/types/index.d.ts +5 -0
  6. package/dist/types/index.d.ts.map +1 -1
  7. package/dist/types/lib/bitcore/address.d.ts +116 -0
  8. package/dist/types/lib/bitcore/address.d.ts.map +1 -1
  9. package/dist/types/lib/bitcore/block/block.d.ts +214 -0
  10. package/dist/types/lib/bitcore/block/block.d.ts.map +1 -1
  11. package/dist/types/lib/bitcore/block/blockheader.d.ts +220 -0
  12. package/dist/types/lib/bitcore/block/blockheader.d.ts.map +1 -1
  13. package/dist/types/lib/bitcore/block/merkleblock.d.ts +206 -0
  14. package/dist/types/lib/bitcore/block/merkleblock.d.ts.map +1 -1
  15. package/dist/types/lib/bitcore/crypto/bn.d.ts +224 -0
  16. package/dist/types/lib/bitcore/crypto/bn.d.ts.map +1 -1
  17. package/dist/types/lib/bitcore/crypto/ecdsa.d.ts +122 -0
  18. package/dist/types/lib/bitcore/crypto/ecdsa.d.ts.map +1 -1
  19. package/dist/types/lib/bitcore/crypto/hash.d.ts +56 -0
  20. package/dist/types/lib/bitcore/crypto/hash.d.ts.map +1 -1
  21. package/dist/types/lib/bitcore/crypto/index.d.ts +4 -0
  22. package/dist/types/lib/bitcore/crypto/index.d.ts.map +1 -1
  23. package/dist/types/lib/bitcore/crypto/musig2.d.ts +282 -0
  24. package/dist/types/lib/bitcore/crypto/musig2.d.ts.map +1 -1
  25. package/dist/types/lib/bitcore/crypto/point.d.ts +87 -0
  26. package/dist/types/lib/bitcore/crypto/point.d.ts.map +1 -1
  27. package/dist/types/lib/bitcore/crypto/random.d.ts +48 -0
  28. package/dist/types/lib/bitcore/crypto/random.d.ts.map +1 -1
  29. package/dist/types/lib/bitcore/crypto/schnorr.d.ts +203 -0
  30. package/dist/types/lib/bitcore/crypto/schnorr.d.ts.map +1 -1
  31. package/dist/types/lib/bitcore/crypto/signature.d.ts +452 -0
  32. package/dist/types/lib/bitcore/crypto/signature.d.ts.map +1 -1
  33. package/dist/types/lib/bitcore/crypto/sigtype.d.ts +46 -0
  34. package/dist/types/lib/bitcore/crypto/sigtype.d.ts.map +1 -1
  35. package/dist/types/lib/bitcore/encoding/base58.d.ts +68 -0
  36. package/dist/types/lib/bitcore/encoding/base58.d.ts.map +1 -1
  37. package/dist/types/lib/bitcore/encoding/base58check.d.ts +58 -0
  38. package/dist/types/lib/bitcore/encoding/base58check.d.ts.map +1 -1
  39. package/dist/types/lib/bitcore/encoding/bufferreader.d.ts +112 -0
  40. package/dist/types/lib/bitcore/encoding/bufferreader.d.ts.map +1 -1
  41. package/dist/types/lib/bitcore/encoding/bufferwriter.d.ts +144 -0
  42. package/dist/types/lib/bitcore/encoding/bufferwriter.d.ts.map +1 -1
  43. package/dist/types/lib/bitcore/encoding/varint.d.ts +86 -0
  44. package/dist/types/lib/bitcore/encoding/varint.d.ts.map +1 -1
  45. package/dist/types/lib/bitcore/errors.d.ts +4 -0
  46. package/dist/types/lib/bitcore/errors.d.ts.map +1 -1
  47. package/dist/types/lib/bitcore/hdprivatekey.d.ts +59 -0
  48. package/dist/types/lib/bitcore/hdprivatekey.d.ts.map +1 -1
  49. package/dist/types/lib/bitcore/hdpublickey.d.ts +145 -0
  50. package/dist/types/lib/bitcore/hdpublickey.d.ts.map +1 -1
  51. package/dist/types/lib/bitcore/index.d.ts +58 -54
  52. package/dist/types/lib/bitcore/index.d.ts.map +1 -1
  53. package/dist/types/lib/bitcore/message.d.ts +63 -0
  54. package/dist/types/lib/bitcore/message.d.ts.map +1 -1
  55. package/dist/types/lib/bitcore/mnemonic/errors.d.ts +4 -0
  56. package/dist/types/lib/bitcore/mnemonic/errors.d.ts.map +1 -1
  57. package/dist/types/lib/bitcore/mnemonic/index.d.ts +4 -0
  58. package/dist/types/lib/bitcore/mnemonic/index.d.ts.map +1 -1
  59. package/dist/types/lib/bitcore/mnemonic/mnemonic.d.ts +106 -0
  60. package/dist/types/lib/bitcore/mnemonic/mnemonic.d.ts.map +1 -1
  61. package/dist/types/lib/bitcore/mnemonic/pbkdf2.d.ts +13 -0
  62. package/dist/types/lib/bitcore/mnemonic/pbkdf2.d.ts.map +1 -1
  63. package/dist/types/lib/bitcore/mnemonic/words/english.d.ts +4 -0
  64. package/dist/types/lib/bitcore/mnemonic/words/english.d.ts.map +1 -1
  65. package/dist/types/lib/bitcore/mnemonic/words/french.d.ts +5 -0
  66. package/dist/types/lib/bitcore/mnemonic/words/french.d.ts.map +1 -1
  67. package/dist/types/lib/bitcore/mnemonic/words/index.d.ts +4 -0
  68. package/dist/types/lib/bitcore/mnemonic/words/index.d.ts.map +1 -1
  69. package/dist/types/lib/bitcore/musig2/index.d.ts +14 -0
  70. package/dist/types/lib/bitcore/musig2/index.d.ts.map +1 -1
  71. package/dist/types/lib/bitcore/musig2/session.d.ts +254 -0
  72. package/dist/types/lib/bitcore/musig2/session.d.ts.map +1 -1
  73. package/dist/types/lib/bitcore/musig2/signer.d.ts +212 -0
  74. package/dist/types/lib/bitcore/musig2/signer.d.ts.map +1 -1
  75. package/dist/types/lib/bitcore/networks.d.ts +17 -0
  76. package/dist/types/lib/bitcore/networks.d.ts.map +1 -1
  77. package/dist/types/lib/bitcore/opcode.d.ts +151 -0
  78. package/dist/types/lib/bitcore/opcode.d.ts.map +1 -1
  79. package/dist/types/lib/bitcore/privatekey.d.ts +80 -0
  80. package/dist/types/lib/bitcore/privatekey.d.ts.map +1 -1
  81. package/dist/types/lib/bitcore/publickey.d.ts +195 -0
  82. package/dist/types/lib/bitcore/publickey.d.ts.map +1 -1
  83. package/dist/types/lib/bitcore/script/chunk.d.ts +51 -0
  84. package/dist/types/lib/bitcore/script/chunk.d.ts.map +1 -1
  85. package/dist/types/lib/bitcore/script/interpreter/condition-stack.d.ts +60 -0
  86. package/dist/types/lib/bitcore/script/interpreter/condition-stack.d.ts.map +1 -1
  87. package/dist/types/lib/bitcore/script/interpreter/index.d.ts +23 -0
  88. package/dist/types/lib/bitcore/script/interpreter/index.d.ts.map +1 -1
  89. package/dist/types/lib/bitcore/script/interpreter/interpreter.d.ts +86 -0
  90. package/dist/types/lib/bitcore/script/interpreter/interpreter.d.ts.map +1 -1
  91. package/dist/types/lib/bitcore/script/interpreter/script-num.d.ts +115 -0
  92. package/dist/types/lib/bitcore/script/interpreter/script-num.d.ts.map +1 -1
  93. package/dist/types/lib/bitcore/script/interpreter/types.d.ts +119 -0
  94. package/dist/types/lib/bitcore/script/interpreter/types.d.ts.map +1 -1
  95. package/dist/types/lib/bitcore/script/taproot.d.ts +297 -0
  96. package/dist/types/lib/bitcore/script/taproot.d.ts.map +1 -1
  97. package/dist/types/lib/bitcore/script.d.ts +510 -0
  98. package/dist/types/lib/bitcore/script.d.ts.map +1 -1
  99. package/dist/types/lib/bitcore/taproot/musig2.d.ts +153 -0
  100. package/dist/types/lib/bitcore/taproot/musig2.d.ts.map +1 -1
  101. package/dist/types/lib/bitcore/transaction/input/multisig.d.ts +8 -0
  102. package/dist/types/lib/bitcore/transaction/input/multisig.d.ts.map +1 -1
  103. package/dist/types/lib/bitcore/transaction/input/multisigscripthash.d.ts +8 -0
  104. package/dist/types/lib/bitcore/transaction/input/multisigscripthash.d.ts.map +1 -1
  105. package/dist/types/lib/bitcore/transaction/input/publickey.d.ts +8 -0
  106. package/dist/types/lib/bitcore/transaction/input/publickey.d.ts.map +1 -1
  107. package/dist/types/lib/bitcore/transaction/input/publickeyhash.d.ts +14 -0
  108. package/dist/types/lib/bitcore/transaction/input/publickeyhash.d.ts.map +1 -1
  109. package/dist/types/lib/bitcore/transaction/input/taproot.d.ts +22 -0
  110. package/dist/types/lib/bitcore/transaction/input/taproot.d.ts.map +1 -1
  111. package/dist/types/lib/bitcore/transaction/input.d.ts +418 -0
  112. package/dist/types/lib/bitcore/transaction/input.d.ts.map +1 -1
  113. package/dist/types/lib/bitcore/transaction/outpoint.d.ts +110 -0
  114. package/dist/types/lib/bitcore/transaction/outpoint.d.ts.map +1 -1
  115. package/dist/types/lib/bitcore/transaction/output.d.ts +83 -0
  116. package/dist/types/lib/bitcore/transaction/output.d.ts.map +1 -1
  117. package/dist/types/lib/bitcore/transaction/sighash.d.ts +69 -0
  118. package/dist/types/lib/bitcore/transaction/sighash.d.ts.map +1 -1
  119. package/dist/types/lib/bitcore/transaction/signature.d.ts +98 -0
  120. package/dist/types/lib/bitcore/transaction/signature.d.ts.map +1 -1
  121. package/dist/types/lib/bitcore/transaction/transaction.d.ts +379 -0
  122. package/dist/types/lib/bitcore/transaction/transaction.d.ts.map +1 -1
  123. package/dist/types/lib/bitcore/transaction/unspentoutput.d.ts +61 -0
  124. package/dist/types/lib/bitcore/transaction/unspentoutput.d.ts.map +1 -1
  125. package/dist/types/lib/bitcore/unit.d.ts +140 -0
  126. package/dist/types/lib/bitcore/unit.d.ts.map +1 -1
  127. package/dist/types/lib/bitcore/uri.d.ts +34 -0
  128. package/dist/types/lib/bitcore/uri.d.ts.map +1 -1
  129. package/dist/types/lib/bitcore/util/base32.d.ts +55 -0
  130. package/dist/types/lib/bitcore/util/base32.d.ts.map +1 -1
  131. package/dist/types/lib/bitcore/util/bits.d.ts +76 -0
  132. package/dist/types/lib/bitcore/util/bits.d.ts.map +1 -1
  133. package/dist/types/lib/bitcore/util/buffer.d.ts +135 -0
  134. package/dist/types/lib/bitcore/util/buffer.d.ts.map +1 -1
  135. package/dist/types/lib/bitcore/util/convertBits.d.ts +15 -0
  136. package/dist/types/lib/bitcore/util/convertBits.d.ts.map +1 -1
  137. package/dist/types/lib/bitcore/util/js.d.ts +19 -0
  138. package/dist/types/lib/bitcore/util/js.d.ts.map +1 -1
  139. package/dist/types/lib/bitcore/util/merkle.d.ts +85 -0
  140. package/dist/types/lib/bitcore/util/merkle.d.ts.map +1 -1
  141. package/dist/types/lib/bitcore/util/preconditions.d.ts +29 -0
  142. package/dist/types/lib/bitcore/util/preconditions.d.ts.map +1 -1
  143. package/dist/types/lib/bitcore/util.d.ts +7 -0
  144. package/dist/types/lib/bitcore/util.d.ts.map +1 -1
  145. package/dist/types/lib/bitcore/xaddress.d.ts +117 -0
  146. package/dist/types/lib/bitcore/xaddress.d.ts.map +1 -1
  147. package/dist/types/lib/lokad.d.ts +292 -0
  148. package/dist/types/lib/lokad.d.ts.map +1 -1
  149. package/dist/types/lib/nft.d.ts +434 -0
  150. package/dist/types/lib/nft.d.ts.map +1 -1
  151. package/dist/types/lib/rank/api.d.ts +13 -0
  152. package/dist/types/lib/rank/api.d.ts.map +1 -1
  153. package/dist/types/lib/rank/index.d.ts +153 -0
  154. package/dist/types/lib/rank/index.d.ts.map +1 -1
  155. package/dist/types/lib/rank/opcode.d.ts +6 -2
  156. package/dist/types/lib/rank/opcode.d.ts.map +1 -1
  157. package/dist/types/lib/rank/script.d.ts +10 -0
  158. package/dist/types/lib/rank/script.d.ts.map +1 -1
  159. package/dist/types/lib/rank/transaction.d.ts +11 -0
  160. package/dist/types/lib/rank/transaction.d.ts.map +1 -1
  161. package/dist/types/lib/rpc.d.ts +176 -0
  162. package/dist/types/lib/rpc.d.ts.map +1 -1
  163. package/dist/types/utils/constants.d.ts +27 -0
  164. package/dist/types/utils/constants.d.ts.map +1 -1
  165. package/dist/types/utils/env.d.ts +15 -0
  166. package/dist/types/utils/env.d.ts.map +1 -1
  167. package/dist/types/utils/string.d.ts +57 -0
  168. package/dist/types/utils/string.d.ts.map +1 -1
  169. package/dist/types/utils/wallet.d.ts +43 -1
  170. package/dist/types/utils/wallet.d.ts.map +1 -1
  171. package/package.json +1 -1
  172. package/tsconfig.types.json +2 -1
@@ -1,39 +1,68 @@
1
+ /**
2
+ * Copyright 2025-2026 The Lotusia Stewardship
3
+ * Github: https://github.com/LotusiaStewardship
4
+ * License: MIT
5
+ */
1
6
  import type { Buffer } from 'buffer/';
2
7
  import { Chunk } from './bitcore';
8
+ /** LOKAD protocol identifiers as UTF-8 strings */
3
9
  export type ScriptChunkLokadUTF8 = 'RANK' | 'RNKC' | 'RNKE';
10
+ /** RANK/RNKC platform identifiers as UTF-8 strings */
4
11
  export type ScriptChunkPlatformUTF8 = 'lotusia' | 'twitter';
12
+ /** RANK sentiment values as UTF-8 strings */
5
13
  export type ScriptChunkSentimentUTF8 = 'positive' | 'negative' | 'neutral';
14
+ /** Map of LOKAD integer values to UTF-8 protocol identifiers */
6
15
  export type ScriptChunkLokadMap = Map<number, ScriptChunkLokadUTF8>;
16
+ /** Map of platform integer values to UTF-8 platform identifiers */
7
17
  export type ScriptChunkPlatformMap = Map<number, ScriptChunkPlatformUTF8>;
18
+ /** Map of sentiment integer values to UTF-8 sentiment identifiers */
8
19
  export type ScriptChunkSentimentMap = Map<number, ScriptChunkSentimentUTF8>;
9
20
  export type ScriptChunkField = 'sentiment' | 'platform' | 'profileId' | 'postId' | 'comment' | 'postHash' | 'instanceId';
10
21
  export type ScriptChunk = {
22
+ /** Byte offset of the chunk in the output script */
11
23
  offset: number | null;
24
+ /** Byte length of the chunk in the output script */
12
25
  len: number | null;
26
+ /** Map of supported RANK script chunks */
13
27
  map?: ScriptChunkLokadMap | ScriptChunkPlatformMap | ScriptChunkSentimentMap;
14
28
  };
29
+ /** Required RNKC script chunks */
15
30
  export type ScriptChunksRNKC = {
16
31
  [name in Exclude<ScriptChunkField, 'sentiment' | 'postHash' | 'instanceId'>]: ScriptChunk;
17
32
  };
33
+ /** Required RANK script chunks */
18
34
  export type ScriptChunksRANK = {
19
35
  [name in Exclude<ScriptChunkField, 'comment' | 'postId' | 'postHash' | 'instanceId'>]: ScriptChunk;
20
36
  };
37
+ /** Optional RANK script chunks */
21
38
  export type ScriptChunksOptionalRANK = {
22
39
  [name in Extract<ScriptChunkField, 'postId' | 'postHash' | 'instanceId'>]: ScriptChunk;
23
40
  };
41
+ /** OP_RETURN \<RANK\> \<sentiment\> \<profileId\> [\<postId\> \<postHash\> [\<instanceId\>]] */
24
42
  export type TransactionOutputRANK = {
43
+ /** positive or negative sentiment (can support more) */
25
44
  sentiment: ScriptChunkSentimentUTF8;
45
+ /** e.g. Twitter/X.com, etc. */
26
46
  platform: ScriptChunkPlatformUTF8;
47
+ /** who the ranking is for */
27
48
  profileId: string;
49
+ /** optional post ID if ranking specific content */
28
50
  postId?: string;
29
51
  };
52
+ /** OP_RETURN \<RNKC\> \<platform\> \<profileId\> \<postId\> */
30
53
  export type TransactionOutputRNKC = {
54
+ /** outIdx 1 and 2 concatenated as comment data in UTF-8 encoding */
31
55
  data: Uint8Array;
56
+ /** Minimum fee rate for accepting RNKC transaction, in satoshis per byte */
32
57
  feeRate: number;
58
+ /** e.g. Twitter/X.com, etc. */
33
59
  inReplyToPlatform: ScriptChunkPlatformUTF8;
60
+ /** who the comment is replying to */
34
61
  inReplyToProfileId?: string;
62
+ /** ID of the post being replied to */
35
63
  inReplyToPostId?: string;
36
64
  };
65
+ /** Transaction data for the backend indexer */
37
66
  export type Transaction = {
38
67
  txid: string;
39
68
  outIdx: number;
@@ -44,8 +73,14 @@ export type Transaction = {
44
73
  height?: number;
45
74
  timestamp?: bigint;
46
75
  };
76
+ /** RANK transaction data for the backend indexer */
47
77
  export type TransactionRANK = TransactionOutputRANK & Transaction;
78
+ /** RNKC transaction data for the backend indexer */
48
79
  export type TransactionRNKC = TransactionOutputRNKC & Transaction;
80
+ /**
81
+ * Target entity being ranked by a RANK transaction, commented on by an
82
+ * RNKC transaction, etc. (e.g. Profile, Post, etc.)
83
+ */
49
84
  export type TargetEntity = {
50
85
  id: string;
51
86
  platform: string;
@@ -57,15 +92,41 @@ export type TargetEntity = {
57
92
  votesPositive: number;
58
93
  votesNegative: number;
59
94
  };
95
+ /**
96
+ * `IndexedTransactionRANK` objects are converted to a `ProfileMap` for database ops
97
+ *
98
+ * `string` is `profileId`
99
+ */
60
100
  export type ProfileMap = Map<string, Profile>;
61
101
  export type PostMap = Map<string, Post>;
102
+ /**
103
+ * Profile entity that can be ranked and contains associated posts
104
+ * @extends TargetEntity
105
+ */
62
106
  export interface Profile extends TargetEntity {
107
+ /** Map of posts associated with this profile, keyed by post ID */
63
108
  posts?: PostMap;
64
109
  }
110
+ /**
111
+ * Post entity that can be ranked and commented on
112
+ * @extends TargetEntity
113
+ */
65
114
  export interface Post extends TargetEntity {
115
+ /** The profile ID that owns this post */
66
116
  profileId: string;
117
+ /** If this post is a RNKC transaction, this contains the comment data for establishing relation to `RankComment` */
67
118
  data?: Uint8Array;
68
119
  }
120
+ /**
121
+ * Platform parameters for configuring profile and post ID validation
122
+ * @property profileId - Configuration for profile ID validation
123
+ * @property profileId.len - Maximum length of the profile ID in bytes
124
+ * @property profileId.regex - Regular expression for validating profile ID format
125
+ * @property postId - Configuration for post ID validation
126
+ * @property postId.len - Maximum length of the post ID in bytes
127
+ * @property postId.regex - Regular expression for validating post ID format
128
+ * @property postId.type - The type used to represent the post ID value
129
+ */
69
130
  export interface PlatformParameters {
70
131
  profileId: {
71
132
  len: number;
@@ -77,57 +138,288 @@ export interface PlatformParameters {
77
138
  type: 'BigInt' | 'Number' | 'String';
78
139
  };
79
140
  }
141
+ /** Map of LOKAD protocol byte values to their UTF-8 string identifiers */
80
142
  export declare const LOKAD_PREFIX_RANK = 1380011595;
81
143
  export declare const LOKAD_PREFIX_RNKC = 1380862787;
82
144
  export declare const LOKAD_PREFIX_RNKE = 1380862789;
145
+ /** LOKAD chunk map */
83
146
  export declare const SCRIPT_CHUNK_LOKAD: ScriptChunkLokadMap;
147
+ /** Sentiment value for neutral ranking (OP_16) */
84
148
  export declare const RANK_SENTIMENT_NEUTRAL = 96;
149
+ /** Sentiment value for positive ranking (OP_1) */
85
150
  export declare const RANK_SENTIMENT_POSITIVE = 81;
151
+ /** Sentiment value for negative ranking (OP_0) */
86
152
  export declare const RANK_SENTIMENT_NEGATIVE = 0;
153
+ /** Sentiment chunk map */
87
154
  export declare const SCRIPT_CHUNK_SENTIMENT: ScriptChunkSentimentMap;
155
+ /** Sentiment op code map */
88
156
  export declare const RANK_SENTIMENT_OP_CODES: Map<ScriptChunkSentimentUTF8, string>;
157
+ /** Platform chunk map */
89
158
  export declare const SCRIPT_CHUNK_PLATFORM: ScriptChunkPlatformMap;
159
+ /** Required RANK Comment script chunks */
90
160
  export declare const ScriptChunksRNKCMap: Map<keyof ScriptChunksRNKC, ScriptChunk>;
161
+ /** Length of the required RANK script chunks in bytes */
91
162
  export declare const RANK_SCRIPT_REQUIRED_LENGTH = 10;
163
+ /** Required RANK script chunks */
92
164
  export declare const ScriptChunksRANKMap: Map<keyof ScriptChunksRANK, ScriptChunk>;
165
+ /**
166
+ * Optional RANK script chunks for extended functionality
167
+ * These chunks are not required for basic RANK transactions but enable
168
+ * additional features like ranking specific posts or tracking extension instances
169
+ */
93
170
  export declare const ScriptChunksOptionalRANKMap: Map<keyof ScriptChunksOptionalRANK, ScriptChunk>;
171
+ /**
172
+ * Platform configuration map for RANK protocol
173
+ *
174
+ * Maps platform identifiers to their validation parameters for profile IDs and post IDs.
175
+ * Each platform has specific requirements for ID formats, lengths, and types.
176
+ *
177
+ * @example
178
+ * ```typescript
179
+ * const lotusiaConfig = PlatformConfiguration.get('lotusia')
180
+ * // { profileId: { len: 33, regex: /^[0-9a-fA-F]{40,66}$/ }, postId: { len: 32, regex: /^[0-9a-f]{64}$/, type: 'String' } }
181
+ * ```
182
+ *
183
+ * @see {@link PlatformParameters} for the structure of platform configuration
184
+ * @see {@link ScriptChunkPlatformUTF8} for supported platform identifiers
185
+ */
94
186
  export declare const PlatformConfiguration: Map<ScriptChunkPlatformUTF8, PlatformParameters>;
187
+ /**
188
+ * Check provided script for OP_RETURN op code
189
+ * @param script - The script to check, as a `Buffer` or hex `string`
190
+ * @returns true if the output is an OP_RETURN, false otherwise
191
+ */
95
192
  export declare function isOpReturn(script: Buffer | string): boolean;
193
+ /**
194
+ * Convert the profile ID to a buffer
195
+ * @param platform - The platform to convert the profile ID for
196
+ * @param profileId - The profile ID to convert
197
+ * @returns The profile ID buffer
198
+ */
96
199
  export declare function toProfileIdBuf(platform: ScriptChunkPlatformUTF8, profileId: string): Buffer | null;
200
+ /**
201
+ * Convert the `OP_RETURN` profile name back to UTF-8 with null bytes removed
202
+ * @param profileIdBuf - The profile ID buffer to convert, padded with null bytes
203
+ * @returns The UTF-8 profile ID
204
+ */
97
205
  export declare function toProfileIdUTF8(profileIdBuf: Buffer): string;
206
+ /**
207
+ * Convert the post ID to a buffer
208
+ * @param platform - The platform to convert the post ID for
209
+ * @param postId - The post ID to convert
210
+ * @returns The post ID buffer
211
+ */
98
212
  export declare function toPostIdBuf(platform: ScriptChunkPlatformUTF8, postId: string): Buffer | undefined;
213
+ /**
214
+ * Convert the UTF-8 platform name to the defined 1-byte platform hex code
215
+ * @param platform
216
+ * @returns
217
+ */
99
218
  export declare function toPlatformBuf(platform: ScriptChunkPlatformUTF8): Buffer | undefined;
219
+ /**
220
+ * Convert the defined 1-byte platform hex code to the UTF-8 platform name
221
+ * @param platformBuf
222
+ */
100
223
  export declare function toPlatformUTF8(platformBuf: Buffer): ScriptChunkPlatformUTF8 | undefined;
224
+ /**
225
+ * Convert the UTF-8 sentiment name to the defined 1-byte OP code
226
+ * @param sentiment
227
+ * @returns
228
+ */
101
229
  export declare function toSentimentOpCode(sentiment: ScriptChunkSentimentUTF8): string | undefined;
230
+ /**
231
+ * Convert the defined 1-byte sentiment OP code to the UTF-8 sentiment name
232
+ * @param sentimentBuf
233
+ */
102
234
  export declare function toSentimentUTF8(sentimentBuf: Buffer): ScriptChunkSentimentUTF8 | undefined;
235
+ /**
236
+ * Convert the comment buffer to a UTF-8 string
237
+ * @param commentBuf - The comment buffer to convert
238
+ * @returns The UTF-8 string
239
+ */
103
240
  export declare function toCommentUTF8(commentBuf: Buffer | Uint8Array): string | undefined;
241
+ /**
242
+ * Check if a script chunk contains a valid LOKAD identifier
243
+ * @param scriptChunk - The script chunk to validate
244
+ * @param lokadType - Optional specific LOKAD type to validate against
245
+ * @returns `true` if the chunk contains a valid 4-byte LOKAD identifier, `false` otherwise
246
+ */
104
247
  export declare function isValidLokad(scriptChunk: Chunk, lokadType?: ScriptChunkLokadUTF8): boolean;
248
+ /**
249
+ * Parse a RANK script buffer into a structured TransactionOutputRANK object
250
+ *
251
+ * Decodes the RANK protocol script format:
252
+ * OP_RETURN <RANK> <sentiment> <platform> <profileId> [<postId>]
253
+ *
254
+ * @param scriptBuf - The script buffer or hex string to parse
255
+ * @returns The parsed RANK transaction output data
256
+ * @throws Error if the script is not a valid OP_RETURN
257
+ * @throws Error if the LOKAD identifier is invalid or not RANK
258
+ * @throws Error if sentiment, platform, or profileId chunks are invalid
259
+ * @throws Error if profileId doesn't match the platform's regex pattern
260
+ * @throws Error if postId is present but invalid for the platform
261
+ *
262
+ * @example
263
+ * ```typescript
264
+ * const rankData = fromScriptRANK(scriptBuffer)
265
+ * console.log(rankData.sentiment) // 'positive'
266
+ * console.log(rankData.platform) // 'lotusia'
267
+ * console.log(rankData.profileId) // '0x...'
268
+ * console.log(rankData.postId) // optional
269
+ * ```
270
+ */
105
271
  export declare function fromScriptRANK(scriptBuf: Buffer | string): TransactionOutputRANK;
272
+ /**
273
+ * Create a hex-encoded RANK script from the given parameters
274
+ *
275
+ * The RANK script follows the format:
276
+ * OP_RETURN <RANK> <sentiment> <platform> <profileId> [<postId>]
277
+ *
278
+ * @param sentiment - The sentiment to express: 'positive', 'negative', or 'neutral'
279
+ * @param platform - The platform identifier: 'lotusia' or 'twitter'
280
+ * @param profileId - The profile ID to rank (script payload for lotusia, username for twitter)
281
+ * @param postId - Optional post ID to rank a specific post instead of the profile
282
+ * @returns The hex-encoded RANK script as a `Buffer`
283
+ * @throws Error if sentiment, platform, or profileId is not specified
284
+ * @throws Error if the platform specification is not defined
285
+ * @throws Error if postId is provided but the platform doesn't support post ranking
286
+ */
106
287
  export declare function toScriptRANK(sentiment: ScriptChunkSentimentUTF8, platform: ScriptChunkPlatformUTF8, profileId: string, postId?: string): Buffer;
288
+ /**
289
+ * Parse a RNKC script buffer into a structured TransactionOutputRNKC object
290
+ *
291
+ * Decodes the RNKC protocol script format:
292
+ * OP_RETURN <RNKC> <platform> <profileId> [<postId>]
293
+ * OP_RETURN <comment_data_part1>
294
+ * [OP_RETURN <comment_data_part2>]
295
+ *
296
+ * @param scriptBuf - The main RNKC script buffer or hex string (output index 0)
297
+ * @param supplementalScriptBufs - Additional OP_RETURN scripts containing comment data
298
+ * @param burnedSats - The amount of satoshis burned for this transaction
299
+ * @param options - Optional validation parameters
300
+ * @param options.minDataLength - Minimum required comment data length (default: RNKC_MIN_DATA_LENGTH)
301
+ * @param options.minFeeRate - Minimum required fee rate per byte (default: RNKC_MIN_FEE_RATE)
302
+ * @returns The parsed RNKC transaction output data
303
+ * @throws Error if the script is not a valid OP_RETURN
304
+ * @throws Error if the LOKAD chunk is invalid or unsupported
305
+ * @throws Error if the platform is invalid or unsupported
306
+ * @throws Error if the profileId format is invalid for the platform
307
+ * @throws Error if the postId format is invalid for the platform
308
+ * @throws Error if no comment data is found in supplemental scripts
309
+ * @throws Error if comment data length is below minimum
310
+ * @throws Error if fee rate is too low
311
+ */
107
312
  export declare function fromScriptRNKC(scriptBuf: Buffer | string, supplementalScriptBufs: (Buffer | string)[], burnedSats: number | bigint, options?: {
108
313
  minDataLength: number;
109
314
  minFeeRate: number;
110
315
  }): TransactionOutputRNKC;
316
+ /**
317
+ * Create hex-encoded RANK Comment (RNKC) scripts from the given parameters
318
+ *
319
+ * RNKC is used to post comments on ranked content. The protocol requires
320
+ * multiple output scripts: the first contains the RNKC header with platform,
321
+ * profile, and optional post identifiers, while subsequent outputs contain
322
+ * the comment data (split across 1-2 outputs if needed).
323
+ *
324
+ * The RNKC script format is:
325
+ * Output 0: OP_RETURN <RNKC> <platform> <profileId> [<postId>]
326
+ * Output 1: OP_RETURN <comment_part1>
327
+ * Output 2 (optional): OP_RETURN <comment_part2>
328
+ *
329
+ * @param platform - The platform identifier: 'lotusia' or 'twitter'
330
+ * @param profileId - The profile ID to comment on (script payload for lotusia, username for twitter)
331
+ * @param postId - Optional post ID to comment on a specific post
332
+ * @param comment - The comment text (UTF-8 encoded, max 2x MAX_OP_RETURN_DATA bytes)
333
+ * @returns Array of hex-encoded RNKC scripts as `Buffer` objects
334
+ * @throws Error if platform or profileId is not specified
335
+ * @throws Error if the platform specification is not defined
336
+ * @throws Error if profileId doesn't match the platform's regex pattern
337
+ * @throws Error if postId is provided but doesn't match the platform's regex pattern
338
+ * @throws Error if comment length is outside valid range (1 to MAX_OP_RETURN_DATA * 2 bytes)
339
+ *
340
+ * @example
341
+ * ```typescript
342
+ * const scripts = toScriptRNKC({
343
+ * platform: 'twitter',
344
+ * profileId: 'username',
345
+ * postId: '1234567890',
346
+ * comment: 'Great post!'
347
+ * })
348
+ * // Returns array of Buffer objects for each output script
349
+ * ```
350
+ *
351
+ * @see {@link toScriptRANK} for ranking without comments
352
+ * @see {@link ScriptProcessor.processScriptRNKC} for parsing RNKC scripts
353
+ */
111
354
  export declare function toScriptRNKC({ platform, profileId, postId, comment, }: {
112
355
  platform: ScriptChunkPlatformUTF8;
113
356
  profileId: string;
114
357
  postId?: string;
115
358
  comment: string;
116
359
  }): Buffer[];
360
+ /**
361
+ * Processor for defined LOKAD protocols (RANK, RNKC, etc.)
362
+ * @param script - The script to process, as a `Buffer`
363
+ * @deprecated Use the individual LOKAD `from` functions instead (e.g. `fromScriptRANK`, `fromScriptRNKC`, etc.)
364
+ */
117
365
  export declare class ScriptProcessor {
118
366
  private chunks;
367
+ /** The script to process, as a `Buffer` */
119
368
  private script;
369
+ /** Supplemental scripts, e.g. outIdx 1 and/or 2 for RNKC */
120
370
  private supplementalScripts;
121
371
  constructor(script: Buffer);
372
+ /**
373
+ * Add a supplemental OP_RETURN script to the processor
374
+ * @param script - The script to add, as a `Buffer`
375
+ * @returns true if the script was added, false otherwise
376
+ */
122
377
  addScript(script: string | Buffer): boolean;
378
+ /**
379
+ * Get the LOKAD type from the script
380
+ * @returns The LOKAD type or undefined if invalid
381
+ */
123
382
  get lokadType(): ScriptChunkLokadUTF8 | undefined;
383
+ /**
384
+ * Process the LOKAD chunk
385
+ * @returns The LOKAD value or undefined if invalid
386
+ */
124
387
  private processLokad;
388
+ /**
389
+ * Process the sentiment chunk (RANK)
390
+ * @returns The sentiment value or undefined if invalid
391
+ */
125
392
  private processSentiment;
393
+ /**
394
+ * Process the platform chunk
395
+ * @returns The platform value or undefined if invalid
396
+ */
126
397
  private processPlatform;
398
+ /**
399
+ * Process the profileId chunk
400
+ * @returns The profileId value or undefined if invalid
401
+ */
127
402
  private processProfileId;
403
+ /**
404
+ * Process the postId chunk
405
+ * @returns The postId value or undefined if invalid
406
+ */
128
407
  private processPostId;
408
+ /**
409
+ * Process the RNKC comment chunks (outIdx 1 and 2)
410
+ * @param scripts - outIdx 1 and 2 scripts, if outIdx 0 is RNKC
411
+ * @returns The comment value or null if invalid
412
+ */
129
413
  private processComment;
414
+ /**
415
+ * Validate the required RANK chunks and store the processed output
416
+ * @returns true if all required chunks are valid, false otherwise
417
+ */
130
418
  processScriptRANK(): TransactionOutputRANK | null;
419
+ /**
420
+ * Validate the required RNKC chunks and store the processed output
421
+ * @returns true if all required chunks are valid, false otherwise
422
+ */
131
423
  processScriptRNKC(burnedSats: number | bigint, options?: {
132
424
  minDataLength: number;
133
425
  minFeeRate: number;
@@ -1 +1 @@
1
- {"version":3,"file":"lokad.d.ts","sourceRoot":"","sources":["../../../lib/lokad.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AACrC,OAAO,EAAc,KAAK,EAAkB,MAAM,WAAW,CAAA;AAY7D,MAAM,MAAM,oBAAoB,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAA;AAE3D,MAAM,MAAM,uBAAuB,GAAG,SAAS,GAAG,SAAS,CAAA;AAE3D,MAAM,MAAM,wB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