@cardano-sdk/key-management 0.15.1 → 0.17.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/cjs/Bip32Account.d.ts +19 -0
- package/dist/cjs/Bip32Account.d.ts.map +1 -0
- package/dist/cjs/Bip32Account.js +74 -0
- package/dist/cjs/Bip32Account.js.map +1 -0
- package/dist/cjs/InMemoryKeyAgent.d.ts +2 -2
- package/dist/cjs/InMemoryKeyAgent.d.ts.map +1 -1
- package/dist/cjs/InMemoryKeyAgent.js +3 -4
- package/dist/cjs/InMemoryKeyAgent.js.map +1 -1
- package/dist/cjs/KeyAgentBase.d.ts +4 -7
- package/dist/cjs/KeyAgentBase.d.ts.map +1 -1
- package/dist/cjs/KeyAgentBase.js +9 -50
- package/dist/cjs/KeyAgentBase.js.map +1 -1
- package/dist/cjs/cip8/cip30signData.d.ts +5 -3
- package/dist/cjs/cip8/cip30signData.d.ts.map +1 -1
- package/dist/cjs/cip8/cip30signData.js +6 -8
- package/dist/cjs/cip8/cip30signData.js.map +1 -1
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +1 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/tsconfig.tsbuildinfo +1 -1
- package/dist/cjs/types.d.ts +18 -16
- package/dist/cjs/types.d.ts.map +1 -1
- package/dist/cjs/types.js +3 -1
- package/dist/cjs/types.js.map +1 -1
- package/dist/cjs/util/KeyAgentTransactionSigner.d.ts.map +1 -1
- package/dist/cjs/util/KeyAgentTransactionSigner.js +3 -0
- package/dist/cjs/util/KeyAgentTransactionSigner.js.map +1 -1
- package/dist/cjs/util/createAsyncKeyAgent.d.ts.map +1 -1
- package/dist/cjs/util/createAsyncKeyAgent.js +15 -29
- package/dist/cjs/util/createAsyncKeyAgent.js.map +1 -1
- package/dist/cjs/util/createWitnesser.d.ts +3 -3
- package/dist/cjs/util/createWitnesser.d.ts.map +1 -1
- package/dist/cjs/util/createWitnesser.js +3 -3
- package/dist/cjs/util/createWitnesser.js.map +1 -1
- package/dist/cjs/util/ensureStakeKeys.d.ts +9 -3
- package/dist/cjs/util/ensureStakeKeys.d.ts.map +1 -1
- package/dist/cjs/util/ensureStakeKeys.js +8 -5
- package/dist/cjs/util/ensureStakeKeys.js.map +1 -1
- package/dist/cjs/util/index.d.ts +0 -1
- package/dist/cjs/util/index.d.ts.map +1 -1
- package/dist/cjs/util/index.js +0 -1
- package/dist/cjs/util/index.js.map +1 -1
- package/dist/cjs/util/key.d.ts +1 -0
- package/dist/cjs/util/key.d.ts.map +1 -1
- package/dist/cjs/util/key.js +3 -1
- package/dist/cjs/util/key.js.map +1 -1
- package/dist/cjs/util/ownSignatureKeyPaths.d.ts +3 -2
- package/dist/cjs/util/ownSignatureKeyPaths.d.ts.map +1 -1
- package/dist/cjs/util/ownSignatureKeyPaths.js +17 -8
- package/dist/cjs/util/ownSignatureKeyPaths.js.map +1 -1
- package/dist/cjs/util/stubSignTransaction.d.ts +3 -4
- package/dist/cjs/util/stubSignTransaction.d.ts.map +1 -1
- package/dist/cjs/util/stubSignTransaction.js +2 -3
- package/dist/cjs/util/stubSignTransaction.js.map +1 -1
- package/dist/esm/Bip32Account.d.ts +19 -0
- package/dist/esm/Bip32Account.d.ts.map +1 -0
- package/dist/esm/Bip32Account.js +47 -0
- package/dist/esm/Bip32Account.js.map +1 -0
- package/dist/esm/InMemoryKeyAgent.d.ts +2 -2
- package/dist/esm/InMemoryKeyAgent.d.ts.map +1 -1
- package/dist/esm/InMemoryKeyAgent.js +3 -4
- package/dist/esm/InMemoryKeyAgent.js.map +1 -1
- package/dist/esm/KeyAgentBase.d.ts +4 -7
- package/dist/esm/KeyAgentBase.d.ts.map +1 -1
- package/dist/esm/KeyAgentBase.js +9 -50
- package/dist/esm/KeyAgentBase.js.map +1 -1
- package/dist/esm/cip8/cip30signData.d.ts +5 -3
- package/dist/esm/cip8/cip30signData.d.ts.map +1 -1
- package/dist/esm/cip8/cip30signData.js +6 -8
- package/dist/esm/cip8/cip30signData.js.map +1 -1
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/tsconfig.tsbuildinfo +1 -1
- package/dist/esm/types.d.ts +18 -16
- package/dist/esm/types.d.ts.map +1 -1
- package/dist/esm/types.js +1 -0
- package/dist/esm/types.js.map +1 -1
- package/dist/esm/util/KeyAgentTransactionSigner.d.ts.map +1 -1
- package/dist/esm/util/KeyAgentTransactionSigner.js +3 -0
- package/dist/esm/util/KeyAgentTransactionSigner.js.map +1 -1
- package/dist/esm/util/createAsyncKeyAgent.d.ts.map +1 -1
- package/dist/esm/util/createAsyncKeyAgent.js +15 -29
- package/dist/esm/util/createAsyncKeyAgent.js.map +1 -1
- package/dist/esm/util/createWitnesser.d.ts +3 -3
- package/dist/esm/util/createWitnesser.d.ts.map +1 -1
- package/dist/esm/util/createWitnesser.js +3 -3
- package/dist/esm/util/createWitnesser.js.map +1 -1
- package/dist/esm/util/ensureStakeKeys.d.ts +9 -3
- package/dist/esm/util/ensureStakeKeys.d.ts.map +1 -1
- package/dist/esm/util/ensureStakeKeys.js +8 -5
- package/dist/esm/util/ensureStakeKeys.js.map +1 -1
- package/dist/esm/util/index.d.ts +0 -1
- package/dist/esm/util/index.d.ts.map +1 -1
- package/dist/esm/util/index.js +0 -1
- package/dist/esm/util/index.js.map +1 -1
- package/dist/esm/util/key.d.ts +1 -0
- package/dist/esm/util/key.d.ts.map +1 -1
- package/dist/esm/util/key.js +1 -0
- package/dist/esm/util/key.js.map +1 -1
- package/dist/esm/util/ownSignatureKeyPaths.d.ts +3 -2
- package/dist/esm/util/ownSignatureKeyPaths.d.ts.map +1 -1
- package/dist/esm/util/ownSignatureKeyPaths.js +15 -7
- package/dist/esm/util/ownSignatureKeyPaths.js.map +1 -1
- package/dist/esm/util/stubSignTransaction.d.ts +3 -4
- package/dist/esm/util/stubSignTransaction.d.ts.map +1 -1
- package/dist/esm/util/stubSignTransaction.js +2 -3
- package/dist/esm/util/stubSignTransaction.js.map +1 -1
- package/package.json +8 -7
- package/dist/cjs/util/createAddressManager.d.ts +0 -14
- package/dist/cjs/util/createAddressManager.d.ts.map +0 -1
- package/dist/cjs/util/createAddressManager.js +0 -39
- package/dist/cjs/util/createAddressManager.js.map +0 -1
- package/dist/esm/util/createAddressManager.d.ts +0 -14
- package/dist/esm/util/createAddressManager.d.ts.map +0 -1
- package/dist/esm/util/createAddressManager.js +0 -34
- package/dist/esm/util/createAddressManager.js.map +0 -1
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as Crypto from '@cardano-sdk/crypto';
|
|
2
|
+
import { AccountAddressDerivationPath, AccountKeyDerivationPath, AsyncKeyAgent, GroupedAddress } from './types';
|
|
3
|
+
import { Cardano } from '@cardano-sdk/core';
|
|
4
|
+
declare type Bip32AccountProps = {
|
|
5
|
+
extendedAccountPublicKey: Crypto.Bip32PublicKeyHex;
|
|
6
|
+
accountIndex: number;
|
|
7
|
+
chainId: Cardano.ChainId;
|
|
8
|
+
};
|
|
9
|
+
export declare class Bip32Account {
|
|
10
|
+
readonly extendedAccountPublicKey: Crypto.Bip32PublicKey;
|
|
11
|
+
readonly chainId: Cardano.ChainId;
|
|
12
|
+
readonly accountIndex: number;
|
|
13
|
+
constructor({ extendedAccountPublicKey, chainId, accountIndex }: Bip32AccountProps);
|
|
14
|
+
derivePublicKey(derivationPath: AccountKeyDerivationPath): Promise<Crypto.Ed25519PublicKey>;
|
|
15
|
+
deriveAddress(paymentKeyDerivationPath: AccountAddressDerivationPath, stakeKeyDerivationIndex: number): Promise<GroupedAddress>;
|
|
16
|
+
static fromAsyncKeyAgent(keyAgent: AsyncKeyAgent): Promise<Bip32Account>;
|
|
17
|
+
}
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=Bip32Account.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Bip32Account.d.ts","sourceRoot":"","sources":["../../src/Bip32Account.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EACL,4BAA4B,EAC5B,wBAAwB,EACxB,aAAa,EACb,cAAc,EAEf,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAG5C,aAAK,iBAAiB,GAAG;IACvB,wBAAwB,EAAE,MAAM,CAAC,iBAAiB,CAAC;IACnD,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC;CAC1B,CAAC;AAGF,qBAAa,YAAY;IACvB,QAAQ,CAAC,wBAAwB,EAAE,MAAM,CAAC,cAAc,CAAC;IACzD,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC;IAClC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;gBAGlB,EAAE,wBAAwB,EAAE,OAAO,EAAE,YAAY,EAAE,EAAE,iBAAiB;IAM5E,eAAe,CAAC,cAAc,EAAE,wBAAwB;IAKxD,aAAa,CACjB,wBAAwB,EAAE,4BAA4B,EACtD,uBAAuB,EAAE,MAAM,GAC9B,OAAO,CAAC,cAAc,CAAC;WAyCb,iBAAiB,CAAC,QAAQ,EAAE,aAAa,GAAG,OAAO,CAAC,YAAY,CAAC;CAO/E"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.Bip32Account = void 0;
|
|
27
|
+
const Crypto = __importStar(require("@cardano-sdk/crypto"));
|
|
28
|
+
const types_1 = require("./types");
|
|
29
|
+
const core_1 = require("@cardano-sdk/core");
|
|
30
|
+
const crypto_1 = require("@cardano-sdk/crypto");
|
|
31
|
+
class Bip32Account {
|
|
32
|
+
constructor({ extendedAccountPublicKey, chainId, accountIndex }) {
|
|
33
|
+
this.extendedAccountPublicKey = Crypto.Bip32PublicKey.fromHex(extendedAccountPublicKey);
|
|
34
|
+
this.chainId = chainId;
|
|
35
|
+
this.accountIndex = accountIndex;
|
|
36
|
+
}
|
|
37
|
+
async derivePublicKey(derivationPath) {
|
|
38
|
+
const key = await this.extendedAccountPublicKey.derive([derivationPath.role, derivationPath.index]);
|
|
39
|
+
return key.toRawKey();
|
|
40
|
+
}
|
|
41
|
+
async deriveAddress(paymentKeyDerivationPath, stakeKeyDerivationIndex) {
|
|
42
|
+
const stakeKeyDerivationPath = {
|
|
43
|
+
index: stakeKeyDerivationIndex,
|
|
44
|
+
role: types_1.KeyRole.Stake
|
|
45
|
+
};
|
|
46
|
+
const derivedPublicPaymentKey = await this.derivePublicKey({
|
|
47
|
+
index: paymentKeyDerivationPath.index,
|
|
48
|
+
role: Number(paymentKeyDerivationPath.type)
|
|
49
|
+
});
|
|
50
|
+
const derivedPublicPaymentKeyHash = await derivedPublicPaymentKey.hash();
|
|
51
|
+
const publicStakeKey = await this.derivePublicKey(stakeKeyDerivationPath);
|
|
52
|
+
const publicStakeKeyHash = await publicStakeKey.hash();
|
|
53
|
+
const stakeCredential = { hash: (0, crypto_1.Hash28ByteBase16)(publicStakeKeyHash.hex()), type: core_1.Cardano.CredentialType.KeyHash };
|
|
54
|
+
const address = core_1.Cardano.BaseAddress.fromCredentials(this.chainId.networkId, { hash: (0, crypto_1.Hash28ByteBase16)(derivedPublicPaymentKeyHash.hex()), type: core_1.Cardano.CredentialType.KeyHash }, stakeCredential).toAddress();
|
|
55
|
+
const rewardAccount = core_1.Cardano.RewardAddress.fromCredentials(this.chainId.networkId, stakeCredential).toAddress();
|
|
56
|
+
return {
|
|
57
|
+
accountIndex: this.accountIndex,
|
|
58
|
+
address: core_1.Cardano.PaymentAddress(address.toBech32()),
|
|
59
|
+
networkId: this.chainId.networkId,
|
|
60
|
+
rewardAccount: core_1.Cardano.RewardAccount(rewardAccount.toBech32()),
|
|
61
|
+
stakeKeyDerivationPath,
|
|
62
|
+
...paymentKeyDerivationPath
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
static async fromAsyncKeyAgent(keyAgent) {
|
|
66
|
+
return new Bip32Account({
|
|
67
|
+
accountIndex: await keyAgent.getAccountIndex(),
|
|
68
|
+
chainId: await keyAgent.getChainId(),
|
|
69
|
+
extendedAccountPublicKey: await keyAgent.getExtendedAccountPublicKey()
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
exports.Bip32Account = Bip32Account;
|
|
74
|
+
//# sourceMappingURL=Bip32Account.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Bip32Account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BlobResult, SignTransactionOptions } from './types';
|
|
2
|
+
import { AccountKeyDerivationPath, GetPassphrase, KeyAgent, KeyAgentDependencies, KeyPair, SerializableInMemoryKeyAgentData, SignBlobResult, SignTransactionContext, SignTransactionOptions } from './types';
|
|
3
3
|
import { Cardano } from '@cardano-sdk/core';
|
|
4
4
|
import { HexBlob } from '@cardano-sdk/util';
|
|
5
5
|
import { KeyAgentBase } from './KeyAgentBase';
|
|
@@ -19,7 +19,7 @@ export declare class InMemoryKeyAgent extends KeyAgentBase implements KeyAgent {
|
|
|
19
19
|
signBlob({ index, role: type }: AccountKeyDerivationPath, blob: HexBlob): Promise<SignBlobResult>;
|
|
20
20
|
exportRootPrivateKey(): Promise<Crypto.Bip32PrivateKeyHex>;
|
|
21
21
|
static fromBip39MnemonicWords({ chainId, getPassphrase, mnemonicWords, mnemonic2ndFactorPassphrase, accountIndex }: FromBip39MnemonicWordsProps, dependencies: KeyAgentDependencies): Promise<InMemoryKeyAgent>;
|
|
22
|
-
signTransaction({ body, hash }: Cardano.TxBodyWithHash, { additionalKeyPaths }?: SignTransactionOptions
|
|
22
|
+
signTransaction({ body, hash }: Cardano.TxBodyWithHash, { txInKeyPathMap, knownAddresses }: SignTransactionContext, { additionalKeyPaths }?: SignTransactionOptions): Promise<Cardano.Signatures>;
|
|
23
23
|
exportExtendedKeyPair(derivationPath: number[]): Promise<KeyPair>;
|
|
24
24
|
}
|
|
25
25
|
//# sourceMappingURL=InMemoryKeyAgent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InMemoryKeyAgent.d.ts","sourceRoot":"","sources":["../../src/InMemoryKeyAgent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,qBAAqB,CAAC;AAE9C,OAAO,EACL,wBAAwB,EACxB,aAAa,EACb,QAAQ,EACR,oBAAoB,EAEpB,OAAO,EACP,gCAAgC,EAChC,cAAc,EACd,sBAAsB,EACvB,MAAM,SAAS,CAAC;AACjB,O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C,cAAc,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC;CAwBxE"}
|
|
@@ -98,14 +98,13 @@ class InMemoryKeyAgent extends KeyAgentBase_1.KeyAgentBase {
|
|
|
98
98
|
chainId,
|
|
99
99
|
encryptedRootPrivateKeyBytes: [...encryptedRootPrivateKey],
|
|
100
100
|
extendedAccountPublicKey,
|
|
101
|
-
getPassphrase
|
|
102
|
-
knownAddresses: []
|
|
101
|
+
getPassphrase
|
|
103
102
|
}, dependencies);
|
|
104
103
|
}
|
|
105
|
-
async signTransaction({ body, hash }, { additionalKeyPaths = [] } = {}) {
|
|
104
|
+
async signTransaction({ body, hash }, { txInKeyPathMap, knownAddresses }, { additionalKeyPaths = [] } = {}) {
|
|
106
105
|
const blob = (0, util_2.HexBlob)(hash);
|
|
107
106
|
const dRepKeyHash = (await Crypto.Ed25519PublicKey.fromHex(await this.derivePublicKey(util_1.DREP_KEY_DERIVATION_PATH)).hash()).hex();
|
|
108
|
-
const derivationPaths =
|
|
107
|
+
const derivationPaths = (0, util_1.ownSignatureKeyPaths)(body, knownAddresses, txInKeyPathMap, dRepKeyHash);
|
|
109
108
|
const keyPaths = (0, uniqBy_1.default)([...derivationPaths, ...additionalKeyPaths], ({ role, index }) => `${role}.${index}`);
|
|
110
109
|
return new Map(await Promise.all(keyPaths.map(async ({ role, index }) => {
|
|
111
110
|
const { publicKey, signature } = await this.signBlob({ index, role }, blob);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InMemoryKeyAgent.js","sourceRoot":"","sources":["../../src/InMemoryKeyAgent.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4DAA8C;AAC9C,iDAAmC;AACnC,
|
|
1
|
+
{"version":3,"file":"InMemoryKeyAgent.js","sourceRoot":"","sources":["../../src/InMemoryKeyAgent.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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IACJ,CAAC;IAGD,KAAK,CAAC,qBAAqB,CAAC,cAAwB;QAClD,MAAM,cAAc,GAAG,MAAM,IAAI,CAAC,oBAAoB,EAAE,CAAC;QACzD,MAAM,eAAe,GAAG,cAAc,CAAC,GAAG,CAAC,CAAC,KAAa,EAAE,EAAE,CAAC,IAAA,aAAM,EAAC,KAAK,CAAC,CAAC,CAAC;QAC7E,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,gBAAgB,CAAC,cAAc,EAAE,eAAe,CAAC,CAAC;QAE3F,OAAO;YACL,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,MAAM,IAAI,CAAC,YAAY,CAAC,iBAAiB,CAAC,QAAQ,CAAC;SAC1D,CAAC;IACJ,CAAC;CAeF;AA5HD,4CA4HC;wIAbC,KAAK,kDAAwB,OAAc;IACzC,MAAM,UAAU,GAAG,MAAM,8BAA8B,CAAC,GAAG,EAAE,CAAC,uBAAA,IAAI,uCAAe,MAAnB,IAAI,EAAgB,OAAO,CAAC,CAAC,CAAC;IAC5F,IAAI,qBAAiC,CAAC;IACtC,IAAI;QACF,qBAAqB,GAAG,MAAM,IAAA,oBAAY,EACxC,IAAI,UAAU,CAAE,IAAI,CAAC,gBAAqD,CAAC,4BAA4B,CAAC,EACxG,UAAU,CACX,CAAC;KACH;IAAC,OAAO,KAAK,EAAE;QACd,MAAM,IAAI,MAAM,CAAC,mBAAmB,CAAC,oCAAoC,EAAE,KAAK,CAAC,CAAC;KACnF;IACD,OAAO,MAAM,CAAC,kBAAkB,CAAC,MAAM,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;AACvF,CAAC"}
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import * as Crypto from '@cardano-sdk/crypto';
|
|
2
|
-
import { AccountAddressDerivationPath, AccountKeyDerivationPath, GroupedAddress, KeyAgent, KeyAgentDependencies, SerializableKeyAgentData, SignBlobResult, SignTransactionOptions } from './types';
|
|
2
|
+
import { AccountAddressDerivationPath, AccountKeyDerivationPath, GroupedAddress, KeyAgent, KeyAgentDependencies, SerializableKeyAgentData, SignBlobResult, SignTransactionContext, SignTransactionOptions } from './types';
|
|
3
3
|
import { Cardano } from '@cardano-sdk/core';
|
|
4
4
|
import { HexBlob } from '@cardano-sdk/util';
|
|
5
5
|
export declare abstract class KeyAgentBase implements KeyAgent {
|
|
6
6
|
#private;
|
|
7
|
-
protected readonly inputResolver: Cardano.InputResolver;
|
|
8
|
-
get knownAddresses(): GroupedAddress[];
|
|
9
|
-
set knownAddresses(addresses: GroupedAddress[]);
|
|
10
7
|
get serializableData(): SerializableKeyAgentData;
|
|
11
8
|
get extendedAccountPublicKey(): Crypto.Bip32PublicKeyHex;
|
|
12
9
|
get chainId(): Cardano.ChainId;
|
|
@@ -14,9 +11,9 @@ export declare abstract class KeyAgentBase implements KeyAgent {
|
|
|
14
11
|
get bip32Ed25519(): Crypto.Bip32Ed25519;
|
|
15
12
|
abstract signBlob(derivationPath: AccountKeyDerivationPath, blob: HexBlob): Promise<SignBlobResult>;
|
|
16
13
|
abstract exportRootPrivateKey(): Promise<Crypto.Bip32PrivateKeyHex>;
|
|
17
|
-
abstract signTransaction(txInternals: Cardano.TxBodyWithHash, signTransactionOptions?: SignTransactionOptions): Promise<Cardano.Signatures>;
|
|
18
|
-
constructor(serializableData: SerializableKeyAgentData, {
|
|
19
|
-
deriveAddress(
|
|
14
|
+
abstract signTransaction(txInternals: Cardano.TxBodyWithHash, context: SignTransactionContext, signTransactionOptions?: SignTransactionOptions): Promise<Cardano.Signatures>;
|
|
15
|
+
constructor(serializableData: SerializableKeyAgentData, { bip32Ed25519 }: KeyAgentDependencies);
|
|
16
|
+
deriveAddress(paymentKeyDerivationPath: AccountAddressDerivationPath, stakeKeyDerivationIndex: number): Promise<GroupedAddress>;
|
|
20
17
|
derivePublicKey(derivationPath: AccountKeyDerivationPath): Promise<Crypto.Ed25519PublicKeyHex>;
|
|
21
18
|
}
|
|
22
19
|
//# sourceMappingURL=KeyAgentBase.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KeyAgentBase.d.ts","sourceRoot":"","sources":["../../src/KeyAgentBase.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EACL,4BAA4B,EAC5B,wBAAwB,EACxB,cAAc,EACd,QAAQ,EACR,oBAAoB,
|
|
1
|
+
{"version":3,"file":"KeyAgentBase.d.ts","sourceRoot":"","sources":["../../src/KeyAgentBase.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EACL,4BAA4B,EAC5B,wBAAwB,EACxB,cAAc,EACd,QAAQ,EACR,oBAAoB,EACpB,wBAAwB,EACxB,cAAc,EACd,sBAAsB,EACtB,sBAAsB,EACvB,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C,8BAAsB,YAAa,YAAW,QAAQ;;IAKpD,IAAI,gBAAgB,IAAI,wBAAwB,CAE/C;IACD,IAAI,wBAAwB,IAAI,MAAM,CAAC,iBAAiB,CAEvD;IACD,IAAI,OAAO,IAAI,OAAO,CAAC,OAAO,CAE7B;IACD,IAAI,YAAY,IAAI,MAAM,CAEzB;IACD,IAAI,YAAY,IAAI,MAAM,CAAC,YAAY,CAEtC;IAED,QAAQ,CAAC,QAAQ,CAAC,cAAc,EAAE,wBAAwB,EAAE,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC,cAAc,CAAC;IACnG,QAAQ,CAAC,oBAAoB,IAAI,OAAO,CAAC,MAAM,CAAC,kBAAkB,CAAC;IACnE,QAAQ,CAAC,eAAe,CACtB,WAAW,EAAE,OAAO,CAAC,cAAc,EACnC,OAAO,EAAE,sBAAsB,EAC/B,sBAAsB,CAAC,EAAE,sBAAsB,GAC9C,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC;gBAElB,gBAAgB,EAAE,wBAAwB,EAAE,EAAE,YAAY,EAAE,EAAE,oBAAoB;IAOxF,aAAa,CACjB,wBAAwB,EAAE,4BAA4B,EACtD,uBAAuB,EAAE,MAAM,GAC9B,OAAO,CAAC,cAAc,CAAC;IAIpB,eAAe,CAAC,cAAc,EAAE,wBAAwB,GAAG,OAAO,CAAC,MAAM,CAAC,mBAAmB,CAAC;CAGrG"}
|
package/dist/cjs/KeyAgentBase.js
CHANGED
|
@@ -10,25 +10,18 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
10
10
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
11
11
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
12
12
|
};
|
|
13
|
-
var _KeyAgentBase_serializableData, _KeyAgentBase_bip32Ed25519;
|
|
13
|
+
var _KeyAgentBase_serializableData, _KeyAgentBase_bip32Ed25519, _KeyAgentBase_account;
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.KeyAgentBase = void 0;
|
|
16
|
-
const
|
|
17
|
-
const core_1 = require("@cardano-sdk/core");
|
|
18
|
-
const crypto_1 = require("@cardano-sdk/crypto");
|
|
16
|
+
const Bip32Account_1 = require("./Bip32Account");
|
|
19
17
|
class KeyAgentBase {
|
|
20
|
-
constructor(serializableData, {
|
|
18
|
+
constructor(serializableData, { bip32Ed25519 }) {
|
|
21
19
|
_KeyAgentBase_serializableData.set(this, void 0);
|
|
22
20
|
_KeyAgentBase_bip32Ed25519.set(this, void 0);
|
|
21
|
+
_KeyAgentBase_account.set(this, void 0);
|
|
23
22
|
__classPrivateFieldSet(this, _KeyAgentBase_serializableData, serializableData, "f");
|
|
24
|
-
this.inputResolver = inputResolver;
|
|
25
23
|
__classPrivateFieldSet(this, _KeyAgentBase_bip32Ed25519, bip32Ed25519, "f");
|
|
26
|
-
|
|
27
|
-
get knownAddresses() {
|
|
28
|
-
return __classPrivateFieldGet(this, _KeyAgentBase_serializableData, "f").knownAddresses;
|
|
29
|
-
}
|
|
30
|
-
set knownAddresses(addresses) {
|
|
31
|
-
__classPrivateFieldGet(this, _KeyAgentBase_serializableData, "f").knownAddresses = addresses;
|
|
24
|
+
__classPrivateFieldSet(this, _KeyAgentBase_account, new Bip32Account_1.Bip32Account(serializableData), "f");
|
|
32
25
|
}
|
|
33
26
|
get serializableData() {
|
|
34
27
|
return __classPrivateFieldGet(this, _KeyAgentBase_serializableData, "f");
|
|
@@ -45,47 +38,13 @@ class KeyAgentBase {
|
|
|
45
38
|
get bip32Ed25519() {
|
|
46
39
|
return __classPrivateFieldGet(this, _KeyAgentBase_bip32Ed25519, "f");
|
|
47
40
|
}
|
|
48
|
-
async deriveAddress(
|
|
49
|
-
|
|
50
|
-
index: stakeKeyDerivationIndex,
|
|
51
|
-
role: types_1.KeyRole.Stake
|
|
52
|
-
};
|
|
53
|
-
const knownAddress = this.knownAddresses.find((addr) => addr.type === type &&
|
|
54
|
-
addr.index === index &&
|
|
55
|
-
addr.stakeKeyDerivationPath?.index === stakeKeyDerivationPath.index);
|
|
56
|
-
if (knownAddress)
|
|
57
|
-
return knownAddress;
|
|
58
|
-
const derivedPublicPaymentKey = await this.derivePublicKey({
|
|
59
|
-
index,
|
|
60
|
-
role: type
|
|
61
|
-
});
|
|
62
|
-
const derivedPublicPaymentKeyHash = await __classPrivateFieldGet(this, _KeyAgentBase_bip32Ed25519, "f").getPubKeyHash(derivedPublicPaymentKey);
|
|
63
|
-
const publicStakeKey = await this.derivePublicKey(stakeKeyDerivationPath);
|
|
64
|
-
const publicStakeKeyHash = await __classPrivateFieldGet(this, _KeyAgentBase_bip32Ed25519, "f").getPubKeyHash(publicStakeKey);
|
|
65
|
-
const stakeCredential = { hash: (0, crypto_1.Hash28ByteBase16)(publicStakeKeyHash), type: core_1.Cardano.CredentialType.KeyHash };
|
|
66
|
-
const address = core_1.Cardano.BaseAddress.fromCredentials(this.chainId.networkId, { hash: (0, crypto_1.Hash28ByteBase16)(derivedPublicPaymentKeyHash), type: core_1.Cardano.CredentialType.KeyHash }, stakeCredential).toAddress();
|
|
67
|
-
const rewardAccount = core_1.Cardano.RewardAddress.fromCredentials(this.chainId.networkId, stakeCredential).toAddress();
|
|
68
|
-
const groupedAddress = {
|
|
69
|
-
accountIndex: this.accountIndex,
|
|
70
|
-
address: core_1.Cardano.PaymentAddress(address.toBech32()),
|
|
71
|
-
index,
|
|
72
|
-
networkId: this.chainId.networkId,
|
|
73
|
-
rewardAccount: core_1.Cardano.RewardAccount(rewardAccount.toBech32()),
|
|
74
|
-
stakeKeyDerivationPath,
|
|
75
|
-
type
|
|
76
|
-
};
|
|
77
|
-
if (!pure)
|
|
78
|
-
this.knownAddresses = [...this.knownAddresses, groupedAddress];
|
|
79
|
-
return groupedAddress;
|
|
41
|
+
async deriveAddress(paymentKeyDerivationPath, stakeKeyDerivationIndex) {
|
|
42
|
+
return __classPrivateFieldGet(this, _KeyAgentBase_account, "f").deriveAddress(paymentKeyDerivationPath, stakeKeyDerivationIndex);
|
|
80
43
|
}
|
|
81
44
|
async derivePublicKey(derivationPath) {
|
|
82
|
-
|
|
83
|
-
derivationPath.role,
|
|
84
|
-
derivationPath.index
|
|
85
|
-
]);
|
|
86
|
-
return await __classPrivateFieldGet(this, _KeyAgentBase_bip32Ed25519, "f").getRawPublicKey(childKey);
|
|
45
|
+
return (await __classPrivateFieldGet(this, _KeyAgentBase_account, "f").derivePublicKey(derivationPath)).hex();
|
|
87
46
|
}
|
|
88
47
|
}
|
|
89
48
|
exports.KeyAgentBase = KeyAgentBase;
|
|
90
|
-
_KeyAgentBase_serializableData = new WeakMap(), _KeyAgentBase_bip32Ed25519 = new WeakMap();
|
|
49
|
+
_KeyAgentBase_serializableData = new WeakMap(), _KeyAgentBase_bip32Ed25519 = new WeakMap(), _KeyAgentBase_account = new WeakMap();
|
|
91
50
|
//# sourceMappingURL=KeyAgentBase.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KeyAgentBase.js","sourceRoot":"","sources":["../../src/KeyAgentBase.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"KeyAgentBase.js","sourceRoot":"","sources":["../../src/KeyAgentBase.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAYA,iDAA8C;AAI9C,MAAsB,YAAY;IA6BhC,YAAY,gBAA0C,EAAE,EAAE,YAAY,EAAwB;QA5B9F,iDAAqD;QACrD,6CAA4C;QAC5C,wCAAgC;QA2B9B,uBAAA,IAAI,kCAAqB,gBAAgB,MAAA,CAAC;QAC1C,uBAAA,IAAI,8BAAiB,YAAY,MAAA,CAAC;QAClC,uBAAA,IAAI,yBAAY,IAAI,2BAAY,CAAC,gBAAgB,CAAC,MAAA,CAAC;IACrD,CAAC;IA5BD,IAAI,gBAAgB;QAClB,OAAO,uBAAA,IAAI,sCAAkB,CAAC;IAChC,CAAC;IACD,IAAI,wBAAwB;QAC1B,OAAO,IAAI,CAAC,gBAAgB,CAAC,wBAAwB,CAAC;IACxD,CAAC;IACD,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC;IACvC,CAAC;IACD,IAAI,YAAY;QACd,OAAO,IAAI,CAAC,gBAAgB,CAAC,YAAY,CAAC;IAC5C,CAAC;IACD,IAAI,YAAY;QACd,OAAO,uBAAA,IAAI,kCAAc,CAAC;IAC5B,CAAC;IAiBD,KAAK,CAAC,aAAa,CACjB,wBAAsD,EACtD,uBAA+B;QAE/B,OAAO,uBAAA,IAAI,6BAAS,CAAC,aAAa,CAAC,wBAAwB,EAAE,uBAAuB,CAAC,CAAC;IACxF,CAAC;IAED,KAAK,CAAC,eAAe,CAAC,cAAwC;QAC5D,OAAO,CAAC,MAAM,uBAAA,IAAI,6BAAS,CAAC,eAAe,CAAC,cAAc,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;IACrE,CAAC;CACF;AA9CD,oCA8CC"}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { GroupedAddress, MessageSender } from '../types';
|
|
2
|
+
import { Bip32Ed25519Witnesser } from '../util';
|
|
2
3
|
import { Cardano } from '@cardano-sdk/core';
|
|
3
4
|
import { Cip30DataSignature } from '@cardano-sdk/dapp-connector';
|
|
4
5
|
import { ComposableError, HexBlob } from '@cardano-sdk/util';
|
|
5
6
|
export interface Cip30SignDataRequest {
|
|
6
|
-
|
|
7
|
+
knownAddresses: GroupedAddress[];
|
|
7
8
|
witnesser: Bip32Ed25519Witnesser;
|
|
8
9
|
signWith: Cardano.PaymentAddress | Cardano.RewardAccount | Cardano.DRepID;
|
|
9
10
|
payload: HexBlob;
|
|
11
|
+
sender?: MessageSender;
|
|
10
12
|
}
|
|
11
13
|
export declare enum Cip30DataSignErrorCode {
|
|
12
14
|
ProofGeneration = 1,
|
|
@@ -18,5 +20,5 @@ export declare class Cip30DataSignError<InnerError = unknown> extends Composable
|
|
|
18
20
|
readonly info: string;
|
|
19
21
|
constructor(code: Cip30DataSignErrorCode, info: string, innerError?: InnerError);
|
|
20
22
|
}
|
|
21
|
-
export declare const cip30signData: ({
|
|
23
|
+
export declare const cip30signData: ({ knownAddresses, witnesser, signWith, payload, sender }: Cip30SignDataRequest) => Promise<Cip30DataSignature>;
|
|
22
24
|
//# sourceMappingURL=cip30signData.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cip30signData.d.ts","sourceRoot":"","sources":["../../../src/cip8/cip30signData.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cip30signData.d.ts","sourceRoot":"","sources":["../../../src/cip8/cip30signData.ts"],"names":[],"mappings":"AACA,OAAO,EAA4B,cAAc,EAAW,aAAa,EAAE,MAAM,UAAU,CAAC;AAc5F,OAAO,EAAE,qBAAqB,EAAuD,MAAM,SAAS,CAAC;AACrG,OAAO,EAAE,OAAO,EAAQ,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAG7D,MAAM,WAAW,oBAAoB;IACnC,cAAc,EAAE,cAAc,EAAE,CAAC;IACjC,SAAS,EAAE,qBAAqB,CAAC;IACjC,QAAQ,EAAE,OAAO,CAAC,cAAc,GAAG,OAAO,CAAC,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC;IAC1E,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,aAAa,CAAC;CACxB;AAED,oBAAY,sBAAsB;IAChC,eAAe,IAAI;IACnB,YAAY,IAAI;IAChB,YAAY,IAAI;CACjB;AAED,qBAAa,kBAAkB,CAAC,UAAU,GAAG,OAAO,CAAE,SAAQ,eAAe,CAAC,UAAU,CAAC;aAC3D,IAAI,EAAE,sBAAsB;aAAkB,IAAI,EAAE,MAAM;gBAA1D,IAAI,EAAE,sBAAsB,EAAkB,IAAI,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,UAAU;CAGhH;AA4ED,eAAO,MAAM,aAAa,6DAMvB,oBAAoB,KAAG,QAAQ,kBAAkB,CAsBnD,CAAC"}
|
|
@@ -6,7 +6,6 @@ const util_1 = require("../util");
|
|
|
6
6
|
const core_1 = require("@cardano-sdk/core");
|
|
7
7
|
const util_2 = require("@cardano-sdk/util");
|
|
8
8
|
const util_3 = require("./util");
|
|
9
|
-
const rxjs_1 = require("rxjs");
|
|
10
9
|
var Cip30DataSignErrorCode;
|
|
11
10
|
(function (Cip30DataSignErrorCode) {
|
|
12
11
|
Cip30DataSignErrorCode[Cip30DataSignErrorCode["ProofGeneration"] = 1] = "ProofGeneration";
|
|
@@ -28,12 +27,11 @@ const getAddressBytes = (signWith) => {
|
|
|
28
27
|
}
|
|
29
28
|
return Buffer.from(address.toBytes(), 'hex');
|
|
30
29
|
};
|
|
31
|
-
const getDerivationPath = async (signWith,
|
|
30
|
+
const getDerivationPath = async (signWith, knownAddresses) => {
|
|
32
31
|
if (core_1.Cardano.DRepID.isValid(signWith)) {
|
|
33
32
|
return util_1.DREP_KEY_DERIVATION_PATH;
|
|
34
33
|
}
|
|
35
34
|
const isRewardAccount = signWith.startsWith('stake');
|
|
36
|
-
const knownAddresses = await (0, rxjs_1.firstValueFrom)(addressManager.knownAddresses$.pipe((0, rxjs_1.filter)((addresses) => addresses.length > 0)));
|
|
37
35
|
if (isRewardAccount) {
|
|
38
36
|
const knownRewardAddress = knownAddresses.find(({ rewardAccount }) => rewardAccount === signWith);
|
|
39
37
|
if (!knownRewardAddress)
|
|
@@ -53,9 +51,9 @@ const createSigStructureHeaders = (addressBytes) => {
|
|
|
53
51
|
protectedHeaders.set_algorithm_id(cardano_message_signing_nodejs_1.Label.from_algorithm_id(cardano_message_signing_nodejs_1.AlgorithmId.EdDSA));
|
|
54
52
|
return protectedHeaders;
|
|
55
53
|
};
|
|
56
|
-
const signSigStructure = (witnesser, derivationPath, sigStructure) => {
|
|
54
|
+
const signSigStructure = (witnesser, derivationPath, sigStructure, sender) => {
|
|
57
55
|
try {
|
|
58
|
-
return witnesser.signBlob(derivationPath, core_1.util.bytesToHex(sigStructure.to_bytes()));
|
|
56
|
+
return witnesser.signBlob(derivationPath, core_1.util.bytesToHex(sigStructure.to_bytes()), sender);
|
|
59
57
|
}
|
|
60
58
|
catch (error) {
|
|
61
59
|
throw new Cip30DataSignError(Cip30DataSignErrorCode.UserDeclined, 'Failed to sign', error);
|
|
@@ -69,15 +67,15 @@ const createCoseKey = (addressBytes, publicKey) => {
|
|
|
69
67
|
coseKey.set_header(util_3.CoseLabel.x, cardano_message_signing_nodejs_1.CBORValue.new_bytes(Buffer.from(publicKey, 'hex')));
|
|
70
68
|
return coseKey;
|
|
71
69
|
};
|
|
72
|
-
const cip30signData = async ({
|
|
70
|
+
const cip30signData = async ({ knownAddresses, witnesser, signWith, payload, sender }) => {
|
|
73
71
|
if (core_1.Cardano.DRepID.isValid(signWith) && !core_1.Cardano.DRepID.canSign(signWith)) {
|
|
74
72
|
throw new Cip30DataSignError(Cip30DataSignErrorCode.AddressNotPK, 'Invalid address');
|
|
75
73
|
}
|
|
76
74
|
const addressBytes = getAddressBytes(signWith);
|
|
77
|
-
const derivationPath = await getDerivationPath(signWith,
|
|
75
|
+
const derivationPath = await getDerivationPath(signWith, knownAddresses);
|
|
78
76
|
const builder = cardano_message_signing_nodejs_1.COSESign1Builder.new(cardano_message_signing_nodejs_1.Headers.new(cardano_message_signing_nodejs_1.ProtectedHeaderMap.new(createSigStructureHeaders(addressBytes)), cardano_message_signing_nodejs_1.HeaderMap.new()), Buffer.from(payload, 'hex'), false);
|
|
79
77
|
const sigStructure = builder.make_data_to_sign();
|
|
80
|
-
const { signature, publicKey } = await signSigStructure(witnesser, derivationPath, sigStructure);
|
|
78
|
+
const { signature, publicKey } = await signSigStructure(witnesser, derivationPath, sigStructure, sender);
|
|
81
79
|
const coseSign1 = builder.build(Buffer.from(signature, 'hex'));
|
|
82
80
|
const coseKey = createCoseKey(addressBytes, publicKey);
|
|
83
81
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cip30signData.js","sourceRoot":"","sources":["../../../src/cip8/cip30signData.ts"],"names":[],"mappings":";;;AAEA,2FAYgD;AAChD,
|
|
1
|
+
{"version":3,"file":"cip30signData.js","sourceRoot":"","sources":["../../../src/cip8/cip30signData.ts"],"names":[],"mappings":";;;AAEA,2FAYgD;AAChD,kCAAqG;AACrG,4CAAkD;AAElD,4CAA6D;AAC7D,iCAAmC;AAUnC,IAAY,sBAIX;AAJD,WAAY,sBAAsB;IAChC,yFAAmB,CAAA;IACnB,mFAAgB,CAAA;IAChB,mFAAgB,CAAA;AAClB,CAAC,EAJW,sBAAsB,GAAtB,8BAAsB,KA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,OAAO,CAAC,iBAAiB,EAAE,CAAC;IACjD,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,GAAG,MAAM,gBAAgB,CAAC,SAAS,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,CAAC,CAAC;IACzG,MAAM,SAAS,GAAG,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC;IAE/D,MAAM,OAAO,GAAG,aAAa,CAAC,YAAY,EAAE,SAAS,CAAC,CAAC;IAEvD,OAAO;QACL,GAAG,EAAE,WAAI,CAAC,UAAU,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;QACxC,SAAS,EAAE,WAAI,CAAC,UAAU,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC;KACjD,CAAC;AACJ,CAAC,CAAC;AA5BW,QAAA,aAAa,iBA4BxB"}
|
package/dist/cjs/index.d.ts
CHANGED
package/dist/cjs/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,cAAc,gBAAgB,CAAC"}
|
package/dist/cjs/index.js
CHANGED
|
@@ -34,4 +34,5 @@ exports.util = __importStar(require("./util"));
|
|
|
34
34
|
__exportStar(require("./emip3"), exports);
|
|
35
35
|
__exportStar(require("./types"), exports);
|
|
36
36
|
exports.cip8 = __importStar(require("./cip8"));
|
|
37
|
+
__exportStar(require("./Bip32Account"), exports);
|
|
37
38
|
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mDAAmC;AACnC,iDAA+B;AAC/B,qDAAmC;AACnC,+CAA+B;AAC/B,0CAAwB;AACxB,0CAAwB;AACxB,+CAA+B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mDAAmC;AACnC,iDAA+B;AAC/B,qDAAmC;AACnC,+CAA+B;AAC/B,0CAAwB;AACxB,0CAAwB;AACxB,+CAA+B;AAC/B,iDAA+B"}
|