@meshsdk/core 1.6.0-alpha.9 → 1.6.2

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.
Files changed (97) hide show
  1. package/README.md +54 -26
  2. package/dist/index.cjs +1 -0
  3. package/dist/index.d.cts +141 -0
  4. package/dist/index.d.ts +141 -14
  5. package/dist/index.js +1 -0
  6. package/package.json +42 -68
  7. package/dist/common/constants.d.ts +0 -58
  8. package/dist/common/contracts/evaluator.d.ts +0 -4
  9. package/dist/common/contracts/fetcher.d.ts +0 -22
  10. package/dist/common/contracts/index.d.ts +0 -7
  11. package/dist/common/contracts/initiator.d.ts +0 -8
  12. package/dist/common/contracts/listener.d.ts +0 -3
  13. package/dist/common/contracts/signer.d.ts +0 -8
  14. package/dist/common/contracts/submitter.d.ts +0 -3
  15. package/dist/common/contracts/uploader.d.ts +0 -3
  16. package/dist/common/data/index.d.ts +0 -2
  17. package/dist/common/data/mesh.d.ts +0 -8
  18. package/dist/common/data/plutus.d.ts +0 -72
  19. package/dist/common/data/plutus.spec.d.ts +0 -1
  20. package/dist/common/decorators.d.ts +0 -19
  21. package/dist/common/helpers/generateNonce.d.ts +0 -1
  22. package/dist/common/helpers/index.d.ts +0 -2
  23. package/dist/common/helpers/readPlutusData.d.ts +0 -2
  24. package/dist/common/index.d.ts +0 -2
  25. package/dist/common/utils/builder.d.ts +0 -18
  26. package/dist/common/utils/converter.d.ts +0 -27
  27. package/dist/common/utils/deserializer.d.ts +0 -19
  28. package/dist/common/utils/index.d.ts +0 -5
  29. package/dist/common/utils/parser.d.ts +0 -5
  30. package/dist/common/utils/resolver.d.ts +0 -17
  31. package/dist/core/CIP14.d.ts +0 -2
  32. package/dist/core/CIP1852.d.ts +0 -4
  33. package/dist/core/CIP1853.d.ts +0 -1
  34. package/dist/core/CIP1855.d.ts +0 -1
  35. package/dist/core/CIP2.d.ts +0 -4
  36. package/dist/core/CIP25.d.ts +0 -19
  37. package/dist/core/CIP27.d.ts +0 -4
  38. package/dist/core/CIP8.d.ts +0 -15
  39. package/dist/core/CPS0009.d.ts +0 -2
  40. package/dist/core/CSL.d.ts +0 -147
  41. package/dist/core/index.d.ts +0 -10
  42. package/dist/core.cjs +0 -18
  43. package/dist/core.js +0 -22016
  44. package/dist/providers/blockfrost.provider.d.ts +0 -46
  45. package/dist/providers/index.d.ts +0 -6
  46. package/dist/providers/infura.provider.d.ts +0 -12
  47. package/dist/providers/koios.provider.d.ts +0 -27
  48. package/dist/providers/maestro.provider.d.ts +0 -35
  49. package/dist/providers/ogmios.provider.d.ts +0 -12
  50. package/dist/providers/tango.provider.d.ts +0 -25
  51. package/dist/providers/yaci.provider.d.ts +0 -32
  52. package/dist/scripts/forge.script.d.ts +0 -8
  53. package/dist/scripts/index.d.ts +0 -1
  54. package/dist/serializer/index.d.ts +0 -1
  55. package/dist/serializer/serializer.d.ts +0 -42
  56. package/dist/serializer/signatures.d.ts +0 -3
  57. package/dist/transaction/index.d.ts +0 -2
  58. package/dist/transaction/meshTxBuilder/index.d.ts +0 -2
  59. package/dist/transaction/meshTxBuilder/meshTxBuilder.service.d.ts +0 -47
  60. package/dist/transaction/meshTxBuilder/meshTxBuilder.spec.d.ts +0 -1
  61. package/dist/transaction/meshTxBuilder/meshTxBuilderCore.d.ts +0 -292
  62. package/dist/transaction/meshTxBuilder/type.d.ts +0 -128
  63. package/dist/transaction/transaction.service.d.ts +0 -150
  64. package/dist/transaction/transaction.service.spec.d.ts +0 -1
  65. package/dist/types/Account.d.ts +0 -5
  66. package/dist/types/AccountInfo.d.ts +0 -7
  67. package/dist/types/Action.d.ts +0 -12
  68. package/dist/types/Asset.d.ts +0 -7
  69. package/dist/types/AssetExtended.d.ts +0 -8
  70. package/dist/types/AssetMetadata.d.ts +0 -24
  71. package/dist/types/BlockInfo.d.ts +0 -17
  72. package/dist/types/Data.d.ts +0 -4
  73. package/dist/types/DataSignature.d.ts +0 -4
  74. package/dist/types/Era.d.ts +0 -1
  75. package/dist/types/Mint.d.ts +0 -10
  76. package/dist/types/NativeScript.d.ts +0 -14
  77. package/dist/types/Network.d.ts +0 -4
  78. package/dist/types/PlutusScript.d.ts +0 -5
  79. package/dist/types/PoolParams.d.ts +0 -16
  80. package/dist/types/Protocol.d.ts +0 -22
  81. package/dist/types/Recipient.d.ts +0 -11
  82. package/dist/types/Relay.d.ts +0 -13
  83. package/dist/types/Token.d.ts +0 -2
  84. package/dist/types/TransactionInfo.d.ts +0 -11
  85. package/dist/types/UTxO.d.ts +0 -15
  86. package/dist/types/Wallet.d.ts +0 -5
  87. package/dist/types/index.d.ts +0 -22
  88. package/dist/wallet/app.service.d.ts +0 -43
  89. package/dist/wallet/app.service.spec.d.ts +0 -1
  90. package/dist/wallet/browser.service.d.ts +0 -205
  91. package/dist/wallet/browser.service.spec.d.ts +0 -1
  92. package/dist/wallet/embedded.service.d.ts +0 -20
  93. package/dist/wallet/embedded.service.spec.d.ts +0 -1
  94. package/dist/wallet/index.d.ts +0 -4
  95. package/dist/wallet/mesh.service.d.ts +0 -188
  96. package/dist/wallet/mina.service.d.ts +0 -11
  97. package/dist/wallet/mina.service.spec.d.ts +0 -1
