@helium/blockchain-api 0.11.18 → 0.13.0
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/{chunk-U3ZF47XT.js → chunk-2XDXO5AZ.js} +1 -1
- package/dist/{chunk-S46U7PBT.js → chunk-DB664YCA.js} +1 -1
- package/dist/{chunk-PPNXNULU.js → chunk-DE4MGYVZ.js} +1 -1
- package/dist/{chunk-QFW75K6Y.js → chunk-G4JOXPKN.js} +24 -6
- package/dist/{chunk-EIDQ3E2M.js → chunk-GI4C45MR.js} +2 -2
- package/dist/{chunk-PIN7ISM4.js → chunk-JEN5LTKF.js} +288 -35
- package/dist/{chunk-RT2UWP4I.js → chunk-LMKKZIF6.js} +2 -2
- package/dist/{chunk-EXCHVVEL.js → chunk-NFPQE2X2.js} +2 -2
- package/dist/{chunk-5G5SYHQP.js → chunk-O5LI7ILX.js} +7 -1
- package/dist/{chunk-IFZEDIKX.js → chunk-PNPUIF7P.js} +16 -4
- package/dist/{chunk-4UAUX7EJ.js → chunk-VCQCOERJ.js} +71 -7
- package/dist/{chunk-6EPXJJY5.js → chunk-VK2MYCMM.js} +9 -2
- package/dist/{chunk-NUTFHSNG.js → chunk-Y5PUR7UV.js} +18 -4
- package/dist/contracts.d.ts +3384 -1196
- package/dist/contracts.js +13 -13
- package/dist/errors.d.ts +20 -1
- package/dist/errors.js +4 -2
- package/dist/index.d.ts +6 -6
- package/dist/index.js +14 -14
- package/dist/schemas/common.d.ts +11 -1
- package/dist/schemas/common.js +1 -1
- package/dist/schemas/data-credits.d.ts +10 -2
- package/dist/schemas/data-credits.js +2 -2
- package/dist/schemas/fiat.js +3 -3
- package/dist/schemas/governance.d.ts +21 -1
- package/dist/schemas/governance.js +2 -2
- package/dist/schemas/hotspots.d.ts +253 -4
- package/dist/schemas/hotspots.js +2 -2
- package/dist/schemas/migration.js +3 -3
- package/dist/schemas/reward-contract.js +2 -2
- package/dist/schemas/swap.js +2 -2
- package/dist/schemas/tokens.d.ts +60 -1
- package/dist/schemas/tokens.js +2 -2
- package/dist/schemas/transactions.js +2 -2
- package/dist/schemas/welcome-packs.js +3 -3
- package/dist/schemas.d.ts +5 -5
- package/dist/schemas.js +11 -11
- package/package.json +1 -1
- /package/dist/{chunk-KTADG6LO.js → chunk-DQYAIQQ5.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TokenAmountInputSchema, TokenAmountOutputSchema, WalletAddressSchema, TransactionDataSchema } from './chunk-
|
|
1
|
+
import { TokenAmountInputSchema, TokenAmountOutputSchema, WalletAddressSchema, TransactionDataSchema } from './chunk-O5LI7ILX.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
4
|
var CRON_REGEX = /^(\*|[0-9,\-\/]+)\s+(\*|[0-9,\-\/]+)\s+(\*|[0-9,\-\/]+)\s+(\*|[0-9,\-\/]+)\s+(\*|[0-9,\-\/]+)$/;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TransactionItemSchema, TransactionMetadataSchema, TokenAmountOutputSchema } from './chunk-
|
|
1
|
+
import { TransactionItemSchema, TransactionMetadataSchema, TokenAmountOutputSchema } from './chunk-O5LI7ILX.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
4
|
var SubmitInputSchema = z.object({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PublicKeySchema, TokenAmountInputSchema, WalletAddressSchema, createTypedTransactionResponse, createTransactionResponse, createPaginatedTransactionResponse, createTypedPaginatedTransactionResponse } from './chunk-
|
|
1
|
+
import { PublicKeySchema, TokenAmountInputSchema, WalletAddressSchema, createTypedTransactionResponse, createTransactionResponse, createPaginatedTransactionResponse, createTypedPaginatedTransactionResponse } from './chunk-O5LI7ILX.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
4
|
var LockupKindSchema = z.enum(["cliff", "constant"]);
|
|
@@ -58,13 +58,13 @@ var SplitPositionInputSchema = z.object({
|
|
|
58
58
|
});
|
|
59
59
|
var TransferPositionInputSchema = z.object({
|
|
60
60
|
walletAddress: WalletAddressSchema.describe(
|
|
61
|
-
"Wallet address that owns
|
|
61
|
+
"Wallet address that owns the source position and pays transaction fees"
|
|
62
62
|
),
|
|
63
63
|
positionMint: PublicKeySchema.describe(
|
|
64
64
|
"Mint address of the source position NFT"
|
|
65
65
|
),
|
|
66
66
|
targetPositionMint: PublicKeySchema.describe(
|
|
67
|
-
"Mint address of the target position NFT"
|
|
67
|
+
"Mint address of the target position NFT. May be owned by a different wallet; its lockup must be equal-or-longer and equal-or-stricter than the source's."
|
|
68
68
|
),
|
|
69
69
|
amount: z.string().regex(/^\d+$/, "Amount must be a whole number in smallest unit (bones)").describe("Raw token amount to transfer (in smallest unit)")
|
|
70
70
|
});
|
|
@@ -107,7 +107,9 @@ var VoteInputSchema = z.object({
|
|
|
107
107
|
walletAddress: WalletAddressSchema.describe(
|
|
108
108
|
"Wallet address that owns the positions"
|
|
109
109
|
),
|
|
110
|
-
proposalKey: PublicKeySchema.describe(
|
|
110
|
+
proposalKey: PublicKeySchema.describe(
|
|
111
|
+
"Public key of the proposal to vote on"
|
|
112
|
+
),
|
|
111
113
|
positionMints: z.array(PublicKeySchema).min(1).describe("Array of position NFT mint addresses to vote with"),
|
|
112
114
|
choice: z.number().int().min(0).describe("The choice index to vote for")
|
|
113
115
|
});
|
|
@@ -147,6 +149,18 @@ var UnassignProxiesInputSchema = z.object({
|
|
|
147
149
|
proxyKey: PublicKeySchema.describe("Public key of the proxy to unassign"),
|
|
148
150
|
positionMints: z.array(PublicKeySchema).min(1).describe("Array of position NFT mint addresses to unassign proxy for")
|
|
149
151
|
});
|
|
152
|
+
var SkipReasonSchema = z.enum([
|
|
153
|
+
"maxChoicesReached",
|
|
154
|
+
"alreadyVotedThisChoice"
|
|
155
|
+
]);
|
|
156
|
+
var SkippedPositionSchema = z.object({
|
|
157
|
+
positionMint: PublicKeySchema.describe(
|
|
158
|
+
"Mint of the position that was not included in the vote transactions"
|
|
159
|
+
),
|
|
160
|
+
reason: SkipReasonSchema.describe(
|
|
161
|
+
"Why the position was excluded from the vote transactions"
|
|
162
|
+
)
|
|
163
|
+
});
|
|
150
164
|
var CreatePositionMetadataSchema = z.object({
|
|
151
165
|
type: z.string(),
|
|
152
166
|
description: z.string(),
|
|
@@ -178,10 +192,14 @@ var ExtendDelegationResponseSchema = createTransactionResponse();
|
|
|
178
192
|
var DelegatePositionsResponseSchema = createPaginatedTransactionResponse();
|
|
179
193
|
var ClaimDelegationRewardsResponseSchema = createPaginatedTransactionResponse();
|
|
180
194
|
var UndelegatePositionResponseSchema = createPaginatedTransactionResponse();
|
|
181
|
-
var VoteResponseSchema = createPaginatedTransactionResponse()
|
|
195
|
+
var VoteResponseSchema = createPaginatedTransactionResponse().extend({
|
|
196
|
+
skipped: z.array(SkippedPositionSchema).default([]).describe(
|
|
197
|
+
"Positions not included in the vote transactions, each with the reason it was skipped. Empty when every position is eligible."
|
|
198
|
+
)
|
|
199
|
+
});
|
|
182
200
|
var RelinquishVoteResponseSchema = createPaginatedTransactionResponse();
|
|
183
201
|
var RelinquishPositionVotesResponseSchema = createTypedPaginatedTransactionResponse(RelinquishAllVotesMetadataSchema);
|
|
184
202
|
var AssignProxiesResponseSchema = createPaginatedTransactionResponse();
|
|
185
203
|
var UnassignProxiesResponseSchema = createPaginatedTransactionResponse();
|
|
186
204
|
|
|
187
|
-
export { AssignProxiesInputSchema, AssignProxiesResponseSchema, ClaimDelegationRewardsInputSchema, ClaimDelegationRewardsResponseSchema, ClosePositionInputSchema, ClosePositionResponseSchema, CreatePositionInputSchema, CreatePositionResponseSchema, DelegatePositionInputSchema, DelegatePositionsResponseSchema, ExtendDelegationInputSchema, ExtendDelegationResponseSchema, ExtendPositionInputSchema, ExtendPositionResponseSchema, FlipLockupKindInputSchema, FlipLockupKindResponseSchema, LockupKindSchema, RelinquishPositionVotesInputSchema, RelinquishPositionVotesResponseSchema, RelinquishVoteInputSchema, RelinquishVoteResponseSchema, ResetLockupInputSchema, ResetLockupResponseSchema, SplitPositionInputSchema, SplitPositionResponseSchema, TransferPositionInputSchema, TransferPositionOwnershipInputSchema, TransferPositionOwnershipResponseSchema, TransferPositionResponseSchema, UnassignProxiesInputSchema, UnassignProxiesResponseSchema, UndelegateInputSchema, UndelegatePositionResponseSchema, VoteInputSchema, VoteResponseSchema };
|
|
205
|
+
export { AssignProxiesInputSchema, AssignProxiesResponseSchema, ClaimDelegationRewardsInputSchema, ClaimDelegationRewardsResponseSchema, ClosePositionInputSchema, ClosePositionResponseSchema, CreatePositionInputSchema, CreatePositionResponseSchema, DelegatePositionInputSchema, DelegatePositionsResponseSchema, ExtendDelegationInputSchema, ExtendDelegationResponseSchema, ExtendPositionInputSchema, ExtendPositionResponseSchema, FlipLockupKindInputSchema, FlipLockupKindResponseSchema, LockupKindSchema, RelinquishPositionVotesInputSchema, RelinquishPositionVotesResponseSchema, RelinquishVoteInputSchema, RelinquishVoteResponseSchema, ResetLockupInputSchema, ResetLockupResponseSchema, SkipReasonSchema, SkippedPositionSchema, SplitPositionInputSchema, SplitPositionResponseSchema, TransferPositionInputSchema, TransferPositionOwnershipInputSchema, TransferPositionOwnershipResponseSchema, TransferPositionResponseSchema, UnassignProxiesInputSchema, UnassignProxiesResponseSchema, UndelegateInputSchema, UndelegatePositionResponseSchema, VoteInputSchema, VoteResponseSchema };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { QuoteResponseSchema } from './chunk-
|
|
2
|
-
import { createTransactionResponse } from './chunk-
|
|
1
|
+
import { QuoteResponseSchema } from './chunk-DB664YCA.js';
|
|
2
|
+
import { createTransactionResponse } from './chunk-O5LI7ILX.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
|
|
5
5
|
var InitKycInputSchema = z.object({
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { INSUFFICIENT_FUNDS, INVALID_WALLET_ADDRESS, BAD_REQUEST,
|
|
1
|
+
import { INSUFFICIENT_FUNDS, INVALID_WALLET_ADDRESS, BAD_REQUEST, NOT_FOUND, UNAUTHORIZED, CONFLICT, ALL_POSITIONS_SKIPPED, RATE_LIMITED, SIMULATION_FAILED, UNAUTHENTICATED } from './chunk-VK2MYCMM.js';
|
|
2
2
|
import { BridgeWebhookInputSchema, BridgeWebhookOutputSchema } from './chunk-7CTJX35S.js';
|
|
3
|
-
import { MigrateInputSchema, MigrateOutputSchema, MigratableHotspotsInputSchema, MigratableHotspotsOutputSchema } from './chunk-
|
|
4
|
-
import { ClaimInviteRequestSchema, ClaimInviteResponseSchema, CreateInviteResponseSchema, DeleteRewardContractTransactionResponseSchema, CreateRewardContractTransactionInputSchema, CreateRewardContractTransactionResponseSchema, EstimateCostToCreateRewardContractResponseSchema, FindRewardContractResponseSchema } from './chunk-
|
|
5
|
-
import { CreateHntAccountInputSchema, CreateHntAccountOutputSchema, MultiTransferInputSchema, MultiTransferOutputSchema, TransferInputSchema, TransferOutputSchema, GetBalancesInputSchema, TokenBalanceDataSchema } from './chunk-
|
|
6
|
-
import { GetHistoryInputSchema, HistoryOutputSchema, EstimateInputSchema, EstimateOutputSchema, GetByPayerAndTagInputSchema, PayerBatchesOutputSchema, GetByPayerInputSchema, ResubmitInputSchema, ResubmitOutputSchema, GetInputSchema, BatchStatusOutputSchema, SubmitInputSchema, SubmitOutputSchema } from './chunk-
|
|
7
|
-
import { DelegateDataCreditsInputSchema, MintDataCreditsInputSchema } from './chunk-
|
|
8
|
-
import { WelcomePackInviteInputSchema, WelcomePackInviteOutputSchema, WelcomePackClaimInputSchema, WelcomePackClaimOutputSchema, WelcomePackGetByAddressInputSchema, WelcomePackSchema, WelcomePackDeleteInputSchema, WelcomePackDeleteOutputSchema, WelcomePackGetInputSchema, WelcomePackCreateInputSchema, WelcomePackCreateOutputSchema, WelcomePackListInputSchema, WelcomePackListOutputSchema } from './chunk-
|
|
9
|
-
import { UpdateTransferInputSchema, UpdateTransferOutputSchema, SendFundsInputSchema, SendFundsOutputSchema, GetSendQuoteInputSchema, QuoteOutputSchema, DeleteBankAccountInputSchema, DeleteBankAccountOutputSchema, CreateBankAccountInputSchema, BankAccountSchema, BankAccountListOutputSchema, FeesOutputSchema, InitKycInputSchema, KycStatusOutputSchema } from './chunk-
|
|
10
|
-
import { GetInstructionsInputSchema, GetQuoteInputSchema, QuoteResponseSchema, GetTokensInputSchema, TokenListOutputSchema } from './chunk-
|
|
11
|
-
import { UnassignProxiesInputSchema, UnassignProxiesResponseSchema, AssignProxiesInputSchema, AssignProxiesResponseSchema, RelinquishPositionVotesInputSchema, RelinquishPositionVotesResponseSchema, RelinquishVoteInputSchema, RelinquishVoteResponseSchema, VoteInputSchema, VoteResponseSchema, ExtendDelegationInputSchema, ExtendDelegationResponseSchema, UndelegateInputSchema, UndelegatePositionResponseSchema, ClaimDelegationRewardsInputSchema, ClaimDelegationRewardsResponseSchema, DelegatePositionInputSchema, DelegatePositionsResponseSchema, TransferPositionOwnershipInputSchema, TransferPositionOwnershipResponseSchema, TransferPositionInputSchema, TransferPositionResponseSchema, SplitPositionInputSchema, SplitPositionResponseSchema, ResetLockupInputSchema, ResetLockupResponseSchema, FlipLockupKindInputSchema, FlipLockupKindResponseSchema, ExtendPositionInputSchema, ExtendPositionResponseSchema, ClosePositionInputSchema, ClosePositionResponseSchema, CreatePositionInputSchema, CreatePositionResponseSchema } from './chunk-
|
|
3
|
+
import { MigrateInputSchema, MigrateOutputSchema, MigratableHotspotsInputSchema, MigratableHotspotsOutputSchema } from './chunk-NFPQE2X2.js';
|
|
4
|
+
import { ClaimInviteRequestSchema, ClaimInviteResponseSchema, CreateInviteResponseSchema, DeleteRewardContractTransactionResponseSchema, CreateRewardContractTransactionInputSchema, CreateRewardContractTransactionResponseSchema, EstimateCostToCreateRewardContractResponseSchema, FindRewardContractResponseSchema } from './chunk-2XDXO5AZ.js';
|
|
5
|
+
import { CreateHntAccountInputSchema, CreateHntAccountOutputSchema, MemoInputSchema, MemoOutputSchema, BurnInputSchema, BurnOutputSchema, MultiTransferInputSchema, MultiTransferOutputSchema, TransferInputSchema, TransferOutputSchema, GetBalancesInputSchema, TokenBalanceDataSchema } from './chunk-Y5PUR7UV.js';
|
|
6
|
+
import { GetHistoryInputSchema, HistoryOutputSchema, EstimateInputSchema, EstimateOutputSchema, GetByPayerAndTagInputSchema, PayerBatchesOutputSchema, GetByPayerInputSchema, ResubmitInputSchema, ResubmitOutputSchema, GetInputSchema, BatchStatusOutputSchema, SubmitInputSchema, SubmitOutputSchema } from './chunk-DE4MGYVZ.js';
|
|
7
|
+
import { BurnDataCreditsInputSchema, DelegateDataCreditsInputSchema, MintDataCreditsInputSchema } from './chunk-PNPUIF7P.js';
|
|
8
|
+
import { WelcomePackInviteInputSchema, WelcomePackInviteOutputSchema, WelcomePackClaimInputSchema, WelcomePackClaimOutputSchema, WelcomePackGetByAddressInputSchema, WelcomePackSchema, WelcomePackDeleteInputSchema, WelcomePackDeleteOutputSchema, WelcomePackGetInputSchema, WelcomePackCreateInputSchema, WelcomePackCreateOutputSchema, WelcomePackListInputSchema, WelcomePackListOutputSchema } from './chunk-LMKKZIF6.js';
|
|
9
|
+
import { UpdateTransferInputSchema, UpdateTransferOutputSchema, SendFundsInputSchema, SendFundsOutputSchema, GetSendQuoteInputSchema, QuoteOutputSchema, DeleteBankAccountInputSchema, DeleteBankAccountOutputSchema, CreateBankAccountInputSchema, BankAccountSchema, BankAccountListOutputSchema, FeesOutputSchema, InitKycInputSchema, KycStatusOutputSchema } from './chunk-GI4C45MR.js';
|
|
10
|
+
import { GetInstructionsInputSchema, GetQuoteInputSchema, QuoteResponseSchema, GetTokensInputSchema, TokenListOutputSchema } from './chunk-DB664YCA.js';
|
|
11
|
+
import { UnassignProxiesInputSchema, UnassignProxiesResponseSchema, AssignProxiesInputSchema, AssignProxiesResponseSchema, RelinquishPositionVotesInputSchema, RelinquishPositionVotesResponseSchema, RelinquishVoteInputSchema, RelinquishVoteResponseSchema, VoteInputSchema, VoteResponseSchema, ExtendDelegationInputSchema, ExtendDelegationResponseSchema, UndelegateInputSchema, UndelegatePositionResponseSchema, ClaimDelegationRewardsInputSchema, ClaimDelegationRewardsResponseSchema, DelegatePositionInputSchema, DelegatePositionsResponseSchema, TransferPositionOwnershipInputSchema, TransferPositionOwnershipResponseSchema, TransferPositionInputSchema, TransferPositionResponseSchema, SplitPositionInputSchema, SplitPositionResponseSchema, ResetLockupInputSchema, ResetLockupResponseSchema, FlipLockupKindInputSchema, FlipLockupKindResponseSchema, ExtendPositionInputSchema, ExtendPositionResponseSchema, ClosePositionInputSchema, ClosePositionResponseSchema, CreatePositionInputSchema, CreatePositionResponseSchema } from './chunk-G4JOXPKN.js';
|
|
12
12
|
import { HealthResponseSchema } from './chunk-4RVSLJOU.js';
|
|
13
|
-
import { UpdateHotspotInfoInputSchema, UpdateHotspotInfoOutputSchema, GetFundingEstimateInputSchema, FundingEstimateOutputSchema, FundAutomationInputSchema, FundAutomationOutputSchema, SetupAutomationInputSchema, SetupAutomationOutputSchema, GetAutomationStatusInputSchema, AutomationStatusOutputSchema, CloseAutomationInputSchema, CloseAutomationOutputSchema, DeleteSplitInputSchema, DeleteSplitOutputSchema, CreateSplitInputSchema, CreateSplitOutputSchema, GetSplitInputSchema, SplitResponseSchema, UpdateRewardsDestinationInputSchema, UpdateRewardsDestinationOutputSchema, TransferHotspotInputSchema, TransferHotspotOutputSchema, GetPendingRewardsInputSchema, GetPendingRewardsOutputSchema, ClaimRewardsInputSchema, ClaimRewardsOutputSchema, GetHotspotsInputSchema, HotspotsDataSchema } from './chunk-
|
|
14
|
-
import { WalletAddressSchema, HeliumPublicKeySchema, TransactionDataSchema } from './chunk-
|
|
13
|
+
import { UpdateHotspotInfoInputSchema, UpdateHotspotInfoOutputSchema, TopUpAutomationInputSchema, TopUpAutomationOutputSchema, OnboardDataOnlyHotspotInputSchema, OnboardDataOnlyHotspotOutputSchema, IssueDataOnlyHotspotInputSchema, IssueDataOnlyHotspotOutputSchema, RemoveEntityFromAutomationInputSchema, RemoveEntityFromAutomationOutputSchema, AddEntityToAutomationInputSchema, AddEntityToAutomationOutputSchema, AddWalletToAutomationInputSchema, AddWalletToAutomationOutputSchema, RequeueAutomationInputSchema, RequeueAutomationOutputSchema, GetFundingEstimateInputSchema, FundingEstimateOutputSchema, FundAutomationInputSchema, FundAutomationOutputSchema, SetupAutomationInputSchema, SetupAutomationOutputSchema, GetAutomationStatusInputSchema, AutomationStatusOutputSchema, CloseAutomationInputSchema, CloseAutomationOutputSchema, DeleteSplitInputSchema, DeleteSplitOutputSchema, CreateSplitInputSchema, CreateSplitOutputSchema, GetSplitInputSchema, SplitResponseSchema, UpdateRewardsDestinationInputSchema, UpdateRewardsDestinationOutputSchema, TransferHotspotInputSchema, TransferHotspotOutputSchema, GetPendingRewardsInputSchema, GetPendingRewardsOutputSchema, HotspotBurnInputSchema, HotspotBurnOutputSchema, ClaimHotspotRewardsInputSchema, ClaimHotspotRewardsOutputSchema, ClaimRewardsInputSchema, ClaimRewardsOutputSchema, GetHotspotsInputSchema, HotspotsDataSchema } from './chunk-VCQCOERJ.js';
|
|
14
|
+
import { WalletAddressSchema, HeliumPublicKeySchema, TransactionDataSchema, PublicKeySchema } from './chunk-O5LI7ILX.js';
|
|
15
15
|
import { oc } from '@orpc/contract';
|
|
16
16
|
import { z } from 'zod';
|
|
17
17
|
|
|
@@ -25,13 +25,22 @@ var healthContract = oc.tag("Health").router({
|
|
|
25
25
|
});
|
|
26
26
|
var tokensContract = oc.tag("Tokens").router({
|
|
27
27
|
/** Public: Get token balances for a wallet */
|
|
28
|
-
getBalances: oc.route({
|
|
28
|
+
getBalances: oc.route({
|
|
29
|
+
method: "GET",
|
|
30
|
+
path: "/tokens/{walletAddress}",
|
|
31
|
+
summary: "Get token balances for a wallet"
|
|
32
|
+
}).input(GetBalancesInputSchema).output(TokenBalanceDataSchema).errors({
|
|
29
33
|
INVALID_WALLET_ADDRESS
|
|
30
34
|
}),
|
|
31
35
|
/** Protected: Transfer tokens */
|
|
32
|
-
transfer: oc.route({
|
|
36
|
+
transfer: oc.route({
|
|
37
|
+
method: "POST",
|
|
38
|
+
path: "/tokens/transfer",
|
|
39
|
+
summary: "Transfer tokens"
|
|
40
|
+
}).input(TransferInputSchema).output(TransferOutputSchema).errors({
|
|
33
41
|
BAD_REQUEST,
|
|
34
|
-
INSUFFICIENT_FUNDS
|
|
42
|
+
INSUFFICIENT_FUNDS,
|
|
43
|
+
NOT_FOUND
|
|
35
44
|
}),
|
|
36
45
|
/** Protected: Transfer the same token mint to multiple recipients, packed into as few txs as possible */
|
|
37
46
|
multiTransfer: oc.route({
|
|
@@ -42,28 +51,80 @@ var tokensContract = oc.tag("Tokens").router({
|
|
|
42
51
|
BAD_REQUEST,
|
|
43
52
|
INSUFFICIENT_FUNDS
|
|
44
53
|
}),
|
|
54
|
+
/** Protected: Burn tokens */
|
|
55
|
+
burn: oc.route({ method: "POST", path: "/tokens/burn", summary: "Burn tokens" }).input(BurnInputSchema).output(BurnOutputSchema).errors({
|
|
56
|
+
BAD_REQUEST,
|
|
57
|
+
INSUFFICIENT_FUNDS,
|
|
58
|
+
NOT_FOUND
|
|
59
|
+
}),
|
|
60
|
+
/** Protected: Emit a memo transaction */
|
|
61
|
+
memo: oc.route({
|
|
62
|
+
method: "POST",
|
|
63
|
+
path: "/tokens/memo",
|
|
64
|
+
summary: "Emit a memo transaction"
|
|
65
|
+
}).input(MemoInputSchema).output(MemoOutputSchema).errors({
|
|
66
|
+
BAD_REQUEST,
|
|
67
|
+
INSUFFICIENT_FUNDS
|
|
68
|
+
}),
|
|
45
69
|
/** Protected: Create HNT account */
|
|
46
|
-
createHntAccount: oc.route({
|
|
70
|
+
createHntAccount: oc.route({
|
|
71
|
+
method: "POST",
|
|
72
|
+
path: "/tokens/hnt-account",
|
|
73
|
+
summary: "Create HNT account"
|
|
74
|
+
}).input(CreateHntAccountInputSchema).output(CreateHntAccountOutputSchema).errors({
|
|
47
75
|
INVALID_WALLET_ADDRESS,
|
|
48
76
|
INSUFFICIENT_FUNDS
|
|
49
77
|
})
|
|
50
78
|
});
|
|
51
79
|
var hotspotsContract = oc.tag("Hotspot").prefix("/hotspots").router({
|
|
52
80
|
/** Public: Get hotspots for a wallet */
|
|
53
|
-
getHotspots: oc.route({
|
|
81
|
+
getHotspots: oc.route({
|
|
82
|
+
method: "GET",
|
|
83
|
+
path: "/wallet/{walletAddress}",
|
|
84
|
+
summary: "Get hotspots for a wallet"
|
|
85
|
+
}).input(GetHotspotsInputSchema).output(HotspotsDataSchema).errors({
|
|
54
86
|
INVALID_WALLET_ADDRESS
|
|
55
87
|
}),
|
|
56
88
|
/** Protected: Claim rewards for hotspots */
|
|
57
|
-
claimRewards: oc.route({
|
|
89
|
+
claimRewards: oc.route({
|
|
90
|
+
method: "POST",
|
|
91
|
+
path: "/claim-rewards",
|
|
92
|
+
summary: "Claim all hotspot rewards"
|
|
93
|
+
}).input(ClaimRewardsInputSchema).output(ClaimRewardsOutputSchema).errors({
|
|
58
94
|
INSUFFICIENT_FUNDS
|
|
59
95
|
}),
|
|
96
|
+
/** Protected: Claim rewards for a single hotspot */
|
|
97
|
+
claimHotspotRewards: oc.route({
|
|
98
|
+
method: "POST",
|
|
99
|
+
path: "/{entityPubKey}/claim-rewards",
|
|
100
|
+
summary: "Claim rewards for one hotspot"
|
|
101
|
+
}).input(ClaimHotspotRewardsInputSchema).output(ClaimHotspotRewardsOutputSchema).errors({
|
|
102
|
+
NOT_FOUND,
|
|
103
|
+
INSUFFICIENT_FUNDS
|
|
104
|
+
}),
|
|
105
|
+
/** Protected: Burn (permanently destroy) a hotspot */
|
|
106
|
+
burnHotspot: oc.route({ method: "POST", path: "/burn", summary: "Burn a hotspot" }).input(HotspotBurnInputSchema).output(HotspotBurnOutputSchema).errors({
|
|
107
|
+
NOT_FOUND,
|
|
108
|
+
UNAUTHORIZED,
|
|
109
|
+
BAD_REQUEST: { message: "Invalid parameters", status: 400 },
|
|
110
|
+
INSUFFICIENT_FUNDS,
|
|
111
|
+
CONFLICT
|
|
112
|
+
}),
|
|
60
113
|
/** Public: Get pending rewards for a wallet */
|
|
61
|
-
getPendingRewards: oc.route({
|
|
114
|
+
getPendingRewards: oc.route({
|
|
115
|
+
method: "GET",
|
|
116
|
+
path: "/pending-rewards/{walletAddress}",
|
|
117
|
+
summary: "Get pending rewards"
|
|
118
|
+
}).input(GetPendingRewardsInputSchema).output(GetPendingRewardsOutputSchema).errors({
|
|
62
119
|
BAD_REQUEST: { message: "Invalid wallet address", status: 400 },
|
|
63
120
|
INVALID_WALLET_ADDRESS
|
|
64
121
|
}),
|
|
65
122
|
/** Protected: Transfer hotspot ownership */
|
|
66
|
-
transferHotspot: oc.route({
|
|
123
|
+
transferHotspot: oc.route({
|
|
124
|
+
method: "POST",
|
|
125
|
+
path: "/transfer",
|
|
126
|
+
summary: "Transfer ownership"
|
|
127
|
+
}).input(TransferHotspotInputSchema).output(TransferHotspotOutputSchema).errors({
|
|
67
128
|
UNAUTHORIZED,
|
|
68
129
|
NOT_FOUND,
|
|
69
130
|
BAD_REQUEST: { message: "Invalid transfer parameters", status: 400 },
|
|
@@ -71,34 +132,58 @@ var hotspotsContract = oc.tag("Hotspot").prefix("/hotspots").router({
|
|
|
71
132
|
CONFLICT
|
|
72
133
|
}),
|
|
73
134
|
/** Protected: Update rewards destination */
|
|
74
|
-
updateRewardsDestination: oc.route({
|
|
135
|
+
updateRewardsDestination: oc.route({
|
|
136
|
+
method: "POST",
|
|
137
|
+
path: "/update-rewards-destination",
|
|
138
|
+
summary: "Update rewards destination"
|
|
139
|
+
}).input(UpdateRewardsDestinationInputSchema).output(UpdateRewardsDestinationOutputSchema).errors({
|
|
75
140
|
BAD_REQUEST: { message: "Invalid parameters", status: 400 },
|
|
76
141
|
NOT_FOUND,
|
|
77
142
|
INSUFFICIENT_FUNDS
|
|
78
143
|
}),
|
|
79
144
|
/** Public: Get split configuration for a hotspot */
|
|
80
|
-
getSplit: oc.route({
|
|
145
|
+
getSplit: oc.route({
|
|
146
|
+
method: "GET",
|
|
147
|
+
path: "/split/{walletAddress}/{hotspotPubkey}",
|
|
148
|
+
summary: "Get reward split"
|
|
149
|
+
}).input(GetSplitInputSchema).output(SplitResponseSchema).errors({
|
|
81
150
|
NOT_FOUND: { message: "Split not found", status: 404 },
|
|
82
151
|
INVALID_WALLET_ADDRESS
|
|
83
152
|
}),
|
|
84
153
|
/** Protected: Create a split configuration */
|
|
85
|
-
createSplit: oc.route({
|
|
154
|
+
createSplit: oc.route({
|
|
155
|
+
method: "POST",
|
|
156
|
+
path: "/split",
|
|
157
|
+
summary: "Create a reward split"
|
|
158
|
+
}).input(CreateSplitInputSchema).output(CreateSplitOutputSchema).errors({
|
|
86
159
|
NOT_FOUND,
|
|
87
160
|
BAD_REQUEST: { message: "Invalid split configuration", status: 400 },
|
|
88
161
|
INSUFFICIENT_FUNDS
|
|
89
162
|
}),
|
|
90
163
|
/** Protected: Delete a split configuration */
|
|
91
|
-
deleteSplit: oc.route({
|
|
164
|
+
deleteSplit: oc.route({
|
|
165
|
+
method: "DELETE",
|
|
166
|
+
path: "/split",
|
|
167
|
+
summary: "Delete a reward split"
|
|
168
|
+
}).input(DeleteSplitInputSchema).output(DeleteSplitOutputSchema).errors({
|
|
92
169
|
NOT_FOUND,
|
|
93
170
|
INSUFFICIENT_FUNDS
|
|
94
171
|
}),
|
|
95
172
|
/** Protected: Close automation */
|
|
96
|
-
closeAutomation: oc.route({
|
|
173
|
+
closeAutomation: oc.route({
|
|
174
|
+
method: "POST",
|
|
175
|
+
path: "/wallet/{walletAddress}/automation/close",
|
|
176
|
+
summary: "Close automation"
|
|
177
|
+
}).input(CloseAutomationInputSchema).output(CloseAutomationOutputSchema).errors({
|
|
97
178
|
NOT_FOUND,
|
|
98
179
|
INSUFFICIENT_FUNDS
|
|
99
180
|
}),
|
|
100
181
|
/** Protected: Get automation status */
|
|
101
|
-
getAutomationStatus: oc.route({
|
|
182
|
+
getAutomationStatus: oc.route({
|
|
183
|
+
method: "GET",
|
|
184
|
+
path: "/wallet/{walletAddress}/automation/status",
|
|
185
|
+
summary: "Get automation status"
|
|
186
|
+
}).input(GetAutomationStatusInputSchema).output(AutomationStatusOutputSchema).errors({
|
|
102
187
|
NOT_FOUND
|
|
103
188
|
}),
|
|
104
189
|
/** Protected: Create automation */
|
|
@@ -111,13 +196,94 @@ var hotspotsContract = oc.tag("Hotspot").prefix("/hotspots").router({
|
|
|
111
196
|
INSUFFICIENT_FUNDS
|
|
112
197
|
}),
|
|
113
198
|
/** Protected: Fund automation */
|
|
114
|
-
fundAutomation: oc.route({
|
|
199
|
+
fundAutomation: oc.route({
|
|
200
|
+
method: "POST",
|
|
201
|
+
path: "/wallet/{walletAddress}/automation/fund",
|
|
202
|
+
summary: "Fund automation"
|
|
203
|
+
}).input(FundAutomationInputSchema).output(FundAutomationOutputSchema).errors({
|
|
115
204
|
NOT_FOUND,
|
|
116
205
|
INSUFFICIENT_FUNDS
|
|
117
206
|
}),
|
|
118
207
|
/** Protected: Get funding estimate */
|
|
119
|
-
getFundingEstimate: oc.route({
|
|
120
|
-
|
|
208
|
+
getFundingEstimate: oc.route({
|
|
209
|
+
method: "GET",
|
|
210
|
+
path: "/wallet/{walletAddress}/automation/funding-estimate",
|
|
211
|
+
summary: "Get funding estimate"
|
|
212
|
+
}).input(GetFundingEstimateInputSchema).output(FundingEstimateOutputSchema).errors({}),
|
|
213
|
+
/** Protected: Requeue an automation that ran out of SOL */
|
|
214
|
+
requeueAutomation: oc.route({
|
|
215
|
+
method: "POST",
|
|
216
|
+
path: "/wallet/{walletAddress}/automation/requeue",
|
|
217
|
+
summary: "Requeue automation"
|
|
218
|
+
}).input(RequeueAutomationInputSchema).output(RequeueAutomationOutputSchema).errors({
|
|
219
|
+
NOT_FOUND,
|
|
220
|
+
INSUFFICIENT_FUNDS
|
|
221
|
+
}),
|
|
222
|
+
/** Protected: Add a whole-wallet claim to an automation */
|
|
223
|
+
addWalletToAutomation: oc.route({
|
|
224
|
+
method: "POST",
|
|
225
|
+
path: "/wallet/{walletAddress}/automation/add-wallet",
|
|
226
|
+
summary: "Add wallet claim to automation"
|
|
227
|
+
}).input(AddWalletToAutomationInputSchema).output(AddWalletToAutomationOutputSchema).errors({
|
|
228
|
+
NOT_FOUND,
|
|
229
|
+
INSUFFICIENT_FUNDS
|
|
230
|
+
}),
|
|
231
|
+
/** Protected: Add a single hotspot claim to an automation */
|
|
232
|
+
addEntityToAutomation: oc.route({
|
|
233
|
+
method: "POST",
|
|
234
|
+
path: "/wallet/{walletAddress}/automation/add-entity",
|
|
235
|
+
summary: "Add hotspot claim to automation"
|
|
236
|
+
}).input(AddEntityToAutomationInputSchema).output(AddEntityToAutomationOutputSchema).errors({
|
|
237
|
+
NOT_FOUND,
|
|
238
|
+
INSUFFICIENT_FUNDS
|
|
239
|
+
}),
|
|
240
|
+
/** Protected: Remove a claim entry from an automation */
|
|
241
|
+
removeEntityFromAutomation: oc.route({
|
|
242
|
+
method: "POST",
|
|
243
|
+
path: "/wallet/{walletAddress}/automation/remove-entity",
|
|
244
|
+
summary: "Remove claim from automation"
|
|
245
|
+
}).input(RemoveEntityFromAutomationInputSchema).output(RemoveEntityFromAutomationOutputSchema).errors({
|
|
246
|
+
NOT_FOUND,
|
|
247
|
+
INSUFFICIENT_FUNDS
|
|
248
|
+
}),
|
|
249
|
+
/** Protected: Issue a data-only hotspot */
|
|
250
|
+
issueDataOnlyHotspot: oc.route({
|
|
251
|
+
method: "POST",
|
|
252
|
+
path: "/data-only/issue",
|
|
253
|
+
summary: "Issue a data-only hotspot"
|
|
254
|
+
}).input(IssueDataOnlyHotspotInputSchema).output(IssueDataOnlyHotspotOutputSchema).errors({
|
|
255
|
+
NOT_FOUND,
|
|
256
|
+
INSUFFICIENT_FUNDS,
|
|
257
|
+
BAD_REQUEST: {
|
|
258
|
+
message: "Invalid add-gateway transaction",
|
|
259
|
+
status: 400
|
|
260
|
+
}
|
|
261
|
+
}),
|
|
262
|
+
/** Protected: Onboard a data-only hotspot */
|
|
263
|
+
onboardDataOnlyHotspot: oc.route({
|
|
264
|
+
method: "POST",
|
|
265
|
+
path: "/data-only/onboard",
|
|
266
|
+
summary: "Onboard a data-only hotspot"
|
|
267
|
+
}).input(OnboardDataOnlyHotspotInputSchema).output(OnboardDataOnlyHotspotOutputSchema).errors({
|
|
268
|
+
NOT_FOUND,
|
|
269
|
+
INSUFFICIENT_FUNDS,
|
|
270
|
+
BAD_REQUEST: { message: "Invalid onboard parameters", status: 400 }
|
|
271
|
+
}),
|
|
272
|
+
/** Protected: Operator floor top-up for a batch of automations */
|
|
273
|
+
topUpAutomation: oc.route({
|
|
274
|
+
method: "POST",
|
|
275
|
+
path: "/automation/top-up",
|
|
276
|
+
summary: "Operator floor top-up of automation funding"
|
|
277
|
+
}).input(TopUpAutomationInputSchema).output(TopUpAutomationOutputSchema).errors({
|
|
278
|
+
NOT_FOUND,
|
|
279
|
+
INSUFFICIENT_FUNDS
|
|
280
|
+
}),
|
|
281
|
+
updateHotspotInfo: oc.route({
|
|
282
|
+
method: "POST",
|
|
283
|
+
path: "/update-info",
|
|
284
|
+
summary: "Update hotspot info",
|
|
285
|
+
description: "Creates an unsigned transaction to update hotspot configuration. Requires deviceType discriminant (iot or mobile) to select the correct update path and validate against on-chain network."
|
|
286
|
+
}).input(UpdateHotspotInfoInputSchema).output(UpdateHotspotInfoOutputSchema).errors({
|
|
121
287
|
NOT_FOUND,
|
|
122
288
|
UNAUTHORIZED,
|
|
123
289
|
BAD_REQUEST: { message: "Device type mismatch", status: 400 },
|
|
@@ -165,13 +331,13 @@ var governanceContract = oc.tag("Governance").prefix("/governance").router({
|
|
|
165
331
|
method: "POST",
|
|
166
332
|
path: "/positions/{positionMint}/transfer",
|
|
167
333
|
summary: "Transfer between positions",
|
|
168
|
-
description: "Transfer tokens from one position to another. Both positions must have no active votes."
|
|
334
|
+
description: "Transfer tokens from one position to another. Both positions must have no active votes. The target position may be owned by a different wallet, enabling veHNT transfer between wallets."
|
|
169
335
|
}).input(TransferPositionInputSchema).errors({ BAD_REQUEST, NOT_FOUND, INSUFFICIENT_FUNDS }).output(TransferPositionResponseSchema),
|
|
170
336
|
transferPositionOwnership: oc.route({
|
|
171
337
|
method: "POST",
|
|
172
338
|
path: "/positions/{positionMint}/transfer-ownership",
|
|
173
339
|
summary: "Transfer position ownership",
|
|
174
|
-
description: "Transfer ownership of a position NFT to another wallet.
|
|
340
|
+
description: "Transfer ownership of a position NFT to another wallet. Only the current owner must sign the transaction; the recipient does not."
|
|
175
341
|
}).input(TransferPositionOwnershipInputSchema).errors({ BAD_REQUEST, NOT_FOUND, INSUFFICIENT_FUNDS }).output(TransferPositionOwnershipResponseSchema),
|
|
176
342
|
delegatePositions: oc.route({
|
|
177
343
|
method: "POST",
|
|
@@ -202,7 +368,12 @@ var governanceContract = oc.tag("Governance").prefix("/governance").router({
|
|
|
202
368
|
path: "/proposals/{proposalKey}/vote",
|
|
203
369
|
summary: "Vote on proposal",
|
|
204
370
|
description: "Cast votes on a proposal using one or more positions. Auto-detects owned vs proxied positions \u2014 proxied positions use proxy vote path. Automatically queues cleanup tasks to relinquish vote markers after the proposal ends. If many positions are provided, may require multiple API calls - check hasMore in the response."
|
|
205
|
-
}).input(VoteInputSchema).errors({
|
|
371
|
+
}).input(VoteInputSchema).errors({
|
|
372
|
+
BAD_REQUEST,
|
|
373
|
+
NOT_FOUND,
|
|
374
|
+
INSUFFICIENT_FUNDS,
|
|
375
|
+
ALL_POSITIONS_SKIPPED
|
|
376
|
+
}).output(VoteResponseSchema),
|
|
206
377
|
relinquishVote: oc.route({
|
|
207
378
|
method: "POST",
|
|
208
379
|
path: "/proposals/{proposalKey}/relinquish-votes",
|
|
@@ -485,9 +656,90 @@ var dataCreditsContract = oc.tag("Data Credits").router({
|
|
|
485
656
|
summary: "Delegate data credits to a router key"
|
|
486
657
|
}).input(DelegateDataCreditsInputSchema).output(TransactionDataSchema).errors({
|
|
487
658
|
BAD_REQUEST,
|
|
488
|
-
INSUFFICIENT_FUNDS
|
|
659
|
+
INSUFFICIENT_FUNDS,
|
|
660
|
+
NOT_FOUND
|
|
661
|
+
}),
|
|
662
|
+
burn: oc.route({
|
|
663
|
+
method: "POST",
|
|
664
|
+
path: "/data-credits/burn",
|
|
665
|
+
summary: "Burn data credits"
|
|
666
|
+
}).input(BurnDataCreditsInputSchema).output(TransactionDataSchema).errors({
|
|
667
|
+
BAD_REQUEST,
|
|
668
|
+
INSUFFICIENT_FUNDS,
|
|
669
|
+
NOT_FOUND
|
|
489
670
|
})
|
|
490
671
|
});
|
|
672
|
+
var TransactionIndexSchema = z.string().regex(/^\d+$/, "transactionIndex must be a whole number").describe("Squads transaction index of the target proposal (u64 as string)");
|
|
673
|
+
var SquadsProposalVoteInputSchema = z.object({
|
|
674
|
+
member: PublicKeySchema.describe(
|
|
675
|
+
"Wallet address of the multisig member casting the vote (signer and fee payer)"
|
|
676
|
+
),
|
|
677
|
+
multisig: PublicKeySchema.describe("Multisig account PDA"),
|
|
678
|
+
transactionIndex: TransactionIndexSchema,
|
|
679
|
+
memo: z.string().optional().describe("Optional memo recorded on the vote")
|
|
680
|
+
});
|
|
681
|
+
var SquadsExecuteProposalInputSchema = z.object({
|
|
682
|
+
member: PublicKeySchema.describe(
|
|
683
|
+
"Wallet address of the multisig member executing the proposal (signer and fee payer)"
|
|
684
|
+
),
|
|
685
|
+
multisig: PublicKeySchema.describe("Multisig account PDA"),
|
|
686
|
+
transactionIndex: TransactionIndexSchema
|
|
687
|
+
});
|
|
688
|
+
var SquadsPermissionSchema = z.enum(["initiate", "vote", "execute"]);
|
|
689
|
+
var SquadsConfigActionSchema = z.discriminatedUnion("type", [
|
|
690
|
+
z.object({
|
|
691
|
+
type: z.literal("addMember"),
|
|
692
|
+
newMember: PublicKeySchema.describe("Pubkey of the member to add"),
|
|
693
|
+
permissions: z.array(SquadsPermissionSchema).nonempty().optional().describe(
|
|
694
|
+
"Permissions granted to the new member. Defaults to all three (initiate, vote, execute)."
|
|
695
|
+
)
|
|
696
|
+
}),
|
|
697
|
+
z.object({
|
|
698
|
+
type: z.literal("removeMember"),
|
|
699
|
+
oldMember: PublicKeySchema.describe("Pubkey of the member to remove")
|
|
700
|
+
}),
|
|
701
|
+
z.object({
|
|
702
|
+
type: z.literal("changeThreshold"),
|
|
703
|
+
newThreshold: z.number().int().min(1).describe("New approval threshold for the multisig")
|
|
704
|
+
})
|
|
705
|
+
]);
|
|
706
|
+
var SquadsProposeConfigChangeInputSchema = z.object({
|
|
707
|
+
member: PublicKeySchema.describe(
|
|
708
|
+
"Wallet address of the multisig member creating the proposal (signer and fee payer)"
|
|
709
|
+
),
|
|
710
|
+
multisig: PublicKeySchema.describe("Multisig account PDA"),
|
|
711
|
+
actions: z.array(SquadsConfigActionSchema).nonempty().describe("One or more config changes to apply when the proposal executes"),
|
|
712
|
+
memo: z.string().optional().describe("Optional memo recorded on the proposal")
|
|
713
|
+
});
|
|
714
|
+
|
|
715
|
+
// src/contracts/squads.ts
|
|
716
|
+
var squadsContract = oc.tag("Squads").router({
|
|
717
|
+
approveProposal: oc.route({
|
|
718
|
+
method: "POST",
|
|
719
|
+
path: "/squads/proposals/approve",
|
|
720
|
+
summary: "Approve a Squads v4 proposal"
|
|
721
|
+
}).input(SquadsProposalVoteInputSchema).output(TransactionDataSchema).errors({ BAD_REQUEST, NOT_FOUND, INSUFFICIENT_FUNDS }),
|
|
722
|
+
rejectProposal: oc.route({
|
|
723
|
+
method: "POST",
|
|
724
|
+
path: "/squads/proposals/reject",
|
|
725
|
+
summary: "Reject a Squads v4 proposal"
|
|
726
|
+
}).input(SquadsProposalVoteInputSchema).output(TransactionDataSchema).errors({ BAD_REQUEST, NOT_FOUND, INSUFFICIENT_FUNDS }),
|
|
727
|
+
cancelProposal: oc.route({
|
|
728
|
+
method: "POST",
|
|
729
|
+
path: "/squads/proposals/cancel",
|
|
730
|
+
summary: "Cancel an approved Squads v4 proposal"
|
|
731
|
+
}).input(SquadsProposalVoteInputSchema).output(TransactionDataSchema).errors({ BAD_REQUEST, NOT_FOUND, INSUFFICIENT_FUNDS }),
|
|
732
|
+
executeProposal: oc.route({
|
|
733
|
+
method: "POST",
|
|
734
|
+
path: "/squads/proposals/execute",
|
|
735
|
+
summary: "Execute an approved Squads v4 proposal (vault or config)"
|
|
736
|
+
}).input(SquadsExecuteProposalInputSchema).output(TransactionDataSchema).errors({ BAD_REQUEST, NOT_FOUND, INSUFFICIENT_FUNDS }),
|
|
737
|
+
proposeConfigChange: oc.route({
|
|
738
|
+
method: "POST",
|
|
739
|
+
path: "/squads/proposals/config",
|
|
740
|
+
summary: "Propose a Squads v4 config change (add/remove member, change threshold)"
|
|
741
|
+
}).input(SquadsProposeConfigChangeInputSchema).output(TransactionDataSchema).errors({ BAD_REQUEST, NOT_FOUND, INSUFFICIENT_FUNDS })
|
|
742
|
+
});
|
|
491
743
|
var apiContract = oc.router({
|
|
492
744
|
governance: governanceContract,
|
|
493
745
|
health: healthContract,
|
|
@@ -498,7 +750,8 @@ var apiContract = oc.router({
|
|
|
498
750
|
transactions: transactionsContract,
|
|
499
751
|
welcomePacks: welcomePacksContract,
|
|
500
752
|
migration: migrationContract,
|
|
501
|
-
dataCredits: dataCreditsContract
|
|
753
|
+
dataCredits: dataCreditsContract,
|
|
754
|
+
squads: squadsContract
|
|
502
755
|
});
|
|
503
756
|
var fullApiContract = oc.router({
|
|
504
757
|
...apiContract,
|
|
@@ -507,4 +760,4 @@ var fullApiContract = oc.router({
|
|
|
507
760
|
migration: migrationContract
|
|
508
761
|
});
|
|
509
762
|
|
|
510
|
-
export { apiContract, dataCreditsContract, fiatContract, fullApiContract, governanceContract, healthContract, hotspotsContract, migrationContract, rewardContract, swapContract, tokensContract, transactionsContract, webhooksContract, welcomePacksContract };
|
|
763
|
+
export { apiContract, dataCreditsContract, fiatContract, fullApiContract, governanceContract, healthContract, hotspotsContract, migrationContract, rewardContract, squadsContract, swapContract, tokensContract, transactionsContract, webhooksContract, welcomePacksContract };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { HotspotSchema } from './chunk-
|
|
2
|
-
import { WalletAddressSchema, ScheduleInputSchema, TokenAmountInputSchema, RewardSplitInputSchema, createTransactionResponse } from './chunk-
|
|
1
|
+
import { HotspotSchema } from './chunk-VCQCOERJ.js';
|
|
2
|
+
import { WalletAddressSchema, ScheduleInputSchema, TokenAmountInputSchema, RewardSplitInputSchema, createTransactionResponse } from './chunk-O5LI7ILX.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
|
|
5
5
|
var WelcomePackListInputSchema = z.object({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { HotspotSchema } from './chunk-
|
|
2
|
-
import { WalletAddressSchema, TransactionMetadataSchema, TokenAmountOutputSchema } from './chunk-
|
|
1
|
+
import { HotspotSchema } from './chunk-VCQCOERJ.js';
|
|
2
|
+
import { WalletAddressSchema, TransactionMetadataSchema, TokenAmountOutputSchema } from './chunk-O5LI7ILX.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
|
|
5
5
|
var MigrateInputSchema = z.object({
|
|
@@ -31,6 +31,12 @@ var ErrorResponseSchema = z.object({
|
|
|
31
31
|
var WalletAddressSchema = z.string().regex(/^[1-9A-HJ-NP-Za-km-z]{32,44}$/, "Invalid Solana wallet address");
|
|
32
32
|
var PublicKeySchema = z.string().regex(/^[1-9A-HJ-NP-Za-km-z]{32,44}$/, "Invalid Solana public key");
|
|
33
33
|
var HeliumPublicKeySchema = z.string().min(32).max(400);
|
|
34
|
+
var squadsProposeFields = {
|
|
35
|
+
multisig: PublicKeySchema.optional().describe(
|
|
36
|
+
"If set, build the action as a Squads v4 proposal from this multisig's vault instead of a direct transaction. The action's signer is the proposing member and outer fee payer."
|
|
37
|
+
),
|
|
38
|
+
memo: z.string().optional().describe("Optional memo recorded on the Squads proposal (multisig mode)")
|
|
39
|
+
};
|
|
34
40
|
var PaginationInputSchema = z.object({
|
|
35
41
|
page: z.coerce.number().int().min(1).default(1),
|
|
36
42
|
limit: z.coerce.number().int().min(1).max(100).default(10)
|
|
@@ -118,4 +124,4 @@ function createTypedPaginatedTransactionResponse(metadataSchema) {
|
|
|
118
124
|
});
|
|
119
125
|
}
|
|
120
126
|
|
|
121
|
-
export { ErrorResponseSchema, HeliumPublicKeySchema, PaginationInputSchema, PaginationOutputSchema, PublicKeySchema, RewardSplitInputSchema, ScheduleInputSchema, TokenAmountInputSchema, TokenAmountOutputSchema, TransactionBatchRequestSchema, TransactionBatchResponseSchema, TransactionDataSchema, TransactionItemSchema, TransactionMetadataSchema, WalletAddressSchema, createPaginatedTransactionResponse, createTransactionResponse, createTypedPaginatedTransactionResponse, createTypedTransactionResponse, typedTransactionData };
|
|
127
|
+
export { ErrorResponseSchema, HeliumPublicKeySchema, PaginationInputSchema, PaginationOutputSchema, PublicKeySchema, RewardSplitInputSchema, ScheduleInputSchema, TokenAmountInputSchema, TokenAmountOutputSchema, TransactionBatchRequestSchema, TransactionBatchResponseSchema, TransactionDataSchema, TransactionItemSchema, TransactionMetadataSchema, WalletAddressSchema, createPaginatedTransactionResponse, createTransactionResponse, createTypedPaginatedTransactionResponse, createTypedTransactionResponse, squadsProposeFields, typedTransactionData };
|
|
@@ -1,17 +1,22 @@
|
|
|
1
|
-
import { PublicKeySchema } from './chunk-
|
|
1
|
+
import { PublicKeySchema, squadsProposeFields } from './chunk-O5LI7ILX.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
4
|
var MintDataCreditsInputSchema = z.object({
|
|
5
5
|
owner: PublicKeySchema.describe(
|
|
6
6
|
"Wallet address of the user minting data credits (used as fee payer and HNT source)"
|
|
7
7
|
),
|
|
8
|
-
dcAmount: z.string().regex(/^\d+$/, "Amount must be a whole number").optional().describe(
|
|
8
|
+
dcAmount: z.string().regex(/^\d+$/, "Amount must be a whole number").optional().describe(
|
|
9
|
+
"Amount of DC to mint (in smallest unit). Provide either dcAmount or hntAmount."
|
|
10
|
+
),
|
|
9
11
|
hntAmount: z.string().regex(/^\d+$/, "Amount must be a whole number in bones").optional().describe(
|
|
10
12
|
"Amount of HNT to burn (in bones, 1 HNT = 100000000 bones). Provide either dcAmount or hntAmount."
|
|
11
13
|
),
|
|
12
14
|
recipient: PublicKeySchema.optional().describe(
|
|
13
15
|
"Recipient wallet for the minted DC. Defaults to the owner."
|
|
14
16
|
)
|
|
17
|
+
// No Squads propose mode: minting requires a fresh Pyth price in the same
|
|
18
|
+
// transaction, which a deferred proposal can't satisfy (see the mint
|
|
19
|
+
// procedure). Delegation and burns are proposable.
|
|
15
20
|
});
|
|
16
21
|
var DelegateDataCreditsInputSchema = z.object({
|
|
17
22
|
owner: PublicKeySchema.describe(
|
|
@@ -22,7 +27,14 @@ var DelegateDataCreditsInputSchema = z.object({
|
|
|
22
27
|
mint: PublicKeySchema.describe(
|
|
23
28
|
"SubDAO token mint (e.g. MOBILE or IOT mint) to determine which subDAO to delegate to"
|
|
24
29
|
),
|
|
25
|
-
|
|
30
|
+
...squadsProposeFields
|
|
31
|
+
});
|
|
32
|
+
var BurnDataCreditsInputSchema = z.object({
|
|
33
|
+
owner: PublicKeySchema.describe(
|
|
34
|
+
"Wallet address burning the data credits (signer and fee payer)"
|
|
35
|
+
),
|
|
36
|
+
amount: z.string().regex(/^\d+$/, "Amount must be a whole number").describe("Amount of DC to burn (smallest unit, DC has 0 decimals)"),
|
|
37
|
+
...squadsProposeFields
|
|
26
38
|
});
|
|
27
39
|
|
|
28
|
-
export { DelegateDataCreditsInputSchema, MintDataCreditsInputSchema };
|
|
40
|
+
export { BurnDataCreditsInputSchema, DelegateDataCreditsInputSchema, MintDataCreditsInputSchema };
|