@fepvenancio/stela-sdk 0.4.0 → 0.4.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 +10 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +9 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -284,6 +284,10 @@ interface LockerCall extends Call {
|
|
|
284
284
|
declare const STELA_ADDRESS: Record<Network, string>;
|
|
285
285
|
/** Validate and return a Network value, defaulting to 'sepolia' */
|
|
286
286
|
declare function resolveNetwork(raw?: string): Network;
|
|
287
|
+
/** SNIP-12 chain ID shortstrings per network */
|
|
288
|
+
declare const CHAIN_ID: Record<Network, string>;
|
|
289
|
+
/** Block explorer base URLs per network (for transaction links) */
|
|
290
|
+
declare const EXPLORER_TX_URL: Record<Network, string>;
|
|
287
291
|
|
|
288
292
|
/** Maximum basis points (100%) */
|
|
289
293
|
declare const MAX_BPS = 10000n;
|
|
@@ -808,4 +812,4 @@ declare class StelaSdk {
|
|
|
808
812
|
constructor(opts: StelaSdkOptions);
|
|
809
813
|
}
|
|
810
814
|
|
|
811
|
-
export { ASSET_TYPE_ENUM, ASSET_TYPE_NAMES, ApiClient, type ApiClientOptions, type ApiDetailResponse, ApiError, type ApiListResponse, type Asset, type AssetRow, type AssetType, type Call, type Inscription, type InscriptionCancelledEvent, InscriptionClient, type InscriptionClientOptions, type InscriptionCreatedEvent, type InscriptionEventRow, type InscriptionLiquidatedEvent, type InscriptionParams, type InscriptionRepaidEvent, type InscriptionRow, type InscriptionSignedEvent, type InscriptionStatus, type ListInscriptionsParams, type LockerCall, LockerClient, type LockerInfo, type LockerState, MAX_BPS, type Network, type OrderCancelledEvent, type OrderFilledEvent, type OrderSettledEvent, type OrdersBulkCancelledEvent, type PrivateNote, type PrivateRedeemRequest, type PrivateSettledEvent, type PrivateSharesRedeemedEvent, type RawEvent, SELECTORS, STATUS_LABELS, STELA_ADDRESS, type ShareBalance, ShareClient, type ShareClientOptions, type SharesRedeemedEvent, type SignedOrder, type StatusInput, type StelaEvent, StelaSdk, type StelaSdkOptions, type StoredInscription, type StoredSignature, TOKENS, type TokenInfo, type TransferSingleEvent, type TreasuryAsset, VALID_STATUSES, VIRTUAL_SHARE_OFFSET, addressesEqual, calculateFeeShares, computeCommitment, computeDepositCommitment, computeNullifier, computeStatus, convertToShares, createPrivateNote, deserializeSignature, findTokenByAddress, formatAddress, formatDuration, formatTimestamp, formatTokenValue, fromU256, generateSalt, getInscriptionOrderTypedData, getLendOfferTypedData, getPrivateLendOfferTypedData, getTokensForNetwork, hashAssets, hashPair, inscriptionIdToHex, normalizeAddress, parseAmount, parseEvent, parseEvents, resolveNetwork, scaleByPercentage, serializeSignature, sharesToPercentage, toHex, toU256 };
|
|
815
|
+
export { ASSET_TYPE_ENUM, ASSET_TYPE_NAMES, ApiClient, type ApiClientOptions, type ApiDetailResponse, ApiError, type ApiListResponse, type Asset, type AssetRow, type AssetType, CHAIN_ID, type Call, EXPLORER_TX_URL, type Inscription, type InscriptionCancelledEvent, InscriptionClient, type InscriptionClientOptions, type InscriptionCreatedEvent, type InscriptionEventRow, type InscriptionLiquidatedEvent, type InscriptionParams, type InscriptionRepaidEvent, type InscriptionRow, type InscriptionSignedEvent, type InscriptionStatus, type ListInscriptionsParams, type LockerCall, LockerClient, type LockerInfo, type LockerState, MAX_BPS, type Network, type OrderCancelledEvent, type OrderFilledEvent, type OrderSettledEvent, type OrdersBulkCancelledEvent, type PrivateNote, type PrivateRedeemRequest, type PrivateSettledEvent, type PrivateSharesRedeemedEvent, type RawEvent, SELECTORS, STATUS_LABELS, STELA_ADDRESS, type ShareBalance, ShareClient, type ShareClientOptions, type SharesRedeemedEvent, type SignedOrder, type StatusInput, type StelaEvent, StelaSdk, type StelaSdkOptions, type StoredInscription, type StoredSignature, TOKENS, type TokenInfo, type TransferSingleEvent, type TreasuryAsset, VALID_STATUSES, VIRTUAL_SHARE_OFFSET, addressesEqual, calculateFeeShares, computeCommitment, computeDepositCommitment, computeNullifier, computeStatus, convertToShares, createPrivateNote, deserializeSignature, findTokenByAddress, formatAddress, formatDuration, formatTimestamp, formatTokenValue, fromU256, generateSalt, getInscriptionOrderTypedData, getLendOfferTypedData, getPrivateLendOfferTypedData, getTokensForNetwork, hashAssets, hashPair, inscriptionIdToHex, normalizeAddress, parseAmount, parseEvent, parseEvents, resolveNetwork, scaleByPercentage, serializeSignature, sharesToPercentage, toHex, toU256 };
|
package/dist/index.d.ts
CHANGED
|
@@ -284,6 +284,10 @@ interface LockerCall extends Call {
|
|
|
284
284
|
declare const STELA_ADDRESS: Record<Network, string>;
|
|
285
285
|
/** Validate and return a Network value, defaulting to 'sepolia' */
|
|
286
286
|
declare function resolveNetwork(raw?: string): Network;
|
|
287
|
+
/** SNIP-12 chain ID shortstrings per network */
|
|
288
|
+
declare const CHAIN_ID: Record<Network, string>;
|
|
289
|
+
/** Block explorer base URLs per network (for transaction links) */
|
|
290
|
+
declare const EXPLORER_TX_URL: Record<Network, string>;
|
|
287
291
|
|
|
288
292
|
/** Maximum basis points (100%) */
|
|
289
293
|
declare const MAX_BPS = 10000n;
|
|
@@ -808,4 +812,4 @@ declare class StelaSdk {
|
|
|
808
812
|
constructor(opts: StelaSdkOptions);
|
|
809
813
|
}
|
|
810
814
|
|
|
811
|
-
export { ASSET_TYPE_ENUM, ASSET_TYPE_NAMES, ApiClient, type ApiClientOptions, type ApiDetailResponse, ApiError, type ApiListResponse, type Asset, type AssetRow, type AssetType, type Call, type Inscription, type InscriptionCancelledEvent, InscriptionClient, type InscriptionClientOptions, type InscriptionCreatedEvent, type InscriptionEventRow, type InscriptionLiquidatedEvent, type InscriptionParams, type InscriptionRepaidEvent, type InscriptionRow, type InscriptionSignedEvent, type InscriptionStatus, type ListInscriptionsParams, type LockerCall, LockerClient, type LockerInfo, type LockerState, MAX_BPS, type Network, type OrderCancelledEvent, type OrderFilledEvent, type OrderSettledEvent, type OrdersBulkCancelledEvent, type PrivateNote, type PrivateRedeemRequest, type PrivateSettledEvent, type PrivateSharesRedeemedEvent, type RawEvent, SELECTORS, STATUS_LABELS, STELA_ADDRESS, type ShareBalance, ShareClient, type ShareClientOptions, type SharesRedeemedEvent, type SignedOrder, type StatusInput, type StelaEvent, StelaSdk, type StelaSdkOptions, type StoredInscription, type StoredSignature, TOKENS, type TokenInfo, type TransferSingleEvent, type TreasuryAsset, VALID_STATUSES, VIRTUAL_SHARE_OFFSET, addressesEqual, calculateFeeShares, computeCommitment, computeDepositCommitment, computeNullifier, computeStatus, convertToShares, createPrivateNote, deserializeSignature, findTokenByAddress, formatAddress, formatDuration, formatTimestamp, formatTokenValue, fromU256, generateSalt, getInscriptionOrderTypedData, getLendOfferTypedData, getPrivateLendOfferTypedData, getTokensForNetwork, hashAssets, hashPair, inscriptionIdToHex, normalizeAddress, parseAmount, parseEvent, parseEvents, resolveNetwork, scaleByPercentage, serializeSignature, sharesToPercentage, toHex, toU256 };
|
|
815
|
+
export { ASSET_TYPE_ENUM, ASSET_TYPE_NAMES, ApiClient, type ApiClientOptions, type ApiDetailResponse, ApiError, type ApiListResponse, type Asset, type AssetRow, type AssetType, CHAIN_ID, type Call, EXPLORER_TX_URL, type Inscription, type InscriptionCancelledEvent, InscriptionClient, type InscriptionClientOptions, type InscriptionCreatedEvent, type InscriptionEventRow, type InscriptionLiquidatedEvent, type InscriptionParams, type InscriptionRepaidEvent, type InscriptionRow, type InscriptionSignedEvent, type InscriptionStatus, type ListInscriptionsParams, type LockerCall, LockerClient, type LockerInfo, type LockerState, MAX_BPS, type Network, type OrderCancelledEvent, type OrderFilledEvent, type OrderSettledEvent, type OrdersBulkCancelledEvent, type PrivateNote, type PrivateRedeemRequest, type PrivateSettledEvent, type PrivateSharesRedeemedEvent, type RawEvent, SELECTORS, STATUS_LABELS, STELA_ADDRESS, type ShareBalance, ShareClient, type ShareClientOptions, type SharesRedeemedEvent, type SignedOrder, type StatusInput, type StelaEvent, StelaSdk, type StelaSdkOptions, type StoredInscription, type StoredSignature, TOKENS, type TokenInfo, type TransferSingleEvent, type TreasuryAsset, VALID_STATUSES, VIRTUAL_SHARE_OFFSET, addressesEqual, calculateFeeShares, computeCommitment, computeDepositCommitment, computeNullifier, computeStatus, convertToShares, createPrivateNote, deserializeSignature, findTokenByAddress, formatAddress, formatDuration, formatTimestamp, formatTokenValue, fromU256, generateSalt, getInscriptionOrderTypedData, getLendOfferTypedData, getPrivateLendOfferTypedData, getTokensForNetwork, hashAssets, hashPair, inscriptionIdToHex, normalizeAddress, parseAmount, parseEvent, parseEvents, resolveNetwork, scaleByPercentage, serializeSignature, sharesToPercentage, toHex, toU256 };
|
package/dist/index.js
CHANGED
|
@@ -32,6 +32,14 @@ function resolveNetwork(raw) {
|
|
|
32
32
|
if (trimmed) console.warn(`Invalid NETWORK "${trimmed}", falling back to sepolia`);
|
|
33
33
|
return "sepolia";
|
|
34
34
|
}
|
|
35
|
+
var CHAIN_ID = {
|
|
36
|
+
sepolia: "SN_SEPOLIA",
|
|
37
|
+
mainnet: "SN_MAIN"
|
|
38
|
+
};
|
|
39
|
+
var EXPLORER_TX_URL = {
|
|
40
|
+
sepolia: "https://sepolia.voyager.online/tx",
|
|
41
|
+
mainnet: "https://voyager.online/tx"
|
|
42
|
+
};
|
|
35
43
|
|
|
36
44
|
// src/constants/protocol.ts
|
|
37
45
|
var MAX_BPS = 10000n;
|
|
@@ -3076,6 +3084,6 @@ var StelaSdk = class {
|
|
|
3076
3084
|
}
|
|
3077
3085
|
};
|
|
3078
3086
|
|
|
3079
|
-
export { ASSET_TYPE_ENUM, ASSET_TYPE_NAMES, ApiClient, ApiError, InscriptionClient, LockerClient, MAX_BPS, SELECTORS, STATUS_LABELS, STELA_ADDRESS, ShareClient, StelaSdk, TOKENS, VALID_STATUSES, VIRTUAL_SHARE_OFFSET, addressesEqual, calculateFeeShares, computeCommitment, computeDepositCommitment, computeNullifier, computeStatus, convertToShares, createPrivateNote, deserializeSignature, findTokenByAddress, formatAddress, formatDuration, formatTimestamp, formatTokenValue, fromU256, generateSalt, getInscriptionOrderTypedData, getLendOfferTypedData, getPrivateLendOfferTypedData, getTokensForNetwork, hashAssets, hashPair, inscriptionIdToHex, normalizeAddress, parseAmount, parseEvent, parseEvents, resolveNetwork, scaleByPercentage, serializeSignature, sharesToPercentage, toHex, toU256 };
|
|
3087
|
+
export { ASSET_TYPE_ENUM, ASSET_TYPE_NAMES, ApiClient, ApiError, CHAIN_ID, EXPLORER_TX_URL, InscriptionClient, LockerClient, MAX_BPS, SELECTORS, STATUS_LABELS, STELA_ADDRESS, ShareClient, StelaSdk, TOKENS, VALID_STATUSES, VIRTUAL_SHARE_OFFSET, addressesEqual, calculateFeeShares, computeCommitment, computeDepositCommitment, computeNullifier, computeStatus, convertToShares, createPrivateNote, deserializeSignature, findTokenByAddress, formatAddress, formatDuration, formatTimestamp, formatTokenValue, fromU256, generateSalt, getInscriptionOrderTypedData, getLendOfferTypedData, getPrivateLendOfferTypedData, getTokensForNetwork, hashAssets, hashPair, inscriptionIdToHex, normalizeAddress, parseAmount, parseEvent, parseEvents, resolveNetwork, scaleByPercentage, serializeSignature, sharesToPercentage, toHex, toU256 };
|
|
3080
3088
|
//# sourceMappingURL=index.js.map
|
|
3081
3089
|
//# sourceMappingURL=index.js.map
|