@meshsdk/common 1.0.0-alpha.3 → 1.0.0-alpha.5

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 (125) hide show
  1. package/dist/cjs/builder/index.d.ts +2 -0
  2. package/dist/cjs/builder/index.js +18 -0
  3. package/dist/cjs/builder/serializer.d.ts +7 -0
  4. package/dist/cjs/builder/serializer.js +19 -0
  5. package/dist/cjs/builder/types.d.ts +128 -0
  6. package/dist/cjs/builder/types.js +2 -0
  7. package/dist/cjs/cip/CIP25.d.ts +19 -0
  8. package/dist/cjs/cip/CIP25.js +2 -0
  9. package/dist/cjs/cip/CIP27.d.ts +4 -0
  10. package/dist/cjs/cip/CIP27.js +2 -0
  11. package/dist/cjs/cip/CPS9.d.ts +1 -1
  12. package/dist/cjs/cip/index.d.ts +2 -0
  13. package/dist/cjs/cip/index.js +2 -0
  14. package/dist/cjs/constants.d.ts +1 -1
  15. package/dist/cjs/index.d.ts +2 -0
  16. package/dist/cjs/index.js +2 -0
  17. package/dist/cjs/types/Account.d.ts +5 -0
  18. package/dist/cjs/types/Account.js +2 -0
  19. package/dist/cjs/types/AccountInfo.d.ts +7 -0
  20. package/dist/cjs/types/AccountInfo.js +2 -0
  21. package/dist/cjs/types/Action.d.ts +12 -0
  22. package/dist/cjs/types/Action.js +2 -0
  23. package/dist/cjs/types/Asset.d.ts +7 -0
  24. package/dist/cjs/types/Asset.js +17 -0
  25. package/dist/cjs/types/AssetExtended.d.ts +8 -0
  26. package/dist/cjs/types/AssetExtended.js +2 -0
  27. package/dist/cjs/types/AssetMetadata.d.ts +24 -0
  28. package/dist/cjs/types/AssetMetadata.js +2 -0
  29. package/dist/cjs/types/BlockInfo.d.ts +17 -0
  30. package/dist/cjs/types/BlockInfo.js +2 -0
  31. package/dist/cjs/types/Data.d.ts +4 -0
  32. package/dist/cjs/types/Data.js +2 -0
  33. package/dist/cjs/types/DataSignature.d.ts +4 -0
  34. package/dist/cjs/types/DataSignature.js +2 -0
  35. package/dist/cjs/types/Era.d.ts +1 -0
  36. package/dist/cjs/types/Era.js +2 -0
  37. package/dist/cjs/types/Mint.d.ts +10 -0
  38. package/dist/cjs/types/Mint.js +2 -0
  39. package/dist/cjs/types/NativeScript.d.ts +14 -0
  40. package/dist/cjs/types/NativeScript.js +2 -0
  41. package/dist/cjs/types/Network.d.ts +4 -0
  42. package/dist/cjs/types/Network.js +8 -0
  43. package/dist/cjs/types/PlutusScript.d.ts +5 -0
  44. package/dist/cjs/types/PlutusScript.js +2 -0
  45. package/dist/cjs/types/PoolParams.d.ts +16 -0
  46. package/dist/cjs/types/PoolParams.js +2 -0
  47. package/dist/cjs/types/Protocol.d.ts +22 -0
  48. package/dist/cjs/types/Protocol.js +2 -0
  49. package/dist/cjs/types/Recipient.d.ts +11 -0
  50. package/dist/cjs/types/Recipient.js +2 -0
  51. package/dist/cjs/types/Relay.d.ts +13 -0
  52. package/dist/cjs/types/Relay.js +2 -0
  53. package/dist/cjs/types/Token.d.ts +2 -0
  54. package/dist/cjs/types/Token.js +2 -0
  55. package/dist/cjs/types/TransactionInfo.d.ts +11 -0
  56. package/dist/cjs/types/TransactionInfo.js +2 -0
  57. package/dist/cjs/types/UTxO.d.ts +15 -0
  58. package/dist/cjs/types/UTxO.js +2 -0
  59. package/dist/cjs/types/Wallet.d.ts +5 -0
  60. package/dist/cjs/types/Wallet.js +2 -0
  61. package/dist/cjs/types/index.d.ts +22 -0
  62. package/dist/cjs/types/index.js +38 -0
  63. package/dist/mjs/builder/index.d.ts +2 -0
  64. package/dist/mjs/builder/index.js +2 -0
  65. package/dist/mjs/builder/serializer.d.ts +7 -0
  66. package/dist/mjs/builder/serializer.js +15 -0
  67. package/dist/mjs/builder/types.d.ts +128 -0
  68. package/dist/mjs/builder/types.js +1 -0
  69. package/dist/mjs/cip/CIP25.d.ts +19 -0
  70. package/dist/mjs/cip/CIP25.js +1 -0
  71. package/dist/mjs/cip/CIP27.d.ts +4 -0
  72. package/dist/mjs/cip/CIP27.js +1 -0
  73. package/dist/mjs/cip/CPS9.d.ts +1 -1
  74. package/dist/mjs/cip/index.d.ts +2 -0
  75. package/dist/mjs/cip/index.js +2 -0
  76. package/dist/mjs/constants.d.ts +1 -1
  77. package/dist/mjs/index.d.ts +2 -0
  78. package/dist/mjs/index.js +2 -0
  79. package/dist/mjs/types/Account.d.ts +5 -0
  80. package/dist/mjs/types/Account.js +1 -0
  81. package/dist/mjs/types/AccountInfo.d.ts +7 -0
  82. package/dist/mjs/types/AccountInfo.js +1 -0
  83. package/dist/mjs/types/Action.d.ts +12 -0
  84. package/dist/mjs/types/Action.js +1 -0
  85. package/dist/mjs/types/Asset.d.ts +7 -0
  86. package/dist/mjs/types/Asset.js +13 -0
  87. package/dist/mjs/types/AssetExtended.d.ts +8 -0
  88. package/dist/mjs/types/AssetExtended.js +1 -0
  89. package/dist/mjs/types/AssetMetadata.d.ts +24 -0
  90. package/dist/mjs/types/AssetMetadata.js +1 -0
  91. package/dist/mjs/types/BlockInfo.d.ts +17 -0
  92. package/dist/mjs/types/BlockInfo.js +1 -0
  93. package/dist/mjs/types/Data.d.ts +4 -0
  94. package/dist/mjs/types/Data.js +1 -0
  95. package/dist/mjs/types/DataSignature.d.ts +4 -0
  96. package/dist/mjs/types/DataSignature.js +1 -0
  97. package/dist/mjs/types/Era.d.ts +1 -0
  98. package/dist/mjs/types/Era.js +1 -0
  99. package/dist/mjs/types/Mint.d.ts +10 -0
  100. package/dist/mjs/types/Mint.js +1 -0
  101. package/dist/mjs/types/NativeScript.d.ts +14 -0
  102. package/dist/mjs/types/NativeScript.js +1 -0
  103. package/dist/mjs/types/Network.d.ts +4 -0
  104. package/dist/mjs/types/Network.js +4 -0
  105. package/dist/mjs/types/PlutusScript.d.ts +5 -0
  106. package/dist/mjs/types/PlutusScript.js +1 -0
  107. package/dist/mjs/types/PoolParams.d.ts +16 -0
  108. package/dist/mjs/types/PoolParams.js +1 -0
  109. package/dist/mjs/types/Protocol.d.ts +22 -0
  110. package/dist/mjs/types/Protocol.js +1 -0
  111. package/dist/mjs/types/Recipient.d.ts +11 -0
  112. package/dist/mjs/types/Recipient.js +1 -0
  113. package/dist/mjs/types/Relay.d.ts +13 -0
  114. package/dist/mjs/types/Relay.js +1 -0
  115. package/dist/mjs/types/Token.d.ts +2 -0
  116. package/dist/mjs/types/Token.js +1 -0
  117. package/dist/mjs/types/TransactionInfo.d.ts +11 -0
  118. package/dist/mjs/types/TransactionInfo.js +1 -0
  119. package/dist/mjs/types/UTxO.d.ts +15 -0
  120. package/dist/mjs/types/UTxO.js +1 -0
  121. package/dist/mjs/types/Wallet.d.ts +5 -0
  122. package/dist/mjs/types/Wallet.js +1 -0
  123. package/dist/mjs/types/index.d.ts +22 -0
  124. package/dist/mjs/types/index.js +22 -0
  125. package/package.json +1 -1
