@helios-lang/effect 0.1.11 → 0.1.13
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/Ledger/Address.js +1 -1
- package/dist/Ledger/Address.js.map +1 -1
- package/dist/Ledger/AssetClass.js +9 -4
- package/dist/Ledger/AssetClass.js.map +1 -1
- package/dist/Ledger/TxHash.js +23 -0
- package/dist/Ledger/TxHash.js.map +1 -0
- package/dist/Ledger/UTxO.js +44 -0
- package/dist/Ledger/UTxO.js.map +1 -0
- package/dist/Ledger/UTxORef.js +55 -0
- package/dist/Ledger/UTxORef.js.map +1 -0
- package/dist/Ledger/index.js +3 -5
- package/dist/Ledger/index.js.map +1 -1
- package/dist/Network/IsMainnet.js +4 -0
- package/dist/Network/IsMainnet.js.map +1 -0
- package/dist/Network/Params.js +42 -0
- package/dist/Network/Params.js.map +1 -0
- package/dist/Network/UTxOsAt.js +4 -0
- package/dist/Network/UTxOsAt.js.map +1 -0
- package/dist/Network/errors.js +16 -0
- package/dist/Network/errors.js.map +1 -0
- package/dist/Network/index.js +5 -0
- package/dist/Network/index.js.map +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/tsconfig.build.tsbuildinfo +1 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/types/Ledger/Address.d.ts +3 -3
- package/types/Ledger/Address.d.ts.map +1 -1
- package/types/Ledger/AssetClass.d.ts +1 -1
- package/types/Ledger/AssetClass.d.ts.map +1 -1
- package/types/Ledger/TxHash.d.ts +70 -0
- package/types/Ledger/TxHash.d.ts.map +1 -0
- package/types/Ledger/UTxO.d.ts +55 -0
- package/types/Ledger/UTxO.d.ts.map +1 -0
- package/types/Ledger/UTxORef.d.ts +133 -0
- package/types/Ledger/UTxORef.d.ts.map +1 -0
- package/types/Ledger/index.d.ts +3 -5
- package/types/Ledger/index.d.ts.map +1 -1
- package/types/Network/IsMainnet.d.ts +6 -0
- package/types/Network/IsMainnet.d.ts.map +1 -0
- package/types/Network/Params.d.ts +45 -0
- package/types/Network/Params.d.ts.map +1 -0
- package/types/Network/UTxOsAt.d.ts +9 -0
- package/types/Network/UTxOsAt.d.ts.map +1 -0
- package/types/Network/errors.d.ts +18 -0
- package/types/Network/errors.d.ts.map +1 -0
- package/types/Network/index.d.ts +5 -0
- package/types/Network/index.d.ts.map +1 -0
- package/types/index.d.ts +1 -0
- package/types/index.d.ts.map +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
2
|
import * as Cbor from "../Cbor.js";
|
|
3
3
|
import * as Bytes from "../internal/Bytes.js";
|
|
4
|
+
import { IsMainnet } from "../Network/IsMainnet.js";
|
|
4
5
|
import { Data } from "../Uplc/index.js";
|
|
5
6
|
import * as Credential from "./Credential.js";
|
|
6
|
-
import { IsMainnet } from "./IsMainnet.js";
|
|
7
7
|
export declare function isValid(addr: string): boolean;
|
|
8
8
|
export declare const Address: Schema.brand<Schema.filter<typeof Schema.String>, "Address">;
|
|
9
9
|
export type Address = Schema.Schema.Type<typeof Address>;
|
|
@@ -78,11 +78,11 @@ export declare const FromUplcData: Schema.transformOrFail<Schema.transformOrFail
|
|
|
78
78
|
readonly fields: readonly Data.Data[];
|
|
79
79
|
readonly constructor: number;
|
|
80
80
|
}, never>, Schema.Option<Schema.Schema<{
|
|
81
|
-
readonly _tag: "PubKey";
|
|
82
81
|
readonly hash: string & import("effect/Brand").Brand<"PubKeyHash">;
|
|
82
|
+
readonly _tag: "PubKey";
|
|
83
83
|
} | {
|
|
84
|
-
readonly _tag: "Validator";
|
|
85
84
|
readonly hash: string & import("effect/Brand").Brand<"ValidatorHash">;
|
|
85
|
+
readonly _tag: "Validator";
|
|
86
86
|
}, {
|
|
87
87
|
readonly bytes: Uint8Array<ArrayBufferLike>;
|
|
88
88
|
} | {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Address.d.ts","sourceRoot":"","sources":["../../src/Ledger/Address.ts"],"names":[],"mappings":"AAAA,OAAO,EAA+B,MAAM,EAAE,MAAM,QAAQ,CAAA;AAE5D,OAAO,KAAK,IAAI,MAAM,YAAY,CAAA;AAClC,OAAO,KAAK,KAAK,MAAM,sBAAsB,CAAA;AAC7C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"Address.d.ts","sourceRoot":"","sources":["../../src/Ledger/Address.ts"],"names":[],"mappings":"AAAA,OAAO,EAA+B,MAAM,EAAE,MAAM,QAAQ,CAAA;AAE5D,OAAO,KAAK,IAAI,MAAM,YAAY,CAAA;AAClC,OAAO,KAAK,KAAK,MAAM,sBAAsB,CAAA;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AACvC,OAAO,KAAK,UAAU,MAAM,iBAAiB,CAAA;AAI7C,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAO7C;AAED,eAAO,MAAM,OAAO,8DAKnB,CAAA;AAED,MAAM,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,OAAO,CAAC,CAAA;AAExD,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oFAiCxB,CAAA;AAED,wBAAgB,IAAI,CAClB,SAAS,EAAE,OAAO,EAClB,kBAAkB,EAAE,UAAU,CAAC,UAAU,EACzC,iBAAiB,CAAC,EAAE,UAAU,CAAC,UAAU,GACxC,OAAO,CAWT;AAkID,eAAO,MAAM,MAAM,GAAI,OAAO,KAAK,CAAC,SAAS,KAAG,IAAI,CAAC,YAAY,CAAC,OAAO,CAiBtE,CAAA;AAEH,wBAAgB,MAAM,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,EAAE,CAEjD;AAED,wBAAgB,KAAK,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,EAAE,CAEhD;AAED,wBAAgB,SAAS,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAEnD;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,UAAU,CAAC,UAAU,CAE1E;AAED,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,OAAO,GACf,UAAU,CAAC,UAAU,GAAG,SAAS,CAEnC"}
|
|
@@ -6,7 +6,7 @@ export declare function isValid(assetClass: string): assetClass is AssetClass;
|
|
|
6
6
|
export declare const AssetClass: Schema.transform<typeof Schema.String, Schema.brand<Schema.filter<typeof Schema.String>, "AssetClass">>;
|
|
7
7
|
export type AssetClass = Schema.Schema.Type<typeof AssetClass>;
|
|
8
8
|
export declare const ADA: AssetClass;
|
|
9
|
-
export declare function make(policy: MintingPolicy.MintingPolicy, tokenName: Bytes.BytesLike): string
|
|
9
|
+
export declare function make(policy: MintingPolicy.MintingPolicy, tokenName: Bytes.BytesLike): string & import("effect/Brand").Brand<"AssetClass">;
|
|
10
10
|
export declare const FromUplcData: Schema.transform<Schema.transformOrFail<Schema.SchemaClass<{
|
|
11
11
|
readonly bytes: Uint8Array<ArrayBufferLike>;
|
|
12
12
|
} | {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssetClass.d.ts","sourceRoot":"","sources":["../../src/Ledger/AssetClass.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,MAAM,EAAE,MAAM,QAAQ,CAAA;AACjD,OAAO,KAAK,KAAK,MAAM,sBAAsB,CAAA;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAC9B,OAAO,KAAK,aAAa,MAAM,oBAAoB,CAAA;AAGnD,wBAAgB,OAAO,CAAC,UAAU,EAAE,MAAM,GAAG,UAAU,IAAI,UAAU,
|
|
1
|
+
{"version":3,"file":"AssetClass.d.ts","sourceRoot":"","sources":["../../src/Ledger/AssetClass.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,MAAM,EAAE,MAAM,QAAQ,CAAA;AACjD,OAAO,KAAK,KAAK,MAAM,sBAAsB,CAAA;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAC9B,OAAO,KAAK,aAAa,MAAM,oBAAoB,CAAA;AAGnD,wBAAgB,OAAO,CAAC,UAAU,EAAE,MAAM,GAAG,UAAU,IAAI,UAAU,CAYpE;AAED,eAAO,MAAM,UAAU,yGAWtB,CAAA;AAED,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,UAAU,CAAC,CAAA;AAE9D,eAAO,MAAM,GAAG,EAAS,UAAU,CAAA;AAEnC,wBAAgB,IAAI,CAClB,MAAM,EAAE,aAAa,CAAC,aAAa,EACnC,SAAS,EAAE,KAAK,CAAC,SAAS,uDAO3B;AAED,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oHAsBxB,CAAA;AAED,wBAAgB,MAAM,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAMjD;AAED,wBAAgB,MAAM,CAAC,UAAU,EAAE,MAAM,GAAG,aAAa,CAAC,aAAa,CAMtE;AAED,wBAAgB,SAAS,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAMpD"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { Effect, Schema } from "effect";
|
|
2
|
+
import * as Bytes from "../internal/Bytes.js";
|
|
3
|
+
import * as Cbor from "../Cbor.js";
|
|
4
|
+
import { Data } from "../Uplc/index.js";
|
|
5
|
+
export declare function isValid(hash: string): hash is TxHash;
|
|
6
|
+
export declare const TxHash: Schema.brand<Schema.filter<typeof Schema.String>, "TxHash">;
|
|
7
|
+
export type TxHash = Schema.Schema.Type<typeof TxHash>;
|
|
8
|
+
export declare const FromUplcData: Schema.transform<Schema.transformOrFail<Schema.SchemaClass<{
|
|
9
|
+
readonly bytes: Uint8Array<ArrayBufferLike>;
|
|
10
|
+
} | {
|
|
11
|
+
readonly int: bigint;
|
|
12
|
+
} | {
|
|
13
|
+
readonly list: readonly Data.Data[];
|
|
14
|
+
} | {
|
|
15
|
+
readonly map: readonly {
|
|
16
|
+
readonly k: Data.Data;
|
|
17
|
+
readonly v: Data.Data;
|
|
18
|
+
}[];
|
|
19
|
+
} | {
|
|
20
|
+
readonly fields: readonly Data.Data[];
|
|
21
|
+
readonly constructor: number;
|
|
22
|
+
}, {
|
|
23
|
+
readonly bytes: Uint8Array<ArrayBufferLike>;
|
|
24
|
+
} | {
|
|
25
|
+
readonly int: bigint;
|
|
26
|
+
} | {
|
|
27
|
+
readonly list: readonly Data.Data[];
|
|
28
|
+
} | {
|
|
29
|
+
readonly map: readonly {
|
|
30
|
+
readonly k: Data.Data;
|
|
31
|
+
readonly v: Data.Data;
|
|
32
|
+
}[];
|
|
33
|
+
} | {
|
|
34
|
+
readonly fields: readonly Data.Data[];
|
|
35
|
+
readonly constructor: number;
|
|
36
|
+
}, never>, Schema.Struct<{
|
|
37
|
+
bytes: Schema.transformOrFail<Schema.SchemaClass<{
|
|
38
|
+
readonly bytes: Uint8Array<ArrayBufferLike>;
|
|
39
|
+
} | {
|
|
40
|
+
readonly int: bigint;
|
|
41
|
+
} | {
|
|
42
|
+
readonly list: readonly Data.Data[];
|
|
43
|
+
} | {
|
|
44
|
+
readonly map: readonly {
|
|
45
|
+
readonly k: Data.Data;
|
|
46
|
+
readonly v: Data.Data;
|
|
47
|
+
}[];
|
|
48
|
+
} | {
|
|
49
|
+
readonly fields: readonly Data.Data[];
|
|
50
|
+
readonly constructor: number;
|
|
51
|
+
}, {
|
|
52
|
+
readonly bytes: Uint8Array<ArrayBufferLike>;
|
|
53
|
+
} | {
|
|
54
|
+
readonly int: bigint;
|
|
55
|
+
} | {
|
|
56
|
+
readonly list: readonly Data.Data[];
|
|
57
|
+
} | {
|
|
58
|
+
readonly map: readonly {
|
|
59
|
+
readonly k: Data.Data;
|
|
60
|
+
readonly v: Data.Data;
|
|
61
|
+
}[];
|
|
62
|
+
} | {
|
|
63
|
+
readonly fields: readonly Data.Data[];
|
|
64
|
+
readonly constructor: number;
|
|
65
|
+
}, never>, typeof Schema.Uint8ArrayFromSelf, never>;
|
|
66
|
+
}>, never>, Schema.brand<Schema.filter<typeof Schema.String>, "TxHash">>;
|
|
67
|
+
export declare function make(txId: Bytes.BytesLike): Effect.Effect<string & import("effect/Brand").Brand<"TxHash">, import("effect/ParseResult").ParseError, never>;
|
|
68
|
+
export declare const decode: (bytes: Bytes.BytesLike) => Cbor.DecodeEffect<TxHash>;
|
|
69
|
+
export declare function encode(txId: TxHash): number[];
|
|
70
|
+
//# sourceMappingURL=TxHash.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TxHash.d.ts","sourceRoot":"","sources":["../../src/Ledger/TxHash.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAY,MAAM,EAAE,MAAM,QAAQ,CAAA;AACjD,OAAO,KAAK,KAAK,MAAM,sBAAsB,CAAA;AAC7C,OAAO,KAAK,IAAI,MAAM,YAAY,CAAA;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAEvC,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,IAAI,MAAM,CAEpD;AAED,eAAO,MAAM,MAAM,6DAGlB,CAAA;AAED,MAAM,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,MAAM,CAAC,CAAA;AAEtD,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wEAUxB,CAAA;AAED,wBAAgB,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,kHAEzC;AAED,eAAO,MAAM,MAAM,GAAI,OAAO,KAAK,CAAC,SAAS,KAAG,IAAI,CAAC,YAAY,CAAC,MAAM,CAOrE,CAAA;AAEH,wBAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAE7C"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import * as Bytes from "../internal/Bytes.js";
|
|
3
|
+
import * as Cbor from "../Cbor.js";
|
|
4
|
+
import * as TxOutput from "./TxOutput.js";
|
|
5
|
+
import * as UTxORef from "./UTxORef.js";
|
|
6
|
+
export declare const UTxO: Schema.TaggedStruct<"UTxO", {
|
|
7
|
+
ref: Schema.transform<typeof Schema.String, Schema.brand<Schema.filter<typeof Schema.String>, "UTxORef">>;
|
|
8
|
+
output: Schema.TaggedStruct<"TxOutput", {
|
|
9
|
+
address: Schema.brand<Schema.filter<typeof Schema.String>, "Address">;
|
|
10
|
+
assets: Schema.filter<Schema.Record$<typeof Schema.String, typeof Schema.BigIntFromSelf>>;
|
|
11
|
+
datum: Schema.optional<Schema.Union<[Schema.TaggedStruct<"Inline", {
|
|
12
|
+
data: Schema.SchemaClass<{
|
|
13
|
+
readonly bytes: Uint8Array<ArrayBufferLike>;
|
|
14
|
+
} | {
|
|
15
|
+
readonly int: bigint;
|
|
16
|
+
} | {
|
|
17
|
+
readonly list: readonly import("../Uplc/Data.js").Data[];
|
|
18
|
+
} | {
|
|
19
|
+
readonly map: readonly {
|
|
20
|
+
readonly k: import("../Uplc/Data.js").Data;
|
|
21
|
+
readonly v: import("../Uplc/Data.js").Data;
|
|
22
|
+
}[];
|
|
23
|
+
} | {
|
|
24
|
+
readonly fields: readonly import("../Uplc/Data.js").Data[];
|
|
25
|
+
readonly constructor: number;
|
|
26
|
+
}, {
|
|
27
|
+
readonly bytes: Uint8Array<ArrayBufferLike>;
|
|
28
|
+
} | {
|
|
29
|
+
readonly int: bigint;
|
|
30
|
+
} | {
|
|
31
|
+
readonly list: readonly import("../Uplc/Data.js").Data[];
|
|
32
|
+
} | {
|
|
33
|
+
readonly map: readonly {
|
|
34
|
+
readonly k: import("../Uplc/Data.js").Data;
|
|
35
|
+
readonly v: import("../Uplc/Data.js").Data;
|
|
36
|
+
}[];
|
|
37
|
+
} | {
|
|
38
|
+
readonly fields: readonly import("../Uplc/Data.js").Data[];
|
|
39
|
+
readonly constructor: number;
|
|
40
|
+
}, never>;
|
|
41
|
+
}>, Schema.TaggedStruct<"Hash", {
|
|
42
|
+
hash: Schema.brand<Schema.filter<typeof Schema.String>, "DatumHash">;
|
|
43
|
+
}>]>>;
|
|
44
|
+
refScript: Schema.optional<typeof Schema.Uint8ArrayFromSelf>;
|
|
45
|
+
encodingConfig: Schema.Struct<{
|
|
46
|
+
strictBabbage: Schema.optional<typeof Schema.Boolean>;
|
|
47
|
+
}>;
|
|
48
|
+
}>;
|
|
49
|
+
}>;
|
|
50
|
+
export type UTxO = Schema.Schema.Type<typeof UTxO>;
|
|
51
|
+
export declare function make(ref: UTxORef.UTxORef, output: TxOutput.TxOutput): UTxO;
|
|
52
|
+
export declare const decode: (bytes: Bytes.BytesLike) => Cbor.DecodeEffect<UTxO | UTxORef.UTxORef>;
|
|
53
|
+
export declare const decodeFull: (bytes: Bytes.BytesLike) => Cbor.DecodeEffect<UTxO>;
|
|
54
|
+
export declare function encode(txInput: UTxO, full?: boolean): number[];
|
|
55
|
+
//# sourceMappingURL=UTxO.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UTxO.d.ts","sourceRoot":"","sources":["../../src/Ledger/UTxO.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,MAAM,EAAE,MAAM,QAAQ,CAAA;AACvC,OAAO,KAAK,KAAK,MAAM,sBAAsB,CAAA;AAC7C,OAAO,KAAK,IAAI,MAAM,YAAY,CAAA;AAClC,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAA;AACzC,OAAO,KAAK,OAAO,MAAM,cAAc,CAAA;AAEvC,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGf,CAAA;AAEF,MAAM,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,IAAI,CAAC,CAAA;AAElD,wBAAgB,IAAI,CAClB,GAAG,EAAE,OAAO,CAAC,OAAO,EACpB,MAAM,EAAE,QAAQ,CAAC,QAAQ,GACxB,IAAI,CAMN;AAED,eAAO,MAAM,MAAM,GAAI,OAAO,KAAK,CAAC,SAAS,KAAG,IAAI,CAAC,YAAY,CAAC,IAAI,GAAG,OAAO,CAAC,OAAO,CAepF,CAAA;AAEJ,eAAO,MAAM,UAAU,GAAI,OAAO,KAAK,CAAC,SAAS,KAAG,IAAI,CAAC,YAAY,CAAC,IAAI,CAGR,CAAA;AAElE,wBAAgB,MAAM,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,GAAE,OAAe,YAS1D"}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import * as Bytes from "../internal/Bytes.js";
|
|
3
|
+
import * as Cbor from "../Cbor.js";
|
|
4
|
+
import * as Uplc from "../Uplc/index.js";
|
|
5
|
+
import * as TxHash from "./TxHash.js";
|
|
6
|
+
export declare function isValid(ref: string): ref is UTxORef;
|
|
7
|
+
export declare const UTxORef: Schema.transform<typeof Schema.String, Schema.brand<Schema.filter<typeof Schema.String>, "UTxORef">>;
|
|
8
|
+
export type UTxORef = Schema.Schema.Type<typeof UTxORef>;
|
|
9
|
+
export declare function make(txHash: TxHash.TxHash, index: number | bigint): UTxORef;
|
|
10
|
+
export declare const FromUplcData: Schema.transform<Schema.transformOrFail<Schema.SchemaClass<{
|
|
11
|
+
readonly bytes: Uint8Array<ArrayBufferLike>;
|
|
12
|
+
} | {
|
|
13
|
+
readonly int: bigint;
|
|
14
|
+
} | {
|
|
15
|
+
readonly list: readonly Uplc.Data.Data[];
|
|
16
|
+
} | {
|
|
17
|
+
readonly map: readonly {
|
|
18
|
+
readonly k: Uplc.Data.Data;
|
|
19
|
+
readonly v: Uplc.Data.Data;
|
|
20
|
+
}[];
|
|
21
|
+
} | {
|
|
22
|
+
readonly fields: readonly Uplc.Data.Data[];
|
|
23
|
+
readonly constructor: number;
|
|
24
|
+
}, {
|
|
25
|
+
readonly bytes: Uint8Array<ArrayBufferLike>;
|
|
26
|
+
} | {
|
|
27
|
+
readonly int: bigint;
|
|
28
|
+
} | {
|
|
29
|
+
readonly list: readonly Uplc.Data.Data[];
|
|
30
|
+
} | {
|
|
31
|
+
readonly map: readonly {
|
|
32
|
+
readonly k: Uplc.Data.Data;
|
|
33
|
+
readonly v: Uplc.Data.Data;
|
|
34
|
+
}[];
|
|
35
|
+
} | {
|
|
36
|
+
readonly fields: readonly Uplc.Data.Data[];
|
|
37
|
+
readonly constructor: number;
|
|
38
|
+
}, never>, Schema.Struct<{
|
|
39
|
+
txHash: Schema.transform<Schema.transformOrFail<Schema.SchemaClass<{
|
|
40
|
+
readonly bytes: Uint8Array<ArrayBufferLike>;
|
|
41
|
+
} | {
|
|
42
|
+
readonly int: bigint;
|
|
43
|
+
} | {
|
|
44
|
+
readonly list: readonly Uplc.Data.Data[];
|
|
45
|
+
} | {
|
|
46
|
+
readonly map: readonly {
|
|
47
|
+
readonly k: Uplc.Data.Data;
|
|
48
|
+
readonly v: Uplc.Data.Data;
|
|
49
|
+
}[];
|
|
50
|
+
} | {
|
|
51
|
+
readonly fields: readonly Uplc.Data.Data[];
|
|
52
|
+
readonly constructor: number;
|
|
53
|
+
}, {
|
|
54
|
+
readonly bytes: Uint8Array<ArrayBufferLike>;
|
|
55
|
+
} | {
|
|
56
|
+
readonly int: bigint;
|
|
57
|
+
} | {
|
|
58
|
+
readonly list: readonly Uplc.Data.Data[];
|
|
59
|
+
} | {
|
|
60
|
+
readonly map: readonly {
|
|
61
|
+
readonly k: Uplc.Data.Data;
|
|
62
|
+
readonly v: Uplc.Data.Data;
|
|
63
|
+
}[];
|
|
64
|
+
} | {
|
|
65
|
+
readonly fields: readonly Uplc.Data.Data[];
|
|
66
|
+
readonly constructor: number;
|
|
67
|
+
}, never>, Schema.Struct<{
|
|
68
|
+
bytes: Schema.transformOrFail<Schema.SchemaClass<{
|
|
69
|
+
readonly bytes: Uint8Array<ArrayBufferLike>;
|
|
70
|
+
} | {
|
|
71
|
+
readonly int: bigint;
|
|
72
|
+
} | {
|
|
73
|
+
readonly list: readonly Uplc.Data.Data[];
|
|
74
|
+
} | {
|
|
75
|
+
readonly map: readonly {
|
|
76
|
+
readonly k: Uplc.Data.Data;
|
|
77
|
+
readonly v: Uplc.Data.Data;
|
|
78
|
+
}[];
|
|
79
|
+
} | {
|
|
80
|
+
readonly fields: readonly Uplc.Data.Data[];
|
|
81
|
+
readonly constructor: number;
|
|
82
|
+
}, {
|
|
83
|
+
readonly bytes: Uint8Array<ArrayBufferLike>;
|
|
84
|
+
} | {
|
|
85
|
+
readonly int: bigint;
|
|
86
|
+
} | {
|
|
87
|
+
readonly list: readonly Uplc.Data.Data[];
|
|
88
|
+
} | {
|
|
89
|
+
readonly map: readonly {
|
|
90
|
+
readonly k: Uplc.Data.Data;
|
|
91
|
+
readonly v: Uplc.Data.Data;
|
|
92
|
+
}[];
|
|
93
|
+
} | {
|
|
94
|
+
readonly fields: readonly Uplc.Data.Data[];
|
|
95
|
+
readonly constructor: number;
|
|
96
|
+
}, never>, typeof Schema.Uint8ArrayFromSelf, never>;
|
|
97
|
+
}>, never>, Schema.brand<Schema.filter<typeof Schema.String>, "TxHash">>;
|
|
98
|
+
index: Schema.transformOrFail<Schema.SchemaClass<{
|
|
99
|
+
readonly bytes: Uint8Array<ArrayBufferLike>;
|
|
100
|
+
} | {
|
|
101
|
+
readonly int: bigint;
|
|
102
|
+
} | {
|
|
103
|
+
readonly list: readonly Uplc.Data.Data[];
|
|
104
|
+
} | {
|
|
105
|
+
readonly map: readonly {
|
|
106
|
+
readonly k: Uplc.Data.Data;
|
|
107
|
+
readonly v: Uplc.Data.Data;
|
|
108
|
+
}[];
|
|
109
|
+
} | {
|
|
110
|
+
readonly fields: readonly Uplc.Data.Data[];
|
|
111
|
+
readonly constructor: number;
|
|
112
|
+
}, {
|
|
113
|
+
readonly bytes: Uint8Array<ArrayBufferLike>;
|
|
114
|
+
} | {
|
|
115
|
+
readonly int: bigint;
|
|
116
|
+
} | {
|
|
117
|
+
readonly list: readonly Uplc.Data.Data[];
|
|
118
|
+
} | {
|
|
119
|
+
readonly map: readonly {
|
|
120
|
+
readonly k: Uplc.Data.Data;
|
|
121
|
+
readonly v: Uplc.Data.Data;
|
|
122
|
+
}[];
|
|
123
|
+
} | {
|
|
124
|
+
readonly fields: readonly Uplc.Data.Data[];
|
|
125
|
+
readonly constructor: number;
|
|
126
|
+
}, never>, typeof Schema.Int, never>;
|
|
127
|
+
}>, never>, Schema.transform<typeof Schema.String, Schema.brand<Schema.filter<typeof Schema.String>, "UTxORef">>>;
|
|
128
|
+
export declare const decode: (bytes: Bytes.BytesLike) => Cbor.DecodeEffect<UTxORef>;
|
|
129
|
+
export declare function encode(ref: UTxORef): number[];
|
|
130
|
+
export declare function pretty(ref: UTxORef): string;
|
|
131
|
+
export declare function txHash(ref: UTxORef): TxHash.TxHash;
|
|
132
|
+
export declare function index(ref: UTxORef): number;
|
|
133
|
+
//# sourceMappingURL=UTxORef.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UTxORef.d.ts","sourceRoot":"","sources":["../../src/Ledger/UTxORef.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,MAAM,EAAE,MAAM,QAAQ,CAAA;AACvC,OAAO,KAAK,KAAK,MAAM,sBAAsB,CAAA;AAC7C,OAAO,KAAK,IAAI,MAAM,YAAY,CAAA;AAClC,OAAO,KAAK,IAAI,MAAM,kBAAkB,CAAA;AACxC,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AAErC,wBAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,IAAI,OAAO,CAanD;AAED,eAAO,MAAM,OAAO,sGAWnB,CAAA;AAED,MAAM,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,OAAO,CAAC,CAAA;AAExD,wBAAgB,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAE3E;AAED,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iHAkBxB,CAAA;AAED,eAAO,MAAM,MAAM,GAAI,OAAO,KAAK,CAAC,SAAS,KAAG,IAAI,CAAC,YAAY,CAAC,OAAO,CAGtE,CAAA;AAEH,wBAAgB,MAAM,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,EAAE,CAK7C;AAED,wBAAgB,MAAM,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAE3C;AAED,wBAAgB,MAAM,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,CAElD;AAED,wBAAgB,KAAK,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAE1C"}
|
package/types/Ledger/index.d.ts
CHANGED
|
@@ -3,14 +3,12 @@ export * as AssetClass from "./AssetClass.js";
|
|
|
3
3
|
export * as Assets from "./Assets.js";
|
|
4
4
|
export * as Credential from "./Credential.js";
|
|
5
5
|
export * as DatumHash from "./DatumHash.js";
|
|
6
|
-
export { IsMainnet } from "./IsMainnet.js";
|
|
7
6
|
export * as MintingPolicy from "./MintingPolicy.js";
|
|
8
|
-
export * as NetworkParams from "./NetworkParams.js";
|
|
9
7
|
export * as PubKeyHash from "./PubKeyHash.js";
|
|
10
|
-
export * as
|
|
11
|
-
export * as
|
|
8
|
+
export * as TxHash from "./TxHash.js";
|
|
9
|
+
export * as UTxO from "./UTxO.js";
|
|
12
10
|
export * as TxOutput from "./TxOutput.js";
|
|
13
11
|
export * as TxOutputDatum from "./TxOutputDatum.js";
|
|
14
|
-
export * as
|
|
12
|
+
export * as UTxORef from "./UTxORef.js";
|
|
15
13
|
export * as ValidatorHash from "./ValidatorHash.js";
|
|
16
14
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Ledger/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,cAAc,CAAA;AACvC,OAAO,KAAK,UAAU,MAAM,iBAAiB,CAAA;AAC7C,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AACrC,OAAO,KAAK,UAAU,MAAM,iBAAiB,CAAA;AAC7C,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAA;AAC3C,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Ledger/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,cAAc,CAAA;AACvC,OAAO,KAAK,UAAU,MAAM,iBAAiB,CAAA;AAC7C,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AACrC,OAAO,KAAK,UAAU,MAAM,iBAAiB,CAAA;AAC7C,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAA;AAC3C,OAAO,KAAK,aAAa,MAAM,oBAAoB,CAAA;AACnD,OAAO,KAAK,UAAU,MAAM,iBAAiB,CAAA;AAC7C,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AACrC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAA;AACjC,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAA;AACzC,OAAO,KAAK,aAAa,MAAM,oBAAoB,CAAA;AACnD,OAAO,KAAK,OAAO,MAAM,cAAc,CAAA;AACvC,OAAO,KAAK,aAAa,MAAM,oBAAoB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IsMainnet.d.ts","sourceRoot":"","sources":["../../src/Network/IsMainnet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAA;;AAEhC,qBAAa,SAAU,SAAQ,cAG5B;CAAG"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Context, Effect, Schema } from "effect";
|
|
2
|
+
import { ConnectionError, UnexpectedFormat } from "./errors.js";
|
|
3
|
+
/**
|
|
4
|
+
* The raw JSON can be downloaded from the following CDN locations:
|
|
5
|
+
*
|
|
6
|
+
* - Preview: [https://network-status.helios-lang.io/preview/config](https://network-status.helios-lang.io/preview/config)
|
|
7
|
+
* - Preprod: [https://network-status.helios-lang.io/preprod/config](https://network-status.helios-lang.io/preprod/config)
|
|
8
|
+
* - Mainnet: [https://network-status.helios-lang.io/mainnet/config](https://network-status.helios-lang.io/mainnet/config)
|
|
9
|
+
*
|
|
10
|
+
* These JSONs are updated every 15 minutes.
|
|
11
|
+
*
|
|
12
|
+
* Only include the minimum fields needed. flattened so it can be extended more easily
|
|
13
|
+
*
|
|
14
|
+
* NetworkParams are a summary of the Era-specific params, relevant for tx building and validation
|
|
15
|
+
*
|
|
16
|
+
* Optionally, NetworkParams returned by a private node can specify a `collateralUTXO` to use (<txID>#<outputIndex> format). Any transaction submitted through that same node will then add the signature necessary to spend the collateral UTXO.
|
|
17
|
+
* This allows the collateral UTXO managed to be done in a central place (i.e. the node).
|
|
18
|
+
*/
|
|
19
|
+
export declare const Params: Schema.Struct<{
|
|
20
|
+
txFeeFixed: typeof Schema.Number;
|
|
21
|
+
txFeePerByte: typeof Schema.Number;
|
|
22
|
+
exMemFeePerUnit: typeof Schema.Number;
|
|
23
|
+
exCpuFeePerUnit: typeof Schema.Number;
|
|
24
|
+
utxoDepositPerByte: typeof Schema.Number;
|
|
25
|
+
refScriptsFeePerByte: typeof Schema.Number;
|
|
26
|
+
collateralPercentage: typeof Schema.Number;
|
|
27
|
+
maxCollateralInputs: typeof Schema.Number;
|
|
28
|
+
maxTxExMem: typeof Schema.Number;
|
|
29
|
+
maxTxExCpu: typeof Schema.Number;
|
|
30
|
+
maxTxSize: typeof Schema.Number;
|
|
31
|
+
secondsPerSlot: typeof Schema.Number;
|
|
32
|
+
stakeAddrDeposit: typeof Schema.Number;
|
|
33
|
+
refTopSlot: typeof Schema.Number;
|
|
34
|
+
refTipTime: typeof Schema.Number;
|
|
35
|
+
costModelParamsV1: Schema.Array$<typeof Schema.Number>;
|
|
36
|
+
costModelParamsV2: Schema.Array$<typeof Schema.Number>;
|
|
37
|
+
costModelParamsV3: Schema.Array$<typeof Schema.Number>;
|
|
38
|
+
collateralUTXO: Schema.optional<Schema.transform<typeof Schema.String, Schema.brand<Schema.filter<typeof Schema.String>, "UTxORef">>>;
|
|
39
|
+
}>;
|
|
40
|
+
export type Params = Schema.Schema.Type<typeof Params>;
|
|
41
|
+
declare const Fetch_base: Context.TagClass<Fetch, "NetworkParamsFetch", () => Effect.Effect<Params, ConnectionError | UnexpectedFormat, never>>;
|
|
42
|
+
export declare class Fetch extends Fetch_base {
|
|
43
|
+
}
|
|
44
|
+
export {};
|
|
45
|
+
//# sourceMappingURL=Params.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Params.d.ts","sourceRoot":"","sources":["../../src/Network/Params.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAEhD,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAE/D;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;EAoBjB,CAAA;AAEF,MAAM,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,MAAM,CAAC,CAAA;8EAI9C,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,eAAe,GAAG,gBAAgB,EAAE,KAAK,CAAC;AAFxE,qBAAa,KAAM,SAAQ,UAGxB;CAAG"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Context, Effect } from "effect";
|
|
2
|
+
import { Address } from "../Ledger/Address.js";
|
|
3
|
+
import { UTxO } from "../Ledger/UTxO.js";
|
|
4
|
+
import { ConnectionError, UnexpectedFormat } from "./errors";
|
|
5
|
+
declare const UTxOsAt_base: Context.TagClass<UTxOsAt, "NetworkUTxOsAt", (address: Address) => Effect.Effect<UTxO[], ConnectionError | UnexpectedFormat>>;
|
|
6
|
+
export declare class UTxOsAt extends UTxOsAt_base {
|
|
7
|
+
}
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=UTxOsAt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UTxOsAt.d.ts","sourceRoot":"","sources":["../../src/Network/UTxOsAt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAA;AACxC,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;kFAI9C,OAAO,KAAK,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,eAAe,GAAG,gBAAgB,CAAC;AAFnF,qBAAa,OAAQ,SAAQ,YAG1B;CAAG"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
declare const ConnectionError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }) => import("effect/Cause").YieldableError & {
|
|
2
|
+
readonly _tag: "CardanoNetworkConnectionError";
|
|
3
|
+
} & Readonly<A>;
|
|
4
|
+
export declare class ConnectionError extends ConnectionError_base<{
|
|
5
|
+
message: string;
|
|
6
|
+
}> {
|
|
7
|
+
constructor(message: string);
|
|
8
|
+
}
|
|
9
|
+
declare const UnexpectedFormat_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }) => import("effect/Cause").YieldableError & {
|
|
10
|
+
readonly _tag: "CardanoNetworkUnexpectedFormat";
|
|
11
|
+
} & Readonly<A>;
|
|
12
|
+
export declare class UnexpectedFormat extends UnexpectedFormat_base<{
|
|
13
|
+
message: string;
|
|
14
|
+
}> {
|
|
15
|
+
constructor(message: string);
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/Network/errors.ts"],"names":[],"mappings":";;;AAEA,qBAAa,eAAgB,SAAQ,qBAAkD;IACnF,OAAO,EAAE,MAAM,CAAA;CAClB,CAAC;gBACc,OAAO,EAAE,MAAM;CAK9B;;;;AAED,qBAAa,gBAAiB,SAAQ,sBAAmD;IACrF,OAAO,EAAE,MAAM,CAAA;CAClB,CAAC;gBACc,OAAO,EAAE,MAAM;CAK9B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Network/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,gBAAgB,CAAA;AAC9B,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AACrC,cAAc,cAAc,CAAA"}
|
package/types/index.d.ts
CHANGED
package/types/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,aAAa,CAAA;AACrC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAA;AACjC,OAAO,KAAK,MAAM,MAAM,UAAU,CAAA;AAClC,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AACrC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAA;AACjC,OAAO,KAAK,MAAM,MAAM,UAAU,CAAA;AAClC,OAAO,KAAK,OAAO,MAAM,WAAW,CAAA;AACpC,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAA"}
|