@sip-protocol/sdk 0.1.9 → 0.2.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/LICENSE +21 -0
- package/dist/browser.d.mts +2 -0
- package/dist/browser.d.ts +2 -0
- package/dist/browser.js +12925 -0
- package/dist/browser.mjs +1037 -0
- package/dist/chunk-4VJHI66K.mjs +12120 -0
- package/dist/chunk-O4Y2ZUDL.mjs +12721 -0
- package/dist/index.d.mts +800 -91
- package/dist/index.d.ts +800 -91
- package/dist/index.js +1137 -266
- package/dist/index.mjs +260 -11114
- package/package.json +20 -14
- package/src/adapters/near-intents.ts +138 -30
- package/src/browser.ts +35 -0
- package/src/commitment.ts +4 -4
- package/src/index.ts +72 -0
- package/src/oracle/index.ts +12 -0
- package/src/oracle/serialization.ts +237 -0
- package/src/oracle/types.ts +257 -0
- package/src/oracle/verification.ts +257 -0
- package/src/proofs/browser-utils.ts +141 -0
- package/src/proofs/browser.ts +884 -0
- package/src/proofs/index.ts +19 -1
- package/src/stealth.ts +868 -12
- package/src/validation.ts +7 -0
package/src/validation.ts
CHANGED
|
@@ -131,6 +131,13 @@ export function isValidCompressedPublicKey(key: string): boolean {
|
|
|
131
131
|
return prefix === '02' || prefix === '03'
|
|
132
132
|
}
|
|
133
133
|
|
|
134
|
+
/**
|
|
135
|
+
* Check if a public key is valid ed25519 (32 bytes)
|
|
136
|
+
*/
|
|
137
|
+
export function isValidEd25519PublicKey(key: string): boolean {
|
|
138
|
+
return isValidHexLength(key, 32)
|
|
139
|
+
}
|
|
140
|
+
|
|
134
141
|
/**
|
|
135
142
|
* Check if a private key is valid (32 bytes)
|
|
136
143
|
*/
|