@karn_lat/protocol-sdk 0.1.0-alpha.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/README.md +68 -0
- package/dist/__tests__/setup.d.ts +14 -0
- package/dist/__tests__/setup.d.ts.map +1 -0
- package/dist/__tests__/setup.js +44 -0
- package/dist/__tests__/setup.js.map +1 -0
- package/dist/clients/GovernorClient.d.ts +9 -0
- package/dist/clients/GovernorClient.d.ts.map +1 -0
- package/dist/clients/GovernorClient.js +18 -0
- package/dist/clients/GovernorClient.js.map +1 -0
- package/dist/clients/TreasuryClient.d.ts +9 -0
- package/dist/clients/TreasuryClient.d.ts.map +1 -0
- package/dist/clients/TreasuryClient.js +18 -0
- package/dist/clients/TreasuryClient.js.map +1 -0
- package/dist/clients/ValocracyClient.d.ts +13 -0
- package/dist/clients/ValocracyClient.d.ts.map +1 -0
- package/dist/clients/ValocracyClient.js +32 -0
- package/dist/clients/ValocracyClient.js.map +1 -0
- package/dist/clients/index.d.ts +4 -0
- package/dist/clients/index.d.ts.map +1 -0
- package/dist/clients/index.js +4 -0
- package/dist/clients/index.js.map +1 -0
- package/dist/generated/governor/src/index.d.ts +400 -0
- package/dist/generated/governor/src/index.d.ts.map +1 -0
- package/dist/generated/governor/src/index.js +63 -0
- package/dist/generated/governor/src/index.js.map +1 -0
- package/dist/generated/treasury/src/index.d.ts +474 -0
- package/dist/generated/treasury/src/index.d.ts.map +1 -0
- package/dist/generated/treasury/src/index.js +54 -0
- package/dist/generated/treasury/src/index.js.map +1 -0
- package/dist/generated/valocracy/src/index.d.ts +807 -0
- package/dist/generated/valocracy/src/index.d.ts.map +1 -0
- package/dist/generated/valocracy/src/index.js +114 -0
- package/dist/generated/valocracy/src/index.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -0
- package/dist/react/hooks/useGovernor.d.ts +24 -0
- package/dist/react/hooks/useGovernor.d.ts.map +1 -0
- package/dist/react/hooks/useGovernor.js +45 -0
- package/dist/react/hooks/useGovernor.js.map +1 -0
- package/dist/react/hooks/useMultiWallet.d.ts +35 -0
- package/dist/react/hooks/useMultiWallet.d.ts.map +1 -0
- package/dist/react/hooks/useMultiWallet.js +87 -0
- package/dist/react/hooks/useMultiWallet.js.map +1 -0
- package/dist/react/hooks/useTreasury.d.ts +14 -0
- package/dist/react/hooks/useTreasury.d.ts.map +1 -0
- package/dist/react/hooks/useTreasury.js +45 -0
- package/dist/react/hooks/useTreasury.js.map +1 -0
- package/dist/react/hooks/useValocracy.d.ts +16 -0
- package/dist/react/hooks/useValocracy.d.ts.map +1 -0
- package/dist/react/hooks/useValocracy.js +54 -0
- package/dist/react/hooks/useValocracy.js.map +1 -0
- package/dist/react/hooks/useWallet.d.ts +13 -0
- package/dist/react/hooks/useWallet.d.ts.map +1 -0
- package/dist/react/hooks/useWallet.js +51 -0
- package/dist/react/hooks/useWallet.js.map +1 -0
- package/dist/react/index.d.ts +7 -0
- package/dist/react/index.d.ts.map +1 -0
- package/dist/react/index.js +7 -0
- package/dist/react/index.js.map +1 -0
- package/dist/react/providers/KarnProvider.d.ts +25 -0
- package/dist/react/providers/KarnProvider.d.ts.map +1 -0
- package/dist/react/providers/KarnProvider.js +25 -0
- package/dist/react/providers/KarnProvider.js.map +1 -0
- package/dist/utils/decay.d.ts +19 -0
- package/dist/utils/decay.d.ts.map +1 -0
- package/dist/utils/decay.js +33 -0
- package/dist/utils/decay.js.map +1 -0
- package/dist/utils/index.d.ts +4 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +4 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/polling.d.ts +75 -0
- package/dist/utils/polling.d.ts.map +1 -0
- package/dist/utils/polling.js +104 -0
- package/dist/utils/polling.js.map +1 -0
- package/dist/utils/simulation.d.ts +67 -0
- package/dist/utils/simulation.d.ts.map +1 -0
- package/dist/utils/simulation.js +88 -0
- package/dist/utils/simulation.js.map +1 -0
- package/dist/wallet/WalletManager.d.ts +77 -0
- package/dist/wallet/WalletManager.d.ts.map +1 -0
- package/dist/wallet/WalletManager.js +268 -0
- package/dist/wallet/WalletManager.js.map +1 -0
- package/dist/wallet/adapters/AlbedoAdapter.d.ts +47 -0
- package/dist/wallet/adapters/AlbedoAdapter.d.ts.map +1 -0
- package/dist/wallet/adapters/AlbedoAdapter.js +84 -0
- package/dist/wallet/adapters/AlbedoAdapter.js.map +1 -0
- package/dist/wallet/adapters/FreighterAdapter.d.ts +42 -0
- package/dist/wallet/adapters/FreighterAdapter.d.ts.map +1 -0
- package/dist/wallet/adapters/FreighterAdapter.js +107 -0
- package/dist/wallet/adapters/FreighterAdapter.js.map +1 -0
- package/dist/wallet/adapters/LobstrAdapter.d.ts +34 -0
- package/dist/wallet/adapters/LobstrAdapter.d.ts.map +1 -0
- package/dist/wallet/adapters/LobstrAdapter.js +89 -0
- package/dist/wallet/adapters/LobstrAdapter.js.map +1 -0
- package/dist/wallet/adapters/RabetAdapter.d.ts +39 -0
- package/dist/wallet/adapters/RabetAdapter.d.ts.map +1 -0
- package/dist/wallet/adapters/RabetAdapter.js +104 -0
- package/dist/wallet/adapters/RabetAdapter.js.map +1 -0
- package/dist/wallet/adapters/xBullAdapter.d.ts +41 -0
- package/dist/wallet/adapters/xBullAdapter.d.ts.map +1 -0
- package/dist/wallet/adapters/xBullAdapter.js +72 -0
- package/dist/wallet/adapters/xBullAdapter.js.map +1 -0
- package/dist/wallet/index.d.ts +20 -0
- package/dist/wallet/index.d.ts.map +1 -0
- package/dist/wallet/index.js +23 -0
- package/dist/wallet/index.js.map +1 -0
- package/dist/wallet/types.d.ts +165 -0
- package/dist/wallet/types.d.ts.map +1 -0
- package/dist/wallet/types.js +50 -0
- package/dist/wallet/types.js.map +1 -0
- package/examples/basic-usage.ts +28 -0
- package/jest.config.js +37 -0
- package/package.json +58 -0
- package/src/__tests__/README.md +364 -0
- package/src/__tests__/setup.ts +57 -0
- package/src/__tests__/utils/decay.test.ts +331 -0
- package/src/__tests__/wallet/WalletManager.test.ts +410 -0
- package/src/clients/GovernorClient.ts +23 -0
- package/src/clients/TreasuryClient.ts +23 -0
- package/src/clients/ValocracyClient.ts +48 -0
- package/src/clients/index.ts +3 -0
- package/src/generated/governor/README.md +54 -0
- package/src/generated/governor/package.json +17 -0
- package/src/generated/governor/src/index.ts +428 -0
- package/src/generated/governor/tsconfig.json +98 -0
- package/src/generated/treasury/README.md +54 -0
- package/src/generated/treasury/package.json +17 -0
- package/src/generated/treasury/src/index.ts +495 -0
- package/src/generated/treasury/tsconfig.json +98 -0
- package/src/generated/valocracy/README.md +54 -0
- package/src/generated/valocracy/package.json +17 -0
- package/src/generated/valocracy/src/index.ts +831 -0
- package/src/generated/valocracy/tsconfig.json +98 -0
- package/src/index.ts +4 -0
- package/src/react/hooks/useGovernor.ts +69 -0
- package/src/react/hooks/useMultiWallet.ts +169 -0
- package/src/react/hooks/useTreasury.ts +57 -0
- package/src/react/hooks/useValocracy.ts +66 -0
- package/src/react/hooks/useWallet.ts +60 -0
- package/src/react/index.ts +6 -0
- package/src/react/providers/KarnProvider.tsx +63 -0
- package/src/utils/decay.ts +44 -0
- package/src/utils/index.ts +3 -0
- package/src/utils/polling.ts +193 -0
- package/src/utils/simulation.ts +136 -0
- package/src/wallet/WalletManager.ts +360 -0
- package/src/wallet/adapters/AlbedoAdapter.ts +140 -0
- package/src/wallet/adapters/FreighterAdapter.ts +179 -0
- package/src/wallet/adapters/LobstrAdapter.ts +142 -0
- package/src/wallet/adapters/RabetAdapter.ts +162 -0
- package/src/wallet/adapters/xBullAdapter.ts +123 -0
- package/src/wallet/index.ts +37 -0
- package/src/wallet/types.ts +204 -0
- package/tsconfig.json +40 -0
|
@@ -0,0 +1,400 @@
|
|
|
1
|
+
import { Buffer } from "buffer";
|
|
2
|
+
import { AssembledTransaction, Client as ContractClient, ClientOptions as ContractClientOptions, MethodOptions, Result } from '@stellar/stellar-sdk/contract';
|
|
3
|
+
import type { u64, Option } from '@stellar/stellar-sdk/contract';
|
|
4
|
+
export * from '@stellar/stellar-sdk';
|
|
5
|
+
export * as contract from '@stellar/stellar-sdk/contract';
|
|
6
|
+
export * as rpc from '@stellar/stellar-sdk/rpc';
|
|
7
|
+
export declare const GovernorError: {
|
|
8
|
+
1: {
|
|
9
|
+
message: string;
|
|
10
|
+
};
|
|
11
|
+
2: {
|
|
12
|
+
message: string;
|
|
13
|
+
};
|
|
14
|
+
3: {
|
|
15
|
+
message: string;
|
|
16
|
+
};
|
|
17
|
+
4: {
|
|
18
|
+
message: string;
|
|
19
|
+
};
|
|
20
|
+
5: {
|
|
21
|
+
message: string;
|
|
22
|
+
};
|
|
23
|
+
6: {
|
|
24
|
+
message: string;
|
|
25
|
+
};
|
|
26
|
+
7: {
|
|
27
|
+
message: string;
|
|
28
|
+
};
|
|
29
|
+
8: {
|
|
30
|
+
message: string;
|
|
31
|
+
};
|
|
32
|
+
9: {
|
|
33
|
+
message: string;
|
|
34
|
+
};
|
|
35
|
+
10: {
|
|
36
|
+
message: string;
|
|
37
|
+
};
|
|
38
|
+
11: {
|
|
39
|
+
message: string;
|
|
40
|
+
};
|
|
41
|
+
12: {
|
|
42
|
+
message: string;
|
|
43
|
+
};
|
|
44
|
+
13: {
|
|
45
|
+
message: string;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
export interface GovernanceConfig {
|
|
49
|
+
/**
|
|
50
|
+
* Minimum Mana required to create a proposal
|
|
51
|
+
*/
|
|
52
|
+
proposal_threshold: u64;
|
|
53
|
+
/**
|
|
54
|
+
* Percentage of votes required for a proposal to pass (e.g. 51)
|
|
55
|
+
*/
|
|
56
|
+
quorum_percentage: u64;
|
|
57
|
+
/**
|
|
58
|
+
* Voting delay in seconds (time between proposal creation and voting start)
|
|
59
|
+
*/
|
|
60
|
+
voting_delay: u64;
|
|
61
|
+
/**
|
|
62
|
+
* Voting period in seconds (duration of voting)
|
|
63
|
+
*/
|
|
64
|
+
voting_period: u64;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Storage keys for the Governor contract
|
|
68
|
+
*/
|
|
69
|
+
export type DataKey = {
|
|
70
|
+
tag: "Valocracy";
|
|
71
|
+
values: void;
|
|
72
|
+
} | {
|
|
73
|
+
tag: "ProposalCount";
|
|
74
|
+
values: void;
|
|
75
|
+
} | {
|
|
76
|
+
tag: "Proposal";
|
|
77
|
+
values: readonly [u64];
|
|
78
|
+
} | {
|
|
79
|
+
tag: "Vote";
|
|
80
|
+
values: readonly [u64, string];
|
|
81
|
+
} | {
|
|
82
|
+
tag: "ReentrancyLock";
|
|
83
|
+
values: void;
|
|
84
|
+
} | {
|
|
85
|
+
tag: "Config";
|
|
86
|
+
values: void;
|
|
87
|
+
};
|
|
88
|
+
/**
|
|
89
|
+
* An action to execute when proposal succeeds
|
|
90
|
+
*/
|
|
91
|
+
export interface Action {
|
|
92
|
+
/**
|
|
93
|
+
* Arguments as raw vals (simplified)
|
|
94
|
+
*/
|
|
95
|
+
args: Array<any>;
|
|
96
|
+
/**
|
|
97
|
+
* Contract to call
|
|
98
|
+
*/
|
|
99
|
+
contract_id: string;
|
|
100
|
+
/**
|
|
101
|
+
* Function name to invoke
|
|
102
|
+
*/
|
|
103
|
+
function: string;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* A governance proposal
|
|
107
|
+
*/
|
|
108
|
+
export interface Proposal {
|
|
109
|
+
/**
|
|
110
|
+
* Actions to execute on success
|
|
111
|
+
*/
|
|
112
|
+
actions: Array<Action>;
|
|
113
|
+
/**
|
|
114
|
+
* Total votes against
|
|
115
|
+
*/
|
|
116
|
+
against_votes: u64;
|
|
117
|
+
/**
|
|
118
|
+
* Description of the proposal
|
|
119
|
+
*/
|
|
120
|
+
description: string;
|
|
121
|
+
/**
|
|
122
|
+
* Timestamp when voting ends
|
|
123
|
+
*/
|
|
124
|
+
end_time: u64;
|
|
125
|
+
/**
|
|
126
|
+
* Whether the proposal has been executed
|
|
127
|
+
*/
|
|
128
|
+
executed: boolean;
|
|
129
|
+
/**
|
|
130
|
+
* Total votes in favor
|
|
131
|
+
*/
|
|
132
|
+
for_votes: u64;
|
|
133
|
+
/**
|
|
134
|
+
* Unique proposal ID
|
|
135
|
+
*/
|
|
136
|
+
id: u64;
|
|
137
|
+
/**
|
|
138
|
+
* Address that created the proposal
|
|
139
|
+
*/
|
|
140
|
+
proposer: string;
|
|
141
|
+
/**
|
|
142
|
+
* Timestamp when voting starts
|
|
143
|
+
*/
|
|
144
|
+
start_time: u64;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Proposal state enum
|
|
148
|
+
*/
|
|
149
|
+
export declare enum ProposalState {
|
|
150
|
+
Pending = 0,
|
|
151
|
+
Active = 1,
|
|
152
|
+
Succeeded = 2,
|
|
153
|
+
Defeated = 3,
|
|
154
|
+
Executed = 4
|
|
155
|
+
}
|
|
156
|
+
export interface Client {
|
|
157
|
+
/**
|
|
158
|
+
* Construct and simulate a execute transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
|
|
159
|
+
* Execute a succeeded proposal
|
|
160
|
+
*/
|
|
161
|
+
execute: ({ proposal_id }: {
|
|
162
|
+
proposal_id: u64;
|
|
163
|
+
}, options?: {
|
|
164
|
+
/**
|
|
165
|
+
* The fee to pay for the transaction. Default: BASE_FEE
|
|
166
|
+
*/
|
|
167
|
+
fee?: number;
|
|
168
|
+
/**
|
|
169
|
+
* The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
|
|
170
|
+
*/
|
|
171
|
+
timeoutInSeconds?: number;
|
|
172
|
+
/**
|
|
173
|
+
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
174
|
+
*/
|
|
175
|
+
simulate?: boolean;
|
|
176
|
+
}) => Promise<AssembledTransaction<Result<void>>>;
|
|
177
|
+
/**
|
|
178
|
+
* Construct and simulate a propose transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
|
|
179
|
+
* Create a new proposal.
|
|
180
|
+
*
|
|
181
|
+
* Open to any member (level > 0 in the Valocracy contract).
|
|
182
|
+
*/
|
|
183
|
+
propose: ({ proposer, description, actions }: {
|
|
184
|
+
proposer: string;
|
|
185
|
+
description: string;
|
|
186
|
+
actions: Array<Action>;
|
|
187
|
+
}, options?: {
|
|
188
|
+
/**
|
|
189
|
+
* The fee to pay for the transaction. Default: BASE_FEE
|
|
190
|
+
*/
|
|
191
|
+
fee?: number;
|
|
192
|
+
/**
|
|
193
|
+
* The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
|
|
194
|
+
*/
|
|
195
|
+
timeoutInSeconds?: number;
|
|
196
|
+
/**
|
|
197
|
+
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
198
|
+
*/
|
|
199
|
+
simulate?: boolean;
|
|
200
|
+
}) => Promise<AssembledTransaction<Result<u64>>>;
|
|
201
|
+
/**
|
|
202
|
+
* Construct and simulate a upgrade transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
|
|
203
|
+
* Upgrade the contract to a new WASM hash.
|
|
204
|
+
* Only callable by the governor itself (requires governance proposal).
|
|
205
|
+
*/
|
|
206
|
+
upgrade: ({ new_wasm_hash }: {
|
|
207
|
+
new_wasm_hash: Buffer;
|
|
208
|
+
}, options?: {
|
|
209
|
+
/**
|
|
210
|
+
* The fee to pay for the transaction. Default: BASE_FEE
|
|
211
|
+
*/
|
|
212
|
+
fee?: number;
|
|
213
|
+
/**
|
|
214
|
+
* The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
|
|
215
|
+
*/
|
|
216
|
+
timeoutInSeconds?: number;
|
|
217
|
+
/**
|
|
218
|
+
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
219
|
+
*/
|
|
220
|
+
simulate?: boolean;
|
|
221
|
+
}) => Promise<AssembledTransaction<Result<void>>>;
|
|
222
|
+
/**
|
|
223
|
+
* Construct and simulate a cast_vote transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
|
|
224
|
+
* Cast a vote on a proposal
|
|
225
|
+
*/
|
|
226
|
+
cast_vote: ({ voter, proposal_id, support }: {
|
|
227
|
+
voter: string;
|
|
228
|
+
proposal_id: u64;
|
|
229
|
+
support: boolean;
|
|
230
|
+
}, options?: {
|
|
231
|
+
/**
|
|
232
|
+
* The fee to pay for the transaction. Default: BASE_FEE
|
|
233
|
+
*/
|
|
234
|
+
fee?: number;
|
|
235
|
+
/**
|
|
236
|
+
* The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
|
|
237
|
+
*/
|
|
238
|
+
timeoutInSeconds?: number;
|
|
239
|
+
/**
|
|
240
|
+
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
241
|
+
*/
|
|
242
|
+
simulate?: boolean;
|
|
243
|
+
}) => Promise<AssembledTransaction<Result<u64>>>;
|
|
244
|
+
/**
|
|
245
|
+
* Construct and simulate a has_voted transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
|
|
246
|
+
* Check if an account has voted on a proposal
|
|
247
|
+
*/
|
|
248
|
+
has_voted: ({ proposal_id, voter }: {
|
|
249
|
+
proposal_id: u64;
|
|
250
|
+
voter: string;
|
|
251
|
+
}, options?: {
|
|
252
|
+
/**
|
|
253
|
+
* The fee to pay for the transaction. Default: BASE_FEE
|
|
254
|
+
*/
|
|
255
|
+
fee?: number;
|
|
256
|
+
/**
|
|
257
|
+
* The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
|
|
258
|
+
*/
|
|
259
|
+
timeoutInSeconds?: number;
|
|
260
|
+
/**
|
|
261
|
+
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
262
|
+
*/
|
|
263
|
+
simulate?: boolean;
|
|
264
|
+
}) => Promise<AssembledTransaction<boolean>>;
|
|
265
|
+
/**
|
|
266
|
+
* Construct and simulate a valocracy transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
|
|
267
|
+
* Get valocracy contract address
|
|
268
|
+
*/
|
|
269
|
+
valocracy: (options?: {
|
|
270
|
+
/**
|
|
271
|
+
* The fee to pay for the transaction. Default: BASE_FEE
|
|
272
|
+
*/
|
|
273
|
+
fee?: number;
|
|
274
|
+
/**
|
|
275
|
+
* The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
|
|
276
|
+
*/
|
|
277
|
+
timeoutInSeconds?: number;
|
|
278
|
+
/**
|
|
279
|
+
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
280
|
+
*/
|
|
281
|
+
simulate?: boolean;
|
|
282
|
+
}) => Promise<AssembledTransaction<Option<string>>>;
|
|
283
|
+
/**
|
|
284
|
+
* Construct and simulate a initialize transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
|
|
285
|
+
* Initialize the Governor contract.
|
|
286
|
+
*
|
|
287
|
+
* No admin: only stores the Valocracy contract address for membership checks
|
|
288
|
+
* and voting power queries.
|
|
289
|
+
*/
|
|
290
|
+
initialize: ({ valocracy }: {
|
|
291
|
+
valocracy: string;
|
|
292
|
+
}, options?: {
|
|
293
|
+
/**
|
|
294
|
+
* The fee to pay for the transaction. Default: BASE_FEE
|
|
295
|
+
*/
|
|
296
|
+
fee?: number;
|
|
297
|
+
/**
|
|
298
|
+
* The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
|
|
299
|
+
*/
|
|
300
|
+
timeoutInSeconds?: number;
|
|
301
|
+
/**
|
|
302
|
+
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
303
|
+
*/
|
|
304
|
+
simulate?: boolean;
|
|
305
|
+
}) => Promise<AssembledTransaction<Result<void>>>;
|
|
306
|
+
/**
|
|
307
|
+
* Construct and simulate a get_proposal transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
|
|
308
|
+
* Get a proposal by ID
|
|
309
|
+
*/
|
|
310
|
+
get_proposal: ({ proposal_id }: {
|
|
311
|
+
proposal_id: u64;
|
|
312
|
+
}, options?: {
|
|
313
|
+
/**
|
|
314
|
+
* The fee to pay for the transaction. Default: BASE_FEE
|
|
315
|
+
*/
|
|
316
|
+
fee?: number;
|
|
317
|
+
/**
|
|
318
|
+
* The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
|
|
319
|
+
*/
|
|
320
|
+
timeoutInSeconds?: number;
|
|
321
|
+
/**
|
|
322
|
+
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
323
|
+
*/
|
|
324
|
+
simulate?: boolean;
|
|
325
|
+
}) => Promise<AssembledTransaction<Option<Proposal>>>;
|
|
326
|
+
/**
|
|
327
|
+
* Construct and simulate a update_config transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
|
|
328
|
+
* Update governance configuration.
|
|
329
|
+
* Only callable by the Governor (self-governance).
|
|
330
|
+
*/
|
|
331
|
+
update_config: ({ config }: {
|
|
332
|
+
config: GovernanceConfig;
|
|
333
|
+
}, options?: {
|
|
334
|
+
/**
|
|
335
|
+
* The fee to pay for the transaction. Default: BASE_FEE
|
|
336
|
+
*/
|
|
337
|
+
fee?: number;
|
|
338
|
+
/**
|
|
339
|
+
* The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
|
|
340
|
+
*/
|
|
341
|
+
timeoutInSeconds?: number;
|
|
342
|
+
/**
|
|
343
|
+
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
344
|
+
*/
|
|
345
|
+
simulate?: boolean;
|
|
346
|
+
}) => Promise<AssembledTransaction<Result<void>>>;
|
|
347
|
+
/**
|
|
348
|
+
* Construct and simulate a proposal_count transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
|
|
349
|
+
* Get the number of proposals
|
|
350
|
+
*/
|
|
351
|
+
proposal_count: (options?: {
|
|
352
|
+
/**
|
|
353
|
+
* The fee to pay for the transaction. Default: BASE_FEE
|
|
354
|
+
*/
|
|
355
|
+
fee?: number;
|
|
356
|
+
/**
|
|
357
|
+
* The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
|
|
358
|
+
*/
|
|
359
|
+
timeoutInSeconds?: number;
|
|
360
|
+
/**
|
|
361
|
+
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
362
|
+
*/
|
|
363
|
+
simulate?: boolean;
|
|
364
|
+
}) => Promise<AssembledTransaction<u64>>;
|
|
365
|
+
/**
|
|
366
|
+
* Construct and simulate a get_proposal_state transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
|
|
367
|
+
* Get the current state of a proposal
|
|
368
|
+
*/
|
|
369
|
+
get_proposal_state: ({ proposal_id }: {
|
|
370
|
+
proposal_id: u64;
|
|
371
|
+
}, options?: {
|
|
372
|
+
/**
|
|
373
|
+
* The fee to pay for the transaction. Default: BASE_FEE
|
|
374
|
+
*/
|
|
375
|
+
fee?: number;
|
|
376
|
+
/**
|
|
377
|
+
* The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
|
|
378
|
+
*/
|
|
379
|
+
timeoutInSeconds?: number;
|
|
380
|
+
/**
|
|
381
|
+
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
382
|
+
*/
|
|
383
|
+
simulate?: boolean;
|
|
384
|
+
}) => Promise<AssembledTransaction<Result<ProposalState>>>;
|
|
385
|
+
}
|
|
386
|
+
export declare class Client extends ContractClient {
|
|
387
|
+
readonly options: ContractClientOptions;
|
|
388
|
+
static deploy<T = Client>(
|
|
389
|
+
/** Options for initializing a Client as well as for calling a method, with extras specific to deploying. */
|
|
390
|
+
options: MethodOptions & Omit<ContractClientOptions, "contractId"> & {
|
|
391
|
+
/** The hash of the Wasm blob, which must already be installed on-chain. */
|
|
392
|
+
wasmHash: Buffer | string;
|
|
393
|
+
/** Salt used to generate the contract's ID. Passed through to {@link Operation.createCustomContract}. Default: random. */
|
|
394
|
+
salt?: Buffer | Uint8Array;
|
|
395
|
+
/** The format used to decode `wasmHash`, if it's provided as a string. */
|
|
396
|
+
format?: "hex" | "base64";
|
|
397
|
+
}): Promise<AssembledTransaction<T>>;
|
|
398
|
+
constructor(options: ContractClientOptions);
|
|
399
|
+
}
|
|
400
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/generated/governor/src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,EACL,oBAAoB,EACpB,MAAM,IAAI,cAAc,EACxB,aAAa,IAAI,qBAAqB,EACtC,aAAa,EACb,MAAM,EAEP,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAGV,GAAG,EAMH,MAAM,EAGP,MAAM,+BAA+B,CAAC;AACvC,cAAc,sBAAsB,CAAA;AACpC,OAAO,KAAK,QAAQ,MAAM,+BAA+B,CAAA;AACzD,OAAO,KAAK,GAAG,MAAM,0BAA0B,CAAA;AAU/C,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAczB,CAAA;AAGD,MAAM,WAAW,gB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Eb;;WAEG;QACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAE1B;;WAEG;QACH,QAAQ,CAAC,EAAE,OAAO,CAAC;KACpB,KAAK,OAAO,CAAC,oBAAoB,CAAC,GAAG,CAAC,CAAC,CAAA;IAExC;;;OAGG;IACH,kBAAkB,EAAE,CAAC,EAAC,WAAW,EAAC,EAAE;QAAC,WAAW,EAAE,GAAG,CAAA;KAAC,EAAE,OAAO,CAAC,EAAE;QAChE;;WAEG;QACH,GAAG,CAAC,EAAE,MAAM,CAAC;QAEb;;WAEG;QACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAE1B;;WAEG;QACH,QAAQ,CAAC,EAAE,OAAO,CAAC;KACpB,KAAK,OAAO,CAAC,oBAAoB,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,CAAA;CAE3D;AACD,qBAAa,MAAO,SAAQ,cAAc;aAeZ,OAAO,EAAE,qBAAqB;WAd7C,MAAM,CAAC,CAAC,GAAG,MAAM;IAC5B,4GAA4G;IAC5G,OAAO,EAAE,aAAa,GACpB,IAAI,CAAC,qBAAqB,EAAE,YAAY,CAAC,GAAG;QAC1C,2EAA2E;QAC3E,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;QAC1B,0HAA0H;QAC1H,IAAI,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;QAC3B,0EAA0E;QAC1E,MAAM,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC;KAC3B,GACF,OAAO,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC;gBAGP,OAAO,EAAE,qBAAqB;CAuB3D"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { Buffer } from "buffer";
|
|
2
|
+
import { Client as ContractClient, Spec as ContractSpec, } from '@stellar/stellar-sdk/contract';
|
|
3
|
+
export * from '@stellar/stellar-sdk';
|
|
4
|
+
export * as contract from '@stellar/stellar-sdk/contract';
|
|
5
|
+
export * as rpc from '@stellar/stellar-sdk/rpc';
|
|
6
|
+
if (typeof window !== 'undefined') {
|
|
7
|
+
//@ts-ignore Buffer exists
|
|
8
|
+
window.Buffer = window.Buffer || Buffer;
|
|
9
|
+
}
|
|
10
|
+
export const GovernorError = {
|
|
11
|
+
1: { message: "AlreadyInitialized" },
|
|
12
|
+
2: { message: "NotInitialized" },
|
|
13
|
+
3: { message: "NotAuthorized" },
|
|
14
|
+
4: { message: "ProposalNotFound" },
|
|
15
|
+
5: { message: "VotingNotStarted" },
|
|
16
|
+
6: { message: "VotingEnded" },
|
|
17
|
+
7: { message: "AlreadyVoted" },
|
|
18
|
+
8: { message: "NoVotingPower" },
|
|
19
|
+
9: { message: "ProposalNotSucceeded" },
|
|
20
|
+
10: { message: "ProposalAlreadyExecuted" },
|
|
21
|
+
11: { message: "InvalidProposalState" },
|
|
22
|
+
12: { message: "NotAMember" },
|
|
23
|
+
13: { message: "ReentrancyDetected" }
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Proposal state enum
|
|
27
|
+
*/
|
|
28
|
+
export var ProposalState;
|
|
29
|
+
(function (ProposalState) {
|
|
30
|
+
ProposalState[ProposalState["Pending"] = 0] = "Pending";
|
|
31
|
+
ProposalState[ProposalState["Active"] = 1] = "Active";
|
|
32
|
+
ProposalState[ProposalState["Succeeded"] = 2] = "Succeeded";
|
|
33
|
+
ProposalState[ProposalState["Defeated"] = 3] = "Defeated";
|
|
34
|
+
ProposalState[ProposalState["Executed"] = 4] = "Executed";
|
|
35
|
+
})(ProposalState || (ProposalState = {}));
|
|
36
|
+
export class Client extends ContractClient {
|
|
37
|
+
static async deploy(
|
|
38
|
+
/** Options for initializing a Client as well as for calling a method, with extras specific to deploying. */
|
|
39
|
+
options) {
|
|
40
|
+
return ContractClient.deploy(null, options);
|
|
41
|
+
}
|
|
42
|
+
constructor(options) {
|
|
43
|
+
super(new ContractSpec(["AAAAAAAAABxFeGVjdXRlIGEgc3VjY2VlZGVkIHByb3Bvc2FsAAAAB2V4ZWN1dGUAAA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GV4ZWN1dGVkAAAAAAAIRXhlY3V0ZWQAAAAE"]), options);
|
|
60
|
+
this.options = options;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/generated/governor/src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,EAEL,MAAM,IAAI,cAAc,EAIxB,IAAI,IAAI,YAAY,GACrB,MAAM,+BAA+B,CAAC;AAcvC,cAAc,sBAAsB,CAAA;AACpC,OAAO,KAAK,QAAQ,MAAM,+BAA+B,CAAA;AACzD,OAAO,KAAK,GAAG,MAAM,0BAA0B,CAAA;AAE/C,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;IAClC,0BAA0B;IAC1B,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,IAAI,MAAM,CAAC;AAC1C,CAAC;AAKD,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,CAAC,EAAE,EAAC,OAAO,EAAC,oBAAoB,EAAC;IACjC,CAAC,EAAE,EAAC,OAAO,EAAC,gBAAgB,EAAC;IAC7B,CAAC,EAAE,EAAC,OAAO,EAAC,eAAe,EAAC;IAC5B,CAAC,EAAE,EAAC,OAAO,EAAC,kBAAkB,EAAC;IAC/B,CAAC,EAAE,EAAC,OAAO,EAAC,kBAAkB,EAAC;IAC/B,CAAC,EAAE,EAAC,OAAO,EAAC,aAAa,EAAC;IAC1B,CAAC,EAAE,EAAC,OAAO,EAAC,cAAc,EAAC;IAC3B,CAAC,EAAE,EAAC,OAAO,EAAC,eAAe,EAAC;IAC5B,CAAC,EAAE,EAAC,OAAO,EAAC,sBAAsB,EAAC;IACnC,EAAE,EAAE,EAAC,OAAO,EAAC,yBAAyB,EAAC;IACvC,EAAE,EAAE,EAAC,OAAO,EAAC,sBAAsB,EAAC;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