@usewhisk/cctp 0.1.0 → 0.1.1

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.cjs CHANGED
@@ -2493,6 +2493,20 @@ async function isStellarNonceUsed(chain, nonce, options = {}) {
2493
2493
  );
2494
2494
  }
2495
2495
 
2496
+ // src/rpc/starknetClass.ts
2497
+ var CONTRACT_NOT_FOUND = 20;
2498
+ var FELT = /^0x[0-9a-fA-F]{1,64}$/;
2499
+ async function getStarknetClassHashAt(chain, address, options = {}) {
2500
+ return callRpc(
2501
+ chain,
2502
+ "starknet_getClassHashAt",
2503
+ { block_id: "latest", contract_address: address },
2504
+ (r) => typeof r === "string" && FELT.test(r) ? r : void 0,
2505
+ options,
2506
+ (code) => code === CONTRACT_NOT_FOUND ? null : void 0
2507
+ );
2508
+ }
2509
+
2496
2510
  // src/rpc/starknetTx.ts
2497
2511
  var TXN_HASH_NOT_FOUND = 29;
2498
2512
  var ACCEPTED = /* @__PURE__ */ new Set(["ACCEPTED_ON_L2", "ACCEPTED_ON_L1"]);
@@ -3957,6 +3971,7 @@ exports.getGasPrice = getGasPrice;
3957
3971
  exports.getMessages = getMessages;
3958
3972
  exports.getSignedBurnQuote = getSignedBurnQuote;
3959
3973
  exports.getStandardMinFee = getStandardMinFee;
3974
+ exports.getStarknetClassHashAt = getStarknetClassHashAt;
3960
3975
  exports.getStarknetTransactionStatus = getStarknetTransactionStatus;
3961
3976
  exports.getTransactionStatus = getTransactionStatus;
3962
3977
  exports.getUsdcBalance = getUsdcBalance;