infra-sdk-typescript 0.2.0 → 0.3.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/README.md +3 -2
- package/dist/index.cjs +15 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +116 -57
- package/dist/index.d.ts +116 -57
- package/dist/index.js +15 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -354,44 +354,59 @@ type TokenType = "ASSET" | "YIELD_BEARING";
|
|
|
354
354
|
type TokenStatus = LooseUnion<"PENDING" | "ACTIVE" | "PAUSED" | "RETIRED">;
|
|
355
355
|
type TokenTransactionType = LooseUnion<"MINT" | "BURN" | "TRANSFER" | "DEPLOY" | "REDEEM" | "SNAPSHOT">;
|
|
356
356
|
type TokenTransactionStatus = LooseUnion<"PENDING" | "CONFIRMED" | "FAILED">;
|
|
357
|
+
/**
|
|
358
|
+
* Chain id a token is deployed on, e.g. `84532` (Base Sepolia). The API accepts it as a number
|
|
359
|
+
* or a numeric string; responses always return it as a string.
|
|
360
|
+
*/
|
|
361
|
+
type TokenChainId = string | number;
|
|
362
|
+
type AssetClass = LooseUnion<"FIXED_INCOME" | "MONEY_MARKET" | "REAL_ESTATE" | "COMMODITY" | "EQUITY" | "LOYALTY_VOUCHER">;
|
|
363
|
+
/** Day-count convention used to accrue yield. */
|
|
364
|
+
type YieldDayCount = LooseUnion<"ACT_365" | "ACT_360" | "THIRTY_360">;
|
|
365
|
+
/** Stablecoin a yield payout is made in. Omit to pay out in the token's own settlement asset. */
|
|
366
|
+
type YieldPayoutToken = LooseUnion<"CNGN">;
|
|
357
367
|
interface YieldParams {
|
|
358
|
-
/**
|
|
368
|
+
/**
|
|
369
|
+
* Annual yield rate as a percentage, e.g. `5.5` for 5.5%. Must be greater than `0`, at most
|
|
370
|
+
* `100`, and have no more than 2 decimal places.
|
|
371
|
+
*/
|
|
359
372
|
annualRate: number;
|
|
360
|
-
/** Maturity date, `YYYY-MM-DD`. */
|
|
373
|
+
/** Maturity date, `YYYY-MM-DD`. Must be in the future. */
|
|
361
374
|
maturityDate: string;
|
|
362
|
-
/** First coupon date, `YYYY-MM-DD`. */
|
|
375
|
+
/** First coupon date, `YYYY-MM-DD`. Must be in the future and before `maturityDate`. */
|
|
363
376
|
firstCouponDate: string;
|
|
364
|
-
/** Coupon interval, in days. */
|
|
377
|
+
/** Coupon interval, in days. Must be at least `1`. */
|
|
365
378
|
couponInterval: number;
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
/** Face value per token, in fiat major units. */
|
|
379
|
+
dayCount: YieldDayCount;
|
|
380
|
+
/** Face value per token, in fiat major units. Must be at least `1`. */
|
|
369
381
|
faceValuePerToken: number;
|
|
370
382
|
/** Grace period, in seconds. */
|
|
371
|
-
gracePeriod
|
|
372
|
-
callable
|
|
373
|
-
/**
|
|
383
|
+
gracePeriod: number;
|
|
384
|
+
callable: boolean;
|
|
385
|
+
/**
|
|
386
|
+
* Call date, `YYYY-MM-DD`. Only meaningful when `callable` is `true`. Must be in the future
|
|
387
|
+
* and before `maturityDate`.
|
|
388
|
+
*/
|
|
374
389
|
callDate?: string;
|
|
375
390
|
/** Early redemption fee, in basis points. */
|
|
376
391
|
earlyRedemptionFee?: number;
|
|
377
392
|
}
|
|
378
393
|
interface CreateTokenParams {
|
|
379
|
-
/** Short token symbol, e.g. `"ACMB3"`. */
|
|
394
|
+
/** Short token symbol, e.g. `"ACMB3"`. At most 10 characters. */
|
|
380
395
|
ticker: string;
|
|
381
396
|
name: string;
|
|
382
|
-
/** Issue price per token, in fiat major units. */
|
|
383
|
-
price
|
|
384
|
-
chainId:
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
assetClass:
|
|
397
|
+
/** Issue price per token, in fiat major units. Must be at least `1`. */
|
|
398
|
+
price: number;
|
|
399
|
+
chainId: TokenChainId;
|
|
400
|
+
/** Between `1` and `18`. */
|
|
401
|
+
decimals?: number;
|
|
402
|
+
assetClass: AssetClass;
|
|
388
403
|
tokenType: TokenType;
|
|
389
404
|
/** Maximum holders; `0` for unlimited. */
|
|
390
|
-
maxShareholders
|
|
405
|
+
maxShareholders: number;
|
|
391
406
|
/** Per-investor cap; `0` for unlimited. */
|
|
392
|
-
maxTokensPerInvestor
|
|
407
|
+
maxTokensPerInvestor: number;
|
|
393
408
|
/** Lock-up duration, in seconds; `0` for none. */
|
|
394
|
-
lockUpDuration
|
|
409
|
+
lockUpDuration: number;
|
|
395
410
|
/** Required when `tokenType` is `"YIELD_BEARING"`. */
|
|
396
411
|
yieldParams?: YieldParams;
|
|
397
412
|
}
|
|
@@ -457,7 +472,7 @@ interface ListTokensParams {
|
|
|
457
472
|
}
|
|
458
473
|
interface BurnTokenParams {
|
|
459
474
|
tokenId: string;
|
|
460
|
-
chainId:
|
|
475
|
+
chainId: TokenChainId;
|
|
461
476
|
/** Holder address to burn from. */
|
|
462
477
|
fromAddress: string;
|
|
463
478
|
/** Amount to burn, in token units. */
|
|
@@ -467,7 +482,7 @@ interface BurnTokenParams {
|
|
|
467
482
|
}
|
|
468
483
|
interface MintTokenParams {
|
|
469
484
|
tokenId: string;
|
|
470
|
-
chainId:
|
|
485
|
+
chainId: TokenChainId;
|
|
471
486
|
/** Recipient wallet address. */
|
|
472
487
|
toAddress: string;
|
|
473
488
|
/** Amount to mint, in token units. */
|
|
@@ -476,8 +491,8 @@ interface MintTokenParams {
|
|
|
476
491
|
}
|
|
477
492
|
interface TransferTokenParams {
|
|
478
493
|
tokenId: string;
|
|
479
|
-
chainId:
|
|
480
|
-
/** HD address index of the sending holder wallet. */
|
|
494
|
+
chainId: TokenChainId;
|
|
495
|
+
/** HD address index of the sending holder wallet. Must be greater than `0`. */
|
|
481
496
|
fromAddressIndex: number;
|
|
482
497
|
toAddress: string;
|
|
483
498
|
/** Amount to transfer, in token units. */
|
|
@@ -486,9 +501,10 @@ interface TransferTokenParams {
|
|
|
486
501
|
}
|
|
487
502
|
interface ForcedTransferTokenParams {
|
|
488
503
|
tokenId: string;
|
|
489
|
-
chainId:
|
|
490
|
-
/** Holder address to move tokens out of. */
|
|
504
|
+
chainId: TokenChainId;
|
|
505
|
+
/** Holder address to move tokens out of. Must be a valid EVM address. */
|
|
491
506
|
fromAddress: string;
|
|
507
|
+
/** Must be a valid EVM address. */
|
|
492
508
|
toAddress: string;
|
|
493
509
|
/** Amount to transfer, in token units. */
|
|
494
510
|
amount: number;
|
|
@@ -517,7 +533,7 @@ interface TokenTransferResult {
|
|
|
517
533
|
}
|
|
518
534
|
interface RegisterTokenWalletParams {
|
|
519
535
|
tokenId: string;
|
|
520
|
-
chainId:
|
|
536
|
+
chainId: TokenChainId;
|
|
521
537
|
walletAddress: string;
|
|
522
538
|
}
|
|
523
539
|
interface RegisterTokenWalletResult {
|
|
@@ -527,7 +543,7 @@ interface RegisterTokenWalletResult {
|
|
|
527
543
|
}
|
|
528
544
|
interface GetTokenHoldersParams {
|
|
529
545
|
tokenId: string;
|
|
530
|
-
chainId?:
|
|
546
|
+
chainId?: TokenChainId;
|
|
531
547
|
page?: number;
|
|
532
548
|
pageSize?: number;
|
|
533
549
|
}
|
|
@@ -538,7 +554,7 @@ interface TokenHolder {
|
|
|
538
554
|
}
|
|
539
555
|
interface GetWalletBalanceParams {
|
|
540
556
|
tokenId: string;
|
|
541
|
-
chainId:
|
|
557
|
+
chainId: TokenChainId;
|
|
542
558
|
walletAddress: string;
|
|
543
559
|
}
|
|
544
560
|
/** A single wallet's balance of a token, returned by {@link TokenizationResource.getWalletBalance}. */
|
|
@@ -553,7 +569,7 @@ interface TokenWalletBalance {
|
|
|
553
569
|
}
|
|
554
570
|
interface ListTokenTransactionsParams {
|
|
555
571
|
tokenId?: string;
|
|
556
|
-
chainId?:
|
|
572
|
+
chainId?: TokenChainId;
|
|
557
573
|
page?: number;
|
|
558
574
|
pageSize?: number;
|
|
559
575
|
type?: TokenTransactionType;
|
|
@@ -584,62 +600,100 @@ interface TokenTransactionRecord {
|
|
|
584
600
|
memo?: string;
|
|
585
601
|
createdAt?: string;
|
|
586
602
|
confirmedAt?: string;
|
|
603
|
+
/** Distribution snapshot id, set on `SNAPSHOT` transactions. */
|
|
604
|
+
snapshotId?: number;
|
|
587
605
|
}
|
|
588
606
|
interface UpdateTokenYieldParams {
|
|
589
607
|
/** Yield-bearing token id. */
|
|
590
608
|
tokenId: string;
|
|
591
|
-
chainId:
|
|
592
|
-
/** New annual yield rate, as a percentage. */
|
|
609
|
+
chainId: TokenChainId;
|
|
610
|
+
/** New annual yield rate, as a percentage. Same limits as {@link YieldParams.annualRate}. */
|
|
593
611
|
annualRate: number;
|
|
594
612
|
}
|
|
613
|
+
/** Result of {@link TokenizationResource.updateYield}. */
|
|
614
|
+
interface UpdateYieldResult {
|
|
615
|
+
/** Annual rate before the update, as a percentage. */
|
|
616
|
+
currentRate: number;
|
|
617
|
+
/** Annual rate after the update, as a percentage. */
|
|
618
|
+
newRate: number;
|
|
619
|
+
txHash: string;
|
|
620
|
+
}
|
|
595
621
|
interface DistributeYieldParams {
|
|
596
622
|
tokenId: string;
|
|
597
|
-
chainId:
|
|
598
|
-
/** Amount to fund the distribution, in fiat major units. */
|
|
623
|
+
chainId: TokenChainId;
|
|
624
|
+
/** Amount to fund the distribution, in fiat major units. A whole number, at least `1`. */
|
|
599
625
|
fundAmount: number;
|
|
600
|
-
payoutToken?:
|
|
601
|
-
/** Seconds after which unclaimed funds may be reclaimed. */
|
|
602
|
-
reclaimAfter
|
|
603
|
-
|
|
626
|
+
payoutToken?: YieldPayoutToken;
|
|
627
|
+
/** Seconds after which unclaimed funds may be reclaimed. A whole number, at least `1`. */
|
|
628
|
+
reclaimAfter: number;
|
|
629
|
+
/** Push the payout to investors instead of letting them claim it. */
|
|
630
|
+
pushYield?: boolean;
|
|
631
|
+
/** Note recorded with the distribution. */
|
|
632
|
+
memo: string;
|
|
604
633
|
}
|
|
605
634
|
interface PayCouponParams {
|
|
606
635
|
tokenId: string;
|
|
607
|
-
chainId:
|
|
608
|
-
payoutToken?:
|
|
636
|
+
chainId: TokenChainId;
|
|
637
|
+
payoutToken?: YieldPayoutToken;
|
|
609
638
|
/** Push the coupon to investors instead of letting them claim it. */
|
|
610
|
-
pushYield
|
|
611
|
-
|
|
612
|
-
|
|
639
|
+
pushYield: boolean;
|
|
640
|
+
/** Seconds after which unclaimed funds may be reclaimed. At least `1`. */
|
|
641
|
+
reclaimAfter: number;
|
|
642
|
+
/** Note recorded with the coupon payment. */
|
|
643
|
+
memo: string;
|
|
613
644
|
}
|
|
614
645
|
interface ClaimYieldParams {
|
|
615
646
|
tokenId: string;
|
|
616
|
-
chainId:
|
|
617
|
-
/** HD address index of the claiming investor. */
|
|
647
|
+
chainId: TokenChainId;
|
|
648
|
+
/** HD address index of the claiming investor. At least `1`. */
|
|
618
649
|
investorAddressIndex: number;
|
|
619
|
-
/** Distribution snapshot to claim against. */
|
|
650
|
+
/** Distribution snapshot to claim against. At least `1`. */
|
|
620
651
|
snapshotId: number;
|
|
621
652
|
}
|
|
622
653
|
interface RedeemPrincipalParams {
|
|
623
654
|
tokenId: string;
|
|
624
|
-
chainId:
|
|
625
|
-
|
|
626
|
-
|
|
655
|
+
chainId: TokenChainId;
|
|
656
|
+
}
|
|
657
|
+
/** Result of {@link TokenizationResource.redeemPrincipal} — one transaction per redemption payout. */
|
|
658
|
+
interface RedeemPrincipalResult {
|
|
659
|
+
tokenId: string;
|
|
660
|
+
operationRef: string;
|
|
661
|
+
transactionIds: string[];
|
|
662
|
+
txHashes: string[];
|
|
663
|
+
}
|
|
664
|
+
interface ReclaimUnclaimedYieldParams {
|
|
665
|
+
tokenId: string;
|
|
666
|
+
chainId: TokenChainId;
|
|
667
|
+
/** Distribution snapshot to reclaim unclaimed funds from. A whole number, at least `1`. */
|
|
668
|
+
snapshotId: number;
|
|
669
|
+
}
|
|
670
|
+
/** Result of {@link TokenizationResource.reclaimUnclaimedYield}. */
|
|
671
|
+
interface ReclaimUnclaimedYieldResult {
|
|
672
|
+
tokenId: string;
|
|
673
|
+
/** Snapshot id, as a numeric string. */
|
|
674
|
+
snapshotId: string;
|
|
675
|
+
/** Amount reclaimed, as a decimal string. */
|
|
676
|
+
reclaimed: string;
|
|
677
|
+
operationRef: string;
|
|
678
|
+
txHash: string;
|
|
627
679
|
}
|
|
628
|
-
/** Result of
|
|
680
|
+
/** Result of {@link TokenizationResource.claimYield}. */
|
|
629
681
|
interface YieldTxResult {
|
|
630
682
|
txHash: string;
|
|
631
683
|
}
|
|
632
|
-
/** Result of
|
|
684
|
+
/** Result of {@link TokenizationResource.distributeYield} / {@link TokenizationResource.payCoupon}. */
|
|
633
685
|
interface YieldOperationResult {
|
|
686
|
+
tokenId: string;
|
|
634
687
|
operationRef: string;
|
|
688
|
+
transactionId: string;
|
|
635
689
|
txHash: string;
|
|
636
690
|
}
|
|
637
691
|
|
|
638
692
|
/**
|
|
639
693
|
* The Tokenization service — issues and manages tokenized real-world assets: deployment,
|
|
640
694
|
* mint/burn/transfer, wallet whitelisting, holder balances, and the yield lifecycle
|
|
641
|
-
* (rate updates, coupon payments, claims,
|
|
642
|
-
* tokens.
|
|
695
|
+
* (rate updates, coupon payments, claims, principal redemption, and reclaiming unclaimed
|
|
696
|
+
* payouts) for `YIELD_BEARING` tokens.
|
|
643
697
|
*/
|
|
644
698
|
declare class TokenizationResource extends APIResource {
|
|
645
699
|
/**
|
|
@@ -683,15 +737,20 @@ declare class TokenizationResource extends APIResource {
|
|
|
683
737
|
/** Returns token transactions, optionally filtered by token. */
|
|
684
738
|
listTokenTransactions(params?: ListTokenTransactionsParams, overrides?: RequestOverrides): Promise<Page<TokenTransactionRecord>>;
|
|
685
739
|
/** Updates the annual yield rate for a yield-bearing token. */
|
|
686
|
-
updateYield(params: UpdateTokenYieldParams, overrides?: RequestOverrides): Promise<
|
|
740
|
+
updateYield(params: UpdateTokenYieldParams, overrides?: RequestOverrides): Promise<UpdateYieldResult>;
|
|
687
741
|
/** Funds and distributes a yield payout to holders. Unclaimed funds may be reclaimed after `reclaimAfter`. */
|
|
688
742
|
distributeYield(params: DistributeYieldParams, overrides?: IdempotentRequestOverrides): Promise<YieldOperationResult>;
|
|
689
743
|
/** Pays the scheduled coupon for a yield-bearing token. Set `pushYield` to push funds rather than let investors claim. */
|
|
690
744
|
payCoupon(params: PayCouponParams, overrides?: IdempotentRequestOverrides): Promise<YieldOperationResult>;
|
|
691
745
|
/** Claims an investor's yield for a given distribution snapshot. */
|
|
692
746
|
claimYield(params: ClaimYieldParams, overrides?: IdempotentRequestOverrides): Promise<YieldTxResult>;
|
|
693
|
-
/** Redeems principal to holders at maturity.
|
|
694
|
-
redeemPrincipal(params: RedeemPrincipalParams, overrides?: IdempotentRequestOverrides): Promise<
|
|
747
|
+
/** Redeems principal to holders at maturity. */
|
|
748
|
+
redeemPrincipal(params: RedeemPrincipalParams, overrides?: IdempotentRequestOverrides): Promise<RedeemPrincipalResult>;
|
|
749
|
+
/**
|
|
750
|
+
* Returns a snapshot's unclaimed yield to the issuer once its `reclaimAfter` window has
|
|
751
|
+
* passed. An `Idempotency-Key` is generated per call unless you pass your own.
|
|
752
|
+
*/
|
|
753
|
+
reclaimUnclaimedYield(params: ReclaimUnclaimedYieldParams, overrides?: IdempotentRequestOverrides): Promise<ReclaimUnclaimedYieldResult>;
|
|
695
754
|
}
|
|
696
755
|
|
|
697
756
|
type SubscriptionStatus = LooseUnion<"active" | "paused" | "deleted">;
|
|
@@ -946,4 +1005,4 @@ declare function verifyIndexerWebhookSignature(options: VerifyIndexerWebhookOpti
|
|
|
946
1005
|
/** Generates a UUIDv4 suitable for use as an `Idempotency-Key` header value. */
|
|
947
1006
|
declare function generateIdempotencyKey(): string;
|
|
948
1007
|
|
|
949
|
-
export { AuthenticationError, BadRequestError, type BurnTokenParams, type Chain, type ChainType, type ClaimYieldParams, ConflictError, type CreateSubscriptionParams, type CreateTokenParams, type DeactivateWalletParams, type DistributeYieldParams, type EventCatalogEntry, type EventFamily, type EventKind, type FlatPaginatedResponse, type GenerateWalletsParams, type GeneratedWallet, type GetTokenHoldersParams, type GetTransactionHistoryParams, type GetWalletByAddressIndexParams, type GetWalletByAddressParams, type GetWalletCountParams, type HdEnabledStatus, type HttpMethod, type IdempotentRequestOverrides, IndexerResource, type IndexerSubscription, type IndexerSubscriptionWithSecret, InfraAPIError, InfraAuthTokenError, InfraClient, type InfraClientOptions, InfraConnectionError, InfraConnectionTimeoutError, InfraError, type InitiateTransferParams, InternalServerError, type ListEventCatalogParams, type ListSubscriptionsParams, type ListTokenTransactionsParams, type ListTokensParams, type ListWalletsParams, type LooseUnion, type MetaPaginatedResponse, type MintTokenParams, type Network, NotFoundError, type OffsetPaginatedResponse, Page, type PayCouponParams, PaymentRequiredError, PermissionDeniedError, type QueryValue, RateLimitError, type RedeemPrincipalParams, type RegisterTokenWalletParams, type RegisterTokenWalletResult, type RequestOptions, type RequestOverrides, ServiceUnavailableError, type SignTransactionParams, type SignTransactionRequest, type SignedTransactionResult, type SubscriptionStatus, type SupportedChain, type TokenChainDeployment, type TokenDeploymentResult, type TokenDetail, type TokenHolder, type TokenOperationResult, type TokenStatus, type TokenSummary, type TokenTransactionRecord, type TokenTransactionStatus, type TokenTransactionType, type TokenTransferResult, type TokenType, TokenizationResource, type TransactionStatus, type TransferTokenParams, UnknownAPIError, UnprocessableEntityError, type UpdateSubscriptionParams, type UpdateTokenYieldParams, type VerifyIndexerWebhookOptions, type VerifyWalletWebhookOptions, type Wallet, type WalletBalance, type WalletCount, WalletResource, type WalletTransaction, WebhookSignatureVerificationError, type YieldOperationResult, type YieldParams, type YieldTxResult, generateIdempotencyKey, verifyIndexerWebhookSignature, verifyWalletWebhookSignature };
|
|
1008
|
+
export { type AssetClass, AuthenticationError, BadRequestError, type BurnTokenParams, type Chain, type ChainType, type ClaimYieldParams, ConflictError, type CreateSubscriptionParams, type CreateTokenParams, type DeactivateWalletParams, type DistributeYieldParams, type EventCatalogEntry, type EventFamily, type EventKind, type FlatPaginatedResponse, type ForcedTransferTokenParams, type GenerateWalletsParams, type GeneratedWallet, type GetTokenHoldersParams, type GetTransactionHistoryParams, type GetWalletBalanceParams, type GetWalletByAddressIndexParams, type GetWalletByAddressParams, type GetWalletCountParams, type HdEnabledStatus, type HttpMethod, type IdempotentRequestOverrides, IndexerResource, type IndexerSubscription, type IndexerSubscriptionWithSecret, InfraAPIError, InfraAuthTokenError, InfraClient, type InfraClientOptions, InfraConnectionError, InfraConnectionTimeoutError, InfraError, type InitiateTransferParams, InternalServerError, type ListEventCatalogParams, type ListSubscriptionsParams, type ListTokenTransactionsParams, type ListTokensParams, type ListWalletsParams, type LooseUnion, type MetaPaginatedResponse, type MintTokenParams, type Network, NotFoundError, type OffsetPaginatedResponse, Page, type PayCouponParams, PaymentRequiredError, PermissionDeniedError, type QueryValue, RateLimitError, type ReclaimUnclaimedYieldParams, type ReclaimUnclaimedYieldResult, type RedeemPrincipalParams, type RedeemPrincipalResult, type RegisterTokenWalletParams, type RegisterTokenWalletResult, type RequestOptions, type RequestOverrides, ServiceUnavailableError, type SignTransactionParams, type SignTransactionRequest, type SignedTransactionResult, type SubscriptionStatus, type SupportedChain, type TokenChainDeployment, type TokenChainId, type TokenDeploymentResult, type TokenDetail, type TokenHolder, type TokenOperationResult, type TokenStatus, type TokenSummary, type TokenTransactionRecord, type TokenTransactionStatus, type TokenTransactionType, type TokenTransferResult, type TokenType, type TokenWalletBalance, TokenizationResource, type TransactionStatus, type TransferTokenParams, UnknownAPIError, UnprocessableEntityError, type UpdateSubscriptionParams, type UpdateTokenYieldParams, type UpdateYieldResult, type VerifyIndexerWebhookOptions, type VerifyWalletWebhookOptions, type Wallet, type WalletBalance, type WalletCount, WalletResource, type WalletTransaction, WebhookSignatureVerificationError, type YieldDayCount, type YieldOperationResult, type YieldParams, type YieldPayoutToken, type YieldTxResult, generateIdempotencyKey, verifyIndexerWebhookSignature, verifyWalletWebhookSignature };
|
package/dist/index.d.ts
CHANGED
|
@@ -354,44 +354,59 @@ type TokenType = "ASSET" | "YIELD_BEARING";
|
|
|
354
354
|
type TokenStatus = LooseUnion<"PENDING" | "ACTIVE" | "PAUSED" | "RETIRED">;
|
|
355
355
|
type TokenTransactionType = LooseUnion<"MINT" | "BURN" | "TRANSFER" | "DEPLOY" | "REDEEM" | "SNAPSHOT">;
|
|
356
356
|
type TokenTransactionStatus = LooseUnion<"PENDING" | "CONFIRMED" | "FAILED">;
|
|
357
|
+
/**
|
|
358
|
+
* Chain id a token is deployed on, e.g. `84532` (Base Sepolia). The API accepts it as a number
|
|
359
|
+
* or a numeric string; responses always return it as a string.
|
|
360
|
+
*/
|
|
361
|
+
type TokenChainId = string | number;
|
|
362
|
+
type AssetClass = LooseUnion<"FIXED_INCOME" | "MONEY_MARKET" | "REAL_ESTATE" | "COMMODITY" | "EQUITY" | "LOYALTY_VOUCHER">;
|
|
363
|
+
/** Day-count convention used to accrue yield. */
|
|
364
|
+
type YieldDayCount = LooseUnion<"ACT_365" | "ACT_360" | "THIRTY_360">;
|
|
365
|
+
/** Stablecoin a yield payout is made in. Omit to pay out in the token's own settlement asset. */
|
|
366
|
+
type YieldPayoutToken = LooseUnion<"CNGN">;
|
|
357
367
|
interface YieldParams {
|
|
358
|
-
/**
|
|
368
|
+
/**
|
|
369
|
+
* Annual yield rate as a percentage, e.g. `5.5` for 5.5%. Must be greater than `0`, at most
|
|
370
|
+
* `100`, and have no more than 2 decimal places.
|
|
371
|
+
*/
|
|
359
372
|
annualRate: number;
|
|
360
|
-
/** Maturity date, `YYYY-MM-DD`. */
|
|
373
|
+
/** Maturity date, `YYYY-MM-DD`. Must be in the future. */
|
|
361
374
|
maturityDate: string;
|
|
362
|
-
/** First coupon date, `YYYY-MM-DD`. */
|
|
375
|
+
/** First coupon date, `YYYY-MM-DD`. Must be in the future and before `maturityDate`. */
|
|
363
376
|
firstCouponDate: string;
|
|
364
|
-
/** Coupon interval, in days. */
|
|
377
|
+
/** Coupon interval, in days. Must be at least `1`. */
|
|
365
378
|
couponInterval: number;
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
/** Face value per token, in fiat major units. */
|
|
379
|
+
dayCount: YieldDayCount;
|
|
380
|
+
/** Face value per token, in fiat major units. Must be at least `1`. */
|
|
369
381
|
faceValuePerToken: number;
|
|
370
382
|
/** Grace period, in seconds. */
|
|
371
|
-
gracePeriod
|
|
372
|
-
callable
|
|
373
|
-
/**
|
|
383
|
+
gracePeriod: number;
|
|
384
|
+
callable: boolean;
|
|
385
|
+
/**
|
|
386
|
+
* Call date, `YYYY-MM-DD`. Only meaningful when `callable` is `true`. Must be in the future
|
|
387
|
+
* and before `maturityDate`.
|
|
388
|
+
*/
|
|
374
389
|
callDate?: string;
|
|
375
390
|
/** Early redemption fee, in basis points. */
|
|
376
391
|
earlyRedemptionFee?: number;
|
|
377
392
|
}
|
|
378
393
|
interface CreateTokenParams {
|
|
379
|
-
/** Short token symbol, e.g. `"ACMB3"`. */
|
|
394
|
+
/** Short token symbol, e.g. `"ACMB3"`. At most 10 characters. */
|
|
380
395
|
ticker: string;
|
|
381
396
|
name: string;
|
|
382
|
-
/** Issue price per token, in fiat major units. */
|
|
383
|
-
price
|
|
384
|
-
chainId:
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
assetClass:
|
|
397
|
+
/** Issue price per token, in fiat major units. Must be at least `1`. */
|
|
398
|
+
price: number;
|
|
399
|
+
chainId: TokenChainId;
|
|
400
|
+
/** Between `1` and `18`. */
|
|
401
|
+
decimals?: number;
|
|
402
|
+
assetClass: AssetClass;
|
|
388
403
|
tokenType: TokenType;
|
|
389
404
|
/** Maximum holders; `0` for unlimited. */
|
|
390
|
-
maxShareholders
|
|
405
|
+
maxShareholders: number;
|
|
391
406
|
/** Per-investor cap; `0` for unlimited. */
|
|
392
|
-
maxTokensPerInvestor
|
|
407
|
+
maxTokensPerInvestor: number;
|
|
393
408
|
/** Lock-up duration, in seconds; `0` for none. */
|
|
394
|
-
lockUpDuration
|
|
409
|
+
lockUpDuration: number;
|
|
395
410
|
/** Required when `tokenType` is `"YIELD_BEARING"`. */
|
|
396
411
|
yieldParams?: YieldParams;
|
|
397
412
|
}
|
|
@@ -457,7 +472,7 @@ interface ListTokensParams {
|
|
|
457
472
|
}
|
|
458
473
|
interface BurnTokenParams {
|
|
459
474
|
tokenId: string;
|
|
460
|
-
chainId:
|
|
475
|
+
chainId: TokenChainId;
|
|
461
476
|
/** Holder address to burn from. */
|
|
462
477
|
fromAddress: string;
|
|
463
478
|
/** Amount to burn, in token units. */
|
|
@@ -467,7 +482,7 @@ interface BurnTokenParams {
|
|
|
467
482
|
}
|
|
468
483
|
interface MintTokenParams {
|
|
469
484
|
tokenId: string;
|
|
470
|
-
chainId:
|
|
485
|
+
chainId: TokenChainId;
|
|
471
486
|
/** Recipient wallet address. */
|
|
472
487
|
toAddress: string;
|
|
473
488
|
/** Amount to mint, in token units. */
|
|
@@ -476,8 +491,8 @@ interface MintTokenParams {
|
|
|
476
491
|
}
|
|
477
492
|
interface TransferTokenParams {
|
|
478
493
|
tokenId: string;
|
|
479
|
-
chainId:
|
|
480
|
-
/** HD address index of the sending holder wallet. */
|
|
494
|
+
chainId: TokenChainId;
|
|
495
|
+
/** HD address index of the sending holder wallet. Must be greater than `0`. */
|
|
481
496
|
fromAddressIndex: number;
|
|
482
497
|
toAddress: string;
|
|
483
498
|
/** Amount to transfer, in token units. */
|
|
@@ -486,9 +501,10 @@ interface TransferTokenParams {
|
|
|
486
501
|
}
|
|
487
502
|
interface ForcedTransferTokenParams {
|
|
488
503
|
tokenId: string;
|
|
489
|
-
chainId:
|
|
490
|
-
/** Holder address to move tokens out of. */
|
|
504
|
+
chainId: TokenChainId;
|
|
505
|
+
/** Holder address to move tokens out of. Must be a valid EVM address. */
|
|
491
506
|
fromAddress: string;
|
|
507
|
+
/** Must be a valid EVM address. */
|
|
492
508
|
toAddress: string;
|
|
493
509
|
/** Amount to transfer, in token units. */
|
|
494
510
|
amount: number;
|
|
@@ -517,7 +533,7 @@ interface TokenTransferResult {
|
|
|
517
533
|
}
|
|
518
534
|
interface RegisterTokenWalletParams {
|
|
519
535
|
tokenId: string;
|
|
520
|
-
chainId:
|
|
536
|
+
chainId: TokenChainId;
|
|
521
537
|
walletAddress: string;
|
|
522
538
|
}
|
|
523
539
|
interface RegisterTokenWalletResult {
|
|
@@ -527,7 +543,7 @@ interface RegisterTokenWalletResult {
|
|
|
527
543
|
}
|
|
528
544
|
interface GetTokenHoldersParams {
|
|
529
545
|
tokenId: string;
|
|
530
|
-
chainId?:
|
|
546
|
+
chainId?: TokenChainId;
|
|
531
547
|
page?: number;
|
|
532
548
|
pageSize?: number;
|
|
533
549
|
}
|
|
@@ -538,7 +554,7 @@ interface TokenHolder {
|
|
|
538
554
|
}
|
|
539
555
|
interface GetWalletBalanceParams {
|
|
540
556
|
tokenId: string;
|
|
541
|
-
chainId:
|
|
557
|
+
chainId: TokenChainId;
|
|
542
558
|
walletAddress: string;
|
|
543
559
|
}
|
|
544
560
|
/** A single wallet's balance of a token, returned by {@link TokenizationResource.getWalletBalance}. */
|
|
@@ -553,7 +569,7 @@ interface TokenWalletBalance {
|
|
|
553
569
|
}
|
|
554
570
|
interface ListTokenTransactionsParams {
|
|
555
571
|
tokenId?: string;
|
|
556
|
-
chainId?:
|
|
572
|
+
chainId?: TokenChainId;
|
|
557
573
|
page?: number;
|
|
558
574
|
pageSize?: number;
|
|
559
575
|
type?: TokenTransactionType;
|
|
@@ -584,62 +600,100 @@ interface TokenTransactionRecord {
|
|
|
584
600
|
memo?: string;
|
|
585
601
|
createdAt?: string;
|
|
586
602
|
confirmedAt?: string;
|
|
603
|
+
/** Distribution snapshot id, set on `SNAPSHOT` transactions. */
|
|
604
|
+
snapshotId?: number;
|
|
587
605
|
}
|
|
588
606
|
interface UpdateTokenYieldParams {
|
|
589
607
|
/** Yield-bearing token id. */
|
|
590
608
|
tokenId: string;
|
|
591
|
-
chainId:
|
|
592
|
-
/** New annual yield rate, as a percentage. */
|
|
609
|
+
chainId: TokenChainId;
|
|
610
|
+
/** New annual yield rate, as a percentage. Same limits as {@link YieldParams.annualRate}. */
|
|
593
611
|
annualRate: number;
|
|
594
612
|
}
|
|
613
|
+
/** Result of {@link TokenizationResource.updateYield}. */
|
|
614
|
+
interface UpdateYieldResult {
|
|
615
|
+
/** Annual rate before the update, as a percentage. */
|
|
616
|
+
currentRate: number;
|
|
617
|
+
/** Annual rate after the update, as a percentage. */
|
|
618
|
+
newRate: number;
|
|
619
|
+
txHash: string;
|
|
620
|
+
}
|
|
595
621
|
interface DistributeYieldParams {
|
|
596
622
|
tokenId: string;
|
|
597
|
-
chainId:
|
|
598
|
-
/** Amount to fund the distribution, in fiat major units. */
|
|
623
|
+
chainId: TokenChainId;
|
|
624
|
+
/** Amount to fund the distribution, in fiat major units. A whole number, at least `1`. */
|
|
599
625
|
fundAmount: number;
|
|
600
|
-
payoutToken?:
|
|
601
|
-
/** Seconds after which unclaimed funds may be reclaimed. */
|
|
602
|
-
reclaimAfter
|
|
603
|
-
|
|
626
|
+
payoutToken?: YieldPayoutToken;
|
|
627
|
+
/** Seconds after which unclaimed funds may be reclaimed. A whole number, at least `1`. */
|
|
628
|
+
reclaimAfter: number;
|
|
629
|
+
/** Push the payout to investors instead of letting them claim it. */
|
|
630
|
+
pushYield?: boolean;
|
|
631
|
+
/** Note recorded with the distribution. */
|
|
632
|
+
memo: string;
|
|
604
633
|
}
|
|
605
634
|
interface PayCouponParams {
|
|
606
635
|
tokenId: string;
|
|
607
|
-
chainId:
|
|
608
|
-
payoutToken?:
|
|
636
|
+
chainId: TokenChainId;
|
|
637
|
+
payoutToken?: YieldPayoutToken;
|
|
609
638
|
/** Push the coupon to investors instead of letting them claim it. */
|
|
610
|
-
pushYield
|
|
611
|
-
|
|
612
|
-
|
|
639
|
+
pushYield: boolean;
|
|
640
|
+
/** Seconds after which unclaimed funds may be reclaimed. At least `1`. */
|
|
641
|
+
reclaimAfter: number;
|
|
642
|
+
/** Note recorded with the coupon payment. */
|
|
643
|
+
memo: string;
|
|
613
644
|
}
|
|
614
645
|
interface ClaimYieldParams {
|
|
615
646
|
tokenId: string;
|
|
616
|
-
chainId:
|
|
617
|
-
/** HD address index of the claiming investor. */
|
|
647
|
+
chainId: TokenChainId;
|
|
648
|
+
/** HD address index of the claiming investor. At least `1`. */
|
|
618
649
|
investorAddressIndex: number;
|
|
619
|
-
/** Distribution snapshot to claim against. */
|
|
650
|
+
/** Distribution snapshot to claim against. At least `1`. */
|
|
620
651
|
snapshotId: number;
|
|
621
652
|
}
|
|
622
653
|
interface RedeemPrincipalParams {
|
|
623
654
|
tokenId: string;
|
|
624
|
-
chainId:
|
|
625
|
-
|
|
626
|
-
|
|
655
|
+
chainId: TokenChainId;
|
|
656
|
+
}
|
|
657
|
+
/** Result of {@link TokenizationResource.redeemPrincipal} — one transaction per redemption payout. */
|
|
658
|
+
interface RedeemPrincipalResult {
|
|
659
|
+
tokenId: string;
|
|
660
|
+
operationRef: string;
|
|
661
|
+
transactionIds: string[];
|
|
662
|
+
txHashes: string[];
|
|
663
|
+
}
|
|
664
|
+
interface ReclaimUnclaimedYieldParams {
|
|
665
|
+
tokenId: string;
|
|
666
|
+
chainId: TokenChainId;
|
|
667
|
+
/** Distribution snapshot to reclaim unclaimed funds from. A whole number, at least `1`. */
|
|
668
|
+
snapshotId: number;
|
|
669
|
+
}
|
|
670
|
+
/** Result of {@link TokenizationResource.reclaimUnclaimedYield}. */
|
|
671
|
+
interface ReclaimUnclaimedYieldResult {
|
|
672
|
+
tokenId: string;
|
|
673
|
+
/** Snapshot id, as a numeric string. */
|
|
674
|
+
snapshotId: string;
|
|
675
|
+
/** Amount reclaimed, as a decimal string. */
|
|
676
|
+
reclaimed: string;
|
|
677
|
+
operationRef: string;
|
|
678
|
+
txHash: string;
|
|
627
679
|
}
|
|
628
|
-
/** Result of
|
|
680
|
+
/** Result of {@link TokenizationResource.claimYield}. */
|
|
629
681
|
interface YieldTxResult {
|
|
630
682
|
txHash: string;
|
|
631
683
|
}
|
|
632
|
-
/** Result of
|
|
684
|
+
/** Result of {@link TokenizationResource.distributeYield} / {@link TokenizationResource.payCoupon}. */
|
|
633
685
|
interface YieldOperationResult {
|
|
686
|
+
tokenId: string;
|
|
634
687
|
operationRef: string;
|
|
688
|
+
transactionId: string;
|
|
635
689
|
txHash: string;
|
|
636
690
|
}
|
|
637
691
|
|
|
638
692
|
/**
|
|
639
693
|
* The Tokenization service — issues and manages tokenized real-world assets: deployment,
|
|
640
694
|
* mint/burn/transfer, wallet whitelisting, holder balances, and the yield lifecycle
|
|
641
|
-
* (rate updates, coupon payments, claims,
|
|
642
|
-
* tokens.
|
|
695
|
+
* (rate updates, coupon payments, claims, principal redemption, and reclaiming unclaimed
|
|
696
|
+
* payouts) for `YIELD_BEARING` tokens.
|
|
643
697
|
*/
|
|
644
698
|
declare class TokenizationResource extends APIResource {
|
|
645
699
|
/**
|
|
@@ -683,15 +737,20 @@ declare class TokenizationResource extends APIResource {
|
|
|
683
737
|
/** Returns token transactions, optionally filtered by token. */
|
|
684
738
|
listTokenTransactions(params?: ListTokenTransactionsParams, overrides?: RequestOverrides): Promise<Page<TokenTransactionRecord>>;
|
|
685
739
|
/** Updates the annual yield rate for a yield-bearing token. */
|
|
686
|
-
updateYield(params: UpdateTokenYieldParams, overrides?: RequestOverrides): Promise<
|
|
740
|
+
updateYield(params: UpdateTokenYieldParams, overrides?: RequestOverrides): Promise<UpdateYieldResult>;
|
|
687
741
|
/** Funds and distributes a yield payout to holders. Unclaimed funds may be reclaimed after `reclaimAfter`. */
|
|
688
742
|
distributeYield(params: DistributeYieldParams, overrides?: IdempotentRequestOverrides): Promise<YieldOperationResult>;
|
|
689
743
|
/** Pays the scheduled coupon for a yield-bearing token. Set `pushYield` to push funds rather than let investors claim. */
|
|
690
744
|
payCoupon(params: PayCouponParams, overrides?: IdempotentRequestOverrides): Promise<YieldOperationResult>;
|
|
691
745
|
/** Claims an investor's yield for a given distribution snapshot. */
|
|
692
746
|
claimYield(params: ClaimYieldParams, overrides?: IdempotentRequestOverrides): Promise<YieldTxResult>;
|
|
693
|
-
/** Redeems principal to holders at maturity.
|
|
694
|
-
redeemPrincipal(params: RedeemPrincipalParams, overrides?: IdempotentRequestOverrides): Promise<
|
|
747
|
+
/** Redeems principal to holders at maturity. */
|
|
748
|
+
redeemPrincipal(params: RedeemPrincipalParams, overrides?: IdempotentRequestOverrides): Promise<RedeemPrincipalResult>;
|
|
749
|
+
/**
|
|
750
|
+
* Returns a snapshot's unclaimed yield to the issuer once its `reclaimAfter` window has
|
|
751
|
+
* passed. An `Idempotency-Key` is generated per call unless you pass your own.
|
|
752
|
+
*/
|
|
753
|
+
reclaimUnclaimedYield(params: ReclaimUnclaimedYieldParams, overrides?: IdempotentRequestOverrides): Promise<ReclaimUnclaimedYieldResult>;
|
|
695
754
|
}
|
|
696
755
|
|
|
697
756
|
type SubscriptionStatus = LooseUnion<"active" | "paused" | "deleted">;
|
|
@@ -946,4 +1005,4 @@ declare function verifyIndexerWebhookSignature(options: VerifyIndexerWebhookOpti
|
|
|
946
1005
|
/** Generates a UUIDv4 suitable for use as an `Idempotency-Key` header value. */
|
|
947
1006
|
declare function generateIdempotencyKey(): string;
|
|
948
1007
|
|
|
949
|
-
export { AuthenticationError, BadRequestError, type BurnTokenParams, type Chain, type ChainType, type ClaimYieldParams, ConflictError, type CreateSubscriptionParams, type CreateTokenParams, type DeactivateWalletParams, type DistributeYieldParams, type EventCatalogEntry, type EventFamily, type EventKind, type FlatPaginatedResponse, type GenerateWalletsParams, type GeneratedWallet, type GetTokenHoldersParams, type GetTransactionHistoryParams, type GetWalletByAddressIndexParams, type GetWalletByAddressParams, type GetWalletCountParams, type HdEnabledStatus, type HttpMethod, type IdempotentRequestOverrides, IndexerResource, type IndexerSubscription, type IndexerSubscriptionWithSecret, InfraAPIError, InfraAuthTokenError, InfraClient, type InfraClientOptions, InfraConnectionError, InfraConnectionTimeoutError, InfraError, type InitiateTransferParams, InternalServerError, type ListEventCatalogParams, type ListSubscriptionsParams, type ListTokenTransactionsParams, type ListTokensParams, type ListWalletsParams, type LooseUnion, type MetaPaginatedResponse, type MintTokenParams, type Network, NotFoundError, type OffsetPaginatedResponse, Page, type PayCouponParams, PaymentRequiredError, PermissionDeniedError, type QueryValue, RateLimitError, type RedeemPrincipalParams, type RegisterTokenWalletParams, type RegisterTokenWalletResult, type RequestOptions, type RequestOverrides, ServiceUnavailableError, type SignTransactionParams, type SignTransactionRequest, type SignedTransactionResult, type SubscriptionStatus, type SupportedChain, type TokenChainDeployment, type TokenDeploymentResult, type TokenDetail, type TokenHolder, type TokenOperationResult, type TokenStatus, type TokenSummary, type TokenTransactionRecord, type TokenTransactionStatus, type TokenTransactionType, type TokenTransferResult, type TokenType, TokenizationResource, type TransactionStatus, type TransferTokenParams, UnknownAPIError, UnprocessableEntityError, type UpdateSubscriptionParams, type UpdateTokenYieldParams, type VerifyIndexerWebhookOptions, type VerifyWalletWebhookOptions, type Wallet, type WalletBalance, type WalletCount, WalletResource, type WalletTransaction, WebhookSignatureVerificationError, type YieldOperationResult, type YieldParams, type YieldTxResult, generateIdempotencyKey, verifyIndexerWebhookSignature, verifyWalletWebhookSignature };
|
|
1008
|
+
export { type AssetClass, AuthenticationError, BadRequestError, type BurnTokenParams, type Chain, type ChainType, type ClaimYieldParams, ConflictError, type CreateSubscriptionParams, type CreateTokenParams, type DeactivateWalletParams, type DistributeYieldParams, type EventCatalogEntry, type EventFamily, type EventKind, type FlatPaginatedResponse, type ForcedTransferTokenParams, type GenerateWalletsParams, type GeneratedWallet, type GetTokenHoldersParams, type GetTransactionHistoryParams, type GetWalletBalanceParams, type GetWalletByAddressIndexParams, type GetWalletByAddressParams, type GetWalletCountParams, type HdEnabledStatus, type HttpMethod, type IdempotentRequestOverrides, IndexerResource, type IndexerSubscription, type IndexerSubscriptionWithSecret, InfraAPIError, InfraAuthTokenError, InfraClient, type InfraClientOptions, InfraConnectionError, InfraConnectionTimeoutError, InfraError, type InitiateTransferParams, InternalServerError, type ListEventCatalogParams, type ListSubscriptionsParams, type ListTokenTransactionsParams, type ListTokensParams, type ListWalletsParams, type LooseUnion, type MetaPaginatedResponse, type MintTokenParams, type Network, NotFoundError, type OffsetPaginatedResponse, Page, type PayCouponParams, PaymentRequiredError, PermissionDeniedError, type QueryValue, RateLimitError, type ReclaimUnclaimedYieldParams, type ReclaimUnclaimedYieldResult, type RedeemPrincipalParams, type RedeemPrincipalResult, type RegisterTokenWalletParams, type RegisterTokenWalletResult, type RequestOptions, type RequestOverrides, ServiceUnavailableError, type SignTransactionParams, type SignTransactionRequest, type SignedTransactionResult, type SubscriptionStatus, type SupportedChain, type TokenChainDeployment, type TokenChainId, type TokenDeploymentResult, type TokenDetail, type TokenHolder, type TokenOperationResult, type TokenStatus, type TokenSummary, type TokenTransactionRecord, type TokenTransactionStatus, type TokenTransactionType, type TokenTransferResult, type TokenType, type TokenWalletBalance, TokenizationResource, type TransactionStatus, type TransferTokenParams, UnknownAPIError, UnprocessableEntityError, type UpdateSubscriptionParams, type UpdateTokenYieldParams, type UpdateYieldResult, type VerifyIndexerWebhookOptions, type VerifyWalletWebhookOptions, type Wallet, type WalletBalance, type WalletCount, WalletResource, type WalletTransaction, WebhookSignatureVerificationError, type YieldDayCount, type YieldOperationResult, type YieldParams, type YieldPayoutToken, type YieldTxResult, generateIdempotencyKey, verifyIndexerWebhookSignature, verifyWalletWebhookSignature };
|
package/dist/index.js
CHANGED
|
@@ -742,7 +742,7 @@ var TokenizationResource = class extends APIResource {
|
|
|
742
742
|
...rest
|
|
743
743
|
});
|
|
744
744
|
}
|
|
745
|
-
/** Redeems principal to holders at maturity.
|
|
745
|
+
/** Redeems principal to holders at maturity. */
|
|
746
746
|
async redeemPrincipal(params, overrides = {}) {
|
|
747
747
|
const { idempotencyKey, ...rest } = overrides;
|
|
748
748
|
return this.client.request({
|
|
@@ -753,6 +753,20 @@ var TokenizationResource = class extends APIResource {
|
|
|
753
753
|
...rest
|
|
754
754
|
});
|
|
755
755
|
}
|
|
756
|
+
/**
|
|
757
|
+
* Returns a snapshot's unclaimed yield to the issuer once its `reclaimAfter` window has
|
|
758
|
+
* passed. An `Idempotency-Key` is generated per call unless you pass your own.
|
|
759
|
+
*/
|
|
760
|
+
async reclaimUnclaimedYield(params, overrides = {}) {
|
|
761
|
+
const { idempotencyKey, ...rest } = overrides;
|
|
762
|
+
return this.client.request({
|
|
763
|
+
method: "POST",
|
|
764
|
+
path: "/v1/tokens/yield/reclaim",
|
|
765
|
+
body: params,
|
|
766
|
+
idempotencyKey: idempotencyKey ?? generateIdempotencyKey(),
|
|
767
|
+
...rest
|
|
768
|
+
});
|
|
769
|
+
}
|
|
756
770
|
};
|
|
757
771
|
|
|
758
772
|
// src/resources/indexer/index.ts
|