alkanesjs 1.0.9 → 1.1.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.ts CHANGED
@@ -42,6 +42,14 @@ type EsploraAddressStats = {
42
42
  spent_txo_sum: number;
43
43
  tx_count: number;
44
44
  };
45
+ interface IEsploraBlockHeader {
46
+ /** block height you asked for */
47
+ height: number;
48
+ /** 32‑byte block‑hash (hex, lowercase, no “0x”) */
49
+ hash: string;
50
+ /** 80‑byte raw header, hex‑encoded (160 chars) */
51
+ headerHex: string;
52
+ }
45
53
  type EsploraAddressResponse = {
46
54
  address: string;
47
55
  chain_stats: EsploraAddressStats;
@@ -1427,4 +1435,4 @@ declare class TokenContract extends TokenContract_base {
1427
1435
  }
1428
1436
 
1429
1437
  export { AddressType, AlkanesBaseContract, AlkanesExecuteError, AlkanesFetchError, AlkanesInscription, AlkanesRpcProvider, AlkanesSimulationError, AlkanesTraceError, BaseRpcProvider, DecodableAlkanesResponse, DecodeError, EcPair, ElectrumApiProvider, Encodable, EncodeError, EsploraFetchError, OrdFetchError, OrdRpcProvider, ParsableAlkaneId, ProtostoneTransaction, ProtostoneTransactionWithInscription, Provider, RpcError, RunesFetchError, RunesRpcProvider, SandshrewFetchError, SandshrewRpcProvider, TokenABI, TokenContract, abi, addInputDynamic, assertHex, buildRpcCall, calculateTaprootTxSize, decodeAlkanesTrace, decodeCBOR, excludeFields, execute, extractAbiErrorMessage, extractWithDummySigs, formatInputsToSign, getAddressType, getDummyProtostoneTransaction, getEstimatedFee, getProtostoneTransactionsWithInscription, getProtostoneUnsignedPsbtBase64, getVSize, hexToUint8Array, mapToPrimitives, minimumFee, parseSimulateReturn, psbtBuilder, redeemTypeFromOutput, reverseHexBytes, schemaAlkaneId, simulate, sleep, stripHex, tapTweakHash, toEsploraTx, toFormattedUtxo, trimUndefined, tweakSigner, u128Schema, unmapFromPrimitives, witnessStackToScriptWitness };
1430
- export type { Account, AddressKey, Alkane, AlkaneDetails, AlkaneEncoded, AlkaneEncodedSimulationRequest, AlkaneId, AlkaneReadableId, AlkaneRune, AlkaneSimulateRequest, AlkaneToken, AlkanesByAddressOutpoint, AlkanesByAddressResponse, AlkanesByAddressRuneBalance, AlkanesExecuteResponse, AlkanesOutpoint, AlkanesOutpointExtended, AlkanesOutpoints, AlkanesOutpointsExtended, AlkanesParsedSimulationResult, AlkanesParsedTraceResult, AlkanesPushExecuteResponse, AlkanesRawSimulationResponse, AlkanesSimulationResult, AlkanesTraceCreateEvent, AlkanesTraceEncodedCreateEvent, AlkanesTraceEncodedEvent, AlkanesTraceEncodedInvokeEvent, AlkanesTraceEncodedResult, AlkanesTraceEncodedReturnEvent, AlkanesTraceEvent, AlkanesTraceInvokeEvent, AlkanesTraceResult, AlkanesTraceReturnEvent, AlkanesUtxo, AlkanesUtxoBalance, AlkanesUtxoEntry, AvailableDecodeKind, AvailableEncodeKind, CustomSpec, Dec, DecodedCBOR, DecodedCBORValue, DecoderFns, Enc, EncodedAlkaneId, EncoderFns, EsploraAddressResponse, EsploraAddressStats, EsploraUtxo, ExecuteSpec, Expand, FormattedUtxo, HDPaths, IDecodableAlkanesResponse, IEncodable, IEsploraPrevout, IEsploraSpendableUtxo, IEsploraTransaction, IEsploraTransactionStatus, IEsploraVin, IEsploraVout, ISchemaAlkaneId, OpcodeTable, OrdBlock, OrdInscription, OrdOutput, OrdOutputRune, OrdPaginatedIds, OrdSat, ProtoRunesToken, ProtostoneTransactionOptions, ProtostoneTransactionOptionsPartial, ProviderConfig, PsbtInputExtended, ResolveSchema, RpcCall, RpcResponse, RpcTuple, Rune, RuneBalance, RuneName, RunesAddressResult, RunesOutpoint, RunesOutpointResult, Schema, SingularAlkanesTransfer, SingularBTCTransfer, SingularTransfer, SpendStrategy, ViewSpec, WalletStandard };
1438
+ export type { Account, AddressKey, Alkane, AlkaneDetails, AlkaneEncoded, AlkaneEncodedSimulationRequest, AlkaneId, AlkaneReadableId, AlkaneRune, AlkaneSimulateRequest, AlkaneToken, AlkanesByAddressOutpoint, AlkanesByAddressResponse, AlkanesByAddressRuneBalance, AlkanesExecuteResponse, AlkanesOutpoint, AlkanesOutpointExtended, AlkanesOutpoints, AlkanesOutpointsExtended, AlkanesParsedSimulationResult, AlkanesParsedTraceResult, AlkanesPushExecuteResponse, AlkanesRawSimulationResponse, AlkanesSimulationResult, AlkanesTraceCreateEvent, AlkanesTraceEncodedCreateEvent, AlkanesTraceEncodedEvent, AlkanesTraceEncodedInvokeEvent, AlkanesTraceEncodedResult, AlkanesTraceEncodedReturnEvent, AlkanesTraceEvent, AlkanesTraceInvokeEvent, AlkanesTraceResult, AlkanesTraceReturnEvent, AlkanesUtxo, AlkanesUtxoBalance, AlkanesUtxoEntry, AvailableDecodeKind, AvailableEncodeKind, CustomSpec, Dec, DecodedCBOR, DecodedCBORValue, DecoderFns, Enc, EncodedAlkaneId, EncoderFns, EsploraAddressResponse, EsploraAddressStats, EsploraUtxo, ExecuteSpec, Expand, FormattedUtxo, HDPaths, IDecodableAlkanesResponse, IEncodable, IEsploraBlockHeader, IEsploraPrevout, IEsploraSpendableUtxo, IEsploraTransaction, IEsploraTransactionStatus, IEsploraVin, IEsploraVout, ISchemaAlkaneId, OpcodeTable, OrdBlock, OrdInscription, OrdOutput, OrdOutputRune, OrdPaginatedIds, OrdSat, ProtoRunesToken, ProtostoneTransactionOptions, ProtostoneTransactionOptionsPartial, ProviderConfig, PsbtInputExtended, ResolveSchema, RpcCall, RpcResponse, RpcTuple, Rune, RuneBalance, RuneName, RunesAddressResult, RunesOutpoint, RunesOutpointResult, Schema, SingularAlkanesTransfer, SingularBTCTransfer, SingularTransfer, SpendStrategy, ViewSpec, WalletStandard };
package/dist/index.js CHANGED
@@ -113036,7 +113036,14 @@ var DecodableAlkanesResponse = class {
113036
113036
  if (!this.borshSchema) {
113037
113037
  throw new Error("decodeTo('object') needs a Borsh schema");
113038
113038
  }
113039
- return (0, import_borsher2.borshDeserialize)(this.borshSchema, buf);
113039
+ try {
113040
+ return (0, import_borsher2.borshDeserialize)(this.borshSchema, buf);
113041
+ } catch (e) {
113042
+ console.log("FAILED TO PARSE: " + this.decoderTable().hex(buf));
113043
+ throw new Error(
113044
+ "Borsh deserialization failed: " + e.message
113045
+ );
113046
+ }
113040
113047
  }
113041
113048
  };
113042
113049
  }