@mysten/deepbook-v3 1.2.2 → 1.3.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/CHANGELOG.md +26 -0
- package/dist/contracts/deepbook/account.d.mts +1 -1
- package/dist/contracts/deepbook/account.mjs.map +1 -1
- package/dist/contracts/deepbook/deep_price.d.mts +1 -1
- package/dist/contracts/deepbook/deep_price.mjs.map +1 -1
- package/dist/contracts/deepbook/order.d.mts +1 -1
- package/dist/contracts/deepbook/order.mjs.map +1 -1
- package/dist/contracts/pyth/data_source.mjs.map +1 -1
- package/dist/contracts/pyth/i64.mjs.map +1 -1
- package/dist/contracts/pyth/price.mjs.map +1 -1
- package/dist/contracts/pyth/price_feed.mjs.map +1 -1
- package/dist/contracts/pyth/price_identifier.mjs.map +1 -1
- package/dist/contracts/pyth/price_info.mjs.map +1 -1
- package/dist/contracts/pyth/state.mjs.map +1 -1
- package/dist/contracts/utils/index.d.mts.map +1 -1
- package/dist/contracts/utils/index.mjs.map +1 -1
- package/dist/queries/accountQueries.mjs +3 -0
- package/dist/queries/accountQueries.mjs.map +1 -1
- package/dist/queries/balanceManagerQueries.mjs +5 -0
- package/dist/queries/balanceManagerQueries.mjs.map +1 -1
- package/dist/queries/marginManagerQueries.mjs +15 -0
- package/dist/queries/marginManagerQueries.mjs.map +1 -1
- package/dist/queries/marginPoolQueries.mjs +14 -0
- package/dist/queries/marginPoolQueries.mjs.map +1 -1
- package/dist/queries/orderQueries.mjs +7 -0
- package/dist/queries/orderQueries.mjs.map +1 -1
- package/dist/queries/poolQueries.mjs +15 -0
- package/dist/queries/poolQueries.mjs.map +1 -1
- package/dist/queries/quantityQueries.mjs +9 -0
- package/dist/queries/quantityQueries.mjs.map +1 -1
- package/dist/queries/referralQueries.mjs +5 -0
- package/dist/queries/referralQueries.mjs.map +1 -1
- package/dist/queries/registryQueries.mjs +12 -0
- package/dist/queries/registryQueries.mjs.map +1 -1
- package/dist/queries/tpslQueries.mjs +3 -0
- package/dist/queries/tpslQueries.mjs.map +1 -1
- package/dist/transactions/deepbook.d.mts +22 -0
- package/dist/transactions/deepbook.d.mts.map +1 -1
- package/dist/transactions/deepbook.mjs +38 -0
- package/dist/transactions/deepbook.mjs.map +1 -1
- package/dist/transactions/marginLiquidations.d.mts +3 -3
- package/dist/transactions/marginLiquidations.d.mts.map +1 -1
- package/dist/transactions/marginRegistry.d.mts +15 -15
- package/dist/utils/constants.mjs +1 -1
- package/dist/utils/constants.mjs.map +1 -1
- package/package.json +5 -5
- package/src/contracts/deepbook/account.ts +20 -20
- package/src/contracts/deepbook/balance_manager.ts +3 -3
- package/src/contracts/deepbook/deep_price.ts +6 -6
- package/src/contracts/deepbook/fill.ts +34 -34
- package/src/contracts/deepbook/math.ts +2 -2
- package/src/contracts/deepbook/order.ts +24 -24
- package/src/contracts/deepbook/order_info.ts +46 -46
- package/src/contracts/deepbook/order_query.ts +5 -5
- package/src/contracts/deepbook/pool.ts +119 -33
- package/src/contracts/deepbook/registry.ts +3 -3
- package/src/contracts/pyth/batch_price_attestation.ts +5 -5
- package/src/contracts/pyth/contract_upgrade.ts +3 -3
- package/src/contracts/pyth/data_source.ts +4 -4
- package/src/contracts/pyth/deserialize.ts +8 -8
- package/src/contracts/pyth/governance.ts +7 -7
- package/src/contracts/pyth/governance_action.ts +2 -2
- package/src/contracts/pyth/governance_instruction.ts +6 -6
- package/src/contracts/pyth/hot_potato_vector.ts +5 -5
- package/src/contracts/pyth/i64.ts +4 -4
- package/src/contracts/pyth/merkle_tree.ts +3 -7
- package/src/contracts/pyth/migrate.ts +2 -2
- package/src/contracts/pyth/price.ts +7 -7
- package/src/contracts/pyth/price_feed.ts +7 -11
- package/src/contracts/pyth/price_identifier.ts +3 -3
- package/src/contracts/pyth/price_info.ts +9 -9
- package/src/contracts/pyth/price_status.ts +2 -2
- package/src/contracts/pyth/pyth.ts +12 -12
- package/src/contracts/pyth/set.ts +4 -4
- package/src/contracts/pyth/state.ts +5 -5
- package/src/contracts/utils/index.ts +3 -1
- package/src/queries/accountQueries.ts +3 -0
- package/src/queries/balanceManagerQueries.ts +5 -0
- package/src/queries/marginManagerQueries.ts +15 -0
- package/src/queries/marginPoolQueries.ts +14 -0
- package/src/queries/orderQueries.ts +7 -0
- package/src/queries/poolQueries.ts +15 -0
- package/src/queries/quantityQueries.ts +9 -0
- package/src/queries/referralQueries.ts +5 -0
- package/src/queries/registryQueries.ts +12 -0
- package/src/queries/tpslQueries.ts +3 -0
- package/src/transactions/deepbook.ts +64 -0
- package/src/utils/constants.ts +1 -1
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
import { MoveStruct, normalizeMoveArguments, type RawTransactionArgument } from '../utils/index.js';
|
|
8
8
|
import { bcs } from '@mysten/sui/bcs';
|
|
9
|
-
import { type Transaction } from '@mysten/sui/transactions';
|
|
9
|
+
import { type Transaction, type TransactionArgument } from '@mysten/sui/transactions';
|
|
10
10
|
import * as versioned from './deps/sui/versioned.js';
|
|
11
11
|
import * as vec_set from './deps/sui/vec_set.js';
|
|
12
12
|
import * as book from './book.js';
|
|
@@ -145,7 +145,7 @@ export function createPermissionlessPool(options: CreatePermissionlessPoolOption
|
|
|
145
145
|
export interface PlaceLimitOrderArguments {
|
|
146
146
|
self: RawTransactionArgument<string>;
|
|
147
147
|
balanceManager: RawTransactionArgument<string>;
|
|
148
|
-
tradeProof:
|
|
148
|
+
tradeProof: TransactionArgument;
|
|
149
149
|
clientOrderId: RawTransactionArgument<number | bigint>;
|
|
150
150
|
orderType: RawTransactionArgument<number>;
|
|
151
151
|
selfMatchingOption: RawTransactionArgument<number>;
|
|
@@ -162,7 +162,7 @@ export interface PlaceLimitOrderOptions {
|
|
|
162
162
|
| [
|
|
163
163
|
self: RawTransactionArgument<string>,
|
|
164
164
|
balanceManager: RawTransactionArgument<string>,
|
|
165
|
-
tradeProof:
|
|
165
|
+
tradeProof: TransactionArgument,
|
|
166
166
|
clientOrderId: RawTransactionArgument<number | bigint>,
|
|
167
167
|
orderType: RawTransactionArgument<number>,
|
|
168
168
|
selfMatchingOption: RawTransactionArgument<number>,
|
|
@@ -219,7 +219,7 @@ export function placeLimitOrder(options: PlaceLimitOrderOptions) {
|
|
|
219
219
|
export interface PlaceMarketOrderArguments {
|
|
220
220
|
self: RawTransactionArgument<string>;
|
|
221
221
|
balanceManager: RawTransactionArgument<string>;
|
|
222
|
-
tradeProof:
|
|
222
|
+
tradeProof: TransactionArgument;
|
|
223
223
|
clientOrderId: RawTransactionArgument<number | bigint>;
|
|
224
224
|
selfMatchingOption: RawTransactionArgument<number>;
|
|
225
225
|
quantity: RawTransactionArgument<number | bigint>;
|
|
@@ -233,7 +233,7 @@ export interface PlaceMarketOrderOptions {
|
|
|
233
233
|
| [
|
|
234
234
|
self: RawTransactionArgument<string>,
|
|
235
235
|
balanceManager: RawTransactionArgument<string>,
|
|
236
|
-
tradeProof:
|
|
236
|
+
tradeProof: TransactionArgument,
|
|
237
237
|
clientOrderId: RawTransactionArgument<number | bigint>,
|
|
238
238
|
selfMatchingOption: RawTransactionArgument<number>,
|
|
239
239
|
quantity: RawTransactionArgument<number | bigint>,
|
|
@@ -570,7 +570,7 @@ export function swapExactQuantityWithManager(options: SwapExactQuantityWithManag
|
|
|
570
570
|
export interface ModifyOrderArguments {
|
|
571
571
|
self: RawTransactionArgument<string>;
|
|
572
572
|
balanceManager: RawTransactionArgument<string>;
|
|
573
|
-
tradeProof:
|
|
573
|
+
tradeProof: TransactionArgument;
|
|
574
574
|
orderId: RawTransactionArgument<number | bigint>;
|
|
575
575
|
newQuantity: RawTransactionArgument<number | bigint>;
|
|
576
576
|
}
|
|
@@ -581,7 +581,7 @@ export interface ModifyOrderOptions {
|
|
|
581
581
|
| [
|
|
582
582
|
self: RawTransactionArgument<string>,
|
|
583
583
|
balanceManager: RawTransactionArgument<string>,
|
|
584
|
-
tradeProof:
|
|
584
|
+
tradeProof: TransactionArgument,
|
|
585
585
|
orderId: RawTransactionArgument<number | bigint>,
|
|
586
586
|
newQuantity: RawTransactionArgument<number | bigint>,
|
|
587
587
|
];
|
|
@@ -611,7 +611,7 @@ export function modifyOrder(options: ModifyOrderOptions) {
|
|
|
611
611
|
export interface CancelOrderArguments {
|
|
612
612
|
self: RawTransactionArgument<string>;
|
|
613
613
|
balanceManager: RawTransactionArgument<string>;
|
|
614
|
-
tradeProof:
|
|
614
|
+
tradeProof: TransactionArgument;
|
|
615
615
|
orderId: RawTransactionArgument<number | bigint>;
|
|
616
616
|
}
|
|
617
617
|
export interface CancelOrderOptions {
|
|
@@ -621,7 +621,7 @@ export interface CancelOrderOptions {
|
|
|
621
621
|
| [
|
|
622
622
|
self: RawTransactionArgument<string>,
|
|
623
623
|
balanceManager: RawTransactionArgument<string>,
|
|
624
|
-
tradeProof:
|
|
624
|
+
tradeProof: TransactionArgument,
|
|
625
625
|
orderId: RawTransactionArgument<number | bigint>,
|
|
626
626
|
];
|
|
627
627
|
typeArguments: [string, string];
|
|
@@ -651,8 +651,8 @@ export function cancelOrder(options: CancelOrderOptions) {
|
|
|
651
651
|
export interface CancelOrdersArguments {
|
|
652
652
|
self: RawTransactionArgument<string>;
|
|
653
653
|
balanceManager: RawTransactionArgument<string>;
|
|
654
|
-
tradeProof:
|
|
655
|
-
orderIds: RawTransactionArgument<number | bigint
|
|
654
|
+
tradeProof: TransactionArgument;
|
|
655
|
+
orderIds: RawTransactionArgument<Array<number | bigint>>;
|
|
656
656
|
}
|
|
657
657
|
export interface CancelOrdersOptions {
|
|
658
658
|
package?: string;
|
|
@@ -661,8 +661,8 @@ export interface CancelOrdersOptions {
|
|
|
661
661
|
| [
|
|
662
662
|
self: RawTransactionArgument<string>,
|
|
663
663
|
balanceManager: RawTransactionArgument<string>,
|
|
664
|
-
tradeProof:
|
|
665
|
-
orderIds: RawTransactionArgument<number | bigint
|
|
664
|
+
tradeProof: TransactionArgument,
|
|
665
|
+
orderIds: RawTransactionArgument<Array<number | bigint>>,
|
|
666
666
|
];
|
|
667
667
|
typeArguments: [string, string];
|
|
668
668
|
}
|
|
@@ -688,10 +688,93 @@ export function cancelOrders(options: CancelOrdersOptions) {
|
|
|
688
688
|
typeArguments: options.typeArguments,
|
|
689
689
|
});
|
|
690
690
|
}
|
|
691
|
+
export interface CancelLiveOrderArguments {
|
|
692
|
+
self: RawTransactionArgument<string>;
|
|
693
|
+
balanceManager: RawTransactionArgument<string>;
|
|
694
|
+
tradeProof: TransactionArgument;
|
|
695
|
+
orderId: RawTransactionArgument<number | bigint>;
|
|
696
|
+
}
|
|
697
|
+
export interface CancelLiveOrderOptions {
|
|
698
|
+
package?: string;
|
|
699
|
+
arguments:
|
|
700
|
+
| CancelLiveOrderArguments
|
|
701
|
+
| [
|
|
702
|
+
self: RawTransactionArgument<string>,
|
|
703
|
+
balanceManager: RawTransactionArgument<string>,
|
|
704
|
+
tradeProof: TransactionArgument,
|
|
705
|
+
orderId: RawTransactionArgument<number | bigint>,
|
|
706
|
+
];
|
|
707
|
+
typeArguments: [string, string];
|
|
708
|
+
}
|
|
709
|
+
/**
|
|
710
|
+
* Cancel a single order, no-op if the order_id is not currently in the
|
|
711
|
+
* balance_manager's open orders (e.g. already filled, cancelled, or not owned by
|
|
712
|
+
* this balance_manager). If the order is present, it must be owned by the
|
|
713
|
+
* balance_manager. On a successful cancel the order is removed from the book and
|
|
714
|
+
* the balance_manager's open orders, and an order canceled event is emitted.
|
|
715
|
+
*/
|
|
716
|
+
export function cancelLiveOrder(options: CancelLiveOrderOptions) {
|
|
717
|
+
const packageAddress = options.package ?? '@deepbook/core';
|
|
718
|
+
const argumentsTypes = [null, null, null, 'u128', '0x2::clock::Clock'] satisfies (
|
|
719
|
+
| string
|
|
720
|
+
| null
|
|
721
|
+
)[];
|
|
722
|
+
const parameterNames = ['self', 'balanceManager', 'tradeProof', 'orderId'];
|
|
723
|
+
return (tx: Transaction) =>
|
|
724
|
+
tx.moveCall({
|
|
725
|
+
package: packageAddress,
|
|
726
|
+
module: 'pool',
|
|
727
|
+
function: 'cancel_live_order',
|
|
728
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
729
|
+
typeArguments: options.typeArguments,
|
|
730
|
+
});
|
|
731
|
+
}
|
|
732
|
+
export interface CancelLiveOrdersArguments {
|
|
733
|
+
self: RawTransactionArgument<string>;
|
|
734
|
+
balanceManager: RawTransactionArgument<string>;
|
|
735
|
+
tradeProof: TransactionArgument;
|
|
736
|
+
orderIds: RawTransactionArgument<Array<number | bigint>>;
|
|
737
|
+
}
|
|
738
|
+
export interface CancelLiveOrdersOptions {
|
|
739
|
+
package?: string;
|
|
740
|
+
arguments:
|
|
741
|
+
| CancelLiveOrdersArguments
|
|
742
|
+
| [
|
|
743
|
+
self: RawTransactionArgument<string>,
|
|
744
|
+
balanceManager: RawTransactionArgument<string>,
|
|
745
|
+
tradeProof: TransactionArgument,
|
|
746
|
+
orderIds: RawTransactionArgument<Array<number | bigint>>,
|
|
747
|
+
];
|
|
748
|
+
typeArguments: [string, string];
|
|
749
|
+
}
|
|
750
|
+
/**
|
|
751
|
+
* Cancel multiple orders within a vector, skipping any order_id that is not
|
|
752
|
+
* currently in the balance_manager's open orders (e.g. already filled, cancelled,
|
|
753
|
+
* or not owned by this balance_manager). Orders that are present must be owned by
|
|
754
|
+
* the balance_manager. The live orders are removed from the book and the
|
|
755
|
+
* balance_manager's open orders. Order canceled events are emitted for each
|
|
756
|
+
* cancelled order.
|
|
757
|
+
*/
|
|
758
|
+
export function cancelLiveOrders(options: CancelLiveOrdersOptions) {
|
|
759
|
+
const packageAddress = options.package ?? '@deepbook/core';
|
|
760
|
+
const argumentsTypes = [null, null, null, 'vector<u128>', '0x2::clock::Clock'] satisfies (
|
|
761
|
+
| string
|
|
762
|
+
| null
|
|
763
|
+
)[];
|
|
764
|
+
const parameterNames = ['self', 'balanceManager', 'tradeProof', 'orderIds'];
|
|
765
|
+
return (tx: Transaction) =>
|
|
766
|
+
tx.moveCall({
|
|
767
|
+
package: packageAddress,
|
|
768
|
+
module: 'pool',
|
|
769
|
+
function: 'cancel_live_orders',
|
|
770
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
771
|
+
typeArguments: options.typeArguments,
|
|
772
|
+
});
|
|
773
|
+
}
|
|
691
774
|
export interface CancelAllOrdersArguments {
|
|
692
775
|
self: RawTransactionArgument<string>;
|
|
693
776
|
balanceManager: RawTransactionArgument<string>;
|
|
694
|
-
tradeProof:
|
|
777
|
+
tradeProof: TransactionArgument;
|
|
695
778
|
}
|
|
696
779
|
export interface CancelAllOrdersOptions {
|
|
697
780
|
package?: string;
|
|
@@ -700,7 +783,7 @@ export interface CancelAllOrdersOptions {
|
|
|
700
783
|
| [
|
|
701
784
|
self: RawTransactionArgument<string>,
|
|
702
785
|
balanceManager: RawTransactionArgument<string>,
|
|
703
|
-
tradeProof:
|
|
786
|
+
tradeProof: TransactionArgument,
|
|
704
787
|
];
|
|
705
788
|
typeArguments: [string, string];
|
|
706
789
|
}
|
|
@@ -721,7 +804,7 @@ export function cancelAllOrders(options: CancelAllOrdersOptions) {
|
|
|
721
804
|
export interface WithdrawSettledAmountsArguments {
|
|
722
805
|
self: RawTransactionArgument<string>;
|
|
723
806
|
balanceManager: RawTransactionArgument<string>;
|
|
724
|
-
tradeProof:
|
|
807
|
+
tradeProof: TransactionArgument;
|
|
725
808
|
}
|
|
726
809
|
export interface WithdrawSettledAmountsOptions {
|
|
727
810
|
package?: string;
|
|
@@ -730,7 +813,7 @@ export interface WithdrawSettledAmountsOptions {
|
|
|
730
813
|
| [
|
|
731
814
|
self: RawTransactionArgument<string>,
|
|
732
815
|
balanceManager: RawTransactionArgument<string>,
|
|
733
|
-
tradeProof:
|
|
816
|
+
tradeProof: TransactionArgument,
|
|
734
817
|
];
|
|
735
818
|
typeArguments: [string, string];
|
|
736
819
|
}
|
|
@@ -778,7 +861,7 @@ export function withdrawSettledAmountsPermissionless(
|
|
|
778
861
|
export interface StakeArguments {
|
|
779
862
|
self: RawTransactionArgument<string>;
|
|
780
863
|
balanceManager: RawTransactionArgument<string>;
|
|
781
|
-
tradeProof:
|
|
864
|
+
tradeProof: TransactionArgument;
|
|
782
865
|
amount: RawTransactionArgument<number | bigint>;
|
|
783
866
|
}
|
|
784
867
|
export interface StakeOptions {
|
|
@@ -788,7 +871,7 @@ export interface StakeOptions {
|
|
|
788
871
|
| [
|
|
789
872
|
self: RawTransactionArgument<string>,
|
|
790
873
|
balanceManager: RawTransactionArgument<string>,
|
|
791
|
-
tradeProof:
|
|
874
|
+
tradeProof: TransactionArgument,
|
|
792
875
|
amount: RawTransactionArgument<number | bigint>,
|
|
793
876
|
];
|
|
794
877
|
typeArguments: [string, string];
|
|
@@ -813,7 +896,7 @@ export function stake(options: StakeOptions) {
|
|
|
813
896
|
export interface UnstakeArguments {
|
|
814
897
|
self: RawTransactionArgument<string>;
|
|
815
898
|
balanceManager: RawTransactionArgument<string>;
|
|
816
|
-
tradeProof:
|
|
899
|
+
tradeProof: TransactionArgument;
|
|
817
900
|
}
|
|
818
901
|
export interface UnstakeOptions {
|
|
819
902
|
package?: string;
|
|
@@ -822,7 +905,7 @@ export interface UnstakeOptions {
|
|
|
822
905
|
| [
|
|
823
906
|
self: RawTransactionArgument<string>,
|
|
824
907
|
balanceManager: RawTransactionArgument<string>,
|
|
825
|
-
tradeProof:
|
|
908
|
+
tradeProof: TransactionArgument,
|
|
826
909
|
];
|
|
827
910
|
typeArguments: [string, string];
|
|
828
911
|
}
|
|
@@ -847,7 +930,7 @@ export function unstake(options: UnstakeOptions) {
|
|
|
847
930
|
export interface SubmitProposalArguments {
|
|
848
931
|
self: RawTransactionArgument<string>;
|
|
849
932
|
balanceManager: RawTransactionArgument<string>;
|
|
850
|
-
tradeProof:
|
|
933
|
+
tradeProof: TransactionArgument;
|
|
851
934
|
takerFee: RawTransactionArgument<number | bigint>;
|
|
852
935
|
makerFee: RawTransactionArgument<number | bigint>;
|
|
853
936
|
stakeRequired: RawTransactionArgument<number | bigint>;
|
|
@@ -859,7 +942,7 @@ export interface SubmitProposalOptions {
|
|
|
859
942
|
| [
|
|
860
943
|
self: RawTransactionArgument<string>,
|
|
861
944
|
balanceManager: RawTransactionArgument<string>,
|
|
862
|
-
tradeProof:
|
|
945
|
+
tradeProof: TransactionArgument,
|
|
863
946
|
takerFee: RawTransactionArgument<number | bigint>,
|
|
864
947
|
makerFee: RawTransactionArgument<number | bigint>,
|
|
865
948
|
stakeRequired: RawTransactionArgument<number | bigint>,
|
|
@@ -896,7 +979,7 @@ export function submitProposal(options: SubmitProposalOptions) {
|
|
|
896
979
|
export interface VoteArguments {
|
|
897
980
|
self: RawTransactionArgument<string>;
|
|
898
981
|
balanceManager: RawTransactionArgument<string>;
|
|
899
|
-
tradeProof:
|
|
982
|
+
tradeProof: TransactionArgument;
|
|
900
983
|
proposalId: RawTransactionArgument<string>;
|
|
901
984
|
}
|
|
902
985
|
export interface VoteOptions {
|
|
@@ -906,7 +989,7 @@ export interface VoteOptions {
|
|
|
906
989
|
| [
|
|
907
990
|
self: RawTransactionArgument<string>,
|
|
908
991
|
balanceManager: RawTransactionArgument<string>,
|
|
909
|
-
tradeProof:
|
|
992
|
+
tradeProof: TransactionArgument,
|
|
910
993
|
proposalId: RawTransactionArgument<string>,
|
|
911
994
|
];
|
|
912
995
|
typeArguments: [string, string];
|
|
@@ -932,7 +1015,7 @@ export function vote(options: VoteOptions) {
|
|
|
932
1015
|
export interface ClaimRebatesArguments {
|
|
933
1016
|
self: RawTransactionArgument<string>;
|
|
934
1017
|
balanceManager: RawTransactionArgument<string>;
|
|
935
|
-
tradeProof:
|
|
1018
|
+
tradeProof: TransactionArgument;
|
|
936
1019
|
}
|
|
937
1020
|
export interface ClaimRebatesOptions {
|
|
938
1021
|
package?: string;
|
|
@@ -941,7 +1024,7 @@ export interface ClaimRebatesOptions {
|
|
|
941
1024
|
| [
|
|
942
1025
|
self: RawTransactionArgument<string>,
|
|
943
1026
|
balanceManager: RawTransactionArgument<string>,
|
|
944
|
-
tradeProof:
|
|
1027
|
+
tradeProof: TransactionArgument,
|
|
945
1028
|
];
|
|
946
1029
|
typeArguments: [string, string];
|
|
947
1030
|
}
|
|
@@ -1021,7 +1104,7 @@ export function borrowFlashloanQuote(options: BorrowFlashloanQuoteOptions) {
|
|
|
1021
1104
|
export interface ReturnFlashloanBaseArguments {
|
|
1022
1105
|
self: RawTransactionArgument<string>;
|
|
1023
1106
|
coin: RawTransactionArgument<string>;
|
|
1024
|
-
flashLoan:
|
|
1107
|
+
flashLoan: TransactionArgument;
|
|
1025
1108
|
}
|
|
1026
1109
|
export interface ReturnFlashloanBaseOptions {
|
|
1027
1110
|
package?: string;
|
|
@@ -1030,7 +1113,7 @@ export interface ReturnFlashloanBaseOptions {
|
|
|
1030
1113
|
| [
|
|
1031
1114
|
self: RawTransactionArgument<string>,
|
|
1032
1115
|
coin: RawTransactionArgument<string>,
|
|
1033
|
-
flashLoan:
|
|
1116
|
+
flashLoan: TransactionArgument,
|
|
1034
1117
|
];
|
|
1035
1118
|
typeArguments: [string, string];
|
|
1036
1119
|
}
|
|
@@ -1054,7 +1137,7 @@ export function returnFlashloanBase(options: ReturnFlashloanBaseOptions) {
|
|
|
1054
1137
|
export interface ReturnFlashloanQuoteArguments {
|
|
1055
1138
|
self: RawTransactionArgument<string>;
|
|
1056
1139
|
coin: RawTransactionArgument<string>;
|
|
1057
|
-
flashLoan:
|
|
1140
|
+
flashLoan: TransactionArgument;
|
|
1058
1141
|
}
|
|
1059
1142
|
export interface ReturnFlashloanQuoteOptions {
|
|
1060
1143
|
package?: string;
|
|
@@ -1063,7 +1146,7 @@ export interface ReturnFlashloanQuoteOptions {
|
|
|
1063
1146
|
| [
|
|
1064
1147
|
self: RawTransactionArgument<string>,
|
|
1065
1148
|
coin: RawTransactionArgument<string>,
|
|
1066
|
-
flashLoan:
|
|
1149
|
+
flashLoan: TransactionArgument,
|
|
1067
1150
|
];
|
|
1068
1151
|
typeArguments: [string, string];
|
|
1069
1152
|
}
|
|
@@ -2093,13 +2176,16 @@ export function getOrder(options: GetOrderOptions) {
|
|
|
2093
2176
|
}
|
|
2094
2177
|
export interface GetOrdersArguments {
|
|
2095
2178
|
self: RawTransactionArgument<string>;
|
|
2096
|
-
orderIds: RawTransactionArgument<number | bigint
|
|
2179
|
+
orderIds: RawTransactionArgument<Array<number | bigint>>;
|
|
2097
2180
|
}
|
|
2098
2181
|
export interface GetOrdersOptions {
|
|
2099
2182
|
package?: string;
|
|
2100
2183
|
arguments:
|
|
2101
2184
|
| GetOrdersArguments
|
|
2102
|
-
| [
|
|
2185
|
+
| [
|
|
2186
|
+
self: RawTransactionArgument<string>,
|
|
2187
|
+
orderIds: RawTransactionArgument<Array<number | bigint>>,
|
|
2188
|
+
];
|
|
2103
2189
|
typeArguments: [string, string];
|
|
2104
2190
|
}
|
|
2105
2191
|
/** Get multiple orders given a vector of order_ids. */
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
import { MoveStruct, normalizeMoveArguments, type RawTransactionArgument } from '../utils/index.js';
|
|
8
8
|
import { bcs } from '@mysten/sui/bcs';
|
|
9
|
-
import { type Transaction } from '@mysten/sui/transactions';
|
|
9
|
+
import { type Transaction, type TransactionArgument } from '@mysten/sui/transactions';
|
|
10
10
|
import * as versioned from './deps/sui/versioned.js';
|
|
11
11
|
import * as vec_set from './deps/sui/vec_set.js';
|
|
12
12
|
import * as bag from './deps/sui/bag.js';
|
|
@@ -330,13 +330,13 @@ export function getBalanceManagerIds(options: GetBalanceManagerIdsOptions) {
|
|
|
330
330
|
}
|
|
331
331
|
export interface IsStablecoinArguments {
|
|
332
332
|
self: RawTransactionArgument<string>;
|
|
333
|
-
stableType:
|
|
333
|
+
stableType: TransactionArgument;
|
|
334
334
|
}
|
|
335
335
|
export interface IsStablecoinOptions {
|
|
336
336
|
package?: string;
|
|
337
337
|
arguments:
|
|
338
338
|
| IsStablecoinArguments
|
|
339
|
-
| [self: RawTransactionArgument<string>, stableType:
|
|
339
|
+
| [self: RawTransactionArgument<string>, stableType: TransactionArgument];
|
|
340
340
|
}
|
|
341
341
|
/** Returns whether the given coin is whitelisted */
|
|
342
342
|
export function isStablecoin(options: IsStablecoinOptions) {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
**************************************************************/
|
|
4
4
|
import { MoveStruct, normalizeMoveArguments, type RawTransactionArgument } from '../utils/index.js';
|
|
5
5
|
import { bcs } from '@mysten/sui/bcs';
|
|
6
|
-
import { type Transaction } from '@mysten/sui/transactions';
|
|
6
|
+
import { type Transaction, type TransactionArgument } from '@mysten/sui/transactions';
|
|
7
7
|
import * as price_info from './price_info.js';
|
|
8
8
|
const $moduleName =
|
|
9
9
|
'0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837::batch_price_attestation';
|
|
@@ -28,7 +28,7 @@ export const BatchPriceAttestation = new MoveStruct({
|
|
|
28
28
|
});
|
|
29
29
|
export interface DestroyOptions {
|
|
30
30
|
package?: string;
|
|
31
|
-
arguments: [
|
|
31
|
+
arguments: [TransactionArgument];
|
|
32
32
|
}
|
|
33
33
|
export function destroy(options: DestroyOptions) {
|
|
34
34
|
const packageAddress =
|
|
@@ -44,7 +44,7 @@ export function destroy(options: DestroyOptions) {
|
|
|
44
44
|
}
|
|
45
45
|
export interface GetAttestationCountOptions {
|
|
46
46
|
package?: string;
|
|
47
|
-
arguments: [
|
|
47
|
+
arguments: [TransactionArgument];
|
|
48
48
|
}
|
|
49
49
|
export function getAttestationCount(options: GetAttestationCountOptions) {
|
|
50
50
|
const packageAddress =
|
|
@@ -60,7 +60,7 @@ export function getAttestationCount(options: GetAttestationCountOptions) {
|
|
|
60
60
|
}
|
|
61
61
|
export interface GetPriceInfoOptions {
|
|
62
62
|
package?: string;
|
|
63
|
-
arguments: [
|
|
63
|
+
arguments: [TransactionArgument, RawTransactionArgument<number | bigint>];
|
|
64
64
|
}
|
|
65
65
|
export function getPriceInfo(options: GetPriceInfoOptions) {
|
|
66
66
|
const packageAddress =
|
|
@@ -76,7 +76,7 @@ export function getPriceInfo(options: GetPriceInfoOptions) {
|
|
|
76
76
|
}
|
|
77
77
|
export interface DeserializeOptions {
|
|
78
78
|
package?: string;
|
|
79
|
-
arguments: [RawTransactionArgument<number
|
|
79
|
+
arguments: [RawTransactionArgument<Array<number>>];
|
|
80
80
|
}
|
|
81
81
|
export function deserialize(options: DeserializeOptions) {
|
|
82
82
|
const packageAddress =
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
**************************************************************/
|
|
4
4
|
import { MoveStruct, normalizeMoveArguments, type RawTransactionArgument } from '../utils/index.js';
|
|
5
5
|
import { bcs } from '@mysten/sui/bcs';
|
|
6
|
-
import { type Transaction } from '@mysten/sui/transactions';
|
|
6
|
+
import { type Transaction, type TransactionArgument } from '@mysten/sui/transactions';
|
|
7
7
|
import * as bytes32 from './deps/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/bytes32.js';
|
|
8
8
|
const $moduleName =
|
|
9
9
|
'0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837::contract_upgrade';
|
|
@@ -22,7 +22,7 @@ export const UpgradeContract = new MoveStruct({
|
|
|
22
22
|
});
|
|
23
23
|
export interface AuthorizeUpgradeOptions {
|
|
24
24
|
package?: string;
|
|
25
|
-
arguments: [RawTransactionArgument<string>,
|
|
25
|
+
arguments: [RawTransactionArgument<string>, TransactionArgument];
|
|
26
26
|
}
|
|
27
27
|
export function authorizeUpgrade(options: AuthorizeUpgradeOptions) {
|
|
28
28
|
const packageAddress =
|
|
@@ -38,7 +38,7 @@ export function authorizeUpgrade(options: AuthorizeUpgradeOptions) {
|
|
|
38
38
|
}
|
|
39
39
|
export interface CommitUpgradeOptions {
|
|
40
40
|
package?: string;
|
|
41
|
-
arguments: [RawTransactionArgument<string>,
|
|
41
|
+
arguments: [RawTransactionArgument<string>, TransactionArgument];
|
|
42
42
|
}
|
|
43
43
|
export function commitUpgrade(options: CommitUpgradeOptions) {
|
|
44
44
|
const packageAddress =
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
**************************************************************/
|
|
4
4
|
import { MoveStruct, normalizeMoveArguments, type RawTransactionArgument } from '../utils/index.js';
|
|
5
5
|
import { bcs } from '@mysten/sui/bcs';
|
|
6
|
-
import { type Transaction } from '@mysten/sui/transactions';
|
|
6
|
+
import { type Transaction, type TransactionArgument } from '@mysten/sui/transactions';
|
|
7
7
|
import * as external_address from './deps/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/external_address.js';
|
|
8
8
|
const $moduleName =
|
|
9
9
|
'0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837::data_source';
|
|
@@ -16,7 +16,7 @@ export const DataSource = new MoveStruct({
|
|
|
16
16
|
});
|
|
17
17
|
export interface ContainsOptions {
|
|
18
18
|
package?: string;
|
|
19
|
-
arguments: [RawTransactionArgument<string>,
|
|
19
|
+
arguments: [RawTransactionArgument<string>, TransactionArgument];
|
|
20
20
|
}
|
|
21
21
|
export function contains(options: ContainsOptions) {
|
|
22
22
|
const packageAddress =
|
|
@@ -32,7 +32,7 @@ export function contains(options: ContainsOptions) {
|
|
|
32
32
|
}
|
|
33
33
|
export interface EmitterChainOptions {
|
|
34
34
|
package?: string;
|
|
35
|
-
arguments: [
|
|
35
|
+
arguments: [TransactionArgument];
|
|
36
36
|
}
|
|
37
37
|
export function emitterChain(options: EmitterChainOptions) {
|
|
38
38
|
const packageAddress =
|
|
@@ -48,7 +48,7 @@ export function emitterChain(options: EmitterChainOptions) {
|
|
|
48
48
|
}
|
|
49
49
|
export interface EmitterAddressOptions {
|
|
50
50
|
package?: string;
|
|
51
|
-
arguments: [
|
|
51
|
+
arguments: [TransactionArgument];
|
|
52
52
|
}
|
|
53
53
|
export function emitterAddress(options: EmitterAddressOptions) {
|
|
54
54
|
const packageAddress =
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**************************************************************
|
|
2
2
|
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
3
|
**************************************************************/
|
|
4
|
-
import { type Transaction } from '@mysten/sui/transactions';
|
|
4
|
+
import { type Transaction, type TransactionArgument } from '@mysten/sui/transactions';
|
|
5
5
|
import { normalizeMoveArguments, type RawTransactionArgument } from '../utils/index.js';
|
|
6
6
|
export interface DeserializeVectorOptions {
|
|
7
7
|
package?: string;
|
|
8
|
-
arguments: [
|
|
8
|
+
arguments: [TransactionArgument, RawTransactionArgument<number | bigint>];
|
|
9
9
|
}
|
|
10
10
|
export function deserializeVector(options: DeserializeVectorOptions) {
|
|
11
11
|
const packageAddress =
|
|
@@ -21,7 +21,7 @@ export function deserializeVector(options: DeserializeVectorOptions) {
|
|
|
21
21
|
}
|
|
22
22
|
export interface DeserializeU8Options {
|
|
23
23
|
package?: string;
|
|
24
|
-
arguments: [
|
|
24
|
+
arguments: [TransactionArgument];
|
|
25
25
|
}
|
|
26
26
|
export function deserializeU8(options: DeserializeU8Options) {
|
|
27
27
|
const packageAddress =
|
|
@@ -37,7 +37,7 @@ export function deserializeU8(options: DeserializeU8Options) {
|
|
|
37
37
|
}
|
|
38
38
|
export interface DeserializeU16Options {
|
|
39
39
|
package?: string;
|
|
40
|
-
arguments: [
|
|
40
|
+
arguments: [TransactionArgument];
|
|
41
41
|
}
|
|
42
42
|
export function deserializeU16(options: DeserializeU16Options) {
|
|
43
43
|
const packageAddress =
|
|
@@ -53,7 +53,7 @@ export function deserializeU16(options: DeserializeU16Options) {
|
|
|
53
53
|
}
|
|
54
54
|
export interface DeserializeU32Options {
|
|
55
55
|
package?: string;
|
|
56
|
-
arguments: [
|
|
56
|
+
arguments: [TransactionArgument];
|
|
57
57
|
}
|
|
58
58
|
export function deserializeU32(options: DeserializeU32Options) {
|
|
59
59
|
const packageAddress =
|
|
@@ -69,7 +69,7 @@ export function deserializeU32(options: DeserializeU32Options) {
|
|
|
69
69
|
}
|
|
70
70
|
export interface DeserializeI32Options {
|
|
71
71
|
package?: string;
|
|
72
|
-
arguments: [
|
|
72
|
+
arguments: [TransactionArgument];
|
|
73
73
|
}
|
|
74
74
|
export function deserializeI32(options: DeserializeI32Options) {
|
|
75
75
|
const packageAddress =
|
|
@@ -85,7 +85,7 @@ export function deserializeI32(options: DeserializeI32Options) {
|
|
|
85
85
|
}
|
|
86
86
|
export interface DeserializeU64Options {
|
|
87
87
|
package?: string;
|
|
88
|
-
arguments: [
|
|
88
|
+
arguments: [TransactionArgument];
|
|
89
89
|
}
|
|
90
90
|
export function deserializeU64(options: DeserializeU64Options) {
|
|
91
91
|
const packageAddress =
|
|
@@ -101,7 +101,7 @@ export function deserializeU64(options: DeserializeU64Options) {
|
|
|
101
101
|
}
|
|
102
102
|
export interface DeserializeI64Options {
|
|
103
103
|
package?: string;
|
|
104
|
-
arguments: [
|
|
104
|
+
arguments: [TransactionArgument];
|
|
105
105
|
}
|
|
106
106
|
export function deserializeI64(options: DeserializeI64Options) {
|
|
107
107
|
const packageAddress =
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
**************************************************************/
|
|
4
4
|
import { MoveStruct, normalizeMoveArguments, type RawTransactionArgument } from '../utils/index.js';
|
|
5
5
|
import { bcs } from '@mysten/sui/bcs';
|
|
6
|
-
import { type Transaction } from '@mysten/sui/transactions';
|
|
6
|
+
import { type Transaction, type TransactionArgument } from '@mysten/sui/transactions';
|
|
7
7
|
import * as bytes32 from './deps/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/bytes32.js';
|
|
8
8
|
const $moduleName =
|
|
9
9
|
'0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837::governance';
|
|
@@ -17,7 +17,7 @@ export const WormholeVAAVerificationReceipt = new MoveStruct({
|
|
|
17
17
|
});
|
|
18
18
|
export interface TakePayloadOptions {
|
|
19
19
|
package?: string;
|
|
20
|
-
arguments: [
|
|
20
|
+
arguments: [TransactionArgument];
|
|
21
21
|
}
|
|
22
22
|
export function takePayload(options: TakePayloadOptions) {
|
|
23
23
|
const packageAddress =
|
|
@@ -33,7 +33,7 @@ export function takePayload(options: TakePayloadOptions) {
|
|
|
33
33
|
}
|
|
34
34
|
export interface TakeDigestOptions {
|
|
35
35
|
package?: string;
|
|
36
|
-
arguments: [
|
|
36
|
+
arguments: [TransactionArgument];
|
|
37
37
|
}
|
|
38
38
|
export function takeDigest(options: TakeDigestOptions) {
|
|
39
39
|
const packageAddress =
|
|
@@ -49,7 +49,7 @@ export function takeDigest(options: TakeDigestOptions) {
|
|
|
49
49
|
}
|
|
50
50
|
export interface TakeSequenceOptions {
|
|
51
51
|
package?: string;
|
|
52
|
-
arguments: [
|
|
52
|
+
arguments: [TransactionArgument];
|
|
53
53
|
}
|
|
54
54
|
export function takeSequence(options: TakeSequenceOptions) {
|
|
55
55
|
const packageAddress =
|
|
@@ -65,7 +65,7 @@ export function takeSequence(options: TakeSequenceOptions) {
|
|
|
65
65
|
}
|
|
66
66
|
export interface DestroyOptions {
|
|
67
67
|
package?: string;
|
|
68
|
-
arguments: [
|
|
68
|
+
arguments: [TransactionArgument];
|
|
69
69
|
}
|
|
70
70
|
export function destroy(options: DestroyOptions) {
|
|
71
71
|
const packageAddress =
|
|
@@ -81,7 +81,7 @@ export function destroy(options: DestroyOptions) {
|
|
|
81
81
|
}
|
|
82
82
|
export interface VerifyVaaOptions {
|
|
83
83
|
package?: string;
|
|
84
|
-
arguments: [RawTransactionArgument<string>,
|
|
84
|
+
arguments: [RawTransactionArgument<string>, TransactionArgument];
|
|
85
85
|
}
|
|
86
86
|
export function verifyVaa(options: VerifyVaaOptions) {
|
|
87
87
|
const packageAddress =
|
|
@@ -97,7 +97,7 @@ export function verifyVaa(options: VerifyVaaOptions) {
|
|
|
97
97
|
}
|
|
98
98
|
export interface ExecuteGovernanceInstructionOptions {
|
|
99
99
|
package?: string;
|
|
100
|
-
arguments: [RawTransactionArgument<string>,
|
|
100
|
+
arguments: [RawTransactionArgument<string>, TransactionArgument];
|
|
101
101
|
}
|
|
102
102
|
export function executeGovernanceInstruction(options: ExecuteGovernanceInstructionOptions) {
|
|
103
103
|
const packageAddress =
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
**************************************************************/
|
|
4
4
|
import { MoveStruct, normalizeMoveArguments, type RawTransactionArgument } from '../utils/index.js';
|
|
5
5
|
import { bcs } from '@mysten/sui/bcs';
|
|
6
|
-
import { type Transaction } from '@mysten/sui/transactions';
|
|
6
|
+
import { type Transaction, type TransactionArgument } from '@mysten/sui/transactions';
|
|
7
7
|
const $moduleName =
|
|
8
8
|
'0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837::governance_action';
|
|
9
9
|
export const GovernanceAction = new MoveStruct({
|
|
@@ -30,7 +30,7 @@ export function fromU8(options: FromU8Options) {
|
|
|
30
30
|
}
|
|
31
31
|
export interface GetValueOptions {
|
|
32
32
|
package?: string;
|
|
33
|
-
arguments: [
|
|
33
|
+
arguments: [TransactionArgument];
|
|
34
34
|
}
|
|
35
35
|
export function getValue(options: GetValueOptions) {
|
|
36
36
|
const packageAddress =
|