uniport-sdk 0.0.1 → 0.0.2
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/README.md +128 -73
- package/dist/components/index.cjs +1140 -975
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.d.cts +2 -1
- package/dist/components/index.d.ts +2 -1
- package/dist/components/index.js +1118 -953
- package/dist/components/index.js.map +1 -1
- package/dist/core/index.cjs +216 -130
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +55 -45
- package/dist/core/index.d.ts +55 -45
- package/dist/core/index.js +212 -116
- package/dist/core/index.js.map +1 -1
- package/dist/{index-uzI1Zngp.d.cts → index-Dg_m2bK3.d.cts} +19 -10
- package/dist/{index-uzI1Zngp.d.ts → index-Dg_m2bK3.d.ts} +19 -10
- package/dist/index.cjs +1178 -1018
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -6
- package/dist/index.d.ts +8 -6
- package/dist/index.js +1145 -975
- package/dist/index.js.map +1 -1
- package/package.json +18 -12
package/dist/index.d.cts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { QuoteResult, StatusResult, Chain, Token } from './core/index.cjs';
|
|
2
|
-
export { ALL_TOKENS, CHAINS, CHAIN_ICONS, ChainId, ExecutionStatus, QuoteOptions, SwapType, TOKEN_ICONS, UniportConfig, aptosAPT, arbitrumARB, arbitrumETH, arbitrumGMX, arbitrumUSDC, arbitrumUSDT, avalancheAVAX, avalancheUSDC, avalancheUSDT, baseBRETT, baseCbBTC, baseETH, baseUSDC, berachainBERA, bitcoinBTC, bitcoinCashBCH, bscBNB, bscUSDC, bscUSDT, cardanoADA, dogecoinDOGE, ethereumAAVE, ethereumDAI, ethereumETH, ethereumLINK, ethereumPEPE, ethereumSAFE, ethereumSHIB, ethereumTURBO, ethereumUNI, ethereumUSDC, ethereumUSDT, ethereumWBTC, fromSmallestUnits, generateDeadline,
|
|
3
|
-
import { P as PaymentState } from './index-
|
|
4
|
-
export { U as UniportButton, a as UniportButtonProps, b as UniportModal, c as UniportModalProps } from './index-
|
|
5
|
-
export { ApiError, OneClickService, OpenAPI } from '@defuse-protocol/one-click-sdk-typescript';
|
|
2
|
+
export { ALL_TOKENS, CHAINS, CHAIN_ICONS, ChainId, DEFAULT_HOSTED_BACKEND_URL, DEFAULT_REQUEST_TIMEOUT_MS, ExecutionStatus, QuoteOptions, ResolvedUniportConfig, SwapType, TOKEN_ICONS, UniportApiErrorBody, UniportConfig, UniportError, UniportErrorCode, aptosAPT, arbitrumARB, arbitrumETH, arbitrumGMX, arbitrumUSDC, arbitrumUSDT, avalancheAVAX, avalancheUSDC, avalancheUSDT, baseBRETT, baseCbBTC, baseETH, baseUSDC, berachainBERA, bitcoinBTC, bitcoinCashBCH, bscBNB, bscUSDC, bscUSDT, cardanoADA, configureUniport, dogecoinDOGE, ethereumAAVE, ethereumDAI, ethereumETH, ethereumLINK, ethereumPEPE, ethereumSAFE, ethereumSHIB, ethereumTURBO, ethereumUNI, ethereumUSDC, ethereumUSDT, ethereumWBTC, fromSmallestUnits, generateDeadline, getExecutionStatus, getQuote, getSupportedChains, getToken, getTokenByAssetId, getTokensByChain, getUniportConfig, litecoinLTC, nearNEAR, nearUSDC, nearUSDT, optimismETH, optimismOP, optimismUSDC, optimismUSDT, pollExecutionStatus, polygonPOL, polygonUSDC, polygonUSDT, rippleXRP, solanaMELANIA, solanaSOL, solanaTRUMP, solanaUSDC, solanaUSDT, solanaWIF, starknetSTRK, submitDepositTx, suiSUI, suiUSDC, toSmallestUnits, tonTON, tonUSDT, tronTRX, tronUSDT, zcashZEC } from './core/index.cjs';
|
|
3
|
+
import { P as PaymentState } from './index-Dg_m2bK3.cjs';
|
|
4
|
+
export { U as UniportButton, a as UniportButtonProps, b as UniportModal, c as UniportModalProps } from './index-Dg_m2bK3.cjs';
|
|
6
5
|
import 'react/jsx-runtime';
|
|
6
|
+
import 'react';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* useUniportPayment Hook
|
|
@@ -14,7 +14,7 @@ import 'react/jsx-runtime';
|
|
|
14
14
|
interface UseUniportPaymentOptions {
|
|
15
15
|
recipient: string;
|
|
16
16
|
refundAddress?: string;
|
|
17
|
-
destinationToken
|
|
17
|
+
destinationToken: string;
|
|
18
18
|
amount?: string;
|
|
19
19
|
onSuccess?: (result: {
|
|
20
20
|
txHash: string;
|
|
@@ -32,16 +32,18 @@ interface UseUniportPaymentReturn {
|
|
|
32
32
|
selectedChain: Chain | null;
|
|
33
33
|
selectedToken: Token | null;
|
|
34
34
|
amount: string;
|
|
35
|
+
refundAddress: string;
|
|
35
36
|
destinationToken: Token;
|
|
36
37
|
chains: Chain[];
|
|
37
38
|
tokens: Token[];
|
|
38
|
-
destinationTokens: Token[];
|
|
39
39
|
setSelectedChain: (chain: Chain) => void;
|
|
40
40
|
setSelectedToken: (token: Token) => void;
|
|
41
41
|
setAmount: (amount: string) => void;
|
|
42
|
+
setRefundAddress: (refundAddress: string) => void;
|
|
42
43
|
fetchQuote: () => Promise<void>;
|
|
43
44
|
startPolling: () => void;
|
|
44
45
|
stopPolling: () => void;
|
|
46
|
+
cancelQuote: () => void;
|
|
45
47
|
reset: () => void;
|
|
46
48
|
copyToClipboard: (text: string) => Promise<boolean>;
|
|
47
49
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { QuoteResult, StatusResult, Chain, Token } from './core/index.js';
|
|
2
|
-
export { ALL_TOKENS, CHAINS, CHAIN_ICONS, ChainId, ExecutionStatus, QuoteOptions, SwapType, TOKEN_ICONS, UniportConfig, aptosAPT, arbitrumARB, arbitrumETH, arbitrumGMX, arbitrumUSDC, arbitrumUSDT, avalancheAVAX, avalancheUSDC, avalancheUSDT, baseBRETT, baseCbBTC, baseETH, baseUSDC, berachainBERA, bitcoinBTC, bitcoinCashBCH, bscBNB, bscUSDC, bscUSDT, cardanoADA, dogecoinDOGE, ethereumAAVE, ethereumDAI, ethereumETH, ethereumLINK, ethereumPEPE, ethereumSAFE, ethereumSHIB, ethereumTURBO, ethereumUNI, ethereumUSDC, ethereumUSDT, ethereumWBTC, fromSmallestUnits, generateDeadline,
|
|
3
|
-
import { P as PaymentState } from './index-
|
|
4
|
-
export { U as UniportButton, a as UniportButtonProps, b as UniportModal, c as UniportModalProps } from './index-
|
|
5
|
-
export { ApiError, OneClickService, OpenAPI } from '@defuse-protocol/one-click-sdk-typescript';
|
|
2
|
+
export { ALL_TOKENS, CHAINS, CHAIN_ICONS, ChainId, DEFAULT_HOSTED_BACKEND_URL, DEFAULT_REQUEST_TIMEOUT_MS, ExecutionStatus, QuoteOptions, ResolvedUniportConfig, SwapType, TOKEN_ICONS, UniportApiErrorBody, UniportConfig, UniportError, UniportErrorCode, aptosAPT, arbitrumARB, arbitrumETH, arbitrumGMX, arbitrumUSDC, arbitrumUSDT, avalancheAVAX, avalancheUSDC, avalancheUSDT, baseBRETT, baseCbBTC, baseETH, baseUSDC, berachainBERA, bitcoinBTC, bitcoinCashBCH, bscBNB, bscUSDC, bscUSDT, cardanoADA, configureUniport, dogecoinDOGE, ethereumAAVE, ethereumDAI, ethereumETH, ethereumLINK, ethereumPEPE, ethereumSAFE, ethereumSHIB, ethereumTURBO, ethereumUNI, ethereumUSDC, ethereumUSDT, ethereumWBTC, fromSmallestUnits, generateDeadline, getExecutionStatus, getQuote, getSupportedChains, getToken, getTokenByAssetId, getTokensByChain, getUniportConfig, litecoinLTC, nearNEAR, nearUSDC, nearUSDT, optimismETH, optimismOP, optimismUSDC, optimismUSDT, pollExecutionStatus, polygonPOL, polygonUSDC, polygonUSDT, rippleXRP, solanaMELANIA, solanaSOL, solanaTRUMP, solanaUSDC, solanaUSDT, solanaWIF, starknetSTRK, submitDepositTx, suiSUI, suiUSDC, toSmallestUnits, tonTON, tonUSDT, tronTRX, tronUSDT, zcashZEC } from './core/index.js';
|
|
3
|
+
import { P as PaymentState } from './index-Dg_m2bK3.js';
|
|
4
|
+
export { U as UniportButton, a as UniportButtonProps, b as UniportModal, c as UniportModalProps } from './index-Dg_m2bK3.js';
|
|
6
5
|
import 'react/jsx-runtime';
|
|
6
|
+
import 'react';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* useUniportPayment Hook
|
|
@@ -14,7 +14,7 @@ import 'react/jsx-runtime';
|
|
|
14
14
|
interface UseUniportPaymentOptions {
|
|
15
15
|
recipient: string;
|
|
16
16
|
refundAddress?: string;
|
|
17
|
-
destinationToken
|
|
17
|
+
destinationToken: string;
|
|
18
18
|
amount?: string;
|
|
19
19
|
onSuccess?: (result: {
|
|
20
20
|
txHash: string;
|
|
@@ -32,16 +32,18 @@ interface UseUniportPaymentReturn {
|
|
|
32
32
|
selectedChain: Chain | null;
|
|
33
33
|
selectedToken: Token | null;
|
|
34
34
|
amount: string;
|
|
35
|
+
refundAddress: string;
|
|
35
36
|
destinationToken: Token;
|
|
36
37
|
chains: Chain[];
|
|
37
38
|
tokens: Token[];
|
|
38
|
-
destinationTokens: Token[];
|
|
39
39
|
setSelectedChain: (chain: Chain) => void;
|
|
40
40
|
setSelectedToken: (token: Token) => void;
|
|
41
41
|
setAmount: (amount: string) => void;
|
|
42
|
+
setRefundAddress: (refundAddress: string) => void;
|
|
42
43
|
fetchQuote: () => Promise<void>;
|
|
43
44
|
startPolling: () => void;
|
|
44
45
|
stopPolling: () => void;
|
|
46
|
+
cancelQuote: () => void;
|
|
45
47
|
reset: () => void;
|
|
46
48
|
copyToClipboard: (text: string) => Promise<boolean>;
|
|
47
49
|
}
|