@sip-protocol/sdk 0.3.2 → 0.5.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 +2881 -295
- package/dist/browser.mjs +62 -2
- package/dist/chunk-AOZIY3GU.mjs +12995 -0
- package/dist/chunk-BCLIX5T2.mjs +12940 -0
- package/dist/chunk-DMHBKRWV.mjs +14712 -0
- package/dist/chunk-FKXPHKYD.mjs +12955 -0
- package/dist/chunk-HGU6HZRC.mjs +231 -0
- package/dist/chunk-J4Q4NJ2U.mjs +13544 -0
- package/dist/chunk-OPQ2GQIO.mjs +13013 -0
- package/dist/chunk-W2B7T6WU.mjs +14714 -0
- package/dist/index-5jAdWMA-.d.ts +8973 -0
- package/dist/index-B9Vkpaao.d.mts +8973 -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 +2852 -266
- package/dist/index.mjs +62 -2
- package/dist/proofs/noir.mjs +1 -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/compliance/compliance-manager.ts +87 -0
- package/src/compliance/conditional-threshold.ts +379 -0
- package/src/compliance/conditional.ts +382 -0
- package/src/compliance/derivation.ts +489 -0
- package/src/compliance/index.ts +50 -8
- package/src/compliance/pdf.ts +365 -0
- package/src/compliance/reports.ts +644 -0
- package/src/compliance/threshold.ts +529 -0
- package/src/compliance/types.ts +223 -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/errors.ts +8 -0
- package/src/index.ts +80 -1
- 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,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ATTESTATION_VERSION,
|
|
3
|
+
AptosStealthService,
|
|
4
|
+
AuditorKeyDerivation,
|
|
5
|
+
AuditorType,
|
|
3
6
|
BaseWalletAdapter,
|
|
4
7
|
CHAIN_NUMERIC_IDS,
|
|
8
|
+
CHAIN_PREFIXES,
|
|
5
9
|
ComplianceManager,
|
|
10
|
+
ComplianceReporter,
|
|
11
|
+
ConditionalDisclosure,
|
|
12
|
+
CosmosStealthService,
|
|
6
13
|
DEFAULT_THRESHOLD,
|
|
7
14
|
DEFAULT_TOTAL_ORACLES,
|
|
8
15
|
DerivationPath,
|
|
@@ -44,6 +51,7 @@ import {
|
|
|
44
51
|
SmartRouter,
|
|
45
52
|
SolanaWalletAdapter,
|
|
46
53
|
SwapStatus,
|
|
54
|
+
ThresholdViewingKey,
|
|
47
55
|
Treasury,
|
|
48
56
|
TrezorWalletAdapter,
|
|
49
57
|
WalletError,
|
|
@@ -57,17 +65,21 @@ import {
|
|
|
57
65
|
addBlindings,
|
|
58
66
|
addCommitments,
|
|
59
67
|
addOracle,
|
|
68
|
+
aptosAddressToAuthKey,
|
|
60
69
|
attachProofs,
|
|
61
70
|
base58ToHex,
|
|
62
71
|
bytesToHex,
|
|
72
|
+
checkAptosStealthAddress,
|
|
63
73
|
checkEd25519StealthAddress,
|
|
64
74
|
checkMobileWASMCompatibility,
|
|
65
75
|
checkStealthAddress,
|
|
66
76
|
commit,
|
|
67
77
|
commitZero,
|
|
68
78
|
computeAttestationHash,
|
|
79
|
+
computeTweakedKey,
|
|
69
80
|
createCommitment,
|
|
70
81
|
createEthereumAdapter,
|
|
82
|
+
createKeySpendOnlyOutput,
|
|
71
83
|
createLedgerAdapter,
|
|
72
84
|
createMockEthereumAdapter,
|
|
73
85
|
createMockEthereumProvider,
|
|
@@ -86,6 +98,7 @@ import {
|
|
|
86
98
|
createShieldedPayment,
|
|
87
99
|
createSmartRouter,
|
|
88
100
|
createSolanaAdapter,
|
|
101
|
+
createTaprootOutput,
|
|
89
102
|
createTrezorAdapter,
|
|
90
103
|
createWalletFactory,
|
|
91
104
|
createZcashClient,
|
|
@@ -93,8 +106,10 @@ import {
|
|
|
93
106
|
createZcashShieldedService,
|
|
94
107
|
createZcashSwapService,
|
|
95
108
|
decodeStealthMetaAddress,
|
|
109
|
+
decodeTaprootAddress,
|
|
96
110
|
decryptMemo,
|
|
97
111
|
decryptWithViewing,
|
|
112
|
+
deriveAptosStealthPrivateKey,
|
|
98
113
|
deriveEd25519StealthPrivateKey,
|
|
99
114
|
deriveOracleId,
|
|
100
115
|
deriveStealthPrivateKey,
|
|
@@ -106,6 +121,7 @@ import {
|
|
|
106
121
|
detectMobileBrowser,
|
|
107
122
|
detectMobilePlatform,
|
|
108
123
|
detectSolanaWallets,
|
|
124
|
+
ed25519PublicKeyToAptosAddress,
|
|
109
125
|
ed25519PublicKeyToNearAddress,
|
|
110
126
|
ed25519PublicKeyToSolanaAddress,
|
|
111
127
|
encodeStealthMetaAddress,
|
|
@@ -114,10 +130,14 @@ import {
|
|
|
114
130
|
formatStablecoinAmount,
|
|
115
131
|
fromHex,
|
|
116
132
|
fromStablecoinUnits,
|
|
133
|
+
generateAptosStealthAddress,
|
|
117
134
|
generateBlinding,
|
|
135
|
+
generateCosmosStealthAddress,
|
|
136
|
+
generateCosmosStealthMetaAddress,
|
|
118
137
|
generateEd25519StealthAddress,
|
|
119
138
|
generateEd25519StealthMetaAddress,
|
|
120
139
|
generateIntentId,
|
|
140
|
+
generatePdfReport,
|
|
121
141
|
generateRandomBytes,
|
|
122
142
|
generateStealthAddress,
|
|
123
143
|
generateStealthMetaAddress,
|
|
@@ -146,6 +166,7 @@ import {
|
|
|
146
166
|
getStablecoinsForChain,
|
|
147
167
|
getSupportedStablecoins,
|
|
148
168
|
getTimeRemaining,
|
|
169
|
+
getXOnlyPublicKey,
|
|
149
170
|
hasEnoughOracles,
|
|
150
171
|
hasRequiredProofs,
|
|
151
172
|
hash,
|
|
@@ -162,8 +183,10 @@ import {
|
|
|
162
183
|
isStablecoinOnChain,
|
|
163
184
|
isTablet,
|
|
164
185
|
isValidAmount,
|
|
186
|
+
isValidAptosAddress,
|
|
165
187
|
isValidChainId,
|
|
166
188
|
isValidCompressedPublicKey,
|
|
189
|
+
isValidCosmosAddress,
|
|
167
190
|
isValidEd25519PublicKey,
|
|
168
191
|
isValidHex,
|
|
169
192
|
isValidHexLength,
|
|
@@ -175,12 +198,17 @@ import {
|
|
|
175
198
|
isValidSlippage,
|
|
176
199
|
isValidSolanaAddress,
|
|
177
200
|
isValidStealthMetaAddress,
|
|
201
|
+
isValidTaprootAddress,
|
|
178
202
|
nearAddressToEd25519PublicKey,
|
|
179
203
|
normalizeAddress,
|
|
180
204
|
notConnectedError,
|
|
181
205
|
publicKeyToEthAddress,
|
|
182
206
|
registerWallet,
|
|
183
207
|
removeOracle,
|
|
208
|
+
schnorrSign,
|
|
209
|
+
schnorrSignHex,
|
|
210
|
+
schnorrVerify,
|
|
211
|
+
schnorrVerifyHex,
|
|
184
212
|
secureWipe,
|
|
185
213
|
secureWipeAll,
|
|
186
214
|
serializeAttestationMessage,
|
|
@@ -189,6 +217,7 @@ import {
|
|
|
189
217
|
signAttestationMessage,
|
|
190
218
|
solanaAddressToEd25519PublicKey,
|
|
191
219
|
solanaPublicKeyToHex,
|
|
220
|
+
stealthKeyToCosmosAddress,
|
|
192
221
|
subtractBlindings,
|
|
193
222
|
subtractCommitments,
|
|
194
223
|
supportsSharedArrayBuffer,
|
|
@@ -200,6 +229,7 @@ import {
|
|
|
200
229
|
supportsWebHID,
|
|
201
230
|
supportsWebUSB,
|
|
202
231
|
supportsWebWorkers,
|
|
232
|
+
taprootAddress,
|
|
203
233
|
toHex,
|
|
204
234
|
toStablecoinUnits,
|
|
205
235
|
trackIntent,
|
|
@@ -218,7 +248,7 @@ import {
|
|
|
218
248
|
walletRegistry,
|
|
219
249
|
withSecureBuffer,
|
|
220
250
|
withSecureBufferSync
|
|
221
|
-
} from "./chunk-
|
|
251
|
+
} from "./chunk-DMHBKRWV.mjs";
|
|
222
252
|
import {
|
|
223
253
|
fulfillment_proof_default,
|
|
224
254
|
funding_proof_default,
|
|
@@ -239,7 +269,7 @@ import {
|
|
|
239
269
|
hasErrorCode,
|
|
240
270
|
isSIPError,
|
|
241
271
|
wrapError
|
|
242
|
-
} from "./chunk-
|
|
272
|
+
} from "./chunk-HGU6HZRC.mjs";
|
|
243
273
|
|
|
244
274
|
// src/proofs/browser.ts
|
|
245
275
|
import { Noir } from "@noir-lang/noir_js";
|
|
@@ -1541,10 +1571,17 @@ var ProofWorker = class _ProofWorker {
|
|
|
1541
1571
|
};
|
|
1542
1572
|
export {
|
|
1543
1573
|
ATTESTATION_VERSION,
|
|
1574
|
+
AptosStealthService,
|
|
1575
|
+
AuditorKeyDerivation,
|
|
1576
|
+
AuditorType,
|
|
1544
1577
|
BaseWalletAdapter,
|
|
1545
1578
|
BrowserNoirProvider,
|
|
1546
1579
|
CHAIN_NUMERIC_IDS,
|
|
1580
|
+
CHAIN_PREFIXES as COSMOS_CHAIN_PREFIXES,
|
|
1547
1581
|
ComplianceManager,
|
|
1582
|
+
ComplianceReporter,
|
|
1583
|
+
ConditionalDisclosure,
|
|
1584
|
+
CosmosStealthService,
|
|
1548
1585
|
CryptoError,
|
|
1549
1586
|
DEFAULT_THRESHOLD,
|
|
1550
1587
|
DEFAULT_TOTAL_ORACLES,
|
|
@@ -1596,6 +1633,7 @@ export {
|
|
|
1596
1633
|
SmartRouter,
|
|
1597
1634
|
SolanaWalletAdapter,
|
|
1598
1635
|
SwapStatus,
|
|
1636
|
+
ThresholdViewingKey,
|
|
1599
1637
|
Treasury,
|
|
1600
1638
|
TrezorWalletAdapter,
|
|
1601
1639
|
ValidationError,
|
|
@@ -1610,18 +1648,22 @@ export {
|
|
|
1610
1648
|
addBlindings,
|
|
1611
1649
|
addCommitments,
|
|
1612
1650
|
addOracle,
|
|
1651
|
+
aptosAddressToAuthKey,
|
|
1613
1652
|
attachProofs,
|
|
1614
1653
|
base58ToHex,
|
|
1615
1654
|
bytesToHex as browserBytesToHex,
|
|
1616
1655
|
hexToBytes as browserHexToBytes,
|
|
1656
|
+
checkAptosStealthAddress,
|
|
1617
1657
|
checkEd25519StealthAddress,
|
|
1618
1658
|
checkMobileWASMCompatibility,
|
|
1619
1659
|
checkStealthAddress,
|
|
1620
1660
|
commit,
|
|
1621
1661
|
commitZero,
|
|
1622
1662
|
computeAttestationHash,
|
|
1663
|
+
computeTweakedKey,
|
|
1623
1664
|
createCommitment,
|
|
1624
1665
|
createEthereumAdapter,
|
|
1666
|
+
createKeySpendOnlyOutput,
|
|
1625
1667
|
createLedgerAdapter,
|
|
1626
1668
|
createMockEthereumAdapter,
|
|
1627
1669
|
createMockEthereumProvider,
|
|
@@ -1640,6 +1682,7 @@ export {
|
|
|
1640
1682
|
createShieldedPayment,
|
|
1641
1683
|
createSmartRouter,
|
|
1642
1684
|
createSolanaAdapter,
|
|
1685
|
+
createTaprootOutput,
|
|
1643
1686
|
createTrezorAdapter,
|
|
1644
1687
|
createWalletFactory,
|
|
1645
1688
|
createWorkerBlobURL,
|
|
@@ -1648,8 +1691,10 @@ export {
|
|
|
1648
1691
|
createZcashShieldedService,
|
|
1649
1692
|
createZcashSwapService,
|
|
1650
1693
|
decodeStealthMetaAddress,
|
|
1694
|
+
decodeTaprootAddress,
|
|
1651
1695
|
decryptMemo,
|
|
1652
1696
|
decryptWithViewing,
|
|
1697
|
+
deriveAptosStealthPrivateKey,
|
|
1653
1698
|
deriveEd25519StealthPrivateKey,
|
|
1654
1699
|
deriveOracleId,
|
|
1655
1700
|
deriveStealthPrivateKey,
|
|
@@ -1661,6 +1706,7 @@ export {
|
|
|
1661
1706
|
detectMobileBrowser,
|
|
1662
1707
|
detectMobilePlatform,
|
|
1663
1708
|
detectSolanaWallets,
|
|
1709
|
+
ed25519PublicKeyToAptosAddress,
|
|
1664
1710
|
ed25519PublicKeyToNearAddress,
|
|
1665
1711
|
ed25519PublicKeyToSolanaAddress,
|
|
1666
1712
|
encodeStealthMetaAddress,
|
|
@@ -1669,10 +1715,14 @@ export {
|
|
|
1669
1715
|
formatStablecoinAmount,
|
|
1670
1716
|
fromHex,
|
|
1671
1717
|
fromStablecoinUnits,
|
|
1718
|
+
generateAptosStealthAddress,
|
|
1672
1719
|
generateBlinding,
|
|
1720
|
+
generateCosmosStealthAddress,
|
|
1721
|
+
generateCosmosStealthMetaAddress,
|
|
1673
1722
|
generateEd25519StealthAddress,
|
|
1674
1723
|
generateEd25519StealthMetaAddress,
|
|
1675
1724
|
generateIntentId,
|
|
1725
|
+
generatePdfReport,
|
|
1676
1726
|
generateRandomBytes,
|
|
1677
1727
|
generateStealthAddress,
|
|
1678
1728
|
generateStealthMetaAddress,
|
|
@@ -1702,6 +1752,7 @@ export {
|
|
|
1702
1752
|
getStablecoinsForChain,
|
|
1703
1753
|
getSupportedStablecoins,
|
|
1704
1754
|
getTimeRemaining,
|
|
1755
|
+
getXOnlyPublicKey,
|
|
1705
1756
|
hasEnoughOracles,
|
|
1706
1757
|
hasErrorCode,
|
|
1707
1758
|
hasRequiredProofs,
|
|
@@ -1719,8 +1770,10 @@ export {
|
|
|
1719
1770
|
isStablecoinOnChain,
|
|
1720
1771
|
isTablet,
|
|
1721
1772
|
isValidAmount,
|
|
1773
|
+
isValidAptosAddress,
|
|
1722
1774
|
isValidChainId,
|
|
1723
1775
|
isValidCompressedPublicKey,
|
|
1776
|
+
isValidCosmosAddress,
|
|
1724
1777
|
isValidEd25519PublicKey,
|
|
1725
1778
|
isValidHex,
|
|
1726
1779
|
isValidHexLength,
|
|
@@ -1732,12 +1785,17 @@ export {
|
|
|
1732
1785
|
isValidSlippage,
|
|
1733
1786
|
isValidSolanaAddress,
|
|
1734
1787
|
isValidStealthMetaAddress,
|
|
1788
|
+
isValidTaprootAddress,
|
|
1735
1789
|
nearAddressToEd25519PublicKey,
|
|
1736
1790
|
normalizeAddress,
|
|
1737
1791
|
notConnectedError,
|
|
1738
1792
|
publicKeyToEthAddress,
|
|
1739
1793
|
registerWallet,
|
|
1740
1794
|
removeOracle,
|
|
1795
|
+
schnorrSign,
|
|
1796
|
+
schnorrSignHex,
|
|
1797
|
+
schnorrVerify,
|
|
1798
|
+
schnorrVerifyHex,
|
|
1741
1799
|
secureWipe,
|
|
1742
1800
|
secureWipeAll,
|
|
1743
1801
|
serializeAttestationMessage,
|
|
@@ -1746,6 +1804,7 @@ export {
|
|
|
1746
1804
|
signAttestationMessage,
|
|
1747
1805
|
solanaAddressToEd25519PublicKey,
|
|
1748
1806
|
solanaPublicKeyToHex,
|
|
1807
|
+
stealthKeyToCosmosAddress,
|
|
1749
1808
|
subtractBlindings,
|
|
1750
1809
|
subtractCommitments,
|
|
1751
1810
|
supportsSharedArrayBuffer,
|
|
@@ -1757,6 +1816,7 @@ export {
|
|
|
1757
1816
|
supportsWebHID,
|
|
1758
1817
|
supportsWebUSB,
|
|
1759
1818
|
supportsWebWorkers,
|
|
1819
|
+
taprootAddress,
|
|
1760
1820
|
toHex,
|
|
1761
1821
|
toStablecoinUnits,
|
|
1762
1822
|
trackIntent,
|