@upshiftfinance/sdk 0.3.0 → 0.4.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 +1 -1
- package/lib/abis/KycRegistry.d.ts +109 -0
- package/lib/abis/KycRegistry.js +73 -0
- package/lib/abis/index.d.ts +1 -0
- package/lib/abis/index.js +1 -0
- package/lib/adapters/sui/actions.d.ts +174 -0
- package/lib/adapters/sui/actions.js +382 -0
- package/lib/adapters/sui/getters.d.ts +166 -0
- package/lib/adapters/sui/getters.js +391 -0
- package/lib/adapters/sui/index.d.ts +95 -2
- package/lib/adapters/sui/index.js +92 -2
- package/lib/adapters/sui/targets.d.ts +35 -0
- package/lib/adapters/sui/targets.js +35 -0
- package/lib/core/analytics/method-taxonomy.d.ts +1 -1
- package/lib/core/analytics/method-taxonomy.js +7 -0
- package/lib/core/analytics/version.d.ts +1 -1
- package/lib/core/analytics/version.js +1 -1
- package/lib/core/constants/core.d.ts +5 -0
- package/lib/core/constants/core.js +5 -0
- package/lib/core/constants/kyc.d.ts +9 -0
- package/lib/core/constants/kyc.js +12 -0
- package/lib/core/constants/web3.d.ts +2 -2
- package/lib/core/constants/web3.js +9 -2
- package/lib/core/errors/index.d.ts +77 -1
- package/lib/core/errors/index.js +94 -1
- package/lib/core/fetcher.d.ts +5 -0
- package/lib/core/fetcher.js +1 -1
- package/lib/core/helpers/chain-support.d.ts +2 -2
- package/lib/core/helpers/chain-support.js +3 -3
- package/lib/core/helpers/kyc.d.ts +47 -0
- package/lib/core/helpers/kyc.js +111 -0
- package/lib/core/helpers/revert-decode.js +3 -2
- package/lib/core/index.d.ts +2 -0
- package/lib/core/index.js +2 -0
- package/lib/main.d.ts +31 -3
- package/lib/main.js +32 -0
- package/lib/modules/api/kyc.d.ts +4 -0
- package/lib/modules/api/kyc.js +148 -0
- package/lib/modules/api/main.d.ts +63 -1
- package/lib/modules/api/main.js +64 -0
- package/lib/modules/vaults/getters.d.ts +3 -1
- package/lib/modules/vaults/getters.js +53 -9
- package/lib/modules/vaults/main.d.ts +39 -3
- package/lib/modules/vaults/main.js +79 -5
- package/lib/modules/vaults/types.d.ts +7 -1
- package/lib/modules/vaults/utils.js +4 -1
- package/lib/sdk.d.ts +15131 -14393
- package/lib/types/index.d.ts +1 -0
- package/lib/types/index.js +1 -0
- package/lib/types/kyc.d.ts +61 -0
- package/lib/types/kyc.js +3 -0
- package/lib/types/vaults.d.ts +2 -0
- package/lib/types/webserver.d.ts +5 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -174,7 +174,7 @@ src.ts/
|
|
|
174
174
|
- **EVM Chains**: Ethereum, Arbitrum, Base, BSC, Avalanche, and more — `wagmi/viem` and `ethers` signers supported
|
|
175
175
|
- **Solana**: Native Solana program support with full vault functionality
|
|
176
176
|
- **Stellar**: Stellar vault deposit, redeem, and position queries
|
|
177
|
-
- **Sui**: chain ID `-2`,
|
|
177
|
+
- **Sui**: chain ID `-2`; vault reads (`getVault`, `getVaults`), share positions (`getVaultPositions({ suiWallet })`), deposit and instant redeem (`sdk.sui.vaultDeposit`, `sdk.sui.vaultRedeem`). Pass `sui.packageId`, `sui.originalPackageId` and `sui.registryId` until the SDK ships the contract IDs
|
|
178
178
|
- Unified interface across all chains
|
|
179
179
|
|
|
180
180
|
### Vault Versions
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/** ABI for the Upshift `KycRegistry` (one per chain): wallet status and record reads, the vault entry/exit checks, and the check-side errors. */
|
|
2
|
+
export declare const ABI_KYC_REGISTRY: readonly [{
|
|
3
|
+
readonly type: "function";
|
|
4
|
+
readonly name: "statusOf";
|
|
5
|
+
readonly inputs: readonly [{
|
|
6
|
+
readonly name: "wallet";
|
|
7
|
+
readonly type: "address";
|
|
8
|
+
readonly internalType: "address";
|
|
9
|
+
}];
|
|
10
|
+
readonly outputs: readonly [{
|
|
11
|
+
readonly name: "";
|
|
12
|
+
readonly type: "uint8";
|
|
13
|
+
readonly internalType: "enum IKycRegistry.Status";
|
|
14
|
+
}];
|
|
15
|
+
readonly stateMutability: "view";
|
|
16
|
+
}, {
|
|
17
|
+
readonly type: "function";
|
|
18
|
+
readonly name: "getRecord";
|
|
19
|
+
readonly inputs: readonly [{
|
|
20
|
+
readonly name: "wallet";
|
|
21
|
+
readonly type: "address";
|
|
22
|
+
readonly internalType: "address";
|
|
23
|
+
}];
|
|
24
|
+
readonly outputs: readonly [{
|
|
25
|
+
readonly name: "";
|
|
26
|
+
readonly type: "tuple";
|
|
27
|
+
readonly internalType: "struct IKycRegistry.Record";
|
|
28
|
+
readonly components: readonly [{
|
|
29
|
+
readonly name: "blocked";
|
|
30
|
+
readonly type: "bool";
|
|
31
|
+
readonly internalType: "bool";
|
|
32
|
+
}, {
|
|
33
|
+
readonly name: "verifiedAt";
|
|
34
|
+
readonly type: "uint256";
|
|
35
|
+
readonly internalType: "uint256";
|
|
36
|
+
}, {
|
|
37
|
+
readonly name: "expiresAt";
|
|
38
|
+
readonly type: "uint256";
|
|
39
|
+
readonly internalType: "uint256";
|
|
40
|
+
}, {
|
|
41
|
+
readonly name: "revokedAt";
|
|
42
|
+
readonly type: "uint256";
|
|
43
|
+
readonly internalType: "uint256";
|
|
44
|
+
}];
|
|
45
|
+
}];
|
|
46
|
+
readonly stateMutability: "view";
|
|
47
|
+
}, {
|
|
48
|
+
readonly type: "function";
|
|
49
|
+
readonly name: "canEnter";
|
|
50
|
+
readonly inputs: readonly [{
|
|
51
|
+
readonly name: "addr";
|
|
52
|
+
readonly type: "address";
|
|
53
|
+
readonly internalType: "address";
|
|
54
|
+
}];
|
|
55
|
+
readonly outputs: readonly [{
|
|
56
|
+
readonly name: "ok";
|
|
57
|
+
readonly type: "bool";
|
|
58
|
+
readonly internalType: "bool";
|
|
59
|
+
}];
|
|
60
|
+
readonly stateMutability: "view";
|
|
61
|
+
}, {
|
|
62
|
+
readonly type: "function";
|
|
63
|
+
readonly name: "canExit";
|
|
64
|
+
readonly inputs: readonly [{
|
|
65
|
+
readonly name: "addr";
|
|
66
|
+
readonly type: "address";
|
|
67
|
+
readonly internalType: "address";
|
|
68
|
+
}];
|
|
69
|
+
readonly outputs: readonly [{
|
|
70
|
+
readonly name: "ok";
|
|
71
|
+
readonly type: "bool";
|
|
72
|
+
readonly internalType: "bool";
|
|
73
|
+
}];
|
|
74
|
+
readonly stateMutability: "view";
|
|
75
|
+
}, {
|
|
76
|
+
readonly type: "function";
|
|
77
|
+
readonly name: "isExempt";
|
|
78
|
+
readonly inputs: readonly [{
|
|
79
|
+
readonly name: "addr";
|
|
80
|
+
readonly type: "address";
|
|
81
|
+
readonly internalType: "address";
|
|
82
|
+
}];
|
|
83
|
+
readonly outputs: readonly [{
|
|
84
|
+
readonly name: "";
|
|
85
|
+
readonly type: "bool";
|
|
86
|
+
readonly internalType: "bool";
|
|
87
|
+
}];
|
|
88
|
+
readonly stateMutability: "view";
|
|
89
|
+
}, {
|
|
90
|
+
readonly type: "error";
|
|
91
|
+
readonly name: "KycIneligible";
|
|
92
|
+
readonly inputs: readonly [{
|
|
93
|
+
readonly name: "addr";
|
|
94
|
+
readonly type: "address";
|
|
95
|
+
readonly internalType: "address";
|
|
96
|
+
}, {
|
|
97
|
+
readonly name: "status";
|
|
98
|
+
readonly type: "uint8";
|
|
99
|
+
readonly internalType: "enum IKycRegistry.Status";
|
|
100
|
+
}];
|
|
101
|
+
}, {
|
|
102
|
+
readonly type: "error";
|
|
103
|
+
readonly name: "WalletBlocked";
|
|
104
|
+
readonly inputs: readonly [{
|
|
105
|
+
readonly name: "wallet";
|
|
106
|
+
readonly type: "address";
|
|
107
|
+
readonly internalType: "address";
|
|
108
|
+
}];
|
|
109
|
+
}];
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ABI_KYC_REGISTRY = void 0;
|
|
4
|
+
/** ABI for the Upshift `KycRegistry` (one per chain): wallet status and record reads, the vault entry/exit checks, and the check-side errors. */
|
|
5
|
+
exports.ABI_KYC_REGISTRY = [
|
|
6
|
+
{
|
|
7
|
+
type: 'function',
|
|
8
|
+
name: 'statusOf',
|
|
9
|
+
inputs: [{ name: 'wallet', type: 'address', internalType: 'address' }],
|
|
10
|
+
outputs: [
|
|
11
|
+
{ name: '', type: 'uint8', internalType: 'enum IKycRegistry.Status' },
|
|
12
|
+
],
|
|
13
|
+
stateMutability: 'view',
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
type: 'function',
|
|
17
|
+
name: 'getRecord',
|
|
18
|
+
inputs: [{ name: 'wallet', type: 'address', internalType: 'address' }],
|
|
19
|
+
outputs: [
|
|
20
|
+
{
|
|
21
|
+
name: '',
|
|
22
|
+
type: 'tuple',
|
|
23
|
+
internalType: 'struct IKycRegistry.Record',
|
|
24
|
+
components: [
|
|
25
|
+
{ name: 'blocked', type: 'bool', internalType: 'bool' },
|
|
26
|
+
{ name: 'verifiedAt', type: 'uint256', internalType: 'uint256' },
|
|
27
|
+
{ name: 'expiresAt', type: 'uint256', internalType: 'uint256' },
|
|
28
|
+
{ name: 'revokedAt', type: 'uint256', internalType: 'uint256' },
|
|
29
|
+
],
|
|
30
|
+
},
|
|
31
|
+
],
|
|
32
|
+
stateMutability: 'view',
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
type: 'function',
|
|
36
|
+
name: 'canEnter',
|
|
37
|
+
inputs: [{ name: 'addr', type: 'address', internalType: 'address' }],
|
|
38
|
+
outputs: [{ name: 'ok', type: 'bool', internalType: 'bool' }],
|
|
39
|
+
stateMutability: 'view',
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
type: 'function',
|
|
43
|
+
name: 'canExit',
|
|
44
|
+
inputs: [{ name: 'addr', type: 'address', internalType: 'address' }],
|
|
45
|
+
outputs: [{ name: 'ok', type: 'bool', internalType: 'bool' }],
|
|
46
|
+
stateMutability: 'view',
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
type: 'function',
|
|
50
|
+
name: 'isExempt',
|
|
51
|
+
inputs: [{ name: 'addr', type: 'address', internalType: 'address' }],
|
|
52
|
+
outputs: [{ name: '', type: 'bool', internalType: 'bool' }],
|
|
53
|
+
stateMutability: 'view',
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
type: 'error',
|
|
57
|
+
name: 'KycIneligible',
|
|
58
|
+
inputs: [
|
|
59
|
+
{ name: 'addr', type: 'address', internalType: 'address' },
|
|
60
|
+
{
|
|
61
|
+
name: 'status',
|
|
62
|
+
type: 'uint8',
|
|
63
|
+
internalType: 'enum IKycRegistry.Status',
|
|
64
|
+
},
|
|
65
|
+
],
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
type: 'error',
|
|
69
|
+
name: 'WalletBlocked',
|
|
70
|
+
inputs: [{ name: 'wallet', type: 'address', internalType: 'address' }],
|
|
71
|
+
},
|
|
72
|
+
];
|
|
73
|
+
//# sourceMappingURL=KycRegistry.js.map
|
package/lib/abis/index.d.ts
CHANGED
package/lib/abis/index.js
CHANGED
|
@@ -48,4 +48,5 @@ __exportStar(require("./TokenizedVaultV2SenderAllocationWhitelist"), exports);
|
|
|
48
48
|
__exportStar(require("./RwaRedeemSubaccount"), exports);
|
|
49
49
|
__exportStar(require("./OFT"), exports);
|
|
50
50
|
__exportStar(require("./SwapRouter"), exports);
|
|
51
|
+
__exportStar(require("./KycRegistry"), exports);
|
|
51
52
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sui vault actions: deposit and instant redeem.
|
|
3
|
+
*
|
|
4
|
+
* Each builder dry-runs the exact transaction with the sender's own coins, so
|
|
5
|
+
* a vault that would reject it (paused, queue attached, limits) fails here
|
|
6
|
+
* with a typed {@link UpshiftVaultAbortError} instead of in the wallet, and the
|
|
7
|
+
* dry run's preview sets the transaction's minimum output. The result is an
|
|
8
|
+
* unsigned `Transaction` for the wallet to sign; {@link submitSuiTransaction}
|
|
9
|
+
* executes a signed one and waits for it.
|
|
10
|
+
*
|
|
11
|
+
* @module SuiActions
|
|
12
|
+
*/
|
|
13
|
+
import type { Transaction } from '@mysten/sui/transactions';
|
|
14
|
+
import type { ISuiConfig, ISuiNetwork } from '../../types';
|
|
15
|
+
import { UpshiftSDKError } from '../../core/errors';
|
|
16
|
+
import { type ISuiVaultRef } from './getters';
|
|
17
|
+
/** Parameters for {@link buildSuiDepositTransaction}. */
|
|
18
|
+
export interface ISuiDepositParams {
|
|
19
|
+
/** The vault and its coin types and network. */
|
|
20
|
+
vault: ISuiVaultRef;
|
|
21
|
+
/** Deposit amount in asset base units. */
|
|
22
|
+
amount: bigint;
|
|
23
|
+
/** Wallet that pays the deposit and receives the shares. */
|
|
24
|
+
sender: string;
|
|
25
|
+
/**
|
|
26
|
+
* Smallest share amount to accept. Defaults to the dry run's exact preview,
|
|
27
|
+
* so any price move between building and executing aborts with `slippage`.
|
|
28
|
+
*/
|
|
29
|
+
minSharesOut?: bigint;
|
|
30
|
+
}
|
|
31
|
+
/** Parameters for {@link buildSuiRedeemTransaction}. */
|
|
32
|
+
export interface ISuiRedeemParams {
|
|
33
|
+
/** The vault and its coin types and network. */
|
|
34
|
+
vault: ISuiVaultRef;
|
|
35
|
+
/** Shares to redeem, in share base units. */
|
|
36
|
+
shares: bigint;
|
|
37
|
+
/** Wallet that holds the shares and receives the assets. */
|
|
38
|
+
sender: string;
|
|
39
|
+
/**
|
|
40
|
+
* Smallest asset amount to accept, net of the instant fee. Defaults to the
|
|
41
|
+
* dry run's exact preview.
|
|
42
|
+
*/
|
|
43
|
+
minAssetsOut?: bigint;
|
|
44
|
+
}
|
|
45
|
+
/** An unsigned deposit transaction and the minimum it enforces. */
|
|
46
|
+
export interface ISuiDepositTransaction {
|
|
47
|
+
/** Unsigned transaction, sender set; sign it with the sender's wallet. */
|
|
48
|
+
transaction: Transaction;
|
|
49
|
+
/** Shares the dry run minted. */
|
|
50
|
+
expectedShares: bigint;
|
|
51
|
+
/** Minimum shares the transaction accepts. */
|
|
52
|
+
minSharesOut: bigint;
|
|
53
|
+
}
|
|
54
|
+
/** An unsigned instant-redeem transaction and the minimum it enforces. */
|
|
55
|
+
export interface ISuiRedeemTransaction {
|
|
56
|
+
/** Unsigned transaction, sender set; sign it with the sender's wallet. */
|
|
57
|
+
transaction: Transaction;
|
|
58
|
+
/** Gross assets before the instant fee. */
|
|
59
|
+
expectedGrossAssets: bigint;
|
|
60
|
+
/** Assets the dry run paid, net of the instant fee. */
|
|
61
|
+
expectedAssets: bigint;
|
|
62
|
+
/** Minimum net assets the transaction accepts. */
|
|
63
|
+
minAssetsOut: bigint;
|
|
64
|
+
}
|
|
65
|
+
/** A transaction signed by the sender's wallet. */
|
|
66
|
+
export interface ISuiSignedTransaction {
|
|
67
|
+
/** Transaction bytes, base64, as the wallet returns them. */
|
|
68
|
+
bytes: string;
|
|
69
|
+
/** The sender's signature, base64. */
|
|
70
|
+
signature: string;
|
|
71
|
+
}
|
|
72
|
+
/** The parts of a Sui execution error the mapping reads. */
|
|
73
|
+
interface ISuiExecutionError {
|
|
74
|
+
message?: string;
|
|
75
|
+
MoveAbort?: {
|
|
76
|
+
abortCode?: string;
|
|
77
|
+
location?: {
|
|
78
|
+
module?: string;
|
|
79
|
+
};
|
|
80
|
+
cleverError?: {
|
|
81
|
+
constantName?: string;
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Map a failed Sui execution to an SDK error: a contract abort becomes an
|
|
87
|
+
* {@link UpshiftVaultAbortError} with a stable reason, anything else an
|
|
88
|
+
* {@link UpshiftSDKError} (`UNKNOWN`).
|
|
89
|
+
*
|
|
90
|
+
* @param executionError - `effects.status.error` of a failed transaction, or
|
|
91
|
+
* the `executionError` of a `SimulationError`.
|
|
92
|
+
* @param context - Structured context for the error (e.g. network, digest).
|
|
93
|
+
* @internal
|
|
94
|
+
*/
|
|
95
|
+
export declare function suiExecutionErrorToSdkError(executionError: ISuiExecutionError | undefined, context?: Record<string, unknown>): UpshiftSDKError;
|
|
96
|
+
/**
|
|
97
|
+
* Build an unsigned deposit: charge the management fee, deposit with a minimum
|
|
98
|
+
* share amount, and send the shares to the sender — one transaction.
|
|
99
|
+
*
|
|
100
|
+
* The payment is `coinWithBalance(Asset)`: the wallet selects and merges the
|
|
101
|
+
* sender's coins when it signs. The fee is charged first so the deposit is
|
|
102
|
+
* priced on a current NAV.
|
|
103
|
+
*
|
|
104
|
+
* RPC cost: one dry run (plus the coin lookup it needs).
|
|
105
|
+
*
|
|
106
|
+
* @param params - Vault, amount, sender and optional minimum shares.
|
|
107
|
+
* @param sui - The SDK's `sui` config; applied only for `params.vault.network`.
|
|
108
|
+
* @returns The unsigned transaction, the shares the dry run minted and the
|
|
109
|
+
* minimum it enforces.
|
|
110
|
+
* @throws {@link UpshiftValidationError} for a malformed sender or vault, an
|
|
111
|
+
* out-of-range amount, unknown contract IDs, or a transaction that cannot be
|
|
112
|
+
* built (e.g. the sender lacks the asset).
|
|
113
|
+
* @throws {@link UpshiftVaultAbortError} when the vault would reject the
|
|
114
|
+
* deposit (`paused`, `below_min_deposit`, `above_max_deposit`,
|
|
115
|
+
* `deposit_cap_exceeded`, `zero_output`, `slippage`, `version_retired`).
|
|
116
|
+
* @throws {@link UpshiftNetworkError} when every Sui endpoint fails.
|
|
117
|
+
* @example
|
|
118
|
+
* ```ts
|
|
119
|
+
* const { transaction } = await buildSuiDepositTransaction(
|
|
120
|
+
* { vault: ref, amount: 1_000_000n, sender: account.address },
|
|
121
|
+
* sdkSuiConfig,
|
|
122
|
+
* );
|
|
123
|
+
* const { digest } = await dAppKit.signAndExecuteTransaction({ transaction });
|
|
124
|
+
* ```
|
|
125
|
+
*/
|
|
126
|
+
export declare function buildSuiDepositTransaction(params: ISuiDepositParams, sui?: ISuiConfig): Promise<ISuiDepositTransaction>;
|
|
127
|
+
/**
|
|
128
|
+
* Build an unsigned instant redemption: redeem shares with a minimum net
|
|
129
|
+
* asset amount and send the assets to the sender — one transaction.
|
|
130
|
+
*
|
|
131
|
+
* The shares are `coinWithBalance(Share)`. A vault with a withdrawal queue
|
|
132
|
+
* attached has instant redemption off; that fails here with `queue_attached`.
|
|
133
|
+
*
|
|
134
|
+
* Side effect on failure: when the vault rejects the dry run, the failure is
|
|
135
|
+
* reported to that vault's curator (fire-and-forget; see
|
|
136
|
+
* `monitoring.curatorAlerts`).
|
|
137
|
+
*
|
|
138
|
+
* RPC cost: one dry run (plus the coin lookup it needs).
|
|
139
|
+
*
|
|
140
|
+
* @param params - Vault, shares, sender and optional minimum assets.
|
|
141
|
+
* @param sui - The SDK's `sui` config; applied only for `params.vault.network`.
|
|
142
|
+
* @returns The unsigned transaction, the dry run's gross and net assets and
|
|
143
|
+
* the minimum it enforces.
|
|
144
|
+
* @throws {@link UpshiftValidationError} for a malformed sender or vault, an
|
|
145
|
+
* out-of-range amount, unknown contract IDs, or a transaction that cannot be
|
|
146
|
+
* built (e.g. the sender lacks the shares).
|
|
147
|
+
* @throws {@link UpshiftVaultAbortError} when the vault would reject the
|
|
148
|
+
* redemption (`queue_attached`, `paused`, `above_max_withdrawal`,
|
|
149
|
+
* `insufficient_liquidity`, `zero_output`, `slippage`, `version_retired`).
|
|
150
|
+
* @throws {@link UpshiftNetworkError} when every Sui endpoint fails.
|
|
151
|
+
*/
|
|
152
|
+
export declare function buildSuiRedeemTransaction(params: ISuiRedeemParams, sui?: ISuiConfig): Promise<ISuiRedeemTransaction>;
|
|
153
|
+
/**
|
|
154
|
+
* Execute a signed transaction and wait until the network has indexed it.
|
|
155
|
+
*
|
|
156
|
+
* Side effect on failure: a failed instant redemption is reported to that
|
|
157
|
+
* vault's curator with its digest (fire-and-forget; see
|
|
158
|
+
* `monitoring.curatorAlerts`).
|
|
159
|
+
*
|
|
160
|
+
* RPC cost: one execution plus the confirmation poll.
|
|
161
|
+
*
|
|
162
|
+
* @param signed - Bytes and signature from the wallet's `signTransaction`.
|
|
163
|
+
* @param network - Network the transaction was built for.
|
|
164
|
+
* @param sui - The SDK's `sui` config; applied only for `network`.
|
|
165
|
+
* @returns The transaction digest once it succeeded and is indexed.
|
|
166
|
+
* @throws {@link UpshiftVaultAbortError} when the vault aborted it on chain.
|
|
167
|
+
* @throws {@link UpshiftSDKError} (`UNKNOWN`) when it failed for another
|
|
168
|
+
* reason; `context.digest` names it.
|
|
169
|
+
* @throws {@link UpshiftTransactionError} when it executed but was not
|
|
170
|
+
* indexed in time; check `signature` (the digest) before retrying.
|
|
171
|
+
* @throws {@link UpshiftNetworkError} when every Sui endpoint fails.
|
|
172
|
+
*/
|
|
173
|
+
export declare function submitSuiTransaction(signed: ISuiSignedTransaction, network: ISuiNetwork, sui?: ISuiConfig): Promise<string>;
|
|
174
|
+
export {};
|