@rabby-wallet/rabby-api 0.9.48-1 → 0.9.48-3

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.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { AxiosAdapter, AxiosRequestConfig } from 'axios';
2
2
  import { RateLimitedAxiosInstance } from 'axios-rate-limit';
3
3
  import { InitOptions, RabbyApiPlugin } from './plugins/intf';
4
- import { AddrDescResponse, BridgeAggregator, ApprovalStatus, AssetItem, BasicDappInfo, CEXQuote, Cex, ChainListItem, ChainWithPendingCount, Collection, CollectionList, CollectionWithFloorPrice, ComplexProtocol, ContractCredit, DbkBridgeHistoryItem, ExplainTxResponse, ExplainTypedDataResponse, GasLevel, GetTxResponse, HistoryCurve, LatestExplainTxResponse, MempoolCheckDetail, NFTApprovalResponse, NFTItem, NodeStatus, NodeStatusDetail, ParseTextResponse, ParseTxResponse, ParseTypedDataResponse, PendingTxItem, Protocol, SecurityCheckResponse, ServerChain, SlippageStatus, Summary, SupportedChain, SwapTradeList, TokenApproval, TokenItem, TotalBalanceResponse, Tx, TxAllHistoryResult, TxHistoryResult, TxPushType, TxRequest, UsedChain, BridgeTokenPair, BridgeQuote, BridgeHistory, ContractInfo, GasAccountCheckResult, ParseCommonResponse, WithdrawListAddressItem, BuyCountryItem, BuyQuoteItem, BuyHistoryList, BuyPaymentMethod, GasAccountInfo, TokenEntityDetail, TokenItemWithEntity, ProjectItem, CopyTradeTokenListResponse, CopyTradeRecentBuyListResponse, CopyTradePnlListResponse, AppChainListResponse, CopyTradeTokenListV2Response, CopyTradeRecentBuyListV2Response, CopyTradeTokenItemV2, CopyTradeSameToken, DefaultRPCRes, TokenDetailWithPriceCurve, GiftEligibilityItem, UserFeedbackItem, PerpTopToken, KlineDataItem, TokenMarketInfo, TokenHolderInfo, TokenSupplyInfo, MarketSummary, MarketTradingHistoryItem, TokenHolderSummary, TokenHolderItem, CurrencyItem, PerpBridgeQuote, LiquidityPoolItem, LiquidityPoolHistoryItem, NFTDetail, NFTTradingConfig, PrepareAcceptNFTOfferResponse, PrepareListingNFTResponse, CreateListingNFTOfferResponse } from './types';
4
+ import { AddrDescResponse, BridgeAggregator, ApprovalStatus, AssetItem, BasicDappInfo, CEXQuote, Cex, ChainListItem, ChainWithPendingCount, Collection, CollectionList, CollectionWithFloorPrice, ComplexProtocol, ContractCredit, DbkBridgeHistoryItem, ExplainTxResponse, ExplainTypedDataResponse, GasLevel, GetTxResponse, HistoryCurve, LatestExplainTxResponse, MempoolCheckDetail, NFTApprovalResponse, NFTItem, NodeStatus, NodeStatusDetail, ParseTextResponse, ParseTxResponse, ParseTypedDataResponse, PendingTxItem, Protocol, SecurityCheckResponse, ServerChain, SlippageStatus, Summary, SupportedChain, SwapTradeList, TokenApproval, TokenItem, TotalBalanceResponse, Tx, TxAllHistoryResult, TxHistoryResult, TxPushType, TxRequest, UsedChain, BridgeTokenPair, BridgeQuote, BridgeHistory, ContractInfo, GasAccountCheckResult, ParseCommonResponse, WithdrawListAddressItem, BuyCountryItem, BuyQuoteItem, BuyHistoryList, BuyPaymentMethod, GasAccountInfo, TokenEntityDetail, TokenItemWithEntity, ProjectItem, CopyTradeTokenListResponse, CopyTradeRecentBuyListResponse, CopyTradePnlListResponse, AppChainListResponse, CopyTradeTokenListV2Response, CopyTradeRecentBuyListV2Response, CopyTradeTokenItemV2, CopyTradeSameToken, DefaultRPCRes, TokenDetailWithPriceCurve, GiftEligibilityItem, UserFeedbackItem, PerpTopToken, KlineDataItem, TokenMarketInfo, TokenHolderInfo, TokenSupplyInfo, MarketSummary, MarketTradingHistoryItem, TokenHolderSummary, TokenHolderItem, CurrencyItem, PerpBridgeQuote, LiquidityPoolItem, LiquidityPoolHistoryItem, NFTDetail, NFTTradingConfig, PrepareAcceptNFTOfferResponse, PrepareListingNFTResponse, CreateListingNFTOfferResponse, NFTListingResponse } from './types';
5
5
  interface OpenApiStore {
6
6
  host: string;
7
7
  testnetHost?: string;
@@ -1390,7 +1390,15 @@ export declare class OpenApiService {
1390
1390
  id: string;
1391
1391
  user_addr: string;
1392
1392
  }) => Promise<NFTDetail>;
