ault-sdk-ts 0.0.2-alpha.5
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/LICENSE +21 -0
- package/README.md +932 -0
- package/dist/agent/create-agent-client.d.ts +3 -0
- package/dist/agent/sign-and-broadcast.d.ts +38 -0
- package/dist/agent/tx/clob.d.ts +7 -0
- package/dist/agent/tx-executor.d.ts +17 -0
- package/dist/client.d.ts +61 -0
- package/dist/core/address.d.ts +14 -0
- package/dist/core/base64.d.ts +2 -0
- package/dist/core/clob-msgs.d.ts +33 -0
- package/dist/core/errors.d.ts +17 -0
- package/dist/core/http.d.ts +14 -0
- package/dist/core/network.d.ts +59 -0
- package/dist/core/pagination.d.ts +14 -0
- package/dist/core/query.d.ts +5 -0
- package/dist/core/with-status-fallback.d.ts +5 -0
- package/dist/eip712/builder.d.ts +45 -0
- package/dist/eip712/field-order.d.ts +2 -0
- package/dist/eip712/msg-encoders.generated.d.ts +1 -0
- package/dist/eip712/msg.generated.d.ts +109 -0
- package/dist/eip712/registry.d.ts +36 -0
- package/dist/eip712/registry.generated.d.ts +2 -0
- package/dist/eip712/sign-and-broadcast.d.ts +55 -0
- package/dist/eip712/signers.d.ts +83 -0
- package/dist/eip712/types.d.ts +58 -0
- package/dist/high-level/address-utils.d.ts +2 -0
- package/dist/high-level/create-client.d.ts +26 -0
- package/dist/high-level/query-helpers.d.ts +3 -0
- package/dist/high-level/signer.d.ts +6 -0
- package/dist/high-level/tx/agent.d.ts +3 -0
- package/dist/high-level/tx/authority.d.ts +3 -0
- package/dist/high-level/tx/clob.d.ts +3 -0
- package/dist/high-level/tx/context.d.ts +5 -0
- package/dist/high-level/tx/license.d.ts +3 -0
- package/dist/high-level/tx/market.d.ts +3 -0
- package/dist/high-level/tx/miner.d.ts +3 -0
- package/dist/high-level/tx/ratelimit.d.ts +3 -0
- package/dist/high-level/tx/reward.d.ts +3 -0
- package/dist/high-level/tx/staking.d.ts +3 -0
- package/dist/high-level/tx/tokenregistry.d.ts +3 -0
- package/dist/high-level/tx-executor.d.ts +18 -0
- package/dist/high-level/types.d.ts +477 -0
- package/dist/high-level-client.d.ts +2 -0
- package/dist/index.cjs +18434 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +38 -0
- package/dist/index.js +18162 -0
- package/dist/index.js.map +1 -0
- package/dist/proto/duration-json.d.ts +6 -0
- package/dist/proto/gen/amino/amino.d.ts +1 -0
- package/dist/proto/gen/ault/agent/v1/agent.d.ts +63 -0
- package/dist/proto/gen/ault/agent/v1/genesis.d.ts +44 -0
- package/dist/proto/gen/ault/agent/v1/params.d.ts +42 -0
- package/dist/proto/gen/ault/agent/v1/query.d.ts +73 -0
- package/dist/proto/gen/ault/agent/v1/tx.d.ts +91 -0
- package/dist/proto/gen/ault/authority/v1/authority.d.ts +15 -0
- package/dist/proto/gen/ault/authority/v1/genesis.d.ts +36 -0
- package/dist/proto/gen/ault/authority/v1/query.d.ts +53 -0
- package/dist/proto/gen/ault/authority/v1/tx.d.ts +50 -0
- package/dist/proto/gen/ault/clob/v1/fee.d.ts +37 -0
- package/dist/proto/gen/ault/clob/v1/genesis.d.ts +56 -0
- package/dist/proto/gen/ault/clob/v1/order_book.d.ts +32 -0
- package/dist/proto/gen/ault/clob/v1/params.d.ts +29 -0
- package/dist/proto/gen/ault/clob/v1/query.d.ts +56 -0
- package/dist/proto/gen/ault/clob/v1/tx.d.ts +116 -0
- package/dist/proto/gen/ault/license/v1/genesis.d.ts +140 -0
- package/dist/proto/gen/ault/license/v1/license.d.ts +151 -0
- package/dist/proto/gen/ault/license/v1/query.d.ts +273 -0
- package/dist/proto/gen/ault/license/v1/tx.d.ts +227 -0
- package/dist/proto/gen/ault/market/v1/genesis.d.ts +28 -0
- package/dist/proto/gen/ault/market/v1/market.d.ts +66 -0
- package/dist/proto/gen/ault/market/v1/params.d.ts +34 -0
- package/dist/proto/gen/ault/market/v1/query.d.ts +48 -0
- package/dist/proto/gen/ault/market/v1/tx.d.ts +87 -0
- package/dist/proto/gen/ault/miner/v1/genesis.d.ts +166 -0
- package/dist/proto/gen/ault/miner/v1/miner.d.ts +232 -0
- package/dist/proto/gen/ault/miner/v1/query.d.ts +254 -0
- package/dist/proto/gen/ault/miner/v1/tx.d.ts +207 -0
- package/dist/proto/gen/ault/ratelimit/v1/genesis.d.ts +27 -0
- package/dist/proto/gen/ault/ratelimit/v1/params.d.ts +35 -0
- package/dist/proto/gen/ault/ratelimit/v1/query.d.ts +42 -0
- package/dist/proto/gen/ault/ratelimit/v1/tx.d.ts +32 -0
- package/dist/proto/gen/ault/reward/v1/genesis.d.ts +67 -0
- package/dist/proto/gen/ault/reward/v1/query.d.ts +93 -0
- package/dist/proto/gen/ault/reward/v1/reward.d.ts +53 -0
- package/dist/proto/gen/ault/reward/v1/tx.d.ts +120 -0
- package/dist/proto/gen/ault/spot/v1/genesis.d.ts +26 -0
- package/dist/proto/gen/ault/spot/v1/order.d.ts +66 -0
- package/dist/proto/gen/ault/tokenregistry/v1/genesis.d.ts +34 -0
- package/dist/proto/gen/ault/tokenregistry/v1/query.d.ts +77 -0
- package/dist/proto/gen/ault/tokenregistry/v1/tokenregistry.d.ts +118 -0
- package/dist/proto/gen/ault/tokenregistry/v1/tx.d.ts +132 -0
- package/dist/proto/gen/cosmos/base/query/v1beta1/pagination.d.ts +82 -0
- package/dist/proto/gen/cosmos/base/v1beta1/coin.d.ts +59 -0
- package/dist/proto/gen/cosmos/distribution/v1beta1/distribution.d.ts +162 -0
- package/dist/proto/gen/cosmos/distribution/v1beta1/tx.d.ts +140 -0
- package/dist/proto/gen/cosmos/msg/v1/msg.d.ts +1 -0
- package/dist/proto/gen/cosmos/staking/v1beta1/staking.d.ts +310 -0
- package/dist/proto/gen/cosmos/staking/v1beta1/tx.d.ts +144 -0
- package/dist/proto/gen/cosmos_proto/cosmos.d.ts +80 -0
- package/dist/proto/gen/gogoproto/gogo.d.ts +1 -0
- package/dist/proto/gen/google/api/annotations.d.ts +1 -0
- package/dist/proto/gen/google/api/http.d.ts +379 -0
- package/dist/proto/gen/google/protobuf/any.d.ts +144 -0
- package/dist/proto/gen/google/protobuf/descriptor.d.ts +1285 -0
- package/dist/proto/gen/google/protobuf/duration.d.ts +99 -0
- package/dist/proto/gen/google/protobuf/timestamp.d.ts +128 -0
- package/dist/proto/gen/tendermint/abci/types.d.ts +507 -0
- package/dist/proto/gen/tendermint/crypto/keys.d.ts +27 -0
- package/dist/proto/gen/tendermint/crypto/proof.d.ts +57 -0
- package/dist/proto/gen/tendermint/types/params.d.ts +112 -0
- package/dist/proto/gen/tendermint/types/types.d.ts +197 -0
- package/dist/proto/gen/tendermint/types/validator.d.ts +54 -0
- package/dist/proto/gen/tendermint/version/types.d.ts +41 -0
- package/dist/proto/tx-encode.d.ts +78 -0
- package/dist/rest/agent.d.ts +12 -0
- package/dist/rest/authority.d.ts +12 -0
- package/dist/rest/clob.d.ts +11 -0
- package/dist/rest/context.d.ts +22 -0
- package/dist/rest/dex-fetcher.d.ts +10 -0
- package/dist/rest/dex-types.generated.d.ts +780 -0
- package/dist/rest/dex.d.ts +34 -0
- package/dist/rest/dex.generated.d.ts +1381 -0
- package/dist/rest/license.d.ts +79 -0
- package/dist/rest/market.d.ts +11 -0
- package/dist/rest/miner.d.ts +59 -0
- package/dist/rest/ratelimit.d.ts +7 -0
- package/dist/rest/reward.d.ts +25 -0
- package/dist/rest/staking.d.ts +38 -0
- package/dist/rest/tokenregistry.d.ts +11 -0
- package/dist/rest/types.d.ts +871 -0
- package/dist/utils/address.d.ts +6 -0
- package/dist/utils/chain-id.d.ts +1 -0
- package/dist/utils/cosmos-dec.d.ts +2 -0
- package/dist/ws/client.d.ts +37 -0
- package/dist/ws/index.d.ts +5 -0
- package/dist/ws/types.d.ts +66 -0
- package/package.json +103 -0
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
|
+
import { PageRequest, PageResponse } from "../../../cosmos/base/query/v1beta1/pagination";
|
|
3
|
+
import { FeeInfo } from "./fee";
|
|
4
|
+
export declare const protobufPackage = "ault.clob.v1";
|
|
5
|
+
export interface QueryOrderRequest {
|
|
6
|
+
orderId: Uint8Array;
|
|
7
|
+
}
|
|
8
|
+
export interface QueryOrderResponse {
|
|
9
|
+
order: OrderResponse | undefined;
|
|
10
|
+
}
|
|
11
|
+
export interface QueryOrdersRequest {
|
|
12
|
+
marketId: Uint8Array;
|
|
13
|
+
pagination: PageRequest | undefined;
|
|
14
|
+
}
|
|
15
|
+
export interface QueryOrdersResponse {
|
|
16
|
+
orders: OrderResponse[];
|
|
17
|
+
pagination: PageResponse | undefined;
|
|
18
|
+
}
|
|
19
|
+
export interface OrderResponse {
|
|
20
|
+
id: Uint8Array;
|
|
21
|
+
orderer: string;
|
|
22
|
+
marketId: Uint8Array;
|
|
23
|
+
isBuy: boolean;
|
|
24
|
+
price: string;
|
|
25
|
+
tick: bigint;
|
|
26
|
+
quantity: string;
|
|
27
|
+
openQuantity: string;
|
|
28
|
+
remainingDeposit: string;
|
|
29
|
+
deadline: Date | undefined;
|
|
30
|
+
postOnly: boolean;
|
|
31
|
+
feeInfo: FeeInfo | undefined;
|
|
32
|
+
}
|
|
33
|
+
export declare const QueryOrderRequest: MessageFns<QueryOrderRequest>;
|
|
34
|
+
export declare const QueryOrderResponse: MessageFns<QueryOrderResponse>;
|
|
35
|
+
export declare const QueryOrdersRequest: MessageFns<QueryOrdersRequest>;
|
|
36
|
+
export declare const QueryOrdersResponse: MessageFns<QueryOrdersResponse>;
|
|
37
|
+
export declare const OrderResponse: MessageFns<OrderResponse>;
|
|
38
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | bigint | undefined;
|
|
39
|
+
export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
|
|
40
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
41
|
+
} : Partial<T>;
|
|
42
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
43
|
+
export type Exact<P, I extends P> = P extends Builtin ? P : P & {
|
|
44
|
+
[K in keyof P]: Exact<P[K], I[K]>;
|
|
45
|
+
} & {
|
|
46
|
+
[K in Exclude<keyof I, KeysOfUnion<P>>]: never;
|
|
47
|
+
};
|
|
48
|
+
export interface MessageFns<T> {
|
|
49
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
50
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
51
|
+
fromJSON(object: any): T;
|
|
52
|
+
toJSON(message: T): unknown;
|
|
53
|
+
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
54
|
+
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
55
|
+
}
|
|
56
|
+
export {};
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
|
+
import { Coin } from "../../../cosmos/base/v1beta1/coin";
|
|
3
|
+
import { Duration } from "../../../google/protobuf/duration";
|
|
4
|
+
import { Params } from "./params";
|
|
5
|
+
export declare const protobufPackage = "ault.clob.v1";
|
|
6
|
+
export interface MsgPlaceLimitOrder {
|
|
7
|
+
sender: string;
|
|
8
|
+
marketId: Uint8Array;
|
|
9
|
+
isBuy: boolean;
|
|
10
|
+
price: string;
|
|
11
|
+
quantity: string;
|
|
12
|
+
lifespan: Duration | undefined;
|
|
13
|
+
postOnly: boolean;
|
|
14
|
+
/** builder_address identifies the builder for this order (optional). */
|
|
15
|
+
builderAddress: string;
|
|
16
|
+
/**
|
|
17
|
+
* builder_fee_rate is the fee rate for the builder (e.g., "0.01" = 1%,
|
|
18
|
+
* optional).
|
|
19
|
+
*/
|
|
20
|
+
builderFeeRate: string;
|
|
21
|
+
}
|
|
22
|
+
export interface MsgPlaceLimitOrderResponse {
|
|
23
|
+
orderId: Uint8Array;
|
|
24
|
+
escrowedAmount: Coin | undefined;
|
|
25
|
+
}
|
|
26
|
+
export interface MsgPlaceMarketOrder {
|
|
27
|
+
sender: string;
|
|
28
|
+
marketId: Uint8Array;
|
|
29
|
+
isBuy: boolean;
|
|
30
|
+
deposit: string;
|
|
31
|
+
worstPrice: string;
|
|
32
|
+
priceTolerance: string;
|
|
33
|
+
/** builder_address identifies the builder for this order (optional). */
|
|
34
|
+
builderAddress: string;
|
|
35
|
+
/**
|
|
36
|
+
* builder_fee_rate is the fee rate for the builder (e.g., "0.01" = 1%,
|
|
37
|
+
* optional).
|
|
38
|
+
*/
|
|
39
|
+
builderFeeRate: string;
|
|
40
|
+
}
|
|
41
|
+
export interface MsgPlaceMarketOrderResponse {
|
|
42
|
+
orderId: Uint8Array;
|
|
43
|
+
escrowedAmount: Coin | undefined;
|
|
44
|
+
}
|
|
45
|
+
export interface MsgCancelOrders {
|
|
46
|
+
sender: string;
|
|
47
|
+
orderIds: Uint8Array[];
|
|
48
|
+
}
|
|
49
|
+
export interface MsgCancelOrdersResponse {
|
|
50
|
+
succeeded: Uint8Array[];
|
|
51
|
+
failed: Uint8Array[];
|
|
52
|
+
}
|
|
53
|
+
export interface MsgPlaceScaleOrder {
|
|
54
|
+
sender: string;
|
|
55
|
+
marketId: Uint8Array;
|
|
56
|
+
isBuy: boolean;
|
|
57
|
+
lowPrice: string;
|
|
58
|
+
highPrice: string;
|
|
59
|
+
totalQuantity: string;
|
|
60
|
+
/** In basis points (bps); sum must equal 10000 */
|
|
61
|
+
weights: number[];
|
|
62
|
+
lifespan: Duration | undefined;
|
|
63
|
+
postOnly: boolean;
|
|
64
|
+
/** builder_address identifies the builder for this order (optional). */
|
|
65
|
+
builderAddress: string;
|
|
66
|
+
/**
|
|
67
|
+
* builder_fee_rate is the fee rate for the builder (e.g., "0.01" = 1%,
|
|
68
|
+
* optional).
|
|
69
|
+
*/
|
|
70
|
+
builderFeeRate: string;
|
|
71
|
+
}
|
|
72
|
+
export interface MsgPlaceScaleOrderResponse {
|
|
73
|
+
orders: ScaleOrderResult[];
|
|
74
|
+
escrowedAmount: Coin | undefined;
|
|
75
|
+
}
|
|
76
|
+
export interface ScaleOrderResult {
|
|
77
|
+
orderId: Uint8Array;
|
|
78
|
+
price: string;
|
|
79
|
+
quantity: string;
|
|
80
|
+
}
|
|
81
|
+
export interface MsgUpdateParams {
|
|
82
|
+
authority: string;
|
|
83
|
+
params: Params | undefined;
|
|
84
|
+
}
|
|
85
|
+
export interface MsgUpdateParamsResponse {
|
|
86
|
+
}
|
|
87
|
+
export declare const MsgPlaceLimitOrder: MessageFns<MsgPlaceLimitOrder>;
|
|
88
|
+
export declare const MsgPlaceLimitOrderResponse: MessageFns<MsgPlaceLimitOrderResponse>;
|
|
89
|
+
export declare const MsgPlaceMarketOrder: MessageFns<MsgPlaceMarketOrder>;
|
|
90
|
+
export declare const MsgPlaceMarketOrderResponse: MessageFns<MsgPlaceMarketOrderResponse>;
|
|
91
|
+
export declare const MsgCancelOrders: MessageFns<MsgCancelOrders>;
|
|
92
|
+
export declare const MsgCancelOrdersResponse: MessageFns<MsgCancelOrdersResponse>;
|
|
93
|
+
export declare const MsgPlaceScaleOrder: MessageFns<MsgPlaceScaleOrder>;
|
|
94
|
+
export declare const MsgPlaceScaleOrderResponse: MessageFns<MsgPlaceScaleOrderResponse>;
|
|
95
|
+
export declare const ScaleOrderResult: MessageFns<ScaleOrderResult>;
|
|
96
|
+
export declare const MsgUpdateParams: MessageFns<MsgUpdateParams>;
|
|
97
|
+
export declare const MsgUpdateParamsResponse: MessageFns<MsgUpdateParamsResponse>;
|
|
98
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | bigint | undefined;
|
|
99
|
+
export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
|
|
100
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
101
|
+
} : Partial<T>;
|
|
102
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
103
|
+
export type Exact<P, I extends P> = P extends Builtin ? P : P & {
|
|
104
|
+
[K in keyof P]: Exact<P[K], I[K]>;
|
|
105
|
+
} & {
|
|
106
|
+
[K in Exclude<keyof I, KeysOfUnion<P>>]: never;
|
|
107
|
+
};
|
|
108
|
+
export interface MessageFns<T> {
|
|
109
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
110
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
111
|
+
fromJSON(object: any): T;
|
|
112
|
+
toJSON(message: T): unknown;
|
|
113
|
+
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
114
|
+
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
115
|
+
}
|
|
116
|
+
export {};
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
|
+
import { LicenseStatus, Params, ProposalSnapshot, TransferRecord } from "./license";
|
|
3
|
+
export declare const protobufPackage = "ault.license.v1";
|
|
4
|
+
/** GenesisState defines the license module's genesis state */
|
|
5
|
+
export interface GenesisState {
|
|
6
|
+
/** params defines the module parameters */
|
|
7
|
+
params: Params | undefined;
|
|
8
|
+
/** next_id is the next license ID to be assigned */
|
|
9
|
+
nextId: bigint;
|
|
10
|
+
/** licenses is the list of all licenses */
|
|
11
|
+
licenses: GenesisLicense[];
|
|
12
|
+
/** minters is the list of authorized minter addresses */
|
|
13
|
+
minters: string[];
|
|
14
|
+
/** supply is the total supply of active licenses (excluding burned) */
|
|
15
|
+
supply: bigint;
|
|
16
|
+
/** owner_counts maps owner addresses to their license counts */
|
|
17
|
+
ownerCounts: OwnerCount[];
|
|
18
|
+
/** owner_indices maps owner addresses to their license indices */
|
|
19
|
+
ownerIndices: OwnerIndex[];
|
|
20
|
+
/** active_count is the count of active licenses (for efficient import/export) */
|
|
21
|
+
activeCount: bigint;
|
|
22
|
+
/**
|
|
23
|
+
* revoked_count is the count of revoked licenses (for efficient
|
|
24
|
+
* import/export)
|
|
25
|
+
*/
|
|
26
|
+
revokedCount: bigint;
|
|
27
|
+
/**
|
|
28
|
+
* genesis_time is the chain genesis time used for transfer lockup
|
|
29
|
+
* calculations
|
|
30
|
+
*/
|
|
31
|
+
genesisTime: Date | undefined;
|
|
32
|
+
/** kyc_approvers is the list of authorized KYC approver addresses */
|
|
33
|
+
kycApprovers: string[];
|
|
34
|
+
/** approved_members is the list of approved DAO member addresses */
|
|
35
|
+
approvedMembers: string[];
|
|
36
|
+
/**
|
|
37
|
+
* total_capped is the sum of min(active_licenses_i, cap) for all approved
|
|
38
|
+
* members
|
|
39
|
+
*/
|
|
40
|
+
totalCapped: bigint;
|
|
41
|
+
/** proposal_snapshots stores voting power state for active proposals */
|
|
42
|
+
proposalSnapshots: ProposalSnapshotEntry[];
|
|
43
|
+
/** vote_voting_powers stores cached voting power for votes */
|
|
44
|
+
voteVotingPowers: VoteVotingPowerEntry[];
|
|
45
|
+
/** transfer_records stores license transfer history for snapshot queries */
|
|
46
|
+
transferRecords: TransferRecord[];
|
|
47
|
+
/** owner_active_counts maps owner addresses to their active license counts */
|
|
48
|
+
ownerActiveCounts: OwnerActiveCount[];
|
|
49
|
+
}
|
|
50
|
+
/** OwnerCount represents the count of licenses for an owner */
|
|
51
|
+
export interface OwnerCount {
|
|
52
|
+
/** owner is the address */
|
|
53
|
+
owner: string;
|
|
54
|
+
/** count is the number of licenses owned */
|
|
55
|
+
count: number;
|
|
56
|
+
}
|
|
57
|
+
/** OwnerIndex represents the license indices for an owner */
|
|
58
|
+
export interface OwnerIndex {
|
|
59
|
+
/** owner is the address */
|
|
60
|
+
owner: string;
|
|
61
|
+
/** indices is the list of license IDs owned */
|
|
62
|
+
indices: bigint[];
|
|
63
|
+
}
|
|
64
|
+
/** OwnerActiveCount represents the active license count for an owner */
|
|
65
|
+
export interface OwnerActiveCount {
|
|
66
|
+
/** owner is the address */
|
|
67
|
+
owner: string;
|
|
68
|
+
/** count is the number of active licenses owned */
|
|
69
|
+
count: bigint;
|
|
70
|
+
}
|
|
71
|
+
/** ProposalSnapshotEntry represents a proposal snapshot for genesis export */
|
|
72
|
+
export interface ProposalSnapshotEntry {
|
|
73
|
+
/** proposal_id is the governance proposal ID */
|
|
74
|
+
proposalId: bigint;
|
|
75
|
+
/** snapshot is the voting power snapshot */
|
|
76
|
+
snapshot: ProposalSnapshot | undefined;
|
|
77
|
+
}
|
|
78
|
+
/** VoteVotingPowerEntry represents a vote's voting power for genesis export */
|
|
79
|
+
export interface VoteVotingPowerEntry {
|
|
80
|
+
/** proposal_id is the governance proposal ID */
|
|
81
|
+
proposalId: bigint;
|
|
82
|
+
/** voter is the voter address */
|
|
83
|
+
voter: string;
|
|
84
|
+
/** voting_power is the voter's capped voting power at snapshot time */
|
|
85
|
+
votingPower: bigint;
|
|
86
|
+
}
|
|
87
|
+
/** GenesisLicense defines a soul-bound token license */
|
|
88
|
+
export interface GenesisLicense {
|
|
89
|
+
/** start_id is the unique identifier of the first license */
|
|
90
|
+
startId: bigint;
|
|
91
|
+
/** end_id is the unique identifier of the end license */
|
|
92
|
+
endId: bigint;
|
|
93
|
+
/** owner is the address that owns this license */
|
|
94
|
+
owner: string;
|
|
95
|
+
/** status is the current status of the license */
|
|
96
|
+
status: LicenseStatus;
|
|
97
|
+
/** class_name is the class name of the license (for ERC-721 compatibility) */
|
|
98
|
+
className: string;
|
|
99
|
+
/** uri is the metadata URI for this license */
|
|
100
|
+
uri: string;
|
|
101
|
+
/** created_at is the timestamp when the license was created (minted). */
|
|
102
|
+
createdAt: Date | undefined;
|
|
103
|
+
/**
|
|
104
|
+
* revoked_at is the timestamp when the license was revoked.
|
|
105
|
+
* Used for snapshot-based governance voting power calculation.
|
|
106
|
+
* Nil means the license has never been revoked.
|
|
107
|
+
*/
|
|
108
|
+
revokedAt: Date | undefined;
|
|
109
|
+
/**
|
|
110
|
+
* burned_at is the timestamp when the license was burned.
|
|
111
|
+
* Nil means the license has not been burned.
|
|
112
|
+
*/
|
|
113
|
+
burnedAt: Date | undefined;
|
|
114
|
+
}
|
|
115
|
+
export declare const GenesisState: MessageFns<GenesisState>;
|
|
116
|
+
export declare const OwnerCount: MessageFns<OwnerCount>;
|
|
117
|
+
export declare const OwnerIndex: MessageFns<OwnerIndex>;
|
|
118
|
+
export declare const OwnerActiveCount: MessageFns<OwnerActiveCount>;
|
|
119
|
+
export declare const ProposalSnapshotEntry: MessageFns<ProposalSnapshotEntry>;
|
|
120
|
+
export declare const VoteVotingPowerEntry: MessageFns<VoteVotingPowerEntry>;
|
|
121
|
+
export declare const GenesisLicense: MessageFns<GenesisLicense>;
|
|
122
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | bigint | undefined;
|
|
123
|
+
export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
|
|
124
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
125
|
+
} : Partial<T>;
|
|
126
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
127
|
+
export type Exact<P, I extends P> = P extends Builtin ? P : P & {
|
|
128
|
+
[K in keyof P]: Exact<P[K], I[K]>;
|
|
129
|
+
} & {
|
|
130
|
+
[K in Exclude<keyof I, KeysOfUnion<P>>]: never;
|
|
131
|
+
};
|
|
132
|
+
export interface MessageFns<T> {
|
|
133
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
134
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
135
|
+
fromJSON(object: any): T;
|
|
136
|
+
toJSON(message: T): unknown;
|
|
137
|
+
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
138
|
+
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
139
|
+
}
|
|
140
|
+
export {};
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
|
+
export declare const protobufPackage = "ault.license.v1";
|
|
3
|
+
/** LicenseStatus defines the status of a license */
|
|
4
|
+
export declare enum LicenseStatus {
|
|
5
|
+
/** LICENSE_STATUS_UNSPECIFIED - LICENSE_STATUS_UNSPECIFIED is the default value */
|
|
6
|
+
LICENSE_STATUS_UNSPECIFIED = 0,
|
|
7
|
+
/** LICENSE_STATUS_ACTIVE - LICENSE_STATUS_ACTIVE indicates the license is active and can be used */
|
|
8
|
+
LICENSE_STATUS_ACTIVE = 1,
|
|
9
|
+
/** LICENSE_STATUS_REVOKED - LICENSE_STATUS_REVOKED indicates the license has been revoked */
|
|
10
|
+
LICENSE_STATUS_REVOKED = 2,
|
|
11
|
+
/** LICENSE_STATUS_BURNED - LICENSE_STATUS_BURNED indicates the license has been burned */
|
|
12
|
+
LICENSE_STATUS_BURNED = 3,
|
|
13
|
+
UNRECOGNIZED = -1
|
|
14
|
+
}
|
|
15
|
+
export declare function licenseStatusFromJSON(object: any): LicenseStatus;
|
|
16
|
+
export declare function licenseStatusToJSON(object: LicenseStatus): string;
|
|
17
|
+
/** License defines a soul-bound token license */
|
|
18
|
+
export interface License {
|
|
19
|
+
/** id is the unique identifier of the license */
|
|
20
|
+
id: bigint;
|
|
21
|
+
/** owner is the address that owns this license */
|
|
22
|
+
owner: string;
|
|
23
|
+
/** status is the current status of the license */
|
|
24
|
+
status: LicenseStatus;
|
|
25
|
+
/** class_name is the class name of the license (for ERC-721 compatibility) */
|
|
26
|
+
className: string;
|
|
27
|
+
/** uri is the metadata URI for this license */
|
|
28
|
+
uri: string;
|
|
29
|
+
/** created_at is the timestamp when the license was created (minted). */
|
|
30
|
+
createdAt: Date | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* revoked_at is the timestamp when the license was revoked.
|
|
33
|
+
* Used for snapshot-based governance voting power calculation.
|
|
34
|
+
* Nil means the license has never been revoked.
|
|
35
|
+
*/
|
|
36
|
+
revokedAt: Date | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* burned_at is the timestamp when the license was burned.
|
|
39
|
+
* Nil means the license has not been burned.
|
|
40
|
+
*/
|
|
41
|
+
burnedAt: Date | undefined;
|
|
42
|
+
}
|
|
43
|
+
/** Params defines the parameters for the license module */
|
|
44
|
+
export interface Params {
|
|
45
|
+
/** class_name is the name of the license class (ERC-721 name) */
|
|
46
|
+
className: string;
|
|
47
|
+
/** class_symbol is the symbol of the license class (ERC-721 symbol) */
|
|
48
|
+
classSymbol: string;
|
|
49
|
+
/** base_token_uri is the base URI prepended to token URIs */
|
|
50
|
+
baseTokenUri: string;
|
|
51
|
+
/** minting_paused indicates whether minting is currently paused */
|
|
52
|
+
mintingPaused: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* supply_cap is the maximum number of licenses that can be minted (0 =
|
|
55
|
+
* unlimited)
|
|
56
|
+
*/
|
|
57
|
+
supplyCap: bigint;
|
|
58
|
+
/** allow_metadata_update indicates whether token URIs can be updated */
|
|
59
|
+
allowMetadataUpdate: boolean;
|
|
60
|
+
/** admin_can_revoke indicates whether admins can revoke licenses */
|
|
61
|
+
adminCanRevoke: boolean;
|
|
62
|
+
/** admin_can_burn indicates whether admins can burn licenses */
|
|
63
|
+
adminCanBurn: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* max_batch_size is the maximum number of items in a single batch operation
|
|
66
|
+
* (license minting, member approval/revocation, etc.) Default is 1000.
|
|
67
|
+
*/
|
|
68
|
+
maxBatchSize: number;
|
|
69
|
+
/**
|
|
70
|
+
* transfer_unlock_days is the number of days from genesis time
|
|
71
|
+
* when all licenses become transferable globally
|
|
72
|
+
*/
|
|
73
|
+
transferUnlockDays: number;
|
|
74
|
+
/**
|
|
75
|
+
* enable_transfers allows governance to globally enable/disable transfers
|
|
76
|
+
* This is a kill switch in case of emergency
|
|
77
|
+
*/
|
|
78
|
+
enableTransfers: boolean;
|
|
79
|
+
/**
|
|
80
|
+
* Deprecated: minter_allowed_msgs is ignored by the ante handler.
|
|
81
|
+
* Retained for backward compatibility and historical queries.
|
|
82
|
+
*
|
|
83
|
+
* @deprecated
|
|
84
|
+
*/
|
|
85
|
+
minterAllowedMsgs: string[];
|
|
86
|
+
/**
|
|
87
|
+
* Deprecated: kyc_approver_allowed_msgs is ignored by the ante handler.
|
|
88
|
+
* Retained for backward compatibility and historical queries.
|
|
89
|
+
*
|
|
90
|
+
* @deprecated
|
|
91
|
+
*/
|
|
92
|
+
kycApproverAllowedMsgs: string[];
|
|
93
|
+
/**
|
|
94
|
+
* Deprecated: free_max_gas_limit is ignored by the ante handler.
|
|
95
|
+
* Retained for backward compatibility and historical queries.
|
|
96
|
+
*
|
|
97
|
+
* @deprecated
|
|
98
|
+
*/
|
|
99
|
+
freeMaxGasLimit: bigint;
|
|
100
|
+
/**
|
|
101
|
+
* max_voting_power_per_address is the maximum voting power per address in
|
|
102
|
+
* governance. 0 means no cap. Used to prevent concentration of voting power.
|
|
103
|
+
*/
|
|
104
|
+
maxVotingPowerPerAddress: bigint;
|
|
105
|
+
}
|
|
106
|
+
/** TransferRecord records a license transfer for snapshot-based governance */
|
|
107
|
+
export interface TransferRecord {
|
|
108
|
+
/** license_id is the ID of the transferred license */
|
|
109
|
+
licenseId: bigint;
|
|
110
|
+
/** timestamp is when the transfer occurred */
|
|
111
|
+
timestamp: Date | undefined;
|
|
112
|
+
/** from_owner is the previous owner */
|
|
113
|
+
fromOwner: string;
|
|
114
|
+
/** to_owner is the new owner */
|
|
115
|
+
toOwner: string;
|
|
116
|
+
}
|
|
117
|
+
/** ProposalSnapshot stores voting power state captured at proposal creation */
|
|
118
|
+
export interface ProposalSnapshot {
|
|
119
|
+
/** timestamp is when the snapshot was taken (proposal submission time) */
|
|
120
|
+
timestamp: Date | undefined;
|
|
121
|
+
/**
|
|
122
|
+
* total_capped is the sum of min(active_licenses_i, cap) for all approved
|
|
123
|
+
* members at snapshot time
|
|
124
|
+
*/
|
|
125
|
+
totalCapped: bigint;
|
|
126
|
+
/** cap is the MaxVotingPowerPerAddress parameter value at snapshot time */
|
|
127
|
+
cap: bigint;
|
|
128
|
+
}
|
|
129
|
+
export declare const License: MessageFns<License>;
|
|
130
|
+
export declare const Params: MessageFns<Params>;
|
|
131
|
+
export declare const TransferRecord: MessageFns<TransferRecord>;
|
|
132
|
+
export declare const ProposalSnapshot: MessageFns<ProposalSnapshot>;
|
|
133
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | bigint | undefined;
|
|
134
|
+
export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
|
|
135
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
136
|
+
} : Partial<T>;
|
|
137
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
138
|
+
export type Exact<P, I extends P> = P extends Builtin ? P : P & {
|
|
139
|
+
[K in keyof P]: Exact<P[K], I[K]>;
|
|
140
|
+
} & {
|
|
141
|
+
[K in Exclude<keyof I, KeysOfUnion<P>>]: never;
|
|
142
|
+
};
|
|
143
|
+
export interface MessageFns<T> {
|
|
144
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
145
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
146
|
+
fromJSON(object: any): T;
|
|
147
|
+
toJSON(message: T): unknown;
|
|
148
|
+
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
149
|
+
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
150
|
+
}
|
|
151
|
+
export {};
|