@gardenfi/swap 0.0.2 → 0.1.0-beta.1
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 +1 -1
- package/dist/index106.cjs +1 -1
- package/dist/index106.js +3 -3
- package/dist/index107.cjs +1 -1
- package/dist/index107.js +1 -1
- package/dist/index113.cjs +1 -1
- package/dist/index113.js +1 -1
- 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/index126.cjs +1 -1
- package/dist/index126.js +3 -3
- package/dist/index127.cjs +1 -1
- package/dist/index127.js +1 -1
- package/dist/index128.cjs +1 -1
- package/dist/index128.js +2 -2
- package/dist/index129.cjs +1 -1
- package/dist/index129.js +1 -1
- package/dist/index130.cjs +1 -1
- package/dist/index130.js +3 -3
- 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 +1 -1
- package/dist/index140.cjs +1 -1
- package/dist/index140.js +1 -1
- package/dist/index148.cjs +1 -1
- package/dist/index148.js +1 -1
- package/dist/index149.cjs +1 -1
- package/dist/index149.js +1 -1
- package/dist/index154.cjs +1 -1
- package/dist/index154.js +1 -1
- package/dist/index160.cjs +1 -1
- package/dist/index160.js +1 -1
- package/dist/index162.cjs +1 -1
- package/dist/index162.js +2 -2
- package/dist/index167.cjs +1 -1
- package/dist/index167.js +2 -2
- 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/index173.cjs +1 -1
- package/dist/index173.js +2 -2
- package/dist/index178.cjs +1 -1
- package/dist/index178.js +1 -1
- package/dist/index18.cjs +1 -1
- package/dist/index18.js +3 -3
- package/dist/index181.cjs +1 -1
- package/dist/index181.js +1 -1
- package/dist/index182.cjs +1 -1
- package/dist/index182.js +61 -42
- package/dist/index19.cjs +1 -1
- package/dist/index19.js +18 -18
- package/dist/index190.cjs +1 -1
- package/dist/index190.js +1 -1
- package/dist/index195.cjs +1 -1
- package/dist/index195.js +19 -19
- package/dist/index20.cjs +1 -1
- package/dist/index20.js +2 -2
- package/dist/index21.cjs +1 -1
- package/dist/index21.js +19 -19
- package/dist/index217.cjs +1 -1
- package/dist/index217.js +58 -49
- package/dist/index24.cjs +1 -1
- package/dist/index24.js +2 -2
- package/dist/index242.cjs +1 -1
- package/dist/index242.js +1 -1
- package/dist/index247.cjs +1 -1
- package/dist/index247.js +2 -2
- package/dist/index248.cjs +1 -1
- package/dist/index248.js +1 -1
- package/dist/index249.cjs +1 -1
- package/dist/index249.js +2 -2
- package/dist/index260.cjs +1 -1
- package/dist/index260.js +3 -3
- package/dist/index272.cjs +1 -1
- package/dist/index272.js +1 -1
- package/dist/index273.cjs +1 -1
- package/dist/index273.js +1 -1
- package/dist/index276.cjs +1 -1
- package/dist/index276.js +3 -3
- package/dist/index278.cjs +1 -1
- package/dist/index278.js +1 -1
- package/dist/index28.cjs +1 -1
- package/dist/index28.js +58 -58
- package/dist/index281.cjs +1 -1
- package/dist/index281.js +140 -54
- package/dist/index282.cjs +1 -1
- package/dist/index282.js +5 -120
- package/dist/index283.cjs +2 -1
- package/dist/index283.js +42 -5
- package/dist/index284.cjs +1 -1
- package/dist/index284.js +2 -8
- package/dist/index285.cjs +1 -1
- package/dist/index285.js +5 -4
- package/dist/index286.cjs +1 -1
- package/dist/index286.js +9 -162
- package/dist/index287.cjs +1 -1
- package/dist/index287.js +20 -5
- package/dist/index288.cjs +1 -2
- package/dist/index288.js +8 -41
- package/dist/index289.cjs +1 -1
- package/dist/index289.js +73 -2
- package/dist/index290.cjs +1 -1
- package/dist/index290.js +65 -5
- package/dist/index291.cjs +1 -1
- package/dist/index291.js +187 -9
- package/dist/index292.cjs +1 -1
- package/dist/index292.js +20 -17
- package/dist/index293.cjs +1 -1
- package/dist/index293.js +42 -8
- package/dist/index294.cjs +1 -1
- package/dist/index294.js +24 -71
- package/dist/index295.cjs +1 -1
- package/dist/index295.js +86 -61
- package/dist/index296.cjs +1 -1
- package/dist/index296.js +35 -183
- package/dist/index297.cjs +1 -1
- package/dist/index297.js +15 -21
- package/dist/index298.cjs +1 -1
- package/dist/index298.js +5 -34
- package/dist/index299.cjs +1 -1
- package/dist/index299.js +36 -24
- package/dist/index3.cjs +1 -1
- package/dist/index3.js +4 -12
- package/dist/index300.cjs +1 -1
- package/dist/index300.js +15 -90
- package/dist/index301.cjs +1 -1
- package/dist/index301.js +8 -40
- package/dist/index302.cjs +1 -1
- package/dist/index302.js +7 -16
- package/dist/index303.cjs +1 -1
- package/dist/index303.js +41 -12
- package/dist/index304.cjs +1 -1
- package/dist/index304.js +318 -35
- package/dist/index305.cjs +1 -1
- package/dist/index305.js +605 -15
- package/dist/index306.cjs +1 -1
- package/dist/index306.js +110 -9
- package/dist/index307.cjs +1 -1
- package/dist/index307.js +167 -42
- package/dist/index308.cjs +1 -1
- package/dist/index308.js +291 -310
- package/dist/index309.cjs +1 -1
- package/dist/index309.js +94 -606
- package/dist/index31.cjs +1 -1
- package/dist/index31.js +1 -1
- package/dist/index310.cjs +1 -1
- package/dist/index310.js +44 -97
- package/dist/index311.cjs +1 -1
- package/dist/index311.js +52 -166
- package/dist/index312.cjs +1 -1
- package/dist/index312.js +41 -298
- package/dist/index313.cjs +1 -1
- package/dist/index313.js +15 -93
- package/dist/index314.cjs +1 -1
- package/dist/index314.js +310 -49
- package/dist/index315.cjs +1 -1
- package/dist/index315.js +57 -51
- package/dist/index316.cjs +1 -1
- package/dist/index316.js +18 -43
- package/dist/index317.cjs +1 -1
- package/dist/index317.js +28 -14
- package/dist/index318.cjs +1 -1
- package/dist/index318.js +3 -317
- package/dist/index319.cjs +7 -1
- package/dist/index319.js +232 -54
- package/dist/index32.cjs +1 -1
- package/dist/index32.js +1 -1
- package/dist/index320.cjs +1 -1
- package/dist/index320.js +47 -19
- package/dist/index321.cjs +1 -1
- package/dist/index321.js +208 -25
- package/dist/index322.cjs +1 -1
- package/dist/index322.js +81 -3
- package/dist/index323.cjs +1 -7
- package/dist/index323.js +27 -235
- package/dist/index324.cjs +1 -1
- package/dist/index324.js +77 -48
- package/dist/index325.cjs +1 -1
- package/dist/index325.js +9 -212
- package/dist/index326.cjs +1 -1
- package/dist/index326.js +15 -80
- package/dist/index327.cjs +1 -1
- package/dist/index327.js +20 -27
- package/dist/index328.cjs +1 -1
- package/dist/index328.js +13 -76
- package/dist/index329.cjs +1 -1
- package/dist/index329.js +13 -7
- package/dist/index330.cjs +1 -1
- package/dist/index330.js +14 -11
- package/dist/index331.cjs +1 -1
- package/dist/index331.js +9 -13
- package/dist/index332.cjs +1 -1
- package/dist/index332.js +13 -10
- package/dist/index333.cjs +1 -1
- package/dist/index333.js +25 -9
- package/dist/index334.cjs +1 -1
- package/dist/index334.js +31 -16
- package/dist/index335.cjs +2 -1
- package/dist/index335.js +18 -22
- package/dist/index336.cjs +1 -1
- package/dist/index336.js +14 -13
- package/dist/index337.cjs +1 -1
- package/dist/index337.js +11 -14
- package/dist/index338.cjs +1 -1
- package/dist/index338.js +10 -7
- package/dist/index339.cjs +1 -1
- package/dist/index339.js +32 -14
- package/dist/index340.cjs +1 -1
- package/dist/index340.js +115 -25
- package/dist/index341.cjs +1 -1
- package/dist/index341.js +102 -30
- package/dist/index342.cjs +1 -2
- package/dist/index342.js +6 -18
- package/dist/index343.cjs +1 -1
- package/dist/index343.js +7 -15
- package/dist/index344.cjs +1 -1
- package/dist/index344.js +25 -32
- package/dist/index345.cjs +1 -1
- package/dist/index345.js +16 -115
- package/dist/index346.cjs +1 -1
- package/dist/index346.js +212 -101
- package/dist/index347.cjs +1 -1
- package/dist/index347.js +7 -6
- package/dist/index348.cjs +1 -1
- package/dist/index348.js +120 -7
- package/dist/index349.cjs +1 -1
- package/dist/index349.js +4 -26
- package/dist/index350.cjs +2 -1
- package/dist/index350.js +193 -16
- package/dist/index351.cjs +1 -1
- package/dist/index351.js +72 -209
- package/dist/index352.cjs +1 -2
- package/dist/index352.js +317 -167
- package/dist/index353.cjs +1 -1
- package/dist/index353.js +160 -16
- package/dist/index354.cjs +1 -1
- package/dist/index354.js +5 -15
- package/dist/index355.cjs +1 -1
- package/dist/index355.js +12 -7
- package/dist/index356.cjs +1 -1
- package/dist/index356.js +16 -52
- package/dist/index357.cjs +1 -1
- package/dist/index357.js +51 -20
- package/dist/index358.cjs +1 -1
- package/dist/index358.js +10 -2
- package/dist/index363.cjs +1 -1
- package/dist/index363.js +1 -1
- package/dist/index364.cjs +1 -1
- package/dist/index364.js +1 -1
- package/dist/index365.cjs +1 -1
- package/dist/index365.js +3 -275
- package/dist/index366.cjs +1 -1
- package/dist/index366.js +73 -170
- package/dist/index367.cjs +1 -1
- package/dist/index367.js +32 -10
- package/dist/index368.cjs +1 -1
- package/dist/index368.js +5 -107
- package/dist/index369.cjs +1 -1
- package/dist/index369.js +140 -5
- package/dist/index370.cjs +1 -1
- package/dist/index370.js +274 -72
- package/dist/index371.cjs +1 -1
- package/dist/index371.js +171 -10
- package/dist/index372.cjs +1 -1
- package/dist/index372.js +10 -32
- package/dist/index373.cjs +1 -1
- package/dist/index373.js +101 -134
- package/dist/index374.cjs +1 -1
- package/dist/index374.js +9 -3
- package/dist/index375.cjs +1 -1
- package/dist/index375.js +4 -4
- package/dist/index376.cjs +1 -1
- package/dist/index376.js +1 -1
- package/dist/index378.cjs +1 -1
- package/dist/index378.js +1 -1
- package/dist/index379.cjs +1 -1
- package/dist/index379.js +1 -1
- package/dist/index38.cjs +1 -1
- package/dist/index38.js +2 -2
- package/dist/index380.cjs +1 -1
- package/dist/index380.js +1 -1
- package/dist/index381.cjs +1 -1
- package/dist/index381.js +2 -344
- package/dist/index382.cjs +1 -1
- package/dist/index382.js +15 -154
- package/dist/index383.cjs +1 -1
- package/dist/index383.js +110 -3
- package/dist/index384.cjs +1 -1
- package/dist/index384.js +3 -63
- package/dist/index385.cjs +1 -1
- package/dist/index385.js +59 -106
- package/dist/index386.cjs +1 -1
- package/dist/index386.js +2 -2
- package/dist/index42.cjs +1 -1
- package/dist/index42.js +88 -12
- package/dist/index43.cjs +1 -1
- package/dist/index43.js +13 -58
- package/dist/index44.cjs +1 -1
- package/dist/index44.js +12 -522
- package/dist/index45.cjs +1 -1
- package/dist/index45.js +59 -30
- package/dist/index46.cjs +1 -1
- package/dist/index46.js +522 -26
- package/dist/index47.cjs +1 -1
- package/dist/index47.js +16 -12
- package/dist/index48.cjs +1 -1
- package/dist/index48.js +12 -35
- package/dist/index49.cjs +1 -1
- package/dist/index49.js +14 -16
- package/dist/index50.cjs +1 -1
- package/dist/index50.js +38 -17
- package/dist/index51.cjs +1 -1
- package/dist/index51.js +15 -18
- package/dist/index52.cjs +1 -1
- package/dist/index52.js +17 -19
- package/dist/index53.cjs +1 -1
- package/dist/index53.js +17 -42
- package/dist/index54.cjs +1 -1
- package/dist/index54.js +15 -39
- package/dist/index55.cjs +1 -1
- package/dist/index55.js +49 -29
- package/dist/index56.cjs +1 -1
- package/dist/index56.js +46 -29
- package/dist/index57.cjs +1 -1
- package/dist/index57.js +26 -20
- package/dist/index58.cjs +1 -1
- package/dist/index58.js +27 -18
- package/dist/index59.cjs +1 -1
- package/dist/index59.js +16 -14
- package/dist/index60.cjs +1 -1
- package/dist/index60.js +28 -15
- package/dist/index61.cjs +1 -1
- package/dist/index61.js +28 -14
- package/dist/index62.cjs +1 -1
- package/dist/index62.js +13 -86
- package/dist/index63.cjs +1 -1
- package/dist/index63.js +13 -13
- package/dist/index64.cjs +1 -1
- package/dist/index64.js +17 -32
- package/dist/index65.cjs +1 -1
- package/dist/index65.js +9 -14
- package/dist/index66.cjs +1 -1
- package/dist/index66.js +32 -17
- package/dist/index67.cjs +1 -1
- package/dist/index67.js +14 -9
- package/dist/index71.cjs +1 -1
- package/dist/index71.js +28 -19
- package/dist/index77.cjs +1 -1
- package/dist/index77.js +13 -13
- package/dist/index9.cjs +1 -1
- package/dist/index9.js +27 -19
- package/dist/index92.cjs +1 -1
- package/dist/index92.js +1 -1
- package/dist/src/lib/constants/wagmiConfig.d.ts +9 -9
- package/dist/src/lib/store/swapStore.d.ts +1 -1
- package/dist/src/lib/types/types.d.ts +0 -1
- package/package.json +6 -6
package/dist/index371.js
CHANGED
|
@@ -1,12 +1,173 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
})
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { bcs as e } from "./index364.js";
|
|
2
|
+
import { ObjectDigest as n, Address as t, SuiObjectRef as o, Owner as u } from "./index370.js";
|
|
3
|
+
const s = e.enum("PackageUpgradeError", {
|
|
4
|
+
UnableToFetchPackage: e.struct("UnableToFetchPackage", { packageId: t }),
|
|
5
|
+
NotAPackage: e.struct("NotAPackage", { objectId: t }),
|
|
6
|
+
IncompatibleUpgrade: null,
|
|
7
|
+
DigestDoesNotMatch: e.struct("DigestDoesNotMatch", { digest: e.byteVector() }),
|
|
8
|
+
UnknownUpgradePolicy: e.struct("UnknownUpgradePolicy", { policy: e.u8() }),
|
|
9
|
+
PackageIDDoesNotMatch: e.struct("PackageIDDoesNotMatch", {
|
|
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
|
+
});
|
|
10
171
|
export {
|
|
11
|
-
|
|
172
|
+
y as TransactionEffects
|
|
12
173
|
};
|
package/dist/index372.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 S=require("./index117.cjs");BigInt(1e9);const t="0x1",e="0x2";S.normalizeSuiObjectId("0x6");const i=`${e}::sui::SUI`;S.normalizeSuiObjectId("0x5");S.normalizeSuiObjectId("0x8");exports.MOVE_STDLIB_ADDRESS=t;exports.SUI_FRAMEWORK_ADDRESS=e;exports.SUI_TYPE_ARG=i;
|
package/dist/index372.js
CHANGED
|
@@ -1,34 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
return r.u16();
|
|
9
|
-
case "u32":
|
|
10
|
-
return r.u32();
|
|
11
|
-
case "u64":
|
|
12
|
-
return r.u64();
|
|
13
|
-
case "u128":
|
|
14
|
-
return r.u128();
|
|
15
|
-
case "u256":
|
|
16
|
-
return r.u256();
|
|
17
|
-
case "bool":
|
|
18
|
-
return r.bool();
|
|
19
|
-
case "string":
|
|
20
|
-
return r.string();
|
|
21
|
-
case "id":
|
|
22
|
-
case "address":
|
|
23
|
-
return s;
|
|
24
|
-
}
|
|
25
|
-
const t = e.match(/^(vector|option)<(.+)>$/);
|
|
26
|
-
if (t) {
|
|
27
|
-
const [c, u] = t.slice(1);
|
|
28
|
-
return c === "vector" ? r.vector(n(u)) : r.option(n(u));
|
|
29
|
-
}
|
|
30
|
-
throw new Error(`Invalid Pure type name: ${e}`);
|
|
31
|
-
}
|
|
1
|
+
import { normalizeSuiObjectId as S } from "./index117.js";
|
|
2
|
+
BigInt(1e9);
|
|
3
|
+
const x = "0x1", o = "0x2";
|
|
4
|
+
S("0x6");
|
|
5
|
+
const I = `${o}::sui::SUI`;
|
|
6
|
+
S("0x5");
|
|
7
|
+
S("0x8");
|
|
32
8
|
export {
|
|
33
|
-
|
|
9
|
+
x as MOVE_STDLIB_ADDRESS,
|
|
10
|
+
o as SUI_FRAMEWORK_ADDRESS,
|
|
11
|
+
I as SUI_TYPE_ARG
|
|
34
12
|
};
|
package/dist/index373.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 r=require("./index320.cjs"),o=require("./index117.cjs"),u=require("./index372.cjs"),a="object",d="ID",i="ascii",f="String",T="string",l="String",b="option",_="Option";function m(e){const t=typeof e.body=="object"&&"datatype"in e.body?e.body.datatype:null;return!!t&&o.normalizeSuiAddress(t.package)===o.normalizeSuiAddress("0x2")&&t.module==="tx_context"&&t.type==="TxContext"}function c(e){if(typeof e=="string")switch(e){case"address":return r.bcs.Address;case"bool":return r.bcs.Bool;case"u8":return r.bcs.U8;case"u16":return r.bcs.U16;case"u32":return r.bcs.U32;case"u64":return r.bcs.U64;case"u128":return r.bcs.U128;case"u256":return r.bcs.U256;default:throw new Error(`Unknown type signature ${e}`)}if("vector"in e){if(e.vector==="u8")return r.bcs.byteVector().transform({input:n=>typeof n=="string"?new TextEncoder().encode(n):n,output:n=>n});const t=c(e.vector);return t?r.bcs.vector(t):null}if("datatype"in e){const t=o.normalizeSuiAddress(e.datatype.package);if(t===o.normalizeSuiAddress(u.MOVE_STDLIB_ADDRESS)){if(e.datatype.module===i&&e.datatype.type===f||e.datatype.module===T&&e.datatype.type===l)return r.bcs.String;if(e.datatype.module===b&&e.datatype.type===_){const n=c(e.datatype.typeParameters[0]);return n?r.bcs.vector(n):null}}if(t===o.normalizeSuiAddress(u.SUI_FRAMEWORK_ADDRESS)&&e.datatype.module===a&&e.datatype.type===d)return r.bcs.Address}return null}function U(e){return typeof e=="object"&&"Reference"in e?{ref:"&",body:s(e.Reference)}:typeof e=="object"&&"MutableReference"in e?{ref:"&mut",body:s(e.MutableReference)}:{ref:null,body:s(e)}}function s(e){if(typeof e=="string")switch(e){case"Address":return"address";case"Bool":return"bool";case"U8":return"u8";case"U16":return"u16";case"U32":return"u32";case"U64":return"u64";case"U128":return"u128";case"U256":return"u256";default:throw new Error(`Unexpected type ${e}`)}if("Vector"in e)return{vector:s(e.Vector)};if("Struct"in e)return{datatype:{package:e.Struct.address,module:e.Struct.module,type:e.Struct.name,typeParameters:e.Struct.typeArguments.map(s)}};if("TypeParameter"in e)return{typeParameter:e.TypeParameter};throw new Error(`Unexpected type ${JSON.stringify(e)}`)}exports.getPureBcsSchema=c;exports.isTxContext=m;exports.normalizedTypeToMoveTypeSignature=U;
|
package/dist/index373.js
CHANGED
|
@@ -1,143 +1,110 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const n = e.headers.get("content-type");
|
|
9
|
-
return n == null ? void 0 : n.startsWith("image/");
|
|
10
|
-
}
|
|
11
|
-
return !1;
|
|
12
|
-
} catch (e) {
|
|
13
|
-
return typeof e == "object" && typeof e.response < "u" || !Object.hasOwn(globalThis, "Image") ? !1 : new Promise((n) => {
|
|
14
|
-
const r = new Image();
|
|
15
|
-
r.onload = () => {
|
|
16
|
-
n(!0);
|
|
17
|
-
}, r.onerror = () => {
|
|
18
|
-
n(!1);
|
|
19
|
-
}, r.src = t;
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
function w(t, e) {
|
|
24
|
-
return t ? t.endsWith("/") ? t.slice(0, -1) : t : e;
|
|
1
|
+
import { bcs as r } from "./index320.js";
|
|
2
|
+
import { normalizeSuiAddress as n } from "./index117.js";
|
|
3
|
+
import { MOVE_STDLIB_ADDRESS as s, SUI_FRAMEWORK_ADDRESS as a } from "./index372.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";
|
|
25
8
|
}
|
|
26
|
-
function
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
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;
|
|
34
39
|
}
|
|
35
|
-
if (
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
return {
|
|
50
|
-
uri: c,
|
|
51
|
-
isOnChain: !0,
|
|
52
|
-
isEncoded: !1
|
|
53
|
-
};
|
|
54
|
-
throw new d({ uri: t });
|
|
55
|
-
}
|
|
56
|
-
function O(t) {
|
|
57
|
-
if (typeof t != "object" || !("image" in t) && !("image_url" in t) && !("image_data" in t))
|
|
58
|
-
throw new A({ data: t });
|
|
59
|
-
return t.image || t.image_url || t.image_data;
|
|
60
|
-
}
|
|
61
|
-
async function D({ gatewayUrls: t, uri: e }) {
|
|
62
|
-
try {
|
|
63
|
-
const n = await fetch(e).then((a) => a.json());
|
|
64
|
-
return await R({
|
|
65
|
-
gatewayUrls: t,
|
|
66
|
-
uri: O(n)
|
|
67
|
-
});
|
|
68
|
-
} catch {
|
|
69
|
-
throw new d({ uri: e });
|
|
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;
|
|
70
54
|
}
|
|
55
|
+
return null;
|
|
71
56
|
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
if (!i || i.toLowerCase() !== "eip155")
|
|
83
|
-
throw new f({ reason: "Only EIP-155 supported" });
|
|
84
|
-
if (!o)
|
|
85
|
-
throw new f({ reason: "Chain ID not found" });
|
|
86
|
-
if (!s)
|
|
87
|
-
throw new f({
|
|
88
|
-
reason: "Contract address not found"
|
|
89
|
-
});
|
|
90
|
-
if (!a)
|
|
91
|
-
throw new f({ reason: "Token ID not found" });
|
|
92
|
-
if (!p)
|
|
93
|
-
throw new f({ reason: "ERC namespace not found" });
|
|
94
|
-
return {
|
|
95
|
-
chainID: Number.parseInt(o, 10),
|
|
96
|
-
namespace: p.toLowerCase(),
|
|
97
|
-
contractAddress: s,
|
|
98
|
-
tokenID: a
|
|
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)
|
|
99
67
|
};
|
|
100
68
|
}
|
|
101
|
-
|
|
102
|
-
if (e
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
{
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
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)}`);
|
|
133
105
|
}
|
|
134
106
|
export {
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
D as
|
|
138
|
-
W as getNftTokenUri,
|
|
139
|
-
k as isImageUri,
|
|
140
|
-
R as parseAvatarUri,
|
|
141
|
-
z as parseNftUri,
|
|
142
|
-
N as resolveAvatarUri
|
|
107
|
+
u as getPureBcsSchema,
|
|
108
|
+
M as isTxContext,
|
|
109
|
+
D as normalizedTypeToMoveTypeSignature
|
|
143
110
|
};
|
package/dist/index374.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function t(e)
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index115.cjs"),o=require("./index384.cjs"),t=require("./index320.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/index374.js
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { toHex as n } from "./index115.js";
|
|
2
|
+
import { blake2b as c } from "./index384.js";
|
|
3
|
+
import { bcs as t } from "./index320.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))}`;
|
|
3
9
|
}
|
|
4
10
|
export {
|
|
5
|
-
|
|
11
|
+
m as deriveDynamicFieldID
|
|
6
12
|
};
|
package/dist/index375.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./index278.cjs"),E=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./index278.cjs"),E=require("./index347.cjs"),m=require("./index277.cjs"),f=require("./index385.cjs"),A=require("./index292.cjs"),l=require("./index285.cjs");function q(r,e={}){const{prepare:i=!0}=e,n=Array.isArray(r)||typeof r=="string"?A.parseAbiItem(r):r;return{...n,...i?{hash:s(n)}:{}}}function g(r,e,i){const{args:n=[],prepare:o=!0}=i??{},w=m.validate(e,{strict:!1}),a=r.filter(t=>w?t.type==="function"||t.type==="error"?I(t)===m.slice(e,0,4):t.type==="event"?s(t)===e:!1:"name"in t&&t.name===e);if(a.length===0)throw new b({name:e});if(a.length===1)return{...a[0],...o?{hash:s(a[0])}:{}};let u;for(const t of a){if(!("inputs"in t))continue;if(!n||n.length===0){if(!t.inputs||t.inputs.length===0)return{...t,...o?{hash:s(t)}:{}};continue}if(!t.inputs||t.inputs.length===0||t.inputs.length!==n.length)continue;if(n.every((c,v)=>{const y="inputs"in t&&t.inputs[v];return y?f.isArgOfType(c,y):!1})){if(u&&"inputs"in u&&u.inputs){const c=f.getAmbiguousTypes(t.inputs,u.inputs,n);if(c)throw new $({abiItem:t,type:c[0]},{abiItem:u,type:c[1]})}u=t}}const h=(()=>{if(u)return u;const[t,...p]=a;return{...t,overloads:p}})();if(!h)throw new b({name:e});return{...h,...o?{hash:s(h)}:{}}}function I(...r){const e=(()=>{if(Array.isArray(r[0])){const[i,n]=r;return g(i,n)}return r[0]})();return m.slice(s(e),0,4)}function S(...r){const e=(()=>{if(Array.isArray(r[0])){const[n,o]=r;return g(n,o)}return r[0]})(),i=typeof e=="string"?e:l.formatAbiItem(e);return f.normalizeSignature(i)}function s(...r){const e=(()=>{if(Array.isArray(r[0])){const[i,n]=r;return g(i,n)}return r[0]})();return typeof e!="string"&&"hash"in e&&e.hash?e.hash:E.keccak256(m.fromString(S(e)))}class $ extends d.BaseError{constructor(e,i){super("Found ambiguous types in overloaded ABI Items.",{metaMessages:[`\`${e.type}\` in \`${f.normalizeSignature(l.formatAbiItem(e.abiItem))}\`, and`,`\`${i.type}\` in \`${f.normalizeSignature(l.formatAbiItem(i.abiItem))}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItem.AmbiguityError"})}}class b extends d.BaseError{constructor({name:e,data:i,type:n="item"}){const o=e?` with name "${e}"`:i?` with data "${i}"`:"";super(`ABI ${n}${o} not found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItem.NotFoundError"})}}exports.AmbiguityError=$;exports.NotFoundError=b;exports.from=q;exports.fromAbi=g;exports.getSelector=I;exports.getSignature=S;exports.getSignatureHash=s;
|
package/dist/index375.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { BaseError as d } from "./index278.js";
|
|
2
|
-
import { keccak256 as v } from "./
|
|
2
|
+
import { keccak256 as v } from "./index347.js";
|
|
3
3
|
import { validate as $, slice as A, fromString as S } from "./index277.js";
|
|
4
|
-
import { isArgOfType as E, normalizeSignature as m, getAmbiguousTypes as B } from "./
|
|
5
|
-
import { parseAbiItem as y } from "./
|
|
6
|
-
import { formatAbiItem as p } from "./
|
|
4
|
+
import { isArgOfType as E, normalizeSignature as m, getAmbiguousTypes as B } from "./index385.js";
|
|
5
|
+
import { parseAbiItem as y } from "./index292.js";
|
|
6
|
+
import { formatAbiItem as p } from "./index285.js";
|
|
7
7
|
function H(r, t = {}) {
|
|
8
8
|
const { prepare: i = !0 } = t, n = Array.isArray(r) ? y(r) : typeof r == "string" ? y(r) : r;
|
|
9
9
|
return {
|
package/dist/index376.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("./index340.cjs");function p(o,t,s,i){if(typeof o.setBigUint64=="function")return o.setBigUint64(t,s,i);const n=BigInt(32),r=BigInt(4294967295),e=Number(s>>n&r),h=Number(s&r),u=i?4:0,l=i?0:4;o.setUint32(t+u,e,i),o.setUint32(t+l,h,i)}function g(o,t,s){return o&t^~o&s}function b(o,t,s){return o&t^o&s^t&s}class d extends f.Hash{constructor(t,s,i,n){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=t,this.outputLen=s,this.padOffset=i,this.isLE=n,this.buffer=new Uint8Array(t),this.view=f.createView(this.buffer)}update(t){f.aexists(this),t=f.toBytes(t),f.abytes(t);const{view:s,buffer:i,blockLen:n}=this,r=t.length;for(let e=0;e<r;){const h=Math.min(n-this.pos,r-e);if(h===n){const u=f.createView(t);for(;n<=r-e;e+=n)this.process(u,e);continue}i.set(t.subarray(e,e+h),this.pos),this.pos+=h,e+=h,this.pos===n&&(this.process(s,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){f.aexists(this),f.aoutput(t,this),this.finished=!0;const{buffer:s,view:i,blockLen:n,isLE:r}=this;let{pos:e}=this;s[e++]=128,f.clean(this.buffer.subarray(e)),this.padOffset>n-e&&(this.process(i,0),e=0);for(let c=e;c<n;c++)s[c]=0;p(i,n-8,BigInt(this.length*8),r),this.process(i,0);const h=f.createView(t),u=this.outputLen;if(u%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=u/4,a=this.get();if(l>a.length)throw new Error("_sha2: outputLen bigger than state");for(let c=0;c<l;c++)h.setUint32(4*c,a[c],r)}digest(){const{buffer:t,outputLen:s}=this;this.digestInto(t);const i=t.slice(0,s);return this.destroy(),i}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:s,buffer:i,length:n,finished:r,destroyed:e,pos:h}=this;return t.destroyed=e,t.finished=r,t.length=n,t.pos=h,n%s&&t.buffer.set(i),t}clone(){return this._cloneInto()}}const w=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]);exports.Chi=g;exports.HashMD=d;exports.Maj=b;exports.SHA256_IV=w;exports.setBigUint64=p;
|
package/dist/index376.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Hash as g, createView as l, aexists as b, toBytes as a, abytes as d, aoutput as x, clean as w } from "./
|
|
1
|
+
import { Hash as g, createView as l, aexists as b, toBytes as a, abytes as d, aoutput as x, clean as w } from "./index340.js";
|
|
2
2
|
function y(o, t, s, n) {
|
|
3
3
|
if (typeof o.setBigUint64 == "function")
|
|
4
4
|
return o.setBigUint64(t, s, n);
|
package/dist/index378.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index340.cjs");class r extends i.Hash{constructor(t,h){super(),this.finished=!1,this.destroyed=!1,i.ahash(t);const n=i.toBytes(h);if(this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const a=this.blockLen,e=new Uint8Array(a);e.set(n.length>a?t.create().update(n).digest():n);for(let s=0;s<e.length;s++)e[s]^=54;this.iHash.update(e),this.oHash=t.create();for(let s=0;s<e.length;s++)e[s]^=106;this.oHash.update(e),i.clean(e)}update(t){return i.aexists(this),this.iHash.update(t),this}digestInto(t){i.aexists(this),i.abytes(t,this.outputLen),this.finished=!0,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){const t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));const{oHash:h,iHash:n,finished:a,destroyed:e,blockLen:s,outputLen:d}=this;return t=t,t.finished=a,t.destroyed=e,t.blockLen=s,t.outputLen=d,t.oHash=h._cloneInto(t.oHash),t.iHash=n._cloneInto(t.iHash),t}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const c=(o,t,h)=>new r(o,t).update(h).digest();c.create=(o,t)=>new r(o,t);exports.HMAC=r;exports.hmac=c;
|
package/dist/index378.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Hash as d, ahash as u, toBytes as H, clean as l, aexists as a, abytes as p } from "./
|
|
1
|
+
import { Hash as d, ahash as u, toBytes as H, clean as l, aexists as a, abytes as p } from "./index340.js";
|
|
2
2
|
class r extends d {
|
|
3
3
|
constructor(t, i) {
|
|
4
4
|
super(), this.finished = !1, this.destroyed = !1, u(t);
|