@kaspacom/swap-sdk 1.1.24 → 1.1.26
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/README.md +2 -2
- package/dist/index.cjs +31 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.global.js +31 -4
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +31 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -101,7 +101,7 @@ console.log(tokens);
|
|
|
101
101
|
### createKaspaComSwapController(options)
|
|
102
102
|
Creates and returns a `SwapSdkController` instance. Accepts either a preset string for `networkConfig` or a full `SwapSdkNetworkConfig` object.
|
|
103
103
|
|
|
104
|
-
- **options.networkConfig**: `'kasplex-testnet'`, `'igra-testnet'`, `'kasplex'` or `SwapSdkNetworkConfig`
|
|
104
|
+
- **options.networkConfig**: `'kasplex-testnet'`, `'igra-testnet'`, `'kasplex'`(prod), `'igra'`(prod) or `SwapSdkNetworkConfig`
|
|
105
105
|
- **options.walletProvider**: EIP-1193 provider (e.g., `window.ethereum`)
|
|
106
106
|
- **options.partnerKey?**: Optional partner key string
|
|
107
107
|
- **options.onChange?**: `(state, patch) => Promise<void>` callback invoked on any state change
|
|
@@ -221,7 +221,7 @@ All types are exported from `swap-widget`.
|
|
|
221
221
|
The wrapped native token (WKAS).
|
|
222
222
|
|
|
223
223
|
- **NETWORKS**
|
|
224
|
-
- Preset map of network keys to `SwapSdkNetworkConfig` objects. Includes `'kasplex-testnet'`, `'kasplex'`.
|
|
224
|
+
- Preset map of network keys to `SwapSdkNetworkConfig` objects. Includes `'kasplex-testnet'`, `'kasplex'`, `'igra-testnet'`, `'igra'`.
|
|
225
225
|
|
|
226
226
|
|
|
227
227
|
## Usage Patterns
|
package/dist/index.cjs
CHANGED
|
@@ -2101,16 +2101,16 @@ var NETWORKS = {
|
|
|
2101
2101
|
name: "Igra Galleon",
|
|
2102
2102
|
chainId: 38836,
|
|
2103
2103
|
rpcUrl: "https://galleon-testnet.igralabs.com:8545",
|
|
2104
|
-
routerAddress: "
|
|
2105
|
-
factoryAddress: "
|
|
2106
|
-
proxyAddress: "
|
|
2104
|
+
routerAddress: "0x47F80b6D7071B7738D6DD9d973D7515ce753e9d9",
|
|
2105
|
+
factoryAddress: "0xc61aeAdA8888A0e9FF5709A8386c8527CD5065d0",
|
|
2106
|
+
proxyAddress: "0xAC11b74CD03006644e11991C43E78933579fc5fd",
|
|
2107
2107
|
badckendApiUrl: "https://dev-api-defi.kaspa.com",
|
|
2108
2108
|
blockExplorerUrl: "https://explorer.galleon-testnet.igralabs.com",
|
|
2109
2109
|
additionalJsonRpcApiProviderOptionsOptions: {
|
|
2110
2110
|
batchMaxSize: 0
|
|
2111
2111
|
},
|
|
2112
2112
|
wrappedToken: {
|
|
2113
|
-
address: "
|
|
2113
|
+
address: "0x394C68684F9AFCEb9b804531EF07a864E8081738",
|
|
2114
2114
|
decimals: 18,
|
|
2115
2115
|
name: "Igra Wrapped Kaspa",
|
|
2116
2116
|
symbol: "IWKAS"
|
|
@@ -2151,6 +2151,33 @@ var NETWORKS = {
|
|
|
2151
2151
|
symbol: "KAS"
|
|
2152
2152
|
},
|
|
2153
2153
|
defiApiNetworkName: "kasplex"
|
|
2154
|
+
},
|
|
2155
|
+
"igra": {
|
|
2156
|
+
name: "Igra",
|
|
2157
|
+
chainId: 38833,
|
|
2158
|
+
rpcUrl: "https://rpc.igralabs.com:8545",
|
|
2159
|
+
routerAddress: "0x771dfB21e1CD8EA3e8B68cB2469eDaF9548c2523",
|
|
2160
|
+
factoryAddress: "0x21350BcDa9E81731CF4cDE3DbC457e3de2739c01",
|
|
2161
|
+
proxyAddress: "0xDD1aBB133D027f4F67571b5bEEDC9cd9a93C13Ca",
|
|
2162
|
+
badckendApiUrl: "https://dev-api-defi.kaspa.com",
|
|
2163
|
+
blockExplorerUrl: "https://explorer.igralabs.com",
|
|
2164
|
+
additionalJsonRpcApiProviderOptionsOptions: {
|
|
2165
|
+
batchMaxSize: 0
|
|
2166
|
+
},
|
|
2167
|
+
wrappedToken: {
|
|
2168
|
+
address: "0x17Ec7E1768c813E2a3a9b0f94A35605CA520C242",
|
|
2169
|
+
decimals: 18,
|
|
2170
|
+
name: "Igra Wrapped Kaspa",
|
|
2171
|
+
symbol: "IWKAS"
|
|
2172
|
+
},
|
|
2173
|
+
nativeToken: {
|
|
2174
|
+
address: import_ethers3.ethers.ZeroAddress,
|
|
2175
|
+
decimals: 18,
|
|
2176
|
+
name: "Igra Kaspa",
|
|
2177
|
+
symbol: "IKAS"
|
|
2178
|
+
},
|
|
2179
|
+
isTestnet: false,
|
|
2180
|
+
defiApiNetworkName: "igra"
|
|
2154
2181
|
}
|
|
2155
2182
|
// Add more networks as needed
|
|
2156
2183
|
};
|