@@ -0,0 +1,38 @@
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./Account"), exports);
18
+ __exportStar(require("./AccountInfo"), exports);
19
+ __exportStar(require("./Action"), exports);
20
+ __exportStar(require("./Asset"), exports);
21
+ __exportStar(require("./AssetExtended"), exports);
22
+ __exportStar(require("./AssetMetadata"), exports);
23
+ __exportStar(require("./BlockInfo"), exports);
24
+ __exportStar(require("./Data"), exports);
25
+ __exportStar(require("./DataSignature"), exports);
26
+ __exportStar(require("./Era"), exports);
27
+ __exportStar(require("./Mint"), exports);
28
+ __exportStar(require("./NativeScript"), exports);
29
+ __exportStar(require("./Network"), exports);
30
+ __exportStar(require("./PlutusScript"), exports);
31
+ __exportStar(require("./PoolParams"), exports);
32
+ __exportStar(require("./Protocol"), exports);
33
+ __exportStar(require("./Recipient"), exports);
34
+ __exportStar(require("./Relay"), exports);
35
+ __exportStar(require("./Token"), exports);
36
+ __exportStar(require("./TransactionInfo"), exports);
37
+ __exportStar(require("./UTxO"), exports);
38
+ __exportStar(require("./Wallet"), exports);
@@ -0,0 +1,2 @@
1
+ export * from './serializer';
2
+ export * from './types';
@@ -0,0 +1,2 @@
1
+ export * from './serializer';
2
+ export * from './types';
@@ -0,0 +1,7 @@
1
+ import { MeshTxBuilderBody } from './types';
2
+ import { Protocol } from '../types';
3
+ export declare const emptyTxBuilderBody: () => MeshTxBuilderBody;
4
+ export interface IMeshSerializer {
5
+ serializeTxBody(txBody: MeshTxBuilderBody, protocolParams: Protocol): string;
6
+ addSigningKeys(txHex: string, signingKeys: string[]): string;
7
+ }
@@ -0,0 +1,15 @@
1
+ export const emptyTxBuilderBody = () => ({
2
+ inputs: [],
3
+ outputs: [],
4
+ extraInputs: [],
5
+ selectionThreshold: 0,
6
+ collaterals: [],
7
+ requiredSignatures: [],
8
+ referenceInputs: [],
9
+ mints: [],
10
+ changeAddress: '',
11
+ metadata: [],
12
+ validityRange: {},
13
+ certificates: [],
14
+ signingKey: [],
15
+ });
@@ -0,0 +1,128 @@
1
+ import { Asset, Budget, Data, LanguageVersion, PlutusScript, UTxO, PoolParams } from '../types';
2
+ export 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 type TxIn = PubKeyTxIn | ScriptTxIn;
18
+ export type PubKeyTxIn = {
19
+ type: 'PubKey';
20
+ txIn: TxInParameter;
21
+ };
22
+ export type TxInParameter = {
23
+ txHash: string;
24
+ txIndex: number;
25
+ amount?: Asset[];
26
+ address?: string;
27
+ };
28
+ export type ScriptTxIn = {
29
+ type: 'Script';
30
+ txIn: TxInParameter;
31
+ scriptTxIn: ScriptTxInParameter;
32
+ };
33
+ export 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 type ScriptSourceInfo = {
52
+ txHash: string;
53
+ txIndex: number;
54
+ spendingScriptHash?: string;
55
+ version: LanguageVersion;
56
+ };
57
+ export type RefTxIn = {
58
+ txHash: string;
59
+ txIndex: number;
60
+ };
61
+ export type Output = {
62
+ address: string;
63
+ amount: Asset[];
64
+ datum?: {
65
+ type: 'Hash' | 'Inline';
66
+ data: BuilderData;
67
+ };
68
+ referenceScript?: PlutusScript;
69
+ };
70
+ export 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 type ValidityRange = {
87
+ invalidBefore?: number;
88
+ invalidHereafter?: number;
89
+ };
90
+ export 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 type Redeemer = {
101
+ data: BuilderData;
102
+ exUnits: Budget;
103
+ };
104
+ export type Metadata = {
105
+ tag: string;
106
+ metadata: object;
107
+ };
108
+ export 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 type RequiredWith<T, K extends keyof T> = Required<T> & {
127
+ [P in K]: Required<T[P]>;
128
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,19 @@
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
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ export type RoyaltiesStandard = {
2
+ rate: string;
3
+ address: string;
4
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -1,2 +1,2 @@
1
- import type { Quantity, UTxO, Unit } from '@meshsdk/core';
1
+ import type { Quantity, UTxO, Unit } from '../types';
2
2
  export declare const selectUtxos: (inputs: UTxO[], requiredAssets: Map<Unit, Quantity>, threshold: Quantity) => UTxO[];
@@ -1 +1,3 @@
1
1
  export * from './CPS9';
2
+ export * from './CIP25';
3
+ export * from './CIP27';
@@ -1 +1,3 @@
1
1
  export * from './CPS9';
2
+ export * from './CIP25';
3
+ export * from './CIP27';
@@ -1,4 +1,4 @@
1
- import type { Budget, Era, LanguageVersion, Network, Protocol } from '@meshsdk/core';
1
+ import type { Budget, Era, LanguageVersion, Network, Protocol } from './types';
2
2
  export declare const DEFAULT_REDEEMER_BUDGET: Budget;
3
3
  export declare const DEFAULT_PROTOCOL_PARAMETERS: Protocol;
4
4
  export declare const HARDENED_KEY_START = 2147483648;
@@ -1,2 +1,4 @@
1
1
  export * from './constants';
2
2
  export * from './cip';
3
+ export * from './types';
4
+ export * from './builder';
package/dist/mjs/index.js CHANGED
@@ -1,2 +1,4 @@
1
1
  export * from './constants';
2
2
  export * from './cip';
3
+ export * from './types';
4
+ export * from './builder';
@@ -0,0 +1,5 @@
1
+ export type Account = {
2
+ baseAddress: string;
3
+ enterpriseAddress: string;
4
+ rewardAddress: string;
5
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,7 @@
1
+ export type AccountInfo = {
2
+ active: boolean;
3
+ poolId?: string;
4
+ balance: string;
5
+ rewards: string;
6
+ withdrawals: string;
7
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,12 @@
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
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,7 @@
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[];
@@ -0,0 +1,13 @@
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
+ };
@@ -0,0 +1,8 @@
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
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,24 @@
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 {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,17 @@
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
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ export type Data = string | number | bigint | Array<Data> | Map<Data, Data> | {
2
+ alternative: number;
3
+ fields: Array<Data>;
4
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ export type DataSignature = {
2
+ signature: string;
3
+ key: string;
4
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export type Era = 'ALONZO' | 'BABBAGE';
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,10 @@
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
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,14 @@
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
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
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 {};
@@ -0,0 +1,4 @@
1
+ const ALL_NETWORKS = ['testnet', 'preview', 'preprod', 'mainnet'];
2
+ export const isNetwork = (value) => {
3
+ return ALL_NETWORKS.includes(value);
4
+ };
@@ -0,0 +1,5 @@
1
+ export type PlutusScript = {
2
+ version: LanguageVersion;
3
+ code: string;
4
+ };
5
+ export type LanguageVersion = 'V1' | 'V2';
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,16 @@
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
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,22 @@
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
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,11 @@
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
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,13 @@
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
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ import { SUPPORTED_TOKENS } from '../constants';
2
+ export type Token = keyof typeof SUPPORTED_TOKENS;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,11 @@
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
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,15 @@
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
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ export type Wallet = {
2
+ name: string;
3
+ icon: string;
4
+ version: string;
5
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,22 @@
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';