@sip-protocol/sdk 0.2.0 → 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/dist/browser.d.mts +1 -1
- package/dist/browser.d.ts +1 -1
- package/dist/browser.js +944 -944
- package/dist/browser.mjs +607 -2
- package/dist/chunk-4VJHI66K.mjs +12120 -0
- package/dist/index.d.mts +39 -39
- package/dist/index.d.ts +39 -39
- package/dist/index.js +3 -608
- package/dist/index.mjs +1 -3
- package/package.json +1 -4
- package/src/browser.ts +4 -2
- package/src/index.ts +3 -2
- package/src/proofs/index.ts +10 -6
package/dist/index.d.mts
CHANGED
|
@@ -824,6 +824,44 @@ declare class NoirProofProvider implements ProofProvider {
|
|
|
824
824
|
private getPublicKeyFromField;
|
|
825
825
|
}
|
|
826
826
|
|
|
827
|
+
/**
|
|
828
|
+
* Browser-compatible utilities for proof generation
|
|
829
|
+
*
|
|
830
|
+
* These utilities replace Node.js-specific functions (like Buffer)
|
|
831
|
+
* with browser-compatible alternatives using Web APIs.
|
|
832
|
+
*
|
|
833
|
+
* @module proofs/browser-utils
|
|
834
|
+
*/
|
|
835
|
+
/**
|
|
836
|
+
* Convert hex string to Uint8Array (browser-compatible)
|
|
837
|
+
*/
|
|
838
|
+
declare function hexToBytes(hex: string): Uint8Array;
|
|
839
|
+
/**
|
|
840
|
+
* Convert Uint8Array to hex string (browser-compatible)
|
|
841
|
+
*/
|
|
842
|
+
declare function bytesToHex(bytes: Uint8Array): string;
|
|
843
|
+
/**
|
|
844
|
+
* Check if running in browser environment
|
|
845
|
+
*/
|
|
846
|
+
declare function isBrowser(): boolean;
|
|
847
|
+
/**
|
|
848
|
+
* Check if Web Workers are available
|
|
849
|
+
*/
|
|
850
|
+
declare function supportsWebWorkers(): boolean;
|
|
851
|
+
/**
|
|
852
|
+
* Check if SharedArrayBuffer is available (required for some WASM operations)
|
|
853
|
+
*/
|
|
854
|
+
declare function supportsSharedArrayBuffer(): boolean;
|
|
855
|
+
/**
|
|
856
|
+
* Get browser info for diagnostics
|
|
857
|
+
*/
|
|
858
|
+
declare function getBrowserInfo(): {
|
|
859
|
+
isBrowser: boolean;
|
|
860
|
+
supportsWorkers: boolean;
|
|
861
|
+
supportsSharedArrayBuffer: boolean;
|
|
862
|
+
userAgent: string | null;
|
|
863
|
+
};
|
|
864
|
+
|
|
827
865
|
/**
|
|
828
866
|
* Browser Noir Proof Provider
|
|
829
867
|
*
|
|
@@ -999,44 +1037,6 @@ declare class BrowserNoirProvider implements ProofProvider {
|
|
|
999
1037
|
private getPublicKeyCoordinates;
|
|
1000
1038
|
}
|
|
1001
1039
|
|
|
1002
|
-
/**
|
|
1003
|
-
* Browser-compatible utilities for proof generation
|
|
1004
|
-
*
|
|
1005
|
-
* These utilities replace Node.js-specific functions (like Buffer)
|
|
1006
|
-
* with browser-compatible alternatives using Web APIs.
|
|
1007
|
-
*
|
|
1008
|
-
* @module proofs/browser-utils
|
|
1009
|
-
*/
|
|
1010
|
-
/**
|
|
1011
|
-
* Convert hex string to Uint8Array (browser-compatible)
|
|
1012
|
-
*/
|
|
1013
|
-
declare function hexToBytes(hex: string): Uint8Array;
|
|
1014
|
-
/**
|
|
1015
|
-
* Convert Uint8Array to hex string (browser-compatible)
|
|
1016
|
-
*/
|
|
1017
|
-
declare function bytesToHex(bytes: Uint8Array): string;
|
|
1018
|
-
/**
|
|
1019
|
-
* Check if running in browser environment
|
|
1020
|
-
*/
|
|
1021
|
-
declare function isBrowser(): boolean;
|
|
1022
|
-
/**
|
|
1023
|
-
* Check if Web Workers are available
|
|
1024
|
-
*/
|
|
1025
|
-
declare function supportsWebWorkers(): boolean;
|
|
1026
|
-
/**
|
|
1027
|
-
* Check if SharedArrayBuffer is available (required for some WASM operations)
|
|
1028
|
-
*/
|
|
1029
|
-
declare function supportsSharedArrayBuffer(): boolean;
|
|
1030
|
-
/**
|
|
1031
|
-
* Get browser info for diagnostics
|
|
1032
|
-
*/
|
|
1033
|
-
declare function getBrowserInfo(): {
|
|
1034
|
-
isBrowser: boolean;
|
|
1035
|
-
supportsWorkers: boolean;
|
|
1036
|
-
supportsSharedArrayBuffer: boolean;
|
|
1037
|
-
userAgent: string | null;
|
|
1038
|
-
};
|
|
1039
|
-
|
|
1040
1040
|
/**
|
|
1041
1041
|
* Options for creating a shielded intent
|
|
1042
1042
|
*/
|
|
@@ -6041,4 +6041,4 @@ declare function createMockLedgerAdapter(config: Omit<MockHardwareConfig, 'devic
|
|
|
6041
6041
|
*/
|
|
6042
6042
|
declare function createMockTrezorAdapter(config: Omit<MockHardwareConfig, 'deviceType'>): MockTrezorAdapter;
|
|
6043
6043
|
|
|
6044
|
-
export { ATTESTATION_VERSION, type AttestationRequest, type AttestationResult,
|
|
6044
|
+
export { ATTESTATION_VERSION, type AttestationRequest, type AttestationResult, BrowserNoirProvider as B, BaseWalletAdapter, type BrowserNoirProviderConfig, CHAIN_NUMERIC_IDS, type CommitmentPoint, ComplianceManager, type CreateIntentOptions, type CreatePaymentOptions, CryptoError, DEFAULT_THRESHOLD, DEFAULT_TOTAL_ORACLES, DerivationPath, type EIP1193ConnectInfo, type EIP1193Event, type EIP1193Provider, type EIP1193ProviderRpcError, type EIP1193RequestArguments, type EIP712Domain, type EIP712TypeDefinition, type EIP712TypedData, type EIP712Types, EncryptionNotImplementedError, ErrorCode, type EthereumAdapterConfig, EthereumChainId, type EthereumChainIdType, type EthereumChainMetadata, type EthereumTokenMetadata, type EthereumTransactionReceipt, type EthereumTransactionRequest, EthereumWalletAdapter, type EthereumWalletName, type ExportedViewingKey, type FulfillmentProofParams, type FundingProofParams, type HardwareAccount, type HardwareConnectionStatus, type HardwareDeviceInfo, HardwareErrorCode, type HardwareErrorCodeType, type HardwareEthereumTx, type HardwareSignRequest, type HardwareSignature, type HardwareTransport, type HardwareWalletConfig, HardwareWalletError, type HardwareWalletType, IntentBuilder, IntentError, type LedgerConfig, type LedgerModel, LedgerWalletAdapter, MockEthereumAdapter, type MockEthereumAdapterConfig, type MockHardwareConfig, MockLedgerAdapter, MockProofProvider, MockSolanaAdapter, type MockSolanaAdapterConfig, MockSolver, type MockSolverConfig, MockTrezorAdapter, MockWalletAdapter, NEARIntentsAdapter, type NEARIntentsAdapterConfig, NetworkError, NoirProofProvider, type NoirProviderConfig, ORACLE_DOMAIN, OneClickClient, type OracleAttestation, type OracleAttestationMessage, type OracleId, type OracleInfo, type OracleRegistry, type OracleRegistryConfig, type OracleSignature, type OracleStatus, PaymentBuilder, type PedersenCommitment, type PreparedSwap, type PrivacyConfig, type ProductionQuote, ProofError, type ProofFramework, ProofGenerationError, ProofNotImplementedError, type ProofProgressCallback, type ProofProvider, type ProofResult, type ReceivedNote, SIP, type SIPConfig, SIPError, STABLECOIN_ADDRESSES, STABLECOIN_DECIMALS, STABLECOIN_INFO, type SerializedError, type ShieldedBalance, type ShieldedSendParams, type ShieldedSendResult, type SignedOracleAttestation, type SolanaAdapterConfig, type SolanaCluster, type SolanaConnection, type SolanaPublicKey, type SolanaSendOptions, type SolanaSignature, type SolanaTransaction, type SolanaUnsignedTransaction, type SolanaVersionedTransaction, SolanaWalletAdapter, type SolanaWalletName, type SolanaWalletProvider, type StablecoinInfo, type StealthCurve, type SwapRequest, type SwapResult, type TransactionData, type TransportType, Treasury, type TrezorConfig, type TrezorModel, TrezorWalletAdapter, ValidationError, type ValidityProofParams, type VerificationResult, type WalletAdapter, WalletError, ZcashRPCClient, ZcashRPCError, ZcashShieldedService, type ZcashShieldedServiceConfig, addBlindings, addCommitments, addOracle, attachProofs, base58ToHex, bytesToHex as browserBytesToHex, hexToBytes as browserHexToBytes, checkEd25519StealthAddress, checkStealthAddress, commit, commitZero, computeAttestationHash, createCommitment, createEthereumAdapter, createLedgerAdapter, createMockEthereumAdapter, createMockEthereumProvider, createMockLedgerAdapter, createMockSolanaAdapter, createMockSolanaConnection, createMockSolanaProvider, createMockSolver, createMockTrezorAdapter, createNEARIntentsAdapter, createOracleRegistry, createProductionSIP, createSIP, createShieldedIntent, createShieldedPayment, createSolanaAdapter, createTrezorAdapter, createWalletFactory, createZcashClient, createZcashShieldedService, decodeStealthMetaAddress, decryptMemo, decryptWithViewing, deriveEd25519StealthPrivateKey, deriveOracleId, deriveStealthPrivateKey, deriveViewingKey, deserializeAttestationMessage, deserializeIntent, deserializePayment, detectEthereumWallets, detectSolanaWallets, ed25519PublicKeyToNearAddress, ed25519PublicKeyToSolanaAddress, encodeStealthMetaAddress, encryptForViewing, featureNotSupportedError, formatStablecoinAmount, fromHex, fromStablecoinUnits, generateBlinding, generateEd25519StealthAddress, generateEd25519StealthMetaAddress, generateIntentId, generateRandomBytes, generateStealthAddress, generateStealthMetaAddress, generateViewingKey, getActiveOracles, getAvailableTransports, getBrowserInfo, getChainNumericId, getChainsForStablecoin, getCurveForChain, getDefaultRpcEndpoint, getDerivationPath, getErrorMessage, getEthereumProvider, getGenerators, getIntentSummary, getPaymentSummary, getPaymentTimeRemaining, getPrivacyConfig, getPrivacyDescription, getSolanaProvider, getStablecoin, getStablecoinInfo, getStablecoinsForChain, getSupportedStablecoins, getTimeRemaining, hasEnoughOracles, hasErrorCode, hasRequiredProofs, hash, hexToNumber, isBrowser, isEd25519Chain, isExpired, isNonNegativeAmount, isPaymentExpired, isPrivateWalletAdapter, isSIPError, isStablecoin, isStablecoinOnChain, isValidAmount, isValidChainId, isValidCompressedPublicKey, isValidEd25519PublicKey, isValidHex, isValidHexLength, isValidNearAccountId, isValidNearImplicitAddress, isValidPrivacyLevel, isValidPrivateKey, isValidScalar, isValidSlippage, isValidSolanaAddress, isValidStealthMetaAddress, nearAddressToEd25519PublicKey, normalizeAddress, notConnectedError, publicKeyToEthAddress, registerWallet, removeOracle, secureWipe, secureWipeAll, serializeAttestationMessage, serializeIntent, serializePayment, signAttestationMessage, solanaAddressToEd25519PublicKey, solanaPublicKeyToHex, subtractBlindings, subtractCommitments, supportsSharedArrayBuffer, supportsWebBluetooth, supportsWebHID, supportsWebUSB, supportsWebWorkers, toHex, toStablecoinUnits, trackIntent, trackPayment, updateOracleStatus, validateAsset, validateCreateIntentParams, validateIntentInput, validateIntentOutput, validateScalar, validateViewingKey, verifyAttestation, verifyCommitment, verifyOpening, verifyOracleSignature, walletRegistry, withSecureBuffer, withSecureBufferSync, wrapError };
|
package/dist/index.d.ts
CHANGED
|
@@ -824,6 +824,44 @@ declare class NoirProofProvider implements ProofProvider {
|
|
|
824
824
|
private getPublicKeyFromField;
|
|
825
825
|
}
|
|
826
826
|
|
|
827
|
+
/**
|
|
828
|
+
* Browser-compatible utilities for proof generation
|
|
829
|
+
*
|
|
830
|
+
* These utilities replace Node.js-specific functions (like Buffer)
|
|
831
|
+
* with browser-compatible alternatives using Web APIs.
|
|
832
|
+
*
|
|
833
|
+
* @module proofs/browser-utils
|
|
834
|
+
*/
|
|
835
|
+
/**
|
|
836
|
+
* Convert hex string to Uint8Array (browser-compatible)
|
|
837
|
+
*/
|
|
838
|
+
declare function hexToBytes(hex: string): Uint8Array;
|
|
839
|
+
/**
|
|
840
|
+
* Convert Uint8Array to hex string (browser-compatible)
|
|
841
|
+
*/
|
|
842
|
+
declare function bytesToHex(bytes: Uint8Array): string;
|
|
843
|
+
/**
|
|
844
|
+
* Check if running in browser environment
|
|
845
|
+
*/
|
|
846
|
+
declare function isBrowser(): boolean;
|
|
847
|
+
/**
|
|
848
|
+
* Check if Web Workers are available
|
|
849
|
+
*/
|
|
850
|
+
declare function supportsWebWorkers(): boolean;
|
|
851
|
+
/**
|
|
852
|
+
* Check if SharedArrayBuffer is available (required for some WASM operations)
|
|
853
|
+
*/
|
|
854
|
+
declare function supportsSharedArrayBuffer(): boolean;
|
|
855
|
+
/**
|
|
856
|
+
* Get browser info for diagnostics
|
|
857
|
+
*/
|
|
858
|
+
declare function getBrowserInfo(): {
|
|
859
|
+
isBrowser: boolean;
|
|
860
|
+
supportsWorkers: boolean;
|
|
861
|
+
supportsSharedArrayBuffer: boolean;
|
|
862
|
+
userAgent: string | null;
|
|
863
|
+
};
|
|
864
|
+
|
|
827
865
|
/**
|
|
828
866
|
* Browser Noir Proof Provider
|
|
829
867
|
*
|
|
@@ -999,44 +1037,6 @@ declare class BrowserNoirProvider implements ProofProvider {
|
|
|
999
1037
|
private getPublicKeyCoordinates;
|
|
1000
1038
|
}
|
|
1001
1039
|
|
|
1002
|
-
/**
|
|
1003
|
-
* Browser-compatible utilities for proof generation
|
|
1004
|
-
*
|
|
1005
|
-
* These utilities replace Node.js-specific functions (like Buffer)
|
|
1006
|
-
* with browser-compatible alternatives using Web APIs.
|
|
1007
|
-
*
|
|
1008
|
-
* @module proofs/browser-utils
|
|
1009
|
-
*/
|
|
1010
|
-
/**
|
|
1011
|
-
* Convert hex string to Uint8Array (browser-compatible)
|
|
1012
|
-
*/
|
|
1013
|
-
declare function hexToBytes(hex: string): Uint8Array;
|
|
1014
|
-
/**
|
|
1015
|
-
* Convert Uint8Array to hex string (browser-compatible)
|
|
1016
|
-
*/
|
|
1017
|
-
declare function bytesToHex(bytes: Uint8Array): string;
|
|
1018
|
-
/**
|
|
1019
|
-
* Check if running in browser environment
|
|
1020
|
-
*/
|
|
1021
|
-
declare function isBrowser(): boolean;
|
|
1022
|
-
/**
|
|
1023
|
-
* Check if Web Workers are available
|
|
1024
|
-
*/
|
|
1025
|
-
declare function supportsWebWorkers(): boolean;
|
|
1026
|
-
/**
|
|
1027
|
-
* Check if SharedArrayBuffer is available (required for some WASM operations)
|
|
1028
|
-
*/
|
|
1029
|
-
declare function supportsSharedArrayBuffer(): boolean;
|
|
1030
|
-
/**
|
|
1031
|
-
* Get browser info for diagnostics
|
|
1032
|
-
*/
|
|
1033
|
-
declare function getBrowserInfo(): {
|
|
1034
|
-
isBrowser: boolean;
|
|
1035
|
-
supportsWorkers: boolean;
|
|
1036
|
-
supportsSharedArrayBuffer: boolean;
|
|
1037
|
-
userAgent: string | null;
|
|
1038
|
-
};
|
|
1039
|
-
|
|
1040
1040
|
/**
|
|
1041
1041
|
* Options for creating a shielded intent
|
|
1042
1042
|
*/
|
|
@@ -6041,4 +6041,4 @@ declare function createMockLedgerAdapter(config: Omit<MockHardwareConfig, 'devic
|
|
|
6041
6041
|
*/
|
|
6042
6042
|
declare function createMockTrezorAdapter(config: Omit<MockHardwareConfig, 'deviceType'>): MockTrezorAdapter;
|
|
6043
6043
|
|
|
6044
|
-
export { ATTESTATION_VERSION, type AttestationRequest, type AttestationResult,
|
|
6044
|
+
export { ATTESTATION_VERSION, type AttestationRequest, type AttestationResult, BrowserNoirProvider as B, BaseWalletAdapter, type BrowserNoirProviderConfig, CHAIN_NUMERIC_IDS, type CommitmentPoint, ComplianceManager, type CreateIntentOptions, type CreatePaymentOptions, CryptoError, DEFAULT_THRESHOLD, DEFAULT_TOTAL_ORACLES, DerivationPath, type EIP1193ConnectInfo, type EIP1193Event, type EIP1193Provider, type EIP1193ProviderRpcError, type EIP1193RequestArguments, type EIP712Domain, type EIP712TypeDefinition, type EIP712TypedData, type EIP712Types, EncryptionNotImplementedError, ErrorCode, type EthereumAdapterConfig, EthereumChainId, type EthereumChainIdType, type EthereumChainMetadata, type EthereumTokenMetadata, type EthereumTransactionReceipt, type EthereumTransactionRequest, EthereumWalletAdapter, type EthereumWalletName, type ExportedViewingKey, type FulfillmentProofParams, type FundingProofParams, type HardwareAccount, type HardwareConnectionStatus, type HardwareDeviceInfo, HardwareErrorCode, type HardwareErrorCodeType, type HardwareEthereumTx, type HardwareSignRequest, type HardwareSignature, type HardwareTransport, type HardwareWalletConfig, HardwareWalletError, type HardwareWalletType, IntentBuilder, IntentError, type LedgerConfig, type LedgerModel, LedgerWalletAdapter, MockEthereumAdapter, type MockEthereumAdapterConfig, type MockHardwareConfig, MockLedgerAdapter, MockProofProvider, MockSolanaAdapter, type MockSolanaAdapterConfig, MockSolver, type MockSolverConfig, MockTrezorAdapter, MockWalletAdapter, NEARIntentsAdapter, type NEARIntentsAdapterConfig, NetworkError, NoirProofProvider, type NoirProviderConfig, ORACLE_DOMAIN, OneClickClient, type OracleAttestation, type OracleAttestationMessage, type OracleId, type OracleInfo, type OracleRegistry, type OracleRegistryConfig, type OracleSignature, type OracleStatus, PaymentBuilder, type PedersenCommitment, type PreparedSwap, type PrivacyConfig, type ProductionQuote, ProofError, type ProofFramework, ProofGenerationError, ProofNotImplementedError, type ProofProgressCallback, type ProofProvider, type ProofResult, type ReceivedNote, SIP, type SIPConfig, SIPError, STABLECOIN_ADDRESSES, STABLECOIN_DECIMALS, STABLECOIN_INFO, type SerializedError, type ShieldedBalance, type ShieldedSendParams, type ShieldedSendResult, type SignedOracleAttestation, type SolanaAdapterConfig, type SolanaCluster, type SolanaConnection, type SolanaPublicKey, type SolanaSendOptions, type SolanaSignature, type SolanaTransaction, type SolanaUnsignedTransaction, type SolanaVersionedTransaction, SolanaWalletAdapter, type SolanaWalletName, type SolanaWalletProvider, type StablecoinInfo, type StealthCurve, type SwapRequest, type SwapResult, type TransactionData, type TransportType, Treasury, type TrezorConfig, type TrezorModel, TrezorWalletAdapter, ValidationError, type ValidityProofParams, type VerificationResult, type WalletAdapter, WalletError, ZcashRPCClient, ZcashRPCError, ZcashShieldedService, type ZcashShieldedServiceConfig, addBlindings, addCommitments, addOracle, attachProofs, base58ToHex, bytesToHex as browserBytesToHex, hexToBytes as browserHexToBytes, checkEd25519StealthAddress, checkStealthAddress, commit, commitZero, computeAttestationHash, createCommitment, createEthereumAdapter, createLedgerAdapter, createMockEthereumAdapter, createMockEthereumProvider, createMockLedgerAdapter, createMockSolanaAdapter, createMockSolanaConnection, createMockSolanaProvider, createMockSolver, createMockTrezorAdapter, createNEARIntentsAdapter, createOracleRegistry, createProductionSIP, createSIP, createShieldedIntent, createShieldedPayment, createSolanaAdapter, createTrezorAdapter, createWalletFactory, createZcashClient, createZcashShieldedService, decodeStealthMetaAddress, decryptMemo, decryptWithViewing, deriveEd25519StealthPrivateKey, deriveOracleId, deriveStealthPrivateKey, deriveViewingKey, deserializeAttestationMessage, deserializeIntent, deserializePayment, detectEthereumWallets, detectSolanaWallets, ed25519PublicKeyToNearAddress, ed25519PublicKeyToSolanaAddress, encodeStealthMetaAddress, encryptForViewing, featureNotSupportedError, formatStablecoinAmount, fromHex, fromStablecoinUnits, generateBlinding, generateEd25519StealthAddress, generateEd25519StealthMetaAddress, generateIntentId, generateRandomBytes, generateStealthAddress, generateStealthMetaAddress, generateViewingKey, getActiveOracles, getAvailableTransports, getBrowserInfo, getChainNumericId, getChainsForStablecoin, getCurveForChain, getDefaultRpcEndpoint, getDerivationPath, getErrorMessage, getEthereumProvider, getGenerators, getIntentSummary, getPaymentSummary, getPaymentTimeRemaining, getPrivacyConfig, getPrivacyDescription, getSolanaProvider, getStablecoin, getStablecoinInfo, getStablecoinsForChain, getSupportedStablecoins, getTimeRemaining, hasEnoughOracles, hasErrorCode, hasRequiredProofs, hash, hexToNumber, isBrowser, isEd25519Chain, isExpired, isNonNegativeAmount, isPaymentExpired, isPrivateWalletAdapter, isSIPError, isStablecoin, isStablecoinOnChain, isValidAmount, isValidChainId, isValidCompressedPublicKey, isValidEd25519PublicKey, isValidHex, isValidHexLength, isValidNearAccountId, isValidNearImplicitAddress, isValidPrivacyLevel, isValidPrivateKey, isValidScalar, isValidSlippage, isValidSolanaAddress, isValidStealthMetaAddress, nearAddressToEd25519PublicKey, normalizeAddress, notConnectedError, publicKeyToEthAddress, registerWallet, removeOracle, secureWipe, secureWipeAll, serializeAttestationMessage, serializeIntent, serializePayment, signAttestationMessage, solanaAddressToEd25519PublicKey, solanaPublicKeyToHex, subtractBlindings, subtractCommitments, supportsSharedArrayBuffer, supportsWebBluetooth, supportsWebHID, supportsWebUSB, supportsWebWorkers, toHex, toStablecoinUnits, trackIntent, trackPayment, updateOracleStatus, validateAsset, validateCreateIntentParams, validateIntentInput, validateIntentOutput, validateScalar, validateViewingKey, verifyAttestation, verifyCommitment, verifyOpening, verifyOracleSignature, walletRegistry, withSecureBuffer, withSecureBufferSync, wrapError };
|