@midnames/sdk 0.2.0 → 1.0.0
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/controller-types.d.ts +104 -0
- package/dist/controller-types.js +16 -0
- package/dist/core.d.ts +13 -10
- package/dist/core.js +144 -61
- package/dist/errors.d.ts +20 -0
- package/dist/errors.js +39 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +4 -0
- package/dist/managed/index.d.ts +2 -9
- package/dist/managed/index.js +15 -5
- package/dist/managed/index.js.map +1 -1
- package/dist/managed/leaf.compact +39 -48
- package/dist/managed/managed/leaf/contract/{index.d.cts → index.d.ts} +55 -57
- package/dist/managed/managed/leaf/contract/index.js +2358 -0
- package/dist/managed/managed/leaf/contract/index.js.map +8 -0
- package/dist/operations.d.ts +78 -0
- package/dist/operations.js +421 -0
- package/dist/provider.d.ts +2 -3
- package/dist/provider.js +6 -7
- package/dist/react/DomainProfileWidget.d.ts +2 -2
- package/dist/react/DomainProfileWidget.js +6 -6
- package/dist/react/HolographicCard.d.ts +2 -2
- package/dist/react/HolographicCard.js +5 -5
- package/dist/results.d.ts +38 -0
- package/dist/results.js +88 -0
- package/dist/types.d.ts +2 -40
- package/dist/types.js +1 -61
- package/dist/utils/address.js +6 -5
- package/dist/utils/domain.d.ts +1 -0
- package/dist/utils/domain.js +1 -1
- package/dist/utils/imageResolver.d.ts +8 -0
- package/dist/utils/imageResolver.js +89 -0
- package/exported.md +7 -12
- package/managed/index.js +15 -5
- package/managed/index.js.map +1 -1
- package/managed/leaf.compact +39 -48
- package/managed/managed/leaf/contract/index.js +2358 -0
- package/managed/managed/leaf/contract/index.js.map +8 -0
- package/package.json +20 -10
- package/dist/managed/managed/leaf/contract/index.cjs +0 -2789
- package/dist/managed/managed/leaf/contract/index.cjs.map +0 -8
- package/managed/managed/leaf/contract/index.cjs +0 -2789
- package/managed/managed/leaf/contract/index.cjs.map +0 -8
- package/managed/managed/leaf/contract/index.d.cts +0 -146
- package/tsconfig.tsbuildinfo +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
pragma language_version 0.
|
|
1
|
+
pragma language_version 0.20;
|
|
2
2
|
/// # Unshielded Nameservice
|
|
3
|
-
///
|
|
3
|
+
///
|
|
4
4
|
/// Example:
|
|
5
5
|
/// The `domain.mid` register would be deployed with
|
|
6
6
|
/// - parent_domain: "mid"
|
|
@@ -20,8 +20,8 @@ pragma language_version 0.17;
|
|
|
20
20
|
/// - target: arbitrary
|
|
21
21
|
/// - domain: "hyper"
|
|
22
22
|
/// - fields for the `hyper.sub.domain.mid` domain.
|
|
23
|
-
///
|
|
24
|
-
///
|
|
23
|
+
///
|
|
24
|
+
///
|
|
25
25
|
import CompactStandardLibrary;
|
|
26
26
|
|
|
27
27
|
// This is sealed. If the domain is sold in the parent contract
|
|
@@ -30,8 +30,8 @@ export sealed ledger PARENT_DOMAIN: Maybe<Opaque<'string'>>;
|
|
|
30
30
|
export sealed ledger PARENT_RESOLVER: ContractAddress;
|
|
31
31
|
export sealed ledger DOMAIN: Maybe<Opaque<'string'>>;
|
|
32
32
|
|
|
33
|
-
export ledger DOMAIN_OWNER: ZswapCoinPublicKey;
|
|
34
|
-
// This domain could target either a wallet or a contract
|
|
33
|
+
export ledger DOMAIN_OWNER: ZswapCoinPublicKey;
|
|
34
|
+
// This domain could target either a wallet or a contract
|
|
35
35
|
export ledger DOMAIN_TARGET: Either<ZswapCoinPublicKey, ContractAddress>;
|
|
36
36
|
|
|
37
37
|
// Map<domain, (owner, resolver)>.
|
|
@@ -43,7 +43,7 @@ export ledger domains_owned: Map<ZswapCoinPublicKey, Set<Opaque<'string'>>>;
|
|
|
43
43
|
export ledger fields: Map<Opaque<'string'>, Opaque<'string'>>;
|
|
44
44
|
|
|
45
45
|
|
|
46
|
-
export { DomainData, Either, Maybe
|
|
46
|
+
export { DomainData, Either, Maybe }
|
|
47
47
|
struct DomainData {
|
|
48
48
|
owner: ZswapCoinPublicKey,
|
|
49
49
|
resolver: ContractAddress
|
|
@@ -54,9 +54,9 @@ constructor(
|
|
|
54
54
|
parent_domain: Maybe<Opaque<'string'>>,
|
|
55
55
|
parent_resolver: ContractAddress,
|
|
56
56
|
target: Either<ZswapCoinPublicKey, ContractAddress>,
|
|
57
|
-
domain: Maybe<Opaque<'string'>>,
|
|
57
|
+
domain: Maybe<Opaque<'string'>>,
|
|
58
58
|
coin_color: Bytes<32>,
|
|
59
|
-
domain_cost: Uint<
|
|
59
|
+
domain_cost: Uint<128>,
|
|
60
60
|
kvs: Vector<10, Maybe<[Opaque<'string'>, Opaque<'string'>]>>
|
|
61
61
|
) {
|
|
62
62
|
DOMAIN_OWNER = ownPublicKey();
|
|
@@ -67,19 +67,18 @@ constructor(
|
|
|
67
67
|
COIN_COLOR = disclose(coin_color);
|
|
68
68
|
DOMAIN_COST = disclose(domain_cost);
|
|
69
69
|
for (const kv of kvs) {
|
|
70
|
-
if (disclose(kv)
|
|
71
|
-
|
|
70
|
+
if (disclose(kv) != none<[Opaque<'string'>, Opaque<'string'>]>()) {
|
|
71
|
+
fields.insert(disclose(kv.value[0]),disclose(kv.value[1]));
|
|
72
72
|
}
|
|
73
|
-
fields.insert(disclose(kv.value[0]),disclose(kv.value[1]));
|
|
74
73
|
}
|
|
75
74
|
}
|
|
76
75
|
|
|
77
|
-
// ===========================================
|
|
78
|
-
// Circuits
|
|
79
|
-
// ===========================================
|
|
76
|
+
// ===========================================
|
|
77
|
+
// Circuits
|
|
78
|
+
// ===========================================
|
|
80
79
|
|
|
81
80
|
export ledger COIN_COLOR: Bytes<32>;
|
|
82
|
-
export ledger DOMAIN_COST: Uint<
|
|
81
|
+
export ledger DOMAIN_COST: Uint<128>;
|
|
83
82
|
|
|
84
83
|
export circuit update_color(c: Bytes<32>) : [] {
|
|
85
84
|
assert(DOMAIN_OWNER == ownPublicKey(), "Not the owner");
|
|
@@ -92,39 +91,32 @@ export circuit update_cost(c: Uint<64>) : [] {
|
|
|
92
91
|
}
|
|
93
92
|
|
|
94
93
|
export circuit update_target_and_fields(
|
|
95
|
-
new_target: Either<ZswapCoinPublicKey, ContractAddress>,
|
|
94
|
+
new_target: Either<ZswapCoinPublicKey, ContractAddress>,
|
|
96
95
|
kvs: Vector<10, Maybe<[Opaque<'string'>, Opaque<'string'>]>>
|
|
97
96
|
) : [] {
|
|
98
97
|
assert(DOMAIN_OWNER == ownPublicKey(), "Not the domain owner");
|
|
99
98
|
for (const kv of kvs) {
|
|
100
|
-
if (disclose(kv)
|
|
101
|
-
|
|
99
|
+
if (disclose(kv) != none<[Opaque<'string'>, Opaque<'string'>]>()) {
|
|
100
|
+
fields.insert(disclose(kv.value[0]),disclose(kv.value[1]));
|
|
102
101
|
}
|
|
103
|
-
fields.insert(disclose(kv.value[0]),disclose(kv.value[1]));
|
|
104
102
|
}
|
|
105
103
|
DOMAIN_TARGET = disclose(new_target);
|
|
106
104
|
|
|
107
105
|
}
|
|
108
106
|
|
|
109
|
-
export circuit buy_domain_for(owner: ZswapCoinPublicKey, domain: Opaque<'string'>, resolver: ContractAddress
|
|
107
|
+
export circuit buy_domain_for(owner: ZswapCoinPublicKey, domain: Opaque<'string'>, resolver: ContractAddress): [] {
|
|
110
108
|
assert(!domains.member(disclose(domain)), "Domain already exists");
|
|
111
109
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
assert(d_payment.color == COIN_COLOR, "Wrong coin");
|
|
115
|
-
receive(d_payment);
|
|
116
|
-
sendImmediate(d_payment, left<ZswapCoinPublicKey, ContractAddress>(DOMAIN_OWNER), DOMAIN_COST);
|
|
117
|
-
|
|
118
|
-
const d_owner = disclose(owner);
|
|
110
|
+
// receiveUnshielded(COIN_COLOR, DOMAIN_COST);
|
|
111
|
+
// sendUnshielded(COIN_COLOR, DOMAIN_COST, right<ContractAddress, UserAddress>(UserAddress { bytes: DOMAIN_OWNER.bytes }));
|
|
119
112
|
|
|
120
|
-
const
|
|
113
|
+
const d_owner = disclose(owner);
|
|
114
|
+
const domain_data = DomainData {
|
|
121
115
|
d_owner,
|
|
122
116
|
disclose(resolver)
|
|
123
117
|
};
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
// Track domains owned by address
|
|
118
|
+
domains.insert(disclose(domain), disclose(domain_data));
|
|
119
|
+
// Track domains owned by address
|
|
128
120
|
if (!domains_owned.member(d_owner)) {
|
|
129
121
|
domains_owned.insert(d_owner, default<Set<Opaque<'string'>>>);
|
|
130
122
|
}
|
|
@@ -134,10 +126,9 @@ export circuit buy_domain_for(owner: ZswapCoinPublicKey, domain: Opaque<'string'
|
|
|
134
126
|
export circuit add_multiple_fields(kvs: Vector<10, Maybe<[Opaque<'string'>, Opaque<'string'>]>>) : [] {
|
|
135
127
|
assert(DOMAIN_OWNER == ownPublicKey(), "Not the domain owner");
|
|
136
128
|
for (const kv of kvs) {
|
|
137
|
-
if (disclose(kv)
|
|
138
|
-
|
|
129
|
+
if (disclose(kv) != none<[Opaque<'string'>, Opaque<'string'>]>()) {
|
|
130
|
+
fields.insert(disclose(kv.value[0]),disclose(kv.value[1]));
|
|
139
131
|
}
|
|
140
|
-
fields.insert(disclose(kv.value[0]),disclose(kv.value[1]));
|
|
141
132
|
}
|
|
142
133
|
}
|
|
143
134
|
|
|
@@ -160,14 +151,14 @@ export circuit register_domain_for(owner: ZswapCoinPublicKey, domain: Opaque<'st
|
|
|
160
151
|
assert(!domains.member(disclose(domain)), "Domain already exists");
|
|
161
152
|
assert(DOMAIN_OWNER == ownPublicKey(), "Not the domain owner");
|
|
162
153
|
|
|
163
|
-
const d_owner = disclose(owner);
|
|
154
|
+
const d_owner = disclose(owner);
|
|
164
155
|
const domain_data = DomainData {
|
|
165
156
|
d_owner,
|
|
166
157
|
disclose(resolver)
|
|
167
158
|
};
|
|
168
|
-
|
|
159
|
+
|
|
169
160
|
domains.insert(disclose(domain), disclose(domain_data));
|
|
170
|
-
|
|
161
|
+
|
|
171
162
|
// Track domains owned by address
|
|
172
163
|
if (!domains_owned.member(d_owner)) {
|
|
173
164
|
domains_owned.insert(d_owner, default<Set<Opaque<'string'>>>);
|
|
@@ -177,37 +168,37 @@ export circuit register_domain_for(owner: ZswapCoinPublicKey, domain: Opaque<'st
|
|
|
177
168
|
|
|
178
169
|
export circuit set_resolver(domain: Opaque<'string'>, resolver: ContractAddress): [] {
|
|
179
170
|
assert(domains.member(disclose(domain)), "Domain does not exist");
|
|
180
|
-
|
|
171
|
+
|
|
181
172
|
const current_data = domains.lookup(disclose(domain));
|
|
182
173
|
assert(current_data.owner == ownPublicKey(), "Not the domain owner");
|
|
183
|
-
|
|
174
|
+
|
|
184
175
|
const new_data = DomainData {
|
|
185
176
|
current_data.owner,
|
|
186
177
|
disclose(resolver)
|
|
187
178
|
};
|
|
188
|
-
|
|
179
|
+
|
|
189
180
|
domains.insert(disclose(domain), disclose(new_data));
|
|
190
181
|
}
|
|
191
182
|
|
|
192
183
|
export circuit update_domain_target(new_target: Either<ZswapCoinPublicKey, ContractAddress>): [] {
|
|
193
184
|
assert(DOMAIN_OWNER == ownPublicKey(), "Not the contract owner");
|
|
194
|
-
|
|
185
|
+
|
|
195
186
|
DOMAIN_TARGET = disclose(new_target);
|
|
196
187
|
}
|
|
197
188
|
|
|
198
189
|
export circuit transfer_domain(domain: Opaque<'string'>, new_owner: ZswapCoinPublicKey): [] {
|
|
199
190
|
assert(domains.member(disclose(domain)), "Domain does not exist");
|
|
200
|
-
|
|
191
|
+
|
|
201
192
|
const current_data = domains.lookup(disclose(domain));
|
|
202
193
|
assert(current_data.owner == ownPublicKey(), "Not the domain owner");
|
|
203
|
-
|
|
194
|
+
|
|
204
195
|
const new_data = DomainData {
|
|
205
196
|
disclose(new_owner),
|
|
206
197
|
current_data.resolver
|
|
207
198
|
};
|
|
208
|
-
|
|
199
|
+
|
|
209
200
|
domains.insert(disclose(domain), disclose(new_data));
|
|
210
|
-
|
|
201
|
+
|
|
211
202
|
// Update ownership tracking
|
|
212
203
|
domains_owned.lookup(ownPublicKey()).remove(disclose(domain));
|
|
213
204
|
if (!domains_owned.member(disclose(new_owner))) {
|
|
@@ -255,4 +246,4 @@ export circuit addr_owns_domain(addr: ZswapCoinPublicKey, domain: Opaque<'string
|
|
|
255
246
|
return domains_owned.lookup(disclose(addr)).member(disclose(domain));
|
|
256
247
|
}
|
|
257
248
|
|
|
258
|
-
*/
|
|
249
|
+
*/
|
|
@@ -8,84 +8,82 @@ export type Either<A, B> = { is_left: boolean; left: A; right: B };
|
|
|
8
8
|
|
|
9
9
|
export type Maybe<T> = { is_some: boolean; value: T };
|
|
10
10
|
|
|
11
|
-
export type
|
|
12
|
-
|
|
13
|
-
export type Witnesses<T> = {
|
|
11
|
+
export type Witnesses<PS> = {
|
|
14
12
|
}
|
|
15
13
|
|
|
16
|
-
export type ImpureCircuits<
|
|
17
|
-
update_color(context: __compactRuntime.CircuitContext<
|
|
18
|
-
update_cost(context: __compactRuntime.CircuitContext<
|
|
19
|
-
update_target_and_fields(context: __compactRuntime.CircuitContext<
|
|
14
|
+
export type ImpureCircuits<PS> = {
|
|
15
|
+
update_color(context: __compactRuntime.CircuitContext<PS>, c_0: Uint8Array): __compactRuntime.CircuitResults<PS, []>;
|
|
16
|
+
update_cost(context: __compactRuntime.CircuitContext<PS>, c_0: bigint): __compactRuntime.CircuitResults<PS, []>;
|
|
17
|
+
update_target_and_fields(context: __compactRuntime.CircuitContext<PS>,
|
|
20
18
|
new_target_0: Either<{ bytes: Uint8Array },
|
|
21
19
|
{ bytes: Uint8Array }>,
|
|
22
|
-
kvs_0: Maybe<[string, string]>[]): __compactRuntime.CircuitResults<
|
|
23
|
-
buy_domain_for(context: __compactRuntime.CircuitContext<
|
|
20
|
+
kvs_0: Maybe<[string, string]>[]): __compactRuntime.CircuitResults<PS, []>;
|
|
21
|
+
buy_domain_for(context: __compactRuntime.CircuitContext<PS>,
|
|
24
22
|
owner_0: { bytes: Uint8Array },
|
|
25
23
|
domain_0: string,
|
|
26
|
-
resolver_0: { bytes: Uint8Array },
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
insert_field(context: __compactRuntime.CircuitContext<T>,
|
|
24
|
+
resolver_0: { bytes: Uint8Array }): __compactRuntime.CircuitResults<PS, []>;
|
|
25
|
+
add_multiple_fields(context: __compactRuntime.CircuitContext<PS>,
|
|
26
|
+
kvs_0: Maybe<[string, string]>[]): __compactRuntime.CircuitResults<PS, []>;
|
|
27
|
+
insert_field(context: __compactRuntime.CircuitContext<PS>,
|
|
31
28
|
k_0: string,
|
|
32
|
-
v_0: string): __compactRuntime.CircuitResults<
|
|
33
|
-
clear_field(context: __compactRuntime.CircuitContext<
|
|
34
|
-
clear_all_fields(context: __compactRuntime.CircuitContext<
|
|
35
|
-
|
|
29
|
+
v_0: string): __compactRuntime.CircuitResults<PS, []>;
|
|
30
|
+
clear_field(context: __compactRuntime.CircuitContext<PS>, k_0: string): __compactRuntime.CircuitResults<PS, []>;
|
|
31
|
+
clear_all_fields(context: __compactRuntime.CircuitContext<PS>,
|
|
32
|
+
domain_0: string): __compactRuntime.CircuitResults<PS, []>;
|
|
33
|
+
register_domain_for(context: __compactRuntime.CircuitContext<PS>,
|
|
36
34
|
owner_0: { bytes: Uint8Array },
|
|
37
35
|
domain_0: string,
|
|
38
|
-
resolver_0: { bytes: Uint8Array }): __compactRuntime.CircuitResults<
|
|
39
|
-
set_resolver(context: __compactRuntime.CircuitContext<
|
|
36
|
+
resolver_0: { bytes: Uint8Array }): __compactRuntime.CircuitResults<PS, []>;
|
|
37
|
+
set_resolver(context: __compactRuntime.CircuitContext<PS>,
|
|
40
38
|
domain_0: string,
|
|
41
|
-
resolver_0: { bytes: Uint8Array }): __compactRuntime.CircuitResults<
|
|
42
|
-
update_domain_target(context: __compactRuntime.CircuitContext<
|
|
39
|
+
resolver_0: { bytes: Uint8Array }): __compactRuntime.CircuitResults<PS, []>;
|
|
40
|
+
update_domain_target(context: __compactRuntime.CircuitContext<PS>,
|
|
43
41
|
new_target_0: Either<{ bytes: Uint8Array },
|
|
44
|
-
{ bytes: Uint8Array }>): __compactRuntime.CircuitResults<
|
|
45
|
-
transfer_domain(context: __compactRuntime.CircuitContext<
|
|
42
|
+
{ bytes: Uint8Array }>): __compactRuntime.CircuitResults<PS, []>;
|
|
43
|
+
transfer_domain(context: __compactRuntime.CircuitContext<PS>,
|
|
46
44
|
domain_0: string,
|
|
47
|
-
new_owner_0: { bytes: Uint8Array }): __compactRuntime.CircuitResults<
|
|
48
|
-
change_owner(context: __compactRuntime.CircuitContext<
|
|
49
|
-
new_owner_0: { bytes: Uint8Array }): __compactRuntime.CircuitResults<
|
|
45
|
+
new_owner_0: { bytes: Uint8Array }): __compactRuntime.CircuitResults<PS, []>;
|
|
46
|
+
change_owner(context: __compactRuntime.CircuitContext<PS>,
|
|
47
|
+
new_owner_0: { bytes: Uint8Array }): __compactRuntime.CircuitResults<PS, []>;
|
|
50
48
|
}
|
|
51
49
|
|
|
52
50
|
export type PureCircuits = {
|
|
53
51
|
}
|
|
54
52
|
|
|
55
|
-
export type Circuits<
|
|
56
|
-
update_color(context: __compactRuntime.CircuitContext<
|
|
57
|
-
update_cost(context: __compactRuntime.CircuitContext<
|
|
58
|
-
update_target_and_fields(context: __compactRuntime.CircuitContext<
|
|
53
|
+
export type Circuits<PS> = {
|
|
54
|
+
update_color(context: __compactRuntime.CircuitContext<PS>, c_0: Uint8Array): __compactRuntime.CircuitResults<PS, []>;
|
|
55
|
+
update_cost(context: __compactRuntime.CircuitContext<PS>, c_0: bigint): __compactRuntime.CircuitResults<PS, []>;
|
|
56
|
+
update_target_and_fields(context: __compactRuntime.CircuitContext<PS>,
|
|
59
57
|
new_target_0: Either<{ bytes: Uint8Array },
|
|
60
58
|
{ bytes: Uint8Array }>,
|
|
61
|
-
kvs_0: Maybe<[string, string]>[]): __compactRuntime.CircuitResults<
|
|
62
|
-
buy_domain_for(context: __compactRuntime.CircuitContext<
|
|
59
|
+
kvs_0: Maybe<[string, string]>[]): __compactRuntime.CircuitResults<PS, []>;
|
|
60
|
+
buy_domain_for(context: __compactRuntime.CircuitContext<PS>,
|
|
63
61
|
owner_0: { bytes: Uint8Array },
|
|
64
62
|
domain_0: string,
|
|
65
|
-
resolver_0: { bytes: Uint8Array },
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
insert_field(context: __compactRuntime.CircuitContext<T>,
|
|
63
|
+
resolver_0: { bytes: Uint8Array }): __compactRuntime.CircuitResults<PS, []>;
|
|
64
|
+
add_multiple_fields(context: __compactRuntime.CircuitContext<PS>,
|
|
65
|
+
kvs_0: Maybe<[string, string]>[]): __compactRuntime.CircuitResults<PS, []>;
|
|
66
|
+
insert_field(context: __compactRuntime.CircuitContext<PS>,
|
|
70
67
|
k_0: string,
|
|
71
|
-
v_0: string): __compactRuntime.CircuitResults<
|
|
72
|
-
clear_field(context: __compactRuntime.CircuitContext<
|
|
73
|
-
clear_all_fields(context: __compactRuntime.CircuitContext<
|
|
74
|
-
|
|
68
|
+
v_0: string): __compactRuntime.CircuitResults<PS, []>;
|
|
69
|
+
clear_field(context: __compactRuntime.CircuitContext<PS>, k_0: string): __compactRuntime.CircuitResults<PS, []>;
|
|
70
|
+
clear_all_fields(context: __compactRuntime.CircuitContext<PS>,
|
|
71
|
+
domain_0: string): __compactRuntime.CircuitResults<PS, []>;
|
|
72
|
+
register_domain_for(context: __compactRuntime.CircuitContext<PS>,
|
|
75
73
|
owner_0: { bytes: Uint8Array },
|
|
76
74
|
domain_0: string,
|
|
77
|
-
resolver_0: { bytes: Uint8Array }): __compactRuntime.CircuitResults<
|
|
78
|
-
set_resolver(context: __compactRuntime.CircuitContext<
|
|
75
|
+
resolver_0: { bytes: Uint8Array }): __compactRuntime.CircuitResults<PS, []>;
|
|
76
|
+
set_resolver(context: __compactRuntime.CircuitContext<PS>,
|
|
79
77
|
domain_0: string,
|
|
80
|
-
resolver_0: { bytes: Uint8Array }): __compactRuntime.CircuitResults<
|
|
81
|
-
update_domain_target(context: __compactRuntime.CircuitContext<
|
|
78
|
+
resolver_0: { bytes: Uint8Array }): __compactRuntime.CircuitResults<PS, []>;
|
|
79
|
+
update_domain_target(context: __compactRuntime.CircuitContext<PS>,
|
|
82
80
|
new_target_0: Either<{ bytes: Uint8Array },
|
|
83
|
-
{ bytes: Uint8Array }>): __compactRuntime.CircuitResults<
|
|
84
|
-
transfer_domain(context: __compactRuntime.CircuitContext<
|
|
81
|
+
{ bytes: Uint8Array }>): __compactRuntime.CircuitResults<PS, []>;
|
|
82
|
+
transfer_domain(context: __compactRuntime.CircuitContext<PS>,
|
|
85
83
|
domain_0: string,
|
|
86
|
-
new_owner_0: { bytes: Uint8Array }): __compactRuntime.CircuitResults<
|
|
87
|
-
change_owner(context: __compactRuntime.CircuitContext<
|
|
88
|
-
new_owner_0: { bytes: Uint8Array }): __compactRuntime.CircuitResults<
|
|
84
|
+
new_owner_0: { bytes: Uint8Array }): __compactRuntime.CircuitResults<PS, []>;
|
|
85
|
+
change_owner(context: __compactRuntime.CircuitContext<PS>,
|
|
86
|
+
new_owner_0: { bytes: Uint8Array }): __compactRuntime.CircuitResults<PS, []>;
|
|
89
87
|
}
|
|
90
88
|
|
|
91
89
|
export type Ledger = {
|
|
@@ -127,20 +125,20 @@ export type ContractReferenceLocations = any;
|
|
|
127
125
|
|
|
128
126
|
export declare const contractReferenceLocations : ContractReferenceLocations;
|
|
129
127
|
|
|
130
|
-
export declare class Contract<
|
|
128
|
+
export declare class Contract<PS = any, W extends Witnesses<PS> = Witnesses<PS>> {
|
|
131
129
|
witnesses: W;
|
|
132
|
-
circuits: Circuits<
|
|
133
|
-
impureCircuits: ImpureCircuits<
|
|
130
|
+
circuits: Circuits<PS>;
|
|
131
|
+
impureCircuits: ImpureCircuits<PS>;
|
|
134
132
|
constructor(witnesses: W);
|
|
135
|
-
initialState(context: __compactRuntime.ConstructorContext<
|
|
133
|
+
initialState(context: __compactRuntime.ConstructorContext<PS>,
|
|
136
134
|
parent_domain_0: Maybe<string>,
|
|
137
135
|
parent_resolver_0: { bytes: Uint8Array },
|
|
138
136
|
target_0: Either<{ bytes: Uint8Array }, { bytes: Uint8Array }>,
|
|
139
137
|
domain_0: Maybe<string>,
|
|
140
138
|
coin_color_0: Uint8Array,
|
|
141
139
|
domain_cost_0: bigint,
|
|
142
|
-
kvs_0: Maybe<[string, string]>[]): __compactRuntime.ConstructorResult<
|
|
140
|
+
kvs_0: Maybe<[string, string]>[]): __compactRuntime.ConstructorResult<PS>;
|
|
143
141
|
}
|
|
144
142
|
|
|
145
|
-
export declare function ledger(state: __compactRuntime.StateValue): Ledger;
|
|
143
|
+
export declare function ledger(state: __compactRuntime.StateValue | __compactRuntime.ChargedState): Ledger;
|
|
146
144
|
export declare const pureCircuits: PureCircuits;
|