1393
- getNFTCollectionFees: (params: {
1393
+ getNFTListingOrders: (params: {
1394
+ maker: string;
1395
+ chain_id: string;
1396
+ collection_id: string;
1397
+ inner_id: string;
1398
+ limit?: number;
1399
+ cursor?: string;
1400
+ }) => Promise<NFTListingResponse>;
1401
+ getNFTFees: (params: {
1394
1402
  chain_id: string;
1395
1403
  collection_id: string;
1396
1404
  inner_id: string;
@@ -1439,6 +1447,7 @@ export declare class OpenApiService {
1439
1447
  collection_id: string;
1440
1448
  inner_id: string;
1441
1449
  quantity?: number;
1450
+ include_optional_creator_fees?: boolean;
1442
1451
  }) => Promise<PrepareAcceptNFTOfferResponse>;
1443
1452
  }
1444
1453
  export {};
package/dist/index.js CHANGED
@@ -1787,7 +1787,13 @@ export class OpenApiService {
1787
1787
  });
1788
1788
  return data;
1789
1789
  });
1790
- this.getNFTCollectionFees = (params) => __awaiter(this, void 0, void 0, function* () {
1790
+ this.getNFTListingOrders = (params) => __awaiter(this, void 0, void 0, function* () {
1791
+ const { data } = yield this.request.get('/v1/nft/order/listing', {
1792
+ params,
1793
+ });
1794
+ return data;
1795
+ });
1796
+ this.getNFTFees = (params) => __awaiter(this, void 0, void 0, function* () {
1791
1797
  const { data } = yield this.request.get('/v1/nft/fee', {
1792
1798
  params,
1793
1799
  });
package/dist/types.d.ts CHANGED
@@ -421,6 +421,8 @@ export interface Collection {
421
421
  };
422
422
  };
423
423
  is_tradable?: boolean;
424
+ is_erc721?: boolean;
425
+ is_erc1155?: boolean;
424
426
  }
425
427
  export interface CollectionList {
426
428
  id: string;
@@ -1841,189 +1843,6 @@ export declare type NFTTradingConfig = Record<string, {
1841
1843
  };
1842
1844
  }>;
1843
1845
  export interface NFTDetail extends NFTItem {
1844
- listing_order: {
1845
- created_date: string;
1846
- closing_date: string;
1847
- listing_time: number;
1848
- expiration_time: number;
1849
- order_hash: string;
1850
- protocol_data: {
1851
- parameters: {
1852
- offerer: string;
1853
- offer: Array<{
1854
- itemType: number;
1855
- token: string;
1856
- identifierOrCriteria: string;
1857
- startAmount: string;
1858
- endAmount: string;
1859
- }>;
1860
- consideration: Array<{
1861
- itemType: number;
1862
- token: string;
1863
- identifierOrCriteria: string;
1864
- startAmount: string;
1865
- endAmount: string;
1866
- recipient: string;
1867
- }>;
1868
- startTime: string;
1869
- endTime: string;
1870
- orderType: number;
1871
- zone: string;
1872
- zoneHash: string;
1873
- salt: string;
1874
- conduitKey: string;
1875
- totalOriginalConsiderationItems: number;
1876
- counter: number;
1877
- };
1878
- signature: null;
1879
- };
1880
- protocol_address: string;
1881
- current_price: string;
1882
- maker: {
1883
- address: string;
1884
- profile_img_url: null;
1885
- config: null;
1886
- };
1887
- taker: null;
1888
- maker_fees: any[];
1889
- taker_fees: any[];
1890
- side: 'ask' | 'bid';
1891
- order_type: 'basic' | string;
1892
- cancelled: boolean;
1893
- finalized: boolean;
1894
- marked_invalid: boolean;
1895
- remaining_quantity: number;
1896
- maker_asset_bundle: {
1897
- assets: Array<{
1898
- id: null;
1899
- token_id: string;
1900
- num_sales: null;
1901
- background_color: null;
1902
- image_url: string | null;
1903
- image_preview_url: null;
1904
- image_thumbnail_url: null;
1905
- image_original_url: null;
1906
- animation_url: null;
1907
- animation_original_url: null;
1908
- name: string;
1909
- description: string | null;
1910
- external_link: null;
1911
- asset_contract: {
1912
- address: string;
1913
- chain_identifier: string;
1914
- schema_name: 'ERC721' | 'ERC1155' | 'NATIVE' | string;
1915
- asset_contract_type: 'non-fungible' | 'semi-fungible' | 'unknown';
1916
- };
1917
- permalink: string | null;
1918
- collection: {
1919
- collection: string;
1920
- name: string;
1921
- description: string;
1922
- image_url: string;
1923
- banner_image_url: string;
1924
- owner: string;
1925
- safelist_status: 'not_requested' | 'verified' | string;
1926
- category: string;
1927
- is_disabled: boolean;
1928
- is_nsfw: boolean;
1929
- trait_offers_enabled: boolean;
1930
- collection_offers_enabled: boolean;
1931
- opensea_url: string;
1932
- project_url: string;
1933
- wiki_url: string;
1934
- discord_url: string;
1935
- telegram_url: string;
1936
- twitter_username: string;
1937
- instagram_username: string;
1938
- contracts: Array<{
1939
- address: string;
1940
- chain: string;
1941
- }>;
1942
- } | null;
1943
- decimals: number | null;
1944
- token_metadata: null;
1945
- is_nsfw: boolean | null;
1946
- owner: {
1947
- address: string;
1948
- profile_img_url: null;
1949
- config: null;
1950
- } | null;
1951
- }>;
1952
- maker: null;
1953
- asset_contract: null;
1954
- slug: null;
1955
- name: null;
1956
- description: null;
1957
- external_link: null;
1958
- permalink: null;
1959
- seaport_sell_orders: null;
1960
- };
1961
- taker_asset_bundle: {
1962
- assets: Array<{
1963
- id: null;
1964
- token_id: string;
1965
- num_sales: null;
1966
- background_color: null;
1967
- image_url: string | null;
1968
- image_preview_url: null;
1969
- image_thumbnail_url: null;
1970
- image_original_url: null;
1971
- animation_url: null;
1972
- animation_original_url: null;
1973
- name: string;
1974
- description: string | null;
1975
- external_link: null;
1976
- asset_contract: {
1977
- address: string;
1978
- chain_identifier: string;
1979
- schema_name: 'ERC721' | 'ERC1155' | 'NATIVE' | string;
1980
- asset_contract_type: 'non-fungible' | 'semi-fungible' | 'unknown';
1981
- };
1982
- permalink: string | null;
1983
- collection: {
1984
- collection: string;
1985
- name: string;
1986
- description: string;
1987
- image_url: string;
1988
- banner_image_url: string;
1989
- owner: string;
1990
- safelist_status: 'not_requested' | 'verified' | string;
1991
- category: string;
1992
- is_disabled: boolean;
1993
- is_nsfw: boolean;
1994
- trait_offers_enabled: boolean;
1995
- collection_offers_enabled: boolean;
1996
- opensea_url: string;
1997
- project_url: string;
1998
- wiki_url: string;
1999
- discord_url: string;
2000
- telegram_url: string;
2001
- twitter_username: string;
2002
- instagram_username: string;
2003
- contracts: Array<{
2004
- address: string;
2005
- chain: string;
2006
- }>;
2007
- } | null;
2008
- decimals: number | null;
2009
- token_metadata: null;
2010
- is_nsfw: boolean | null;
2011
- owner: {
2012
- address: string;
2013
- profile_img_url: null;
2014
- config: null;
2015
- } | null;
2016
- }>;
2017
- maker: null;
2018
- asset_contract: null;
2019
- slug: null;
2020
- name: null;
2021
- description: null;
2022
- external_link: null;
2023
- permalink: null;
2024
- seaport_sell_orders: null;
2025
- };
2026
- } | null;
2027
1846
  best_offer_order: {
2028
1847
  order_hash: string;
2029
1848
  chain: string;
@@ -2098,6 +1917,193 @@ export interface NFTDetail extends NFTItem {
2098
1917
  quantity: number;
2099
1918
  } | null;
2100
1919
  }
1920
+ export interface NFTListingOrder {
1921
+ created_date: string;
1922
+ closing_date: string;
1923
+ listing_time: number;
1924
+ expiration_time: number;
1925
+ order_hash: string;
1926
+ protocol_data: {
1927
+ parameters: {
1928
+ offerer: string;
1929
+ offer: Array<{
1930
+ itemType: number;
1931
+ token: string;
1932
+ identifierOrCriteria: string;
1933
+ startAmount: string;
1934
+ endAmount: string;
1935
+ }>;
1936
+ consideration: Array<{
1937
+ itemType: number;
1938
+ token: string;
1939
+ identifierOrCriteria: string;
1940
+ startAmount: string;
1941
+ endAmount: string;
1942
+ recipient: string;
1943
+ }>;
1944
+ startTime: string;
1945
+ endTime: string;
1946
+ orderType: number;
1947
+ zone: string;
1948
+ zoneHash: string;
1949
+ salt: string;
1950
+ conduitKey: string;
1951
+ totalOriginalConsiderationItems: number;
1952
+ counter: number;
1953
+ };
1954
+ signature: null;
1955
+ };
1956
+ protocol_address: string;
1957
+ current_price: string;
1958
+ maker: {
1959
+ address: string;
1960
+ profile_img_url: null;
1961
+ config: null;
1962
+ };
1963
+ taker: null;
1964
+ maker_fees: any[];
1965
+ taker_fees: any[];
1966
+ side: 'ask' | 'bid';
1967
+ order_type: 'basic' | string;
1968
+ cancelled: boolean;
1969
+ finalized: boolean;
1970
+ marked_invalid: boolean;
1971
+ remaining_quantity: number;
1972
+ maker_asset_bundle: {
1973
+ assets: Array<{
1974
+ id: null;
1975
+ token_id: string;
1976
+ num_sales: null;
1977
+ background_color: null;
1978
+ image_url: string | null;
1979
+ image_preview_url: null;
1980
+ image_thumbnail_url: null;
1981
+ image_original_url: null;
1982
+ animation_url: null;
1983
+ animation_original_url: null;
1984
+ name: string;
1985
+ description: string | null;
1986
+ external_link: null;
1987
+ asset_contract: {
1988
+ address: string;
1989
+ chain_identifier: string;
1990
+ schema_name: 'ERC721' | 'ERC1155' | 'NATIVE' | string;
1991
+ asset_contract_type: 'non-fungible' | 'semi-fungible' | 'unknown';
1992
+ };
1993
+ permalink: string | null;
1994
+ collection: {
1995
+ collection: string;
1996
+ name: string;
1997
+ description: string;
1998
+ image_url: string;
1999
+ banner_image_url: string;
2000
+ owner: string;
2001
+ safelist_status: 'not_requested' | 'verified' | string;
2002
+ category: string;
2003
+ is_disabled: boolean;
2004
+ is_nsfw: boolean;
2005
+ trait_offers_enabled: boolean;
2006
+ collection_offers_enabled: boolean;
2007
+ opensea_url: string;
2008
+ project_url: string;
2009
+ wiki_url: string;
2010
+ discord_url: string;
2011
+ telegram_url: string;
2012
+ twitter_username: string;
2013
+ instagram_username: string;
2014
+ contracts: Array<{
2015
+ address: string;
2016
+ chain: string;
2017
+ }>;
2018
+ } | null;
2019
+ decimals: number | null;
2020
+ token_metadata: null;
2021
+ is_nsfw: boolean | null;
2022
+ owner: {
2023
+ address: string;
2024
+ profile_img_url: null;
2025
+ config: null;
2026
+ } | null;
2027
+ }>;
2028
+ maker: null;
2029
+ asset_contract: null;
2030
+ slug: null;
2031
+ name: null;
2032
+ description: null;
2033
+ external_link: null;
2034
+ permalink: null;
2035
+ seaport_sell_orders: null;
2036
+ };
2037
+ taker_asset_bundle: {
2038
+ assets: Array<{
2039
+ id: null;
2040
+ token_id: string;
2041
+ num_sales: null;
2042
+ background_color: null;
2043
+ image_url: string | null;
2044
+ image_preview_url: null;
2045
+ image_thumbnail_url: null;
2046
+ image_original_url: null;
2047
+ animation_url: null;
2048
+ animation_original_url: null;
2049
+ name: string;
2050
+ description: string | null;
2051
+ external_link: null;
2052
+ asset_contract: {
2053
+ address: string;
2054
+ chain_identifier: string;
2055
+ schema_name: 'ERC721' | 'ERC1155' | 'NATIVE' | string;
2056
+ asset_contract_type: 'non-fungible' | 'semi-fungible' | 'unknown';
2057
+ };
2058
+ permalink: string | null;
2059
+ collection: {
2060
+ collection: string;
2061
+ name: string;
2062
+ description: string;
2063
+ image_url: string;
2064
+ banner_image_url: string;
2065
+ owner: string;
2066
+ safelist_status: 'not_requested' | 'verified' | string;
2067
+ category: string;
2068
+ is_disabled: boolean;
2069
+ is_nsfw: boolean;
2070
+ trait_offers_enabled: boolean;
2071
+ collection_offers_enabled: boolean;
2072
+ opensea_url: string;
2073
+ project_url: string;
2074
+ wiki_url: string;
2075
+ discord_url: string;
2076
+ telegram_url: string;
2077
+ twitter_username: string;
2078
+ instagram_username: string;
2079
+ contracts: Array<{
2080
+ address: string;
2081
+ chain: string;
2082
+ }>;
2083
+ } | null;
2084
+ decimals: number | null;
2085
+ token_metadata: null;
2086
+ is_nsfw: boolean | null;
2087
+ owner: {
2088
+ address: string;
2089
+ profile_img_url: null;
2090
+ config: null;
2091
+ } | null;
2092
+ }>;
2093
+ maker: null;
2094
+ asset_contract: null;
2095
+ slug: null;
2096
+ name: null;
2097
+ description: null;
2098
+ external_link: null;
2099
+ permalink: null;
2100
+ seaport_sell_orders: null;
2101
+ };
2102
+ }
2103
+ export interface NFTListingResponse {
2104
+ orders: NFTListingOrder[];
2105
+ next: string | null;
2106
+ }
2101
2107
  export interface PrepareListingNFTResponse {
2102
2108
  data: {
2103
2109
  sign: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rabby-wallet/rabby-api",
3
- "version": "0.9.48-1",
3
+ "version": "0.9.48-3",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [