@meshsdk/common 1.0.0-alpha.8 → 1.5.28

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 (158) hide show
  1. package/README.md +5 -0
  2. package/dist/index.d.mts +1176 -0
  3. package/dist/index.d.ts +1176 -0
  4. package/dist/index.js +1316 -0
  5. package/dist/index.mjs +1189 -0
  6. package/package.json +23 -31
  7. package/dist/cjs/builder/data/index.d.ts +0 -4
  8. package/dist/cjs/builder/data/index.js +0 -20
  9. package/dist/cjs/builder/data/mesh.d.ts +0 -8
  10. package/dist/cjs/builder/data/mesh.js +0 -34
  11. package/dist/cjs/builder/data/parser.d.ts +0 -5
  12. package/dist/cjs/builder/data/parser.js +0 -11
  13. package/dist/cjs/builder/data/plutus.d.ts +0 -69
  14. package/dist/cjs/builder/data/plutus.js +0 -105
  15. package/dist/cjs/builder/data/plutus.spec.d.ts +0 -1
  16. package/dist/cjs/builder/data/plutus.spec.js +0 -98
  17. package/dist/cjs/builder/data/time.d.ts +0 -11
  18. package/dist/cjs/builder/data/time.js +0 -32
  19. package/dist/cjs/builder/index.d.ts +0 -3
  20. package/dist/cjs/builder/index.js +0 -19
  21. package/dist/cjs/builder/serializer.d.ts +0 -7
  22. package/dist/cjs/builder/serializer.js +0 -19
  23. package/dist/cjs/builder/types.d.ts +0 -128
  24. package/dist/cjs/builder/types.js +0 -2
  25. package/dist/cjs/cip/CIP25.d.ts +0 -19
  26. package/dist/cjs/cip/CIP25.js +0 -2
  27. package/dist/cjs/cip/CIP27.d.ts +0 -4
  28. package/dist/cjs/cip/CIP27.js +0 -2
  29. package/dist/cjs/cip/CPS9.d.ts +0 -2
  30. package/dist/cjs/cip/CPS9.js +0 -115
  31. package/dist/cjs/cip/index.d.ts +0 -3
  32. package/dist/cjs/cip/index.js +0 -19
  33. package/dist/cjs/constants.d.ts +0 -43
  34. package/dist/cjs/constants.js +0 -93
  35. package/dist/cjs/index.d.ts +0 -4
  36. package/dist/cjs/index.js +0 -20
  37. package/dist/cjs/types/Account.d.ts +0 -5
  38. package/dist/cjs/types/Account.js +0 -2
  39. package/dist/cjs/types/AccountInfo.d.ts +0 -7
  40. package/dist/cjs/types/AccountInfo.js +0 -2
  41. package/dist/cjs/types/Action.d.ts +0 -12
  42. package/dist/cjs/types/Action.js +0 -2
  43. package/dist/cjs/types/Asset.d.ts +0 -7
  44. package/dist/cjs/types/Asset.js +0 -17
  45. package/dist/cjs/types/AssetExtended.d.ts +0 -8
  46. package/dist/cjs/types/AssetExtended.js +0 -2
  47. package/dist/cjs/types/AssetMetadata.d.ts +0 -24
  48. package/dist/cjs/types/AssetMetadata.js +0 -2
  49. package/dist/cjs/types/BlockInfo.d.ts +0 -17
  50. package/dist/cjs/types/BlockInfo.js +0 -2
  51. package/dist/cjs/types/Data.d.ts +0 -4
  52. package/dist/cjs/types/Data.js +0 -2
  53. package/dist/cjs/types/DataSignature.d.ts +0 -4
  54. package/dist/cjs/types/DataSignature.js +0 -2
  55. package/dist/cjs/types/Era.d.ts +0 -1
  56. package/dist/cjs/types/Era.js +0 -2
  57. package/dist/cjs/types/Mint.d.ts +0 -10
  58. package/dist/cjs/types/Mint.js +0 -2
  59. package/dist/cjs/types/NativeScript.d.ts +0 -14
  60. package/dist/cjs/types/NativeScript.js +0 -2
  61. package/dist/cjs/types/Network.d.ts +0 -4
  62. package/dist/cjs/types/Network.js +0 -8
  63. package/dist/cjs/types/PlutusScript.d.ts +0 -5
  64. package/dist/cjs/types/PlutusScript.js +0 -2
  65. package/dist/cjs/types/PoolParams.d.ts +0 -16
  66. package/dist/cjs/types/PoolParams.js +0 -2
  67. package/dist/cjs/types/Protocol.d.ts +0 -22
  68. package/dist/cjs/types/Protocol.js +0 -2
  69. package/dist/cjs/types/Recipient.d.ts +0 -11
  70. package/dist/cjs/types/Recipient.js +0 -2
  71. package/dist/cjs/types/Relay.d.ts +0 -13
  72. package/dist/cjs/types/Relay.js +0 -2
  73. package/dist/cjs/types/Token.d.ts +0 -2
  74. package/dist/cjs/types/Token.js +0 -2
  75. package/dist/cjs/types/TransactionInfo.d.ts +0 -11
  76. package/dist/cjs/types/TransactionInfo.js +0 -2
  77. package/dist/cjs/types/UTxO.d.ts +0 -15
  78. package/dist/cjs/types/UTxO.js +0 -2
  79. package/dist/cjs/types/Wallet.d.ts +0 -5
  80. package/dist/cjs/types/Wallet.js +0 -2
  81. package/dist/cjs/types/index.d.ts +0 -22
  82. package/dist/cjs/types/index.js +0 -38
  83. package/dist/mjs/builder/data/index.d.ts +0 -4
  84. package/dist/mjs/builder/data/index.js +0 -4
  85. package/dist/mjs/builder/data/mesh.d.ts +0 -8
  86. package/dist/mjs/builder/data/mesh.js +0 -24
  87. package/dist/mjs/builder/data/parser.d.ts +0 -5
  88. package/dist/mjs/builder/data/parser.js +0 -4
  89. package/dist/mjs/builder/data/plutus.d.ts +0 -69
  90. package/dist/mjs/builder/data/plutus.js +0 -79
  91. package/dist/mjs/builder/data/plutus.spec.d.ts +0 -1
  92. package/dist/mjs/builder/data/plutus.spec.js +0 -96
  93. package/dist/mjs/builder/data/time.d.ts +0 -11
  94. package/dist/mjs/builder/data/time.js +0 -27
  95. package/dist/mjs/builder/index.d.ts +0 -3
  96. package/dist/mjs/builder/index.js +0 -3
  97. package/dist/mjs/builder/serializer.d.ts +0 -7
  98. package/dist/mjs/builder/serializer.js +0 -15
  99. package/dist/mjs/builder/types.d.ts +0 -128
  100. package/dist/mjs/builder/types.js +0 -1
  101. package/dist/mjs/cip/CIP25.d.ts +0 -19
  102. package/dist/mjs/cip/CIP25.js +0 -1
  103. package/dist/mjs/cip/CIP27.d.ts +0 -4
  104. package/dist/mjs/cip/CIP27.js +0 -1
  105. package/dist/mjs/cip/CPS9.d.ts +0 -2
  106. package/dist/mjs/cip/CPS9.js +0 -111
  107. package/dist/mjs/cip/index.d.ts +0 -3
  108. package/dist/mjs/cip/index.js +0 -3
  109. package/dist/mjs/constants.d.ts +0 -43
  110. package/dist/mjs/constants.js +0 -90
  111. package/dist/mjs/index.d.ts +0 -4
  112. package/dist/mjs/index.js +0 -4
  113. package/dist/mjs/types/Account.d.ts +0 -5
  114. package/dist/mjs/types/Account.js +0 -1
  115. package/dist/mjs/types/AccountInfo.d.ts +0 -7
  116. package/dist/mjs/types/AccountInfo.js +0 -1
  117. package/dist/mjs/types/Action.d.ts +0 -12
  118. package/dist/mjs/types/Action.js +0 -1
  119. package/dist/mjs/types/Asset.d.ts +0 -7
  120. package/dist/mjs/types/Asset.js +0 -13
  121. package/dist/mjs/types/AssetExtended.d.ts +0 -8
  122. package/dist/mjs/types/AssetExtended.js +0 -1
  123. package/dist/mjs/types/AssetMetadata.d.ts +0 -24
  124. package/dist/mjs/types/AssetMetadata.js +0 -1
  125. package/dist/mjs/types/BlockInfo.d.ts +0 -17
  126. package/dist/mjs/types/BlockInfo.js +0 -1
  127. package/dist/mjs/types/Data.d.ts +0 -4
  128. package/dist/mjs/types/Data.js +0 -1
  129. package/dist/mjs/types/DataSignature.d.ts +0 -4
  130. package/dist/mjs/types/DataSignature.js +0 -1
  131. package/dist/mjs/types/Era.d.ts +0 -1
  132. package/dist/mjs/types/Era.js +0 -1
  133. package/dist/mjs/types/Mint.d.ts +0 -10
  134. package/dist/mjs/types/Mint.js +0 -1
  135. package/dist/mjs/types/NativeScript.d.ts +0 -14
  136. package/dist/mjs/types/NativeScript.js +0 -1
  137. package/dist/mjs/types/Network.d.ts +0 -4
  138. package/dist/mjs/types/Network.js +0 -4
  139. package/dist/mjs/types/PlutusScript.d.ts +0 -5
  140. package/dist/mjs/types/PlutusScript.js +0 -1
  141. package/dist/mjs/types/PoolParams.d.ts +0 -16
  142. package/dist/mjs/types/PoolParams.js +0 -1
  143. package/dist/mjs/types/Protocol.d.ts +0 -22
  144. package/dist/mjs/types/Protocol.js +0 -1
  145. package/dist/mjs/types/Recipient.d.ts +0 -11
  146. package/dist/mjs/types/Recipient.js +0 -1
  147. package/dist/mjs/types/Relay.d.ts +0 -13
  148. package/dist/mjs/types/Relay.js +0 -1
  149. package/dist/mjs/types/Token.d.ts +0 -2
  150. package/dist/mjs/types/Token.js +0 -1
  151. package/dist/mjs/types/TransactionInfo.d.ts +0 -11
  152. package/dist/mjs/types/TransactionInfo.js +0 -1
  153. package/dist/mjs/types/UTxO.d.ts +0 -15
  154. package/dist/mjs/types/UTxO.js +0 -1
  155. package/dist/mjs/types/Wallet.d.ts +0 -5
  156. package/dist/mjs/types/Wallet.js +0 -1
  157. package/dist/mjs/types/index.d.ts +0 -22
  158. package/dist/mjs/types/index.js +0 -22
