@gardenfi/swap 0.0.2-beta.2 → 0.0.2-beta.4
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/index104.cjs +1 -1
- package/dist/index104.js +4 -4
- package/dist/index106.cjs +1 -1
- package/dist/index106.js +3 -3
- package/dist/index107.cjs +1 -1
- package/dist/index107.js +3 -3
- package/dist/index116.cjs +1 -1
- package/dist/index116.js +1 -1
- package/dist/index117.cjs +1 -1
- package/dist/index117.js +1 -1
- package/dist/index12.cjs +1 -1
- package/dist/index12.js +12 -12
- package/dist/index120.cjs +1 -1
- package/dist/index120.js +2 -2
- package/dist/index121.cjs +1 -1
- package/dist/index121.js +7 -7
- package/dist/index132.cjs +1 -1
- package/dist/index132.js +1 -1
- package/dist/index133.cjs +1 -1
- package/dist/index133.js +1 -1
- package/dist/index134.cjs +1 -1
- package/dist/index134.js +1 -1
- package/dist/index135.cjs +1 -1
- package/dist/index135.js +1 -1
- package/dist/index138.cjs +1 -1
- package/dist/index138.js +2 -2
- package/dist/index161.cjs +1 -1
- package/dist/index161.js +2 -2
- package/dist/index167.cjs +1 -1
- package/dist/index167.js +1 -1
- package/dist/index168.cjs +1 -1
- package/dist/index168.js +2 -2
- package/dist/index169.cjs +1 -1
- package/dist/index169.js +2 -2
- package/dist/index170.cjs +1 -1
- package/dist/index170.js +2 -2
- package/dist/index171.cjs +1 -1
- package/dist/index171.js +2 -2
- package/dist/index172.cjs +1 -1
- package/dist/index172.js +2 -2
- package/dist/index272.cjs +1 -1
- package/dist/index272.js +9 -174
- package/dist/index273.cjs +1 -2
- package/dist/index273.js +30 -91
- package/dist/index274.cjs +1 -1
- package/dist/index274.js +2 -41
- package/dist/index275.cjs +1 -1
- package/dist/index275.js +47 -4
- package/dist/index276.cjs +1 -1
- package/dist/index276.js +11 -9
- package/dist/index277.cjs +1 -1
- package/dist/index277.js +174 -30
- package/dist/index278.cjs +2 -1
- package/dist/index278.js +92 -2
- package/dist/index279.cjs +1 -1
- package/dist/index279.js +38 -45
- package/dist/index280.cjs +1 -1
- package/dist/index280.js +4 -11
- package/dist/index281.cjs +1 -1
- package/dist/index281.js +3 -3
- package/dist/index283.cjs +1 -2
- package/dist/index283.js +42 -41
- package/dist/index284.cjs +1 -1
- package/dist/index284.js +321 -2
- package/dist/index285.cjs +1 -1
- package/dist/index285.js +605 -5
- package/dist/index286.cjs +1 -1
- package/dist/index286.js +109 -10
- package/dist/index287.cjs +1 -1
- package/dist/index287.js +167 -19
- package/dist/index288.cjs +1 -1
- package/dist/index288.js +301 -8
- package/dist/index289.cjs +1 -1
- package/dist/index289.js +93 -72
- package/dist/index290.cjs +1 -1
- package/dist/index290.js +54 -63
- package/dist/index291.cjs +1 -1
- package/dist/index291.js +51 -186
- package/dist/index292.cjs +1 -1
- package/dist/index292.js +42 -20
- package/dist/index293.cjs +1 -1
- package/dist/index293.js +14 -41
- package/dist/index294.cjs +1 -1
- package/dist/index294.js +315 -23
- package/dist/index295.cjs +1 -1
- package/dist/index295.js +57 -88
- package/dist/index296.cjs +1 -1
- package/dist/index296.js +19 -40
- package/dist/index297.cjs +1 -1
- package/dist/index297.js +28 -15
- package/dist/index298.cjs +1 -1
- package/dist/index298.js +3 -13
- package/dist/index299.cjs +7 -1
- package/dist/index299.js +237 -7
- package/dist/index300.cjs +1 -1
- package/dist/index300.js +48 -38
- package/dist/index301.cjs +1 -1
- package/dist/index301.js +211 -14
- package/dist/index302.cjs +1 -1
- package/dist/index302.js +77 -38
- package/dist/index303.cjs +1 -1
- package/dist/index303.js +25 -316
- package/dist/index304.cjs +1 -1
- package/dist/index304.js +73 -602
- package/dist/index305.cjs +2 -1
- package/dist/index305.js +41 -109
- package/dist/index306.cjs +1 -1
- package/dist/index306.js +2 -168
- package/dist/index307.cjs +1 -1
- package/dist/index307.js +5 -301
- package/dist/index308.cjs +1 -1
- package/dist/index308.js +10 -93
- package/dist/index309.cjs +1 -1
- package/dist/index309.js +18 -55
- package/dist/index310.cjs +1 -1
- package/dist/index310.js +8 -53
- package/dist/index311.cjs +1 -1
- package/dist/index311.js +72 -44
- package/dist/index312.cjs +1 -1
- package/dist/index312.js +64 -14
- package/dist/index313.cjs +1 -1
- package/dist/index313.js +184 -313
- package/dist/index314.cjs +1 -1
- package/dist/index314.js +19 -56
- package/dist/index315.cjs +1 -1
- package/dist/index315.js +42 -19
- package/dist/index316.cjs +1 -1
- package/dist/index316.js +23 -27
- package/dist/index317.cjs +1 -1
- package/dist/index317.js +90 -3
- package/dist/index318.cjs +1 -7
- package/dist/index318.js +33 -230
- package/dist/index319.cjs +1 -1
- package/dist/index319.js +17 -48
- package/dist/index320.cjs +1 -1
- package/dist/index320.js +11 -210
- package/dist/index321.cjs +1 -1
- package/dist/index321.js +7 -81
- package/dist/index322.cjs +1 -1
- package/dist/index322.js +36 -28
- package/dist/index323.cjs +1 -1
- package/dist/index323.js +15 -76
- package/dist/index326.cjs +1 -1
- package/dist/index326.js +1 -1
- package/dist/index327.cjs +1 -1
- package/dist/index327.js +1 -1
- package/dist/index333.cjs +1 -1
- package/dist/index333.js +2 -2
- package/dist/index334.cjs +1 -1
- package/dist/index334.js +2 -2
- package/dist/index340.cjs +1 -1
- package/dist/index340.js +1 -1
- package/dist/index341.cjs +1 -1
- package/dist/index341.js +1 -1
- package/dist/index343.cjs +1 -1
- package/dist/index343.js +1 -1
- package/dist/index346.cjs +1 -1
- package/dist/index346.js +1 -1
- package/dist/index347.cjs +1 -1
- package/dist/index347.js +1 -1
- package/dist/index348.cjs +1 -1
- package/dist/index348.js +3 -3
- package/dist/index349.cjs +1 -2
- package/dist/index349.js +4 -193
- package/dist/index350.cjs +2 -1
- package/dist/index350.js +168 -52
- package/dist/index351.cjs +1 -1
- package/dist/index351.js +65 -331
- package/dist/index352.cjs +1 -1
- package/dist/index352.js +332 -149
- package/dist/index353.cjs +1 -1
- package/dist/index353.js +161 -5
- package/dist/index354.cjs +1 -1
- package/dist/index354.js +5 -5
- package/dist/index357.cjs +1 -1
- package/dist/index357.js +8 -205
- package/dist/index359.cjs +1 -1
- package/dist/index359.js +205 -8
- package/dist/index360.cjs +1 -1
- package/dist/index360.js +94 -68
- package/dist/index361.cjs +1 -1
- package/dist/index361.js +28 -94
- package/dist/index362.cjs +1 -1
- package/dist/index362.js +147 -27
- package/dist/index363.cjs +1 -1
- package/dist/index363.js +324 -118
- package/dist/index364.cjs +1 -1
- package/dist/index364.js +72 -353
- package/dist/index365.cjs +1 -1
- package/dist/index365.js +29 -71
- package/dist/index366.cjs +1 -1
- package/dist/index366.js +5 -31
- package/dist/index367.cjs +1 -1
- package/dist/index367.js +275 -5
- package/dist/index368.cjs +1 -1
- package/dist/index368.js +171 -4
- package/dist/index369.cjs +1 -1
- package/dist/index369.js +10 -141
- package/dist/index370.cjs +1 -1
- package/dist/index370.js +105 -273
- package/dist/index371.cjs +1 -1
- package/dist/index371.js +10 -171
- package/dist/index372.cjs +1 -1
- package/dist/index372.js +69 -10
- package/dist/index373.cjs +1 -1
- package/dist/index373.js +3 -107
- package/dist/index374.cjs +1 -1
- package/dist/index374.js +140 -9
- package/dist/index375.cjs +1 -1
- package/dist/index375.js +4 -4
- package/dist/index376.cjs +1 -1
- package/dist/index376.js +2 -79
- package/dist/index377.cjs +1 -1
- package/dist/index377.js +79 -2
- package/dist/index379.cjs +1 -1
- package/dist/index379.js +1 -1
- package/dist/index380.cjs +1 -1
- package/dist/index380.js +1 -1
- package/dist/index381.cjs +1 -1
- package/dist/index381.js +2 -22
- package/dist/index382.cjs +1 -1
- package/dist/index382.js +22 -2
- package/dist/index385.cjs +1 -1
- package/dist/index385.js +2 -2
- package/dist/index77.cjs +1 -1
- package/dist/index77.js +13 -13
- package/dist/index99.cjs +1 -1
- package/dist/index99.js +1 -1
- package/dist/src/lib/store/swapStore.d.ts +1 -1
- package/package.json +5 -5
package/dist/index370.js
CHANGED
|
@@ -1,278 +1,110 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
return t.u64({
|
|
9
|
-
name: "unsafe_u64",
|
|
10
|
-
...e
|
|
11
|
-
}).transform({
|
|
12
|
-
input: (s) => s,
|
|
13
|
-
output: (s) => Number(s)
|
|
14
|
-
});
|
|
1
|
+
import { bcs as r } from "./index300.js";
|
|
2
|
+
import { normalizeSuiAddress as n } from "./index117.js";
|
|
3
|
+
import { MOVE_STDLIB_ADDRESS as s, SUI_FRAMEWORK_ADDRESS as a } from "./index369.js";
|
|
4
|
+
const d = "object", i = "ID", f = "ascii", T = "String", _ = "string", l = "String", U = "option", m = "Option";
|
|
5
|
+
function M(e) {
|
|
6
|
+
const t = typeof e.body == "object" && "datatype" in e.body ? e.body.datatype : null;
|
|
7
|
+
return !!t && n(t.package) === n("0x2") && t.module === "tx_context" && t.type === "TxContext";
|
|
15
8
|
}
|
|
16
|
-
function
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
9
|
+
function u(e) {
|
|
10
|
+
if (typeof e == "string")
|
|
11
|
+
switch (e) {
|
|
12
|
+
case "address":
|
|
13
|
+
return r.Address;
|
|
14
|
+
case "bool":
|
|
15
|
+
return r.Bool;
|
|
16
|
+
case "u8":
|
|
17
|
+
return r.U8;
|
|
18
|
+
case "u16":
|
|
19
|
+
return r.U16;
|
|
20
|
+
case "u32":
|
|
21
|
+
return r.U32;
|
|
22
|
+
case "u64":
|
|
23
|
+
return r.U64;
|
|
24
|
+
case "u128":
|
|
25
|
+
return r.U128;
|
|
26
|
+
case "u256":
|
|
27
|
+
return r.U256;
|
|
28
|
+
default:
|
|
29
|
+
throw new Error(`Unknown type signature ${e}`);
|
|
30
|
+
}
|
|
31
|
+
if ("vector" in e) {
|
|
32
|
+
if (e.vector === "u8")
|
|
33
|
+
return r.byteVector().transform({
|
|
34
|
+
input: (o) => typeof o == "string" ? new TextEncoder().encode(o) : o,
|
|
35
|
+
output: (o) => o
|
|
36
|
+
});
|
|
37
|
+
const t = u(e.vector);
|
|
38
|
+
return t ? r.vector(t) : null;
|
|
39
|
+
}
|
|
40
|
+
if ("datatype" in e) {
|
|
41
|
+
const t = n(e.datatype.package);
|
|
42
|
+
if (t === n(s)) {
|
|
43
|
+
if (e.datatype.module === f && e.datatype.type === T)
|
|
44
|
+
return r.String;
|
|
45
|
+
if (e.datatype.module === _ && e.datatype.type === l)
|
|
46
|
+
return r.String;
|
|
47
|
+
if (e.datatype.module === U && e.datatype.type === m) {
|
|
48
|
+
const o = u(e.datatype.typeParameters[0]);
|
|
49
|
+
return o ? r.vector(o) : null;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
if (t === n(a) && e.datatype.module === d && e.datatype.type === i)
|
|
53
|
+
return r.Address;
|
|
37
54
|
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
NestedResult: t.tuple([t.u16(), t.u16()])
|
|
89
|
-
}), M = t.struct("ProgrammableMoveCall", {
|
|
90
|
-
package: n,
|
|
91
|
-
module: t.string(),
|
|
92
|
-
function: t.string(),
|
|
93
|
-
typeArguments: t.vector(d),
|
|
94
|
-
arguments: t.vector(r)
|
|
95
|
-
}), P = t.enum("Command", {
|
|
96
|
-
/**
|
|
97
|
-
* A Move Call - any public Move function can be called via
|
|
98
|
-
* this transaction. The results can be used that instant to pass
|
|
99
|
-
* into the next transaction.
|
|
100
|
-
*/
|
|
101
|
-
MoveCall: M,
|
|
102
|
-
/**
|
|
103
|
-
* Transfer vector of objects to a receiver.
|
|
104
|
-
*/
|
|
105
|
-
TransferObjects: t.struct("TransferObjects", {
|
|
106
|
-
objects: t.vector(r),
|
|
107
|
-
address: r
|
|
108
|
-
}),
|
|
109
|
-
// /**
|
|
110
|
-
// * Split `amount` from a `coin`.
|
|
111
|
-
// */
|
|
112
|
-
SplitCoins: t.struct("SplitCoins", {
|
|
113
|
-
coin: r,
|
|
114
|
-
amounts: t.vector(r)
|
|
115
|
-
}),
|
|
116
|
-
// /**
|
|
117
|
-
// * Merge Vector of Coins (`sources`) into a `destination`.
|
|
118
|
-
// */
|
|
119
|
-
MergeCoins: t.struct("MergeCoins", {
|
|
120
|
-
destination: r,
|
|
121
|
-
sources: t.vector(r)
|
|
122
|
-
}),
|
|
123
|
-
// /**
|
|
124
|
-
// * Publish a Move module.
|
|
125
|
-
// */
|
|
126
|
-
Publish: t.struct("Publish", {
|
|
127
|
-
modules: t.vector(
|
|
128
|
-
t.byteVector().transform({
|
|
129
|
-
input: (e) => typeof e == "string" ? u(e) : e,
|
|
130
|
-
output: (e) => o(new Uint8Array(e))
|
|
131
|
-
})
|
|
132
|
-
),
|
|
133
|
-
dependencies: t.vector(n)
|
|
134
|
-
}),
|
|
135
|
-
// /**
|
|
136
|
-
// * Build a vector of objects using the input arguments.
|
|
137
|
-
// * It is impossible to export construct a `vector<T: key>` otherwise,
|
|
138
|
-
// * so this call serves a utility function.
|
|
139
|
-
// */
|
|
140
|
-
MakeMoveVec: t.struct("MakeMoveVec", {
|
|
141
|
-
type: T(d).transform({
|
|
142
|
-
input: (e) => e === null ? {
|
|
143
|
-
None: !0
|
|
144
|
-
} : {
|
|
145
|
-
Some: e
|
|
146
|
-
},
|
|
147
|
-
output: (e) => e.Some ?? null
|
|
148
|
-
}),
|
|
149
|
-
elements: t.vector(r)
|
|
150
|
-
}),
|
|
151
|
-
Upgrade: t.struct("Upgrade", {
|
|
152
|
-
modules: t.vector(
|
|
153
|
-
t.byteVector().transform({
|
|
154
|
-
input: (e) => typeof e == "string" ? u(e) : e,
|
|
155
|
-
output: (e) => o(new Uint8Array(e))
|
|
156
|
-
})
|
|
157
|
-
),
|
|
158
|
-
dependencies: t.vector(n),
|
|
159
|
-
package: n,
|
|
160
|
-
ticket: r
|
|
161
|
-
})
|
|
162
|
-
}), C = t.struct("ProgrammableTransaction", {
|
|
163
|
-
inputs: t.vector(V),
|
|
164
|
-
commands: t.vector(P)
|
|
165
|
-
}), k = t.enum("TransactionKind", {
|
|
166
|
-
ProgrammableTransaction: C,
|
|
167
|
-
ChangeEpoch: null,
|
|
168
|
-
Genesis: null,
|
|
169
|
-
ConsensusCommitPrologue: null
|
|
170
|
-
}), w = t.enum("TransactionExpiration", {
|
|
171
|
-
None: null,
|
|
172
|
-
Epoch: f()
|
|
173
|
-
}), D = t.struct("StructTag", {
|
|
174
|
-
address: n,
|
|
175
|
-
module: t.string(),
|
|
176
|
-
name: t.string(),
|
|
177
|
-
typeParams: t.vector(i)
|
|
178
|
-
}), I = t.struct("GasData", {
|
|
179
|
-
payment: t.vector(c),
|
|
180
|
-
owner: n,
|
|
181
|
-
price: t.u64(),
|
|
182
|
-
budget: t.u64()
|
|
183
|
-
}), j = t.struct("TransactionDataV1", {
|
|
184
|
-
kind: k,
|
|
185
|
-
sender: n,
|
|
186
|
-
gasData: I,
|
|
187
|
-
expiration: w
|
|
188
|
-
}), v = t.enum("TransactionData", {
|
|
189
|
-
V1: j
|
|
190
|
-
}), E = t.enum("IntentScope", {
|
|
191
|
-
TransactionData: null,
|
|
192
|
-
TransactionEffects: null,
|
|
193
|
-
CheckpointSummary: null,
|
|
194
|
-
PersonalMessage: null
|
|
195
|
-
}), R = t.enum("IntentVersion", {
|
|
196
|
-
V0: null
|
|
197
|
-
}), U = t.enum("AppId", {
|
|
198
|
-
Sui: null
|
|
199
|
-
}), x = t.struct("Intent", {
|
|
200
|
-
scope: E,
|
|
201
|
-
version: R,
|
|
202
|
-
appId: U
|
|
203
|
-
});
|
|
204
|
-
function K(e) {
|
|
205
|
-
return t.struct(`IntentMessage<${e.name}>`, {
|
|
206
|
-
intent: x,
|
|
207
|
-
value: e
|
|
208
|
-
});
|
|
55
|
+
return null;
|
|
56
|
+
}
|
|
57
|
+
function D(e) {
|
|
58
|
+
return typeof e == "object" && "Reference" in e ? {
|
|
59
|
+
ref: "&",
|
|
60
|
+
body: c(e.Reference)
|
|
61
|
+
} : typeof e == "object" && "MutableReference" in e ? {
|
|
62
|
+
ref: "&mut",
|
|
63
|
+
body: c(e.MutableReference)
|
|
64
|
+
} : {
|
|
65
|
+
ref: null,
|
|
66
|
+
body: c(e)
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
function c(e) {
|
|
70
|
+
if (typeof e == "string")
|
|
71
|
+
switch (e) {
|
|
72
|
+
case "Address":
|
|
73
|
+
return "address";
|
|
74
|
+
case "Bool":
|
|
75
|
+
return "bool";
|
|
76
|
+
case "U8":
|
|
77
|
+
return "u8";
|
|
78
|
+
case "U16":
|
|
79
|
+
return "u16";
|
|
80
|
+
case "U32":
|
|
81
|
+
return "u32";
|
|
82
|
+
case "U64":
|
|
83
|
+
return "u64";
|
|
84
|
+
case "U128":
|
|
85
|
+
return "u128";
|
|
86
|
+
case "U256":
|
|
87
|
+
return "u256";
|
|
88
|
+
default:
|
|
89
|
+
throw new Error(`Unexpected type ${e}`);
|
|
90
|
+
}
|
|
91
|
+
if ("Vector" in e)
|
|
92
|
+
return { vector: c(e.Vector) };
|
|
93
|
+
if ("Struct" in e)
|
|
94
|
+
return {
|
|
95
|
+
datatype: {
|
|
96
|
+
package: e.Struct.address,
|
|
97
|
+
module: e.Struct.module,
|
|
98
|
+
type: e.Struct.name,
|
|
99
|
+
typeParameters: e.Struct.typeArguments.map(c)
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
if ("TypeParameter" in e)
|
|
103
|
+
return { typeParameter: e.TypeParameter };
|
|
104
|
+
throw new Error(`Unexpected type ${JSON.stringify(e)}`);
|
|
209
105
|
}
|
|
210
|
-
const N = t.enum("CompressedSignature", {
|
|
211
|
-
ED25519: t.bytes(64),
|
|
212
|
-
Secp256k1: t.bytes(64),
|
|
213
|
-
Secp256r1: t.bytes(64),
|
|
214
|
-
ZkLogin: t.byteVector(),
|
|
215
|
-
Passkey: t.byteVector()
|
|
216
|
-
}), _ = t.enum("PublicKey", {
|
|
217
|
-
ED25519: t.bytes(32),
|
|
218
|
-
Secp256k1: t.bytes(33),
|
|
219
|
-
Secp256r1: t.bytes(33),
|
|
220
|
-
ZkLogin: t.byteVector(),
|
|
221
|
-
Passkey: t.bytes(33)
|
|
222
|
-
}), G = t.struct("MultiSigPkMap", {
|
|
223
|
-
pubKey: _,
|
|
224
|
-
weight: t.u8()
|
|
225
|
-
}), z = t.struct("MultiSigPublicKey", {
|
|
226
|
-
pk_map: t.vector(G),
|
|
227
|
-
threshold: t.u16()
|
|
228
|
-
}), W = t.struct("MultiSig", {
|
|
229
|
-
sigs: t.vector(N),
|
|
230
|
-
bitmap: t.u16(),
|
|
231
|
-
multisig_pk: z
|
|
232
|
-
}), B = t.byteVector().transform({
|
|
233
|
-
input: (e) => typeof e == "string" ? u(e) : e,
|
|
234
|
-
output: (e) => o(new Uint8Array(e))
|
|
235
|
-
}), H = t.struct("SenderSignedTransaction", {
|
|
236
|
-
intentMessage: K(v),
|
|
237
|
-
txSignatures: t.vector(B)
|
|
238
|
-
}), X = t.vector(H, {
|
|
239
|
-
name: "SenderSignedData"
|
|
240
|
-
}), Y = t.struct("PasskeyAuthenticator", {
|
|
241
|
-
authenticatorData: t.byteVector(),
|
|
242
|
-
clientDataJson: t.string(),
|
|
243
|
-
userSignature: t.byteVector()
|
|
244
|
-
});
|
|
245
106
|
export {
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
V as CallArg,
|
|
250
|
-
P as Command,
|
|
251
|
-
N as CompressedSignature,
|
|
252
|
-
I as GasData,
|
|
253
|
-
x as Intent,
|
|
254
|
-
K as IntentMessage,
|
|
255
|
-
E as IntentScope,
|
|
256
|
-
R as IntentVersion,
|
|
257
|
-
W as MultiSig,
|
|
258
|
-
G as MultiSigPkMap,
|
|
259
|
-
z as MultiSigPublicKey,
|
|
260
|
-
h as ObjectArg,
|
|
261
|
-
O as ObjectDigest,
|
|
262
|
-
Q as Owner,
|
|
263
|
-
Y as PasskeyAuthenticator,
|
|
264
|
-
M as ProgrammableMoveCall,
|
|
265
|
-
C as ProgrammableTransaction,
|
|
266
|
-
_ as PublicKey,
|
|
267
|
-
X as SenderSignedData,
|
|
268
|
-
H as SenderSignedTransaction,
|
|
269
|
-
A as SharedObjectRef,
|
|
270
|
-
D as StructTag,
|
|
271
|
-
c as SuiObjectRef,
|
|
272
|
-
v as TransactionData,
|
|
273
|
-
j as TransactionDataV1,
|
|
274
|
-
w as TransactionExpiration,
|
|
275
|
-
k as TransactionKind,
|
|
276
|
-
d as TypeTag,
|
|
277
|
-
B as base64String
|
|
107
|
+
u as getPureBcsSchema,
|
|
108
|
+
M as isTxContext,
|
|
109
|
+
D as normalizedTypeToMoveTypeSignature
|
|
278
110
|
};
|
package/dist/index371.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index115.cjs"),o=require("./index384.cjs"),t=require("./index300.cjs");function u(i,r,s){const a=t.bcs.Address.serialize(i).toBytes(),n=t.bcs.TypeTag.serialize(r).toBytes(),d=t.bcs.u64().serialize(s.length).toBytes(),e=o.blake2b.create({dkLen:32});return e.update(new Uint8Array([240])),e.update(a),e.update(d),e.update(s),e.update(n),`0x${c.toHex(e.digest().slice(0,32))}`}exports.deriveDynamicFieldID=u;
|
package/dist/index371.js
CHANGED
|
@@ -1,173 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
packageId: t,
|
|
11
|
-
ticketId: t
|
|
12
|
-
})
|
|
13
|
-
}), l = e.struct("ModuleId", {
|
|
14
|
-
address: t,
|
|
15
|
-
name: e.string()
|
|
16
|
-
}), a = e.struct("MoveLocation", {
|
|
17
|
-
module: l,
|
|
18
|
-
function: e.u16(),
|
|
19
|
-
instruction: e.u16(),
|
|
20
|
-
functionName: e.option(e.string())
|
|
21
|
-
}), d = e.enum("CommandArgumentError", {
|
|
22
|
-
TypeMismatch: null,
|
|
23
|
-
InvalidBCSBytes: null,
|
|
24
|
-
InvalidUsageOfPureArg: null,
|
|
25
|
-
InvalidArgumentToPrivateEntryFunction: null,
|
|
26
|
-
IndexOutOfBounds: e.struct("IndexOutOfBounds", { idx: e.u16() }),
|
|
27
|
-
SecondaryIndexOutOfBounds: e.struct("SecondaryIndexOutOfBounds", {
|
|
28
|
-
resultIdx: e.u16(),
|
|
29
|
-
secondaryIdx: e.u16()
|
|
30
|
-
}),
|
|
31
|
-
InvalidResultArity: e.struct("InvalidResultArity", { resultIdx: e.u16() }),
|
|
32
|
-
InvalidGasCoinUsage: null,
|
|
33
|
-
InvalidValueUsage: null,
|
|
34
|
-
InvalidObjectByValue: null,
|
|
35
|
-
InvalidObjectByMutRef: null,
|
|
36
|
-
SharedObjectOperationNotAllowed: null
|
|
37
|
-
}), g = e.enum("TypeArgumentError", {
|
|
38
|
-
TypeNotFound: null,
|
|
39
|
-
ConstraintNotSatisfied: null
|
|
40
|
-
}), p = e.enum("ExecutionFailureStatus", {
|
|
41
|
-
InsufficientGas: null,
|
|
42
|
-
InvalidGasObject: null,
|
|
43
|
-
InvariantViolation: null,
|
|
44
|
-
FeatureNotYetSupported: null,
|
|
45
|
-
MoveObjectTooBig: e.struct("MoveObjectTooBig", {
|
|
46
|
-
objectSize: e.u64(),
|
|
47
|
-
maxObjectSize: e.u64()
|
|
48
|
-
}),
|
|
49
|
-
MovePackageTooBig: e.struct("MovePackageTooBig", {
|
|
50
|
-
objectSize: e.u64(),
|
|
51
|
-
maxObjectSize: e.u64()
|
|
52
|
-
}),
|
|
53
|
-
CircularObjectOwnership: e.struct("CircularObjectOwnership", { object: t }),
|
|
54
|
-
InsufficientCoinBalance: null,
|
|
55
|
-
CoinBalanceOverflow: null,
|
|
56
|
-
PublishErrorNonZeroAddress: null,
|
|
57
|
-
SuiMoveVerificationError: null,
|
|
58
|
-
MovePrimitiveRuntimeError: e.option(a),
|
|
59
|
-
MoveAbort: e.tuple([a, e.u64()]),
|
|
60
|
-
VMVerificationOrDeserializationError: null,
|
|
61
|
-
VMInvariantViolation: null,
|
|
62
|
-
FunctionNotFound: null,
|
|
63
|
-
ArityMismatch: null,
|
|
64
|
-
TypeArityMismatch: null,
|
|
65
|
-
NonEntryFunctionInvoked: null,
|
|
66
|
-
CommandArgumentError: e.struct("CommandArgumentError", {
|
|
67
|
-
argIdx: e.u16(),
|
|
68
|
-
kind: d
|
|
69
|
-
}),
|
|
70
|
-
TypeArgumentError: e.struct("TypeArgumentError", {
|
|
71
|
-
argumentIdx: e.u16(),
|
|
72
|
-
kind: g
|
|
73
|
-
}),
|
|
74
|
-
UnusedValueWithoutDrop: e.struct("UnusedValueWithoutDrop", {
|
|
75
|
-
resultIdx: e.u16(),
|
|
76
|
-
secondaryIdx: e.u16()
|
|
77
|
-
}),
|
|
78
|
-
InvalidPublicFunctionReturnType: e.struct("InvalidPublicFunctionReturnType", {
|
|
79
|
-
idx: e.u16()
|
|
80
|
-
}),
|
|
81
|
-
InvalidTransferObject: null,
|
|
82
|
-
EffectsTooLarge: e.struct("EffectsTooLarge", { currentSize: e.u64(), maxSize: e.u64() }),
|
|
83
|
-
PublishUpgradeMissingDependency: null,
|
|
84
|
-
PublishUpgradeDependencyDowngrade: null,
|
|
85
|
-
PackageUpgradeError: e.struct("PackageUpgradeError", { upgradeError: s }),
|
|
86
|
-
WrittenObjectsTooLarge: e.struct("WrittenObjectsTooLarge", {
|
|
87
|
-
currentSize: e.u64(),
|
|
88
|
-
maxSize: e.u64()
|
|
89
|
-
}),
|
|
90
|
-
CertificateDenied: null,
|
|
91
|
-
SuiMoveVerificationTimedout: null,
|
|
92
|
-
SharedObjectOperationNotAllowed: null,
|
|
93
|
-
InputObjectDeleted: null,
|
|
94
|
-
ExecutionCancelledDueToSharedObjectCongestion: e.struct(
|
|
95
|
-
"ExecutionCancelledDueToSharedObjectCongestion",
|
|
96
|
-
{
|
|
97
|
-
congestedObjects: e.vector(t)
|
|
98
|
-
}
|
|
99
|
-
),
|
|
100
|
-
AddressDeniedForCoin: e.struct("AddressDeniedForCoin", {
|
|
101
|
-
address: t,
|
|
102
|
-
coinType: e.string()
|
|
103
|
-
}),
|
|
104
|
-
CoinTypeGlobalPause: e.struct("CoinTypeGlobalPause", { coinType: e.string() }),
|
|
105
|
-
ExecutionCancelledDueToRandomnessUnavailable: null
|
|
106
|
-
}), c = e.enum("ExecutionStatus", {
|
|
107
|
-
Success: null,
|
|
108
|
-
Failed: e.struct("ExecutionFailed", {
|
|
109
|
-
error: p,
|
|
110
|
-
command: e.option(e.u64())
|
|
111
|
-
})
|
|
112
|
-
}), i = e.struct("GasCostSummary", {
|
|
113
|
-
computationCost: e.u64(),
|
|
114
|
-
storageCost: e.u64(),
|
|
115
|
-
storageRebate: e.u64(),
|
|
116
|
-
nonRefundableStorageFee: e.u64()
|
|
117
|
-
}), m = e.struct("TransactionEffectsV1", {
|
|
118
|
-
status: c,
|
|
119
|
-
executedEpoch: e.u64(),
|
|
120
|
-
gasUsed: i,
|
|
121
|
-
modifiedAtVersions: e.vector(e.tuple([t, e.u64()])),
|
|
122
|
-
sharedObjects: e.vector(o),
|
|
123
|
-
transactionDigest: n,
|
|
124
|
-
created: e.vector(e.tuple([o, u])),
|
|
125
|
-
mutated: e.vector(e.tuple([o, u])),
|
|
126
|
-
unwrapped: e.vector(e.tuple([o, u])),
|
|
127
|
-
deleted: e.vector(o),
|
|
128
|
-
unwrappedThenDeleted: e.vector(o),
|
|
129
|
-
wrapped: e.vector(o),
|
|
130
|
-
gasObject: e.tuple([o, u]),
|
|
131
|
-
eventsDigest: e.option(n),
|
|
132
|
-
dependencies: e.vector(n)
|
|
133
|
-
}), r = e.tuple([e.u64(), n]), O = e.enum("ObjectIn", {
|
|
134
|
-
NotExist: null,
|
|
135
|
-
Exist: e.tuple([r, u])
|
|
136
|
-
}), b = e.enum("ObjectOut", {
|
|
137
|
-
NotExist: null,
|
|
138
|
-
ObjectWrite: e.tuple([n, u]),
|
|
139
|
-
PackageWrite: r
|
|
140
|
-
}), f = e.enum("IDOperation", {
|
|
141
|
-
None: null,
|
|
142
|
-
Created: null,
|
|
143
|
-
Deleted: null
|
|
144
|
-
}), v = e.struct("EffectsObjectChange", {
|
|
145
|
-
inputState: O,
|
|
146
|
-
outputState: b,
|
|
147
|
-
idOperation: f
|
|
148
|
-
}), I = e.enum("UnchangedSharedKind", {
|
|
149
|
-
ReadOnlyRoot: r,
|
|
150
|
-
// TODO: these have been renamed to MutateConsensusStreamEnded and ReadConsensusStreamEnded
|
|
151
|
-
MutateDeleted: e.u64(),
|
|
152
|
-
ReadDeleted: e.u64(),
|
|
153
|
-
Cancelled: e.u64(),
|
|
154
|
-
PerEpochConfig: null
|
|
155
|
-
}), E = e.struct("TransactionEffectsV2", {
|
|
156
|
-
status: c,
|
|
157
|
-
executedEpoch: e.u64(),
|
|
158
|
-
gasUsed: i,
|
|
159
|
-
transactionDigest: n,
|
|
160
|
-
gasObjectIndex: e.option(e.u32()),
|
|
161
|
-
eventsDigest: e.option(n),
|
|
162
|
-
dependencies: e.vector(n),
|
|
163
|
-
lamportVersion: e.u64(),
|
|
164
|
-
changedObjects: e.vector(e.tuple([t, v])),
|
|
165
|
-
unchangedSharedObjects: e.vector(e.tuple([t, I])),
|
|
166
|
-
auxDataDigest: e.option(n)
|
|
167
|
-
}), y = e.enum("TransactionEffects", {
|
|
168
|
-
V1: m,
|
|
169
|
-
V2: E
|
|
170
|
-
});
|
|
1
|
+
import { toHex as n } from "./index115.js";
|
|
2
|
+
import { blake2b as c } from "./index384.js";
|
|
3
|
+
import { bcs as t } from "./index300.js";
|
|
4
|
+
function m(r, a, s) {
|
|
5
|
+
const i = t.Address.serialize(r).toBytes(), o = t.TypeTag.serialize(a).toBytes(), d = t.u64().serialize(s.length).toBytes(), e = c.create({
|
|
6
|
+
dkLen: 32
|
|
7
|
+
});
|
|
8
|
+
return e.update(new Uint8Array([240])), e.update(i), e.update(d), e.update(s), e.update(o), `0x${n(e.digest().slice(0, 32))}`;
|
|
9
|
+
}
|
|
171
10
|
export {
|
|
172
|
-
|
|
11
|
+
m as deriveDynamicFieldID
|
|
173
12
|
};
|
package/dist/index372.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function r(a,y,i){let e="";if(i)for(const t of Object.entries(i)){if(!t)continue;let s="";for(const n of t[1])s+=`[${n.type}${n.name?`:${n.name}`:""}]`;e+=`(${t[0]}{${s}})`}return y?`${y}:${a}${e}`:`${a}${e}`}const d=new Map([["address",{type:"address"}],["bool",{type:"bool"}],["bytes",{type:"bytes"}],["bytes32",{type:"bytes32"}],["int",{type:"int256"}],["int256",{type:"int256"}],["string",{type:"string"}],["uint",{type:"uint256"}],["uint8",{type:"uint8"}],["uint16",{type:"uint16"}],["uint24",{type:"uint24"}],["uint32",{type:"uint32"}],["uint64",{type:"uint64"}],["uint96",{type:"uint96"}],["uint112",{type:"uint112"}],["uint160",{type:"uint160"}],["uint192",{type:"uint192"}],["uint256",{type:"uint256"}],["address owner",{type:"address",name:"owner"}],["address to",{type:"address",name:"to"}],["bool approved",{type:"bool",name:"approved"}],["bytes _data",{type:"bytes",name:"_data"}],["bytes data",{type:"bytes",name:"data"}],["bytes signature",{type:"bytes",name:"signature"}],["bytes32 hash",{type:"bytes32",name:"hash"}],["bytes32 r",{type:"bytes32",name:"r"}],["bytes32 root",{type:"bytes32",name:"root"}],["bytes32 s",{type:"bytes32",name:"s"}],["string name",{type:"string",name:"name"}],["string symbol",{type:"string",name:"symbol"}],["string tokenURI",{type:"string",name:"tokenURI"}],["uint tokenId",{type:"uint256",name:"tokenId"}],["uint8 v",{type:"uint8",name:"v"}],["uint256 balance",{type:"uint256",name:"balance"}],["uint256 tokenId",{type:"uint256",name:"tokenId"}],["uint256 value",{type:"uint256",name:"value"}],["event:address indexed from",{type:"address",name:"from",indexed:!0}],["event:address indexed to",{type:"address",name:"to",indexed:!0}],["event:uint indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}],["event:uint256 indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}]]);exports.getParameterCacheKey=r;exports.parameterCache=d;
|
package/dist/index372.js
CHANGED
|
@@ -1,12 +1,71 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
function d(y, i, a) {
|
|
2
|
+
let e = "";
|
|
3
|
+
if (a)
|
|
4
|
+
for (const t of Object.entries(a)) {
|
|
5
|
+
if (!t)
|
|
6
|
+
continue;
|
|
7
|
+
let s = "";
|
|
8
|
+
for (const n of t[1])
|
|
9
|
+
s += `[${n.type}${n.name ? `:${n.name}` : ""}]`;
|
|
10
|
+
e += `(${t[0]}{${s}})`;
|
|
11
|
+
}
|
|
12
|
+
return i ? `${i}:${y}${e}` : `${y}${e}`;
|
|
13
|
+
}
|
|
14
|
+
const p = /* @__PURE__ */ new Map([
|
|
15
|
+
// Unnamed
|
|
16
|
+
["address", { type: "address" }],
|
|
17
|
+
["bool", { type: "bool" }],
|
|
18
|
+
["bytes", { type: "bytes" }],
|
|
19
|
+
["bytes32", { type: "bytes32" }],
|
|
20
|
+
["int", { type: "int256" }],
|
|
21
|
+
["int256", { type: "int256" }],
|
|
22
|
+
["string", { type: "string" }],
|
|
23
|
+
["uint", { type: "uint256" }],
|
|
24
|
+
["uint8", { type: "uint8" }],
|
|
25
|
+
["uint16", { type: "uint16" }],
|
|
26
|
+
["uint24", { type: "uint24" }],
|
|
27
|
+
["uint32", { type: "uint32" }],
|
|
28
|
+
["uint64", { type: "uint64" }],
|
|
29
|
+
["uint96", { type: "uint96" }],
|
|
30
|
+
["uint112", { type: "uint112" }],
|
|
31
|
+
["uint160", { type: "uint160" }],
|
|
32
|
+
["uint192", { type: "uint192" }],
|
|
33
|
+
["uint256", { type: "uint256" }],
|
|
34
|
+
// Named
|
|
35
|
+
["address owner", { type: "address", name: "owner" }],
|
|
36
|
+
["address to", { type: "address", name: "to" }],
|
|
37
|
+
["bool approved", { type: "bool", name: "approved" }],
|
|
38
|
+
["bytes _data", { type: "bytes", name: "_data" }],
|
|
39
|
+
["bytes data", { type: "bytes", name: "data" }],
|
|
40
|
+
["bytes signature", { type: "bytes", name: "signature" }],
|
|
41
|
+
["bytes32 hash", { type: "bytes32", name: "hash" }],
|
|
42
|
+
["bytes32 r", { type: "bytes32", name: "r" }],
|
|
43
|
+
["bytes32 root", { type: "bytes32", name: "root" }],
|
|
44
|
+
["bytes32 s", { type: "bytes32", name: "s" }],
|
|
45
|
+
["string name", { type: "string", name: "name" }],
|
|
46
|
+
["string symbol", { type: "string", name: "symbol" }],
|
|
47
|
+
["string tokenURI", { type: "string", name: "tokenURI" }],
|
|
48
|
+
["uint tokenId", { type: "uint256", name: "tokenId" }],
|
|
49
|
+
["uint8 v", { type: "uint8", name: "v" }],
|
|
50
|
+
["uint256 balance", { type: "uint256", name: "balance" }],
|
|
51
|
+
["uint256 tokenId", { type: "uint256", name: "tokenId" }],
|
|
52
|
+
["uint256 value", { type: "uint256", name: "value" }],
|
|
53
|
+
// Indexed
|
|
54
|
+
[
|
|
55
|
+
"event:address indexed from",
|
|
56
|
+
{ type: "address", name: "from", indexed: !0 }
|
|
57
|
+
],
|
|
58
|
+
["event:address indexed to", { type: "address", name: "to", indexed: !0 }],
|
|
59
|
+
[
|
|
60
|
+
"event:uint indexed tokenId",
|
|
61
|
+
{ type: "uint256", name: "tokenId", indexed: !0 }
|
|
62
|
+
],
|
|
63
|
+
[
|
|
64
|
+
"event:uint256 indexed tokenId",
|
|
65
|
+
{ type: "uint256", name: "tokenId", indexed: !0 }
|
|
66
|
+
]
|
|
67
|
+
]);
|
|
8
68
|
export {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
I as SUI_TYPE_ARG
|
|
69
|
+
d as getParameterCacheKey,
|
|
70
|
+
p as parameterCache
|
|
12
71
|
};
|