@sip-protocol/sdk 0.3.2 → 0.4.0
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 +2 -2
- package/dist/browser.d.ts +2 -2
- package/dist/browser.js +1019 -146
- package/dist/browser.mjs +49 -1
- package/dist/chunk-AOZIY3GU.mjs +12995 -0
- package/dist/chunk-BCLIX5T2.mjs +12940 -0
- package/dist/chunk-FKXPHKYD.mjs +12955 -0
- package/dist/chunk-OPQ2GQIO.mjs +13013 -0
- package/dist/index-BcWNakUD.d.ts +7990 -0
- package/dist/index-BsKY3Hr0.d.mts +7990 -0
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +990 -117
- package/dist/index.mjs +49 -1
- package/package.json +2 -1
- package/src/adapters/near-intents.ts +8 -0
- package/src/bitcoin/index.ts +51 -0
- package/src/bitcoin/silent-payments.ts +865 -0
- package/src/bitcoin/taproot.ts +590 -0
- package/src/cosmos/ibc-stealth.ts +825 -0
- package/src/cosmos/index.ts +83 -0
- package/src/cosmos/stealth.ts +487 -0
- package/src/index.ts +51 -0
- package/src/move/aptos.ts +369 -0
- package/src/move/index.ts +35 -0
- package/src/move/sui.ts +367 -0
- package/src/oracle/types.ts +8 -0
- package/src/settlement/backends/direct-chain.ts +8 -0
- package/src/stealth.ts +3 -3
- package/src/validation.ts +42 -1
- package/src/wallet/aptos/adapter.ts +422 -0
- package/src/wallet/aptos/index.ts +10 -0
- package/src/wallet/aptos/mock.ts +410 -0
- package/src/wallet/aptos/types.ts +278 -0
- package/src/wallet/bitcoin/adapter.ts +470 -0
- package/src/wallet/bitcoin/index.ts +38 -0
- package/src/wallet/bitcoin/mock.ts +516 -0
- package/src/wallet/bitcoin/types.ts +274 -0
- package/src/wallet/cosmos/adapter.ts +484 -0
- package/src/wallet/cosmos/index.ts +63 -0
- package/src/wallet/cosmos/mock.ts +596 -0
- package/src/wallet/cosmos/types.ts +462 -0
- package/src/wallet/index.ts +127 -0
- package/src/wallet/sui/adapter.ts +471 -0
- package/src/wallet/sui/index.ts +10 -0
- package/src/wallet/sui/mock.ts +439 -0
- package/src/wallet/sui/types.ts +245 -0
package/dist/browser.mjs
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ATTESTATION_VERSION,
|
|
3
|
+
AptosStealthService,
|
|
3
4
|
BaseWalletAdapter,
|
|
4
5
|
CHAIN_NUMERIC_IDS,
|
|
6
|
+
CHAIN_PREFIXES,
|
|
5
7
|
ComplianceManager,
|
|
8
|
+
CosmosStealthService,
|
|
6
9
|
DEFAULT_THRESHOLD,
|
|
7
10
|
DEFAULT_TOTAL_ORACLES,
|
|
8
11
|
DerivationPath,
|
|
@@ -57,17 +60,21 @@ import {
|
|
|
57
60
|
addBlindings,
|
|
58
61
|
addCommitments,
|
|
59
62
|
addOracle,
|
|
63
|
+
aptosAddressToAuthKey,
|
|
60
64
|
attachProofs,
|
|
61
65
|
base58ToHex,
|
|
62
66
|
bytesToHex,
|
|
67
|
+
checkAptosStealthAddress,
|
|
63
68
|
checkEd25519StealthAddress,
|
|
64
69
|
checkMobileWASMCompatibility,
|
|
65
70
|
checkStealthAddress,
|
|
66
71
|
commit,
|
|
67
72
|
commitZero,
|
|
68
73
|
computeAttestationHash,
|
|
74
|
+
computeTweakedKey,
|
|
69
75
|
createCommitment,
|
|
70
76
|
createEthereumAdapter,
|
|
77
|
+
createKeySpendOnlyOutput,
|
|
71
78
|
createLedgerAdapter,
|
|
72
79
|
createMockEthereumAdapter,
|
|
73
80
|
createMockEthereumProvider,
|
|
@@ -86,6 +93,7 @@ import {
|
|
|
86
93
|
createShieldedPayment,
|
|
87
94
|
createSmartRouter,
|
|
88
95
|
createSolanaAdapter,
|
|
96
|
+
createTaprootOutput,
|
|
89
97
|
createTrezorAdapter,
|
|
90
98
|
createWalletFactory,
|
|
91
99
|
createZcashClient,
|
|
@@ -93,8 +101,10 @@ import {
|
|
|
93
101
|
createZcashShieldedService,
|
|
94
102
|
createZcashSwapService,
|
|
95
103
|
decodeStealthMetaAddress,
|
|
104
|
+
decodeTaprootAddress,
|
|
96
105
|
decryptMemo,
|
|
97
106
|
decryptWithViewing,
|
|
107
|
+
deriveAptosStealthPrivateKey,
|
|
98
108
|
deriveEd25519StealthPrivateKey,
|
|
99
109
|
deriveOracleId,
|
|
100
110
|
deriveStealthPrivateKey,
|
|
@@ -106,6 +116,7 @@ import {
|
|
|
106
116
|
detectMobileBrowser,
|
|
107
117
|
detectMobilePlatform,
|
|
108
118
|
detectSolanaWallets,
|
|
119
|
+
ed25519PublicKeyToAptosAddress,
|
|
109
120
|
ed25519PublicKeyToNearAddress,
|
|
110
121
|
ed25519PublicKeyToSolanaAddress,
|
|
111
122
|
encodeStealthMetaAddress,
|
|
@@ -114,7 +125,10 @@ import {
|
|
|
114
125
|
formatStablecoinAmount,
|
|
115
126
|
fromHex,
|
|
116
127
|
fromStablecoinUnits,
|
|
128
|
+
generateAptosStealthAddress,
|
|
117
129
|
generateBlinding,
|
|
130
|
+
generateCosmosStealthAddress,
|
|
131
|
+
generateCosmosStealthMetaAddress,
|
|
118
132
|
generateEd25519StealthAddress,
|
|
119
133
|
generateEd25519StealthMetaAddress,
|
|
120
134
|
generateIntentId,
|
|
@@ -146,6 +160,7 @@ import {
|
|
|
146
160
|
getStablecoinsForChain,
|
|
147
161
|
getSupportedStablecoins,
|
|
148
162
|
getTimeRemaining,
|
|
163
|
+
getXOnlyPublicKey,
|
|
149
164
|
hasEnoughOracles,
|
|
150
165
|
hasRequiredProofs,
|
|
151
166
|
hash,
|
|
@@ -162,8 +177,10 @@ import {
|
|
|
162
177
|
isStablecoinOnChain,
|
|
163
178
|
isTablet,
|
|
164
179
|
isValidAmount,
|
|
180
|
+
isValidAptosAddress,
|
|
165
181
|
isValidChainId,
|
|
166
182
|
isValidCompressedPublicKey,
|
|
183
|
+
isValidCosmosAddress,
|
|
167
184
|
isValidEd25519PublicKey,
|
|
168
185
|
isValidHex,
|
|
169
186
|
isValidHexLength,
|
|
@@ -175,12 +192,17 @@ import {
|
|
|
175
192
|
isValidSlippage,
|
|
176
193
|
isValidSolanaAddress,
|
|
177
194
|
isValidStealthMetaAddress,
|
|
195
|
+
isValidTaprootAddress,
|
|
178
196
|
nearAddressToEd25519PublicKey,
|
|
179
197
|
normalizeAddress,
|
|
180
198
|
notConnectedError,
|
|
181
199
|
publicKeyToEthAddress,
|
|
182
200
|
registerWallet,
|
|
183
201
|
removeOracle,
|
|
202
|
+
schnorrSign,
|
|
203
|
+
schnorrSignHex,
|
|
204
|
+
schnorrVerify,
|
|
205
|
+
schnorrVerifyHex,
|
|
184
206
|
secureWipe,
|
|
185
207
|
secureWipeAll,
|
|
186
208
|
serializeAttestationMessage,
|
|
@@ -189,6 +211,7 @@ import {
|
|
|
189
211
|
signAttestationMessage,
|
|
190
212
|
solanaAddressToEd25519PublicKey,
|
|
191
213
|
solanaPublicKeyToHex,
|
|
214
|
+
stealthKeyToCosmosAddress,
|
|
192
215
|
subtractBlindings,
|
|
193
216
|
subtractCommitments,
|
|
194
217
|
supportsSharedArrayBuffer,
|
|
@@ -200,6 +223,7 @@ import {
|
|
|
200
223
|
supportsWebHID,
|
|
201
224
|
supportsWebUSB,
|
|
202
225
|
supportsWebWorkers,
|
|
226
|
+
taprootAddress,
|
|
203
227
|
toHex,
|
|
204
228
|
toStablecoinUnits,
|
|
205
229
|
trackIntent,
|
|
@@ -218,7 +242,7 @@ import {
|
|
|
218
242
|
walletRegistry,
|
|
219
243
|
withSecureBuffer,
|
|
220
244
|
withSecureBufferSync
|
|
221
|
-
} from "./chunk-
|
|
245
|
+
} from "./chunk-OPQ2GQIO.mjs";
|
|
222
246
|
import {
|
|
223
247
|
fulfillment_proof_default,
|
|
224
248
|
funding_proof_default,
|
|
@@ -1541,10 +1565,13 @@ var ProofWorker = class _ProofWorker {
|
|
|
1541
1565
|
};
|
|
1542
1566
|
export {
|
|
1543
1567
|
ATTESTATION_VERSION,
|
|
1568
|
+
AptosStealthService,
|
|
1544
1569
|
BaseWalletAdapter,
|
|
1545
1570
|
BrowserNoirProvider,
|
|
1546
1571
|
CHAIN_NUMERIC_IDS,
|
|
1572
|
+
CHAIN_PREFIXES as COSMOS_CHAIN_PREFIXES,
|
|
1547
1573
|
ComplianceManager,
|
|
1574
|
+
CosmosStealthService,
|
|
1548
1575
|
CryptoError,
|
|
1549
1576
|
DEFAULT_THRESHOLD,
|
|
1550
1577
|
DEFAULT_TOTAL_ORACLES,
|
|
@@ -1610,18 +1637,22 @@ export {
|
|
|
1610
1637
|
addBlindings,
|
|
1611
1638
|
addCommitments,
|
|
1612
1639
|
addOracle,
|
|
1640
|
+
aptosAddressToAuthKey,
|
|
1613
1641
|
attachProofs,
|
|
1614
1642
|
base58ToHex,
|
|
1615
1643
|
bytesToHex as browserBytesToHex,
|
|
1616
1644
|
hexToBytes as browserHexToBytes,
|
|
1645
|
+
checkAptosStealthAddress,
|
|
1617
1646
|
checkEd25519StealthAddress,
|
|
1618
1647
|
checkMobileWASMCompatibility,
|
|
1619
1648
|
checkStealthAddress,
|
|
1620
1649
|
commit,
|
|
1621
1650
|
commitZero,
|
|
1622
1651
|
computeAttestationHash,
|
|
1652
|
+
computeTweakedKey,
|
|
1623
1653
|
createCommitment,
|
|
1624
1654
|
createEthereumAdapter,
|
|
1655
|
+
createKeySpendOnlyOutput,
|
|
1625
1656
|
createLedgerAdapter,
|
|
1626
1657
|
createMockEthereumAdapter,
|
|
1627
1658
|
createMockEthereumProvider,
|
|
@@ -1640,6 +1671,7 @@ export {
|
|
|
1640
1671
|
createShieldedPayment,
|
|
1641
1672
|
createSmartRouter,
|
|
1642
1673
|
createSolanaAdapter,
|
|
1674
|
+
createTaprootOutput,
|
|
1643
1675
|
createTrezorAdapter,
|
|
1644
1676
|
createWalletFactory,
|
|
1645
1677
|
createWorkerBlobURL,
|
|
@@ -1648,8 +1680,10 @@ export {
|
|
|
1648
1680
|
createZcashShieldedService,
|
|
1649
1681
|
createZcashSwapService,
|
|
1650
1682
|
decodeStealthMetaAddress,
|
|
1683
|
+
decodeTaprootAddress,
|
|
1651
1684
|
decryptMemo,
|
|
1652
1685
|
decryptWithViewing,
|
|
1686
|
+
deriveAptosStealthPrivateKey,
|
|
1653
1687
|
deriveEd25519StealthPrivateKey,
|
|
1654
1688
|
deriveOracleId,
|
|
1655
1689
|
deriveStealthPrivateKey,
|
|
@@ -1661,6 +1695,7 @@ export {
|
|
|
1661
1695
|
detectMobileBrowser,
|
|
1662
1696
|
detectMobilePlatform,
|
|
1663
1697
|
detectSolanaWallets,
|
|
1698
|
+
ed25519PublicKeyToAptosAddress,
|
|
1664
1699
|
ed25519PublicKeyToNearAddress,
|
|
1665
1700
|
ed25519PublicKeyToSolanaAddress,
|
|
1666
1701
|
encodeStealthMetaAddress,
|
|
@@ -1669,7 +1704,10 @@ export {
|
|
|
1669
1704
|
formatStablecoinAmount,
|
|
1670
1705
|
fromHex,
|
|
1671
1706
|
fromStablecoinUnits,
|
|
1707
|
+
generateAptosStealthAddress,
|
|
1672
1708
|
generateBlinding,
|
|
1709
|
+
generateCosmosStealthAddress,
|
|
1710
|
+
generateCosmosStealthMetaAddress,
|
|
1673
1711
|
generateEd25519StealthAddress,
|
|
1674
1712
|
generateEd25519StealthMetaAddress,
|
|
1675
1713
|
generateIntentId,
|
|
@@ -1702,6 +1740,7 @@ export {
|
|
|
1702
1740
|
getStablecoinsForChain,
|
|
1703
1741
|
getSupportedStablecoins,
|
|
1704
1742
|
getTimeRemaining,
|
|
1743
|
+
getXOnlyPublicKey,
|
|
1705
1744
|
hasEnoughOracles,
|
|
1706
1745
|
hasErrorCode,
|
|
1707
1746
|
hasRequiredProofs,
|
|
@@ -1719,8 +1758,10 @@ export {
|
|
|
1719
1758
|
isStablecoinOnChain,
|
|
1720
1759
|
isTablet,
|
|
1721
1760
|
isValidAmount,
|
|
1761
|
+
isValidAptosAddress,
|
|
1722
1762
|
isValidChainId,
|
|
1723
1763
|
isValidCompressedPublicKey,
|
|
1764
|
+
isValidCosmosAddress,
|
|
1724
1765
|
isValidEd25519PublicKey,
|
|
1725
1766
|
isValidHex,
|
|
1726
1767
|
isValidHexLength,
|
|
@@ -1732,12 +1773,17 @@ export {
|
|
|
1732
1773
|
isValidSlippage,
|
|
1733
1774
|
isValidSolanaAddress,
|
|
1734
1775
|
isValidStealthMetaAddress,
|
|
1776
|
+
isValidTaprootAddress,
|
|
1735
1777
|
nearAddressToEd25519PublicKey,
|
|
1736
1778
|
normalizeAddress,
|
|
1737
1779
|
notConnectedError,
|
|
1738
1780
|
publicKeyToEthAddress,
|
|
1739
1781
|
registerWallet,
|
|
1740
1782
|
removeOracle,
|
|
1783
|
+
schnorrSign,
|
|
1784
|
+
schnorrSignHex,
|
|
1785
|
+
schnorrVerify,
|
|
1786
|
+
schnorrVerifyHex,
|
|
1741
1787
|
secureWipe,
|
|
1742
1788
|
secureWipeAll,
|
|
1743
1789
|
serializeAttestationMessage,
|
|
@@ -1746,6 +1792,7 @@ export {
|
|
|
1746
1792
|
signAttestationMessage,
|
|
1747
1793
|
solanaAddressToEd25519PublicKey,
|
|
1748
1794
|
solanaPublicKeyToHex,
|
|
1795
|
+
stealthKeyToCosmosAddress,
|
|
1749
1796
|
subtractBlindings,
|
|
1750
1797
|
subtractCommitments,
|
|
1751
1798
|
supportsSharedArrayBuffer,
|
|
@@ -1757,6 +1804,7 @@ export {
|
|
|
1757
1804
|
supportsWebHID,
|
|
1758
1805
|
supportsWebUSB,
|
|
1759
1806
|
supportsWebWorkers,
|
|
1807
|
+
taprootAddress,
|
|
1760
1808
|
toHex,
|
|
1761
1809
|
toStablecoinUnits,
|
|
1762
1810
|
trackIntent,
|