@swapkit/api-sdk-typescript 3.0.0 → 4.0.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/index.d.cts CHANGED
@@ -606,33 +606,14 @@ type TrackTransactionResponse = {
606
606
  explorerUrl?: string;
607
607
  providerExplorerUrl?: string;
608
608
  affiliate?: string;
609
- fees?: {
610
- network?: {
611
- identifier: string;
612
- amount: string;
613
- decimal?: number;
614
- };
615
- affiliate?: {
616
- identifier: string;
617
- amount: string;
618
- decimal?: number;
619
- };
620
- liquidity?: {
621
- identifier: string;
622
- amount: string;
623
- decimal?: number;
624
- };
625
- protocol?: {
626
- identifier: string;
627
- amount: string;
628
- decimal?: number;
629
- };
630
- tax?: {
631
- identifier: string;
632
- amount: string;
633
- decimal?: number;
634
- };
635
- };
609
+ fees?: Array<{
610
+ type: 'liquidity' | 'network' | 'inbound' | 'outbound' | 'affiliate' | 'service' | 'tax' | 'priority';
611
+ amount: string;
612
+ amountBps?: number;
613
+ asset: string;
614
+ chain: string;
615
+ protocol: 'CHAINFLIP' | 'CHAINFLIP_STREAMING' | 'MAYACHAIN' | 'MAYACHAIN_STREAMING' | 'ONEINCH' | 'PANCAKESWAP' | 'SUSHISWAP_V2' | 'THORCHAIN' | 'THORCHAIN_STREAMING' | 'TRADERJOE_V2' | 'UNISWAP_V2' | 'UNISWAP_V3' | 'JUPITER' | 'OKX' | 'NEAR' | 'GARDEN' | 'HARBOR' | 'FLASHNET' | 'MAYAN' | 'PANGOLIN_V1' | 'CAVIAR_V1' | 'OPENOCEAN_V2' | 'OCISWAP_V1' | 'CAMELOT_V3';
616
+ }>;
636
617
  provider?: 'CHAINFLIP' | 'CHAINFLIP_STREAMING' | 'MAYACHAIN' | 'MAYACHAIN_STREAMING' | 'ONEINCH' | 'PANCAKESWAP' | 'SUSHISWAP_V2' | 'THORCHAIN' | 'THORCHAIN_STREAMING' | 'TRADERJOE_V2' | 'UNISWAP_V2' | 'UNISWAP_V3' | 'JUPITER' | 'OKX' | 'NEAR' | 'GARDEN' | 'HARBOR' | 'FLASHNET' | 'MAYAN' | 'PANGOLIN_V1' | 'CAVIAR_V1' | 'OPENOCEAN_V2' | 'OCISWAP_V1' | 'CAMELOT_V3';
637
618
  providerAction?: 'swap' | 'aggregation' | 'addLiquidity' | 'withdrawLiquidity' | 'addSavers' | 'withdrawSavers' | 'borrow' | 'repay' | 'name' | 'donate' | 'claim' | 'stake' | 'unstake' | 'createOrder' | 'cancelOrder';
638
619
  providerOrderId?: string;
@@ -718,33 +699,14 @@ type TrackTransactionResponse = {
718
699
  explorerUrl?: string;
719
700
  providerExplorerUrl?: string;
720
701
  affiliate?: string;
721
- fees?: {
722
- network?: {
723
- identifier: string;
724
- amount: string;
725
- decimal?: number;
726
- };
727
- affiliate?: {
728
- identifier: string;
729
- amount: string;
730
- decimal?: number;
731
- };
732
- liquidity?: {
733
- identifier: string;
734
- amount: string;
735
- decimal?: number;
736
- };
737
- protocol?: {
738
- identifier: string;
739
- amount: string;
740
- decimal?: number;
741
- };
742
- tax?: {
743
- identifier: string;
744
- amount: string;
745
- decimal?: number;
746
- };
747
- };
702
+ fees?: Array<{
703
+ type: 'liquidity' | 'network' | 'inbound' | 'outbound' | 'affiliate' | 'service' | 'tax' | 'priority';
704
+ amount: string;
705
+ amountBps?: number;
706
+ asset: string;
707
+ chain: string;
708
+ protocol: 'CHAINFLIP' | 'CHAINFLIP_STREAMING' | 'MAYACHAIN' | 'MAYACHAIN_STREAMING' | 'ONEINCH' | 'PANCAKESWAP' | 'SUSHISWAP_V2' | 'THORCHAIN' | 'THORCHAIN_STREAMING' | 'TRADERJOE_V2' | 'UNISWAP_V2' | 'UNISWAP_V3' | 'JUPITER' | 'OKX' | 'NEAR' | 'GARDEN' | 'HARBOR' | 'FLASHNET' | 'MAYAN' | 'PANGOLIN_V1' | 'CAVIAR_V1' | 'OPENOCEAN_V2' | 'OCISWAP_V1' | 'CAMELOT_V3';
709
+ }>;
748
710
  provider?: 'CHAINFLIP' | 'CHAINFLIP_STREAMING' | 'MAYACHAIN' | 'MAYACHAIN_STREAMING' | 'ONEINCH' | 'PANCAKESWAP' | 'SUSHISWAP_V2' | 'THORCHAIN' | 'THORCHAIN_STREAMING' | 'TRADERJOE_V2' | 'UNISWAP_V2' | 'UNISWAP_V3' | 'JUPITER' | 'OKX' | 'NEAR' | 'GARDEN' | 'HARBOR' | 'FLASHNET' | 'MAYAN' | 'PANGOLIN_V1' | 'CAVIAR_V1' | 'OPENOCEAN_V2' | 'OCISWAP_V1' | 'CAMELOT_V3';
749
711
  providerAction?: 'swap' | 'aggregation' | 'addLiquidity' | 'withdrawLiquidity' | 'addSavers' | 'withdrawSavers' | 'borrow' | 'repay' | 'name' | 'donate' | 'claim' | 'stake' | 'unstake' | 'createOrder' | 'cancelOrder';
750
712
  providerOrderId?: string;
@@ -833,33 +795,14 @@ type InsertTrackedTransactionRequest = {
833
795
  explorerUrl?: string;
834
796
  providerExplorerUrl?: string;
835
797
  affiliate?: string;
836
- fees?: {
837
- network?: {
838
- identifier: string;
839
- amount: string;
840
- decimal?: number;
841
- };
842
- affiliate?: {
843
- identifier: string;
844
- amount: string;
845
- decimal?: number;
846
- };
847
- liquidity?: {
848
- identifier: string;
849
- amount: string;
850
- decimal?: number;
851
- };
852
- protocol?: {
853
- identifier: string;
854
- amount: string;
855
- decimal?: number;
856
- };
857
- tax?: {
858
- identifier: string;
859
- amount: string;
860
- decimal?: number;
861
- };
862
- };
798
+ fees?: Array<{
799
+ type: 'liquidity' | 'network' | 'inbound' | 'outbound' | 'affiliate' | 'service' | 'tax' | 'priority';
800
+ amount: string;
801
+ amountBps?: number;
802
+ asset: string;
803
+ chain: string;
804
+ protocol: 'CHAINFLIP' | 'CHAINFLIP_STREAMING' | 'MAYACHAIN' | 'MAYACHAIN_STREAMING' | 'ONEINCH' | 'PANCAKESWAP' | 'SUSHISWAP_V2' | 'THORCHAIN' | 'THORCHAIN_STREAMING' | 'TRADERJOE_V2' | 'UNISWAP_V2' | 'UNISWAP_V3' | 'JUPITER' | 'OKX' | 'NEAR' | 'GARDEN' | 'HARBOR' | 'FLASHNET' | 'MAYAN' | 'PANGOLIN_V1' | 'CAVIAR_V1' | 'OPENOCEAN_V2' | 'OCISWAP_V1' | 'CAMELOT_V3';
805
+ }>;
863
806
  provider?: 'CHAINFLIP' | 'CHAINFLIP_STREAMING' | 'MAYACHAIN' | 'MAYACHAIN_STREAMING' | 'ONEINCH' | 'PANCAKESWAP' | 'SUSHISWAP_V2' | 'THORCHAIN' | 'THORCHAIN_STREAMING' | 'TRADERJOE_V2' | 'UNISWAP_V2' | 'UNISWAP_V3' | 'JUPITER' | 'OKX' | 'NEAR' | 'GARDEN' | 'HARBOR' | 'FLASHNET' | 'MAYAN' | 'PANGOLIN_V1' | 'CAVIAR_V1' | 'OPENOCEAN_V2' | 'OCISWAP_V1' | 'CAMELOT_V3';
864
807
  providerAction?: 'swap' | 'aggregation' | 'addLiquidity' | 'withdrawLiquidity' | 'addSavers' | 'withdrawSavers' | 'borrow' | 'repay' | 'name' | 'donate' | 'claim' | 'stake' | 'unstake' | 'createOrder' | 'cancelOrder';
865
808
  providerOrderId?: string;
@@ -2093,33 +2036,14 @@ type TrackTransactionResponses = {
2093
2036
  explorerUrl?: string;
2094
2037
  providerExplorerUrl?: string;
2095
2038
  affiliate?: string;
2096
- fees?: {
2097
- network?: {
2098
- identifier: string;
2099
- amount: string;
2100
- decimal?: number;
2101
- };
2102
- affiliate?: {
2103
- identifier: string;
2104
- amount: string;
2105
- decimal?: number;
2106
- };
2107
- liquidity?: {
2108
- identifier: string;
2109
- amount: string;
2110
- decimal?: number;
2111
- };
2112
- protocol?: {
2113
- identifier: string;
2114
- amount: string;
2115
- decimal?: number;
2116
- };
2117
- tax?: {
2118
- identifier: string;
2119
- amount: string;
2120
- decimal?: number;
2121
- };
2122
- };
2039
+ fees?: Array<{
2040
+ type: 'liquidity' | 'network' | 'inbound' | 'outbound' | 'affiliate' | 'service' | 'tax' | 'priority';
2041
+ amount: string;
2042
+ amountBps?: number;
2043
+ asset: string;
2044
+ chain: string;
2045
+ protocol: 'CHAINFLIP' | 'CHAINFLIP_STREAMING' | 'MAYACHAIN' | 'MAYACHAIN_STREAMING' | 'ONEINCH' | 'PANCAKESWAP' | 'SUSHISWAP_V2' | 'THORCHAIN' | 'THORCHAIN_STREAMING' | 'TRADERJOE_V2' | 'UNISWAP_V2' | 'UNISWAP_V3' | 'JUPITER' | 'OKX' | 'NEAR' | 'GARDEN' | 'HARBOR' | 'FLASHNET' | 'MAYAN' | 'PANGOLIN_V1' | 'CAVIAR_V1' | 'OPENOCEAN_V2' | 'OCISWAP_V1' | 'CAMELOT_V3';
2046
+ }>;
2123
2047
  provider?: 'CHAINFLIP' | 'CHAINFLIP_STREAMING' | 'MAYACHAIN' | 'MAYACHAIN_STREAMING' | 'ONEINCH' | 'PANCAKESWAP' | 'SUSHISWAP_V2' | 'THORCHAIN' | 'THORCHAIN_STREAMING' | 'TRADERJOE_V2' | 'UNISWAP_V2' | 'UNISWAP_V3' | 'JUPITER' | 'OKX' | 'NEAR' | 'GARDEN' | 'HARBOR' | 'FLASHNET' | 'MAYAN' | 'PANGOLIN_V1' | 'CAVIAR_V1' | 'OPENOCEAN_V2' | 'OCISWAP_V1' | 'CAMELOT_V3';
2124
2048
  providerAction?: 'swap' | 'aggregation' | 'addLiquidity' | 'withdrawLiquidity' | 'addSavers' | 'withdrawSavers' | 'borrow' | 'repay' | 'name' | 'donate' | 'claim' | 'stake' | 'unstake' | 'createOrder' | 'cancelOrder';
2125
2049
  providerOrderId?: string;
@@ -2205,33 +2129,14 @@ type TrackTransactionResponses = {
2205
2129
  explorerUrl?: string;
2206
2130
  providerExplorerUrl?: string;
2207
2131
  affiliate?: string;
2208
- fees?: {
2209
- network?: {
2210
- identifier: string;
2211
- amount: string;
2212
- decimal?: number;
2213
- };
2214
- affiliate?: {
2215
- identifier: string;
2216
- amount: string;
2217
- decimal?: number;
2218
- };
2219
- liquidity?: {
2220
- identifier: string;
2221
- amount: string;
2222
- decimal?: number;
2223
- };
2224
- protocol?: {
2225
- identifier: string;
2226
- amount: string;
2227
- decimal?: number;
2228
- };
2229
- tax?: {
2230
- identifier: string;
2231
- amount: string;
2232
- decimal?: number;
2233
- };
2234
- };
2132
+ fees?: Array<{
2133
+ type: 'liquidity' | 'network' | 'inbound' | 'outbound' | 'affiliate' | 'service' | 'tax' | 'priority';
2134
+ amount: string;
2135
+ amountBps?: number;
2136
+ asset: string;
2137
+ chain: string;
2138
+ protocol: 'CHAINFLIP' | 'CHAINFLIP_STREAMING' | 'MAYACHAIN' | 'MAYACHAIN_STREAMING' | 'ONEINCH' | 'PANCAKESWAP' | 'SUSHISWAP_V2' | 'THORCHAIN' | 'THORCHAIN_STREAMING' | 'TRADERJOE_V2' | 'UNISWAP_V2' | 'UNISWAP_V3' | 'JUPITER' | 'OKX' | 'NEAR' | 'GARDEN' | 'HARBOR' | 'FLASHNET' | 'MAYAN' | 'PANGOLIN_V1' | 'CAVIAR_V1' | 'OPENOCEAN_V2' | 'OCISWAP_V1' | 'CAMELOT_V3';
2139
+ }>;
2235
2140
  provider?: 'CHAINFLIP' | 'CHAINFLIP_STREAMING' | 'MAYACHAIN' | 'MAYACHAIN_STREAMING' | 'ONEINCH' | 'PANCAKESWAP' | 'SUSHISWAP_V2' | 'THORCHAIN' | 'THORCHAIN_STREAMING' | 'TRADERJOE_V2' | 'UNISWAP_V2' | 'UNISWAP_V3' | 'JUPITER' | 'OKX' | 'NEAR' | 'GARDEN' | 'HARBOR' | 'FLASHNET' | 'MAYAN' | 'PANGOLIN_V1' | 'CAVIAR_V1' | 'OPENOCEAN_V2' | 'OCISWAP_V1' | 'CAMELOT_V3';
2236
2141
  providerAction?: 'swap' | 'aggregation' | 'addLiquidity' | 'withdrawLiquidity' | 'addSavers' | 'withdrawSavers' | 'borrow' | 'repay' | 'name' | 'donate' | 'claim' | 'stake' | 'unstake' | 'createOrder' | 'cancelOrder';
2237
2142
  providerOrderId?: string;
package/dist/index.d.ts CHANGED
@@ -606,33 +606,14 @@ type TrackTransactionResponse = {
606
606
  explorerUrl?: string;
607
607
  providerExplorerUrl?: string;
608
608
  affiliate?: string;
609
- fees?: {
610
- network?: {
611
- identifier: string;
612
- amount: string;
613
- decimal?: number;
614
- };
615
- affiliate?: {
616
- identifier: string;
617
- amount: string;
618
- decimal?: number;
619
- };
620
- liquidity?: {
621
- identifier: string;
622
- amount: string;
623
- decimal?: number;
624
- };
625
- protocol?: {
626
- identifier: string;
627
- amount: string;
628
- decimal?: number;
629
- };
630
- tax?: {
631
- identifier: string;
632
- amount: string;
633
- decimal?: number;
634
- };
635
- };
609
+ fees?: Array<{
610
+ type: 'liquidity' | 'network' | 'inbound' | 'outbound' | 'affiliate' | 'service' | 'tax' | 'priority';
611
+ amount: string;
612
+ amountBps?: number;
613
+ asset: string;
614
+ chain: string;
615
+ protocol: 'CHAINFLIP' | 'CHAINFLIP_STREAMING' | 'MAYACHAIN' | 'MAYACHAIN_STREAMING' | 'ONEINCH' | 'PANCAKESWAP' | 'SUSHISWAP_V2' | 'THORCHAIN' | 'THORCHAIN_STREAMING' | 'TRADERJOE_V2' | 'UNISWAP_V2' | 'UNISWAP_V3' | 'JUPITER' | 'OKX' | 'NEAR' | 'GARDEN' | 'HARBOR' | 'FLASHNET' | 'MAYAN' | 'PANGOLIN_V1' | 'CAVIAR_V1' | 'OPENOCEAN_V2' | 'OCISWAP_V1' | 'CAMELOT_V3';
616
+ }>;
636
617
  provider?: 'CHAINFLIP' | 'CHAINFLIP_STREAMING' | 'MAYACHAIN' | 'MAYACHAIN_STREAMING' | 'ONEINCH' | 'PANCAKESWAP' | 'SUSHISWAP_V2' | 'THORCHAIN' | 'THORCHAIN_STREAMING' | 'TRADERJOE_V2' | 'UNISWAP_V2' | 'UNISWAP_V3' | 'JUPITER' | 'OKX' | 'NEAR' | 'GARDEN' | 'HARBOR' | 'FLASHNET' | 'MAYAN' | 'PANGOLIN_V1' | 'CAVIAR_V1' | 'OPENOCEAN_V2' | 'OCISWAP_V1' | 'CAMELOT_V3';
637
618
  providerAction?: 'swap' | 'aggregation' | 'addLiquidity' | 'withdrawLiquidity' | 'addSavers' | 'withdrawSavers' | 'borrow' | 'repay' | 'name' | 'donate' | 'claim' | 'stake' | 'unstake' | 'createOrder' | 'cancelOrder';
638
619
  providerOrderId?: string;
@@ -718,33 +699,14 @@ type TrackTransactionResponse = {
718
699
  explorerUrl?: string;
719
700
  providerExplorerUrl?: string;
720
701
  affiliate?: string;
721
- fees?: {
722
- network?: {
723
- identifier: string;
724
- amount: string;
725
- decimal?: number;
726
- };
727
- affiliate?: {
728
- identifier: string;
729
- amount: string;
730
- decimal?: number;
731
- };
732
- liquidity?: {
733
- identifier: string;
734
- amount: string;
735
- decimal?: number;
736
- };
737
- protocol?: {
738
- identifier: string;
739
- amount: string;
740
- decimal?: number;
741
- };
742
- tax?: {
743
- identifier: string;
744
- amount: string;
745
- decimal?: number;
746
- };
747
- };
702
+ fees?: Array<{
703
+ type: 'liquidity' | 'network' | 'inbound' | 'outbound' | 'affiliate' | 'service' | 'tax' | 'priority';
704
+ amount: string;
705
+ amountBps?: number;
706
+ asset: string;
707
+ chain: string;
708
+ protocol: 'CHAINFLIP' | 'CHAINFLIP_STREAMING' | 'MAYACHAIN' | 'MAYACHAIN_STREAMING' | 'ONEINCH' | 'PANCAKESWAP' | 'SUSHISWAP_V2' | 'THORCHAIN' | 'THORCHAIN_STREAMING' | 'TRADERJOE_V2' | 'UNISWAP_V2' | 'UNISWAP_V3' | 'JUPITER' | 'OKX' | 'NEAR' | 'GARDEN' | 'HARBOR' | 'FLASHNET' | 'MAYAN' | 'PANGOLIN_V1' | 'CAVIAR_V1' | 'OPENOCEAN_V2' | 'OCISWAP_V1' | 'CAMELOT_V3';
709
+ }>;
748
710
  provider?: 'CHAINFLIP' | 'CHAINFLIP_STREAMING' | 'MAYACHAIN' | 'MAYACHAIN_STREAMING' | 'ONEINCH' | 'PANCAKESWAP' | 'SUSHISWAP_V2' | 'THORCHAIN' | 'THORCHAIN_STREAMING' | 'TRADERJOE_V2' | 'UNISWAP_V2' | 'UNISWAP_V3' | 'JUPITER' | 'OKX' | 'NEAR' | 'GARDEN' | 'HARBOR' | 'FLASHNET' | 'MAYAN' | 'PANGOLIN_V1' | 'CAVIAR_V1' | 'OPENOCEAN_V2' | 'OCISWAP_V1' | 'CAMELOT_V3';
749
711
  providerAction?: 'swap' | 'aggregation' | 'addLiquidity' | 'withdrawLiquidity' | 'addSavers' | 'withdrawSavers' | 'borrow' | 'repay' | 'name' | 'donate' | 'claim' | 'stake' | 'unstake' | 'createOrder' | 'cancelOrder';
750
712
  providerOrderId?: string;
@@ -833,33 +795,14 @@ type InsertTrackedTransactionRequest = {
833
795
  explorerUrl?: string;
834
796
  providerExplorerUrl?: string;
835
797
  affiliate?: string;
836
- fees?: {
837
- network?: {
838
- identifier: string;
839
- amount: string;
840
- decimal?: number;
841
- };
842
- affiliate?: {
843
- identifier: string;
844
- amount: string;
845
- decimal?: number;
846
- };
847
- liquidity?: {
848
- identifier: string;
849
- amount: string;
850
- decimal?: number;
851
- };
852
- protocol?: {
853
- identifier: string;
854
- amount: string;
855
- decimal?: number;
856
- };
857
- tax?: {
858
- identifier: string;
859
- amount: string;
860
- decimal?: number;
861
- };
862
- };
798
+ fees?: Array<{
799
+ type: 'liquidity' | 'network' | 'inbound' | 'outbound' | 'affiliate' | 'service' | 'tax' | 'priority';
800
+ amount: string;
801
+ amountBps?: number;
802
+ asset: string;
803
+ chain: string;
804
+ protocol: 'CHAINFLIP' | 'CHAINFLIP_STREAMING' | 'MAYACHAIN' | 'MAYACHAIN_STREAMING' | 'ONEINCH' | 'PANCAKESWAP' | 'SUSHISWAP_V2' | 'THORCHAIN' | 'THORCHAIN_STREAMING' | 'TRADERJOE_V2' | 'UNISWAP_V2' | 'UNISWAP_V3' | 'JUPITER' | 'OKX' | 'NEAR' | 'GARDEN' | 'HARBOR' | 'FLASHNET' | 'MAYAN' | 'PANGOLIN_V1' | 'CAVIAR_V1' | 'OPENOCEAN_V2' | 'OCISWAP_V1' | 'CAMELOT_V3';
805
+ }>;
863
806
  provider?: 'CHAINFLIP' | 'CHAINFLIP_STREAMING' | 'MAYACHAIN' | 'MAYACHAIN_STREAMING' | 'ONEINCH' | 'PANCAKESWAP' | 'SUSHISWAP_V2' | 'THORCHAIN' | 'THORCHAIN_STREAMING' | 'TRADERJOE_V2' | 'UNISWAP_V2' | 'UNISWAP_V3' | 'JUPITER' | 'OKX' | 'NEAR' | 'GARDEN' | 'HARBOR' | 'FLASHNET' | 'MAYAN' | 'PANGOLIN_V1' | 'CAVIAR_V1' | 'OPENOCEAN_V2' | 'OCISWAP_V1' | 'CAMELOT_V3';
864
807
  providerAction?: 'swap' | 'aggregation' | 'addLiquidity' | 'withdrawLiquidity' | 'addSavers' | 'withdrawSavers' | 'borrow' | 'repay' | 'name' | 'donate' | 'claim' | 'stake' | 'unstake' | 'createOrder' | 'cancelOrder';
865
808
  providerOrderId?: string;
@@ -2093,33 +2036,14 @@ type TrackTransactionResponses = {
2093
2036
  explorerUrl?: string;
2094
2037
  providerExplorerUrl?: string;
2095
2038
  affiliate?: string;
2096
- fees?: {
2097
- network?: {
2098
- identifier: string;
2099
- amount: string;
2100
- decimal?: number;
2101
- };
2102
- affiliate?: {
2103
- identifier: string;
2104
- amount: string;
2105
- decimal?: number;
2106
- };
2107
- liquidity?: {
2108
- identifier: string;
2109
- amount: string;
2110
- decimal?: number;
2111
- };
2112
- protocol?: {
2113
- identifier: string;
2114
- amount: string;
2115
- decimal?: number;
2116
- };
2117
- tax?: {
2118
- identifier: string;
2119
- amount: string;
2120
- decimal?: number;
2121
- };
2122
- };
2039
+ fees?: Array<{
2040
+ type: 'liquidity' | 'network' | 'inbound' | 'outbound' | 'affiliate' | 'service' | 'tax' | 'priority';
2041
+ amount: string;
2042
+ amountBps?: number;
2043
+ asset: string;
2044
+ chain: string;
2045
+ protocol: 'CHAINFLIP' | 'CHAINFLIP_STREAMING' | 'MAYACHAIN' | 'MAYACHAIN_STREAMING' | 'ONEINCH' | 'PANCAKESWAP' | 'SUSHISWAP_V2' | 'THORCHAIN' | 'THORCHAIN_STREAMING' | 'TRADERJOE_V2' | 'UNISWAP_V2' | 'UNISWAP_V3' | 'JUPITER' | 'OKX' | 'NEAR' | 'GARDEN' | 'HARBOR' | 'FLASHNET' | 'MAYAN' | 'PANGOLIN_V1' | 'CAVIAR_V1' | 'OPENOCEAN_V2' | 'OCISWAP_V1' | 'CAMELOT_V3';
2046
+ }>;
2123
2047
  provider?: 'CHAINFLIP' | 'CHAINFLIP_STREAMING' | 'MAYACHAIN' | 'MAYACHAIN_STREAMING' | 'ONEINCH' | 'PANCAKESWAP' | 'SUSHISWAP_V2' | 'THORCHAIN' | 'THORCHAIN_STREAMING' | 'TRADERJOE_V2' | 'UNISWAP_V2' | 'UNISWAP_V3' | 'JUPITER' | 'OKX' | 'NEAR' | 'GARDEN' | 'HARBOR' | 'FLASHNET' | 'MAYAN' | 'PANGOLIN_V1' | 'CAVIAR_V1' | 'OPENOCEAN_V2' | 'OCISWAP_V1' | 'CAMELOT_V3';
2124
2048
  providerAction?: 'swap' | 'aggregation' | 'addLiquidity' | 'withdrawLiquidity' | 'addSavers' | 'withdrawSavers' | 'borrow' | 'repay' | 'name' | 'donate' | 'claim' | 'stake' | 'unstake' | 'createOrder' | 'cancelOrder';
2125
2049
  providerOrderId?: string;
@@ -2205,33 +2129,14 @@ type TrackTransactionResponses = {
2205
2129
  explorerUrl?: string;
2206
2130
  providerExplorerUrl?: string;
2207
2131
  affiliate?: string;
2208
- fees?: {
2209
- network?: {
2210
- identifier: string;
2211
- amount: string;
2212
- decimal?: number;
2213
- };
2214
- affiliate?: {
2215
- identifier: string;
2216
- amount: string;
2217
- decimal?: number;
2218
- };
2219
- liquidity?: {
2220
- identifier: string;
2221
- amount: string;
2222
- decimal?: number;
2223
- };
2224
- protocol?: {
2225
- identifier: string;
2226
- amount: string;
2227
- decimal?: number;
2228
- };
2229
- tax?: {
2230
- identifier: string;
2231
- amount: string;
2232
- decimal?: number;
2233
- };
2234
- };
2132
+ fees?: Array<{
2133
+ type: 'liquidity' | 'network' | 'inbound' | 'outbound' | 'affiliate' | 'service' | 'tax' | 'priority';
2134
+ amount: string;
2135
+ amountBps?: number;
2136
+ asset: string;
2137
+ chain: string;
2138
+ protocol: 'CHAINFLIP' | 'CHAINFLIP_STREAMING' | 'MAYACHAIN' | 'MAYACHAIN_STREAMING' | 'ONEINCH' | 'PANCAKESWAP' | 'SUSHISWAP_V2' | 'THORCHAIN' | 'THORCHAIN_STREAMING' | 'TRADERJOE_V2' | 'UNISWAP_V2' | 'UNISWAP_V3' | 'JUPITER' | 'OKX' | 'NEAR' | 'GARDEN' | 'HARBOR' | 'FLASHNET' | 'MAYAN' | 'PANGOLIN_V1' | 'CAVIAR_V1' | 'OPENOCEAN_V2' | 'OCISWAP_V1' | 'CAMELOT_V3';
2139
+ }>;
2235
2140
  provider?: 'CHAINFLIP' | 'CHAINFLIP_STREAMING' | 'MAYACHAIN' | 'MAYACHAIN_STREAMING' | 'ONEINCH' | 'PANCAKESWAP' | 'SUSHISWAP_V2' | 'THORCHAIN' | 'THORCHAIN_STREAMING' | 'TRADERJOE_V2' | 'UNISWAP_V2' | 'UNISWAP_V3' | 'JUPITER' | 'OKX' | 'NEAR' | 'GARDEN' | 'HARBOR' | 'FLASHNET' | 'MAYAN' | 'PANGOLIN_V1' | 'CAVIAR_V1' | 'OPENOCEAN_V2' | 'OCISWAP_V1' | 'CAMELOT_V3';
2236
2141
  providerAction?: 'swap' | 'aggregation' | 'addLiquidity' | 'withdrawLiquidity' | 'addSavers' | 'withdrawSavers' | 'borrow' | 'repay' | 'name' | 'donate' | 'claim' | 'stake' | 'unstake' | 'createOrder' | 'cancelOrder';
2237
2142
  providerOrderId?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swapkit/api-sdk-typescript",
3
- "version": "3.0.0",
3
+ "version": "4.0.0",
4
4
  "description": "Type-safe TypeScript SDK for the SwapKit API",
5
5
  "license": "MIT",
6
6
  "type": "module",
package/src/types.ts CHANGED
@@ -296,33 +296,14 @@ export type TrackTransactionResponse = {
296
296
  explorerUrl?: string;
297
297
  providerExplorerUrl?: string;
298
298
  affiliate?: string;
299
- fees?: {
300
- network?: {
301
- identifier: string;
302
- amount: string;
303
- decimal?: number;
304
- };
305
- affiliate?: {
306
- identifier: string;
307
- amount: string;
308
- decimal?: number;
309
- };
310
- liquidity?: {
311
- identifier: string;
312
- amount: string;
313
- decimal?: number;
314
- };
315
- protocol?: {
316
- identifier: string;
317
- amount: string;
318
- decimal?: number;
319
- };
320
- tax?: {
321
- identifier: string;
322
- amount: string;
323
- decimal?: number;
324
- };
325
- };
299
+ fees?: Array<{
300
+ type: 'liquidity' | 'network' | 'inbound' | 'outbound' | 'affiliate' | 'service' | 'tax' | 'priority';
301
+ amount: string;
302
+ amountBps?: number;
303
+ asset: string;
304
+ chain: string;
305
+ protocol: 'CHAINFLIP' | 'CHAINFLIP_STREAMING' | 'MAYACHAIN' | 'MAYACHAIN_STREAMING' | 'ONEINCH' | 'PANCAKESWAP' | 'SUSHISWAP_V2' | 'THORCHAIN' | 'THORCHAIN_STREAMING' | 'TRADERJOE_V2' | 'UNISWAP_V2' | 'UNISWAP_V3' | 'JUPITER' | 'OKX' | 'NEAR' | 'GARDEN' | 'HARBOR' | 'FLASHNET' | 'MAYAN' | 'PANGOLIN_V1' | 'CAVIAR_V1' | 'OPENOCEAN_V2' | 'OCISWAP_V1' | 'CAMELOT_V3';
306
+ }>;
326
307
  provider?: 'CHAINFLIP' | 'CHAINFLIP_STREAMING' | 'MAYACHAIN' | 'MAYACHAIN_STREAMING' | 'ONEINCH' | 'PANCAKESWAP' | 'SUSHISWAP_V2' | 'THORCHAIN' | 'THORCHAIN_STREAMING' | 'TRADERJOE_V2' | 'UNISWAP_V2' | 'UNISWAP_V3' | 'JUPITER' | 'OKX' | 'NEAR' | 'GARDEN' | 'HARBOR' | 'FLASHNET' | 'MAYAN' | 'PANGOLIN_V1' | 'CAVIAR_V1' | 'OPENOCEAN_V2' | 'OCISWAP_V1' | 'CAMELOT_V3';
327
308
  providerAction?: 'swap' | 'aggregation' | 'addLiquidity' | 'withdrawLiquidity' | 'addSavers' | 'withdrawSavers' | 'borrow' | 'repay' | 'name' | 'donate' | 'claim' | 'stake' | 'unstake' | 'createOrder' | 'cancelOrder';
328
309
  providerOrderId?: string;
@@ -408,33 +389,14 @@ export type TrackTransactionResponse = {
408
389
  explorerUrl?: string;
409
390
  providerExplorerUrl?: string;
410
391
  affiliate?: string;
411
- fees?: {
412
- network?: {
413
- identifier: string;
414
- amount: string;
415
- decimal?: number;
416
- };
417
- affiliate?: {
418
- identifier: string;
419
- amount: string;
420
- decimal?: number;
421
- };
422
- liquidity?: {
423
- identifier: string;
424
- amount: string;
425
- decimal?: number;
426
- };
427
- protocol?: {
428
- identifier: string;
429
- amount: string;
430
- decimal?: number;
431
- };
432
- tax?: {
433
- identifier: string;
434
- amount: string;
435
- decimal?: number;
436
- };
437
- };
392
+ fees?: Array<{
393
+ type: 'liquidity' | 'network' | 'inbound' | 'outbound' | 'affiliate' | 'service' | 'tax' | 'priority';
394
+ amount: string;
395
+ amountBps?: number;
396
+ asset: string;
397
+ chain: string;
398
+ protocol: 'CHAINFLIP' | 'CHAINFLIP_STREAMING' | 'MAYACHAIN' | 'MAYACHAIN_STREAMING' | 'ONEINCH' | 'PANCAKESWAP' | 'SUSHISWAP_V2' | 'THORCHAIN' | 'THORCHAIN_STREAMING' | 'TRADERJOE_V2' | 'UNISWAP_V2' | 'UNISWAP_V3' | 'JUPITER' | 'OKX' | 'NEAR' | 'GARDEN' | 'HARBOR' | 'FLASHNET' | 'MAYAN' | 'PANGOLIN_V1' | 'CAVIAR_V1' | 'OPENOCEAN_V2' | 'OCISWAP_V1' | 'CAMELOT_V3';
399
+ }>;
438
400
  provider?: 'CHAINFLIP' | 'CHAINFLIP_STREAMING' | 'MAYACHAIN' | 'MAYACHAIN_STREAMING' | 'ONEINCH' | 'PANCAKESWAP' | 'SUSHISWAP_V2' | 'THORCHAIN' | 'THORCHAIN_STREAMING' | 'TRADERJOE_V2' | 'UNISWAP_V2' | 'UNISWAP_V3' | 'JUPITER' | 'OKX' | 'NEAR' | 'GARDEN' | 'HARBOR' | 'FLASHNET' | 'MAYAN' | 'PANGOLIN_V1' | 'CAVIAR_V1' | 'OPENOCEAN_V2' | 'OCISWAP_V1' | 'CAMELOT_V3';
439
401
  providerAction?: 'swap' | 'aggregation' | 'addLiquidity' | 'withdrawLiquidity' | 'addSavers' | 'withdrawSavers' | 'borrow' | 'repay' | 'name' | 'donate' | 'claim' | 'stake' | 'unstake' | 'createOrder' | 'cancelOrder';
440
402
  providerOrderId?: string;
@@ -524,33 +486,14 @@ export type InsertTrackedTransactionRequest = {
524
486
  explorerUrl?: string;
525
487
  providerExplorerUrl?: string;
526
488
  affiliate?: string;
527
- fees?: {
528
- network?: {
529
- identifier: string;
530
- amount: string;
531
- decimal?: number;
532
- };
533
- affiliate?: {
534
- identifier: string;
535
- amount: string;
536
- decimal?: number;
537
- };
538
- liquidity?: {
539
- identifier: string;
540
- amount: string;
541
- decimal?: number;
542
- };
543
- protocol?: {
544
- identifier: string;
545
- amount: string;
546
- decimal?: number;
547
- };
548
- tax?: {
549
- identifier: string;
550
- amount: string;
551
- decimal?: number;
552
- };
553
- };
489
+ fees?: Array<{
490
+ type: 'liquidity' | 'network' | 'inbound' | 'outbound' | 'affiliate' | 'service' | 'tax' | 'priority';
491
+ amount: string;
492
+ amountBps?: number;
493
+ asset: string;
494
+ chain: string;
495
+ protocol: 'CHAINFLIP' | 'CHAINFLIP_STREAMING' | 'MAYACHAIN' | 'MAYACHAIN_STREAMING' | 'ONEINCH' | 'PANCAKESWAP' | 'SUSHISWAP_V2' | 'THORCHAIN' | 'THORCHAIN_STREAMING' | 'TRADERJOE_V2' | 'UNISWAP_V2' | 'UNISWAP_V3' | 'JUPITER' | 'OKX' | 'NEAR' | 'GARDEN' | 'HARBOR' | 'FLASHNET' | 'MAYAN' | 'PANGOLIN_V1' | 'CAVIAR_V1' | 'OPENOCEAN_V2' | 'OCISWAP_V1' | 'CAMELOT_V3';
496
+ }>;
554
497
  provider?: 'CHAINFLIP' | 'CHAINFLIP_STREAMING' | 'MAYACHAIN' | 'MAYACHAIN_STREAMING' | 'ONEINCH' | 'PANCAKESWAP' | 'SUSHISWAP_V2' | 'THORCHAIN' | 'THORCHAIN_STREAMING' | 'TRADERJOE_V2' | 'UNISWAP_V2' | 'UNISWAP_V3' | 'JUPITER' | 'OKX' | 'NEAR' | 'GARDEN' | 'HARBOR' | 'FLASHNET' | 'MAYAN' | 'PANGOLIN_V1' | 'CAVIAR_V1' | 'OPENOCEAN_V2' | 'OCISWAP_V1' | 'CAMELOT_V3';
555
498
  providerAction?: 'swap' | 'aggregation' | 'addLiquidity' | 'withdrawLiquidity' | 'addSavers' | 'withdrawSavers' | 'borrow' | 'repay' | 'name' | 'donate' | 'claim' | 'stake' | 'unstake' | 'createOrder' | 'cancelOrder';
556
499
  providerOrderId?: string;
@@ -1831,33 +1774,14 @@ export type TrackTransactionResponses = {
1831
1774
  explorerUrl?: string;
1832
1775
  providerExplorerUrl?: string;
1833
1776
  affiliate?: string;
1834
- fees?: {
1835
- network?: {
1836
- identifier: string;
1837
- amount: string;
1838
- decimal?: number;
1839
- };
1840
- affiliate?: {
1841
- identifier: string;
1842
- amount: string;
1843
- decimal?: number;
1844
- };
1845
- liquidity?: {
1846
- identifier: string;
1847
- amount: string;
1848
- decimal?: number;
1849
- };
1850
- protocol?: {
1851
- identifier: string;
1852
- amount: string;
1853
- decimal?: number;
1854
- };
1855
- tax?: {
1856
- identifier: string;
1857
- amount: string;
1858
- decimal?: number;
1859
- };
1860
- };
1777
+ fees?: Array<{
1778
+ type: 'liquidity' | 'network' | 'inbound' | 'outbound' | 'affiliate' | 'service' | 'tax' | 'priority';
1779
+ amount: string;
1780
+ amountBps?: number;
1781
+ asset: string;
1782
+ chain: string;
1783
+ protocol: 'CHAINFLIP' | 'CHAINFLIP_STREAMING' | 'MAYACHAIN' | 'MAYACHAIN_STREAMING' | 'ONEINCH' | 'PANCAKESWAP' | 'SUSHISWAP_V2' | 'THORCHAIN' | 'THORCHAIN_STREAMING' | 'TRADERJOE_V2' | 'UNISWAP_V2' | 'UNISWAP_V3' | 'JUPITER' | 'OKX' | 'NEAR' | 'GARDEN' | 'HARBOR' | 'FLASHNET' | 'MAYAN' | 'PANGOLIN_V1' | 'CAVIAR_V1' | 'OPENOCEAN_V2' | 'OCISWAP_V1' | 'CAMELOT_V3';
1784
+ }>;
1861
1785
  provider?: 'CHAINFLIP' | 'CHAINFLIP_STREAMING' | 'MAYACHAIN' | 'MAYACHAIN_STREAMING' | 'ONEINCH' | 'PANCAKESWAP' | 'SUSHISWAP_V2' | 'THORCHAIN' | 'THORCHAIN_STREAMING' | 'TRADERJOE_V2' | 'UNISWAP_V2' | 'UNISWAP_V3' | 'JUPITER' | 'OKX' | 'NEAR' | 'GARDEN' | 'HARBOR' | 'FLASHNET' | 'MAYAN' | 'PANGOLIN_V1' | 'CAVIAR_V1' | 'OPENOCEAN_V2' | 'OCISWAP_V1' | 'CAMELOT_V3';
1862
1786
  providerAction?: 'swap' | 'aggregation' | 'addLiquidity' | 'withdrawLiquidity' | 'addSavers' | 'withdrawSavers' | 'borrow' | 'repay' | 'name' | 'donate' | 'claim' | 'stake' | 'unstake' | 'createOrder' | 'cancelOrder';
1863
1787
  providerOrderId?: string;
@@ -1943,33 +1867,14 @@ export type TrackTransactionResponses = {
1943
1867
  explorerUrl?: string;
1944
1868
  providerExplorerUrl?: string;
1945
1869
  affiliate?: string;
1946
- fees?: {
1947
- network?: {
1948
- identifier: string;
1949
- amount: string;
1950
- decimal?: number;
1951
- };
1952
- affiliate?: {
1953
- identifier: string;
1954
- amount: string;
1955
- decimal?: number;
1956
- };
1957
- liquidity?: {
1958
- identifier: string;
1959
- amount: string;
1960
- decimal?: number;
1961
- };
1962
- protocol?: {
1963
- identifier: string;
1964
- amount: string;
1965
- decimal?: number;
1966
- };
1967
- tax?: {
1968
- identifier: string;
1969
- amount: string;
1970
- decimal?: number;
1971
- };
1972
- };
1870
+ fees?: Array<{
1871
+ type: 'liquidity' | 'network' | 'inbound' | 'outbound' | 'affiliate' | 'service' | 'tax' | 'priority';
1872
+ amount: string;
1873
+ amountBps?: number;
1874
+ asset: string;
1875
+ chain: string;
1876
+ protocol: 'CHAINFLIP' | 'CHAINFLIP_STREAMING' | 'MAYACHAIN' | 'MAYACHAIN_STREAMING' | 'ONEINCH' | 'PANCAKESWAP' | 'SUSHISWAP_V2' | 'THORCHAIN' | 'THORCHAIN_STREAMING' | 'TRADERJOE_V2' | 'UNISWAP_V2' | 'UNISWAP_V3' | 'JUPITER' | 'OKX' | 'NEAR' | 'GARDEN' | 'HARBOR' | 'FLASHNET' | 'MAYAN' | 'PANGOLIN_V1' | 'CAVIAR_V1' | 'OPENOCEAN_V2' | 'OCISWAP_V1' | 'CAMELOT_V3';
1877
+ }>;
1973
1878
  provider?: 'CHAINFLIP' | 'CHAINFLIP_STREAMING' | 'MAYACHAIN' | 'MAYACHAIN_STREAMING' | 'ONEINCH' | 'PANCAKESWAP' | 'SUSHISWAP_V2' | 'THORCHAIN' | 'THORCHAIN_STREAMING' | 'TRADERJOE_V2' | 'UNISWAP_V2' | 'UNISWAP_V3' | 'JUPITER' | 'OKX' | 'NEAR' | 'GARDEN' | 'HARBOR' | 'FLASHNET' | 'MAYAN' | 'PANGOLIN_V1' | 'CAVIAR_V1' | 'OPENOCEAN_V2' | 'OCISWAP_V1' | 'CAMELOT_V3';
1974
1879
  providerAction?: 'swap' | 'aggregation' | 'addLiquidity' | 'withdrawLiquidity' | 'addSavers' | 'withdrawSavers' | 'borrow' | 'repay' | 'name' | 'donate' | 'claim' | 'stake' | 'unstake' | 'createOrder' | 'cancelOrder';
1975
1880
  providerOrderId?: string;