@t2000/sdk 5.6.1 → 5.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +30 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +33 -5
- package/dist/index.d.ts +33 -5
- package/dist/index.js +27 -11
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -829,15 +829,43 @@ declare const AUDRIC_PARENT_NAME = "audric.sui";
|
|
|
829
829
|
* by the address that owns this NFT. Mainnet only.
|
|
830
830
|
*/
|
|
831
831
|
declare const AUDRIC_PARENT_NFT_ID = "0x070456e283ec988b6302bdd6cc5172bbdcb709998cf116586fb98d19b0870198";
|
|
832
|
+
/**
|
|
833
|
+
* A SuiNS parent under which leaf subnames are minted: the registered SLD name
|
|
834
|
+
* + the on-chain `SuinsRegistration` NFT id the minting service must own/sign.
|
|
835
|
+
*
|
|
836
|
+
* Added 2026-06-29 (Agent ID Phase B, gate 2) to let the same leaf machinery
|
|
837
|
+
* serve a SECOND namespace — `agent-id.sui` for Agent ID handles — without
|
|
838
|
+
* forking it. Audric stays the default so every existing caller is unchanged.
|
|
839
|
+
*/
|
|
840
|
+
interface SuinsParent {
|
|
841
|
+
name: string;
|
|
842
|
+
nftId: string;
|
|
843
|
+
}
|
|
844
|
+
/** The Audric consumer-handle parent (`<label>.audric.sui` → `@audric`). */
|
|
845
|
+
declare const AUDRIC_PARENT: SuinsParent;
|
|
846
|
+
/** The Agent ID parent (`<label>.agent-id.sui` → `@agent-id`). Distinct from
|
|
847
|
+
* audric.sui on purpose (infra/agent registry vs consumer brand).
|
|
848
|
+
*
|
|
849
|
+
* Registered on SuiNS mainnet 2026-06-29; the `SuinsRegistration` NFT
|
|
850
|
+
* (`0xc8c1…d5d1f`) is held by the custody address
|
|
851
|
+
* `0x6988a92d…30e4532`, which signs leaf mints + pays their gas. Override via
|
|
852
|
+
* `AGENT_ID_PARENT_NFT_ID` for testnet/dev. */
|
|
853
|
+
declare const AGENT_ID_PARENT_NAME = "agent-id.sui";
|
|
854
|
+
declare const AGENT_ID_PARENT_NFT_ID: string;
|
|
855
|
+
declare const AGENT_ID_PARENT: SuinsParent;
|
|
832
856
|
interface BuildAddLeafParams {
|
|
833
857
|
/** Bare label, e.g. `'alice'` — NOT the full `'alice.audric.sui'` path. */
|
|
834
858
|
label: string;
|
|
835
859
|
/** Sui address the leaf will resolve to (typically the user's zkLogin wallet). */
|
|
836
860
|
targetAddress: string;
|
|
861
|
+
/** Parent to mint under. Defaults to Audric (back-compat). */
|
|
862
|
+
parent?: SuinsParent;
|
|
837
863
|
}
|
|
838
864
|
interface BuildRevokeLeafParams {
|
|
839
865
|
/** Bare label of the leaf to revoke. */
|
|
840
866
|
label: string;
|
|
867
|
+
/** Parent the leaf lives under. Defaults to Audric (back-compat). */
|
|
868
|
+
parent?: SuinsParent;
|
|
841
869
|
}
|
|
842
870
|
type LabelValidationResult = {
|
|
843
871
|
valid: true;
|
|
@@ -872,7 +900,7 @@ declare function validateLabel(label: unknown): LabelValidationResult;
|
|
|
872
900
|
* Throws synchronously if `label` violates protocol rules or `targetAddress` is
|
|
873
901
|
* not a valid Sui address — fail-closed before bytes are built.
|
|
874
902
|
*/
|
|
875
|
-
declare function buildAddLeafTx(suinsClient: SuinsClient, { label, targetAddress }: BuildAddLeafParams): Transaction;
|
|
903
|
+
declare function buildAddLeafTx(suinsClient: SuinsClient, { label, targetAddress, parent }: BuildAddLeafParams): Transaction;
|
|
876
904
|
/**
|
|
877
905
|
* Build an unsigned PTB that revokes a `<label>.audric.sui` leaf subname.
|
|
878
906
|
*
|
|
@@ -886,7 +914,7 @@ declare function buildAddLeafTx(suinsClient: SuinsClient, { label, targetAddress
|
|
|
886
914
|
* The mainnet smoke test (2026-05-01) confirmed revocation gas cost is roughly
|
|
887
915
|
* negative net (storage rebate exceeds computation) — see RUNBOOK §4.
|
|
888
916
|
*/
|
|
889
|
-
declare function buildRevokeLeafTx(suinsClient: SuinsClient, { label }: BuildRevokeLeafParams): Transaction;
|
|
917
|
+
declare function buildRevokeLeafTx(suinsClient: SuinsClient, { label, parent }: BuildRevokeLeafParams): Transaction;
|
|
890
918
|
/**
|
|
891
919
|
* Convenience: turn a bare label into the full `<label>.audric.sui` path.
|
|
892
920
|
*
|
|
@@ -905,7 +933,7 @@ declare function buildRevokeLeafTx(suinsClient: SuinsClient, { label }: BuildRev
|
|
|
905
933
|
* mainnet 2026-05-08 PF1) — `displayHandle()` is purely a render-layer
|
|
906
934
|
* choice, not a backend storage change.
|
|
907
935
|
*/
|
|
908
|
-
declare function fullHandle(label: string): string;
|
|
936
|
+
declare function fullHandle(label: string, parentName?: string): string;
|
|
909
937
|
/**
|
|
910
938
|
* SuiNS V2 short-form display alias. `displayHandle('alice')` →
|
|
911
939
|
* `'alice@audric'`. Use for chat narration, permission cards, receipts,
|
|
@@ -926,6 +954,6 @@ declare function fullHandle(label: string): string;
|
|
|
926
954
|
* for canonicalization in the input parser (which is a no-op since
|
|
927
955
|
* SuiNS RPC accepts both — kept available for future-proofing).
|
|
928
956
|
*/
|
|
929
|
-
declare function displayHandle(label: string): string;
|
|
957
|
+
declare function displayHandle(label: string, parentName?: string): string;
|
|
930
958
|
|
|
931
|
-
export { AUDRIC_PARENT_NAME, AUDRIC_PARENT_NFT_ID, type AppenderContext, BalanceResponse, type BuildAddLeafParams, type BuildRevokeLeafParams, type ComposeTxOptions, type ComposeTxResult, type DailySpend, DepositInfo, InvalidAddressError, type LabelValidationResult, type LimitAssertInput, LimitEnforcer, LimitExceededError, type LimitKind, type LimitOperation, type LimitsConfig, type LimitsFile, type NormalizedAddress, OverlayFeeConfig, PayOptions, PayResult, PaymentRequest, SPONSORED_PYTH_DEPENDENT_PROVIDERS, SUINS_NAME_REGEX, SUI_ADDRESS_REGEX, SUI_ADDRESS_STRICT_REGEX, SendResult, type SendTransferInput, SendableAsset, type StepPreview, SuinsNotRegisteredError, SuinsRpcError, SupportedAsset, type SwapExecuteInput, SwapQuoteResult, SwapResult, SwapRouteResult, T2000, T2000Error, T2000Options, TransactionRecord, TransactionSigner, WRITE_APPENDER_REGISTRY, type WriteStep, type WriteToolName, ZkLoginProof, approxUsdValue, assertLimitConfig, buildAddLeafTx, buildRevokeLeafTx, clearLimits, composeTx, dailySpentToday, deriveAllowedAddressesFromPtb, displayHandle, exportPrivateKey, fullHandle, generateKeypair, getAddress, getLimits, getSponsoredSwapProviders, getSwapQuote, hasLimits, keypairFromPrivateKey, loadKey, looksLikeSuiNs, normalizeAddressInput, queryBalance, readLimitsFile, recordDailySpend, resolveAddressToSuinsViaRpc, resolveSuinsViaRpc, saveBech32, saveKey, setLimits, validateLabel, walletExists, writeLimitsFile };
|
|
959
|
+
export { AGENT_ID_PARENT, AGENT_ID_PARENT_NAME, AGENT_ID_PARENT_NFT_ID, AUDRIC_PARENT, AUDRIC_PARENT_NAME, AUDRIC_PARENT_NFT_ID, type AppenderContext, BalanceResponse, type BuildAddLeafParams, type BuildRevokeLeafParams, type ComposeTxOptions, type ComposeTxResult, type DailySpend, DepositInfo, InvalidAddressError, type LabelValidationResult, type LimitAssertInput, LimitEnforcer, LimitExceededError, type LimitKind, type LimitOperation, type LimitsConfig, type LimitsFile, type NormalizedAddress, OverlayFeeConfig, PayOptions, PayResult, PaymentRequest, SPONSORED_PYTH_DEPENDENT_PROVIDERS, SUINS_NAME_REGEX, SUI_ADDRESS_REGEX, SUI_ADDRESS_STRICT_REGEX, SendResult, type SendTransferInput, SendableAsset, type StepPreview, SuinsNotRegisteredError, type SuinsParent, SuinsRpcError, SupportedAsset, type SwapExecuteInput, SwapQuoteResult, SwapResult, SwapRouteResult, T2000, T2000Error, T2000Options, TransactionRecord, TransactionSigner, WRITE_APPENDER_REGISTRY, type WriteStep, type WriteToolName, ZkLoginProof, approxUsdValue, assertLimitConfig, buildAddLeafTx, buildRevokeLeafTx, clearLimits, composeTx, dailySpentToday, deriveAllowedAddressesFromPtb, displayHandle, exportPrivateKey, fullHandle, generateKeypair, getAddress, getLimits, getSponsoredSwapProviders, getSwapQuote, hasLimits, keypairFromPrivateKey, loadKey, looksLikeSuiNs, normalizeAddressInput, queryBalance, readLimitsFile, recordDailySpend, resolveAddressToSuinsViaRpc, resolveSuinsViaRpc, saveBech32, saveKey, setLimits, validateLabel, walletExists, writeLimitsFile };
|
package/dist/index.d.ts
CHANGED
|
@@ -829,15 +829,43 @@ declare const AUDRIC_PARENT_NAME = "audric.sui";
|
|
|
829
829
|
* by the address that owns this NFT. Mainnet only.
|
|
830
830
|
*/
|
|
831
831
|
declare const AUDRIC_PARENT_NFT_ID = "0x070456e283ec988b6302bdd6cc5172bbdcb709998cf116586fb98d19b0870198";
|
|
832
|
+
/**
|
|
833
|
+
* A SuiNS parent under which leaf subnames are minted: the registered SLD name
|
|
834
|
+
* + the on-chain `SuinsRegistration` NFT id the minting service must own/sign.
|
|
835
|
+
*
|
|
836
|
+
* Added 2026-06-29 (Agent ID Phase B, gate 2) to let the same leaf machinery
|
|
837
|
+
* serve a SECOND namespace — `agent-id.sui` for Agent ID handles — without
|
|
838
|
+
* forking it. Audric stays the default so every existing caller is unchanged.
|
|
839
|
+
*/
|
|
840
|
+
interface SuinsParent {
|
|
841
|
+
name: string;
|
|
842
|
+
nftId: string;
|
|
843
|
+
}
|
|
844
|
+
/** The Audric consumer-handle parent (`<label>.audric.sui` → `@audric`). */
|
|
845
|
+
declare const AUDRIC_PARENT: SuinsParent;
|
|
846
|
+
/** The Agent ID parent (`<label>.agent-id.sui` → `@agent-id`). Distinct from
|
|
847
|
+
* audric.sui on purpose (infra/agent registry vs consumer brand).
|
|
848
|
+
*
|
|
849
|
+
* Registered on SuiNS mainnet 2026-06-29; the `SuinsRegistration` NFT
|
|
850
|
+
* (`0xc8c1…d5d1f`) is held by the custody address
|
|
851
|
+
* `0x6988a92d…30e4532`, which signs leaf mints + pays their gas. Override via
|
|
852
|
+
* `AGENT_ID_PARENT_NFT_ID` for testnet/dev. */
|
|
853
|
+
declare const AGENT_ID_PARENT_NAME = "agent-id.sui";
|
|
854
|
+
declare const AGENT_ID_PARENT_NFT_ID: string;
|
|
855
|
+
declare const AGENT_ID_PARENT: SuinsParent;
|
|
832
856
|
interface BuildAddLeafParams {
|
|
833
857
|
/** Bare label, e.g. `'alice'` — NOT the full `'alice.audric.sui'` path. */
|
|
834
858
|
label: string;
|
|
835
859
|
/** Sui address the leaf will resolve to (typically the user's zkLogin wallet). */
|
|
836
860
|
targetAddress: string;
|
|
861
|
+
/** Parent to mint under. Defaults to Audric (back-compat). */
|
|
862
|
+
parent?: SuinsParent;
|
|
837
863
|
}
|
|
838
864
|
interface BuildRevokeLeafParams {
|
|
839
865
|
/** Bare label of the leaf to revoke. */
|
|
840
866
|
label: string;
|
|
867
|
+
/** Parent the leaf lives under. Defaults to Audric (back-compat). */
|
|
868
|
+
parent?: SuinsParent;
|
|
841
869
|
}
|
|
842
870
|
type LabelValidationResult = {
|
|
843
871
|
valid: true;
|
|
@@ -872,7 +900,7 @@ declare function validateLabel(label: unknown): LabelValidationResult;
|
|
|
872
900
|
* Throws synchronously if `label` violates protocol rules or `targetAddress` is
|
|
873
901
|
* not a valid Sui address — fail-closed before bytes are built.
|
|
874
902
|
*/
|
|
875
|
-
declare function buildAddLeafTx(suinsClient: SuinsClient, { label, targetAddress }: BuildAddLeafParams): Transaction;
|
|
903
|
+
declare function buildAddLeafTx(suinsClient: SuinsClient, { label, targetAddress, parent }: BuildAddLeafParams): Transaction;
|
|
876
904
|
/**
|
|
877
905
|
* Build an unsigned PTB that revokes a `<label>.audric.sui` leaf subname.
|
|
878
906
|
*
|
|
@@ -886,7 +914,7 @@ declare function buildAddLeafTx(suinsClient: SuinsClient, { label, targetAddress
|
|
|
886
914
|
* The mainnet smoke test (2026-05-01) confirmed revocation gas cost is roughly
|
|
887
915
|
* negative net (storage rebate exceeds computation) — see RUNBOOK §4.
|
|
888
916
|
*/
|
|
889
|
-
declare function buildRevokeLeafTx(suinsClient: SuinsClient, { label }: BuildRevokeLeafParams): Transaction;
|
|
917
|
+
declare function buildRevokeLeafTx(suinsClient: SuinsClient, { label, parent }: BuildRevokeLeafParams): Transaction;
|
|
890
918
|
/**
|
|
891
919
|
* Convenience: turn a bare label into the full `<label>.audric.sui` path.
|
|
892
920
|
*
|
|
@@ -905,7 +933,7 @@ declare function buildRevokeLeafTx(suinsClient: SuinsClient, { label }: BuildRev
|
|
|
905
933
|
* mainnet 2026-05-08 PF1) — `displayHandle()` is purely a render-layer
|
|
906
934
|
* choice, not a backend storage change.
|
|
907
935
|
*/
|
|
908
|
-
declare function fullHandle(label: string): string;
|
|
936
|
+
declare function fullHandle(label: string, parentName?: string): string;
|
|
909
937
|
/**
|
|
910
938
|
* SuiNS V2 short-form display alias. `displayHandle('alice')` →
|
|
911
939
|
* `'alice@audric'`. Use for chat narration, permission cards, receipts,
|
|
@@ -926,6 +954,6 @@ declare function fullHandle(label: string): string;
|
|
|
926
954
|
* for canonicalization in the input parser (which is a no-op since
|
|
927
955
|
* SuiNS RPC accepts both — kept available for future-proofing).
|
|
928
956
|
*/
|
|
929
|
-
declare function displayHandle(label: string): string;
|
|
957
|
+
declare function displayHandle(label: string, parentName?: string): string;
|
|
930
958
|
|
|
931
|
-
export { AUDRIC_PARENT_NAME, AUDRIC_PARENT_NFT_ID, type AppenderContext, BalanceResponse, type BuildAddLeafParams, type BuildRevokeLeafParams, type ComposeTxOptions, type ComposeTxResult, type DailySpend, DepositInfo, InvalidAddressError, type LabelValidationResult, type LimitAssertInput, LimitEnforcer, LimitExceededError, type LimitKind, type LimitOperation, type LimitsConfig, type LimitsFile, type NormalizedAddress, OverlayFeeConfig, PayOptions, PayResult, PaymentRequest, SPONSORED_PYTH_DEPENDENT_PROVIDERS, SUINS_NAME_REGEX, SUI_ADDRESS_REGEX, SUI_ADDRESS_STRICT_REGEX, SendResult, type SendTransferInput, SendableAsset, type StepPreview, SuinsNotRegisteredError, SuinsRpcError, SupportedAsset, type SwapExecuteInput, SwapQuoteResult, SwapResult, SwapRouteResult, T2000, T2000Error, T2000Options, TransactionRecord, TransactionSigner, WRITE_APPENDER_REGISTRY, type WriteStep, type WriteToolName, ZkLoginProof, approxUsdValue, assertLimitConfig, buildAddLeafTx, buildRevokeLeafTx, clearLimits, composeTx, dailySpentToday, deriveAllowedAddressesFromPtb, displayHandle, exportPrivateKey, fullHandle, generateKeypair, getAddress, getLimits, getSponsoredSwapProviders, getSwapQuote, hasLimits, keypairFromPrivateKey, loadKey, looksLikeSuiNs, normalizeAddressInput, queryBalance, readLimitsFile, recordDailySpend, resolveAddressToSuinsViaRpc, resolveSuinsViaRpc, saveBech32, saveKey, setLimits, validateLabel, walletExists, writeLimitsFile };
|
|
959
|
+
export { AGENT_ID_PARENT, AGENT_ID_PARENT_NAME, AGENT_ID_PARENT_NFT_ID, AUDRIC_PARENT, AUDRIC_PARENT_NAME, AUDRIC_PARENT_NFT_ID, type AppenderContext, BalanceResponse, type BuildAddLeafParams, type BuildRevokeLeafParams, type ComposeTxOptions, type ComposeTxResult, type DailySpend, DepositInfo, InvalidAddressError, type LabelValidationResult, type LimitAssertInput, LimitEnforcer, LimitExceededError, type LimitKind, type LimitOperation, type LimitsConfig, type LimitsFile, type NormalizedAddress, OverlayFeeConfig, PayOptions, PayResult, PaymentRequest, SPONSORED_PYTH_DEPENDENT_PROVIDERS, SUINS_NAME_REGEX, SUI_ADDRESS_REGEX, SUI_ADDRESS_STRICT_REGEX, SendResult, type SendTransferInput, SendableAsset, type StepPreview, SuinsNotRegisteredError, type SuinsParent, SuinsRpcError, SupportedAsset, type SwapExecuteInput, SwapQuoteResult, SwapResult, SwapRouteResult, T2000, T2000Error, T2000Options, TransactionRecord, TransactionSigner, WRITE_APPENDER_REGISTRY, type WriteStep, type WriteToolName, ZkLoginProof, approxUsdValue, assertLimitConfig, buildAddLeafTx, buildRevokeLeafTx, clearLimits, composeTx, dailySpentToday, deriveAllowedAddressesFromPtb, displayHandle, exportPrivateKey, fullHandle, generateKeypair, getAddress, getLimits, getSponsoredSwapProviders, getSwapQuote, hasLimits, keypairFromPrivateKey, loadKey, looksLikeSuiNs, normalizeAddressInput, queryBalance, readLimitsFile, recordDailySpend, resolveAddressToSuinsViaRpc, resolveSuinsViaRpc, saveBech32, saveKey, setLimits, validateLabel, walletExists, writeLimitsFile };
|
package/dist/index.js
CHANGED
|
@@ -2826,6 +2826,16 @@ init_cetus_swap();
|
|
|
2826
2826
|
init_token_registry();
|
|
2827
2827
|
var AUDRIC_PARENT_NAME = "audric.sui";
|
|
2828
2828
|
var AUDRIC_PARENT_NFT_ID = "0x070456e283ec988b6302bdd6cc5172bbdcb709998cf116586fb98d19b0870198";
|
|
2829
|
+
var AUDRIC_PARENT = {
|
|
2830
|
+
name: AUDRIC_PARENT_NAME,
|
|
2831
|
+
nftId: AUDRIC_PARENT_NFT_ID
|
|
2832
|
+
};
|
|
2833
|
+
var AGENT_ID_PARENT_NAME = "agent-id.sui";
|
|
2834
|
+
var AGENT_ID_PARENT_NFT_ID = process.env.AGENT_ID_PARENT_NFT_ID ?? "0xc8c13f5b5a6d4c47c04877014794f65e67e2745d3bfa089b736eb54b0ebd5d1f";
|
|
2835
|
+
var AGENT_ID_PARENT = {
|
|
2836
|
+
name: AGENT_ID_PARENT_NAME,
|
|
2837
|
+
nftId: AGENT_ID_PARENT_NFT_ID
|
|
2838
|
+
};
|
|
2829
2839
|
var LABEL_PATTERN = /^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/;
|
|
2830
2840
|
function validateLabel(label) {
|
|
2831
2841
|
if (typeof label !== "string") {
|
|
@@ -2848,7 +2858,7 @@ function validateLabel(label) {
|
|
|
2848
2858
|
}
|
|
2849
2859
|
return { valid: true };
|
|
2850
2860
|
}
|
|
2851
|
-
function buildAddLeafTx(suinsClient, { label, targetAddress }) {
|
|
2861
|
+
function buildAddLeafTx(suinsClient, { label, targetAddress, parent = AUDRIC_PARENT }) {
|
|
2852
2862
|
const labelCheck = validateLabel(label);
|
|
2853
2863
|
if (!labelCheck.valid) {
|
|
2854
2864
|
throw new Error(`buildAddLeafTx: invalid label "${label}" \u2014 ${labelCheck.reason}`);
|
|
@@ -2856,39 +2866,45 @@ function buildAddLeafTx(suinsClient, { label, targetAddress }) {
|
|
|
2856
2866
|
if (typeof targetAddress !== "string" || !isValidSuiAddress(normalizeSuiAddress(targetAddress))) {
|
|
2857
2867
|
throw new Error(`buildAddLeafTx: invalid targetAddress "${targetAddress}"`);
|
|
2858
2868
|
}
|
|
2869
|
+
if (!parent.nftId) {
|
|
2870
|
+
throw new Error(`buildAddLeafTx: parent NFT id not configured for "${parent.name}"`);
|
|
2871
|
+
}
|
|
2859
2872
|
const tx = new Transaction();
|
|
2860
2873
|
const suinsTx = new SuinsTransaction(suinsClient, tx);
|
|
2861
2874
|
suinsTx.createLeafSubName({
|
|
2862
|
-
parentNft:
|
|
2863
|
-
name: `${label}.${
|
|
2875
|
+
parentNft: parent.nftId,
|
|
2876
|
+
name: `${label}.${parent.name}`,
|
|
2864
2877
|
targetAddress: normalizeSuiAddress(targetAddress)
|
|
2865
2878
|
});
|
|
2866
2879
|
return tx;
|
|
2867
2880
|
}
|
|
2868
|
-
function buildRevokeLeafTx(suinsClient, { label }) {
|
|
2881
|
+
function buildRevokeLeafTx(suinsClient, { label, parent = AUDRIC_PARENT }) {
|
|
2869
2882
|
const labelCheck = validateLabel(label);
|
|
2870
2883
|
if (!labelCheck.valid) {
|
|
2871
2884
|
throw new Error(`buildRevokeLeafTx: invalid label "${label}" \u2014 ${labelCheck.reason}`);
|
|
2872
2885
|
}
|
|
2886
|
+
if (!parent.nftId) {
|
|
2887
|
+
throw new Error(`buildRevokeLeafTx: parent NFT id not configured for "${parent.name}"`);
|
|
2888
|
+
}
|
|
2873
2889
|
const tx = new Transaction();
|
|
2874
2890
|
const suinsTx = new SuinsTransaction(suinsClient, tx);
|
|
2875
2891
|
suinsTx.removeLeafSubName({
|
|
2876
|
-
parentNft:
|
|
2877
|
-
name: `${label}.${
|
|
2892
|
+
parentNft: parent.nftId,
|
|
2893
|
+
name: `${label}.${parent.name}`
|
|
2878
2894
|
});
|
|
2879
2895
|
return tx;
|
|
2880
2896
|
}
|
|
2881
|
-
function fullHandle(label) {
|
|
2882
|
-
return `${label}.${
|
|
2897
|
+
function fullHandle(label, parentName = AUDRIC_PARENT_NAME) {
|
|
2898
|
+
return `${label}.${parentName}`;
|
|
2883
2899
|
}
|
|
2884
|
-
function displayHandle(label) {
|
|
2885
|
-
const parentDisplay =
|
|
2900
|
+
function displayHandle(label, parentName = AUDRIC_PARENT_NAME) {
|
|
2901
|
+
const parentDisplay = parentName.replace(/\.sui$/, "");
|
|
2886
2902
|
return `${label}@${parentDisplay}`;
|
|
2887
2903
|
}
|
|
2888
2904
|
|
|
2889
2905
|
// src/index.ts
|
|
2890
2906
|
init_preflight();
|
|
2891
2907
|
|
|
2892
|
-
export { AUDRIC_PARENT_NAME, AUDRIC_PARENT_NFT_ID, CETUS_USDC_SUI_POOL, CLOCK_ID, COIN_REGISTRY, DEFAULT_GRPC_URL, DEFAULT_NETWORK, ETH_TYPE, GASLESS_MIN_STABLE_AMOUNT, GASLESS_STABLE_TYPES, GAS_RESERVE_MIN, IKA_TYPE, InvalidAddressError, KNOWN_TARGETS, KeypairSigner, LABEL_PATTERNS, LOFI_TYPE, LimitEnforcer, LimitExceededError, MANIFEST_TYPE, MIST_PER_SUI, NAVX_TYPE, OPERATION_ASSETS, OVERLAY_FEE_RATE, PREFLIGHT_MAX_AMOUNT, PREFLIGHT_OK, SENDABLE_ASSETS, SPONSORED_PYTH_DEPENDENT_PROVIDERS, STABLE_ASSETS, SUINS_NAME_REGEX, SUI_ADDRESS_REGEX, SUI_ADDRESS_STRICT_REGEX, SUI_DECIMALS, SUI_TYPE, SUPPORTED_ASSETS, SuinsNotRegisteredError, SuinsRpcError, T2000, T2000Error, T2000_OVERLAY_FEE_WALLET, TOKEN_MAP, USDC_DECIMALS, USDC_TYPE, USDE_TYPE, USDSUI_TYPE, USDT_TYPE, WAL_TYPE, WBTC_TYPE, WRITE_APPENDER_REGISTRY, ZkLoginSigner, addSendToTx, addSwapToTx, approxUsdValue, assertAllowedAsset, assertLimitConfig, buildAddLeafTx, buildRevokeLeafTx, buildSendTx, buildSwapTx, checkPositiveAmount, checkSuiAddress, classifyAction, classifyLabel, classifyTransaction, clearLimits, composeTx, dailySpentToday, deriveAllowedAddressesFromPtb, deserializeCetusRoute, displayHandle, executeTx, exportPrivateKey, extractAllUserLegs, extractTransferDetails, extractTxCommands, extractTxSender, fallbackLabel, fetchAllCoins, findSwapRoute, formatAssetAmount, formatSui, formatUsd, fullHandle, generateKeypair, getAddress, getCoinMeta, getDecimals, getDecimalsForCoinType, getLimits, getSponsoredSwapProviders, getSuiClient, getSuiGrpcClient, getSwapQuote, hasLimits, isAllowedAsset, isCetusRouteFresh, isInRegistry, keypairFromPrivateKey, loadKey, looksLikeSuiNs, mapMoveAbortCode, mapWalletError, mistToSui, normalizeAddressInput, normalizeAsset, normalizeCoinType, parseSuiRpcTx, payWithMpp, preflightFail, preflightPay, preflightSend, preflightSwap, queryBalance, queryHistory, queryTransaction, rawToStable, rawToUsdc, readLimitsFile, recordDailySpend, refineLendingLabel, resolveAddressToSuinsViaRpc, resolveSuinsViaRpc, resolveSymbol, resolveTokenType, saveBech32, saveKey, selectAndSplitCoin, selectSuiCoin, serializeCetusRoute, setLimits, simulateTransaction, stableToRaw, suiToMist, throwIfSimulationFailed, truncateAddress, usdcToRaw, validateAddress, validateLabel, verifyCetusRouteCoinMatch, walletExists, writeLimitsFile };
|
|
2908
|
+
export { AGENT_ID_PARENT, AGENT_ID_PARENT_NAME, AGENT_ID_PARENT_NFT_ID, AUDRIC_PARENT, AUDRIC_PARENT_NAME, AUDRIC_PARENT_NFT_ID, CETUS_USDC_SUI_POOL, CLOCK_ID, COIN_REGISTRY, DEFAULT_GRPC_URL, DEFAULT_NETWORK, ETH_TYPE, GASLESS_MIN_STABLE_AMOUNT, GASLESS_STABLE_TYPES, GAS_RESERVE_MIN, IKA_TYPE, InvalidAddressError, KNOWN_TARGETS, KeypairSigner, LABEL_PATTERNS, LOFI_TYPE, LimitEnforcer, LimitExceededError, MANIFEST_TYPE, MIST_PER_SUI, NAVX_TYPE, OPERATION_ASSETS, OVERLAY_FEE_RATE, PREFLIGHT_MAX_AMOUNT, PREFLIGHT_OK, SENDABLE_ASSETS, SPONSORED_PYTH_DEPENDENT_PROVIDERS, STABLE_ASSETS, SUINS_NAME_REGEX, SUI_ADDRESS_REGEX, SUI_ADDRESS_STRICT_REGEX, SUI_DECIMALS, SUI_TYPE, SUPPORTED_ASSETS, SuinsNotRegisteredError, SuinsRpcError, T2000, T2000Error, T2000_OVERLAY_FEE_WALLET, TOKEN_MAP, USDC_DECIMALS, USDC_TYPE, USDE_TYPE, USDSUI_TYPE, USDT_TYPE, WAL_TYPE, WBTC_TYPE, WRITE_APPENDER_REGISTRY, ZkLoginSigner, addSendToTx, addSwapToTx, approxUsdValue, assertAllowedAsset, assertLimitConfig, buildAddLeafTx, buildRevokeLeafTx, buildSendTx, buildSwapTx, checkPositiveAmount, checkSuiAddress, classifyAction, classifyLabel, classifyTransaction, clearLimits, composeTx, dailySpentToday, deriveAllowedAddressesFromPtb, deserializeCetusRoute, displayHandle, executeTx, exportPrivateKey, extractAllUserLegs, extractTransferDetails, extractTxCommands, extractTxSender, fallbackLabel, fetchAllCoins, findSwapRoute, formatAssetAmount, formatSui, formatUsd, fullHandle, generateKeypair, getAddress, getCoinMeta, getDecimals, getDecimalsForCoinType, getLimits, getSponsoredSwapProviders, getSuiClient, getSuiGrpcClient, getSwapQuote, hasLimits, isAllowedAsset, isCetusRouteFresh, isInRegistry, keypairFromPrivateKey, loadKey, looksLikeSuiNs, mapMoveAbortCode, mapWalletError, mistToSui, normalizeAddressInput, normalizeAsset, normalizeCoinType, parseSuiRpcTx, payWithMpp, preflightFail, preflightPay, preflightSend, preflightSwap, queryBalance, queryHistory, queryTransaction, rawToStable, rawToUsdc, readLimitsFile, recordDailySpend, refineLendingLabel, resolveAddressToSuinsViaRpc, resolveSuinsViaRpc, resolveSymbol, resolveTokenType, saveBech32, saveKey, selectAndSplitCoin, selectSuiCoin, serializeCetusRoute, setLimits, simulateTransaction, stableToRaw, suiToMist, throwIfSimulationFailed, truncateAddress, usdcToRaw, validateAddress, validateLabel, verifyCetusRouteCoinMatch, walletExists, writeLimitsFile };
|
|
2893
2909
|
//# sourceMappingURL=index.js.map
|
|
2894
2910
|
//# sourceMappingURL=index.js.map
|