@@ -1,128 +0,0 @@
1
- import { Asset, Budget, Data, LanguageVersion, PlutusScript, UTxO, PoolParams } from '@mesh/types';
2
- export declare type MeshTxBuilderBody = {
3
- inputs: TxIn[];
4
- outputs: Output[];
5
- extraInputs: UTxO[];
6
- selectionThreshold: number;
7
- collaterals: PubKeyTxIn[];
8
- requiredSignatures: string[];
9
- referenceInputs: RefTxIn[];
10
- mints: MintItem[];
11
- changeAddress: string;
12
- metadata: Metadata[];
13
- validityRange: ValidityRange;
14
- certificates: Certificate[];
15
- signingKey: string[];
16
- };
17
- export declare type TxIn = PubKeyTxIn | ScriptTxIn;
18
- export declare type PubKeyTxIn = {
19
- type: 'PubKey';
20
- txIn: TxInParameter;
21
- };
22
- export declare type TxInParameter = {
23
- txHash: string;
24
- txIndex: number;
25
- amount?: Asset[];
26
- address?: string;
27
- };
28
- export declare type ScriptTxIn = {
29
- type: 'Script';
30
- txIn: TxInParameter;
31
- scriptTxIn: ScriptTxInParameter;
32
- };
33
- export declare type ScriptTxInParameter = {
34
- scriptSource?: {
35
- type: 'Provided';
36
- script: PlutusScript;
37
- } | {
38
- type: 'Inline';
39
- txInInfo: ScriptSourceInfo;
40
- };
41
- datumSource?: {
42
- type: 'Provided';
43
- data: BuilderData;
44
- } | {
45
- type: 'Inline';
46
- txHash: string;
47
- txIndex: number;
48
- };
49
- redeemer?: Redeemer;
50
- };
51
- export declare type ScriptSourceInfo = {
52
- txHash: string;
53
- txIndex: number;
54
- spendingScriptHash?: string;
55
- version: LanguageVersion;
56
- };
57
- export declare type RefTxIn = {
58
- txHash: string;
59
- txIndex: number;
60
- };
61
- export declare type Output = {
62
- address: string;
63
- amount: Asset[];
64
- datum?: {
65
- type: 'Hash' | 'Inline';
66
- data: BuilderData;
67
- };
68
- referenceScript?: PlutusScript;
69
- };
70
- export declare type MintItem = {
71
- type: 'Plutus' | 'Native';
72
- policyId: string;
73
- assetName: string;
74
- amount: string;
75
- redeemer?: Redeemer;
76
- scriptSource?: {
77
- type: 'Provided';
78
- script: PlutusScript;
79
- } | {
80
- type: 'Reference Script';
81
- txHash: string;
82
- txIndex: number;
83
- version: LanguageVersion;
84
- };
85
- };
86
- export declare type ValidityRange = {
87
- invalidBefore?: number;
88
- invalidHereafter?: number;
89
- };
90
- export declare type BuilderData = {
91
- type: 'Mesh';
92
- content: Data;
93
- } | {
94
- type: 'JSON';
95
- content: string;
96
- } | {
97
- type: 'CBOR';
98
- content: string;
99
- };
100
- export declare type Redeemer = {
101
- data: BuilderData;
102
- exUnits: Budget;
103
- };
104
- export declare type Metadata = {
105
- tag: string;
106
- metadata: object;
107
- };
108
- export declare type Certificate = {
109
- type: 'RegisterPool';
110
- poolParams: PoolParams;
111
- } | {
112
- type: 'RegisterStake';
113
- stakeKeyHash: string;
114
- } | {
115
- type: 'DelegateStake';
116
- stakeKeyHash: string;
117
- poolId: string;
118
- } | {
119
- type: 'DeregisterStake';
120
- stakeKeyHash: string;
121
- } | {
122
- type: 'RetirePool';
123
- poolId: string;
124
- epoch: number;
125
- };
126
- export declare type RequiredWith<T, K extends keyof T> = Required<T> & {
127
- [P in K]: Required<T[P]>;
128
- };
@@ -1,150 +0,0 @@
1
- import { IInitiator } from '@mesh/common/contracts';
2
- import type { Action, Asset, Data, Era, Mint, Protocol, PlutusScript, PoolParams, Recipient, Token, UTxO } from '@mesh/types';
3
- export declare class Transaction {
4
- private _changeAddress?;
5
- private _txOutputs;
6
- private _recipients;
7
- private _totalBurns;
8
- private _totalMints;
9
- private readonly _era?;
10
- private readonly _initiator?;
11
- private readonly _mintBuilder;
12
- private readonly _protocolParameters;
13
- private readonly _txBuilder;
14
- private readonly _txCertificates;
15
- private readonly _txInputsBuilder;
16
- private readonly _txWithdrawals;
17
- constructor(options?: Partial<CreateTxOptions>);
18
- static attachMetadata(cborTx: string, cborTxMetadata: string, era?: Era): string;
19
- static deattachMetadata(cborTx: string): string;
20
- static maskMetadata(cborTx: string, era?: Era): string;
21
- static readMetadata(cborTx: string): string;
22
- static writeMetadata(cborTx: string, cborTxMetadata: string, era?: Era): string;
23
- get size(): number;
24
- build(): Promise<string>;
25
- burnAsset(forgeScript: string | PlutusScript | UTxO, asset: Asset, redeemer?: Partial<Action>): Transaction;
26
- delegateStake(rewardAddress: string, poolId: string): Transaction;
27
- deregisterStake(rewardAddress: string): Transaction;
28
- mintAsset(forgeScript: string | PlutusScript | UTxO, mint: Mint, redeemer?: Partial<Action>): Transaction;
29
- redeemValue(options: {
30
- value: UTxO;
31
- script: PlutusScript | UTxO;
32
- datum?: Data | UTxO;
33
- redeemer?: Action;
34
- }): Transaction;
35
- registerStake(rewardAddress: string): Transaction;
36
- registerPool(params: PoolParams): Transaction;
37
- retirePool(poolId: string, epochNo: number): Transaction;
38
- /**
39
- * Adds an output to the transaction.
40
- *
41
- * @param recipient The recipient of the output.
42
- * @param assets The assets to send.
43
- * @returns The transaction builder.
44
- * @see {@link https://meshjs.dev/apis/transaction#sendAssets}
45
- */
46
- sendAssets(recipient: Recipient, assets: Asset[]): Transaction;
47
- /**
48
- * Adds a transaction output to the transaction.
49
- *
50
- * @param {Recipient} recipient The recipient of the transaction.
51
- * @param {string} lovelace The amount of lovelace to send.
52
- * @returns {Transaction} The Transaction object.
53
- * @see {@link https://meshjs.dev/apis/transaction#sendAda}
54
- */
55
- sendLovelace(recipient: Recipient, lovelace: string): Transaction;
56
- /**
57
- * Adds stable coins transaction output to the transaction.
58
- * @param {Recipient} recipient The recipient of the transaction.
59
- * @param {Token} ticker The ticker of the token to send.
60
- * @param {string} amount The amount of the token to send.
61
- * @returns {Transaction} The Transaction object.
62
- * @see {@link https://meshjs.dev/apis/transaction#sendToken}
63
- */
64
- sendToken(recipient: Recipient, ticker: Token, amount: string): Transaction;
65
- /**
66
- * Adds an output to the transaction.
67
- *
68
- * @param {Recipient} recipient The recipient of the output.
69
- * @param {UTxO} value The UTxO value of the output.
70
- * @returns {Transaction} The Transaction object.
71
- */
72
- sendValue(recipient: Recipient, value: UTxO): Transaction;
73
- /**
74
- * Sets the change address for the transaction.
75
- *
76
- * @param {string} changeAddress The change address.
77
- * @returns {Transaction} The Transaction object.
78
- */
79
- setChangeAddress(changeAddress: string): Transaction;
80
- /**
81
- * Sets the collateral for the transaction.
82
- *
83
- * @param {UTxO[]} collateral - Set the UTxO for collateral.
84
- * @returns {Transaction} The Transaction object.
85
- */
86
- setCollateral(collateral: UTxO[]): Transaction;
87
- /**
88
- * Add a JSON metadata entry to the transaction.
89
- *
90
- * @param {number} key The key to use for the metadata entry.
91
- * @param {unknown} value The value to use for the metadata entry.
92
- * @returns {Transaction} The Transaction object.
93
- * @see {@link https://meshjs.dev/apis/transaction#setMetadata}
94
- */
95
- setMetadata(key: number, value: unknown): Transaction;
96
- /**
97
- * Sets the required signers for the transaction.
98
- *
99
- * @param {string[]} addresses The addresses of the required signers.
100
- * @returns {Transaction} The Transaction object.
101
- */
102
- setRequiredSigners(addresses: string[]): Transaction;
103
- /**
104
- * Sets the start slot for the transaction.
105
- *
106
- * @param {string} slot The start slot for the transaction.
107
- * @returns {Transaction} The Transaction object.
108
- * @see {@link https://meshjs.dev/apis/transaction#setTimeLimit}
109
- */
110
- setTimeToStart(slot: string): Transaction;
111
- /**
112
- * Set the time to live for the transaction.
113
- *
114
- * @param {string} slot The slot number to expire the transaction at.
115
- * @returns {Transaction} The Transaction object.
116
- * @see {@link https://meshjs.dev/apis/transaction#setTimeLimit}
117
- */
118
- setTimeToExpire(slot: string): Transaction;
119
- /**
120
- * Sets the inputs for the transaction.
121
- *
122
- * @param {UTxO[]} inputs The inputs to set.
123
- * @returns {Transaction} The transaction.
124
- */
125
- setTxInputs(inputs: UTxO[]): Transaction;
126
- /**
127
- * Sets the reference inputs for the transaction.
128
- *
129
- * @param {UTxO[]} inputs The reference inputs to set.
130
- * @returns {Transaction} The transaction.
131
- */
132
- setTxRefInputs(inputs: UTxO[]): Transaction;
133
- withdrawRewards(rewardAddress: string, lovelace: string): Transaction;
134
- private addBurnInputsIfNeeded;
135
- private addChangeAddress;
136
- private addCollateralIfNeeded;
137
- private addRequiredSignersIfNeeded;
138
- private addTxInputsAsNeeded;
139
- private forgeAssetsIfNeeded;
140
- private filterAvailableUTxOs;
141
- private addMintOutputs;
142
- private notVisited;
143
- private setTxOutput;
144
- }
145
- declare type CreateTxOptions = {
146
- initiator: IInitiator;
147
- parameters: Protocol;
148
- era: Era;
149
- };
150
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1,5 +0,0 @@
1
- export declare type Account = {
2
- baseAddress: string;
3
- enterpriseAddress: string;
4
- rewardAddress: string;
5
- };
@@ -1,7 +0,0 @@
1
- export declare type AccountInfo = {
2
- active: boolean;
3
- poolId?: string;
4
- balance: string;
5
- rewards: string;
6
- withdrawals: string;
7
- };
@@ -1,12 +0,0 @@
1
- import { REDEEMER_TAGS } from '@mesh/common/constants';
2
- import { Data } from './Data';
3
- export declare type Action = {
4
- data: Data;
5
- index: number;
6
- budget: Budget;
7
- tag: keyof typeof REDEEMER_TAGS;
8
- };
9
- export declare type Budget = {
10
- mem: number;
11
- steps: number;
12
- };
@@ -1,7 +0,0 @@
1
- export declare type Asset = {
2
- unit: Unit;
3
- quantity: Quantity;
4
- };
5
- export declare type Unit = string;
6
- export declare type Quantity = string;
7
- export declare const mergeAssets: (assets: Asset[]) => Asset[];
@@ -1,8 +0,0 @@
1
- import { Quantity, Unit } from './Asset';
2
- export declare type AssetExtended = {
3
- unit: Unit;
4
- policyId: string;
5
- assetName: string;
6
- fingerprint: string;
7
- quantity: Quantity;
8
- };
@@ -1,24 +0,0 @@
1
- import type { MetadataStandard, Files, RoyaltiesStandard } from '@mesh/core';
2
- export declare type AssetMetadata = FungibleAssetMetadata | NonFungibleAssetMetadata | RoyaltiesStandard;
3
- export declare type FungibleAssetMetadata = MetadataStandard & {
4
- ticker: string;
5
- decimals: number;
6
- version: `${number}.${number}`;
7
- };
8
- export declare type NonFungibleAssetMetadata = AudioAssetMetadata | ImageAssetMetadata | SmartAssetMetadata | VideoAssetMetadata;
9
- declare type AudioAssetMetadata = MetadataStandard & Files;
10
- export declare type ImageAssetMetadata = MetadataStandard & Files & {
11
- artists?: [
12
- {
13
- name: string;
14
- twitter?: `https://twitter.com/${string}`;
15
- }
16
- ];
17
- attributes?: {
18
- [key: string]: string;
19
- };
20
- traits?: string[];
21
- };
22
- declare type SmartAssetMetadata = MetadataStandard & Files;
23
- declare type VideoAssetMetadata = MetadataStandard & Files;
24
- export {};
@@ -1,17 +0,0 @@
1
- export declare type BlockInfo = {
2
- time: number;
3
- hash: string;
4
- slot: string;
5
- epoch: number;
6
- epochSlot: string;
7
- slotLeader: string;
8
- size: number;
9
- txCount: number;
10
- output: string;
11
- fees: string;
12
- previousBlock: string;
13
- nextBlock: string;
14
- confirmations: number;
15
- operationalCertificate: string;
16
- VRFKey: string;
17
- };
@@ -1,4 +0,0 @@
1
- export declare type Data = string | number | bigint | Array<Data> | Map<Data, Data> | {
2
- alternative: number;
3
- fields: Array<Data>;
4
- };
@@ -1,4 +0,0 @@
1
- export declare type DataSignature = {
2
- signature: string;
3
- key: string;
4
- };
@@ -1 +0,0 @@
1
- export declare type Era = 'ALONZO' | 'BABBAGE';
@@ -1,10 +0,0 @@
1
- import { Quantity } from './Asset';
2
- import { AssetMetadata } from './AssetMetadata';
3
- import { Recipient } from './Recipient';
4
- export declare type Mint = {
5
- assetName: string;
6
- assetQuantity: Quantity;
7
- metadata: AssetMetadata;
8
- recipient: Recipient;
9
- label: '20' | '721' | '777' | `${number}`;
10
- };
@@ -1,14 +0,0 @@
1
- export declare type NativeScript = {
2
- type: 'after' | 'before';
3
- slot: string;
4
- } | {
5
- type: 'all' | 'any';
6
- scripts: NativeScript[];
7
- } | {
8
- type: 'atLeast';
9
- required: number;
10
- scripts: NativeScript[];
11
- } | {
12
- type: 'sig';
13
- keyHash: string;
14
- };
@@ -1,4 +0,0 @@
1
- declare const ALL_NETWORKS: readonly ["testnet", "preview", "preprod", "mainnet"];
2
- export declare type Network = (typeof ALL_NETWORKS)[number];
3
- export declare const isNetwork: (value: unknown) => value is "testnet" | "preview" | "preprod" | "mainnet";
4
- export {};
@@ -1,5 +0,0 @@
1
- export declare type PlutusScript = {
2
- version: LanguageVersion;
3
- code: string;
4
- };
5
- export declare type LanguageVersion = 'V1' | 'V2';
@@ -1,16 +0,0 @@
1
- import { Relay } from './Relay';
2
- export declare type PoolParams = {
3
- VRFKeyHash: string;
4
- operator: string;
5
- pledge: string;
6
- cost: string;
7
- margin: number;
8
- relays: Relay[];
9
- owners: string[];
10
- rewardAddress: string;
11
- metadata?: PoolMetadata;
12
- };
13
- export declare type PoolMetadata = {
14
- URL: string;
15
- hash: string;
16
- };
@@ -1,22 +0,0 @@
1
- export declare type Protocol = {
2
- epoch: number;
3
- minFeeA: number;
4
- minFeeB: number;
5
- maxBlockSize: number;
6
- maxTxSize: number;
7
- maxBlockHeaderSize: number;
8
- keyDeposit: string;
9
- poolDeposit: string;
10
- decentralisation: number;
11
- minPoolCost: string;
12
- priceMem: number;
13
- priceStep: number;
14
- maxTxExMem: string;
15
- maxTxExSteps: string;
16
- maxBlockExMem: string;
17
- maxBlockExSteps: string;
18
- maxValSize: string;
19
- collateralPercent: number;
20
- maxCollateralInputs: number;
21
- coinsPerUTxOSize: string;
22
- };
@@ -1,11 +0,0 @@
1
- import { Data } from './Data';
2
- import { NativeScript } from './NativeScript';
3
- import { PlutusScript } from './PlutusScript';
4
- export declare type Recipient = string | {
5
- address: string;
6
- datum?: {
7
- value: Data;
8
- inline?: boolean;
9
- };
10
- script?: PlutusScript | NativeScript;
11
- };
@@ -1,13 +0,0 @@
1
- export declare type Relay = {
2
- type: 'SingleHostAddr';
3
- IPV4?: string;
4
- IPV6?: string;
5
- port?: number;
6
- } | {
7
- type: 'SingleHostName';
8
- domainName: string;
9
- port?: number;
10
- } | {
11
- type: 'MultiHostName';
12
- domainName: string;
13
- };
@@ -1,2 +0,0 @@
1
- import { SUPPORTED_TOKENS } from '@mesh/common/constants';
2
- export declare type Token = keyof typeof SUPPORTED_TOKENS;
@@ -1,11 +0,0 @@
1
- export declare type TransactionInfo = {
2
- index: number;
3
- block: string;
4
- hash: string;
5
- slot: string;
6
- fees: string;
7
- size: number;
8
- deposit: string;
9
- invalidBefore: string;
10
- invalidAfter: string;
11
- };
@@ -1,15 +0,0 @@
1
- import { Asset } from './Asset';
2
- export declare type UTxO = {
3
- input: {
4
- outputIndex: number;
5
- txHash: string;
6
- };
7
- output: {
8
- address: string;
9
- amount: Asset[];
10
- dataHash?: string;
11
- plutusData?: string;
12
- scriptRef?: string;
13
- scriptHash?: string;
14
- };
15
- };
@@ -1,5 +0,0 @@
1
- export declare type Wallet = {
2
- name: string;
3
- icon: string;
4
- version: string;
5
- };
@@ -1,22 +0,0 @@
1
- export * from './Account';
2
- export * from './AccountInfo';
3
- export * from './Action';
4
- export * from './Asset';
5
- export * from './AssetExtended';
6
- export * from './AssetMetadata';
7
- export * from './BlockInfo';
8
- export * from './Data';
9
- export * from './DataSignature';
10
- export * from './Era';
11
- export * from './Mint';
12
- export * from './NativeScript';
13
- export * from './Network';
14
- export * from './PlutusScript';
15
- export * from './PoolParams';
16
- export * from './Protocol';
17
- export * from './Recipient';
18
- export * from './Relay';
19
- export * from './Token';
20
- export * from './TransactionInfo';
21
- export * from './UTxO';
22
- export * from './Wallet';
@@ -1,43 +0,0 @@
1
- import { csl } from '@mesh/core';
2
- import { IFetcher, IInitiator, ISigner, ISubmitter } from '@mesh/common/contracts';
3
- import type { Address, TransactionUnspentOutput } from '@mesh/core';
4
- import type { DataSignature } from '@mesh/types';
5
- export declare type CreateAppWalletOptions = {
6
- networkId: number;
7
- fetcher: IFetcher;
8
- submitter: ISubmitter;
9
- key: {
10
- type: 'root';
11
- bech32: string;
12
- } | {
13
- type: 'cli';
14
- payment: string;
15
- stake?: string;
16
- } | {
17
- type: 'mnemonic';
18
- words: string[];
19
- };
20
- };
21
- export declare class AppWallet implements IInitiator, ISigner, ISubmitter {
22
- private readonly _fetcher;
23
- private readonly _submitter;
24
- private readonly _wallet;
25
- constructor(options: CreateAppWalletOptions);
26
- getBaseAddress(accountIndex?: number): string;
27
- getPaymentAddress(accountIndex?: number): string;
28
- getRewardAddress(accountIndex?: number): string;
29
- getUsedAddress(accountIndex?: number): Address;
30
- getUsedCollateral(_limit?: number): Promise<TransactionUnspentOutput[]>;
31
- getUsedUTxOs(accountIndex?: number): Promise<TransactionUnspentOutput[]>;
32
- signData(address: string, payload: string, accountIndex?: number): DataSignature;
33
- signTx(unsignedTx: string, partialSign?: boolean, accountIndex?: number): Promise<string>;
34
- signTxs(unsignedTxs: string[], partialSign: boolean): Promise<string[]>;
35
- submitTx(tx: string): Promise<string>;
36
- static brew(strength?: number): string[];
37
- /**
38
- * development: browser wallets apis
39
- */
40
- getUtxos(): Promise<TransactionUnspentOutput[]>;
41
- getCollateral(): Promise<csl.TransactionUnspentOutput>;
42
- getUsedAddresses(): Promise<string[]>;
43
- }
@@ -1 +0,0 @@
1
- export {};