@helios-lang/effect 0.1.5 → 0.1.7
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/bun.lock +60 -0
- package/dist/Uplc/Data.js +20 -0
- package/dist/Uplc/Data.js.map +1 -1
- package/package.json +1 -1
- package/tsconfig.build.tsbuildinfo +1 -0
- package/tsconfig.check.tsbuildinfo +1 -0
- package/tsconfig.tsbuildinfo +1 -0
- package/types/Address.d.ts +5 -0
- package/types/Address.d.ts.map +1 -0
- package/types/Bech32.d.ts +30 -0
- package/types/Bech32.d.ts.map +1 -0
- package/types/Cbor.d.ts +430 -0
- package/types/Cbor.d.ts.map +1 -0
- package/types/Ledger/Address.d.ts +109 -0
- package/types/Ledger/Address.d.ts.map +1 -0
- package/types/Ledger/AssetClass.d.ts +101 -0
- package/types/Ledger/AssetClass.d.ts.map +1 -0
- package/types/Ledger/Assets.d.ts +70 -0
- package/types/Ledger/Assets.d.ts.map +1 -0
- package/types/Ledger/Credential.d.ts +26 -0
- package/types/Ledger/Credential.d.ts.map +1 -0
- package/types/Ledger/DatumHash.d.ts +40 -0
- package/types/Ledger/DatumHash.d.ts.map +1 -0
- package/types/Ledger/IsMainnet.d.ts +6 -0
- package/types/Ledger/IsMainnet.d.ts.map +1 -0
- package/types/Ledger/MintingPolicy.d.ts +39 -0
- package/types/Ledger/MintingPolicy.d.ts.map +1 -0
- package/{src/Ledger/NetworkParams.ts → types/Ledger/NetworkParams.d.ts} +24 -26
- package/types/Ledger/NetworkParams.d.ts.map +1 -0
- package/types/Ledger/PubKeyHash.d.ts +40 -0
- package/types/Ledger/PubKeyHash.d.ts.map +1 -0
- package/types/Ledger/TxId.d.ts +10 -0
- package/types/Ledger/TxId.d.ts.map +1 -0
- package/types/Ledger/TxInput.d.ts +55 -0
- package/types/Ledger/TxInput.d.ts.map +1 -0
- package/types/Ledger/TxOutput.d.ts +63 -0
- package/types/Ledger/TxOutput.d.ts.map +1 -0
- package/types/Ledger/TxOutputDatum.d.ts +41 -0
- package/types/Ledger/TxOutputDatum.d.ts.map +1 -0
- package/types/Ledger/TxOutputId.d.ts +14 -0
- package/types/Ledger/TxOutputId.d.ts.map +1 -0
- package/types/Ledger/ValidatorHash.d.ts +40 -0
- package/types/Ledger/ValidatorHash.d.ts.map +1 -0
- package/types/Ledger/index.d.ts +16 -0
- package/types/Ledger/index.d.ts.map +1 -0
- package/types/Uplc/Cek.d.ts +72 -0
- package/types/Uplc/Cek.d.ts.map +1 -0
- package/types/Uplc/Data.d.ts +559 -0
- package/types/Uplc/Data.d.ts.map +1 -0
- package/types/Uplc/DataSchema.d.ts +227 -0
- package/types/Uplc/DataSchema.d.ts.map +1 -0
- package/types/Uplc/Primitive.d.ts +26 -0
- package/types/Uplc/Primitive.d.ts.map +1 -0
- package/types/Uplc/index.d.ts +3 -0
- package/types/Uplc/index.d.ts.map +1 -0
- package/types/index.d.ts +5 -0
- package/types/index.d.ts.map +1 -0
- package/types/internal/Base32.d.ts +49 -0
- package/types/internal/Base32.d.ts.map +1 -0
- package/types/internal/BigEndian.d.ts +22 -0
- package/types/internal/BigEndian.d.ts.map +1 -0
- package/types/internal/Bits.d.ts +123 -0
- package/types/internal/Bits.d.ts.map +1 -0
- package/types/internal/Bytes.d.ts +88 -0
- package/types/internal/Bytes.d.ts.map +1 -0
- package/types/internal/Flat.d.ts +71 -0
- package/types/internal/Flat.d.ts.map +1 -0
- package/types/internal/Float.d.ts +38 -0
- package/types/internal/Float.d.ts.map +1 -0
- package/types/internal/Utf8.d.ts +24 -0
- package/types/internal/Utf8.d.ts.map +1 -0
- package/src/Bech32.test.ts +0 -117
- package/src/Bech32.ts +0 -198
- package/src/Cbor.test.ts +0 -1610
- package/src/Cbor.ts +0 -1704
- package/src/Ledger/Address.ts +0 -248
- package/src/Ledger/AssetClass.ts +0 -90
- package/src/Ledger/Assets.ts +0 -164
- package/src/Ledger/Credential.ts +0 -29
- package/src/Ledger/DatumHash.ts +0 -36
- package/src/Ledger/IsMainnet.ts +0 -6
- package/src/Ledger/MintingPolicy.ts +0 -57
- package/src/Ledger/PubKeyHash.ts +0 -36
- package/src/Ledger/TxId.ts +0 -31
- package/src/Ledger/TxInput.test.ts +0 -21
- package/src/Ledger/TxInput.ts +0 -66
- package/src/Ledger/TxOutput.ts +0 -166
- package/src/Ledger/TxOutputDatum.ts +0 -64
- package/src/Ledger/TxOutputId.ts +0 -63
- package/src/Ledger/ValidatorHash.ts +0 -36
- package/src/Ledger/index.ts +0 -15
- package/src/Uplc/Cek.ts +0 -92
- package/src/Uplc/Data.test.ts +0 -321
- package/src/Uplc/Data.ts +0 -657
- package/src/Uplc/Primitive.ts +0 -56
- package/src/Uplc/index.ts +0 -2
- package/src/index.ts +0 -4
- package/src/internal/Base32.test.ts +0 -219
- package/src/internal/Base32.ts +0 -341
- package/src/internal/BigEndian.test.ts +0 -79
- package/src/internal/BigEndian.ts +0 -67
- package/src/internal/Bits.test.ts +0 -300
- package/src/internal/Bits.ts +0 -398
- package/src/internal/Bytes.test.ts +0 -369
- package/src/internal/Bytes.ts +0 -343
- package/src/internal/Flat.test.ts +0 -29
- package/src/internal/Flat.ts +0 -387
- package/src/internal/Float.test.ts +0 -51
- package/src/internal/Float.ts +0 -190
- package/src/internal/Utf8.test.ts +0 -69
- package/src/internal/Utf8.ts +0 -58
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import * as Bytes from "../internal/Bytes.js";
|
|
3
|
+
import * as Cbor from "../Cbor.js";
|
|
4
|
+
import { Data } from "../Uplc";
|
|
5
|
+
import * as AssetClass from "./AssetClass.js";
|
|
6
|
+
export declare const Assets: Schema.filter<Schema.Record$<typeof Schema.String, typeof Schema.BigIntFromSelf>>;
|
|
7
|
+
export type Assets = Schema.Schema.Type<typeof Assets>;
|
|
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.Array$<Schema.Tuple2<Schema.Schema<import("effect/Option").Option<string & import("effect/Brand").Brand<"ValidatorHash">>, {
|
|
37
|
+
readonly bytes: Uint8Array<ArrayBufferLike>;
|
|
38
|
+
} | {
|
|
39
|
+
readonly int: bigint;
|
|
40
|
+
} | {
|
|
41
|
+
readonly list: readonly Data.Data[];
|
|
42
|
+
} | {
|
|
43
|
+
readonly map: readonly {
|
|
44
|
+
readonly k: Data.Data;
|
|
45
|
+
readonly v: Data.Data;
|
|
46
|
+
}[];
|
|
47
|
+
} | {
|
|
48
|
+
readonly fields: readonly Data.Data[];
|
|
49
|
+
readonly constructor: number;
|
|
50
|
+
}, never>, Schema.Schema<readonly (readonly [string, bigint])[], {
|
|
51
|
+
readonly bytes: Uint8Array<ArrayBufferLike>;
|
|
52
|
+
} | {
|
|
53
|
+
readonly int: bigint;
|
|
54
|
+
} | {
|
|
55
|
+
readonly list: readonly Data.Data[];
|
|
56
|
+
} | {
|
|
57
|
+
readonly map: readonly {
|
|
58
|
+
readonly k: Data.Data;
|
|
59
|
+
readonly v: Data.Data;
|
|
60
|
+
}[];
|
|
61
|
+
} | {
|
|
62
|
+
readonly fields: readonly Data.Data[];
|
|
63
|
+
readonly constructor: number;
|
|
64
|
+
}, never>>>, never>, Schema.filter<Schema.Record$<typeof Schema.String, typeof Schema.BigIntFromSelf>>>;
|
|
65
|
+
export declare const decode: (bytes: Bytes.BytesLike) => Cbor.DecodeEffect<Assets>;
|
|
66
|
+
export declare function encode(assets: Assets): number[];
|
|
67
|
+
export declare function allAssetClasses(assets: Assets): AssetClass.AssetClass[];
|
|
68
|
+
export declare function nonAdaAssetClasses(assets: Assets): AssetClass.AssetClass[];
|
|
69
|
+
export declare function lovelace(assets: Assets): bigint;
|
|
70
|
+
//# sourceMappingURL=Assets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Assets.d.ts","sourceRoot":"","sources":["../../src/Ledger/Assets.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,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAC9B,OAAO,KAAK,UAAU,MAAM,iBAAiB,CAAA;AAG7C,eAAO,MAAM,MAAM,mFAalB,CAAA;AAED,MAAM,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,MAAM,CAAC,CAAA;AAEtD,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uGA+BxB,CAAA;AA4BD,eAAO,MAAM,MAAM,GAAI,OAAO,KAAK,CAAC,SAAS,KAAG,IAAI,CAAC,YAAY,CAAC,MAAM,CAsCpE,CAAA;AAEJ,wBAAgB,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CA4B/C;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,UAAU,CAAC,UAAU,EAAE,CAEvE;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,UAAU,CAAC,UAAU,EAAE,CAE1E;AAED,wBAAgB,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAE/C"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import { Data } from "../Uplc";
|
|
3
|
+
import { PubKeyHash } from "./PubKeyHash.js";
|
|
4
|
+
import { ValidatorHash } from "./ValidatorHash.js";
|
|
5
|
+
export declare const Credential: Schema.Union<[Schema.TaggedStruct<"PubKey", {
|
|
6
|
+
hash: Schema.brand<Schema.filter<typeof Schema.String>, "PubKeyHash">;
|
|
7
|
+
}>, Schema.TaggedStruct<"Validator", {
|
|
8
|
+
hash: Schema.brand<Schema.filter<typeof Schema.String>, "ValidatorHash">;
|
|
9
|
+
}>]>;
|
|
10
|
+
export type Credential = Schema.Schema.Type<typeof Credential>;
|
|
11
|
+
export declare function makePubKey(pkh: PubKeyHash): Credential;
|
|
12
|
+
export declare function makeValidator(vh: ValidatorHash): Credential;
|
|
13
|
+
export declare const FromUplcData: Schema.transform<Schema.Schema<({
|
|
14
|
+
_tag: "PubKey";
|
|
15
|
+
} & {
|
|
16
|
+
hash: string;
|
|
17
|
+
}) | ({
|
|
18
|
+
_tag: "Validator";
|
|
19
|
+
} & {
|
|
20
|
+
hash: string;
|
|
21
|
+
}), Data.Data, never>, Schema.Union<[Schema.TaggedStruct<"PubKey", {
|
|
22
|
+
hash: Schema.brand<Schema.filter<typeof Schema.String>, "PubKeyHash">;
|
|
23
|
+
}>, Schema.TaggedStruct<"Validator", {
|
|
24
|
+
hash: Schema.brand<Schema.filter<typeof Schema.String>, "ValidatorHash">;
|
|
25
|
+
}>]>>;
|
|
26
|
+
//# sourceMappingURL=Credential.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Credential.d.ts","sourceRoot":"","sources":["../../src/Ledger/Credential.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAC/B,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAC9B,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAElD,eAAO,MAAM,UAAU;;;;IAGtB,CAAA;AAED,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,UAAU,CAAC,CAAA;AAE9D,wBAAgB,UAAU,CAAC,GAAG,EAAE,UAAU,GAAG,UAAU,CAEtD;AAED,wBAAgB,aAAa,CAAC,EAAE,EAAE,aAAa,GAAG,UAAU,CAE3D;AAED,eAAO,MAAM,YAAY;;;;;;;;;;;;KAQxB,CAAA"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Effect, Schema } from "effect";
|
|
2
|
+
import * as Bytes from "../internal/Bytes.js";
|
|
3
|
+
import { DecodeEffect } from "../Cbor.js";
|
|
4
|
+
import { Data } from "../Uplc";
|
|
5
|
+
export declare function isValid(dh: string): boolean;
|
|
6
|
+
export declare const DatumHash: Schema.brand<Schema.filter<typeof Schema.String>, "DatumHash">;
|
|
7
|
+
export type DatumHash = Schema.Schema.Type<typeof DatumHash>;
|
|
8
|
+
export declare function make(bytes: Bytes.BytesLike): Effect.Effect<string & import("effect/Brand").Brand<"DatumHash">, import("effect/ParseResult").ParseError, never>;
|
|
9
|
+
export declare const FromUplcData: Schema.transform<Schema.transformOrFail<Schema.SchemaClass<{
|
|
10
|
+
readonly bytes: Uint8Array<ArrayBufferLike>;
|
|
11
|
+
} | {
|
|
12
|
+
readonly int: bigint;
|
|
13
|
+
} | {
|
|
14
|
+
readonly list: readonly Data.Data[];
|
|
15
|
+
} | {
|
|
16
|
+
readonly map: readonly {
|
|
17
|
+
readonly k: Data.Data;
|
|
18
|
+
readonly v: Data.Data;
|
|
19
|
+
}[];
|
|
20
|
+
} | {
|
|
21
|
+
readonly fields: readonly Data.Data[];
|
|
22
|
+
readonly constructor: number;
|
|
23
|
+
}, {
|
|
24
|
+
readonly bytes: Uint8Array<ArrayBufferLike>;
|
|
25
|
+
} | {
|
|
26
|
+
readonly int: bigint;
|
|
27
|
+
} | {
|
|
28
|
+
readonly list: readonly Data.Data[];
|
|
29
|
+
} | {
|
|
30
|
+
readonly map: readonly {
|
|
31
|
+
readonly k: Data.Data;
|
|
32
|
+
readonly v: Data.Data;
|
|
33
|
+
}[];
|
|
34
|
+
} | {
|
|
35
|
+
readonly fields: readonly Data.Data[];
|
|
36
|
+
readonly constructor: number;
|
|
37
|
+
}, never>, typeof Schema.Uint8ArrayFromSelf, never>, Schema.brand<Schema.filter<typeof Schema.String>, "DatumHash">>;
|
|
38
|
+
export declare const decode: (bytes: Bytes.BytesLike) => DecodeEffect<DatumHash>;
|
|
39
|
+
export declare function encode(dh: DatumHash): number[];
|
|
40
|
+
//# sourceMappingURL=DatumHash.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DatumHash.d.ts","sourceRoot":"","sources":["../../src/Ledger/DatumHash.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAY,MAAM,EAAE,MAAM,QAAQ,CAAA;AACjD,OAAO,KAAK,KAAK,MAAM,sBAAsB,CAAA;AAC7C,OAAO,EAAe,YAAY,EAAe,MAAM,YAAY,CAAA;AACnE,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAE9B,wBAAgB,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAE3C;AAED,eAAO,MAAM,SAAS,gEAGrB,CAAA;AAED,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,SAAS,CAAC,CAAA;AAE5D,wBAAgB,IAAI,CAAC,KAAK,EAAE,KAAK,CAAC,SAAS,qHAE1C;AAED,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;oHAIvB,CAAA;AAEF,eAAO,MAAM,MAAM,GAAI,OAAO,KAAK,CAAC,SAAS,KAAG,YAAY,CAAC,SAAS,CAKnE,CAAA;AAEH,wBAAgB,MAAM,CAAC,EAAE,EAAE,SAAS,GAAG,MAAM,EAAE,CAE9C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IsMainnet.d.ts","sourceRoot":"","sources":["../../src/Ledger/IsMainnet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAA;;AAEhC,qBAAa,SAAU,SAAQ,cAG5B;CAAG"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Effect, Option, Schema } from "effect";
|
|
2
|
+
import * as Bytes from "../internal/Bytes.js";
|
|
3
|
+
import * as Cbor from "../Cbor.js";
|
|
4
|
+
import { Data } from "../Uplc";
|
|
5
|
+
export declare const MintingPolicy: Schema.Option<Schema.brand<Schema.filter<typeof Schema.String>, "ValidatorHash">>;
|
|
6
|
+
export type MintingPolicy = Schema.Schema.Type<typeof MintingPolicy>;
|
|
7
|
+
export declare const FromUplcData: Schema.transform<Schema.transformOrFail<Schema.SchemaClass<{
|
|
8
|
+
readonly bytes: Uint8Array<ArrayBufferLike>;
|
|
9
|
+
} | {
|
|
10
|
+
readonly int: bigint;
|
|
11
|
+
} | {
|
|
12
|
+
readonly list: readonly Data.Data[];
|
|
13
|
+
} | {
|
|
14
|
+
readonly map: readonly {
|
|
15
|
+
readonly k: Data.Data;
|
|
16
|
+
readonly v: Data.Data;
|
|
17
|
+
}[];
|
|
18
|
+
} | {
|
|
19
|
+
readonly fields: readonly Data.Data[];
|
|
20
|
+
readonly constructor: number;
|
|
21
|
+
}, {
|
|
22
|
+
readonly bytes: Uint8Array<ArrayBufferLike>;
|
|
23
|
+
} | {
|
|
24
|
+
readonly int: bigint;
|
|
25
|
+
} | {
|
|
26
|
+
readonly list: readonly Data.Data[];
|
|
27
|
+
} | {
|
|
28
|
+
readonly map: readonly {
|
|
29
|
+
readonly k: Data.Data;
|
|
30
|
+
readonly v: Data.Data;
|
|
31
|
+
}[];
|
|
32
|
+
} | {
|
|
33
|
+
readonly fields: readonly Data.Data[];
|
|
34
|
+
readonly constructor: number;
|
|
35
|
+
}, never>, typeof Schema.Uint8ArrayFromSelf, never>, Schema.Option<Schema.brand<Schema.filter<typeof Schema.String>, "ValidatorHash">>>;
|
|
36
|
+
export declare function make(policy: Bytes.BytesLike): Effect.Effect<Option.Option<string & import("effect/Brand").Brand<"ValidatorHash">>, import("effect/ParseResult").ParseError, never>;
|
|
37
|
+
export declare const decode: (bytes: Bytes.BytesLike) => Cbor.DecodeEffect<MintingPolicy>;
|
|
38
|
+
export declare function encode(policy: MintingPolicy): number[];
|
|
39
|
+
//# sourceMappingURL=MintingPolicy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MintingPolicy.d.ts","sourceRoot":"","sources":["../../src/Ledger/MintingPolicy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAY,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AACzD,OAAO,KAAK,KAAK,MAAM,sBAAsB,CAAA;AAC7C,OAAO,KAAK,IAAI,MAAM,YAAY,CAAA;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAI9B,eAAO,MAAM,aAAa,mFAA6C,CAAA;AAEvE,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,aAAa,CAAC,CAAA;AAEpE,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;uIAgBvB,CAAA;AAEF,wBAAgB,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,SAAS,wIAQ3C;AAED,eAAO,MAAM,MAAM,GACjB,OAAO,KAAK,CAAC,SAAS,KACrB,IAAI,CAAC,YAAY,CAAC,aAAa,CAO/B,CAAA;AAEH,wBAAgB,MAAM,CAAC,MAAM,EAAE,aAAa,GAAG,MAAM,EAAE,CAMtD"}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { Schema } from "effect"
|
|
2
|
-
import * as TxOutputId from "./TxOutputId.js"
|
|
3
|
-
|
|
1
|
+
import { Schema } from "effect";
|
|
4
2
|
/**
|
|
5
3
|
* The raw JSON can be downloaded from the following CDN locations:
|
|
6
4
|
*
|
|
@@ -17,26 +15,26 @@ import * as TxOutputId from "./TxOutputId.js"
|
|
|
17
15
|
* 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.
|
|
18
16
|
* This allows the collateral UTXO managed to be done in a central place (i.e. the node).
|
|
19
17
|
*/
|
|
20
|
-
export const NetworkParams
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
|
|
18
|
+
export declare const NetworkParams: Schema.Struct<{
|
|
19
|
+
txFeeFixed: typeof Schema.Number;
|
|
20
|
+
txFeePerByte: typeof Schema.Number;
|
|
21
|
+
exMemFeePerUnit: typeof Schema.Number;
|
|
22
|
+
exCpuFeePerUnit: typeof Schema.Number;
|
|
23
|
+
utxoDepositPerByte: typeof Schema.Number;
|
|
24
|
+
refScriptsFeePerByte: typeof Schema.Number;
|
|
25
|
+
collateralPercentage: typeof Schema.Number;
|
|
26
|
+
maxCollateralInputs: typeof Schema.Number;
|
|
27
|
+
maxTxExMem: typeof Schema.Number;
|
|
28
|
+
maxTxExCpu: typeof Schema.Number;
|
|
29
|
+
maxTxSize: typeof Schema.Number;
|
|
30
|
+
secondsPerSlot: typeof Schema.Number;
|
|
31
|
+
stakeAddrDeposit: typeof Schema.Number;
|
|
32
|
+
refTopSlot: typeof Schema.Number;
|
|
33
|
+
refTipTime: typeof Schema.Number;
|
|
34
|
+
costModelParamsV1: Schema.Array$<typeof Schema.Number>;
|
|
35
|
+
costModelParamsV2: Schema.Array$<typeof Schema.Number>;
|
|
36
|
+
costModelParamsV3: Schema.Array$<typeof Schema.Number>;
|
|
37
|
+
collateralUTXO: Schema.optional<Schema.transform<typeof Schema.String, Schema.brand<Schema.filter<typeof Schema.String>, "TxOutputId">>>;
|
|
38
|
+
}>;
|
|
39
|
+
export type NetworkParams = Schema.Schema.Type<typeof NetworkParams>;
|
|
40
|
+
//# sourceMappingURL=NetworkParams.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NetworkParams.d.ts","sourceRoot":"","sources":["../../src/Ledger/NetworkParams.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAG/B;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;EAoBxB,CAAA;AAEF,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,aAAa,CAAC,CAAA"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Effect, Schema } from "effect";
|
|
2
|
+
import * as Bytes from "../internal/Bytes.js";
|
|
3
|
+
import { DecodeEffect } from "../Cbor.js";
|
|
4
|
+
import { Data } from "../Uplc";
|
|
5
|
+
export declare function isValid(pkh: string): pkh is PubKeyHash;
|
|
6
|
+
export declare const PubKeyHash: Schema.brand<Schema.filter<typeof Schema.String>, "PubKeyHash">;
|
|
7
|
+
export type PubKeyHash = Schema.Schema.Type<typeof PubKeyHash>;
|
|
8
|
+
export declare function make(bytes: Bytes.BytesLike): Effect.Effect<string & import("effect/Brand").Brand<"PubKeyHash">, import("effect/ParseResult").ParseError, never>;
|
|
9
|
+
export declare const FromUplcData: Schema.transform<Schema.transformOrFail<Schema.SchemaClass<{
|
|
10
|
+
readonly bytes: Uint8Array<ArrayBufferLike>;
|
|
11
|
+
} | {
|
|
12
|
+
readonly int: bigint;
|
|
13
|
+
} | {
|
|
14
|
+
readonly list: readonly Data.Data[];
|
|
15
|
+
} | {
|
|
16
|
+
readonly map: readonly {
|
|
17
|
+
readonly k: Data.Data;
|
|
18
|
+
readonly v: Data.Data;
|
|
19
|
+
}[];
|
|
20
|
+
} | {
|
|
21
|
+
readonly fields: readonly Data.Data[];
|
|
22
|
+
readonly constructor: number;
|
|
23
|
+
}, {
|
|
24
|
+
readonly bytes: Uint8Array<ArrayBufferLike>;
|
|
25
|
+
} | {
|
|
26
|
+
readonly int: bigint;
|
|
27
|
+
} | {
|
|
28
|
+
readonly list: readonly Data.Data[];
|
|
29
|
+
} | {
|
|
30
|
+
readonly map: readonly {
|
|
31
|
+
readonly k: Data.Data;
|
|
32
|
+
readonly v: Data.Data;
|
|
33
|
+
}[];
|
|
34
|
+
} | {
|
|
35
|
+
readonly fields: readonly Data.Data[];
|
|
36
|
+
readonly constructor: number;
|
|
37
|
+
}, never>, typeof Schema.Uint8ArrayFromSelf, never>, Schema.brand<Schema.filter<typeof Schema.String>, "PubKeyHash">>;
|
|
38
|
+
export declare const decode: (bytes: Bytes.BytesLike) => DecodeEffect<PubKeyHash>;
|
|
39
|
+
export declare function encode(pkh: PubKeyHash): number[];
|
|
40
|
+
//# sourceMappingURL=PubKeyHash.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PubKeyHash.d.ts","sourceRoot":"","sources":["../../src/Ledger/PubKeyHash.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAY,MAAM,EAAE,MAAM,QAAQ,CAAA;AACjD,OAAO,KAAK,KAAK,MAAM,sBAAsB,CAAA;AAC7C,OAAO,EAAe,YAAY,EAAe,MAAM,YAAY,CAAA;AACnE,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAE9B,wBAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,IAAI,UAAU,CAEtD;AAED,eAAO,MAAM,UAAU,iEAGtB,CAAA;AAED,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,UAAU,CAAC,CAAA;AAE9D,wBAAgB,IAAI,CAAC,KAAK,EAAE,KAAK,CAAC,SAAS,sHAE1C;AAED,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;qHAIvB,CAAA;AAEF,eAAO,MAAM,MAAM,GAAI,OAAO,KAAK,CAAC,SAAS,KAAG,YAAY,CAAC,UAAU,CAKpE,CAAA;AAEH,wBAAgB,MAAM,CAAC,GAAG,EAAE,UAAU,GAAG,MAAM,EAAE,CAEhD"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Effect, Schema } from "effect";
|
|
2
|
+
import * as Bytes from "../internal/Bytes.js";
|
|
3
|
+
import * as Cbor from "../Cbor.js";
|
|
4
|
+
export declare function isValid(txId: string): txId is TxId;
|
|
5
|
+
export declare const TxId: Schema.brand<Schema.filter<typeof Schema.String>, "TxId">;
|
|
6
|
+
export type TxId = Schema.Schema.Type<typeof TxId>;
|
|
7
|
+
export declare function make(txId: Bytes.BytesLike): Effect.Effect<string & import("effect/Brand").Brand<"TxId">, import("effect/ParseResult").ParseError, never>;
|
|
8
|
+
export declare const decode: (bytes: Bytes.BytesLike) => Cbor.DecodeEffect<TxId>;
|
|
9
|
+
export declare function encode(txId: TxId): number[];
|
|
10
|
+
//# sourceMappingURL=TxId.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TxId.d.ts","sourceRoot":"","sources":["../../src/Ledger/TxId.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AACvC,OAAO,KAAK,KAAK,MAAM,sBAAsB,CAAA;AAC7C,OAAO,KAAK,IAAI,MAAM,YAAY,CAAA;AAElC,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,IAAI,IAAI,CAElD;AAED,eAAO,MAAM,IAAI,2DAGhB,CAAA;AAED,MAAM,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,IAAI,CAAC,CAAA;AAElD,wBAAgB,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,gHAEzC;AAED,eAAO,MAAM,MAAM,GAAI,OAAO,KAAK,CAAC,SAAS,KAAG,IAAI,CAAC,YAAY,CAAC,IAAI,CAOnE,CAAA;AAEH,wBAAgB,MAAM,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,EAAE,CAE3C"}
|
|
@@ -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 TxOutputId from "./TxOutputId.js";
|
|
6
|
+
export declare const TxInput: Schema.TaggedStruct<"TxInput", {
|
|
7
|
+
id: Schema.transform<typeof Schema.String, Schema.brand<Schema.filter<typeof Schema.String>, "TxOutputId">>;
|
|
8
|
+
output: Schema.optional<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 TxInput = Schema.Schema.Type<typeof TxInput>;
|
|
51
|
+
export declare function make(id: TxOutputId.TxOutputId, output?: TxOutput.TxOutput | undefined): TxInput;
|
|
52
|
+
export declare const decode: (bytes: Bytes.BytesLike) => Cbor.DecodeEffect<TxInput>;
|
|
53
|
+
export declare function encode(txInput: TxInput, full?: boolean): number[];
|
|
54
|
+
export declare function output(txInput: TxInput): TxOutput.TxOutput;
|
|
55
|
+
//# sourceMappingURL=TxInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TxInput.d.ts","sourceRoot":"","sources":["../../src/Ledger/TxInput.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,UAAU,MAAM,iBAAiB,CAAA;AAE7C,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGlB,CAAA;AAEF,MAAM,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,OAAO,CAAC,CAAA;AAExD,wBAAgB,IAAI,CAClB,EAAE,EAAE,UAAU,CAAC,UAAU,EACzB,MAAM,GAAE,QAAQ,CAAC,QAAQ,GAAG,SAAqB,GAChD,OAAO,CAMT;AAED,eAAO,MAAM,MAAM,GAAI,OAAO,KAAK,CAAC,SAAS,KAAG,IAAI,CAAC,YAAY,CAAC,OAAO,CAsBrE,CAAA;AAEJ,wBAAgB,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,GAAE,OAAe,YAS7D;AAED,wBAAgB,MAAM,CAAC,OAAO,EAAE,OAAO,GAAG,QAAQ,CAAC,QAAQ,CAM1D"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import * as Bytes from "../internal/Bytes.js";
|
|
3
|
+
import * as Cbor from "../Cbor.js";
|
|
4
|
+
import * as Address from "./Address.js";
|
|
5
|
+
import * as Assets from "./Assets.js";
|
|
6
|
+
import * as TxOutputDatum from "./TxOutputDatum.js";
|
|
7
|
+
export declare const TxOutputEncodingConfig: Schema.Struct<{
|
|
8
|
+
strictBabbage: Schema.optional<typeof Schema.Boolean>;
|
|
9
|
+
}>;
|
|
10
|
+
export type TxOutputEncodingConfig = Schema.Schema.Type<typeof TxOutputEncodingConfig>;
|
|
11
|
+
export declare const DEFAULT_TX_OUTPUT_ENCODING_CONFIG: TxOutputEncodingConfig;
|
|
12
|
+
export declare const TxOutput: Schema.TaggedStruct<"TxOutput", {
|
|
13
|
+
address: Schema.brand<Schema.filter<typeof Schema.String>, "Address">;
|
|
14
|
+
assets: Schema.filter<Schema.Record$<typeof Schema.String, typeof Schema.BigIntFromSelf>>;
|
|
15
|
+
datum: Schema.optional<Schema.Union<[Schema.TaggedStruct<"Inline", {
|
|
16
|
+
data: Schema.SchemaClass<{
|
|
17
|
+
readonly bytes: Uint8Array<ArrayBufferLike>;
|
|
18
|
+
} | {
|
|
19
|
+
readonly int: bigint;
|
|
20
|
+
} | {
|
|
21
|
+
readonly list: readonly import("../Uplc/Data.js").Data[];
|
|
22
|
+
} | {
|
|
23
|
+
readonly map: readonly {
|
|
24
|
+
readonly k: import("../Uplc/Data.js").Data;
|
|
25
|
+
readonly v: import("../Uplc/Data.js").Data;
|
|
26
|
+
}[];
|
|
27
|
+
} | {
|
|
28
|
+
readonly fields: readonly import("../Uplc/Data.js").Data[];
|
|
29
|
+
readonly constructor: number;
|
|
30
|
+
}, {
|
|
31
|
+
readonly bytes: Uint8Array<ArrayBufferLike>;
|
|
32
|
+
} | {
|
|
33
|
+
readonly int: bigint;
|
|
34
|
+
} | {
|
|
35
|
+
readonly list: readonly import("../Uplc/Data.js").Data[];
|
|
36
|
+
} | {
|
|
37
|
+
readonly map: readonly {
|
|
38
|
+
readonly k: import("../Uplc/Data.js").Data;
|
|
39
|
+
readonly v: import("../Uplc/Data.js").Data;
|
|
40
|
+
}[];
|
|
41
|
+
} | {
|
|
42
|
+
readonly fields: readonly import("../Uplc/Data.js").Data[];
|
|
43
|
+
readonly constructor: number;
|
|
44
|
+
}, never>;
|
|
45
|
+
}>, Schema.TaggedStruct<"Hash", {
|
|
46
|
+
hash: Schema.brand<Schema.filter<typeof Schema.String>, "DatumHash">;
|
|
47
|
+
}>]>>;
|
|
48
|
+
refScript: Schema.optional<typeof Schema.Uint8ArrayFromSelf>;
|
|
49
|
+
encodingConfig: Schema.Struct<{
|
|
50
|
+
strictBabbage: Schema.optional<typeof Schema.Boolean>;
|
|
51
|
+
}>;
|
|
52
|
+
}>;
|
|
53
|
+
export type TxOutput = Schema.Schema.Type<typeof TxOutput>;
|
|
54
|
+
export declare function make({ address, assets, datum, refScript, encodingConfig }: {
|
|
55
|
+
address: Address.Address;
|
|
56
|
+
assets: Assets.Assets;
|
|
57
|
+
datum?: TxOutputDatum.TxOutputDatum;
|
|
58
|
+
refScript?: Uint8Array;
|
|
59
|
+
encodingConfig?: TxOutputEncodingConfig;
|
|
60
|
+
}): TxOutput;
|
|
61
|
+
export declare const decode: (bytes: Bytes.BytesLike) => Cbor.DecodeEffect<TxOutput>;
|
|
62
|
+
export declare function encode(txOutput: TxOutput): number[];
|
|
63
|
+
//# sourceMappingURL=TxOutput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TxOutput.d.ts","sourceRoot":"","sources":["../../src/Ledger/TxOutput.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,OAAO,MAAM,cAAc,CAAA;AACvC,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AAErC,OAAO,KAAK,aAAa,MAAM,oBAAoB,CAAA;AAEnD,eAAO,MAAM,sBAAsB;;EAEjC,CAAA;AAEF,MAAM,MAAM,sBAAsB,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CACrD,OAAO,sBAAsB,CAC9B,CAAA;AAED,eAAO,MAAM,iCAAiC,EAAE,sBAE/C,CAAA;AAGD,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQnB,CAAA;AAEF,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,QAAQ,CAAC,CAAA;AAE1D,wBAAgB,IAAI,CAAC,EACnB,OAAO,EACP,MAAM,EACN,KAAiB,EACjB,SAAqB,EACrB,cAAkD,EACnD,EAAE;IACD,OAAO,EAAE,OAAO,CAAC,OAAO,CAAA;IACxB,MAAM,EAAE,MAAM,CAAC,MAAM,CAAA;IACrB,KAAK,CAAC,EAAE,aAAa,CAAC,aAAa,CAAA;IACnC,SAAS,CAAC,EAAE,UAAU,CAAA;IACtB,cAAc,CAAC,EAAE,sBAAsB,CAAA;CACxC,GAAG,QAAQ,CASX;AAED,eAAO,MAAM,MAAM,GAAI,OAAO,KAAK,CAAC,SAAS,KAAG,IAAI,CAAC,YAAY,CAAC,QAAQ,CA0DtE,CAAA;AAEJ,wBAAgB,MAAM,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM,EAAE,CAiDnD"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import * as Bytes from "../internal/Bytes.js";
|
|
3
|
+
import * as Cbor from "../Cbor.js";
|
|
4
|
+
import { Data } from "../Uplc";
|
|
5
|
+
export declare const TxOutputDatum: Schema.Union<[Schema.TaggedStruct<"Inline", {
|
|
6
|
+
data: Schema.SchemaClass<{
|
|
7
|
+
readonly bytes: Uint8Array<ArrayBufferLike>;
|
|
8
|
+
} | {
|
|
9
|
+
readonly int: bigint;
|
|
10
|
+
} | {
|
|
11
|
+
readonly list: readonly Data.Data[];
|
|
12
|
+
} | {
|
|
13
|
+
readonly map: readonly {
|
|
14
|
+
readonly k: Data.Data;
|
|
15
|
+
readonly v: Data.Data;
|
|
16
|
+
}[];
|
|
17
|
+
} | {
|
|
18
|
+
readonly fields: readonly Data.Data[];
|
|
19
|
+
readonly constructor: number;
|
|
20
|
+
}, {
|
|
21
|
+
readonly bytes: Uint8Array<ArrayBufferLike>;
|
|
22
|
+
} | {
|
|
23
|
+
readonly int: bigint;
|
|
24
|
+
} | {
|
|
25
|
+
readonly list: readonly Data.Data[];
|
|
26
|
+
} | {
|
|
27
|
+
readonly map: readonly {
|
|
28
|
+
readonly k: Data.Data;
|
|
29
|
+
readonly v: Data.Data;
|
|
30
|
+
}[];
|
|
31
|
+
} | {
|
|
32
|
+
readonly fields: readonly Data.Data[];
|
|
33
|
+
readonly constructor: number;
|
|
34
|
+
}, never>;
|
|
35
|
+
}>, Schema.TaggedStruct<"Hash", {
|
|
36
|
+
hash: Schema.brand<Schema.filter<typeof Schema.String>, "DatumHash">;
|
|
37
|
+
}>]>;
|
|
38
|
+
export type TxOutputDatum = Schema.Schema.Type<typeof TxOutputDatum>;
|
|
39
|
+
export declare const decode: (bytes: Bytes.BytesLike) => Cbor.DecodeEffect<TxOutputDatum>;
|
|
40
|
+
export declare function encode(txOutputDatum: TxOutputDatum): number[];
|
|
41
|
+
//# sourceMappingURL=TxOutputDatum.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TxOutputDatum.d.ts","sourceRoot":"","sources":["../../src/Ledger/TxOutputDatum.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,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAG9B,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAGzB,CAAA;AAED,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,aAAa,CAAC,CAAA;AAEpE,eAAO,MAAM,MAAM,GACjB,OAAO,KAAK,CAAC,SAAS,KACrB,IAAI,CAAC,YAAY,CAAC,aAAa,CA+B9B,CAAA;AAEJ,wBAAgB,MAAM,CAAC,aAAa,EAAE,aAAa,GAAG,MAAM,EAAE,CAe7D"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import * as Bytes from "../internal/Bytes.js";
|
|
3
|
+
import * as Cbor from "../Cbor.js";
|
|
4
|
+
import * as TxId from "./TxId.js";
|
|
5
|
+
export declare function isValid(txOutputId: string): txOutputId is TxOutputId;
|
|
6
|
+
export declare const TxOutputId: Schema.transform<typeof Schema.String, Schema.brand<Schema.filter<typeof Schema.String>, "TxOutputId">>;
|
|
7
|
+
export type TxOutputId = Schema.Schema.Type<typeof TxOutputId>;
|
|
8
|
+
export declare function make(txId: TxId.TxId, utxoIdx: number | bigint): TxOutputId;
|
|
9
|
+
export declare const decode: (bytes: Bytes.BytesLike) => Cbor.DecodeEffect<TxOutputId>;
|
|
10
|
+
export declare function encode(txOutputId: TxOutputId): number[];
|
|
11
|
+
export declare function pretty(txOutputId: TxOutputId): string;
|
|
12
|
+
export declare function txId(txOutputId: TxOutputId): TxId.TxId;
|
|
13
|
+
export declare function utxoIdx(txOutputId: TxOutputId): number;
|
|
14
|
+
//# sourceMappingURL=TxOutputId.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TxOutputId.d.ts","sourceRoot":"","sources":["../../src/Ledger/TxOutputId.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,WAAW,CAAA;AAEjC,wBAAgB,OAAO,CAAC,UAAU,EAAE,MAAM,GAAG,UAAU,IAAI,UAAU,CAcpE;AAED,eAAO,MAAM,UAAU,yGAWtB,CAAA;AAED,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,UAAU,CAAC,CAAA;AAE9D,wBAAgB,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,UAAU,CAE1E;AAED,eAAO,MAAM,MAAM,GAAI,OAAO,KAAK,CAAC,SAAS,KAAG,IAAI,CAAC,YAAY,CAAC,UAAU,CAGzE,CAAA;AAEH,wBAAgB,MAAM,CAAC,UAAU,EAAE,UAAU,GAAG,MAAM,EAAE,CAKvD;AAED,wBAAgB,MAAM,CAAC,UAAU,EAAE,UAAU,GAAG,MAAM,CAErD;AAED,wBAAgB,IAAI,CAAC,UAAU,EAAE,UAAU,GAAG,IAAI,CAAC,IAAI,CAEtD;AAED,wBAAgB,OAAO,CAAC,UAAU,EAAE,UAAU,GAAG,MAAM,CAEtD"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Effect, Schema } from "effect";
|
|
2
|
+
import * as Bytes from "../internal/Bytes.js";
|
|
3
|
+
import { DecodeEffect } from "../Cbor.js";
|
|
4
|
+
import { Data } from "../Uplc";
|
|
5
|
+
export declare function isValid(vh: string): boolean;
|
|
6
|
+
export declare const ValidatorHash: Schema.brand<Schema.filter<typeof Schema.String>, "ValidatorHash">;
|
|
7
|
+
export type ValidatorHash = Schema.Schema.Type<typeof ValidatorHash>;
|
|
8
|
+
export declare function make(bytes: Bytes.BytesLike): Effect.Effect<string & import("effect/Brand").Brand<"ValidatorHash">, import("effect/ParseResult").ParseError, never>;
|
|
9
|
+
export declare const FromUplcData: Schema.transform<Schema.transformOrFail<Schema.SchemaClass<{
|
|
10
|
+
readonly bytes: Uint8Array<ArrayBufferLike>;
|
|
11
|
+
} | {
|
|
12
|
+
readonly int: bigint;
|
|
13
|
+
} | {
|
|
14
|
+
readonly list: readonly Data.Data[];
|
|
15
|
+
} | {
|
|
16
|
+
readonly map: readonly {
|
|
17
|
+
readonly k: Data.Data;
|
|
18
|
+
readonly v: Data.Data;
|
|
19
|
+
}[];
|
|
20
|
+
} | {
|
|
21
|
+
readonly fields: readonly Data.Data[];
|
|
22
|
+
readonly constructor: number;
|
|
23
|
+
}, {
|
|
24
|
+
readonly bytes: Uint8Array<ArrayBufferLike>;
|
|
25
|
+
} | {
|
|
26
|
+
readonly int: bigint;
|
|
27
|
+
} | {
|
|
28
|
+
readonly list: readonly Data.Data[];
|
|
29
|
+
} | {
|
|
30
|
+
readonly map: readonly {
|
|
31
|
+
readonly k: Data.Data;
|
|
32
|
+
readonly v: Data.Data;
|
|
33
|
+
}[];
|
|
34
|
+
} | {
|
|
35
|
+
readonly fields: readonly Data.Data[];
|
|
36
|
+
readonly constructor: number;
|
|
37
|
+
}, never>, typeof Schema.Uint8ArrayFromSelf, never>, Schema.brand<Schema.filter<typeof Schema.String>, "ValidatorHash">>;
|
|
38
|
+
export declare const decode: (bytes: Bytes.BytesLike) => DecodeEffect<ValidatorHash>;
|
|
39
|
+
export declare function encode(vh: ValidatorHash): number[];
|
|
40
|
+
//# sourceMappingURL=ValidatorHash.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ValidatorHash.d.ts","sourceRoot":"","sources":["../../src/Ledger/ValidatorHash.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAY,MAAM,EAAE,MAAM,QAAQ,CAAA;AACjD,OAAO,KAAK,KAAK,MAAM,sBAAsB,CAAA;AAC7C,OAAO,EAAe,YAAY,EAAe,MAAM,YAAY,CAAA;AACnE,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAE9B,wBAAgB,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAE3C;AAED,eAAO,MAAM,aAAa,oEAGzB,CAAA;AAED,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,aAAa,CAAC,CAAA;AAEpE,wBAAgB,IAAI,CAAC,KAAK,EAAE,KAAK,CAAC,SAAS,yHAE1C;AAED,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;wHAIvB,CAAA;AAEF,eAAO,MAAM,MAAM,GAAI,OAAO,KAAK,CAAC,SAAS,KAAG,YAAY,CAAC,aAAa,CAKvE,CAAA;AAEH,wBAAgB,MAAM,CAAC,EAAE,EAAE,aAAa,GAAG,MAAM,EAAE,CAElD"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export * as Address from "./Address.js";
|
|
2
|
+
export * as AssetClass from "./AssetClass.js";
|
|
3
|
+
export * as Assets from "./Assets.js";
|
|
4
|
+
export * as Credential from "./Credential.js";
|
|
5
|
+
export * as DatumHash from "./DatumHash.js";
|
|
6
|
+
export { IsMainnet } from "./IsMainnet.js";
|
|
7
|
+
export * as MintingPolicy from "./MintingPolicy.js";
|
|
8
|
+
export * as NetworkParams from "./NetworkParams.js";
|
|
9
|
+
export * as PubKeyHash from "./PubKeyHash.js";
|
|
10
|
+
export * as TxId from "./TxId.js";
|
|
11
|
+
export * as TxInput from "./TxInput.js";
|
|
12
|
+
export * as TxOutput from "./TxOutput.js";
|
|
13
|
+
export * as TxOutputDatum from "./TxOutputDatum.js";
|
|
14
|
+
export * as TxOutputId from "./TxOutputId.js";
|
|
15
|
+
export * as ValidatorHash from "./ValidatorHash.js";
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +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,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC1C,OAAO,KAAK,aAAa,MAAM,oBAAoB,CAAA;AACnD,OAAO,KAAK,aAAa,MAAM,oBAAoB,CAAA;AACnD,OAAO,KAAK,UAAU,MAAM,iBAAiB,CAAA;AAC7C,OAAO,KAAK,IAAI,MAAM,WAAW,CAAA;AACjC,OAAO,KAAK,OAAO,MAAM,cAAc,CAAA;AACvC,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAA;AACzC,OAAO,KAAK,aAAa,MAAM,oBAAoB,CAAA;AACnD,OAAO,KAAK,UAAU,MAAM,iBAAiB,CAAA;AAC7C,OAAO,KAAK,aAAa,MAAM,oBAAoB,CAAA"}
|