@biglup/cometa 1.0.111 → 1.0.112-a
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/cjs/index.d.mts +140 -4
- package/dist/cjs/index.d.ts +140 -4
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.d.mts +140 -4
- package/dist/esm/index.d.ts +140 -4
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/iife/index.global.js +2 -2
- package/dist/iife/index.global.js.map +1 -1
- package/package.json +1 -1
package/dist/cjs/index.d.mts
CHANGED
|
@@ -4454,6 +4454,28 @@ interface Bip32SecureKeyHandler {
|
|
|
4454
4454
|
* @note During this operation, the root private key is temporarily decrypted in memory and securely wiped immediately after use.
|
|
4455
4455
|
*/
|
|
4456
4456
|
signTransaction(txCbor: string, derivationPaths: DerivationPath[]): Promise<VkeyWitnessSet>;
|
|
4457
|
+
/**
|
|
4458
|
+
* Signs arbitrary data using a BIP32-derived key.
|
|
4459
|
+
* @param data - The hex-encoded data to be signed.
|
|
4460
|
+
* @param derivationPath - The derivation path specifying which key to use for signing.
|
|
4461
|
+
*
|
|
4462
|
+
* @returns {Promise<{ signature: string; key: string }>} A promise that resolves with an object containing the signature and the public key.
|
|
4463
|
+
*/
|
|
4464
|
+
signData(data: string, derivationPath: DerivationPath): Promise<{
|
|
4465
|
+
signature: string;
|
|
4466
|
+
key: string;
|
|
4467
|
+
}>;
|
|
4468
|
+
/**
|
|
4469
|
+
* Retrieves the securely stored private key.
|
|
4470
|
+
*
|
|
4471
|
+
* @param derivationPath - The derivation path specifying which key to retrieve.
|
|
4472
|
+
*
|
|
4473
|
+
* @warning This operation exposes the private key in memory and should be used with extreme caution.
|
|
4474
|
+
* The caller is responsible for securely handling and wiping the key from memory after use.
|
|
4475
|
+
*
|
|
4476
|
+
* @returns {Promise<Ed25519PrivateKey>} A promise that resolves with the private key.
|
|
4477
|
+
*/
|
|
4478
|
+
getPrivateKey(derivationPath: DerivationPath): Promise<Ed25519PrivateKey>;
|
|
4457
4479
|
/**
|
|
4458
4480
|
* Derives and returns an extended account public key from the root key.
|
|
4459
4481
|
*
|
|
@@ -4485,6 +4507,25 @@ interface Ed25519SecureKeyHandler {
|
|
|
4485
4507
|
* @returns {Promise<VkeyWitnessSet>} A promise that resolves with the `VkeyWitnessSet` containing the signature.
|
|
4486
4508
|
*/
|
|
4487
4509
|
signTransaction(transaction: string): Promise<VkeyWitnessSet>;
|
|
4510
|
+
/**
|
|
4511
|
+
* Signs arbitrary data using the securely stored Ed25519 private key.
|
|
4512
|
+
* @param data - The hex-encoded data to be signed.
|
|
4513
|
+
*
|
|
4514
|
+
* @returns {Promise<{ signature: string; key: string }>} A promise that resolves with an object containing the signature and the public key.
|
|
4515
|
+
*/
|
|
4516
|
+
signData(data: string): Promise<{
|
|
4517
|
+
signature: string;
|
|
4518
|
+
key: string;
|
|
4519
|
+
}>;
|
|
4520
|
+
/**
|
|
4521
|
+
* Retrieves the securely stored private key.
|
|
4522
|
+
*
|
|
4523
|
+
* @warning This operation exposes the private key in memory and should be used with extreme caution.
|
|
4524
|
+
* The caller is responsible for securely handling and wiping the key from memory after use.
|
|
4525
|
+
*
|
|
4526
|
+
* @returns {Promise<Ed25519PrivateKey>} A promise that resolves with the private key.
|
|
4527
|
+
*/
|
|
4528
|
+
getPrivateKey(): Promise<Ed25519PrivateKey>;
|
|
4488
4529
|
/**
|
|
4489
4530
|
* Retrieves the public key corresponding to the securely stored private key.
|
|
4490
4531
|
*
|
|
@@ -4567,6 +4608,28 @@ declare class SoftwareBip32SecureKeyHandler implements Bip32SecureKeyHandler {
|
|
|
4567
4608
|
* @note During this operation, the root key is temporarily decrypted in memory and then securely wiped immediately after use.
|
|
4568
4609
|
*/
|
|
4569
4610
|
signTransaction(txCbor: string, derivationPaths: DerivationPath[]): Promise<VkeyWitnessSet>;
|
|
4611
|
+
/**
|
|
4612
|
+
* Signs arbitrary data using a BIP32-derived key.
|
|
4613
|
+
* @param data - The hex-encoded data to be signed.
|
|
4614
|
+
* @param path - The derivation path specifying which key to use for signing.
|
|
4615
|
+
*
|
|
4616
|
+
* @returns {Promise<{ signature: string; key: string }>} A promise that resolves with an object containing the signature and the public key.
|
|
4617
|
+
*/
|
|
4618
|
+
signData(data: string, path: DerivationPath): Promise<{
|
|
4619
|
+
signature: string;
|
|
4620
|
+
key: string;
|
|
4621
|
+
}>;
|
|
4622
|
+
/**
|
|
4623
|
+
* Retrieves the securely stored private key.
|
|
4624
|
+
*
|
|
4625
|
+
* @param derivationPath - The derivation path specifying which key to retrieve.
|
|
4626
|
+
*
|
|
4627
|
+
* @warning This operation exposes the private key in memory and should be used with extreme caution.
|
|
4628
|
+
* The caller is responsible for securely handling and wiping the key from memory after use.
|
|
4629
|
+
*
|
|
4630
|
+
* @returns {Promise<Ed25519PrivateKey>} A promise that resolves with the private key.
|
|
4631
|
+
*/
|
|
4632
|
+
getPrivateKey(derivationPath: DerivationPath): Promise<Ed25519PrivateKey>;
|
|
4570
4633
|
/**
|
|
4571
4634
|
* Derives and returns an extended account public key.
|
|
4572
4635
|
*
|
|
@@ -4639,6 +4702,25 @@ declare class SoftwareEd25519SecureKeyHandler implements Ed25519SecureKeyHandler
|
|
|
4639
4702
|
* @note During this operation, the private key is temporarily decrypted in memory and then securely wiped immediately after use.
|
|
4640
4703
|
*/
|
|
4641
4704
|
signTransaction(txCbor: string): Promise<VkeyWitnessSet>;
|
|
4705
|
+
/**
|
|
4706
|
+
* Signs arbitrary data using the securely stored Ed25519 private key.
|
|
4707
|
+
* @param data - The hex-encoded data to be signed.
|
|
4708
|
+
*
|
|
4709
|
+
* @returns {Promise<{ signature: string; key: string }>} A promise that resolves with an object containing the signature and the public key.
|
|
4710
|
+
*/
|
|
4711
|
+
signData(data: string): Promise<{
|
|
4712
|
+
signature: string;
|
|
4713
|
+
key: string;
|
|
4714
|
+
}>;
|
|
4715
|
+
/**
|
|
4716
|
+
* Retrieves the securely stored private key.
|
|
4717
|
+
*
|
|
4718
|
+
* @warning This operation exposes the private key in memory and should be used with extreme caution.
|
|
4719
|
+
* The caller is responsible for securely handling and wiping the key from memory after use.
|
|
4720
|
+
*
|
|
4721
|
+
* @returns {Promise<Ed25519PrivateKey>} A promise that resolves with the private key.
|
|
4722
|
+
*/
|
|
4723
|
+
getPrivateKey(): Promise<Ed25519PrivateKey>;
|
|
4642
4724
|
/**
|
|
4643
4725
|
* Retrieves the public key corresponding to the securely stored private key.
|
|
4644
4726
|
*
|
|
@@ -7592,11 +7674,11 @@ declare class SingleAddressWallet implements Wallet {
|
|
|
7592
7674
|
signTransaction(txCbor: string, _partialSign: boolean): Promise<VkeyWitnessSet>;
|
|
7593
7675
|
/**
|
|
7594
7676
|
* Requests a CIP-8 compliant data signature from the wallet.
|
|
7595
|
-
* @param {Address | string}
|
|
7596
|
-
* @param {string}
|
|
7677
|
+
* @param {Address | string} address - The address to sign with (as an `Address` object or Bech32 string).
|
|
7678
|
+
* @param {string} payload - The hex-encoded data payload to be signed.
|
|
7597
7679
|
* @returns {Promise<{ signature: string; key: string }>} A promise that resolves to the signature and public key.
|
|
7598
7680
|
*/
|
|
7599
|
-
signData(
|
|
7681
|
+
signData(address: Address | string, payload: string): Promise<{
|
|
7600
7682
|
signature: string;
|
|
7601
7683
|
key: string;
|
|
7602
7684
|
}>;
|
|
@@ -7657,6 +7739,18 @@ declare class SingleAddressWallet implements Wallet {
|
|
|
7657
7739
|
* @returns {Promise<Address>} A promise resolving to a Rewards.
|
|
7658
7740
|
*/
|
|
7659
7741
|
private getRewardAddress;
|
|
7742
|
+
/**
|
|
7743
|
+
* Helper to sign data using the STAKING key associated with a Reward Address.
|
|
7744
|
+
*/
|
|
7745
|
+
private signWithRewardKey;
|
|
7746
|
+
/**
|
|
7747
|
+
* Helper to sign data using the DREP key associated with an Enterprise Address.
|
|
7748
|
+
*/
|
|
7749
|
+
private signWithDRepKey;
|
|
7750
|
+
/**
|
|
7751
|
+
* Helper to sign data using the PAYMENT key associated with Base or Enterprise Address.
|
|
7752
|
+
*/
|
|
7753
|
+
private signWithPaymentKey;
|
|
7660
7754
|
}
|
|
7661
7755
|
|
|
7662
7756
|
/**
|
|
@@ -7772,4 +7866,46 @@ declare class BrowserExtensionWallet implements Wallet {
|
|
|
7772
7866
|
createTransactionBuilder(): Promise<TransactionBuilder>;
|
|
7773
7867
|
}
|
|
7774
7868
|
|
|
7775
|
-
|
|
7869
|
+
/**
|
|
7870
|
+
* The result of a CIP-8 signing operation, containing the COSE_Sign1 and COSE_Key
|
|
7871
|
+
* CBOR-encoded buffers.
|
|
7872
|
+
*
|
|
7873
|
+
* @typedef {Object} Cip8SignResult
|
|
7874
|
+
* @property {Uint8Array} coseSign1 - The CBOR-encoded COSE_Sign1 structure.
|
|
7875
|
+
* @property {Uint8Array} coseKey - The CBOR-encoded COSE_Key structure.
|
|
7876
|
+
*/
|
|
7877
|
+
type Cip8SignResult = {
|
|
7878
|
+
coseSign1: Uint8Array;
|
|
7879
|
+
coseKey: Uint8Array;
|
|
7880
|
+
};
|
|
7881
|
+
/**
|
|
7882
|
+
* A utility class for creating CIP-8 / COSE signatures using Cardano types.
|
|
7883
|
+
*
|
|
7884
|
+
* These functions produce the necessary COSE_Sign1 and COSE_Key structures
|
|
7885
|
+
* required by the CIP-30 `signData` API.
|
|
7886
|
+
*/
|
|
7887
|
+
declare class Cip8 {
|
|
7888
|
+
private constructor();
|
|
7889
|
+
/**
|
|
7890
|
+
* Signs arbitrary data and binds the signature to a Cardano address.
|
|
7891
|
+
*
|
|
7892
|
+
* @param {Uint8Array} message - The raw message bytes to sign.
|
|
7893
|
+
* @param {Address} address - The Cardano address object.
|
|
7894
|
+
* @param {Ed25519PrivateKey} signingKey - The Ed25519 private key object.
|
|
7895
|
+
* @returns {Cip8SignResult} - An object containing the COSE_Sign1 and COSE_Key buffers.
|
|
7896
|
+
* @throws {Error} - If the signing fails or inputs are invalid.
|
|
7897
|
+
*/
|
|
7898
|
+
static sign(message: Uint8Array, address: Address, signingKey: Ed25519PrivateKey): Cip8SignResult;
|
|
7899
|
+
/**
|
|
7900
|
+
* Signs arbitrary data and binds the signature to a key hash.
|
|
7901
|
+
*
|
|
7902
|
+
* @param {Uint8Array} message - The raw message bytes to sign.
|
|
7903
|
+
* @param {Uint8Array} keyHash - The raw bytes of the Blake2b-224 key hash (28 bytes) to bind the signature to.
|
|
7904
|
+
* @param {Ed25519PrivateKey} signingKey - The Ed25519 private key wrapper object.
|
|
7905
|
+
* @returns {Cip8SignResult} - An object containing the COSE_Sign1 and COSE_Key buffers.
|
|
7906
|
+
* @throws {Error} - If the signing fails or inputs are invalid.
|
|
7907
|
+
*/
|
|
7908
|
+
static signEx(message: Uint8Array, keyHash: Uint8Array, signingKey: Ed25519PrivateKey): Cip8SignResult;
|
|
7909
|
+
}
|
|
7910
|
+
|
|
7911
|
+
export { type AccountDerivationPath, Address, AddressType, type AlwaysAbstain, type AlwaysNoConfidence, type Anchor, type AssetAmounts, type AuthCommitteeHotCertificate, Base58, BaseAddress, Bech32, type Bech32DecodeResult, Bip32PrivateKey, Bip32PublicKey, type Bip32SecureKeyHandler, Blake2b, BlockfrostProvider, type BlockfrostProviderConfig, BrowserExtensionWallet, ByronAddress, ByronAddressType, CborMajorType, CborReader, CborReaderState, CborSimpleValue, CborTag, CborWriter, type Certificate, CertificateType, type Cip30Wallet, Cip8, type Cip8SignResult, type CoinSelector, type CoinSelectorParams, type CoinSelectorResult, CoinType, type CommitteeMember, type CommitteeMembers, type Constitution, type ConstrPlutusData, type CostModel, Crc32, type Credential, type CredentialSet, CredentialType, type DRep, type DRepRegistrationCertificate, type DRepThresholds, type DRepUnregistrationCertificate, type Datum, DatumType, type DerivationPath, Ed25519PrivateKey, Ed25519PublicKey, type Ed25519SecureKeyHandler, Ed25519Signature, Emip003, EmscriptenCoinSelector, EmscriptenProvider, EmscriptenTxEvaluator, EnterpriseAddress, type ExUnits, type ExUnitsPrices, type GenesisKeyDelegationCertificate, type GovernanceActionId, InstanceType, KeyDerivationPurpose, KeyDerivationRole, MAX_SIGNED_64BIT, MAX_UNSIGNED_64BIT, MIN_SIGNED_64BIT, type MirCertificate, MirCertificateKind, MirCertificatePot, type MirToPot, type MirToStakeCreds, type NativeScript, NativeScriptKind, NetworkId, NetworkMagic, Pbkdf2HmacSha512, type PlutusData, PlutusLanguageVersion, type PlutusList, type PlutusMap, type PlutusScript, PointerAddress, type PoolParameters, type PoolRegistrationCertificate, type PoolRetirementCertificate, type PoolVotingThresholds, type ProtocolParameters, type ProtocolParametersUpdate, type ProtocolVersion, type Provider, type Redeemer, RedeemerPurpose, type RegistrationCertificate, type Relay, type RelayByAddress, type RelayByName, type RelayByNameMultihost, type RequireAllOfScript, type RequireAnyOfScript, type RequireAtLeastScript, type RequireSignatureScript, type RequireTimeAfterScript, type RequireTimeBeforeScript, type ResignCommitteeColdCertificate, RewardAddress, type Script, ScriptType, type SecureKeyHandler, type SingleAddressCredentialsConfig, SingleAddressWallet, type SingleAddressWalletConfig, type SingleAddressWalletFromMnemonicsConfig, SoftwareBip32SecureKeyHandler, SoftwareEd25519SecureKeyHandler, type StakeDelegationCertificate, type StakeDeregistrationCertificate, type StakePointer, type StakeRegistrationCertificate, type StakeRegistrationDelegationCertificate, type StakeVoteDelegationCertificate, type StakeVoteRegistrationDelegationCertificate, TransactionBuilder, type TxEvaluator, type TxIn, type TxOut, type UTxO, type UnitInterval, type UnregistrationCertificate, type UpdateDRepCertificate, type Value, type VkeyWitness, type VkeyWitnessSet, Vote, type VoteDelegationCertificate, type VoteRegistrationDelegationCertificate, type Voter, VoterType, type VotingProcedure, type Wallet, type Withdrawals, addWithdrawal, applyVkeyWitnessSet, assertSuccess, assetIdFromParts, assetNameFromAssetId, asyncifyStateTracker, base64ToBytes, blake2bHashFromBytes, blake2bHashFromHex, bridgeCallbacks, cborToPlutusData, cborToScript, cip105DRepFromCredential, cip129DRepFromCredential, cip129DRepFromPublicKey, cip129DRepFromScript, computeScriptHash, dRepToAddress, dRepToCredential, deepEqualsPlutusData, deepEqualsScript, derefCostModel, derefCostModels, derefDRepVotingThresholds, derefExUnitPrices, derefExUnits, derefPoolVotingThresholds, derefProtocolParameters, derefProtocolVersion, derefUnitInterval, entropyToMnemonic, finalizationRegistry, getErrorString, getFromInstanceRegistry, getLibCardanoCVersion, getModule, getScriptAddress, getUniqueSigners, govActionIdFromBech32, govActionIdToBech32, harden, hexToBufferObject, hexToUint8Array, inspectTx, isDRepAbstain, isDRepCredential, isDRepNoConfidence, isNativeScript, isPlutusDataBigInt, isPlutusDataByteArray, isPlutusDataConstr, isPlutusDataList, isPlutusDataMap, isPlutusDataWithCborCache, isPlutusScript, isReady, jsonToNativeScript, mnemonicToEntropy, nativeScriptToJson, plutusDataToCbor, policyIdFromAssetId, prepareUtxoForEvaluation, readAnchor, readAssetId, readAuthCommitteeHotCertificate, readBlake2bHashData, readBufferData, readCertificate, readCommitteeMembersMap, readConstitution, readCostModel, readCostModels, readCredential, readCredentialSet, readDRepRegistrationCertificate, readDRepUnregistrationCertificate, readDRepVotingThresholds, readDatum, readExUnitPrices, readExUnits, readGenesisKeyDelegationCertificate, readGovernanceActionId, readI64, readInputSet, readIntervalComponents, readMoveInstantaneousRewardsCertificate, readPlutusData, readPoolParameters, readPoolRegistrationCertificate, readPoolRetirementCertificate, readPoolVotingThresholds, readProtocolParamUpdate, readProtocolParameters, readProtocolVersion, readRedeemer, readRedeemerList, readRedeemersFromTx, readRegistrationCertificate, readResignCommitteeColdCertificate, readScript, readStakeDelegationCertificate, readStakeDeregistrationCertificate, readStakeRegistrationCertificate, readStakeRegistrationDelegationCertificate, readStakeVoteDelegationCertificate, readStakeVoteRegistrationDelegationCertificate, readStringFromMemory, readTransactionFromCbor, readTxIn, readTxOut, readTxOutFromCbor, readUTxOtFromCbor, readUnitIntervalAsDouble, readUnregistrationCertificate, readUpdateDRepCertificate, readUtxo, readUtxoList, readValue, readValueFromCbor, readVkeyWitnessSet, readVkeyWitnessSetFromWitnessSetCbor, readVoteDelegationCertificate, readVoteRegistrationDelegationCertificate, readVoter, readVotingProcedure, readWithdrawalMap, ready, registerBridgeErrorHandler, registerInstance, reportBridgeError, scriptToCbor, splitToLowHigh64bit, toCip105DRepID, toCip129DRepID, toUnitInterval, uint8ArrayToHex, uint8ArrayToUtf8, unrefObject, unregisterBridgeErrorHandler, unregisterInstance, utf8ByteLen, utf8ToHex, utf8ToUint8Array, writeAccountDerivationPaths, writeAnchor, writeAssetId, writeAuthCommitteeHotCertificate, writeBytesToMemory, writeCertificate, writeCommitteeMembersMap, writeConstitution, writeCostModel, writeCostModels, writeCredential, writeCredentialSet, writeDRepRegistrationCertificate, writeDRepUnregistrationCertificate, writeDRepVotingThresholds, writeDatum, writeDerivationPaths, writeExUnitPrices, writeExUnits, writeGenesisKeyDelegationCertificate, writeGovernanceActionId, writeI64, writeInputSet, writeMoveInstantaneousRewardsCertificate, writePlutusData, writePoolParameters, writePoolRegistrationCertificate, writePoolRetirementCertificate, writePoolVotingThresholds, writeProtocolParamUpdate, writeProtocolParameters, writeProtocolVersion, writeRedeemer, writeRedeemerList, writeRegistrationCertificate, writeResignCommitteeColdCertificate, writeScript, writeStakeDelegationCertificate, writeStakeDeregistrationCertificate, writeStakeRegistrationCertificate, writeStakeRegistrationDelegationCertificate, writeStakeVoteDelegationCertificate, writeStakeVoteRegistrationDelegationCertificate, writeStringToMemory, writeTransactionToCbor, writeTxIn, writeTxOut, writeUnitInterval, writeUnitIntervalAsDouble, writeUnregistrationCertificate, writeUpdateDRepCertificate, writeUtxo, writeUtxoList, writeValue, writeVkeyWitnessSet, writeVoteDelegationCertificate, writeVoteRegistrationDelegationCertificate, writeVoter, writeVotingProcedure, writeWithdrawalMap };
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -4454,6 +4454,28 @@ interface Bip32SecureKeyHandler {
|
|
|
4454
4454
|
* @note During this operation, the root private key is temporarily decrypted in memory and securely wiped immediately after use.
|
|
4455
4455
|
*/
|
|
4456
4456
|
signTransaction(txCbor: string, derivationPaths: DerivationPath[]): Promise<VkeyWitnessSet>;
|
|
4457
|
+
/**
|
|
4458
|
+
* Signs arbitrary data using a BIP32-derived key.
|
|
4459
|
+
* @param data - The hex-encoded data to be signed.
|
|
4460
|
+
* @param derivationPath - The derivation path specifying which key to use for signing.
|
|
4461
|
+
*
|
|
4462
|
+
* @returns {Promise<{ signature: string; key: string }>} A promise that resolves with an object containing the signature and the public key.
|
|
4463
|
+
*/
|
|
4464
|
+
signData(data: string, derivationPath: DerivationPath): Promise<{
|
|
4465
|
+
signature: string;
|
|
4466
|
+
key: string;
|
|
4467
|
+
}>;
|
|
4468
|
+
/**
|
|
4469
|
+
* Retrieves the securely stored private key.
|
|
4470
|
+
*
|
|
4471
|
+
* @param derivationPath - The derivation path specifying which key to retrieve.
|
|
4472
|
+
*
|
|
4473
|
+
* @warning This operation exposes the private key in memory and should be used with extreme caution.
|
|
4474
|
+
* The caller is responsible for securely handling and wiping the key from memory after use.
|
|
4475
|
+
*
|
|
4476
|
+
* @returns {Promise<Ed25519PrivateKey>} A promise that resolves with the private key.
|
|
4477
|
+
*/
|
|
4478
|
+
getPrivateKey(derivationPath: DerivationPath): Promise<Ed25519PrivateKey>;
|
|
4457
4479
|
/**
|
|
4458
4480
|
* Derives and returns an extended account public key from the root key.
|
|
4459
4481
|
*
|
|
@@ -4485,6 +4507,25 @@ interface Ed25519SecureKeyHandler {
|
|
|
4485
4507
|
* @returns {Promise<VkeyWitnessSet>} A promise that resolves with the `VkeyWitnessSet` containing the signature.
|
|
4486
4508
|
*/
|
|
4487
4509
|
signTransaction(transaction: string): Promise<VkeyWitnessSet>;
|
|
4510
|
+
/**
|
|
4511
|
+
* Signs arbitrary data using the securely stored Ed25519 private key.
|
|
4512
|
+
* @param data - The hex-encoded data to be signed.
|
|
4513
|
+
*
|
|
4514
|
+
* @returns {Promise<{ signature: string; key: string }>} A promise that resolves with an object containing the signature and the public key.
|
|
4515
|
+
*/
|
|
4516
|
+
signData(data: string): Promise<{
|
|
4517
|
+
signature: string;
|
|
4518
|
+
key: string;
|
|
4519
|
+
}>;
|
|
4520
|
+
/**
|
|
4521
|
+
* Retrieves the securely stored private key.
|
|
4522
|
+
*
|
|
4523
|
+
* @warning This operation exposes the private key in memory and should be used with extreme caution.
|
|
4524
|
+
* The caller is responsible for securely handling and wiping the key from memory after use.
|
|
4525
|
+
*
|
|
4526
|
+
* @returns {Promise<Ed25519PrivateKey>} A promise that resolves with the private key.
|
|
4527
|
+
*/
|
|
4528
|
+
getPrivateKey(): Promise<Ed25519PrivateKey>;
|
|
4488
4529
|
/**
|
|
4489
4530
|
* Retrieves the public key corresponding to the securely stored private key.
|
|
4490
4531
|
*
|
|
@@ -4567,6 +4608,28 @@ declare class SoftwareBip32SecureKeyHandler implements Bip32SecureKeyHandler {
|
|
|
4567
4608
|
* @note During this operation, the root key is temporarily decrypted in memory and then securely wiped immediately after use.
|
|
4568
4609
|
*/
|
|
4569
4610
|
signTransaction(txCbor: string, derivationPaths: DerivationPath[]): Promise<VkeyWitnessSet>;
|
|
4611
|
+
/**
|
|
4612
|
+
* Signs arbitrary data using a BIP32-derived key.
|
|
4613
|
+
* @param data - The hex-encoded data to be signed.
|
|
4614
|
+
* @param path - The derivation path specifying which key to use for signing.
|
|
4615
|
+
*
|
|
4616
|
+
* @returns {Promise<{ signature: string; key: string }>} A promise that resolves with an object containing the signature and the public key.
|
|
4617
|
+
*/
|
|
4618
|
+
signData(data: string, path: DerivationPath): Promise<{
|
|
4619
|
+
signature: string;
|
|
4620
|
+
key: string;
|
|
4621
|
+
}>;
|
|
4622
|
+
/**
|
|
4623
|
+
* Retrieves the securely stored private key.
|
|
4624
|
+
*
|
|
4625
|
+
* @param derivationPath - The derivation path specifying which key to retrieve.
|
|
4626
|
+
*
|
|
4627
|
+
* @warning This operation exposes the private key in memory and should be used with extreme caution.
|
|
4628
|
+
* The caller is responsible for securely handling and wiping the key from memory after use.
|
|
4629
|
+
*
|
|
4630
|
+
* @returns {Promise<Ed25519PrivateKey>} A promise that resolves with the private key.
|
|
4631
|
+
*/
|
|
4632
|
+
getPrivateKey(derivationPath: DerivationPath): Promise<Ed25519PrivateKey>;
|
|
4570
4633
|
/**
|
|
4571
4634
|
* Derives and returns an extended account public key.
|
|
4572
4635
|
*
|
|
@@ -4639,6 +4702,25 @@ declare class SoftwareEd25519SecureKeyHandler implements Ed25519SecureKeyHandler
|
|
|
4639
4702
|
* @note During this operation, the private key is temporarily decrypted in memory and then securely wiped immediately after use.
|
|
4640
4703
|
*/
|
|
4641
4704
|
signTransaction(txCbor: string): Promise<VkeyWitnessSet>;
|
|
4705
|
+
/**
|
|
4706
|
+
* Signs arbitrary data using the securely stored Ed25519 private key.
|
|
4707
|
+
* @param data - The hex-encoded data to be signed.
|
|
4708
|
+
*
|
|
4709
|
+
* @returns {Promise<{ signature: string; key: string }>} A promise that resolves with an object containing the signature and the public key.
|
|
4710
|
+
*/
|
|
4711
|
+
signData(data: string): Promise<{
|
|
4712
|
+
signature: string;
|
|
4713
|
+
key: string;
|
|
4714
|
+
}>;
|
|
4715
|
+
/**
|
|
4716
|
+
* Retrieves the securely stored private key.
|
|
4717
|
+
*
|
|
4718
|
+
* @warning This operation exposes the private key in memory and should be used with extreme caution.
|
|
4719
|
+
* The caller is responsible for securely handling and wiping the key from memory after use.
|
|
4720
|
+
*
|
|
4721
|
+
* @returns {Promise<Ed25519PrivateKey>} A promise that resolves with the private key.
|
|
4722
|
+
*/
|
|
4723
|
+
getPrivateKey(): Promise<Ed25519PrivateKey>;
|
|
4642
4724
|
/**
|
|
4643
4725
|
* Retrieves the public key corresponding to the securely stored private key.
|
|
4644
4726
|
*
|
|
@@ -7592,11 +7674,11 @@ declare class SingleAddressWallet implements Wallet {
|
|
|
7592
7674
|
signTransaction(txCbor: string, _partialSign: boolean): Promise<VkeyWitnessSet>;
|
|
7593
7675
|
/**
|
|
7594
7676
|
* Requests a CIP-8 compliant data signature from the wallet.
|
|
7595
|
-
* @param {Address | string}
|
|
7596
|
-
* @param {string}
|
|
7677
|
+
* @param {Address | string} address - The address to sign with (as an `Address` object or Bech32 string).
|
|
7678
|
+
* @param {string} payload - The hex-encoded data payload to be signed.
|
|
7597
7679
|
* @returns {Promise<{ signature: string; key: string }>} A promise that resolves to the signature and public key.
|
|
7598
7680
|
*/
|
|
7599
|
-
signData(
|
|
7681
|
+
signData(address: Address | string, payload: string): Promise<{
|
|
7600
7682
|
signature: string;
|
|
7601
7683
|
key: string;
|
|
7602
7684
|
}>;
|
|
@@ -7657,6 +7739,18 @@ declare class SingleAddressWallet implements Wallet {
|
|
|
7657
7739
|
* @returns {Promise<Address>} A promise resolving to a Rewards.
|
|
7658
7740
|
*/
|
|
7659
7741
|
private getRewardAddress;
|
|
7742
|
+
/**
|
|
7743
|
+
* Helper to sign data using the STAKING key associated with a Reward Address.
|
|
7744
|
+
*/
|
|
7745
|
+
private signWithRewardKey;
|
|
7746
|
+
/**
|
|
7747
|
+
* Helper to sign data using the DREP key associated with an Enterprise Address.
|
|
7748
|
+
*/
|
|
7749
|
+
private signWithDRepKey;
|
|
7750
|
+
/**
|
|
7751
|
+
* Helper to sign data using the PAYMENT key associated with Base or Enterprise Address.
|
|
7752
|
+
*/
|
|
7753
|
+
private signWithPaymentKey;
|
|
7660
7754
|
}
|
|
7661
7755
|
|
|
7662
7756
|
/**
|
|
@@ -7772,4 +7866,46 @@ declare class BrowserExtensionWallet implements Wallet {
|
|
|
7772
7866
|
createTransactionBuilder(): Promise<TransactionBuilder>;
|
|
7773
7867
|
}
|
|
7774
7868
|
|
|
7775
|
-
|
|
7869
|
+
/**
|
|
7870
|
+
* The result of a CIP-8 signing operation, containing the COSE_Sign1 and COSE_Key
|
|
7871
|
+
* CBOR-encoded buffers.
|
|
7872
|
+
*
|
|
7873
|
+
* @typedef {Object} Cip8SignResult
|
|
7874
|
+
* @property {Uint8Array} coseSign1 - The CBOR-encoded COSE_Sign1 structure.
|
|
7875
|
+
* @property {Uint8Array} coseKey - The CBOR-encoded COSE_Key structure.
|
|
7876
|
+
*/
|
|
7877
|
+
type Cip8SignResult = {
|
|
7878
|
+
coseSign1: Uint8Array;
|
|
7879
|
+
coseKey: Uint8Array;
|
|
7880
|
+
};
|
|
7881
|
+
/**
|
|
7882
|
+
* A utility class for creating CIP-8 / COSE signatures using Cardano types.
|
|
7883
|
+
*
|
|
7884
|
+
* These functions produce the necessary COSE_Sign1 and COSE_Key structures
|
|
7885
|
+
* required by the CIP-30 `signData` API.
|
|
7886
|
+
*/
|
|
7887
|
+
declare class Cip8 {
|
|
7888
|
+
private constructor();
|
|
7889
|
+
/**
|
|
7890
|
+
* Signs arbitrary data and binds the signature to a Cardano address.
|
|
7891
|
+
*
|
|
7892
|
+
* @param {Uint8Array} message - The raw message bytes to sign.
|
|
7893
|
+
* @param {Address} address - The Cardano address object.
|
|
7894
|
+
* @param {Ed25519PrivateKey} signingKey - The Ed25519 private key object.
|
|
7895
|
+
* @returns {Cip8SignResult} - An object containing the COSE_Sign1 and COSE_Key buffers.
|
|
7896
|
+
* @throws {Error} - If the signing fails or inputs are invalid.
|
|
7897
|
+
*/
|
|
7898
|
+
static sign(message: Uint8Array, address: Address, signingKey: Ed25519PrivateKey): Cip8SignResult;
|
|
7899
|
+
/**
|
|
7900
|
+
* Signs arbitrary data and binds the signature to a key hash.
|
|
7901
|
+
*
|
|
7902
|
+
* @param {Uint8Array} message - The raw message bytes to sign.
|
|
7903
|
+
* @param {Uint8Array} keyHash - The raw bytes of the Blake2b-224 key hash (28 bytes) to bind the signature to.
|
|
7904
|
+
* @param {Ed25519PrivateKey} signingKey - The Ed25519 private key wrapper object.
|
|
7905
|
+
* @returns {Cip8SignResult} - An object containing the COSE_Sign1 and COSE_Key buffers.
|
|
7906
|
+
* @throws {Error} - If the signing fails or inputs are invalid.
|
|
7907
|
+
*/
|
|
7908
|
+
static signEx(message: Uint8Array, keyHash: Uint8Array, signingKey: Ed25519PrivateKey): Cip8SignResult;
|
|
7909
|
+
}
|
|
7910
|
+
|
|
7911
|
+
export { type AccountDerivationPath, Address, AddressType, type AlwaysAbstain, type AlwaysNoConfidence, type Anchor, type AssetAmounts, type AuthCommitteeHotCertificate, Base58, BaseAddress, Bech32, type Bech32DecodeResult, Bip32PrivateKey, Bip32PublicKey, type Bip32SecureKeyHandler, Blake2b, BlockfrostProvider, type BlockfrostProviderConfig, BrowserExtensionWallet, ByronAddress, ByronAddressType, CborMajorType, CborReader, CborReaderState, CborSimpleValue, CborTag, CborWriter, type Certificate, CertificateType, type Cip30Wallet, Cip8, type Cip8SignResult, type CoinSelector, type CoinSelectorParams, type CoinSelectorResult, CoinType, type CommitteeMember, type CommitteeMembers, type Constitution, type ConstrPlutusData, type CostModel, Crc32, type Credential, type CredentialSet, CredentialType, type DRep, type DRepRegistrationCertificate, type DRepThresholds, type DRepUnregistrationCertificate, type Datum, DatumType, type DerivationPath, Ed25519PrivateKey, Ed25519PublicKey, type Ed25519SecureKeyHandler, Ed25519Signature, Emip003, EmscriptenCoinSelector, EmscriptenProvider, EmscriptenTxEvaluator, EnterpriseAddress, type ExUnits, type ExUnitsPrices, type GenesisKeyDelegationCertificate, type GovernanceActionId, InstanceType, KeyDerivationPurpose, KeyDerivationRole, MAX_SIGNED_64BIT, MAX_UNSIGNED_64BIT, MIN_SIGNED_64BIT, type MirCertificate, MirCertificateKind, MirCertificatePot, type MirToPot, type MirToStakeCreds, type NativeScript, NativeScriptKind, NetworkId, NetworkMagic, Pbkdf2HmacSha512, type PlutusData, PlutusLanguageVersion, type PlutusList, type PlutusMap, type PlutusScript, PointerAddress, type PoolParameters, type PoolRegistrationCertificate, type PoolRetirementCertificate, type PoolVotingThresholds, type ProtocolParameters, type ProtocolParametersUpdate, type ProtocolVersion, type Provider, type Redeemer, RedeemerPurpose, type RegistrationCertificate, type Relay, type RelayByAddress, type RelayByName, type RelayByNameMultihost, type RequireAllOfScript, type RequireAnyOfScript, type RequireAtLeastScript, type RequireSignatureScript, type RequireTimeAfterScript, type RequireTimeBeforeScript, type ResignCommitteeColdCertificate, RewardAddress, type Script, ScriptType, type SecureKeyHandler, type SingleAddressCredentialsConfig, SingleAddressWallet, type SingleAddressWalletConfig, type SingleAddressWalletFromMnemonicsConfig, SoftwareBip32SecureKeyHandler, SoftwareEd25519SecureKeyHandler, type StakeDelegationCertificate, type StakeDeregistrationCertificate, type StakePointer, type StakeRegistrationCertificate, type StakeRegistrationDelegationCertificate, type StakeVoteDelegationCertificate, type StakeVoteRegistrationDelegationCertificate, TransactionBuilder, type TxEvaluator, type TxIn, type TxOut, type UTxO, type UnitInterval, type UnregistrationCertificate, type UpdateDRepCertificate, type Value, type VkeyWitness, type VkeyWitnessSet, Vote, type VoteDelegationCertificate, type VoteRegistrationDelegationCertificate, type Voter, VoterType, type VotingProcedure, type Wallet, type Withdrawals, addWithdrawal, applyVkeyWitnessSet, assertSuccess, assetIdFromParts, assetNameFromAssetId, asyncifyStateTracker, base64ToBytes, blake2bHashFromBytes, blake2bHashFromHex, bridgeCallbacks, cborToPlutusData, cborToScript, cip105DRepFromCredential, cip129DRepFromCredential, cip129DRepFromPublicKey, cip129DRepFromScript, computeScriptHash, dRepToAddress, dRepToCredential, deepEqualsPlutusData, deepEqualsScript, derefCostModel, derefCostModels, derefDRepVotingThresholds, derefExUnitPrices, derefExUnits, derefPoolVotingThresholds, derefProtocolParameters, derefProtocolVersion, derefUnitInterval, entropyToMnemonic, finalizationRegistry, getErrorString, getFromInstanceRegistry, getLibCardanoCVersion, getModule, getScriptAddress, getUniqueSigners, govActionIdFromBech32, govActionIdToBech32, harden, hexToBufferObject, hexToUint8Array, inspectTx, isDRepAbstain, isDRepCredential, isDRepNoConfidence, isNativeScript, isPlutusDataBigInt, isPlutusDataByteArray, isPlutusDataConstr, isPlutusDataList, isPlutusDataMap, isPlutusDataWithCborCache, isPlutusScript, isReady, jsonToNativeScript, mnemonicToEntropy, nativeScriptToJson, plutusDataToCbor, policyIdFromAssetId, prepareUtxoForEvaluation, readAnchor, readAssetId, readAuthCommitteeHotCertificate, readBlake2bHashData, readBufferData, readCertificate, readCommitteeMembersMap, readConstitution, readCostModel, readCostModels, readCredential, readCredentialSet, readDRepRegistrationCertificate, readDRepUnregistrationCertificate, readDRepVotingThresholds, readDatum, readExUnitPrices, readExUnits, readGenesisKeyDelegationCertificate, readGovernanceActionId, readI64, readInputSet, readIntervalComponents, readMoveInstantaneousRewardsCertificate, readPlutusData, readPoolParameters, readPoolRegistrationCertificate, readPoolRetirementCertificate, readPoolVotingThresholds, readProtocolParamUpdate, readProtocolParameters, readProtocolVersion, readRedeemer, readRedeemerList, readRedeemersFromTx, readRegistrationCertificate, readResignCommitteeColdCertificate, readScript, readStakeDelegationCertificate, readStakeDeregistrationCertificate, readStakeRegistrationCertificate, readStakeRegistrationDelegationCertificate, readStakeVoteDelegationCertificate, readStakeVoteRegistrationDelegationCertificate, readStringFromMemory, readTransactionFromCbor, readTxIn, readTxOut, readTxOutFromCbor, readUTxOtFromCbor, readUnitIntervalAsDouble, readUnregistrationCertificate, readUpdateDRepCertificate, readUtxo, readUtxoList, readValue, readValueFromCbor, readVkeyWitnessSet, readVkeyWitnessSetFromWitnessSetCbor, readVoteDelegationCertificate, readVoteRegistrationDelegationCertificate, readVoter, readVotingProcedure, readWithdrawalMap, ready, registerBridgeErrorHandler, registerInstance, reportBridgeError, scriptToCbor, splitToLowHigh64bit, toCip105DRepID, toCip129DRepID, toUnitInterval, uint8ArrayToHex, uint8ArrayToUtf8, unrefObject, unregisterBridgeErrorHandler, unregisterInstance, utf8ByteLen, utf8ToHex, utf8ToUint8Array, writeAccountDerivationPaths, writeAnchor, writeAssetId, writeAuthCommitteeHotCertificate, writeBytesToMemory, writeCertificate, writeCommitteeMembersMap, writeConstitution, writeCostModel, writeCostModels, writeCredential, writeCredentialSet, writeDRepRegistrationCertificate, writeDRepUnregistrationCertificate, writeDRepVotingThresholds, writeDatum, writeDerivationPaths, writeExUnitPrices, writeExUnits, writeGenesisKeyDelegationCertificate, writeGovernanceActionId, writeI64, writeInputSet, writeMoveInstantaneousRewardsCertificate, writePlutusData, writePoolParameters, writePoolRegistrationCertificate, writePoolRetirementCertificate, writePoolVotingThresholds, writeProtocolParamUpdate, writeProtocolParameters, writeProtocolVersion, writeRedeemer, writeRedeemerList, writeRegistrationCertificate, writeResignCommitteeColdCertificate, writeScript, writeStakeDelegationCertificate, writeStakeDeregistrationCertificate, writeStakeRegistrationCertificate, writeStakeRegistrationDelegationCertificate, writeStakeVoteDelegationCertificate, writeStakeVoteRegistrationDelegationCertificate, writeStringToMemory, writeTransactionToCbor, writeTxIn, writeTxOut, writeUnitInterval, writeUnitIntervalAsDouble, writeUnregistrationCertificate, writeUpdateDRepCertificate, writeUtxo, writeUtxoList, writeValue, writeVkeyWitnessSet, writeVoteDelegationCertificate, writeVoteRegistrationDelegationCertificate, writeVoter, writeVotingProcedure, writeWithdrawalMap };
|