@qubic.org/contracts 0.2.0 → 0.2.2
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/__generated__/computorcontrolledfund.d.ts +30 -30
- package/dist/__generated__/computorcontrolledfund.d.ts.map +1 -1
- package/dist/__generated__/computorcontrolledfund.js +57 -57
- package/dist/__generated__/computorcontrolledfund.js.map +1 -1
- package/dist/__generated__/escrow.d.ts +13 -13
- package/dist/__generated__/escrow.d.ts.map +1 -1
- package/dist/__generated__/escrow.js +20 -20
- package/dist/__generated__/escrow.js.map +1 -1
- package/dist/__generated__/generalquorumproposal.d.ts +21 -21
- package/dist/__generated__/generalquorumproposal.d.ts.map +1 -1
- package/dist/__generated__/generalquorumproposal.js +31 -31
- package/dist/__generated__/generalquorumproposal.js.map +1 -1
- package/dist/__generated__/msvault.d.ts +104 -104
- package/dist/__generated__/msvault.d.ts.map +1 -1
- package/dist/__generated__/msvault.js +220 -220
- package/dist/__generated__/msvault.js.map +1 -1
- package/dist/__generated__/nostromo.d.ts +43 -43
- package/dist/__generated__/nostromo.d.ts.map +1 -1
- package/dist/__generated__/nostromo.js +68 -68
- package/dist/__generated__/nostromo.js.map +1 -1
- package/dist/__generated__/pulse.d.ts +171 -171
- package/dist/__generated__/pulse.d.ts.map +1 -1
- package/dist/__generated__/pulse.js +409 -409
- package/dist/__generated__/pulse.js.map +1 -1
- package/dist/__generated__/qbay.d.ts +61 -61
- package/dist/__generated__/qbay.d.ts.map +1 -1
- package/dist/__generated__/qbay.js +103 -103
- package/dist/__generated__/qbay.js.map +1 -1
- package/dist/__generated__/qbond.d.ts +44 -44
- package/dist/__generated__/qbond.d.ts.map +1 -1
- package/dist/__generated__/qbond.js +67 -67
- package/dist/__generated__/qbond.js.map +1 -1
- package/dist/__generated__/qdraw.d.ts +4 -4
- package/dist/__generated__/qdraw.d.ts.map +1 -1
- package/dist/__generated__/qdraw.js +4 -4
- package/dist/__generated__/qdraw.js.map +1 -1
- package/dist/__generated__/qduel.d.ts +49 -49
- package/dist/__generated__/qduel.d.ts.map +1 -1
- package/dist/__generated__/qduel.js +106 -106
- package/dist/__generated__/qduel.js.map +1 -1
- package/dist/__generated__/qearn.d.ts +24 -24
- package/dist/__generated__/qearn.d.ts.map +1 -1
- package/dist/__generated__/qearn.js +38 -38
- package/dist/__generated__/qearn.js.map +1 -1
- package/dist/__generated__/qip.d.ts +10 -10
- package/dist/__generated__/qip.d.ts.map +1 -1
- package/dist/__generated__/qip.js +16 -16
- package/dist/__generated__/qip.js.map +1 -1
- package/dist/__generated__/qraffle.d.ts +51 -51
- package/dist/__generated__/qraffle.d.ts.map +1 -1
- package/dist/__generated__/qraffle.js +108 -108
- package/dist/__generated__/qraffle.js.map +1 -1
- package/dist/__generated__/qreservepool.d.ts +14 -14
- package/dist/__generated__/qreservepool.d.ts.map +1 -1
- package/dist/__generated__/qreservepool.js +22 -22
- package/dist/__generated__/qreservepool.js.map +1 -1
- package/dist/__generated__/qrwa.d.ts +71 -71
- package/dist/__generated__/qrwa.d.ts.map +1 -1
- package/dist/__generated__/qrwa.js +174 -174
- package/dist/__generated__/qrwa.js.map +1 -1
- package/dist/__generated__/qswap.d.ts +79 -79
- package/dist/__generated__/qswap.d.ts.map +1 -1
- package/dist/__generated__/qswap.js +158 -158
- package/dist/__generated__/qswap.js.map +1 -1
- package/dist/__generated__/qthirtyfour.d.ts +78 -78
- package/dist/__generated__/qthirtyfour.d.ts.map +1 -1
- package/dist/__generated__/qthirtyfour.js +161 -161
- package/dist/__generated__/qthirtyfour.js.map +1 -1
- package/dist/__generated__/quottery.d.ts +124 -124
- package/dist/__generated__/quottery.d.ts.map +1 -1
- package/dist/__generated__/quottery.js +266 -266
- package/dist/__generated__/quottery.js.map +1 -1
- package/dist/__generated__/qusino.d.ts +44 -44
- package/dist/__generated__/qusino.d.ts.map +1 -1
- package/dist/__generated__/qusino.js +88 -88
- package/dist/__generated__/qusino.js.map +1 -1
- package/dist/__generated__/qutil.d.ts +108 -108
- package/dist/__generated__/qutil.d.ts.map +1 -1
- package/dist/__generated__/qutil.js +231 -231
- package/dist/__generated__/qutil.js.map +1 -1
- package/dist/__generated__/qvault.d.ts +90 -90
- package/dist/__generated__/qvault.d.ts.map +1 -1
- package/dist/__generated__/qvault.js +146 -146
- package/dist/__generated__/qvault.js.map +1 -1
- package/dist/__generated__/qx.d.ts +36 -36
- package/dist/__generated__/qx.d.ts.map +1 -1
- package/dist/__generated__/qx.js +54 -54
- package/dist/__generated__/qx.js.map +1 -1
- package/dist/__generated__/random.d.ts +2 -1
- package/dist/__generated__/random.d.ts.map +1 -1
- package/dist/__generated__/random.js +2 -2
- package/dist/__generated__/random.js.map +1 -1
- package/dist/__generated__/randomlottery.d.ts +28 -28
- package/dist/__generated__/randomlottery.d.ts.map +1 -1
- package/dist/__generated__/randomlottery.js +41 -41
- package/dist/__generated__/randomlottery.js.map +1 -1
- package/dist/__generated__/vottunbridge.d.ts +77 -77
- package/dist/__generated__/vottunbridge.d.ts.map +1 -1
- package/dist/__generated__/vottunbridge.js +181 -181
- package/dist/__generated__/vottunbridge.js.map +1 -1
- package/dist/call-contract.d.ts +9 -3
- package/dist/call-contract.d.ts.map +1 -1
- package/dist/call-contract.js +21 -22
- package/dist/call-contract.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +7 -10
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { QubicRpcError } from '@qubic.org/rpc';
|
|
2
|
-
import { type ContractCallOptions, type SmartContractCaller } from '../call-contract.js';
|
|
2
|
+
import { type ContractCall, type ContractCallOptions, type SmartContractCaller } from '../call-contract.js';
|
|
3
3
|
import type { Result } from '../result.js';
|
|
4
4
|
export declare const Q_DUEL_CONTRACT_INDEX = 23;
|
|
5
5
|
export interface QDuelRoomInfoStruct {
|
|
@@ -19,83 +19,69 @@ export interface QDuelWinnerDataStruct {
|
|
|
19
19
|
export interface QDuelDateAndTimeStruct {
|
|
20
20
|
value: bigint;
|
|
21
21
|
}
|
|
22
|
-
export declare const Q_DUEL_CREATE_ROOM_INPUT_TYPE =
|
|
22
|
+
export declare const Q_DUEL_CREATE_ROOM_INPUT_TYPE = 1;
|
|
23
23
|
export interface QDuelCreateRoomInput {
|
|
24
24
|
allowedPlayer: string;
|
|
25
25
|
stake: bigint;
|
|
26
26
|
raiseStep: bigint;
|
|
27
27
|
maxStake: bigint;
|
|
28
28
|
}
|
|
29
|
-
export declare function buildQDuelCreateRoomInput(input: QDuelCreateRoomInput, identityToPublicKey
|
|
29
|
+
export declare function buildQDuelCreateRoomInput(input: QDuelCreateRoomInput, identityToPublicKey: (identity: string) => Uint8Array): ContractCall;
|
|
30
30
|
export interface QDuelCreateRoomOutput {
|
|
31
31
|
returnCode: number;
|
|
32
32
|
}
|
|
33
|
-
export declare function decodeQDuelCreateRoomOutput(data: Uint8Array
|
|
34
|
-
export declare const Q_DUEL_CONNECT_TO_ROOM_INPUT_TYPE =
|
|
33
|
+
export declare function decodeQDuelCreateRoomOutput(data: Uint8Array): QDuelCreateRoomOutput;
|
|
34
|
+
export declare const Q_DUEL_CONNECT_TO_ROOM_INPUT_TYPE = 2;
|
|
35
35
|
export interface QDuelConnectToRoomInput {
|
|
36
36
|
roomId: string;
|
|
37
37
|
}
|
|
38
|
-
export declare function buildQDuelConnectToRoomInput(input: QDuelConnectToRoomInput, identityToPublicKey
|
|
38
|
+
export declare function buildQDuelConnectToRoomInput(input: QDuelConnectToRoomInput, identityToPublicKey: (identity: string) => Uint8Array): ContractCall;
|
|
39
39
|
export interface QDuelConnectToRoomOutput {
|
|
40
40
|
winner: string;
|
|
41
41
|
returnCode: number;
|
|
42
42
|
}
|
|
43
|
-
export declare function decodeQDuelConnectToRoomOutput(data: Uint8Array, publicKeyToIdentity
|
|
44
|
-
export declare const
|
|
45
|
-
export interface QDuelCloseRoomOutput {
|
|
46
|
-
returnCode: number;
|
|
47
|
-
}
|
|
48
|
-
export declare function decodeQDuelCloseRoomOutput(data: Uint8Array, publicKeyToIdentity?: (pk: Uint8Array) => string): QDuelCloseRoomOutput;
|
|
49
|
-
export declare const Q_DUEL_SET_PERCENT_FEES_INPUT_TYPE = 13;
|
|
43
|
+
export declare function decodeQDuelConnectToRoomOutput(data: Uint8Array, publicKeyToIdentity: (pk: Uint8Array) => string): QDuelConnectToRoomOutput;
|
|
44
|
+
export declare const Q_DUEL_SET_PERCENT_FEES_INPUT_TYPE = 3;
|
|
50
45
|
export interface QDuelSetPercentFeesInput {
|
|
51
46
|
devFeePercentBps: number;
|
|
52
47
|
burnFeePercentBps: number;
|
|
53
48
|
shareholdersFeePercentBps: number;
|
|
54
49
|
percentScale: number;
|
|
55
50
|
}
|
|
56
|
-
export declare function buildQDuelSetPercentFeesInput(input: QDuelSetPercentFeesInput
|
|
51
|
+
export declare function buildQDuelSetPercentFeesInput(input: QDuelSetPercentFeesInput): ContractCall;
|
|
57
52
|
export interface QDuelSetPercentFeesOutput {
|
|
58
53
|
returnCode: number;
|
|
59
54
|
}
|
|
60
|
-
export declare function decodeQDuelSetPercentFeesOutput(data: Uint8Array
|
|
61
|
-
export declare const Q_DUEL_SET_TTL_HOURS_INPUT_TYPE =
|
|
55
|
+
export declare function decodeQDuelSetPercentFeesOutput(data: Uint8Array): QDuelSetPercentFeesOutput;
|
|
56
|
+
export declare const Q_DUEL_SET_TTL_HOURS_INPUT_TYPE = 4;
|
|
62
57
|
export interface QDuelSetTTLHoursInput {
|
|
63
58
|
ttlHours: number;
|
|
64
59
|
}
|
|
65
|
-
export declare function buildQDuelSetTTLHoursInput(input: QDuelSetTTLHoursInput
|
|
60
|
+
export declare function buildQDuelSetTTLHoursInput(input: QDuelSetTTLHoursInput): ContractCall;
|
|
66
61
|
export interface QDuelSetTTLHoursOutput {
|
|
67
62
|
returnCode: number;
|
|
68
63
|
}
|
|
69
|
-
export declare function decodeQDuelSetTTLHoursOutput(data: Uint8Array
|
|
70
|
-
export declare const Q_DUEL_DEPOSIT_INPUT_TYPE =
|
|
64
|
+
export declare function decodeQDuelSetTTLHoursOutput(data: Uint8Array): QDuelSetTTLHoursOutput;
|
|
65
|
+
export declare const Q_DUEL_DEPOSIT_INPUT_TYPE = 5;
|
|
71
66
|
export interface QDuelDepositOutput {
|
|
72
67
|
returnCode: number;
|
|
73
68
|
}
|
|
74
|
-
export declare function decodeQDuelDepositOutput(data: Uint8Array
|
|
75
|
-
export declare const Q_DUEL_WITHDRAW_INPUT_TYPE =
|
|
69
|
+
export declare function decodeQDuelDepositOutput(data: Uint8Array): QDuelDepositOutput;
|
|
70
|
+
export declare const Q_DUEL_WITHDRAW_INPUT_TYPE = 6;
|
|
76
71
|
export interface QDuelWithdrawInput {
|
|
77
72
|
amount: bigint;
|
|
78
73
|
}
|
|
79
|
-
export declare function buildQDuelWithdrawInput(input: QDuelWithdrawInput
|
|
74
|
+
export declare function buildQDuelWithdrawInput(input: QDuelWithdrawInput): ContractCall;
|
|
80
75
|
export interface QDuelWithdrawOutput {
|
|
81
76
|
returnCode: number;
|
|
82
77
|
}
|
|
83
|
-
export declare function decodeQDuelWithdrawOutput(data: Uint8Array
|
|
84
|
-
export declare const
|
|
85
|
-
export
|
|
86
|
-
|
|
87
|
-
amount: bigint;
|
|
88
|
-
}
|
|
89
|
-
export declare function buildQDuelCalculateRevenueInput(input: QDuelCalculateRevenueInput, identityToPublicKey?: (identity: string) => Uint8Array): Uint8Array;
|
|
90
|
-
export interface QDuelCalculateRevenueOutput {
|
|
91
|
-
devFee: bigint;
|
|
92
|
-
burnFee: bigint;
|
|
93
|
-
shareholdersFee: bigint;
|
|
94
|
-
winner: bigint;
|
|
78
|
+
export declare function decodeQDuelWithdrawOutput(data: Uint8Array): QDuelWithdrawOutput;
|
|
79
|
+
export declare const Q_DUEL_CLOSE_ROOM_INPUT_TYPE = 7;
|
|
80
|
+
export interface QDuelCloseRoomOutput {
|
|
81
|
+
returnCode: number;
|
|
95
82
|
}
|
|
96
|
-
export declare function
|
|
97
|
-
export declare
|
|
98
|
-
export declare const Q_DUEL_GET_PERCENT_FEES_INPUT_TYPE = 12;
|
|
83
|
+
export declare function decodeQDuelCloseRoomOutput(data: Uint8Array): QDuelCloseRoomOutput;
|
|
84
|
+
export declare const Q_DUEL_GET_PERCENT_FEES_INPUT_TYPE = 1;
|
|
99
85
|
export declare const Q_DUEL_GET_PERCENT_FEES_INPUT_SIZE = 0;
|
|
100
86
|
export interface QDuelGetPercentFeesOutput {
|
|
101
87
|
devFeePercentBps: number;
|
|
@@ -104,30 +90,30 @@ export interface QDuelGetPercentFeesOutput {
|
|
|
104
90
|
percentScale: number;
|
|
105
91
|
returnCode: bigint;
|
|
106
92
|
}
|
|
107
|
-
export declare function decodeQDuelGetPercentFeesOutput(data: Uint8Array
|
|
93
|
+
export declare function decodeQDuelGetPercentFeesOutput(data: Uint8Array): QDuelGetPercentFeesOutput;
|
|
108
94
|
export declare function qDuelGetPercentFees(live: SmartContractCaller, options?: ContractCallOptions): Promise<Result<QDuelGetPercentFeesOutput, QubicRpcError>>;
|
|
109
|
-
export declare const Q_DUEL_GET_ROOMS_INPUT_TYPE =
|
|
95
|
+
export declare const Q_DUEL_GET_ROOMS_INPUT_TYPE = 2;
|
|
110
96
|
export declare const Q_DUEL_GET_ROOMS_INPUT_SIZE = 0;
|
|
111
97
|
export interface QDuelGetRoomsOutput {
|
|
112
98
|
rooms: number[];
|
|
113
99
|
returnCode: number;
|
|
114
100
|
}
|
|
115
|
-
export declare function decodeQDuelGetRoomsOutput(data: Uint8Array
|
|
101
|
+
export declare function decodeQDuelGetRoomsOutput(data: Uint8Array): QDuelGetRoomsOutput;
|
|
116
102
|
export declare function qDuelGetRooms(live: SmartContractCaller, options?: ContractCallOptions): Promise<Result<QDuelGetRoomsOutput, QubicRpcError>>;
|
|
117
|
-
export declare const Q_DUEL_GET_TTL_HOURS_INPUT_TYPE =
|
|
103
|
+
export declare const Q_DUEL_GET_TTL_HOURS_INPUT_TYPE = 3;
|
|
118
104
|
export declare const Q_DUEL_GET_TTL_HOURS_INPUT_SIZE = 0;
|
|
119
105
|
export interface QDuelGetTTLHoursOutput {
|
|
120
106
|
ttlHours: number;
|
|
121
107
|
returnCode: number;
|
|
122
108
|
}
|
|
123
|
-
export declare function decodeQDuelGetTTLHoursOutput(data: Uint8Array
|
|
109
|
+
export declare function decodeQDuelGetTTLHoursOutput(data: Uint8Array): QDuelGetTTLHoursOutput;
|
|
124
110
|
export declare function qDuelGetTTLHours(live: SmartContractCaller, options?: ContractCallOptions): Promise<Result<QDuelGetTTLHoursOutput, QubicRpcError>>;
|
|
125
|
-
export declare const Q_DUEL_GET_USER_PROFILE_INPUT_TYPE =
|
|
111
|
+
export declare const Q_DUEL_GET_USER_PROFILE_INPUT_TYPE = 4;
|
|
126
112
|
export declare const Q_DUEL_GET_USER_PROFILE_INPUT_SIZE = 32;
|
|
127
113
|
export interface QDuelGetUserProfileInput {
|
|
128
114
|
userId: string;
|
|
129
115
|
}
|
|
130
|
-
export declare function buildQDuelGetUserProfileInput(input: QDuelGetUserProfileInput, identityToPublicKey
|
|
116
|
+
export declare function buildQDuelGetUserProfileInput(input: QDuelGetUserProfileInput, identityToPublicKey: (identity: string) => Uint8Array): Uint8Array;
|
|
131
117
|
export interface QDuelGetUserProfileOutput {
|
|
132
118
|
roomId: string;
|
|
133
119
|
depositedAmount: bigint;
|
|
@@ -137,29 +123,42 @@ export interface QDuelGetUserProfileOutput {
|
|
|
137
123
|
maxStake: bigint;
|
|
138
124
|
returnCode: number;
|
|
139
125
|
}
|
|
140
|
-
export declare function decodeQDuelGetUserProfileOutput(data: Uint8Array, publicKeyToIdentity
|
|
126
|
+
export declare function decodeQDuelGetUserProfileOutput(data: Uint8Array, publicKeyToIdentity: (pk: Uint8Array) => string): QDuelGetUserProfileOutput;
|
|
141
127
|
export declare function qDuelGetUserProfile(live: SmartContractCaller, input: QDuelGetUserProfileInput, options?: ContractCallOptions): Promise<Result<QDuelGetUserProfileOutput, QubicRpcError>>;
|
|
142
|
-
export declare const
|
|
128
|
+
export declare const Q_DUEL_CALCULATE_REVENUE_INPUT_TYPE = 5;
|
|
129
|
+
export declare const Q_DUEL_CALCULATE_REVENUE_INPUT_SIZE = 8;
|
|
130
|
+
export interface QDuelCalculateRevenueInput {
|
|
131
|
+
amount: bigint;
|
|
132
|
+
}
|
|
133
|
+
export declare function buildQDuelCalculateRevenueInput(input: QDuelCalculateRevenueInput): Uint8Array;
|
|
134
|
+
export interface QDuelCalculateRevenueOutput {
|
|
135
|
+
devFee: bigint;
|
|
136
|
+
burnFee: bigint;
|
|
137
|
+
shareholdersFee: bigint;
|
|
138
|
+
winner: bigint;
|
|
139
|
+
}
|
|
140
|
+
export declare function decodeQDuelCalculateRevenueOutput(data: Uint8Array): QDuelCalculateRevenueOutput;
|
|
141
|
+
export declare function qDuelCalculateRevenue(live: SmartContractCaller, input: QDuelCalculateRevenueInput, options?: ContractCallOptions): Promise<Result<QDuelCalculateRevenueOutput, QubicRpcError>>;
|
|
142
|
+
export declare const Q_DUEL_GET_LAST_WINNERS_INPUT_TYPE = 6;
|
|
143
143
|
export declare const Q_DUEL_GET_LAST_WINNERS_INPUT_SIZE = 0;
|
|
144
144
|
export interface QDuelGetLastWinnersOutput {
|
|
145
145
|
winners: number[];
|
|
146
146
|
returnCode: number;
|
|
147
147
|
}
|
|
148
|
-
export declare function decodeQDuelGetLastWinnersOutput(data: Uint8Array
|
|
148
|
+
export declare function decodeQDuelGetLastWinnersOutput(data: Uint8Array): QDuelGetLastWinnersOutput;
|
|
149
149
|
export declare function qDuelGetLastWinners(live: SmartContractCaller, options?: ContractCallOptions): Promise<Result<QDuelGetLastWinnersOutput, QubicRpcError>>;
|
|
150
150
|
export declare const qDuel: {
|
|
151
151
|
contractIndex: number;
|
|
152
|
-
CalculateRevenue: typeof qDuelCalculateRevenue;
|
|
153
152
|
GetPercentFees: typeof qDuelGetPercentFees;
|
|
154
153
|
GetRooms: typeof qDuelGetRooms;
|
|
155
154
|
GetTTLHours: typeof qDuelGetTTLHours;
|
|
156
155
|
GetUserProfile: typeof qDuelGetUserProfile;
|
|
156
|
+
CalculateRevenue: typeof qDuelCalculateRevenue;
|
|
157
157
|
GetLastWinners: typeof qDuelGetLastWinners;
|
|
158
158
|
buildCreateRoomInput: typeof buildQDuelCreateRoomInput;
|
|
159
159
|
decodeCreateRoomOutput: typeof decodeQDuelCreateRoomOutput;
|
|
160
160
|
buildConnectToRoomInput: typeof buildQDuelConnectToRoomInput;
|
|
161
161
|
decodeConnectToRoomOutput: typeof decodeQDuelConnectToRoomOutput;
|
|
162
|
-
decodeCloseRoomOutput: typeof decodeQDuelCloseRoomOutput;
|
|
163
162
|
buildSetPercentFeesInput: typeof buildQDuelSetPercentFeesInput;
|
|
164
163
|
decodeSetPercentFeesOutput: typeof decodeQDuelSetPercentFeesOutput;
|
|
165
164
|
buildSetTTLHoursInput: typeof buildQDuelSetTTLHoursInput;
|
|
@@ -167,5 +166,6 @@ export declare const qDuel: {
|
|
|
167
166
|
decodeDepositOutput: typeof decodeQDuelDepositOutput;
|
|
168
167
|
buildWithdrawInput: typeof buildQDuelWithdrawInput;
|
|
169
168
|
decodeWithdrawOutput: typeof decodeQDuelWithdrawOutput;
|
|
169
|
+
decodeCloseRoomOutput: typeof decodeQDuelCloseRoomOutput;
|
|
170
170
|
};
|
|
171
171
|
//# sourceMappingURL=qduel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"qduel.d.ts","sourceRoot":"","sources":["../../src/__generated__/qduel.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AACnD,OAAO,EAAE,KAAK,mBAAmB,EAAE,KAAK,mBAAmB,EAAwB,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"qduel.d.ts","sourceRoot":"","sources":["../../src/__generated__/qduel.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAA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L_CREATE_ROOM_INPUT_TYPE = 1;
|
|
92
92
|
const Q_DUEL_CREATE_ROOM_INPUT_FIELDS = [
|
|
93
93
|
{
|
|
94
94
|
name: 'allowedPlayer',
|
|
@@ -115,8 +115,8 @@ const Q_DUEL_CREATE_ROOM_INPUT_FIELDS = [
|
|
|
115
115
|
byteLength: 8,
|
|
116
116
|
},
|
|
117
117
|
];
|
|
118
|
-
export function buildQDuelCreateRoomInput(input, identityToPublicKey
|
|
119
|
-
return buildPayload(Q_DUEL_CREATE_ROOM_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
|
|
118
|
+
export function buildQDuelCreateRoomInput(input, identityToPublicKey) {
|
|
119
|
+
return { contractIndex: Q_DUEL_CONTRACT_INDEX, inputType: Q_DUEL_CREATE_ROOM_INPUT_TYPE, payload: buildPayload(Q_DUEL_CREATE_ROOM_INPUT_FIELDS, STRUCTS, input, identityToPublicKey) };
|
|
120
120
|
}
|
|
121
121
|
const Q_DUEL_CREATE_ROOM_OUTPUT_FIELDS = [
|
|
122
122
|
{
|
|
@@ -126,10 +126,10 @@ const Q_DUEL_CREATE_ROOM_OUTPUT_FIELDS = [
|
|
|
126
126
|
byteLength: 1,
|
|
127
127
|
},
|
|
128
128
|
];
|
|
129
|
-
export function decodeQDuelCreateRoomOutput(data
|
|
130
|
-
return decodePayload(data, Q_DUEL_CREATE_ROOM_OUTPUT_FIELDS, STRUCTS,
|
|
129
|
+
export function decodeQDuelCreateRoomOutput(data) {
|
|
130
|
+
return decodePayload(data, Q_DUEL_CREATE_ROOM_OUTPUT_FIELDS, STRUCTS, (_pk) => 'A'.repeat(60));
|
|
131
131
|
}
|
|
132
|
-
export const Q_DUEL_CONNECT_TO_ROOM_INPUT_TYPE =
|
|
132
|
+
export const Q_DUEL_CONNECT_TO_ROOM_INPUT_TYPE = 2;
|
|
133
133
|
const Q_DUEL_CONNECT_TO_ROOM_INPUT_FIELDS = [
|
|
134
134
|
{
|
|
135
135
|
name: 'roomId',
|
|
@@ -138,8 +138,8 @@ const Q_DUEL_CONNECT_TO_ROOM_INPUT_FIELDS = [
|
|
|
138
138
|
byteLength: 32,
|
|
139
139
|
},
|
|
140
140
|
];
|
|
141
|
-
export function buildQDuelConnectToRoomInput(input, identityToPublicKey
|
|
142
|
-
return buildPayload(Q_DUEL_CONNECT_TO_ROOM_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
|
|
141
|
+
export function buildQDuelConnectToRoomInput(input, identityToPublicKey) {
|
|
142
|
+
return { contractIndex: Q_DUEL_CONTRACT_INDEX, inputType: Q_DUEL_CONNECT_TO_ROOM_INPUT_TYPE, payload: buildPayload(Q_DUEL_CONNECT_TO_ROOM_INPUT_FIELDS, STRUCTS, input, identityToPublicKey) };
|
|
143
143
|
}
|
|
144
144
|
const Q_DUEL_CONNECT_TO_ROOM_OUTPUT_FIELDS = [
|
|
145
145
|
{
|
|
@@ -155,22 +155,10 @@ const Q_DUEL_CONNECT_TO_ROOM_OUTPUT_FIELDS = [
|
|
|
155
155
|
byteLength: 1,
|
|
156
156
|
},
|
|
157
157
|
];
|
|
158
|
-
export function decodeQDuelConnectToRoomOutput(data, publicKeyToIdentity
|
|
158
|
+
export function decodeQDuelConnectToRoomOutput(data, publicKeyToIdentity) {
|
|
159
159
|
return decodePayload(data, Q_DUEL_CONNECT_TO_ROOM_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
|
|
160
160
|
}
|
|
161
|
-
export const
|
|
162
|
-
const Q_DUEL_CLOSE_ROOM_OUTPUT_FIELDS = [
|
|
163
|
-
{
|
|
164
|
-
name: 'returnCode',
|
|
165
|
-
type: 'uint8',
|
|
166
|
-
offset: 0,
|
|
167
|
-
byteLength: 1,
|
|
168
|
-
},
|
|
169
|
-
];
|
|
170
|
-
export function decodeQDuelCloseRoomOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
|
|
171
|
-
return decodePayload(data, Q_DUEL_CLOSE_ROOM_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
|
|
172
|
-
}
|
|
173
|
-
export const Q_DUEL_SET_PERCENT_FEES_INPUT_TYPE = 13;
|
|
161
|
+
export const Q_DUEL_SET_PERCENT_FEES_INPUT_TYPE = 3;
|
|
174
162
|
const Q_DUEL_SET_PERCENT_FEES_INPUT_FIELDS = [
|
|
175
163
|
{
|
|
176
164
|
name: 'devFeePercentBps',
|
|
@@ -197,8 +185,8 @@ const Q_DUEL_SET_PERCENT_FEES_INPUT_FIELDS = [
|
|
|
197
185
|
byteLength: 2,
|
|
198
186
|
},
|
|
199
187
|
];
|
|
200
|
-
export function buildQDuelSetPercentFeesInput(input
|
|
201
|
-
return buildPayload(Q_DUEL_SET_PERCENT_FEES_INPUT_FIELDS, STRUCTS, input,
|
|
188
|
+
export function buildQDuelSetPercentFeesInput(input) {
|
|
189
|
+
return { contractIndex: Q_DUEL_CONTRACT_INDEX, inputType: Q_DUEL_SET_PERCENT_FEES_INPUT_TYPE, payload: buildPayload(Q_DUEL_SET_PERCENT_FEES_INPUT_FIELDS, STRUCTS, input, (_) => new Uint8Array(32)) };
|
|
202
190
|
}
|
|
203
191
|
const Q_DUEL_SET_PERCENT_FEES_OUTPUT_FIELDS = [
|
|
204
192
|
{
|
|
@@ -208,10 +196,10 @@ const Q_DUEL_SET_PERCENT_FEES_OUTPUT_FIELDS = [
|
|
|
208
196
|
byteLength: 1,
|
|
209
197
|
},
|
|
210
198
|
];
|
|
211
|
-
export function decodeQDuelSetPercentFeesOutput(data
|
|
212
|
-
return decodePayload(data, Q_DUEL_SET_PERCENT_FEES_OUTPUT_FIELDS, STRUCTS,
|
|
199
|
+
export function decodeQDuelSetPercentFeesOutput(data) {
|
|
200
|
+
return decodePayload(data, Q_DUEL_SET_PERCENT_FEES_OUTPUT_FIELDS, STRUCTS, (_pk) => 'A'.repeat(60));
|
|
213
201
|
}
|
|
214
|
-
export const Q_DUEL_SET_TTL_HOURS_INPUT_TYPE =
|
|
202
|
+
export const Q_DUEL_SET_TTL_HOURS_INPUT_TYPE = 4;
|
|
215
203
|
const Q_DUEL_SET_TTL_HOURS_INPUT_FIELDS = [
|
|
216
204
|
{
|
|
217
205
|
name: 'ttlHours',
|
|
@@ -220,8 +208,8 @@ const Q_DUEL_SET_TTL_HOURS_INPUT_FIELDS = [
|
|
|
220
208
|
byteLength: 1,
|
|
221
209
|
},
|
|
222
210
|
];
|
|
223
|
-
export function buildQDuelSetTTLHoursInput(input
|
|
224
|
-
return buildPayload(Q_DUEL_SET_TTL_HOURS_INPUT_FIELDS, STRUCTS, input,
|
|
211
|
+
export function buildQDuelSetTTLHoursInput(input) {
|
|
212
|
+
return { contractIndex: Q_DUEL_CONTRACT_INDEX, inputType: Q_DUEL_SET_TTL_HOURS_INPUT_TYPE, payload: buildPayload(Q_DUEL_SET_TTL_HOURS_INPUT_FIELDS, STRUCTS, input, (_) => new Uint8Array(32)) };
|
|
225
213
|
}
|
|
226
214
|
const Q_DUEL_SET_TTL_HOURS_OUTPUT_FIELDS = [
|
|
227
215
|
{
|
|
@@ -231,10 +219,10 @@ const Q_DUEL_SET_TTL_HOURS_OUTPUT_FIELDS = [
|
|
|
231
219
|
byteLength: 1,
|
|
232
220
|
},
|
|
233
221
|
];
|
|
234
|
-
export function decodeQDuelSetTTLHoursOutput(data
|
|
235
|
-
return decodePayload(data, Q_DUEL_SET_TTL_HOURS_OUTPUT_FIELDS, STRUCTS,
|
|
222
|
+
export function decodeQDuelSetTTLHoursOutput(data) {
|
|
223
|
+
return decodePayload(data, Q_DUEL_SET_TTL_HOURS_OUTPUT_FIELDS, STRUCTS, (_pk) => 'A'.repeat(60));
|
|
236
224
|
}
|
|
237
|
-
export const Q_DUEL_DEPOSIT_INPUT_TYPE =
|
|
225
|
+
export const Q_DUEL_DEPOSIT_INPUT_TYPE = 5;
|
|
238
226
|
const Q_DUEL_DEPOSIT_OUTPUT_FIELDS = [
|
|
239
227
|
{
|
|
240
228
|
name: 'returnCode',
|
|
@@ -243,10 +231,10 @@ const Q_DUEL_DEPOSIT_OUTPUT_FIELDS = [
|
|
|
243
231
|
byteLength: 1,
|
|
244
232
|
},
|
|
245
233
|
];
|
|
246
|
-
export function decodeQDuelDepositOutput(data
|
|
247
|
-
return decodePayload(data, Q_DUEL_DEPOSIT_OUTPUT_FIELDS, STRUCTS,
|
|
234
|
+
export function decodeQDuelDepositOutput(data) {
|
|
235
|
+
return decodePayload(data, Q_DUEL_DEPOSIT_OUTPUT_FIELDS, STRUCTS, (_pk) => 'A'.repeat(60));
|
|
248
236
|
}
|
|
249
|
-
export const Q_DUEL_WITHDRAW_INPUT_TYPE =
|
|
237
|
+
export const Q_DUEL_WITHDRAW_INPUT_TYPE = 6;
|
|
250
238
|
const Q_DUEL_WITHDRAW_INPUT_FIELDS = [
|
|
251
239
|
{
|
|
252
240
|
name: 'amount',
|
|
@@ -255,8 +243,8 @@ const Q_DUEL_WITHDRAW_INPUT_FIELDS = [
|
|
|
255
243
|
byteLength: 8,
|
|
256
244
|
},
|
|
257
245
|
];
|
|
258
|
-
export function buildQDuelWithdrawInput(input
|
|
259
|
-
return buildPayload(Q_DUEL_WITHDRAW_INPUT_FIELDS, STRUCTS, input,
|
|
246
|
+
export function buildQDuelWithdrawInput(input) {
|
|
247
|
+
return { contractIndex: Q_DUEL_CONTRACT_INDEX, inputType: Q_DUEL_WITHDRAW_INPUT_TYPE, payload: buildPayload(Q_DUEL_WITHDRAW_INPUT_FIELDS, STRUCTS, input, (_) => new Uint8Array(32)) };
|
|
260
248
|
}
|
|
261
249
|
const Q_DUEL_WITHDRAW_OUTPUT_FIELDS = [
|
|
262
250
|
{
|
|
@@ -266,65 +254,22 @@ const Q_DUEL_WITHDRAW_OUTPUT_FIELDS = [
|
|
|
266
254
|
byteLength: 1,
|
|
267
255
|
},
|
|
268
256
|
];
|
|
269
|
-
export function decodeQDuelWithdrawOutput(data
|
|
270
|
-
return decodePayload(data, Q_DUEL_WITHDRAW_OUTPUT_FIELDS, STRUCTS,
|
|
271
|
-
}
|
|
272
|
-
export const Q_DUEL_CALCULATE_REVENUE_INPUT_TYPE = 7;
|
|
273
|
-
export const Q_DUEL_CALCULATE_REVENUE_INPUT_SIZE = 8;
|
|
274
|
-
const Q_DUEL_CALCULATE_REVENUE_INPUT_FIELDS = [
|
|
275
|
-
{
|
|
276
|
-
name: 'amount',
|
|
277
|
-
type: 'uint64',
|
|
278
|
-
offset: 0,
|
|
279
|
-
byteLength: 8,
|
|
280
|
-
},
|
|
281
|
-
];
|
|
282
|
-
export function buildQDuelCalculateRevenueInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
|
|
283
|
-
return buildPayload(Q_DUEL_CALCULATE_REVENUE_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
|
|
257
|
+
export function decodeQDuelWithdrawOutput(data) {
|
|
258
|
+
return decodePayload(data, Q_DUEL_WITHDRAW_OUTPUT_FIELDS, STRUCTS, (_pk) => 'A'.repeat(60));
|
|
284
259
|
}
|
|
285
|
-
const
|
|
260
|
+
export const Q_DUEL_CLOSE_ROOM_INPUT_TYPE = 7;
|
|
261
|
+
const Q_DUEL_CLOSE_ROOM_OUTPUT_FIELDS = [
|
|
286
262
|
{
|
|
287
|
-
name: '
|
|
288
|
-
type: '
|
|
263
|
+
name: 'returnCode',
|
|
264
|
+
type: 'uint8',
|
|
289
265
|
offset: 0,
|
|
290
|
-
byteLength:
|
|
291
|
-
},
|
|
292
|
-
{
|
|
293
|
-
name: 'burnFee',
|
|
294
|
-
type: 'uint64',
|
|
295
|
-
offset: 8,
|
|
296
|
-
byteLength: 8,
|
|
297
|
-
},
|
|
298
|
-
{
|
|
299
|
-
name: 'shareholdersFee',
|
|
300
|
-
type: 'uint64',
|
|
301
|
-
offset: 16,
|
|
302
|
-
byteLength: 8,
|
|
303
|
-
},
|
|
304
|
-
{
|
|
305
|
-
name: 'winner',
|
|
306
|
-
type: 'uint64',
|
|
307
|
-
offset: 24,
|
|
308
|
-
byteLength: 8,
|
|
266
|
+
byteLength: 1,
|
|
309
267
|
},
|
|
310
268
|
];
|
|
311
|
-
export function
|
|
312
|
-
return decodePayload(data,
|
|
313
|
-
}
|
|
314
|
-
export async function qDuelCalculateRevenue(live, input, options) {
|
|
315
|
-
return callContractFunction({
|
|
316
|
-
live,
|
|
317
|
-
contractIndex: Q_DUEL_CONTRACT_INDEX,
|
|
318
|
-
inputType: Q_DUEL_CALCULATE_REVENUE_INPUT_TYPE,
|
|
319
|
-
inputSize: Q_DUEL_CALCULATE_REVENUE_INPUT_SIZE,
|
|
320
|
-
inputFields: Q_DUEL_CALCULATE_REVENUE_INPUT_FIELDS,
|
|
321
|
-
outputFields: Q_DUEL_CALCULATE_REVENUE_OUTPUT_FIELDS,
|
|
322
|
-
structs: STRUCTS,
|
|
323
|
-
input: input,
|
|
324
|
-
...options,
|
|
325
|
-
});
|
|
269
|
+
export function decodeQDuelCloseRoomOutput(data) {
|
|
270
|
+
return decodePayload(data, Q_DUEL_CLOSE_ROOM_OUTPUT_FIELDS, STRUCTS, (_pk) => 'A'.repeat(60));
|
|
326
271
|
}
|
|
327
|
-
export const Q_DUEL_GET_PERCENT_FEES_INPUT_TYPE =
|
|
272
|
+
export const Q_DUEL_GET_PERCENT_FEES_INPUT_TYPE = 1;
|
|
328
273
|
export const Q_DUEL_GET_PERCENT_FEES_INPUT_SIZE = 0;
|
|
329
274
|
const Q_DUEL_GET_PERCENT_FEES_OUTPUT_FIELDS = [
|
|
330
275
|
{
|
|
@@ -358,8 +303,8 @@ const Q_DUEL_GET_PERCENT_FEES_OUTPUT_FIELDS = [
|
|
|
358
303
|
byteLength: 8,
|
|
359
304
|
},
|
|
360
305
|
];
|
|
361
|
-
export function decodeQDuelGetPercentFeesOutput(data
|
|
362
|
-
return decodePayload(data, Q_DUEL_GET_PERCENT_FEES_OUTPUT_FIELDS, STRUCTS,
|
|
306
|
+
export function decodeQDuelGetPercentFeesOutput(data) {
|
|
307
|
+
return decodePayload(data, Q_DUEL_GET_PERCENT_FEES_OUTPUT_FIELDS, STRUCTS, (_pk) => 'A'.repeat(60));
|
|
363
308
|
}
|
|
364
309
|
export async function qDuelGetPercentFees(live, options) {
|
|
365
310
|
return callContractFunction({
|
|
@@ -374,7 +319,7 @@ export async function qDuelGetPercentFees(live, options) {
|
|
|
374
319
|
...options,
|
|
375
320
|
});
|
|
376
321
|
}
|
|
377
|
-
export const Q_DUEL_GET_ROOMS_INPUT_TYPE =
|
|
322
|
+
export const Q_DUEL_GET_ROOMS_INPUT_TYPE = 2;
|
|
378
323
|
export const Q_DUEL_GET_ROOMS_INPUT_SIZE = 0;
|
|
379
324
|
const Q_DUEL_GET_ROOMS_OUTPUT_FIELDS = [
|
|
380
325
|
{
|
|
@@ -393,8 +338,8 @@ const Q_DUEL_GET_ROOMS_OUTPUT_FIELDS = [
|
|
|
393
338
|
byteLength: 1,
|
|
394
339
|
},
|
|
395
340
|
];
|
|
396
|
-
export function decodeQDuelGetRoomsOutput(data
|
|
397
|
-
return decodePayload(data, Q_DUEL_GET_ROOMS_OUTPUT_FIELDS, STRUCTS,
|
|
341
|
+
export function decodeQDuelGetRoomsOutput(data) {
|
|
342
|
+
return decodePayload(data, Q_DUEL_GET_ROOMS_OUTPUT_FIELDS, STRUCTS, (_pk) => 'A'.repeat(60));
|
|
398
343
|
}
|
|
399
344
|
export async function qDuelGetRooms(live, options) {
|
|
400
345
|
return callContractFunction({
|
|
@@ -409,7 +354,7 @@ export async function qDuelGetRooms(live, options) {
|
|
|
409
354
|
...options,
|
|
410
355
|
});
|
|
411
356
|
}
|
|
412
|
-
export const Q_DUEL_GET_TTL_HOURS_INPUT_TYPE =
|
|
357
|
+
export const Q_DUEL_GET_TTL_HOURS_INPUT_TYPE = 3;
|
|
413
358
|
export const Q_DUEL_GET_TTL_HOURS_INPUT_SIZE = 0;
|
|
414
359
|
const Q_DUEL_GET_TTL_HOURS_OUTPUT_FIELDS = [
|
|
415
360
|
{
|
|
@@ -425,8 +370,8 @@ const Q_DUEL_GET_TTL_HOURS_OUTPUT_FIELDS = [
|
|
|
425
370
|
byteLength: 1,
|
|
426
371
|
},
|
|
427
372
|
];
|
|
428
|
-
export function decodeQDuelGetTTLHoursOutput(data
|
|
429
|
-
return decodePayload(data, Q_DUEL_GET_TTL_HOURS_OUTPUT_FIELDS, STRUCTS,
|
|
373
|
+
export function decodeQDuelGetTTLHoursOutput(data) {
|
|
374
|
+
return decodePayload(data, Q_DUEL_GET_TTL_HOURS_OUTPUT_FIELDS, STRUCTS, (_pk) => 'A'.repeat(60));
|
|
430
375
|
}
|
|
431
376
|
export async function qDuelGetTTLHours(live, options) {
|
|
432
377
|
return callContractFunction({
|
|
@@ -441,7 +386,7 @@ export async function qDuelGetTTLHours(live, options) {
|
|
|
441
386
|
...options,
|
|
442
387
|
});
|
|
443
388
|
}
|
|
444
|
-
export const Q_DUEL_GET_USER_PROFILE_INPUT_TYPE =
|
|
389
|
+
export const Q_DUEL_GET_USER_PROFILE_INPUT_TYPE = 4;
|
|
445
390
|
export const Q_DUEL_GET_USER_PROFILE_INPUT_SIZE = 32;
|
|
446
391
|
const Q_DUEL_GET_USER_PROFILE_INPUT_FIELDS = [
|
|
447
392
|
{
|
|
@@ -451,7 +396,7 @@ const Q_DUEL_GET_USER_PROFILE_INPUT_FIELDS = [
|
|
|
451
396
|
byteLength: 32,
|
|
452
397
|
},
|
|
453
398
|
];
|
|
454
|
-
export function buildQDuelGetUserProfileInput(input, identityToPublicKey
|
|
399
|
+
export function buildQDuelGetUserProfileInput(input, identityToPublicKey) {
|
|
455
400
|
return buildPayload(Q_DUEL_GET_USER_PROFILE_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
|
|
456
401
|
}
|
|
457
402
|
const Q_DUEL_GET_USER_PROFILE_OUTPUT_FIELDS = [
|
|
@@ -498,7 +443,7 @@ const Q_DUEL_GET_USER_PROFILE_OUTPUT_FIELDS = [
|
|
|
498
443
|
byteLength: 1,
|
|
499
444
|
},
|
|
500
445
|
];
|
|
501
|
-
export function decodeQDuelGetUserProfileOutput(data, publicKeyToIdentity
|
|
446
|
+
export function decodeQDuelGetUserProfileOutput(data, publicKeyToIdentity) {
|
|
502
447
|
return decodePayload(data, Q_DUEL_GET_USER_PROFILE_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
|
|
503
448
|
}
|
|
504
449
|
export async function qDuelGetUserProfile(live, input, options) {
|
|
@@ -514,7 +459,62 @@ export async function qDuelGetUserProfile(live, input, options) {
|
|
|
514
459
|
...options,
|
|
515
460
|
});
|
|
516
461
|
}
|
|
517
|
-
export const
|
|
462
|
+
export const Q_DUEL_CALCULATE_REVENUE_INPUT_TYPE = 5;
|
|
463
|
+
export const Q_DUEL_CALCULATE_REVENUE_INPUT_SIZE = 8;
|
|
464
|
+
const Q_DUEL_CALCULATE_REVENUE_INPUT_FIELDS = [
|
|
465
|
+
{
|
|
466
|
+
name: 'amount',
|
|
467
|
+
type: 'uint64',
|
|
468
|
+
offset: 0,
|
|
469
|
+
byteLength: 8,
|
|
470
|
+
},
|
|
471
|
+
];
|
|
472
|
+
export function buildQDuelCalculateRevenueInput(input) {
|
|
473
|
+
return buildPayload(Q_DUEL_CALCULATE_REVENUE_INPUT_FIELDS, STRUCTS, input, (_) => new Uint8Array(32));
|
|
474
|
+
}
|
|
475
|
+
const Q_DUEL_CALCULATE_REVENUE_OUTPUT_FIELDS = [
|
|
476
|
+
{
|
|
477
|
+
name: 'devFee',
|
|
478
|
+
type: 'uint64',
|
|
479
|
+
offset: 0,
|
|
480
|
+
byteLength: 8,
|
|
481
|
+
},
|
|
482
|
+
{
|
|
483
|
+
name: 'burnFee',
|
|
484
|
+
type: 'uint64',
|
|
485
|
+
offset: 8,
|
|
486
|
+
byteLength: 8,
|
|
487
|
+
},
|
|
488
|
+
{
|
|
489
|
+
name: 'shareholdersFee',
|
|
490
|
+
type: 'uint64',
|
|
491
|
+
offset: 16,
|
|
492
|
+
byteLength: 8,
|
|
493
|
+
},
|
|
494
|
+
{
|
|
495
|
+
name: 'winner',
|
|
496
|
+
type: 'uint64',
|
|
497
|
+
offset: 24,
|
|
498
|
+
byteLength: 8,
|
|
499
|
+
},
|
|
500
|
+
];
|
|
501
|
+
export function decodeQDuelCalculateRevenueOutput(data) {
|
|
502
|
+
return decodePayload(data, Q_DUEL_CALCULATE_REVENUE_OUTPUT_FIELDS, STRUCTS, (_pk) => 'A'.repeat(60));
|
|
503
|
+
}
|
|
504
|
+
export async function qDuelCalculateRevenue(live, input, options) {
|
|
505
|
+
return callContractFunction({
|
|
506
|
+
live,
|
|
507
|
+
contractIndex: Q_DUEL_CONTRACT_INDEX,
|
|
508
|
+
inputType: Q_DUEL_CALCULATE_REVENUE_INPUT_TYPE,
|
|
509
|
+
inputSize: Q_DUEL_CALCULATE_REVENUE_INPUT_SIZE,
|
|
510
|
+
inputFields: Q_DUEL_CALCULATE_REVENUE_INPUT_FIELDS,
|
|
511
|
+
outputFields: Q_DUEL_CALCULATE_REVENUE_OUTPUT_FIELDS,
|
|
512
|
+
structs: STRUCTS,
|
|
513
|
+
input: input,
|
|
514
|
+
...options,
|
|
515
|
+
});
|
|
516
|
+
}
|
|
517
|
+
export const Q_DUEL_GET_LAST_WINNERS_INPUT_TYPE = 6;
|
|
518
518
|
export const Q_DUEL_GET_LAST_WINNERS_INPUT_SIZE = 0;
|
|
519
519
|
const Q_DUEL_GET_LAST_WINNERS_OUTPUT_FIELDS = [
|
|
520
520
|
{
|
|
@@ -533,8 +533,8 @@ const Q_DUEL_GET_LAST_WINNERS_OUTPUT_FIELDS = [
|
|
|
533
533
|
byteLength: 1,
|
|
534
534
|
},
|
|
535
535
|
];
|
|
536
|
-
export function decodeQDuelGetLastWinnersOutput(data
|
|
537
|
-
return decodePayload(data, Q_DUEL_GET_LAST_WINNERS_OUTPUT_FIELDS, STRUCTS,
|
|
536
|
+
export function decodeQDuelGetLastWinnersOutput(data) {
|
|
537
|
+
return decodePayload(data, Q_DUEL_GET_LAST_WINNERS_OUTPUT_FIELDS, STRUCTS, (_pk) => 'A'.repeat(60));
|
|
538
538
|
}
|
|
539
539
|
export async function qDuelGetLastWinners(live, options) {
|
|
540
540
|
return callContractFunction({
|
|
@@ -551,17 +551,16 @@ export async function qDuelGetLastWinners(live, options) {
|
|
|
551
551
|
}
|
|
552
552
|
export const qDuel = {
|
|
553
553
|
contractIndex: Q_DUEL_CONTRACT_INDEX,
|
|
554
|
-
CalculateRevenue: qDuelCalculateRevenue,
|
|
555
554
|
GetPercentFees: qDuelGetPercentFees,
|
|
556
555
|
GetRooms: qDuelGetRooms,
|
|
557
556
|
GetTTLHours: qDuelGetTTLHours,
|
|
558
557
|
GetUserProfile: qDuelGetUserProfile,
|
|
558
|
+
CalculateRevenue: qDuelCalculateRevenue,
|
|
559
559
|
GetLastWinners: qDuelGetLastWinners,
|
|
560
560
|
buildCreateRoomInput: buildQDuelCreateRoomInput,
|
|
561
561
|
decodeCreateRoomOutput: decodeQDuelCreateRoomOutput,
|
|
562
562
|
buildConnectToRoomInput: buildQDuelConnectToRoomInput,
|
|
563
563
|
decodeConnectToRoomOutput: decodeQDuelConnectToRoomOutput,
|
|
564
|
-
decodeCloseRoomOutput: decodeQDuelCloseRoomOutput,
|
|
565
564
|
buildSetPercentFeesInput: buildQDuelSetPercentFeesInput,
|
|
566
565
|
decodeSetPercentFeesOutput: decodeQDuelSetPercentFeesOutput,
|
|
567
566
|
buildSetTTLHoursInput: buildQDuelSetTTLHoursInput,
|
|
@@ -569,5 +568,6 @@ export const qDuel = {
|
|
|
569
568
|
decodeDepositOutput: decodeQDuelDepositOutput,
|
|
570
569
|
buildWithdrawInput: buildQDuelWithdrawInput,
|
|
571
570
|
decodeWithdrawOutput: decodeQDuelWithdrawOutput,
|
|
571
|
+
decodeCloseRoomOutput: decodeQDuelCloseRoomOutput,
|
|
572
572
|
};
|
|
573
573
|
//# sourceMappingURL=qduel.js.map
|