@agglayer/sdk 1.0.0-beta.18 → 1.0.0-beta.19

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.mjs CHANGED
@@ -1713,6 +1713,10 @@ var ArcApiService = class {
1713
1713
  transactionsRequestQueryParams
1714
1714
  });
1715
1715
  }
1716
+ async tokenMappings(tokenMappingQueryParams) {
1717
+ const { tokenAddress } = tokenMappingQueryParams;
1718
+ return this.httpClient.get(`/token-mappings/${tokenAddress}`);
1719
+ }
1716
1720
  };
1717
1721
 
1718
1722
  // src/core/utils/apiError.ts
@@ -1982,6 +1986,31 @@ var CoreClient = class {
1982
1986
  throw ApiError.createFallbackError(error, "Get transactions");
1983
1987
  }
1984
1988
  }
1989
+ /**
1990
+ * Get token mappings by token address
1991
+ * @developer Note: Do not misinterpret network ID as chain ID.
1992
+ *
1993
+ * @param tokenAddress
1994
+ */
1995
+ async getTokenMappings(tokenMappingQueryParams) {
1996
+ try {
1997
+ const response = await this.arcApiService.tokenMappings(
1998
+ tokenMappingQueryParams
1999
+ );
2000
+ if (response.data.status === "success") {
2001
+ return response.data.data;
2002
+ }
2003
+ throw ApiError.fromErrorResponse(response.data);
2004
+ } catch (error) {
2005
+ if (error instanceof ApiError) {
2006
+ throw error;
2007
+ }
2008
+ throw ApiError.createFallbackError(
2009
+ error,
2010
+ "Get custom token mappings"
2011
+ );
2012
+ }
2013
+ }
1985
2014
  };
1986
2015
 
1987
2016
  // src/index.ts