@@ -1,19 +0,0 @@
1
- export type MetadataStandard = {
2
- name: string;
3
- image: `${string}://${string}`;
4
- mediaType?: `image/${string}`;
5
- description?: string | string[];
6
- instagram?: `https://instagram.com/${string}`;
7
- twitter?: `https://twitter.com/${string}`;
8
- discord?: `https://discord.gg/${string}`;
9
- website?: `https://${string}`;
10
- };
11
- export type Files = {
12
- files?: [
13
- {
14
- name: string;
15
- src: `${string}://${string}`;
16
- mediaType: `${string}/${string}`;
17
- }
18
- ];
19
- };
@@ -1 +0,0 @@
1
- export {};
@@ -1,4 +0,0 @@
1
- export type RoyaltiesStandard = {
2
- rate: string;
3
- address: string;
4
- };
@@ -1 +0,0 @@
1
- export {};
@@ -1,2 +0,0 @@
1
- import type { Quantity, UTxO, Unit } from '../types';
2
- export declare const selectUtxos: (inputs: UTxO[], requiredAssets: Map<Unit, Quantity>, threshold: Quantity) => UTxO[];
@@ -1,111 +0,0 @@
1
- export const selectUtxos = (inputs, requiredAssets, threshold) => {
2
- const totalRequiredAssets = new Map(requiredAssets);
3
- totalRequiredAssets.set('lovelace', String(Number(totalRequiredAssets.get('lovelace')) + Number(threshold)));
4
- const utxoMap = new Map();
5
- for (let i = 0; i < inputs.length; i += 1) {
6
- utxoMap.set(i, inputs[i]);
7
- }
8
- const selectedInputs = new Set();
9
- const onlyLovelace = new Set();
10
- const singletons = new Set();
11
- const pairs = new Set();
12
- const rest = new Set();
13
- for (let i = 0; i < inputs.length; i += 1) {
14
- switch (inputs[i].output.amount.length) {
15
- case 1: {
16
- onlyLovelace.add(i);
17
- break;
18
- }
19
- case 2: {
20
- singletons.add(i);
21
- break;
22
- }
23
- case 3: {
24
- pairs.add(i);
25
- break;
26
- }
27
- default: {
28
- rest.add(i);
29
- break;
30
- }
31
- }
32
- }
33
- const addUtxoWithAssetAmount = (inputIndex, assetUnit, set) => {
34
- const utxo = utxoMap.get(inputIndex);
35
- if (!utxo)
36
- return;
37
- const amount = getAssetAmount(utxo, assetUnit);
38
- if (Number(amount) > 0) {
39
- selectedInputs.add(inputIndex);
40
- set.delete(inputIndex);
41
- for (const asset of utxo.output.amount) {
42
- totalRequiredAssets.set(asset.unit, String(Number(totalRequiredAssets.get(asset.unit)) - Number(asset.quantity)));
43
- }
44
- }
45
- };
46
- for (const assetUnit of totalRequiredAssets.keys()) {
47
- if (assetUnit === 'lovelace')
48
- continue;
49
- for (const inputIndex of singletons) {
50
- const assetRequired = totalRequiredAssets.get(assetUnit);
51
- if (!assetRequired || Number(assetRequired) <= 0)
52
- break;
53
- addUtxoWithAssetAmount(inputIndex, assetUnit, singletons);
54
- }
55
- for (const inputIndex of pairs) {
56
- const assetRequired = totalRequiredAssets.get(assetUnit);
57
- if (!assetRequired || Number(assetRequired) <= 0)
58
- break;
59
- addUtxoWithAssetAmount(inputIndex, assetUnit, pairs);
60
- }
61
- for (const inputIndex of rest) {
62
- const assetRequired = totalRequiredAssets.get(assetUnit);
63
- if (!assetRequired || Number(assetRequired) <= 0)
64
- break;
65
- addUtxoWithAssetAmount(inputIndex, assetUnit, rest);
66
- }
67
- }
68
- for (const inputIndex of onlyLovelace) {
69
- const assetRequired = totalRequiredAssets.get('lovelace');
70
- if (!assetRequired || Number(assetRequired) <= 0)
71
- break;
72
- addUtxoWithAssetAmount(inputIndex, 'lovelace', onlyLovelace);
73
- }
74
- for (const inputIndex of singletons) {
75
- const assetRequired = totalRequiredAssets.get('lovelace');
76
- if (!assetRequired || Number(assetRequired) <= 0)
77
- break;
78
- addUtxoWithAssetAmount(inputIndex, 'lovelace', singletons);
79
- }
80
- for (const inputIndex of pairs) {
81
- const assetRequired = totalRequiredAssets.get('lovelace');
82
- if (!assetRequired || Number(assetRequired) <= 0)
83
- break;
84
- addUtxoWithAssetAmount(inputIndex, 'lovelace', pairs);
85
- }
86
- for (const inputIndex of rest) {
87
- const assetRequired = totalRequiredAssets.get('lovelace');
88
- if (!assetRequired || Number(assetRequired) <= 0)
89
- break;
90
- addUtxoWithAssetAmount(inputIndex, 'lovelace', rest);
91
- }
92
- for (const assetUnit of totalRequiredAssets.keys()) {
93
- if (Number(totalRequiredAssets.get(assetUnit)) > 0)
94
- return [];
95
- }
96
- const selectedUtxos = [];
97
- for (const inputIndex of selectedInputs) {
98
- const utxo = utxoMap.get(inputIndex);
99
- if (utxo) {
100
- selectedUtxos.push(utxo);
101
- }
102
- }
103
- return selectedUtxos;
104
- };
105
- const getAssetAmount = (utxo, assetUnit) => {
106
- for (const utxoAsset of utxo.output.amount) {
107
- if (utxoAsset.unit === assetUnit)
108
- return utxoAsset.quantity;
109
- }
110
- return '0';
111
- };
@@ -1,3 +0,0 @@
1
- export * from './CPS9';
2
- export * from './CIP25';
3
- export * from './CIP27';
@@ -1,3 +0,0 @@
1
- export * from './CPS9';
2
- export * from './CIP25';
3
- export * from './CIP27';
@@ -1,43 +0,0 @@
1
- import type { Budget, Era, LanguageVersion, Network, Protocol } from './types';
2
- export declare const DEFAULT_REDEEMER_BUDGET: Budget;
3
- export declare const DEFAULT_PROTOCOL_PARAMETERS: Protocol;
4
- export declare const HARDENED_KEY_START = 2147483648;
5
- export declare const SUPPORTED_CLOCKS: Record<Network, [
6
- epoch: string,
7
- slot: string,
8
- systemStart: string,
9
- epochLength: string
10
- ]>;
11
- export declare const SUPPORTED_LANGUAGE_VIEWS: Record<Era, Partial<Record<LanguageVersion, string>>>;
12
- export declare const SUPPORTED_OGMIOS_LINKS: Record<Network, string>;
13
- export declare const SUPPORTED_TOKENS: {
14
- LQ: string;
15
- MIN: string;
16
- NTX: string;
17
- iBTC: string;
18
- iETH: string;
19
- iUSD: string;
20
- MILK: string;
21
- AGIX: string;
22
- MELD: string;
23
- INDY: string;
24
- CLAY: string;
25
- MCOS: string;
26
- DING: string;
27
- GERO: string;
28
- NMKR: string;
29
- PAVIA: string;
30
- HOSKY: string;
31
- YUMMI: string;
32
- C3: string;
33
- GIMBAL: string;
34
- SUNDAE: string;
35
- GREENS: string;
36
- GENS: string;
37
- SOCIETY: string;
38
- DJED: string;
39
- SHEN: string;
40
- WMT: string;
41
- COPI: string;
42
- };
43
- export declare const SUPPORTED_WALLETS: string[];
@@ -1,90 +0,0 @@
1
- export const DEFAULT_REDEEMER_BUDGET = {
2
- mem: 7_000_000,
3
- steps: 3_000_000_000,
4
- };
5
- export const DEFAULT_PROTOCOL_PARAMETERS = {
6
- epoch: 0,
7
- coinsPerUTxOSize: '4310',
8
- priceMem: 0.0577,
9
- priceStep: 0.0000721,
10
- minFeeA: 44,
11
- minFeeB: 155381,
12
- keyDeposit: '2000000',
13
- maxTxSize: 16384,
14
- maxValSize: '5000',
15
- poolDeposit: '500000000',
16
- maxCollateralInputs: 3,
17
- decentralisation: 0,
18
- maxBlockSize: 98304,
19
- collateralPercent: 150,
20
- maxBlockHeaderSize: 1100,
21
- minPoolCost: '340000000',
22
- maxTxExMem: '16000000',
23
- maxTxExSteps: '10000000000',
24
- maxBlockExMem: '80000000',
25
- maxBlockExSteps: '40000000000',
26
- };
27
- export const HARDENED_KEY_START = 0x80000000;
28
- export const SUPPORTED_CLOCKS = {
29
- testnet: ['74', '1598400', '1595967616', '432000'],
30
- preview: ['183', '15811222', '1682467200', '86400'],
31
- preprod: ['65', '26438400', '1682121600', '432000'],
32
- mainnet: ['208', '4492800', '1596059091', '432000'],
33
- };
34
- export const SUPPORTED_LANGUAGE_VIEWS = {
35
- ALONZO: {
36
- V1: 'a141005901d59f1a000302590001011a00060bc719026d00011a000249f01903e800011a000249f018201a0025cea81971f70419744d186419744d186419744d186419744d186419744d186419744d18641864186419744d18641a000249f018201a000249f018201a000249f018201a000249f01903e800011a000249f018201a000249f01903e800081a000242201a00067e2318760001011a000249f01903e800081a000249f01a0001b79818f7011a000249f0192710011a0002155e19052e011903e81a000249f01903e8011a000249f018201a000249f018201a000249f0182001011a000249f0011a000249f0041a000194af18f8011a000194af18f8011a0002377c190556011a0002bdea1901f1011a000249f018201a000249f018201a000249f018201a000249f018201a000249f018201a000249f018201a000242201a00067e23187600010119f04c192bd200011a000249f018201a000242201a00067e2318760001011a000242201a00067e2318760001011a0025cea81971f704001a000141bb041a000249f019138800011a000249f018201a000302590001011a000249f018201a000249f018201a000249f018201a000249f018201a000249f018201a000249f018201a000249f018201a00330da70101ff',
37
- },
38
- BABBAGE: {
39
- V1: 'a141005901b69f1a0003236119032c01011903e819023b00011903e8195e7104011903e818201a0001ca761928eb041959d818641959d818641959d818641959d818641959d818641959d81864186418641959d81864194c5118201a0002acfa182019b551041a000363151901ff00011a00015c3518201a000797751936f404021a0002ff941a0006ea7818dc0001011903e8196ff604021a0003bd081a00034ec5183e011a00102e0f19312a011a00032e801901a5011a0002da781903e819cf06011a00013a34182019a8f118201903e818201a00013aac0119e143041903e80a1a00030219189c011a00030219189c011a0003207c1901d9011a000330001901ff0119ccf3182019fd40182019ffd5182019581e18201940b318201a00012adf18201a0002ff941a0006ea7818dc0001011a00010f92192da7000119eabb18201a0002ff941a0006ea7818dc0001011a0002ff941a0006ea7818dc0001011a000c504e197712041a001d6af61a0001425b041a00040c660004001a00014fab18201a0003236119032c010119a0de18201a00033d7618201979f41820197fb8182019a95d1820197df718201995aa18201a009063b91903fd0aff',
40
- V2: 'a20198af1a0003236119032c01011903e819023b00011903e8195e7104011903e818201a0001ca761928eb041959d818641959d818641959d818641959d818641959d818641959d81864186418641959d81864194c5118201a0002acfa182019b551041a000363151901ff00011a00015c3518201a000797751936f404021a0002ff941a0006ea7818dc0001011903e8196ff604021a0003bd081a00034ec5183e011a00102e0f19312a011a00032e801901a5011a0002da781903e819cf06011a00013a34182019a8f118201903e818201a00013aac0119e143041903e80a1a00030219189c011a00030219189c011a0003207c1901d9011a000330001901ff0119ccf3182019fd40182019ffd5182019581e18201940b318201a00012adf18201a0002ff941a0006ea7818dc0001011a00010f92192da7000119eabb18201a0002ff941a0006ea7818dc0001011a0002ff941a0006ea7818dc0001011a0011b22c1a0005fdde00021a000c504e197712041a001d6af61a0001425b041a00040c660004001a00014fab18201a0003236119032c010119a0de18201a00033d7618201979f41820197fb8182019a95d1820197df718201995aa18201b00000004a817c8001b00000004a817c8001a009063b91903fd0a1b00000004a817c800001b00000004a817c80041005901b69f1a0003236119032c01011903e819023b00011903e8195e7104011903e818201a0001ca761928eb041959d818641959d818641959d818641959d818641959d818641959d81864186418641959d81864194c5118201a0002acfa182019b551041a000363151901ff00011a00015c3518201a000797751936f404021a0002ff941a0006ea7818dc0001011903e8196ff604021a0003bd081a00034ec5183e011a00102e0f19312a011a00032e801901a5011a0002da781903e819cf06011a00013a34182019a8f118201903e818201a00013aac0119e143041903e80a1a00030219189c011a00030219189c011a0003207c1901d9011a000330001901ff0119ccf3182019fd40182019ffd5182019581e18201940b318201a00012adf18201a0002ff941a0006ea7818dc0001011a00010f92192da7000119eabb18201a0002ff941a0006ea7818dc0001011a0002ff941a0006ea7818dc0001011a000c504e197712041a001d6af61a0001425b041a00040c660004001a00014fab18201a0003236119032c010119a0de18201a00033d7618201979f41820197fb8182019a95d1820197df718201995aa18201a009063b91903fd0aff',
41
- },
42
- };
43
- export const SUPPORTED_OGMIOS_LINKS = {
44
- mainnet: 'wss://ogmios-api.mainnet.dandelion.link',
45
- preprod: 'wss://ogmios-api.iohk-preprod.dandelion.link',
46
- preview: '__TBD_SOON_TM__',
47
- testnet: 'wss://ogmios-api.testnet.dandelion.link',
48
- };
49
- export const SUPPORTED_TOKENS = {
50
- LQ: 'da8c30857834c6ae7203935b89278c532b3995245295456f993e1d244c51',
51
- MIN: '29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c64d494e',
52
- NTX: 'edfd7a1d77bcb8b884c474bdc92a16002d1fb720e454fa6e993444794e5458',
53
- iBTC: 'f66d78b4a3cb3d37afa0ec36461e51ecbde00f26c8f0a68f94b6988069425443',
54
- iETH: 'f66d78b4a3cb3d37afa0ec36461e51ecbde00f26c8f0a68f94b6988069455448',
55
- iUSD: 'f66d78b4a3cb3d37afa0ec36461e51ecbde00f26c8f0a68f94b6988069555344',
56
- MILK: '8a1cfae21368b8bebbbed9800fec304e95cce39a2a57dc35e2e3ebaa4d494c4b',
57
- AGIX: 'f43a62fdc3965df486de8a0d32fe800963589c41b38946602a0dc53541474958',
58
- MELD: '6ac8ef33b510ec004fe11585f7c5a9f0c07f0c23428ab4f29c1d7d104d454c44',
59
- INDY: '533bb94a8850ee3ccbe483106489399112b74c905342cb1792a797a0494e4459',
60
- CLAY: '38ad9dc3aec6a2f38e220142b9aa6ade63ebe71f65e7cc2b7d8a8535434c4159',
61
- MCOS: '6f46e1304b16d884c85c62fb0eef35028facdc41aaa0fd319a152ed64d434f53',
62
- DING: 'ce5b9e0f8a88255b65f2e4d065c6e716e9fa9a8a86dfb86423dd1ac044494e47',
63
- GERO: '10a49b996e2402269af553a8a96fb8eb90d79e9eca79e2b4223057b64745524f',
64
- NMKR: '5dac8536653edc12f6f5e1045d8164b9f59998d3bdc300fc928434894e4d4b52',
65
- PAVIA: '884892bcdc360bcef87d6b3f806e7f9cd5ac30d999d49970e7a903ae5041564941',
66
- HOSKY: 'a0028f350aaabe0545fdcb56b039bfb08e4bb4d8c4d7c3c7d481c235484f534b59',
67
- YUMMI: '078eafce5cd7edafdf63900edef2c1ea759e77f30ca81d6bbdeec92479756d6d69',
68
- C3: '8e51398904a5d3fc129fbf4f1589701de23c7824d5c90fdb9490e15a434841524c4933',
69
- GIMBAL: '2b0a04a7b60132b1805b296c7fcb3b217ff14413991bf76f72663c3067696d62616c',
70
- SUNDAE: '9a9693a9a37912a5097918f97918d15240c92ab729a0b7c4aa144d7753554e444145',
71
- GREENS: '4623ab311b7d982d8d26fcbe1a9439ca56661aafcdcd8d8a0ef31fd6475245454e53',
72
- GENS: 'dda5fdb1002f7389b33e036b6afee82a8189becb6cba852e8b79b4fb0014df1047454e53',
73
- SOCIETY: '25f0fc240e91bd95dcdaebd2ba7713fc5168ac77234a3d79449fc20c534f4349455459',
74
- DJED: '8db269c3ec630e06ae29f74bc39edd1f87c819f1056206e879a1cd61446a65644d6963726f555344',
75
- SHEN: '8db269c3ec630e06ae29f74bc39edd1f87c819f1056206e879a1cd615368656e4d6963726f555344',
76
- WMT: '1d7f33bd23d85e1a25d87d86fac4f199c3197a2f7afeb662a0f34e1e776f726c646d6f62696c65746f6b656e',
77
- COPI: 'b6a7467ea1deb012808ef4e87b5ff371e85f7142d7b356a40d9b42a0436f726e75636f70696173205b76696120436861696e506f72742e696f5d',
78
- };
79
- export const SUPPORTED_WALLETS = [
80
- 'begin',
81
- 'eternl',
82
- 'flint',
83
- 'lace',
84
- 'nami',
85
- 'nufi',
86
- 'gerowallet',
87
- 'typhoncip30',
88
- 'vespr',
89
- 'yoroi',
90
- ];
@@ -1,4 +0,0 @@
1
- export * from './constants';
2
- export * from './cip';
3
- export * from './types';
4
- export * from './builder';
package/dist/mjs/index.js DELETED
@@ -1,4 +0,0 @@
1
- export * from './constants';
2
- export * from './cip';
3
- export * from './types';
4
- export * from './builder';
@@ -1,5 +0,0 @@
1
- export type Account = {
2
- baseAddress: string;
3
- enterpriseAddress: string;
4
- rewardAddress: string;
5
- };
@@ -1 +0,0 @@
1
- export {};
@@ -1,7 +0,0 @@
1
- export type AccountInfo = {
2
- active: boolean;
3
- poolId?: string;
4
- balance: string;
5
- rewards: string;
6
- withdrawals: string;
7
- };
@@ -1 +0,0 @@
1
- export {};
@@ -1,12 +0,0 @@
1
- import { Data } from './Data';
2
- export type RedeemerTag = 'CERT' | 'MINT' | 'REWARD' | 'SPEND';
3
- export type Budget = {
4
- mem: number;
5
- steps: number;
6
- };
7
- export type Action = {
8
- data: Data;
9
- index: number;
10
- budget: Budget;
11
- tag: RedeemerTag;
12
- };
@@ -1 +0,0 @@
1
- export {};
@@ -1,7 +0,0 @@
1
- export type Unit = string;
2
- export type Quantity = string;
3
- export type Asset = {
4
- unit: Unit;
5
- quantity: Quantity;
6
- };
7
- export declare const mergeAssets: (assets: Asset[]) => Asset[];
@@ -1,13 +0,0 @@
1
- export const mergeAssets = (assets) => {
2
- const merged = [];
3
- assets.forEach((asset) => {
4
- const existing = merged.find((a) => a.unit === asset.unit);
5
- if (existing) {
6
- existing.quantity = (parseInt(existing.quantity) + parseInt(asset.quantity)).toString();
7
- }
8
- else {
9
- merged.push(asset);
10
- }
11
- });
12
- return merged;
13
- };
@@ -1,8 +0,0 @@
1
- import { Quantity, Unit } from './Asset';
2
- export type AssetExtended = {
3
- unit: Unit;
4
- policyId: string;
5
- assetName: string;
6
- fingerprint: string;
7
- quantity: Quantity;
8
- };
@@ -1 +0,0 @@
1
- export {};
@@ -1,24 +0,0 @@
1
- import type { MetadataStandard, Files, RoyaltiesStandard } from '../cip';
2
- export type AssetMetadata = FungibleAssetMetadata | NonFungibleAssetMetadata | RoyaltiesStandard;
3
- export type FungibleAssetMetadata = MetadataStandard & {
4
- ticker: string;
5
- decimals: number;
6
- version: `${number}.${number}`;
7
- };
8
- export type NonFungibleAssetMetadata = AudioAssetMetadata | ImageAssetMetadata | SmartAssetMetadata | VideoAssetMetadata;
9
- type AudioAssetMetadata = MetadataStandard & Files;
10
- export 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
- type SmartAssetMetadata = MetadataStandard & Files;
23
- type VideoAssetMetadata = MetadataStandard & Files;
24
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1,17 +0,0 @@
1
- export 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 +0,0 @@
1
- export {};
@@ -1,4 +0,0 @@
1
- export type Data = string | number | bigint | Array<Data> | Map<Data, Data> | {
2
- alternative: number;
3
- fields: Array<Data>;
4
- };
@@ -1 +0,0 @@
1
- export {};
@@ -1,4 +0,0 @@
1
- export type DataSignature = {
2
- signature: string;
3
- key: string;
4
- };
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export type Era = 'ALONZO' | 'BABBAGE';
@@ -1 +0,0 @@
1
- export {};
@@ -1,10 +0,0 @@
1
- import { Quantity } from './Asset';
2
- import { AssetMetadata } from './AssetMetadata';
3
- import { Recipient } from './Recipient';
4
- export type Mint = {
5
- assetName: string;
6
- assetQuantity: Quantity;
7
- metadata: AssetMetadata;
8
- recipient: Recipient;
9
- label: '20' | '721' | '777' | `${number}`;
10
- };
@@ -1 +0,0 @@
1
- export {};
@@ -1,14 +0,0 @@
1
- export 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 +0,0 @@
1
- export {};
@@ -1,4 +0,0 @@
1
- declare const ALL_NETWORKS: readonly ["testnet", "preview", "preprod", "mainnet"];
2
- export type Network = (typeof ALL_NETWORKS)[number];
3
- export declare const isNetwork: (value: unknown) => value is "testnet" | "preview" | "preprod" | "mainnet";
4
- export {};
@@ -1,4 +0,0 @@
1
- const ALL_NETWORKS = ['testnet', 'preview', 'preprod', 'mainnet'];
2
- export const isNetwork = (value) => {
3
- return ALL_NETWORKS.includes(value);
4
- };
@@ -1,5 +0,0 @@
1
- export type PlutusScript = {
2
- version: LanguageVersion;
3
- code: string;
4
- };
5
- export type LanguageVersion = 'V1' | 'V2';
@@ -1 +0,0 @@
1
- export {};
@@ -1,16 +0,0 @@
1
- import { Relay } from './Relay';
2
- export 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 type PoolMetadata = {
14
- URL: string;
15
- hash: string;
16
- };
@@ -1 +0,0 @@
1
- export {};
@@ -1,22 +0,0 @@
1
- export 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 +0,0 @@
1
- export {};
@@ -1,11 +0,0 @@
1
- import { Data } from './Data';
2
- import { NativeScript } from './NativeScript';
3
- import { PlutusScript } from './PlutusScript';
4
- export type Recipient = string | {
5
- address: string;
6
- datum?: {
7
- value: Data;
8
- inline?: boolean;
9
- };
10
- script?: PlutusScript | NativeScript;
11
- };
@@ -1 +0,0 @@
1
- export {};
@@ -1,13 +0,0 @@
1
- export 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 +0,0 @@
1
- export {};
@@ -1,2 +0,0 @@
1
- import { SUPPORTED_TOKENS } from '../constants';
2
- export type Token = keyof typeof SUPPORTED_TOKENS;
@@ -1 +0,0 @@
1
- export {};
@@ -1,11 +0,0 @@
1
- export 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 +0,0 @@
1
- export {};
@@ -1,15 +0,0 @@
1
- import { Asset } from './Asset';
2
- export 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 +0,0 @@
1
- export {};
@@ -1,5 +0,0 @@
1
- export type Wallet = {
2
- name: string;
3
- icon: string;
4
- version: string;
5
- };