@medialane/sdk 0.112.0 → 0.114.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.cjs +42 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +42 -10
- package/dist/index.js.map +1 -1
- package/dist/{services-BBXTfVDt.d.ts → services-BezTZ6gM.d.ts} +43 -12
- package/dist/{services-BcsFAZzQ.d.cts → services-D971bAZ2.d.cts} +43 -12
- package/dist/starknet/index.cjs +62 -10
- package/dist/starknet/index.cjs.map +1 -1
- package/dist/starknet/index.d.cts +6 -2
- package/dist/starknet/index.d.ts +6 -2
- package/dist/starknet/index.js +62 -11
- package/dist/starknet/index.js.map +1 -1
- package/package.json +5 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { bd as ResolvedConfig, bl as TxResult, aA as CreatePopCollectionParams, al as ClaimConditions, aw as CreateDropParams, aF as CreateTicketParams, a_ as MintTicketsParams, ay as CreateMembershipParams, aZ as MintMembershipsParams, aD as CreateSponsorshipOfferParams, ba as ProposeSponsorshipParams, l as ApiClient, aX as MedialaneConfig, aY as MedialaneErrorCode, b3 as OrderDetails, R as ResolvedFeeConfig, D as ApiIntentCreated } from '../services-D971bAZ2.cjs';
|
|
2
2
|
import { AccountInterface, Call, ProviderInterface, TypedData, constants, BigNumberish, DeployAccountContractPayload } from 'starknet';
|
|
3
3
|
import { V as VenueAdapter, O as OrderRef, A as AdapterTxResult, R as RegisterOrderParams, j as VenueSigner } from '../types-CuSlc_YE.cjs';
|
|
4
4
|
import 'zod';
|
|
@@ -7930,6 +7930,10 @@ declare function getEscape(provider: ProviderInterface, address: string): Promis
|
|
|
7930
7930
|
declare function getEscapeSecurityPeriod(provider: ProviderInterface, address: string): Promise<number>;
|
|
7931
7931
|
|
|
7932
7932
|
declare function deriveAesKey(prfSecret: Uint8Array, hkdfInfo: Uint8Array): Promise<CryptoKey>;
|
|
7933
|
+
declare function deriveStarkKeyPair(prfSecret: Uint8Array): Promise<{
|
|
7934
|
+
privateKeyHex: string;
|
|
7935
|
+
publicKeyHex: string;
|
|
7936
|
+
}>;
|
|
7933
7937
|
declare function generateStarkKeyPair(): {
|
|
7934
7938
|
privateKeyHex: string;
|
|
7935
7939
|
publicKeyHex: string;
|
|
@@ -7947,4 +7951,4 @@ declare function signWithPrivateKey(privateKeyHex: string, msgHash: string): [st
|
|
|
7947
7951
|
|
|
7948
7952
|
type StarknetVenueSigner = VenueSigner<TypedData, Call>;
|
|
7949
7953
|
|
|
7950
|
-
export { ADMIN_HEADERS, ADMIN_SCOPE, type AddSupplyParams, type AdminGrant, type AdminRequest, type AdminRequestSig, type AdminSession, type AdminSessionTypedDataInput, type BatchMintEditionParams, type BuildFeeCallParams, MAX_SUPPLY as COIN_MAX_SUPPLY, MIN_SUPPLY as COIN_MIN_SUPPLY, ClaimConditions, ClubService, type CreateCreatorCoinParams, CreateDropParams, type CreateGrantOpts, CreatePopCollectionParams, CreatorCoinFactoryABI, type CreatorCoinGuarantees, type CreatorCoinReceiptLike, CreatorCoinService, type DeployCollectionParams, DropCollectionABI, DropFactoryABI, DropService, ERC1155CollectionService, type EkuboLaunchParams, type EkuboPoolParams, type EscapeInfo, type EscapeStatusName, type EscapeTypeName, type ExecuteIntentOpts, type FeeSurface, type GuardianInfo, IPClubCollectionABI, IPClubFactoryABI, IPCollection1155ABI, IPCollection1155FactoryABI, IPCollectionABI, IPGenesisABI, IPMarketplaceABI, IPNftABI, IPSponsorshipABI, IPTicketCollectionABI, IPTicketCollectionFactoryABI, InvalidStarkPrivateKeyError, MAX_HOLDERS_AT_LAUNCH, MAX_TEAM_ALLOCATION_PERCENT, Medialane1155ABI, MedialaneClient, MedialaneError, type MintEditionParams, POPCollectionABI, POPFactoryABI, type ParsedAdminHeaders, PopService, type ReceiptProvider, type RequestSiwsTokenArgs, type ResolvedOrder, SUGGESTED_DEFAULT_PRICE, type SiwsSigner, SponsoredCallRejectedError, type SponsoredExecuteConfig, type SponsoredExecuteResult, SponsorshipService, StarknetVenue, type StarknetVenueDeps, type StarknetVenueSigner, TicketService, type TypedDataSigner, VALIDATED_EKUBO_PARAMS, VenueSigner, adminRequestDigest, assertTransactionSucceeded, build1155CancellationTypedData, build1155OrderTypedData, buildAddOwnerCall, buildAdminSessionTypedData, buildCancelEscapeCall, buildCancellationTypedData, buildChangeOwnersCall, buildCompleteEscapeOwnerCall, buildCreateCreatorCoinCall, buildDeployAccountParams, buildFeeCall, buildLaunchOnEkuboCalls, buildOrderTypedData, buildRemoveOwnerByGuidCall, buildRemoveOwnerCall, buildSetFirstGuardianCall, buildTriggerEscapeOwnerCall, buybackQuoteRaw, toRaw as coinToRaw, computeAccountAddress, computeOwnerGuid, confirmIntentBestEffort, createAdminSessionGrant, decodeEscapeAndStatus, decodeGuardiansInfo, deriveAesKey, deriveOwnerKeyPair, encodeAdminHeaders, encodeByteArray, executeIntent, executeIntents, executeSponsored, fdvHuman, generateStarkKeyPair, getCounter, getCounter1155, getCreatorCoinGuarantees, getEscape, getEscapeSecurityPeriod, getGuardians, getOrderDetails, getOrderDetails1155, getOwners, getSiwsStorageKey, getStoredSiwsToken, isSiwsTokenValid, normalizeSiwsSignature, ownerAliveTypedData, ownerConstructorCalldata, parseAdminHeaders, parseCreatorCoinCreated, priceToEkuboParams, randomNonce, requestSiwsToken, sealPrivateKey, sessionKeyHashOf, signAdminRequest, signWithPrivateKey, starkKeyPairFromPrivateKey, storeSiwsToken, teamCoinsRaw, toContractConditions as toDropContractConditions, unsealPrivateKey, validateName as validateCoinName, validateSupply as validateCoinSupply, validateSymbol as validateCoinSymbol, validatePrice, verifyAdminRequestSig };
|
|
7954
|
+
export { ADMIN_HEADERS, ADMIN_SCOPE, type AddSupplyParams, type AdminGrant, type AdminRequest, type AdminRequestSig, type AdminSession, type AdminSessionTypedDataInput, type BatchMintEditionParams, type BuildFeeCallParams, MAX_SUPPLY as COIN_MAX_SUPPLY, MIN_SUPPLY as COIN_MIN_SUPPLY, ClaimConditions, ClubService, type CreateCreatorCoinParams, CreateDropParams, type CreateGrantOpts, CreatePopCollectionParams, CreatorCoinFactoryABI, type CreatorCoinGuarantees, type CreatorCoinReceiptLike, CreatorCoinService, type DeployCollectionParams, DropCollectionABI, DropFactoryABI, DropService, ERC1155CollectionService, type EkuboLaunchParams, type EkuboPoolParams, type EscapeInfo, type EscapeStatusName, type EscapeTypeName, type ExecuteIntentOpts, type FeeSurface, type GuardianInfo, IPClubCollectionABI, IPClubFactoryABI, IPCollection1155ABI, IPCollection1155FactoryABI, IPCollectionABI, IPGenesisABI, IPMarketplaceABI, IPNftABI, IPSponsorshipABI, IPTicketCollectionABI, IPTicketCollectionFactoryABI, InvalidStarkPrivateKeyError, MAX_HOLDERS_AT_LAUNCH, MAX_TEAM_ALLOCATION_PERCENT, Medialane1155ABI, MedialaneClient, MedialaneError, type MintEditionParams, POPCollectionABI, POPFactoryABI, type ParsedAdminHeaders, PopService, type ReceiptProvider, type RequestSiwsTokenArgs, type ResolvedOrder, SUGGESTED_DEFAULT_PRICE, type SiwsSigner, SponsoredCallRejectedError, type SponsoredExecuteConfig, type SponsoredExecuteResult, SponsorshipService, StarknetVenue, type StarknetVenueDeps, type StarknetVenueSigner, TicketService, type TypedDataSigner, VALIDATED_EKUBO_PARAMS, VenueSigner, adminRequestDigest, assertTransactionSucceeded, build1155CancellationTypedData, build1155OrderTypedData, buildAddOwnerCall, buildAdminSessionTypedData, buildCancelEscapeCall, buildCancellationTypedData, buildChangeOwnersCall, buildCompleteEscapeOwnerCall, buildCreateCreatorCoinCall, buildDeployAccountParams, buildFeeCall, buildLaunchOnEkuboCalls, buildOrderTypedData, buildRemoveOwnerByGuidCall, buildRemoveOwnerCall, buildSetFirstGuardianCall, buildTriggerEscapeOwnerCall, buybackQuoteRaw, toRaw as coinToRaw, computeAccountAddress, computeOwnerGuid, confirmIntentBestEffort, createAdminSessionGrant, decodeEscapeAndStatus, decodeGuardiansInfo, deriveAesKey, deriveOwnerKeyPair, deriveStarkKeyPair, encodeAdminHeaders, encodeByteArray, executeIntent, executeIntents, executeSponsored, fdvHuman, generateStarkKeyPair, getCounter, getCounter1155, getCreatorCoinGuarantees, getEscape, getEscapeSecurityPeriod, getGuardians, getOrderDetails, getOrderDetails1155, getOwners, getSiwsStorageKey, getStoredSiwsToken, isSiwsTokenValid, normalizeSiwsSignature, ownerAliveTypedData, ownerConstructorCalldata, parseAdminHeaders, parseCreatorCoinCreated, priceToEkuboParams, randomNonce, requestSiwsToken, sealPrivateKey, sessionKeyHashOf, signAdminRequest, signWithPrivateKey, starkKeyPairFromPrivateKey, storeSiwsToken, teamCoinsRaw, toContractConditions as toDropContractConditions, unsealPrivateKey, validateName as validateCoinName, validateSupply as validateCoinSupply, validateSymbol as validateCoinSymbol, validatePrice, verifyAdminRequestSig };
|
package/dist/starknet/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { bd as ResolvedConfig, bl as TxResult, aA as CreatePopCollectionParams, al as ClaimConditions, aw as CreateDropParams, aF as CreateTicketParams, a_ as MintTicketsParams, ay as CreateMembershipParams, aZ as MintMembershipsParams, aD as CreateSponsorshipOfferParams, ba as ProposeSponsorshipParams, l as ApiClient, aX as MedialaneConfig, aY as MedialaneErrorCode, b3 as OrderDetails, R as ResolvedFeeConfig, D as ApiIntentCreated } from '../services-BezTZ6gM.js';
|
|
2
2
|
import { AccountInterface, Call, ProviderInterface, TypedData, constants, BigNumberish, DeployAccountContractPayload } from 'starknet';
|
|
3
3
|
import { V as VenueAdapter, O as OrderRef, A as AdapterTxResult, R as RegisterOrderParams, j as VenueSigner } from '../types-CuSlc_YE.js';
|
|
4
4
|
import 'zod';
|
|
@@ -7930,6 +7930,10 @@ declare function getEscape(provider: ProviderInterface, address: string): Promis
|
|
|
7930
7930
|
declare function getEscapeSecurityPeriod(provider: ProviderInterface, address: string): Promise<number>;
|
|
7931
7931
|
|
|
7932
7932
|
declare function deriveAesKey(prfSecret: Uint8Array, hkdfInfo: Uint8Array): Promise<CryptoKey>;
|
|
7933
|
+
declare function deriveStarkKeyPair(prfSecret: Uint8Array): Promise<{
|
|
7934
|
+
privateKeyHex: string;
|
|
7935
|
+
publicKeyHex: string;
|
|
7936
|
+
}>;
|
|
7933
7937
|
declare function generateStarkKeyPair(): {
|
|
7934
7938
|
privateKeyHex: string;
|
|
7935
7939
|
publicKeyHex: string;
|
|
@@ -7947,4 +7951,4 @@ declare function signWithPrivateKey(privateKeyHex: string, msgHash: string): [st
|
|
|
7947
7951
|
|
|
7948
7952
|
type StarknetVenueSigner = VenueSigner<TypedData, Call>;
|
|
7949
7953
|
|
|
7950
|
-
export { ADMIN_HEADERS, ADMIN_SCOPE, type AddSupplyParams, type AdminGrant, type AdminRequest, type AdminRequestSig, type AdminSession, type AdminSessionTypedDataInput, type BatchMintEditionParams, type BuildFeeCallParams, MAX_SUPPLY as COIN_MAX_SUPPLY, MIN_SUPPLY as COIN_MIN_SUPPLY, ClaimConditions, ClubService, type CreateCreatorCoinParams, CreateDropParams, type CreateGrantOpts, CreatePopCollectionParams, CreatorCoinFactoryABI, type CreatorCoinGuarantees, type CreatorCoinReceiptLike, CreatorCoinService, type DeployCollectionParams, DropCollectionABI, DropFactoryABI, DropService, ERC1155CollectionService, type EkuboLaunchParams, type EkuboPoolParams, type EscapeInfo, type EscapeStatusName, type EscapeTypeName, type ExecuteIntentOpts, type FeeSurface, type GuardianInfo, IPClubCollectionABI, IPClubFactoryABI, IPCollection1155ABI, IPCollection1155FactoryABI, IPCollectionABI, IPGenesisABI, IPMarketplaceABI, IPNftABI, IPSponsorshipABI, IPTicketCollectionABI, IPTicketCollectionFactoryABI, InvalidStarkPrivateKeyError, MAX_HOLDERS_AT_LAUNCH, MAX_TEAM_ALLOCATION_PERCENT, Medialane1155ABI, MedialaneClient, MedialaneError, type MintEditionParams, POPCollectionABI, POPFactoryABI, type ParsedAdminHeaders, PopService, type ReceiptProvider, type RequestSiwsTokenArgs, type ResolvedOrder, SUGGESTED_DEFAULT_PRICE, type SiwsSigner, SponsoredCallRejectedError, type SponsoredExecuteConfig, type SponsoredExecuteResult, SponsorshipService, StarknetVenue, type StarknetVenueDeps, type StarknetVenueSigner, TicketService, type TypedDataSigner, VALIDATED_EKUBO_PARAMS, VenueSigner, adminRequestDigest, assertTransactionSucceeded, build1155CancellationTypedData, build1155OrderTypedData, buildAddOwnerCall, buildAdminSessionTypedData, buildCancelEscapeCall, buildCancellationTypedData, buildChangeOwnersCall, buildCompleteEscapeOwnerCall, buildCreateCreatorCoinCall, buildDeployAccountParams, buildFeeCall, buildLaunchOnEkuboCalls, buildOrderTypedData, buildRemoveOwnerByGuidCall, buildRemoveOwnerCall, buildSetFirstGuardianCall, buildTriggerEscapeOwnerCall, buybackQuoteRaw, toRaw as coinToRaw, computeAccountAddress, computeOwnerGuid, confirmIntentBestEffort, createAdminSessionGrant, decodeEscapeAndStatus, decodeGuardiansInfo, deriveAesKey, deriveOwnerKeyPair, encodeAdminHeaders, encodeByteArray, executeIntent, executeIntents, executeSponsored, fdvHuman, generateStarkKeyPair, getCounter, getCounter1155, getCreatorCoinGuarantees, getEscape, getEscapeSecurityPeriod, getGuardians, getOrderDetails, getOrderDetails1155, getOwners, getSiwsStorageKey, getStoredSiwsToken, isSiwsTokenValid, normalizeSiwsSignature, ownerAliveTypedData, ownerConstructorCalldata, parseAdminHeaders, parseCreatorCoinCreated, priceToEkuboParams, randomNonce, requestSiwsToken, sealPrivateKey, sessionKeyHashOf, signAdminRequest, signWithPrivateKey, starkKeyPairFromPrivateKey, storeSiwsToken, teamCoinsRaw, toContractConditions as toDropContractConditions, unsealPrivateKey, validateName as validateCoinName, validateSupply as validateCoinSupply, validateSymbol as validateCoinSymbol, validatePrice, verifyAdminRequestSig };
|
|
7954
|
+
export { ADMIN_HEADERS, ADMIN_SCOPE, type AddSupplyParams, type AdminGrant, type AdminRequest, type AdminRequestSig, type AdminSession, type AdminSessionTypedDataInput, type BatchMintEditionParams, type BuildFeeCallParams, MAX_SUPPLY as COIN_MAX_SUPPLY, MIN_SUPPLY as COIN_MIN_SUPPLY, ClaimConditions, ClubService, type CreateCreatorCoinParams, CreateDropParams, type CreateGrantOpts, CreatePopCollectionParams, CreatorCoinFactoryABI, type CreatorCoinGuarantees, type CreatorCoinReceiptLike, CreatorCoinService, type DeployCollectionParams, DropCollectionABI, DropFactoryABI, DropService, ERC1155CollectionService, type EkuboLaunchParams, type EkuboPoolParams, type EscapeInfo, type EscapeStatusName, type EscapeTypeName, type ExecuteIntentOpts, type FeeSurface, type GuardianInfo, IPClubCollectionABI, IPClubFactoryABI, IPCollection1155ABI, IPCollection1155FactoryABI, IPCollectionABI, IPGenesisABI, IPMarketplaceABI, IPNftABI, IPSponsorshipABI, IPTicketCollectionABI, IPTicketCollectionFactoryABI, InvalidStarkPrivateKeyError, MAX_HOLDERS_AT_LAUNCH, MAX_TEAM_ALLOCATION_PERCENT, Medialane1155ABI, MedialaneClient, MedialaneError, type MintEditionParams, POPCollectionABI, POPFactoryABI, type ParsedAdminHeaders, PopService, type ReceiptProvider, type RequestSiwsTokenArgs, type ResolvedOrder, SUGGESTED_DEFAULT_PRICE, type SiwsSigner, SponsoredCallRejectedError, type SponsoredExecuteConfig, type SponsoredExecuteResult, SponsorshipService, StarknetVenue, type StarknetVenueDeps, type StarknetVenueSigner, TicketService, type TypedDataSigner, VALIDATED_EKUBO_PARAMS, VenueSigner, adminRequestDigest, assertTransactionSucceeded, build1155CancellationTypedData, build1155OrderTypedData, buildAddOwnerCall, buildAdminSessionTypedData, buildCancelEscapeCall, buildCancellationTypedData, buildChangeOwnersCall, buildCompleteEscapeOwnerCall, buildCreateCreatorCoinCall, buildDeployAccountParams, buildFeeCall, buildLaunchOnEkuboCalls, buildOrderTypedData, buildRemoveOwnerByGuidCall, buildRemoveOwnerCall, buildSetFirstGuardianCall, buildTriggerEscapeOwnerCall, buybackQuoteRaw, toRaw as coinToRaw, computeAccountAddress, computeOwnerGuid, confirmIntentBestEffort, createAdminSessionGrant, decodeEscapeAndStatus, decodeGuardiansInfo, deriveAesKey, deriveOwnerKeyPair, deriveStarkKeyPair, encodeAdminHeaders, encodeByteArray, executeIntent, executeIntents, executeSponsored, fdvHuman, generateStarkKeyPair, getCounter, getCounter1155, getCreatorCoinGuarantees, getEscape, getEscapeSecurityPeriod, getGuardians, getOrderDetails, getOrderDetails1155, getOwners, getSiwsStorageKey, getStoredSiwsToken, isSiwsTokenValid, normalizeSiwsSignature, ownerAliveTypedData, ownerConstructorCalldata, parseAdminHeaders, parseCreatorCoinCreated, priceToEkuboParams, randomNonce, requestSiwsToken, sealPrivateKey, sessionKeyHashOf, signAdminRequest, signWithPrivateKey, starkKeyPairFromPrivateKey, storeSiwsToken, teamCoinsRaw, toContractConditions as toDropContractConditions, unsealPrivateKey, validateName as validateCoinName, validateSupply as validateCoinSupply, validateSymbol as validateCoinSymbol, validatePrice, verifyAdminRequestSig };
|
package/dist/starknet/index.js
CHANGED
|
@@ -314,6 +314,9 @@ var ApiClient = class {
|
|
|
314
314
|
bearer(siwsToken) {
|
|
315
315
|
return { Authorization: `Bearer ${siwsToken}` };
|
|
316
316
|
}
|
|
317
|
+
asSubject(siwsToken) {
|
|
318
|
+
return siwsToken ? this.bearer(siwsToken) : void 0;
|
|
319
|
+
}
|
|
317
320
|
getOrders(query = {}) {
|
|
318
321
|
const params = new URLSearchParams();
|
|
319
322
|
if (query.status) params.set("status", query.status);
|
|
@@ -508,20 +511,49 @@ var ApiClient = class {
|
|
|
508
511
|
body: formData
|
|
509
512
|
});
|
|
510
513
|
}
|
|
511
|
-
getMe() {
|
|
512
|
-
return this.
|
|
514
|
+
getMe(siwsToken) {
|
|
515
|
+
return this.request("/v1/portal/me", {
|
|
516
|
+
method: "GET",
|
|
517
|
+
headers: this.asSubject(siwsToken)
|
|
518
|
+
});
|
|
513
519
|
}
|
|
514
|
-
getApiKeys() {
|
|
515
|
-
return this.
|
|
520
|
+
getApiKeys(siwsToken) {
|
|
521
|
+
return this.request("/v1/portal/keys", {
|
|
522
|
+
method: "GET",
|
|
523
|
+
headers: this.asSubject(siwsToken)
|
|
524
|
+
});
|
|
516
525
|
}
|
|
517
|
-
createApiKey(
|
|
518
|
-
return this.
|
|
526
|
+
createApiKey(input, siwsToken) {
|
|
527
|
+
return this.request("/v1/portal/keys", {
|
|
528
|
+
method: "POST",
|
|
529
|
+
body: JSON.stringify(input ?? {}),
|
|
530
|
+
headers: this.asSubject(siwsToken)
|
|
531
|
+
});
|
|
532
|
+
}
|
|
533
|
+
deleteApiKey(id, siwsToken) {
|
|
534
|
+
return this.request(`/v1/portal/keys/${id}`, {
|
|
535
|
+
method: "DELETE",
|
|
536
|
+
headers: this.asSubject(siwsToken)
|
|
537
|
+
});
|
|
538
|
+
}
|
|
539
|
+
getCreditHistory(siwsToken) {
|
|
540
|
+
return this.request("/v1/portal/credits/history", {
|
|
541
|
+
method: "GET",
|
|
542
|
+
headers: this.asSubject(siwsToken)
|
|
543
|
+
});
|
|
519
544
|
}
|
|
520
|
-
|
|
521
|
-
return this.
|
|
545
|
+
getSpend(siwsToken) {
|
|
546
|
+
return this.request("/v1/portal/credits/spend", {
|
|
547
|
+
method: "GET",
|
|
548
|
+
headers: this.asSubject(siwsToken)
|
|
549
|
+
});
|
|
522
550
|
}
|
|
523
|
-
|
|
524
|
-
return this.
|
|
551
|
+
checkDeposit(txHash, siwsToken) {
|
|
552
|
+
return this.request("/v1/portal/credits/check", {
|
|
553
|
+
method: "POST",
|
|
554
|
+
body: JSON.stringify({ txHash }),
|
|
555
|
+
headers: this.asSubject(siwsToken)
|
|
556
|
+
});
|
|
525
557
|
}
|
|
526
558
|
getWebhooks() {
|
|
527
559
|
return this.get("/v1/portal/webhooks");
|
|
@@ -11878,6 +11910,25 @@ async function deriveAesKey(prfSecret, hkdfInfo) {
|
|
|
11878
11910
|
["encrypt", "decrypt"]
|
|
11879
11911
|
);
|
|
11880
11912
|
}
|
|
11913
|
+
var STARK_KEY_INFO = new TextEncoder().encode("medialane/passkey/stark-key/v1");
|
|
11914
|
+
var DERIVE_BITS = 384;
|
|
11915
|
+
function bytesToBigInt(bytes) {
|
|
11916
|
+
let value = 0n;
|
|
11917
|
+
for (const byte of bytes) value = value << 8n | BigInt(byte);
|
|
11918
|
+
return value;
|
|
11919
|
+
}
|
|
11920
|
+
async function deriveStarkKeyPair(prfSecret) {
|
|
11921
|
+
const hkdf = await crypto.subtle.importKey("raw", prfSecret, "HKDF", false, ["deriveBits"]);
|
|
11922
|
+
const bits = await crypto.subtle.deriveBits(
|
|
11923
|
+
{ name: "HKDF", hash: "SHA-256", salt: new Uint8Array(0), info: STARK_KEY_INFO },
|
|
11924
|
+
hkdf,
|
|
11925
|
+
DERIVE_BITS
|
|
11926
|
+
);
|
|
11927
|
+
const order = ec.starkCurve.CURVE.n;
|
|
11928
|
+
const value = bytesToBigInt(new Uint8Array(bits)) % (order - 1n) + 1n;
|
|
11929
|
+
const privateKeyHex = "0x" + value.toString(16).padStart(64, "0");
|
|
11930
|
+
return { privateKeyHex, publicKeyHex: ec.starkCurve.getStarkKey(privateKeyHex) };
|
|
11931
|
+
}
|
|
11881
11932
|
function generateStarkKeyPair() {
|
|
11882
11933
|
const privateKeyHex = "0x" + Array.from(ec.starkCurve.utils.randomPrivateKey()).map((b) => b.toString(16).padStart(2, "0")).join("");
|
|
11883
11934
|
return { privateKeyHex, publicKeyHex: ec.starkCurve.getStarkKey(privateKeyHex) };
|
|
@@ -11916,6 +11967,6 @@ function signWithPrivateKey(privateKeyHex, msgHash) {
|
|
|
11916
11967
|
return [num.toHex(sig.r), num.toHex(sig.s)];
|
|
11917
11968
|
}
|
|
11918
11969
|
|
|
11919
|
-
export { ADMIN_HEADERS, ADMIN_SCOPE, MAX_SUPPLY as COIN_MAX_SUPPLY, MIN_SUPPLY as COIN_MIN_SUPPLY, ClubService, CreatorCoinFactoryABI, CreatorCoinService, DropCollectionABI, DropFactoryABI, DropService, ERC1155CollectionService, IPClubCollectionABI, IPClubFactoryABI, IPCollection1155ABI, IPCollection1155FactoryABI, IPCollectionABI, IPGenesisABI, IPMarketplaceABI, IPNftABI, IPSponsorshipABI, IPTicketCollectionABI, IPTicketCollectionFactoryABI, InvalidStarkPrivateKeyError, MAX_HOLDERS_AT_LAUNCH, MAX_TEAM_ALLOCATION_PERCENT, Medialane1155ABI, MedialaneClient, MedialaneError, POPCollectionABI, POPFactoryABI, PopService, SUGGESTED_DEFAULT_PRICE, SponsoredCallRejectedError, SponsorshipService, StarknetVenue, TicketService, VALIDATED_EKUBO_PARAMS, adminRequestDigest, assertTransactionSucceeded, build1155CancellationTypedData, build1155OrderTypedData, buildAddOwnerCall, buildAdminSessionTypedData, buildCancelEscapeCall, buildCancellationTypedData, buildChangeOwnersCall, buildCompleteEscapeOwnerCall, buildCreateCreatorCoinCall, buildDeployAccountParams, buildFeeCall, buildLaunchOnEkuboCalls, buildOrderTypedData, buildRemoveOwnerByGuidCall, buildRemoveOwnerCall, buildSetFirstGuardianCall, buildTriggerEscapeOwnerCall, buybackQuoteRaw, toRaw as coinToRaw, computeAccountAddress, computeOwnerGuid, confirmIntentBestEffort, createAdminSessionGrant, decodeEscapeAndStatus, decodeGuardiansInfo, deriveAesKey, deriveOwnerKeyPair, encodeAdminHeaders, encodeByteArray, executeIntent, executeIntents, executeSponsored, fdvHuman, generateStarkKeyPair, getCounter, getCounter1155, getCreatorCoinGuarantees, getEscape, getEscapeSecurityPeriod, getGuardians, getOrderDetails, getOrderDetails1155, getOwners, getSiwsStorageKey, getStoredSiwsToken, isSiwsTokenValid, normalizeSiwsSignature, ownerAliveTypedData, ownerConstructorCalldata, parseAdminHeaders, parseCreatorCoinCreated, priceToEkuboParams, randomNonce, requestSiwsToken, sealPrivateKey, sessionKeyHashOf, signAdminRequest, signWithPrivateKey, starkKeyPairFromPrivateKey, storeSiwsToken, teamCoinsRaw, toContractConditions as toDropContractConditions, unsealPrivateKey, validateName as validateCoinName, validateSupply as validateCoinSupply, validateSymbol as validateCoinSymbol, validatePrice, verifyAdminRequestSig };
|
|
11970
|
+
export { ADMIN_HEADERS, ADMIN_SCOPE, MAX_SUPPLY as COIN_MAX_SUPPLY, MIN_SUPPLY as COIN_MIN_SUPPLY, ClubService, CreatorCoinFactoryABI, CreatorCoinService, DropCollectionABI, DropFactoryABI, DropService, ERC1155CollectionService, IPClubCollectionABI, IPClubFactoryABI, IPCollection1155ABI, IPCollection1155FactoryABI, IPCollectionABI, IPGenesisABI, IPMarketplaceABI, IPNftABI, IPSponsorshipABI, IPTicketCollectionABI, IPTicketCollectionFactoryABI, InvalidStarkPrivateKeyError, MAX_HOLDERS_AT_LAUNCH, MAX_TEAM_ALLOCATION_PERCENT, Medialane1155ABI, MedialaneClient, MedialaneError, POPCollectionABI, POPFactoryABI, PopService, SUGGESTED_DEFAULT_PRICE, SponsoredCallRejectedError, SponsorshipService, StarknetVenue, TicketService, VALIDATED_EKUBO_PARAMS, adminRequestDigest, assertTransactionSucceeded, build1155CancellationTypedData, build1155OrderTypedData, buildAddOwnerCall, buildAdminSessionTypedData, buildCancelEscapeCall, buildCancellationTypedData, buildChangeOwnersCall, buildCompleteEscapeOwnerCall, buildCreateCreatorCoinCall, buildDeployAccountParams, buildFeeCall, buildLaunchOnEkuboCalls, buildOrderTypedData, buildRemoveOwnerByGuidCall, buildRemoveOwnerCall, buildSetFirstGuardianCall, buildTriggerEscapeOwnerCall, buybackQuoteRaw, toRaw as coinToRaw, computeAccountAddress, computeOwnerGuid, confirmIntentBestEffort, createAdminSessionGrant, decodeEscapeAndStatus, decodeGuardiansInfo, deriveAesKey, deriveOwnerKeyPair, deriveStarkKeyPair, encodeAdminHeaders, encodeByteArray, executeIntent, executeIntents, executeSponsored, fdvHuman, generateStarkKeyPair, getCounter, getCounter1155, getCreatorCoinGuarantees, getEscape, getEscapeSecurityPeriod, getGuardians, getOrderDetails, getOrderDetails1155, getOwners, getSiwsStorageKey, getStoredSiwsToken, isSiwsTokenValid, normalizeSiwsSignature, ownerAliveTypedData, ownerConstructorCalldata, parseAdminHeaders, parseCreatorCoinCreated, priceToEkuboParams, randomNonce, requestSiwsToken, sealPrivateKey, sessionKeyHashOf, signAdminRequest, signWithPrivateKey, starkKeyPairFromPrivateKey, storeSiwsToken, teamCoinsRaw, toContractConditions as toDropContractConditions, unsealPrivateKey, validateName as validateCoinName, validateSupply as validateCoinSupply, validateSymbol as validateCoinSymbol, validatePrice, verifyAdminRequestSig };
|
|
11920
11971
|
//# sourceMappingURL=index.js.map
|
|
11921
11972
|
//# sourceMappingURL=index.js.map
|