Skip to content

Commit b040937

Browse files
committed
Keep old new_xx() constructor functions in NetworkId around for the time being.
Remove this once https://github.com/mlabs-haskell/purescript-cardano-data-lite can be updated.
1 parent 3455088 commit b040937

File tree

3 files changed

+20
-7
lines changed

3 files changed

+20
-7
lines changed

conway-cddl/yaml/conway.yaml

+7-3
Original file line numberDiff line numberDiff line change
@@ -2356,9 +2356,13 @@ NetworkId:
23562356
value: 1
23572357
- name: testnet
23582358
value: 0
2359-
methods:
2360-
new_mainnet: mainnet
2361-
new_testnet: testnet
2359+
extra_methods: |
2360+
static mainnet() {
2361+
return NetworkId.new_mainnet();
2362+
}
2363+
static testnet() {
2364+
return NetworkId.new_testnet();
2365+
}
23622366
23632367
# epoch = uint
23642368

csl-types/cardano-data-lite.d.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -1763,8 +1763,8 @@ export declare enum NetworkIdKind {
17631763
export declare class NetworkId {
17641764
private kind_;
17651765
constructor(kind: NetworkIdKind);
1766-
static mainnet(): NetworkId;
1767-
static testnet(): NetworkId;
1766+
static new_mainnet(): NetworkId;
1767+
static new_testnet(): NetworkId;
17681768
kind(): NetworkIdKind;
17691769
static deserialize(reader: CBORReader, path: string[]): NetworkId;
17701770
serialize(writer: CBORWriter): void;
@@ -1774,6 +1774,8 @@ export declare class NetworkId {
17741774
to_bytes(): Uint8Array;
17751775
to_hex(): string;
17761776
clone(path: string[]): NetworkId;
1777+
static mainnet(): NetworkId;
1778+
static testnet(): NetworkId;
17771779
}
17781780
export declare class NewConstitutionAction {
17791781
private _gov_action_id;

src/generated.ts

+9-2
Original file line numberDiff line numberDiff line change
@@ -9309,11 +9309,11 @@ export class NetworkId {
93099309
this.kind_ = kind;
93109310
}
93119311

9312-
static mainnet(): NetworkId {
9312+
static new_mainnet(): NetworkId {
93139313
return new NetworkId(1);
93149314
}
93159315

9316-
static testnet(): NetworkId {
9316+
static new_testnet(): NetworkId {
93179317
return new NetworkId(0);
93189318
}
93199319
kind(): NetworkIdKind {
@@ -9367,6 +9367,13 @@ export class NetworkId {
93679367
clone(path: string[]): NetworkId {
93689368
return NetworkId.from_bytes(this.to_bytes(), path);
93699369
}
9370+
9371+
static mainnet() {
9372+
return NetworkId.new_mainnet();
9373+
}
9374+
static testnet() {
9375+
return NetworkId.new_testnet();
9376+
}
93709377
}
93719378

93729379
export class NewConstitutionAction {

0 commit comments

Comments
 (0)