@glamsystems/glam-sdk 0.2.0-alpha.0 → 0.2.0-alpha.2
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/index.cjs.js +1857 -233
- package/index.esm.js +1837 -234
- package/package.json +1 -1
- package/src/client/base.d.ts +2 -1
- package/src/client/drift.d.ts +1 -0
- package/src/client/vault.d.ts +18 -1
- package/src/constants.d.ts +17 -0
- package/src/deser/driftLayouts.d.ts +18 -0
- package/src/deser/integrationPolicies.d.ts +14 -0
- package/src/glamExports.d.ts +3 -0
- package/src/index.d.ts +3 -0
- package/src/react/glam.d.ts +3 -2
- package/src/utils/evm.d.ts +6 -0
- package/target/types/ext_cctp.d.ts +1265 -0
- package/target/types/ext_drift.d.ts +4 -4
package/index.cjs.js
CHANGED
|
@@ -31,14 +31,14 @@ function _interopNamespaceDefault(e) {
|
|
|
31
31
|
var anchor__namespace = /*#__PURE__*/_interopNamespaceDefault(anchor);
|
|
32
32
|
var borsh__namespace = /*#__PURE__*/_interopNamespaceDefault(borsh);
|
|
33
33
|
|
|
34
|
-
var address$
|
|
35
|
-
var metadata$
|
|
34
|
+
var address$8 = "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz";
|
|
35
|
+
var metadata$8 = {
|
|
36
36
|
name: "glam_protocol",
|
|
37
37
|
version: "0.4.36",
|
|
38
38
|
spec: "0.1.0",
|
|
39
39
|
description: "Glam Protocol"
|
|
40
40
|
};
|
|
41
|
-
var instructions$
|
|
41
|
+
var instructions$8 = [
|
|
42
42
|
{
|
|
43
43
|
name: "close_state",
|
|
44
44
|
discriminator: [
|
|
@@ -1607,7 +1607,7 @@ var instructions$7 = [
|
|
|
1607
1607
|
args: []
|
|
1608
1608
|
}
|
|
1609
1609
|
];
|
|
1610
|
-
var accounts$
|
|
1610
|
+
var accounts$8 = [
|
|
1611
1611
|
{
|
|
1612
1612
|
name: "StateAccount",
|
|
1613
1613
|
discriminator: [
|
|
@@ -1904,7 +1904,7 @@ var errors$2 = [
|
|
|
1904
1904
|
msg: "Policy violation: lock-up has not expired"
|
|
1905
1905
|
}
|
|
1906
1906
|
];
|
|
1907
|
-
var types$
|
|
1907
|
+
var types$8 = [
|
|
1908
1908
|
{
|
|
1909
1909
|
name: "AccountType",
|
|
1910
1910
|
type: {
|
|
@@ -3091,7 +3091,7 @@ var types$7 = [
|
|
|
3091
3091
|
}
|
|
3092
3092
|
}
|
|
3093
3093
|
];
|
|
3094
|
-
var constants$
|
|
3094
|
+
var constants$7 = [
|
|
3095
3095
|
{
|
|
3096
3096
|
name: "PROTO_JUPITER_SWAP",
|
|
3097
3097
|
type: "u16",
|
|
@@ -3144,23 +3144,23 @@ var constants$6 = [
|
|
|
3144
3144
|
}
|
|
3145
3145
|
];
|
|
3146
3146
|
var GlamProtocolIdlJson = {
|
|
3147
|
-
address: address$
|
|
3148
|
-
metadata: metadata$
|
|
3149
|
-
instructions: instructions$
|
|
3150
|
-
accounts: accounts$
|
|
3147
|
+
address: address$8,
|
|
3148
|
+
metadata: metadata$8,
|
|
3149
|
+
instructions: instructions$8,
|
|
3150
|
+
accounts: accounts$8,
|
|
3151
3151
|
errors: errors$2,
|
|
3152
|
-
types: types$
|
|
3153
|
-
constants: constants$
|
|
3152
|
+
types: types$8,
|
|
3153
|
+
constants: constants$7
|
|
3154
3154
|
};
|
|
3155
3155
|
|
|
3156
|
-
var address$
|
|
3157
|
-
var metadata$
|
|
3156
|
+
var address$7 = "gConFzxKL9USmwTdJoeQJvfKmqhJ2CyUaXTyQ8v9TGX";
|
|
3157
|
+
var metadata$7 = {
|
|
3158
3158
|
name: "glam_config",
|
|
3159
3159
|
version: "0.1.1",
|
|
3160
3160
|
spec: "0.1.0",
|
|
3161
3161
|
description: "Configuration program for GLAM protocol"
|
|
3162
3162
|
};
|
|
3163
|
-
var instructions$
|
|
3163
|
+
var instructions$7 = [
|
|
3164
3164
|
{
|
|
3165
3165
|
name: "close",
|
|
3166
3166
|
discriminator: [
|
|
@@ -3560,7 +3560,7 @@ var instructions$6 = [
|
|
|
3560
3560
|
]
|
|
3561
3561
|
}
|
|
3562
3562
|
];
|
|
3563
|
-
var accounts$
|
|
3563
|
+
var accounts$7 = [
|
|
3564
3564
|
{
|
|
3565
3565
|
name: "GlobalConfig",
|
|
3566
3566
|
discriminator: [
|
|
@@ -3597,7 +3597,7 @@ var errors$1 = [
|
|
|
3597
3597
|
msg: "Invalid parameters"
|
|
3598
3598
|
}
|
|
3599
3599
|
];
|
|
3600
|
-
var types$
|
|
3600
|
+
var types$7 = [
|
|
3601
3601
|
{
|
|
3602
3602
|
name: "AssetMeta",
|
|
3603
3603
|
type: {
|
|
@@ -3760,22 +3760,22 @@ var types$6 = [
|
|
|
3760
3760
|
}
|
|
3761
3761
|
];
|
|
3762
3762
|
var GlamConfigIdlJson = {
|
|
3763
|
-
address: address$
|
|
3764
|
-
metadata: metadata$
|
|
3765
|
-
instructions: instructions$
|
|
3766
|
-
accounts: accounts$
|
|
3763
|
+
address: address$7,
|
|
3764
|
+
metadata: metadata$7,
|
|
3765
|
+
instructions: instructions$7,
|
|
3766
|
+
accounts: accounts$7,
|
|
3767
3767
|
errors: errors$1,
|
|
3768
|
-
types: types$
|
|
3768
|
+
types: types$7
|
|
3769
3769
|
};
|
|
3770
3770
|
|
|
3771
|
-
var address$
|
|
3772
|
-
var metadata$
|
|
3771
|
+
var address$6 = "GM1NtvvnSXUptTrMCqbogAdZJydZSNv98DoU5AZVLmGh";
|
|
3772
|
+
var metadata$6 = {
|
|
3773
3773
|
name: "glam_mint",
|
|
3774
3774
|
version: "0.1.0",
|
|
3775
3775
|
spec: "0.1.0",
|
|
3776
3776
|
description: "GLAM mint program"
|
|
3777
3777
|
};
|
|
3778
|
-
var instructions$
|
|
3778
|
+
var instructions$6 = [
|
|
3779
3779
|
{
|
|
3780
3780
|
name: "burn_tokens",
|
|
3781
3781
|
discriminator: [
|
|
@@ -8103,7 +8103,7 @@ var instructions$5 = [
|
|
|
8103
8103
|
args: []
|
|
8104
8104
|
}
|
|
8105
8105
|
];
|
|
8106
|
-
var accounts$
|
|
8106
|
+
var accounts$6 = [
|
|
8107
8107
|
{
|
|
8108
8108
|
name: "GlobalConfig",
|
|
8109
8109
|
discriminator: [
|
|
@@ -8201,7 +8201,7 @@ var errors = [
|
|
|
8201
8201
|
msg: "Request queue not empty"
|
|
8202
8202
|
}
|
|
8203
8203
|
];
|
|
8204
|
-
var types$
|
|
8204
|
+
var types$6 = [
|
|
8205
8205
|
{
|
|
8206
8206
|
name: "AccountType",
|
|
8207
8207
|
type: {
|
|
@@ -9592,7 +9592,7 @@ var types$5 = [
|
|
|
9592
9592
|
}
|
|
9593
9593
|
}
|
|
9594
9594
|
];
|
|
9595
|
-
var constants$
|
|
9595
|
+
var constants$6 = [
|
|
9596
9596
|
{
|
|
9597
9597
|
name: "PROTO_MINT",
|
|
9598
9598
|
type: "u16",
|
|
@@ -9635,23 +9635,23 @@ var constants$5 = [
|
|
|
9635
9635
|
}
|
|
9636
9636
|
];
|
|
9637
9637
|
var GlamMintIdlJson = {
|
|
9638
|
-
address: address$
|
|
9639
|
-
metadata: metadata$
|
|
9640
|
-
instructions: instructions$
|
|
9641
|
-
accounts: accounts$
|
|
9638
|
+
address: address$6,
|
|
9639
|
+
metadata: metadata$6,
|
|
9640
|
+
instructions: instructions$6,
|
|
9641
|
+
accounts: accounts$6,
|
|
9642
9642
|
errors: errors,
|
|
9643
|
-
types: types$
|
|
9644
|
-
constants: constants$
|
|
9643
|
+
types: types$6,
|
|
9644
|
+
constants: constants$6
|
|
9645
9645
|
};
|
|
9646
9646
|
|
|
9647
|
-
var address$
|
|
9648
|
-
var metadata$
|
|
9647
|
+
var address$5 = "G1NTsQ36mjPe89HtPYqxKsjY5HmYsDR6CbD2gd2U2pta";
|
|
9648
|
+
var metadata$5 = {
|
|
9649
9649
|
name: "ext_spl",
|
|
9650
9650
|
version: "0.1.0",
|
|
9651
9651
|
spec: "0.1.0",
|
|
9652
9652
|
description: "GLAM extension of SPL token programs"
|
|
9653
9653
|
};
|
|
9654
|
-
var instructions$
|
|
9654
|
+
var instructions$5 = [
|
|
9655
9655
|
{
|
|
9656
9656
|
name: "set_token_transfer_policy",
|
|
9657
9657
|
discriminator: [
|
|
@@ -9905,7 +9905,7 @@ var instructions$4 = [
|
|
|
9905
9905
|
]
|
|
9906
9906
|
}
|
|
9907
9907
|
];
|
|
9908
|
-
var accounts$
|
|
9908
|
+
var accounts$5 = [
|
|
9909
9909
|
{
|
|
9910
9910
|
name: "StateAccount",
|
|
9911
9911
|
discriminator: [
|
|
@@ -9920,7 +9920,7 @@ var accounts$4 = [
|
|
|
9920
9920
|
]
|
|
9921
9921
|
}
|
|
9922
9922
|
];
|
|
9923
|
-
var types$
|
|
9923
|
+
var types$5 = [
|
|
9924
9924
|
{
|
|
9925
9925
|
name: "AccountType",
|
|
9926
9926
|
type: {
|
|
@@ -10895,7 +10895,7 @@ var types$4 = [
|
|
|
10895
10895
|
}
|
|
10896
10896
|
}
|
|
10897
10897
|
];
|
|
10898
|
-
var constants$
|
|
10898
|
+
var constants$5 = [
|
|
10899
10899
|
{
|
|
10900
10900
|
name: "PROTO_TOKEN",
|
|
10901
10901
|
type: "u16",
|
|
@@ -10908,22 +10908,22 @@ var constants$4 = [
|
|
|
10908
10908
|
}
|
|
10909
10909
|
];
|
|
10910
10910
|
var ExtSplIdlJson = {
|
|
10911
|
-
address: address$
|
|
10912
|
-
metadata: metadata$
|
|
10913
|
-
instructions: instructions$
|
|
10914
|
-
accounts: accounts$
|
|
10915
|
-
types: types$
|
|
10916
|
-
constants: constants$
|
|
10911
|
+
address: address$5,
|
|
10912
|
+
metadata: metadata$5,
|
|
10913
|
+
instructions: instructions$5,
|
|
10914
|
+
accounts: accounts$5,
|
|
10915
|
+
types: types$5,
|
|
10916
|
+
constants: constants$5
|
|
10917
10917
|
};
|
|
10918
10918
|
|
|
10919
|
-
var address$
|
|
10920
|
-
var metadata$
|
|
10919
|
+
var address$4 = "G1NTdrBmBpW43msRQmsf7qXSw3MFBNaqJcAkGiRmRq2F";
|
|
10920
|
+
var metadata$4 = {
|
|
10921
10921
|
name: "ext_drift",
|
|
10922
10922
|
version: "0.1.0",
|
|
10923
10923
|
spec: "0.1.0",
|
|
10924
10924
|
description: "GLAM extension of Drift programs"
|
|
10925
10925
|
};
|
|
10926
|
-
var instructions$
|
|
10926
|
+
var instructions$4 = [
|
|
10927
10927
|
{
|
|
10928
10928
|
name: "cancel_orders",
|
|
10929
10929
|
discriminator: [
|
|
@@ -12336,10 +12336,6 @@ var instructions$3 = [
|
|
|
12336
12336
|
writable: true,
|
|
12337
12337
|
signer: true
|
|
12338
12338
|
},
|
|
12339
|
-
{
|
|
12340
|
-
name: "system_program",
|
|
12341
|
-
address: "11111111111111111111111111111111"
|
|
12342
|
-
},
|
|
12343
12339
|
{
|
|
12344
12340
|
name: "integration_authority",
|
|
12345
12341
|
pda: {
|
|
@@ -12381,6 +12377,10 @@ var instructions$3 = [
|
|
|
12381
12377
|
name: "glam_protocol_program",
|
|
12382
12378
|
address: "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
|
|
12383
12379
|
},
|
|
12380
|
+
{
|
|
12381
|
+
name: "system_program",
|
|
12382
|
+
address: "11111111111111111111111111111111"
|
|
12383
|
+
},
|
|
12384
12384
|
{
|
|
12385
12385
|
name: "user",
|
|
12386
12386
|
writable: true
|
|
@@ -13473,7 +13473,7 @@ var instructions$3 = [
|
|
|
13473
13473
|
]
|
|
13474
13474
|
}
|
|
13475
13475
|
];
|
|
13476
|
-
var accounts$
|
|
13476
|
+
var accounts$4 = [
|
|
13477
13477
|
{
|
|
13478
13478
|
name: "StateAccount",
|
|
13479
13479
|
discriminator: [
|
|
@@ -13488,7 +13488,7 @@ var accounts$3 = [
|
|
|
13488
13488
|
]
|
|
13489
13489
|
}
|
|
13490
13490
|
];
|
|
13491
|
-
var types$
|
|
13491
|
+
var types$4 = [
|
|
13492
13492
|
{
|
|
13493
13493
|
name: "AccountType",
|
|
13494
13494
|
type: {
|
|
@@ -14823,7 +14823,7 @@ var types$3 = [
|
|
|
14823
14823
|
}
|
|
14824
14824
|
}
|
|
14825
14825
|
];
|
|
14826
|
-
var constants$
|
|
14826
|
+
var constants$4 = [
|
|
14827
14827
|
{
|
|
14828
14828
|
name: "PROTO_DRIFT_PROTOCOL",
|
|
14829
14829
|
type: "u16",
|
|
@@ -14896,22 +14896,22 @@ var constants$3 = [
|
|
|
14896
14896
|
}
|
|
14897
14897
|
];
|
|
14898
14898
|
var ExtDriftIdlJson = {
|
|
14899
|
-
address: address$
|
|
14900
|
-
metadata: metadata$
|
|
14901
|
-
instructions: instructions$
|
|
14902
|
-
accounts: accounts$
|
|
14903
|
-
types: types$
|
|
14904
|
-
constants: constants$
|
|
14899
|
+
address: address$4,
|
|
14900
|
+
metadata: metadata$4,
|
|
14901
|
+
instructions: instructions$4,
|
|
14902
|
+
accounts: accounts$4,
|
|
14903
|
+
types: types$4,
|
|
14904
|
+
constants: constants$4
|
|
14905
14905
|
};
|
|
14906
14906
|
|
|
14907
|
-
var address$
|
|
14908
|
-
var metadata$
|
|
14907
|
+
var address$3 = "G1NTkDEUR3pkEqGCKZtmtmVzCUEdYa86pezHkwYbLyde";
|
|
14908
|
+
var metadata$3 = {
|
|
14909
14909
|
name: "ext_kamino",
|
|
14910
14910
|
version: "0.1.0",
|
|
14911
14911
|
spec: "0.1.0",
|
|
14912
14912
|
description: "GLAM extension of Kamino programs"
|
|
14913
14913
|
};
|
|
14914
|
-
var instructions$
|
|
14914
|
+
var instructions$3 = [
|
|
14915
14915
|
{
|
|
14916
14916
|
name: "farms_harvest_reward",
|
|
14917
14917
|
discriminator: [
|
|
@@ -16691,7 +16691,7 @@ var instructions$2 = [
|
|
|
16691
16691
|
]
|
|
16692
16692
|
}
|
|
16693
16693
|
];
|
|
16694
|
-
var accounts$
|
|
16694
|
+
var accounts$3 = [
|
|
16695
16695
|
{
|
|
16696
16696
|
name: "StateAccount",
|
|
16697
16697
|
discriminator: [
|
|
@@ -16706,7 +16706,7 @@ var accounts$2 = [
|
|
|
16706
16706
|
]
|
|
16707
16707
|
}
|
|
16708
16708
|
];
|
|
16709
|
-
var types$
|
|
16709
|
+
var types$3 = [
|
|
16710
16710
|
{
|
|
16711
16711
|
name: "AccountType",
|
|
16712
16712
|
type: {
|
|
@@ -17717,7 +17717,7 @@ var types$2 = [
|
|
|
17717
17717
|
}
|
|
17718
17718
|
}
|
|
17719
17719
|
];
|
|
17720
|
-
var constants$
|
|
17720
|
+
var constants$3 = [
|
|
17721
17721
|
{
|
|
17722
17722
|
name: "PROTO_KAMINO_FARMS",
|
|
17723
17723
|
type: "u16",
|
|
@@ -17785,22 +17785,22 @@ var constants$2 = [
|
|
|
17785
17785
|
}
|
|
17786
17786
|
];
|
|
17787
17787
|
var ExtKaminoIdlJson = {
|
|
17788
|
-
address: address$
|
|
17789
|
-
metadata: metadata$
|
|
17790
|
-
instructions: instructions$
|
|
17791
|
-
accounts: accounts$
|
|
17792
|
-
types: types$
|
|
17793
|
-
constants: constants$
|
|
17788
|
+
address: address$3,
|
|
17789
|
+
metadata: metadata$3,
|
|
17790
|
+
instructions: instructions$3,
|
|
17791
|
+
accounts: accounts$3,
|
|
17792
|
+
types: types$3,
|
|
17793
|
+
constants: constants$3
|
|
17794
17794
|
};
|
|
17795
17795
|
|
|
17796
|
-
var address$
|
|
17797
|
-
var metadata$
|
|
17796
|
+
var address$2 = "G1NTMNMgmgJAWAD9G3toFVMtNcc21dEyHf3fTXc3t74t";
|
|
17797
|
+
var metadata$2 = {
|
|
17798
17798
|
name: "ext_marinade",
|
|
17799
17799
|
version: "0.1.0",
|
|
17800
17800
|
spec: "0.1.0",
|
|
17801
17801
|
description: "GLAM extension for Marinade Finance"
|
|
17802
17802
|
};
|
|
17803
|
-
var instructions$
|
|
17803
|
+
var instructions$2 = [
|
|
17804
17804
|
{
|
|
17805
17805
|
name: "deposit",
|
|
17806
17806
|
docs: [
|
|
@@ -18386,7 +18386,7 @@ var instructions$1 = [
|
|
|
18386
18386
|
]
|
|
18387
18387
|
}
|
|
18388
18388
|
];
|
|
18389
|
-
var accounts$
|
|
18389
|
+
var accounts$2 = [
|
|
18390
18390
|
{
|
|
18391
18391
|
name: "StateAccount",
|
|
18392
18392
|
discriminator: [
|
|
@@ -18401,7 +18401,7 @@ var accounts$1 = [
|
|
|
18401
18401
|
]
|
|
18402
18402
|
}
|
|
18403
18403
|
];
|
|
18404
|
-
var types$
|
|
18404
|
+
var types$2 = [
|
|
18405
18405
|
{
|
|
18406
18406
|
name: "AccountType",
|
|
18407
18407
|
type: {
|
|
@@ -19362,7 +19362,7 @@ var types$1 = [
|
|
|
19362
19362
|
}
|
|
19363
19363
|
}
|
|
19364
19364
|
];
|
|
19365
|
-
var constants$
|
|
19365
|
+
var constants$2 = [
|
|
19366
19366
|
{
|
|
19367
19367
|
name: "PROTO_MARINADE",
|
|
19368
19368
|
type: "u16",
|
|
@@ -19380,22 +19380,22 @@ var constants$1 = [
|
|
|
19380
19380
|
}
|
|
19381
19381
|
];
|
|
19382
19382
|
var ExtMarinadeIdlJson = {
|
|
19383
|
-
address: address$
|
|
19384
|
-
metadata: metadata$
|
|
19385
|
-
instructions: instructions$
|
|
19386
|
-
accounts: accounts$
|
|
19387
|
-
types: types$
|
|
19388
|
-
constants: constants$
|
|
19383
|
+
address: address$2,
|
|
19384
|
+
metadata: metadata$2,
|
|
19385
|
+
instructions: instructions$2,
|
|
19386
|
+
accounts: accounts$2,
|
|
19387
|
+
types: types$2,
|
|
19388
|
+
constants: constants$2
|
|
19389
19389
|
};
|
|
19390
19390
|
|
|
19391
|
-
var address = "G1NTstCVkEhGVQPnPe6r7yEyRTvnp3ta63AFkEKxqg25";
|
|
19392
|
-
var metadata = {
|
|
19391
|
+
var address$1 = "G1NTstCVkEhGVQPnPe6r7yEyRTvnp3ta63AFkEKxqg25";
|
|
19392
|
+
var metadata$1 = {
|
|
19393
19393
|
name: "ext_stake_pool",
|
|
19394
19394
|
version: "0.1.0",
|
|
19395
19395
|
spec: "0.1.0",
|
|
19396
19396
|
description: "GLAM extension for SPL stake pool programs"
|
|
19397
19397
|
};
|
|
19398
|
-
var instructions = [
|
|
19398
|
+
var instructions$1 = [
|
|
19399
19399
|
{
|
|
19400
19400
|
name: "deposit_sol",
|
|
19401
19401
|
discriminator: [
|
|
@@ -19956,7 +19956,7 @@ var instructions = [
|
|
|
19956
19956
|
]
|
|
19957
19957
|
}
|
|
19958
19958
|
];
|
|
19959
|
-
var accounts = [
|
|
19959
|
+
var accounts$1 = [
|
|
19960
19960
|
{
|
|
19961
19961
|
name: "StateAccount",
|
|
19962
19962
|
discriminator: [
|
|
@@ -19971,7 +19971,7 @@ var accounts = [
|
|
|
19971
19971
|
]
|
|
19972
19972
|
}
|
|
19973
19973
|
];
|
|
19974
|
-
var types = [
|
|
19974
|
+
var types$1 = [
|
|
19975
19975
|
{
|
|
19976
19976
|
name: "AccountType",
|
|
19977
19977
|
type: {
|
|
@@ -20932,7 +20932,7 @@ var types = [
|
|
|
20932
20932
|
}
|
|
20933
20933
|
}
|
|
20934
20934
|
];
|
|
20935
|
-
var constants = [
|
|
20935
|
+
var constants$1 = [
|
|
20936
20936
|
{
|
|
20937
20937
|
name: "PROTO_SANCTUM",
|
|
20938
20938
|
type: "u16",
|
|
@@ -20985,105 +20985,1491 @@ var constants = [
|
|
|
20985
20985
|
}
|
|
20986
20986
|
];
|
|
20987
20987
|
var ExtStakePoolIdlJson = {
|
|
20988
|
-
address: address,
|
|
20989
|
-
metadata: metadata,
|
|
20990
|
-
instructions: instructions,
|
|
20991
|
-
accounts: accounts,
|
|
20992
|
-
types: types,
|
|
20993
|
-
constants: constants
|
|
20988
|
+
address: address$1,
|
|
20989
|
+
metadata: metadata$1,
|
|
20990
|
+
instructions: instructions$1,
|
|
20991
|
+
accounts: accounts$1,
|
|
20992
|
+
types: types$1,
|
|
20993
|
+
constants: constants$1
|
|
20994
20994
|
};
|
|
20995
20995
|
|
|
20996
|
-
|
|
20997
|
-
|
|
20998
|
-
|
|
20999
|
-
|
|
21000
|
-
|
|
21001
|
-
|
|
21002
|
-
|
|
21003
|
-
|
|
21004
|
-
|
|
21005
|
-
|
|
21006
|
-
|
|
21007
|
-
|
|
21008
|
-
|
|
21009
|
-
|
|
21010
|
-
|
|
21011
|
-
|
|
21012
|
-
|
|
21013
|
-
|
|
21014
|
-
|
|
21015
|
-
|
|
21016
|
-
|
|
21017
|
-
|
|
21018
|
-
|
|
21019
|
-
|
|
21020
|
-
|
|
21021
|
-
|
|
21022
|
-
|
|
21023
|
-
|
|
21024
|
-
|
|
21025
|
-
|
|
21026
|
-
|
|
21027
|
-
|
|
21028
|
-
|
|
21029
|
-
|
|
21030
|
-
|
|
21031
|
-
|
|
21032
|
-
|
|
21033
|
-
|
|
21034
|
-
|
|
21035
|
-
|
|
21036
|
-
|
|
21037
|
-
|
|
21038
|
-
|
|
21039
|
-
|
|
21040
|
-
|
|
21041
|
-
|
|
21042
|
-
|
|
21043
|
-
|
|
21044
|
-
|
|
21045
|
-
|
|
21046
|
-
|
|
21047
|
-
|
|
21048
|
-
|
|
21049
|
-
|
|
21050
|
-
|
|
21051
|
-
|
|
21052
|
-
|
|
21053
|
-
|
|
21054
|
-
|
|
21055
|
-
|
|
21056
|
-
|
|
21057
|
-
|
|
21058
|
-
|
|
21059
|
-
|
|
21060
|
-
|
|
21061
|
-
|
|
21062
|
-
|
|
21063
|
-
|
|
21064
|
-
|
|
21065
|
-
|
|
21066
|
-
|
|
21067
|
-
|
|
21068
|
-
|
|
21069
|
-
|
|
21070
|
-
|
|
21071
|
-
|
|
21072
|
-
|
|
21073
|
-
|
|
21074
|
-
|
|
21075
|
-
|
|
21076
|
-
|
|
21077
|
-
|
|
21078
|
-
|
|
21079
|
-
|
|
21080
|
-
|
|
21081
|
-
|
|
21082
|
-
|
|
21083
|
-
|
|
21084
|
-
|
|
21085
|
-
|
|
21086
|
-
|
|
20996
|
+
var address = "G1NTcMDYgNLpDwgnrpSZvoSKQuR9NXG7S3DmtNQCDmrK";
|
|
20997
|
+
var metadata = {
|
|
20998
|
+
name: "ext_cctp",
|
|
20999
|
+
version: "0.1.0",
|
|
21000
|
+
spec: "0.1.0",
|
|
21001
|
+
description: "GLAM extension of CCTP v2"
|
|
21002
|
+
};
|
|
21003
|
+
var instructions = [
|
|
21004
|
+
{
|
|
21005
|
+
name: "deposit_for_burn",
|
|
21006
|
+
discriminator: [
|
|
21007
|
+
215,
|
|
21008
|
+
60,
|
|
21009
|
+
61,
|
|
21010
|
+
46,
|
|
21011
|
+
114,
|
|
21012
|
+
55,
|
|
21013
|
+
128,
|
|
21014
|
+
176
|
|
21015
|
+
],
|
|
21016
|
+
accounts: [
|
|
21017
|
+
{
|
|
21018
|
+
name: "glam_state",
|
|
21019
|
+
writable: true
|
|
21020
|
+
},
|
|
21021
|
+
{
|
|
21022
|
+
name: "glam_vault",
|
|
21023
|
+
writable: true,
|
|
21024
|
+
pda: {
|
|
21025
|
+
seeds: [
|
|
21026
|
+
{
|
|
21027
|
+
kind: "const",
|
|
21028
|
+
value: [
|
|
21029
|
+
118,
|
|
21030
|
+
97,
|
|
21031
|
+
117,
|
|
21032
|
+
108,
|
|
21033
|
+
116
|
|
21034
|
+
]
|
|
21035
|
+
},
|
|
21036
|
+
{
|
|
21037
|
+
kind: "account",
|
|
21038
|
+
path: "glam_state"
|
|
21039
|
+
}
|
|
21040
|
+
],
|
|
21041
|
+
program: {
|
|
21042
|
+
kind: "account",
|
|
21043
|
+
path: "glam_protocol_program"
|
|
21044
|
+
}
|
|
21045
|
+
}
|
|
21046
|
+
},
|
|
21047
|
+
{
|
|
21048
|
+
name: "glam_signer",
|
|
21049
|
+
writable: true,
|
|
21050
|
+
signer: true
|
|
21051
|
+
},
|
|
21052
|
+
{
|
|
21053
|
+
name: "integration_authority",
|
|
21054
|
+
pda: {
|
|
21055
|
+
seeds: [
|
|
21056
|
+
{
|
|
21057
|
+
kind: "const",
|
|
21058
|
+
value: [
|
|
21059
|
+
105,
|
|
21060
|
+
110,
|
|
21061
|
+
116,
|
|
21062
|
+
101,
|
|
21063
|
+
103,
|
|
21064
|
+
114,
|
|
21065
|
+
97,
|
|
21066
|
+
116,
|
|
21067
|
+
105,
|
|
21068
|
+
111,
|
|
21069
|
+
110,
|
|
21070
|
+
45,
|
|
21071
|
+
97,
|
|
21072
|
+
117,
|
|
21073
|
+
116,
|
|
21074
|
+
104,
|
|
21075
|
+
111,
|
|
21076
|
+
114,
|
|
21077
|
+
105,
|
|
21078
|
+
116,
|
|
21079
|
+
121
|
|
21080
|
+
]
|
|
21081
|
+
}
|
|
21082
|
+
]
|
|
21083
|
+
}
|
|
21084
|
+
},
|
|
21085
|
+
{
|
|
21086
|
+
name: "cpi_program",
|
|
21087
|
+
address: "CCTPV2vPZJS2u2BBsUoscuikbYjnpFmbFsvVuJdgUMQe"
|
|
21088
|
+
},
|
|
21089
|
+
{
|
|
21090
|
+
name: "glam_protocol_program",
|
|
21091
|
+
address: "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
|
|
21092
|
+
},
|
|
21093
|
+
{
|
|
21094
|
+
name: "system_program",
|
|
21095
|
+
address: "11111111111111111111111111111111"
|
|
21096
|
+
},
|
|
21097
|
+
{
|
|
21098
|
+
name: "sender_authority_pda"
|
|
21099
|
+
},
|
|
21100
|
+
{
|
|
21101
|
+
name: "burn_token_account",
|
|
21102
|
+
writable: true
|
|
21103
|
+
},
|
|
21104
|
+
{
|
|
21105
|
+
name: "denylist_account"
|
|
21106
|
+
},
|
|
21107
|
+
{
|
|
21108
|
+
name: "message_transmitter",
|
|
21109
|
+
writable: true
|
|
21110
|
+
},
|
|
21111
|
+
{
|
|
21112
|
+
name: "token_messenger"
|
|
21113
|
+
},
|
|
21114
|
+
{
|
|
21115
|
+
name: "remote_token_messenger"
|
|
21116
|
+
},
|
|
21117
|
+
{
|
|
21118
|
+
name: "token_minter"
|
|
21119
|
+
},
|
|
21120
|
+
{
|
|
21121
|
+
name: "local_token",
|
|
21122
|
+
writable: true
|
|
21123
|
+
},
|
|
21124
|
+
{
|
|
21125
|
+
name: "burn_token_mint",
|
|
21126
|
+
writable: true
|
|
21127
|
+
},
|
|
21128
|
+
{
|
|
21129
|
+
name: "message_sent_event_data",
|
|
21130
|
+
writable: true,
|
|
21131
|
+
signer: true
|
|
21132
|
+
},
|
|
21133
|
+
{
|
|
21134
|
+
name: "message_transmitter_program",
|
|
21135
|
+
address: "CCTPV2Sm4AdWt5296sk4P66VBZ7bEhcARwFaaS9YPbeC"
|
|
21136
|
+
},
|
|
21137
|
+
{
|
|
21138
|
+
name: "token_messenger_minter_program",
|
|
21139
|
+
address: "CCTPV2vPZJS2u2BBsUoscuikbYjnpFmbFsvVuJdgUMQe"
|
|
21140
|
+
},
|
|
21141
|
+
{
|
|
21142
|
+
name: "token_program",
|
|
21143
|
+
address: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
|
|
21144
|
+
},
|
|
21145
|
+
{
|
|
21146
|
+
name: "event_authority"
|
|
21147
|
+
}
|
|
21148
|
+
],
|
|
21149
|
+
args: [
|
|
21150
|
+
{
|
|
21151
|
+
name: "args",
|
|
21152
|
+
type: {
|
|
21153
|
+
defined: {
|
|
21154
|
+
name: "DepositForBurnParams"
|
|
21155
|
+
}
|
|
21156
|
+
}
|
|
21157
|
+
}
|
|
21158
|
+
]
|
|
21159
|
+
},
|
|
21160
|
+
{
|
|
21161
|
+
name: "set_cctp_policy",
|
|
21162
|
+
discriminator: [
|
|
21163
|
+
32,
|
|
21164
|
+
88,
|
|
21165
|
+
254,
|
|
21166
|
+
15,
|
|
21167
|
+
2,
|
|
21168
|
+
206,
|
|
21169
|
+
222,
|
|
21170
|
+
234
|
|
21171
|
+
],
|
|
21172
|
+
accounts: [
|
|
21173
|
+
{
|
|
21174
|
+
name: "glam_state",
|
|
21175
|
+
writable: true
|
|
21176
|
+
},
|
|
21177
|
+
{
|
|
21178
|
+
name: "glam_signer",
|
|
21179
|
+
writable: true,
|
|
21180
|
+
signer: true
|
|
21181
|
+
},
|
|
21182
|
+
{
|
|
21183
|
+
name: "glam_protocol_program",
|
|
21184
|
+
address: "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
|
|
21185
|
+
}
|
|
21186
|
+
],
|
|
21187
|
+
args: [
|
|
21188
|
+
{
|
|
21189
|
+
name: "policy",
|
|
21190
|
+
type: {
|
|
21191
|
+
defined: {
|
|
21192
|
+
name: "CctpPolicy"
|
|
21193
|
+
}
|
|
21194
|
+
}
|
|
21195
|
+
}
|
|
21196
|
+
]
|
|
21197
|
+
}
|
|
21198
|
+
];
|
|
21199
|
+
var accounts = [
|
|
21200
|
+
{
|
|
21201
|
+
name: "StateAccount",
|
|
21202
|
+
discriminator: [
|
|
21203
|
+
142,
|
|
21204
|
+
247,
|
|
21205
|
+
54,
|
|
21206
|
+
95,
|
|
21207
|
+
85,
|
|
21208
|
+
133,
|
|
21209
|
+
249,
|
|
21210
|
+
103
|
|
21211
|
+
]
|
|
21212
|
+
}
|
|
21213
|
+
];
|
|
21214
|
+
var types = [
|
|
21215
|
+
{
|
|
21216
|
+
name: "AccountType",
|
|
21217
|
+
type: {
|
|
21218
|
+
kind: "enum",
|
|
21219
|
+
variants: [
|
|
21220
|
+
{
|
|
21221
|
+
name: "Vault"
|
|
21222
|
+
},
|
|
21223
|
+
{
|
|
21224
|
+
name: "TokenizedVault"
|
|
21225
|
+
},
|
|
21226
|
+
{
|
|
21227
|
+
name: "Mint"
|
|
21228
|
+
}
|
|
21229
|
+
]
|
|
21230
|
+
}
|
|
21231
|
+
},
|
|
21232
|
+
{
|
|
21233
|
+
name: "AccruedFees",
|
|
21234
|
+
type: {
|
|
21235
|
+
kind: "struct",
|
|
21236
|
+
fields: [
|
|
21237
|
+
{
|
|
21238
|
+
name: "vault_subscription_fee",
|
|
21239
|
+
type: "u128"
|
|
21240
|
+
},
|
|
21241
|
+
{
|
|
21242
|
+
name: "vault_redemption_fee",
|
|
21243
|
+
type: "u128"
|
|
21244
|
+
},
|
|
21245
|
+
{
|
|
21246
|
+
name: "manager_subscription_fee",
|
|
21247
|
+
type: "u128"
|
|
21248
|
+
},
|
|
21249
|
+
{
|
|
21250
|
+
name: "manager_redemption_fee",
|
|
21251
|
+
type: "u128"
|
|
21252
|
+
},
|
|
21253
|
+
{
|
|
21254
|
+
name: "management_fee",
|
|
21255
|
+
type: "u128"
|
|
21256
|
+
},
|
|
21257
|
+
{
|
|
21258
|
+
name: "performance_fee",
|
|
21259
|
+
type: "u128"
|
|
21260
|
+
},
|
|
21261
|
+
{
|
|
21262
|
+
name: "protocol_base_fee",
|
|
21263
|
+
type: "u128"
|
|
21264
|
+
},
|
|
21265
|
+
{
|
|
21266
|
+
name: "protocol_flow_fee",
|
|
21267
|
+
type: "u128"
|
|
21268
|
+
}
|
|
21269
|
+
]
|
|
21270
|
+
}
|
|
21271
|
+
},
|
|
21272
|
+
{
|
|
21273
|
+
name: "CctpDestination",
|
|
21274
|
+
type: {
|
|
21275
|
+
kind: "struct",
|
|
21276
|
+
fields: [
|
|
21277
|
+
{
|
|
21278
|
+
name: "domain",
|
|
21279
|
+
type: "u32"
|
|
21280
|
+
},
|
|
21281
|
+
{
|
|
21282
|
+
name: "address",
|
|
21283
|
+
type: "pubkey"
|
|
21284
|
+
}
|
|
21285
|
+
]
|
|
21286
|
+
}
|
|
21287
|
+
},
|
|
21288
|
+
{
|
|
21289
|
+
name: "CctpPolicy",
|
|
21290
|
+
type: {
|
|
21291
|
+
kind: "struct",
|
|
21292
|
+
fields: [
|
|
21293
|
+
{
|
|
21294
|
+
name: "allowed_destinations",
|
|
21295
|
+
type: {
|
|
21296
|
+
vec: {
|
|
21297
|
+
defined: {
|
|
21298
|
+
name: "CctpDestination"
|
|
21299
|
+
}
|
|
21300
|
+
}
|
|
21301
|
+
}
|
|
21302
|
+
}
|
|
21303
|
+
]
|
|
21304
|
+
}
|
|
21305
|
+
},
|
|
21306
|
+
{
|
|
21307
|
+
name: "CreatedModel",
|
|
21308
|
+
type: {
|
|
21309
|
+
kind: "struct",
|
|
21310
|
+
fields: [
|
|
21311
|
+
{
|
|
21312
|
+
name: "key",
|
|
21313
|
+
type: {
|
|
21314
|
+
array: [
|
|
21315
|
+
"u8",
|
|
21316
|
+
8
|
|
21317
|
+
]
|
|
21318
|
+
}
|
|
21319
|
+
},
|
|
21320
|
+
{
|
|
21321
|
+
name: "created_by",
|
|
21322
|
+
type: "pubkey"
|
|
21323
|
+
},
|
|
21324
|
+
{
|
|
21325
|
+
name: "created_at",
|
|
21326
|
+
type: "i64"
|
|
21327
|
+
}
|
|
21328
|
+
]
|
|
21329
|
+
}
|
|
21330
|
+
},
|
|
21331
|
+
{
|
|
21332
|
+
name: "DelegateAcl",
|
|
21333
|
+
type: {
|
|
21334
|
+
kind: "struct",
|
|
21335
|
+
fields: [
|
|
21336
|
+
{
|
|
21337
|
+
name: "pubkey",
|
|
21338
|
+
type: "pubkey"
|
|
21339
|
+
},
|
|
21340
|
+
{
|
|
21341
|
+
name: "integration_permissions",
|
|
21342
|
+
type: {
|
|
21343
|
+
vec: {
|
|
21344
|
+
defined: {
|
|
21345
|
+
name: "IntegrationPermissions"
|
|
21346
|
+
}
|
|
21347
|
+
}
|
|
21348
|
+
}
|
|
21349
|
+
},
|
|
21350
|
+
{
|
|
21351
|
+
name: "expires_at",
|
|
21352
|
+
type: "i64"
|
|
21353
|
+
}
|
|
21354
|
+
]
|
|
21355
|
+
}
|
|
21356
|
+
},
|
|
21357
|
+
{
|
|
21358
|
+
name: "DepositForBurnParams",
|
|
21359
|
+
type: {
|
|
21360
|
+
kind: "struct",
|
|
21361
|
+
fields: [
|
|
21362
|
+
{
|
|
21363
|
+
name: "amount",
|
|
21364
|
+
type: "u64"
|
|
21365
|
+
},
|
|
21366
|
+
{
|
|
21367
|
+
name: "destination_domain",
|
|
21368
|
+
type: "u32"
|
|
21369
|
+
},
|
|
21370
|
+
{
|
|
21371
|
+
name: "mint_recipient",
|
|
21372
|
+
type: "pubkey"
|
|
21373
|
+
},
|
|
21374
|
+
{
|
|
21375
|
+
name: "destination_caller",
|
|
21376
|
+
type: "pubkey"
|
|
21377
|
+
},
|
|
21378
|
+
{
|
|
21379
|
+
name: "max_fee",
|
|
21380
|
+
type: "u64"
|
|
21381
|
+
},
|
|
21382
|
+
{
|
|
21383
|
+
name: "min_finality_threshold",
|
|
21384
|
+
type: "u32"
|
|
21385
|
+
}
|
|
21386
|
+
]
|
|
21387
|
+
}
|
|
21388
|
+
},
|
|
21389
|
+
{
|
|
21390
|
+
name: "EngineField",
|
|
21391
|
+
type: {
|
|
21392
|
+
kind: "struct",
|
|
21393
|
+
fields: [
|
|
21394
|
+
{
|
|
21395
|
+
name: "name",
|
|
21396
|
+
type: {
|
|
21397
|
+
defined: {
|
|
21398
|
+
name: "EngineFieldName"
|
|
21399
|
+
}
|
|
21400
|
+
}
|
|
21401
|
+
},
|
|
21402
|
+
{
|
|
21403
|
+
name: "value",
|
|
21404
|
+
type: {
|
|
21405
|
+
defined: {
|
|
21406
|
+
name: "EngineFieldValue"
|
|
21407
|
+
}
|
|
21408
|
+
}
|
|
21409
|
+
}
|
|
21410
|
+
]
|
|
21411
|
+
}
|
|
21412
|
+
},
|
|
21413
|
+
{
|
|
21414
|
+
name: "EngineFieldName",
|
|
21415
|
+
type: {
|
|
21416
|
+
kind: "enum",
|
|
21417
|
+
variants: [
|
|
21418
|
+
{
|
|
21419
|
+
name: "Owner"
|
|
21420
|
+
},
|
|
21421
|
+
{
|
|
21422
|
+
name: "PortfolioManagerName"
|
|
21423
|
+
},
|
|
21424
|
+
{
|
|
21425
|
+
name: "Name"
|
|
21426
|
+
},
|
|
21427
|
+
{
|
|
21428
|
+
name: "Uri"
|
|
21429
|
+
},
|
|
21430
|
+
{
|
|
21431
|
+
name: "Assets"
|
|
21432
|
+
},
|
|
21433
|
+
{
|
|
21434
|
+
name: "DelegateAcls"
|
|
21435
|
+
},
|
|
21436
|
+
{
|
|
21437
|
+
name: "IntegrationAcls"
|
|
21438
|
+
},
|
|
21439
|
+
{
|
|
21440
|
+
name: "TimelockDuration"
|
|
21441
|
+
},
|
|
21442
|
+
{
|
|
21443
|
+
name: "Borrowable"
|
|
21444
|
+
},
|
|
21445
|
+
{
|
|
21446
|
+
name: "DefaultAccountStateFrozen"
|
|
21447
|
+
},
|
|
21448
|
+
{
|
|
21449
|
+
name: "PermanentDelegate"
|
|
21450
|
+
},
|
|
21451
|
+
{
|
|
21452
|
+
name: "NotifyAndSettle"
|
|
21453
|
+
},
|
|
21454
|
+
{
|
|
21455
|
+
name: "FeeStructure"
|
|
21456
|
+
},
|
|
21457
|
+
{
|
|
21458
|
+
name: "FeeParams"
|
|
21459
|
+
},
|
|
21460
|
+
{
|
|
21461
|
+
name: "ClaimableFees"
|
|
21462
|
+
},
|
|
21463
|
+
{
|
|
21464
|
+
name: "ClaimedFees"
|
|
21465
|
+
},
|
|
21466
|
+
{
|
|
21467
|
+
name: "OracleConfigs"
|
|
21468
|
+
}
|
|
21469
|
+
]
|
|
21470
|
+
}
|
|
21471
|
+
},
|
|
21472
|
+
{
|
|
21473
|
+
name: "EngineFieldValue",
|
|
21474
|
+
type: {
|
|
21475
|
+
kind: "enum",
|
|
21476
|
+
variants: [
|
|
21477
|
+
{
|
|
21478
|
+
name: "Boolean",
|
|
21479
|
+
fields: [
|
|
21480
|
+
{
|
|
21481
|
+
name: "val",
|
|
21482
|
+
type: "bool"
|
|
21483
|
+
}
|
|
21484
|
+
]
|
|
21485
|
+
},
|
|
21486
|
+
{
|
|
21487
|
+
name: "U8",
|
|
21488
|
+
fields: [
|
|
21489
|
+
{
|
|
21490
|
+
name: "val",
|
|
21491
|
+
type: "u8"
|
|
21492
|
+
}
|
|
21493
|
+
]
|
|
21494
|
+
},
|
|
21495
|
+
{
|
|
21496
|
+
name: "U32",
|
|
21497
|
+
fields: [
|
|
21498
|
+
{
|
|
21499
|
+
name: "val",
|
|
21500
|
+
type: "u32"
|
|
21501
|
+
}
|
|
21502
|
+
]
|
|
21503
|
+
},
|
|
21504
|
+
{
|
|
21505
|
+
name: "U64",
|
|
21506
|
+
fields: [
|
|
21507
|
+
{
|
|
21508
|
+
name: "val",
|
|
21509
|
+
type: "u64"
|
|
21510
|
+
}
|
|
21511
|
+
]
|
|
21512
|
+
},
|
|
21513
|
+
{
|
|
21514
|
+
name: "String",
|
|
21515
|
+
fields: [
|
|
21516
|
+
{
|
|
21517
|
+
name: "val",
|
|
21518
|
+
type: "string"
|
|
21519
|
+
}
|
|
21520
|
+
]
|
|
21521
|
+
},
|
|
21522
|
+
{
|
|
21523
|
+
name: "Pubkey",
|
|
21524
|
+
fields: [
|
|
21525
|
+
{
|
|
21526
|
+
name: "val",
|
|
21527
|
+
type: "pubkey"
|
|
21528
|
+
}
|
|
21529
|
+
]
|
|
21530
|
+
},
|
|
21531
|
+
{
|
|
21532
|
+
name: "VecPubkey",
|
|
21533
|
+
fields: [
|
|
21534
|
+
{
|
|
21535
|
+
name: "val",
|
|
21536
|
+
type: {
|
|
21537
|
+
vec: "pubkey"
|
|
21538
|
+
}
|
|
21539
|
+
}
|
|
21540
|
+
]
|
|
21541
|
+
},
|
|
21542
|
+
{
|
|
21543
|
+
name: "VecU8",
|
|
21544
|
+
fields: [
|
|
21545
|
+
{
|
|
21546
|
+
name: "val",
|
|
21547
|
+
type: "bytes"
|
|
21548
|
+
}
|
|
21549
|
+
]
|
|
21550
|
+
},
|
|
21551
|
+
{
|
|
21552
|
+
name: "VecU32",
|
|
21553
|
+
fields: [
|
|
21554
|
+
{
|
|
21555
|
+
name: "val",
|
|
21556
|
+
type: {
|
|
21557
|
+
vec: "u32"
|
|
21558
|
+
}
|
|
21559
|
+
}
|
|
21560
|
+
]
|
|
21561
|
+
},
|
|
21562
|
+
{
|
|
21563
|
+
name: "VecDelegateAcl",
|
|
21564
|
+
fields: [
|
|
21565
|
+
{
|
|
21566
|
+
name: "val",
|
|
21567
|
+
type: {
|
|
21568
|
+
vec: {
|
|
21569
|
+
defined: {
|
|
21570
|
+
name: "DelegateAcl"
|
|
21571
|
+
}
|
|
21572
|
+
}
|
|
21573
|
+
}
|
|
21574
|
+
}
|
|
21575
|
+
]
|
|
21576
|
+
},
|
|
21577
|
+
{
|
|
21578
|
+
name: "VecIntegrationAcl",
|
|
21579
|
+
fields: [
|
|
21580
|
+
{
|
|
21581
|
+
name: "val",
|
|
21582
|
+
type: {
|
|
21583
|
+
vec: {
|
|
21584
|
+
defined: {
|
|
21585
|
+
name: "IntegrationAcl"
|
|
21586
|
+
}
|
|
21587
|
+
}
|
|
21588
|
+
}
|
|
21589
|
+
}
|
|
21590
|
+
]
|
|
21591
|
+
},
|
|
21592
|
+
{
|
|
21593
|
+
name: "FeeStructure",
|
|
21594
|
+
fields: [
|
|
21595
|
+
{
|
|
21596
|
+
name: "val",
|
|
21597
|
+
type: {
|
|
21598
|
+
defined: {
|
|
21599
|
+
name: "FeeStructure"
|
|
21600
|
+
}
|
|
21601
|
+
}
|
|
21602
|
+
}
|
|
21603
|
+
]
|
|
21604
|
+
},
|
|
21605
|
+
{
|
|
21606
|
+
name: "FeeParams",
|
|
21607
|
+
fields: [
|
|
21608
|
+
{
|
|
21609
|
+
name: "val",
|
|
21610
|
+
type: {
|
|
21611
|
+
defined: {
|
|
21612
|
+
name: "FeeParams"
|
|
21613
|
+
}
|
|
21614
|
+
}
|
|
21615
|
+
}
|
|
21616
|
+
]
|
|
21617
|
+
},
|
|
21618
|
+
{
|
|
21619
|
+
name: "AccruedFees",
|
|
21620
|
+
fields: [
|
|
21621
|
+
{
|
|
21622
|
+
name: "val",
|
|
21623
|
+
type: {
|
|
21624
|
+
defined: {
|
|
21625
|
+
name: "AccruedFees"
|
|
21626
|
+
}
|
|
21627
|
+
}
|
|
21628
|
+
}
|
|
21629
|
+
]
|
|
21630
|
+
},
|
|
21631
|
+
{
|
|
21632
|
+
name: "NotifyAndSettle",
|
|
21633
|
+
fields: [
|
|
21634
|
+
{
|
|
21635
|
+
name: "val",
|
|
21636
|
+
type: {
|
|
21637
|
+
defined: {
|
|
21638
|
+
name: "NotifyAndSettle"
|
|
21639
|
+
}
|
|
21640
|
+
}
|
|
21641
|
+
}
|
|
21642
|
+
]
|
|
21643
|
+
},
|
|
21644
|
+
{
|
|
21645
|
+
name: "OracleConfigs",
|
|
21646
|
+
fields: [
|
|
21647
|
+
{
|
|
21648
|
+
name: "val",
|
|
21649
|
+
type: {
|
|
21650
|
+
defined: {
|
|
21651
|
+
name: "OracleConfigs"
|
|
21652
|
+
}
|
|
21653
|
+
}
|
|
21654
|
+
}
|
|
21655
|
+
]
|
|
21656
|
+
}
|
|
21657
|
+
]
|
|
21658
|
+
}
|
|
21659
|
+
},
|
|
21660
|
+
{
|
|
21661
|
+
name: "EntryExitFees",
|
|
21662
|
+
type: {
|
|
21663
|
+
kind: "struct",
|
|
21664
|
+
fields: [
|
|
21665
|
+
{
|
|
21666
|
+
name: "subscription_fee_bps",
|
|
21667
|
+
type: "u16"
|
|
21668
|
+
},
|
|
21669
|
+
{
|
|
21670
|
+
name: "redemption_fee_bps",
|
|
21671
|
+
type: "u16"
|
|
21672
|
+
}
|
|
21673
|
+
]
|
|
21674
|
+
}
|
|
21675
|
+
},
|
|
21676
|
+
{
|
|
21677
|
+
name: "FeeParams",
|
|
21678
|
+
type: {
|
|
21679
|
+
kind: "struct",
|
|
21680
|
+
fields: [
|
|
21681
|
+
{
|
|
21682
|
+
name: "year_in_seconds",
|
|
21683
|
+
type: "u32"
|
|
21684
|
+
},
|
|
21685
|
+
{
|
|
21686
|
+
name: "pa_high_water_mark",
|
|
21687
|
+
type: "i128"
|
|
21688
|
+
},
|
|
21689
|
+
{
|
|
21690
|
+
name: "pa_last_nav",
|
|
21691
|
+
type: "i128"
|
|
21692
|
+
},
|
|
21693
|
+
{
|
|
21694
|
+
name: "last_aum",
|
|
21695
|
+
type: "i128"
|
|
21696
|
+
},
|
|
21697
|
+
{
|
|
21698
|
+
name: "last_performance_fee_crystallized",
|
|
21699
|
+
type: "i64"
|
|
21700
|
+
},
|
|
21701
|
+
{
|
|
21702
|
+
name: "last_management_fee_crystallized",
|
|
21703
|
+
type: "i64"
|
|
21704
|
+
},
|
|
21705
|
+
{
|
|
21706
|
+
name: "last_protocol_fee_crystallized",
|
|
21707
|
+
type: "i64"
|
|
21708
|
+
}
|
|
21709
|
+
]
|
|
21710
|
+
}
|
|
21711
|
+
},
|
|
21712
|
+
{
|
|
21713
|
+
name: "FeeStructure",
|
|
21714
|
+
type: {
|
|
21715
|
+
kind: "struct",
|
|
21716
|
+
fields: [
|
|
21717
|
+
{
|
|
21718
|
+
name: "vault",
|
|
21719
|
+
type: {
|
|
21720
|
+
defined: {
|
|
21721
|
+
name: "EntryExitFees"
|
|
21722
|
+
}
|
|
21723
|
+
}
|
|
21724
|
+
},
|
|
21725
|
+
{
|
|
21726
|
+
name: "manager",
|
|
21727
|
+
type: {
|
|
21728
|
+
defined: {
|
|
21729
|
+
name: "EntryExitFees"
|
|
21730
|
+
}
|
|
21731
|
+
}
|
|
21732
|
+
},
|
|
21733
|
+
{
|
|
21734
|
+
name: "management",
|
|
21735
|
+
type: {
|
|
21736
|
+
defined: {
|
|
21737
|
+
name: "ManagementFee"
|
|
21738
|
+
}
|
|
21739
|
+
}
|
|
21740
|
+
},
|
|
21741
|
+
{
|
|
21742
|
+
name: "performance",
|
|
21743
|
+
type: {
|
|
21744
|
+
defined: {
|
|
21745
|
+
name: "PerformanceFee"
|
|
21746
|
+
}
|
|
21747
|
+
}
|
|
21748
|
+
},
|
|
21749
|
+
{
|
|
21750
|
+
name: "protocol",
|
|
21751
|
+
type: {
|
|
21752
|
+
defined: {
|
|
21753
|
+
name: "ProtocolFees"
|
|
21754
|
+
}
|
|
21755
|
+
}
|
|
21756
|
+
}
|
|
21757
|
+
]
|
|
21758
|
+
}
|
|
21759
|
+
},
|
|
21760
|
+
{
|
|
21761
|
+
name: "HurdleType",
|
|
21762
|
+
type: {
|
|
21763
|
+
kind: "enum",
|
|
21764
|
+
variants: [
|
|
21765
|
+
{
|
|
21766
|
+
name: "Hard"
|
|
21767
|
+
},
|
|
21768
|
+
{
|
|
21769
|
+
name: "Soft"
|
|
21770
|
+
}
|
|
21771
|
+
]
|
|
21772
|
+
}
|
|
21773
|
+
},
|
|
21774
|
+
{
|
|
21775
|
+
name: "IntegrationAcl",
|
|
21776
|
+
docs: [
|
|
21777
|
+
"An integration program can have multiple protocols supported.",
|
|
21778
|
+
"Enabled protocols are stored in a bitmask, and each protocol can have its own policy."
|
|
21779
|
+
],
|
|
21780
|
+
type: {
|
|
21781
|
+
kind: "struct",
|
|
21782
|
+
fields: [
|
|
21783
|
+
{
|
|
21784
|
+
name: "integration_program",
|
|
21785
|
+
type: "pubkey"
|
|
21786
|
+
},
|
|
21787
|
+
{
|
|
21788
|
+
name: "protocols_bitmask",
|
|
21789
|
+
type: "u16"
|
|
21790
|
+
},
|
|
21791
|
+
{
|
|
21792
|
+
name: "protocol_policies",
|
|
21793
|
+
type: {
|
|
21794
|
+
vec: {
|
|
21795
|
+
defined: {
|
|
21796
|
+
name: "ProtocolPolicy"
|
|
21797
|
+
}
|
|
21798
|
+
}
|
|
21799
|
+
}
|
|
21800
|
+
}
|
|
21801
|
+
]
|
|
21802
|
+
}
|
|
21803
|
+
},
|
|
21804
|
+
{
|
|
21805
|
+
name: "IntegrationPermissions",
|
|
21806
|
+
docs: [
|
|
21807
|
+
"Stores delegate permissions for an integration program."
|
|
21808
|
+
],
|
|
21809
|
+
type: {
|
|
21810
|
+
kind: "struct",
|
|
21811
|
+
fields: [
|
|
21812
|
+
{
|
|
21813
|
+
name: "integration_program",
|
|
21814
|
+
type: "pubkey"
|
|
21815
|
+
},
|
|
21816
|
+
{
|
|
21817
|
+
name: "protocol_permissions",
|
|
21818
|
+
type: {
|
|
21819
|
+
vec: {
|
|
21820
|
+
defined: {
|
|
21821
|
+
name: "ProtocolPermissions"
|
|
21822
|
+
}
|
|
21823
|
+
}
|
|
21824
|
+
}
|
|
21825
|
+
}
|
|
21826
|
+
]
|
|
21827
|
+
}
|
|
21828
|
+
},
|
|
21829
|
+
{
|
|
21830
|
+
name: "ManagementFee",
|
|
21831
|
+
type: {
|
|
21832
|
+
kind: "struct",
|
|
21833
|
+
fields: [
|
|
21834
|
+
{
|
|
21835
|
+
name: "fee_bps",
|
|
21836
|
+
type: "u16"
|
|
21837
|
+
}
|
|
21838
|
+
]
|
|
21839
|
+
}
|
|
21840
|
+
},
|
|
21841
|
+
{
|
|
21842
|
+
name: "NoticePeriodType",
|
|
21843
|
+
type: {
|
|
21844
|
+
kind: "enum",
|
|
21845
|
+
variants: [
|
|
21846
|
+
{
|
|
21847
|
+
name: "Hard"
|
|
21848
|
+
},
|
|
21849
|
+
{
|
|
21850
|
+
name: "Soft"
|
|
21851
|
+
}
|
|
21852
|
+
]
|
|
21853
|
+
}
|
|
21854
|
+
},
|
|
21855
|
+
{
|
|
21856
|
+
name: "NotifyAndSettle",
|
|
21857
|
+
type: {
|
|
21858
|
+
kind: "struct",
|
|
21859
|
+
fields: [
|
|
21860
|
+
{
|
|
21861
|
+
name: "model",
|
|
21862
|
+
type: {
|
|
21863
|
+
defined: {
|
|
21864
|
+
name: "ValuationModel"
|
|
21865
|
+
}
|
|
21866
|
+
}
|
|
21867
|
+
},
|
|
21868
|
+
{
|
|
21869
|
+
name: "permissionless_fulfillment",
|
|
21870
|
+
type: "bool"
|
|
21871
|
+
},
|
|
21872
|
+
{
|
|
21873
|
+
name: "subscribe_notice_period_type",
|
|
21874
|
+
type: {
|
|
21875
|
+
defined: {
|
|
21876
|
+
name: "NoticePeriodType"
|
|
21877
|
+
}
|
|
21878
|
+
}
|
|
21879
|
+
},
|
|
21880
|
+
{
|
|
21881
|
+
name: "subscribe_notice_period",
|
|
21882
|
+
type: "u64"
|
|
21883
|
+
},
|
|
21884
|
+
{
|
|
21885
|
+
name: "subscribe_settlement_period",
|
|
21886
|
+
type: "u64"
|
|
21887
|
+
},
|
|
21888
|
+
{
|
|
21889
|
+
name: "subscribe_cancellation_window",
|
|
21890
|
+
type: "u64"
|
|
21891
|
+
},
|
|
21892
|
+
{
|
|
21893
|
+
name: "redeem_notice_period_type",
|
|
21894
|
+
type: {
|
|
21895
|
+
defined: {
|
|
21896
|
+
name: "NoticePeriodType"
|
|
21897
|
+
}
|
|
21898
|
+
}
|
|
21899
|
+
},
|
|
21900
|
+
{
|
|
21901
|
+
name: "redeem_notice_period",
|
|
21902
|
+
type: "u64"
|
|
21903
|
+
},
|
|
21904
|
+
{
|
|
21905
|
+
name: "redeem_settlement_period",
|
|
21906
|
+
type: "u64"
|
|
21907
|
+
},
|
|
21908
|
+
{
|
|
21909
|
+
name: "redeem_cancellation_window",
|
|
21910
|
+
type: "u64"
|
|
21911
|
+
},
|
|
21912
|
+
{
|
|
21913
|
+
name: "time_unit",
|
|
21914
|
+
type: {
|
|
21915
|
+
defined: {
|
|
21916
|
+
name: "TimeUnit"
|
|
21917
|
+
}
|
|
21918
|
+
}
|
|
21919
|
+
},
|
|
21920
|
+
{
|
|
21921
|
+
name: "_padding",
|
|
21922
|
+
type: {
|
|
21923
|
+
array: [
|
|
21924
|
+
"u8",
|
|
21925
|
+
3
|
|
21926
|
+
]
|
|
21927
|
+
}
|
|
21928
|
+
}
|
|
21929
|
+
]
|
|
21930
|
+
}
|
|
21931
|
+
},
|
|
21932
|
+
{
|
|
21933
|
+
name: "OracleConfigs",
|
|
21934
|
+
docs: [
|
|
21935
|
+
"Vault-specific oracle configs. If available, these configs are preferred over the global config."
|
|
21936
|
+
],
|
|
21937
|
+
type: {
|
|
21938
|
+
kind: "struct",
|
|
21939
|
+
fields: [
|
|
21940
|
+
{
|
|
21941
|
+
name: "max_ages_seconds",
|
|
21942
|
+
type: {
|
|
21943
|
+
vec: {
|
|
21944
|
+
array: [
|
|
21945
|
+
"u16",
|
|
21946
|
+
2
|
|
21947
|
+
]
|
|
21948
|
+
}
|
|
21949
|
+
}
|
|
21950
|
+
},
|
|
21951
|
+
{
|
|
21952
|
+
name: "padding",
|
|
21953
|
+
type: {
|
|
21954
|
+
array: [
|
|
21955
|
+
"u8",
|
|
21956
|
+
12
|
|
21957
|
+
]
|
|
21958
|
+
}
|
|
21959
|
+
}
|
|
21960
|
+
]
|
|
21961
|
+
}
|
|
21962
|
+
},
|
|
21963
|
+
{
|
|
21964
|
+
name: "PerformanceFee",
|
|
21965
|
+
type: {
|
|
21966
|
+
kind: "struct",
|
|
21967
|
+
fields: [
|
|
21968
|
+
{
|
|
21969
|
+
name: "fee_bps",
|
|
21970
|
+
type: "u16"
|
|
21971
|
+
},
|
|
21972
|
+
{
|
|
21973
|
+
name: "hurdle_rate_bps",
|
|
21974
|
+
type: "u16"
|
|
21975
|
+
},
|
|
21976
|
+
{
|
|
21977
|
+
name: "hurdle_type",
|
|
21978
|
+
type: {
|
|
21979
|
+
defined: {
|
|
21980
|
+
name: "HurdleType"
|
|
21981
|
+
}
|
|
21982
|
+
}
|
|
21983
|
+
}
|
|
21984
|
+
]
|
|
21985
|
+
}
|
|
21986
|
+
},
|
|
21987
|
+
{
|
|
21988
|
+
name: "PricedProtocol",
|
|
21989
|
+
type: {
|
|
21990
|
+
kind: "struct",
|
|
21991
|
+
fields: [
|
|
21992
|
+
{
|
|
21993
|
+
name: "rent",
|
|
21994
|
+
type: "u64"
|
|
21995
|
+
},
|
|
21996
|
+
{
|
|
21997
|
+
name: "amount",
|
|
21998
|
+
type: "i128"
|
|
21999
|
+
},
|
|
22000
|
+
{
|
|
22001
|
+
name: "decimals",
|
|
22002
|
+
type: "u8"
|
|
22003
|
+
},
|
|
22004
|
+
{
|
|
22005
|
+
name: "last_updated_slot",
|
|
22006
|
+
type: "u64"
|
|
22007
|
+
},
|
|
22008
|
+
{
|
|
22009
|
+
name: "integration_program",
|
|
22010
|
+
type: "pubkey"
|
|
22011
|
+
},
|
|
22012
|
+
{
|
|
22013
|
+
name: "protocol_bitflag",
|
|
22014
|
+
type: "u16"
|
|
22015
|
+
},
|
|
22016
|
+
{
|
|
22017
|
+
name: "positions",
|
|
22018
|
+
type: {
|
|
22019
|
+
vec: "pubkey"
|
|
22020
|
+
}
|
|
22021
|
+
}
|
|
22022
|
+
]
|
|
22023
|
+
}
|
|
22024
|
+
},
|
|
22025
|
+
{
|
|
22026
|
+
name: "ProtocolFees",
|
|
22027
|
+
type: {
|
|
22028
|
+
kind: "struct",
|
|
22029
|
+
fields: [
|
|
22030
|
+
{
|
|
22031
|
+
name: "base_fee_bps",
|
|
22032
|
+
type: "u16"
|
|
22033
|
+
},
|
|
22034
|
+
{
|
|
22035
|
+
name: "flow_fee_bps",
|
|
22036
|
+
type: "u16"
|
|
22037
|
+
}
|
|
22038
|
+
]
|
|
22039
|
+
}
|
|
22040
|
+
},
|
|
22041
|
+
{
|
|
22042
|
+
name: "ProtocolPermissions",
|
|
22043
|
+
docs: [
|
|
22044
|
+
"Represents a delegate's permissions for a specific protocol"
|
|
22045
|
+
],
|
|
22046
|
+
type: {
|
|
22047
|
+
kind: "struct",
|
|
22048
|
+
fields: [
|
|
22049
|
+
{
|
|
22050
|
+
name: "protocol_bitflag",
|
|
22051
|
+
type: "u16"
|
|
22052
|
+
},
|
|
22053
|
+
{
|
|
22054
|
+
name: "permissions_bitmask",
|
|
22055
|
+
type: "u64"
|
|
22056
|
+
}
|
|
22057
|
+
]
|
|
22058
|
+
}
|
|
22059
|
+
},
|
|
22060
|
+
{
|
|
22061
|
+
name: "ProtocolPolicy",
|
|
22062
|
+
docs: [
|
|
22063
|
+
"Stores policy data for an integrated protocol.",
|
|
22064
|
+
"Integration programs serialize/deserialize this data."
|
|
22065
|
+
],
|
|
22066
|
+
type: {
|
|
22067
|
+
kind: "struct",
|
|
22068
|
+
fields: [
|
|
22069
|
+
{
|
|
22070
|
+
name: "protocol_bitflag",
|
|
22071
|
+
type: "u16"
|
|
22072
|
+
},
|
|
22073
|
+
{
|
|
22074
|
+
name: "data",
|
|
22075
|
+
type: "bytes"
|
|
22076
|
+
}
|
|
22077
|
+
]
|
|
22078
|
+
}
|
|
22079
|
+
},
|
|
22080
|
+
{
|
|
22081
|
+
name: "StateAccount",
|
|
22082
|
+
type: {
|
|
22083
|
+
kind: "struct",
|
|
22084
|
+
fields: [
|
|
22085
|
+
{
|
|
22086
|
+
name: "account_type",
|
|
22087
|
+
type: {
|
|
22088
|
+
defined: {
|
|
22089
|
+
name: "AccountType"
|
|
22090
|
+
}
|
|
22091
|
+
}
|
|
22092
|
+
},
|
|
22093
|
+
{
|
|
22094
|
+
name: "enabled",
|
|
22095
|
+
type: "bool"
|
|
22096
|
+
},
|
|
22097
|
+
{
|
|
22098
|
+
name: "vault",
|
|
22099
|
+
type: "pubkey"
|
|
22100
|
+
},
|
|
22101
|
+
{
|
|
22102
|
+
name: "owner",
|
|
22103
|
+
type: "pubkey"
|
|
22104
|
+
},
|
|
22105
|
+
{
|
|
22106
|
+
name: "portfolio_manager_name",
|
|
22107
|
+
type: {
|
|
22108
|
+
array: [
|
|
22109
|
+
"u8",
|
|
22110
|
+
32
|
|
22111
|
+
]
|
|
22112
|
+
}
|
|
22113
|
+
},
|
|
22114
|
+
{
|
|
22115
|
+
name: "created",
|
|
22116
|
+
type: {
|
|
22117
|
+
defined: {
|
|
22118
|
+
name: "CreatedModel"
|
|
22119
|
+
}
|
|
22120
|
+
}
|
|
22121
|
+
},
|
|
22122
|
+
{
|
|
22123
|
+
name: "base_asset_mint",
|
|
22124
|
+
type: "pubkey"
|
|
22125
|
+
},
|
|
22126
|
+
{
|
|
22127
|
+
name: "base_asset_decimals",
|
|
22128
|
+
type: "u8"
|
|
22129
|
+
},
|
|
22130
|
+
{
|
|
22131
|
+
name: "base_asset_token_program",
|
|
22132
|
+
type: "u8"
|
|
22133
|
+
},
|
|
22134
|
+
{
|
|
22135
|
+
name: "name",
|
|
22136
|
+
type: {
|
|
22137
|
+
array: [
|
|
22138
|
+
"u8",
|
|
22139
|
+
32
|
|
22140
|
+
]
|
|
22141
|
+
}
|
|
22142
|
+
},
|
|
22143
|
+
{
|
|
22144
|
+
name: "timelock_duration",
|
|
22145
|
+
type: "u32"
|
|
22146
|
+
},
|
|
22147
|
+
{
|
|
22148
|
+
name: "timelock_expires_at",
|
|
22149
|
+
type: "u64"
|
|
22150
|
+
},
|
|
22151
|
+
{
|
|
22152
|
+
name: "mint",
|
|
22153
|
+
type: "pubkey"
|
|
22154
|
+
},
|
|
22155
|
+
{
|
|
22156
|
+
name: "assets",
|
|
22157
|
+
type: {
|
|
22158
|
+
vec: "pubkey"
|
|
22159
|
+
}
|
|
22160
|
+
},
|
|
22161
|
+
{
|
|
22162
|
+
name: "integration_acls",
|
|
22163
|
+
type: {
|
|
22164
|
+
vec: {
|
|
22165
|
+
defined: {
|
|
22166
|
+
name: "IntegrationAcl"
|
|
22167
|
+
}
|
|
22168
|
+
}
|
|
22169
|
+
}
|
|
22170
|
+
},
|
|
22171
|
+
{
|
|
22172
|
+
name: "delegate_acls",
|
|
22173
|
+
type: {
|
|
22174
|
+
vec: {
|
|
22175
|
+
defined: {
|
|
22176
|
+
name: "DelegateAcl"
|
|
22177
|
+
}
|
|
22178
|
+
}
|
|
22179
|
+
}
|
|
22180
|
+
},
|
|
22181
|
+
{
|
|
22182
|
+
name: "external_positions",
|
|
22183
|
+
type: {
|
|
22184
|
+
vec: "pubkey"
|
|
22185
|
+
}
|
|
22186
|
+
},
|
|
22187
|
+
{
|
|
22188
|
+
name: "priced_protocols",
|
|
22189
|
+
type: {
|
|
22190
|
+
vec: {
|
|
22191
|
+
defined: {
|
|
22192
|
+
name: "PricedProtocol"
|
|
22193
|
+
}
|
|
22194
|
+
}
|
|
22195
|
+
}
|
|
22196
|
+
},
|
|
22197
|
+
{
|
|
22198
|
+
name: "params",
|
|
22199
|
+
type: {
|
|
22200
|
+
vec: {
|
|
22201
|
+
vec: {
|
|
22202
|
+
defined: {
|
|
22203
|
+
name: "EngineField"
|
|
22204
|
+
}
|
|
22205
|
+
}
|
|
22206
|
+
}
|
|
22207
|
+
}
|
|
22208
|
+
}
|
|
22209
|
+
]
|
|
22210
|
+
}
|
|
22211
|
+
},
|
|
22212
|
+
{
|
|
22213
|
+
name: "TimeUnit",
|
|
22214
|
+
type: {
|
|
22215
|
+
kind: "enum",
|
|
22216
|
+
variants: [
|
|
22217
|
+
{
|
|
22218
|
+
name: "Second"
|
|
22219
|
+
},
|
|
22220
|
+
{
|
|
22221
|
+
name: "Slot"
|
|
22222
|
+
}
|
|
22223
|
+
]
|
|
22224
|
+
}
|
|
22225
|
+
},
|
|
22226
|
+
{
|
|
22227
|
+
name: "ValuationModel",
|
|
22228
|
+
type: {
|
|
22229
|
+
kind: "enum",
|
|
22230
|
+
variants: [
|
|
22231
|
+
{
|
|
22232
|
+
name: "Continuous"
|
|
22233
|
+
},
|
|
22234
|
+
{
|
|
22235
|
+
name: "Periodic"
|
|
22236
|
+
}
|
|
22237
|
+
]
|
|
22238
|
+
}
|
|
22239
|
+
}
|
|
22240
|
+
];
|
|
22241
|
+
var constants = [
|
|
22242
|
+
{
|
|
22243
|
+
name: "PROTO_CCTP",
|
|
22244
|
+
type: "u16",
|
|
22245
|
+
value: "1"
|
|
22246
|
+
},
|
|
22247
|
+
{
|
|
22248
|
+
name: "PROTO_CCTP_PERM_TRANSFER",
|
|
22249
|
+
type: "u64",
|
|
22250
|
+
value: "1"
|
|
22251
|
+
}
|
|
22252
|
+
];
|
|
22253
|
+
var ExtCctpIdlJson = {
|
|
22254
|
+
address: address,
|
|
22255
|
+
metadata: metadata,
|
|
22256
|
+
instructions: instructions,
|
|
22257
|
+
accounts: accounts,
|
|
22258
|
+
types: types,
|
|
22259
|
+
constants: constants
|
|
22260
|
+
};
|
|
22261
|
+
|
|
22262
|
+
const GlamProtocolIdl = GlamProtocolIdlJson;
|
|
22263
|
+
const GlamConfigIdl = GlamConfigIdlJson;
|
|
22264
|
+
const GlamMintIdl = GlamMintIdlJson;
|
|
22265
|
+
const ExtSplIdl = ExtSplIdlJson;
|
|
22266
|
+
const ExtDriftIdl = ExtDriftIdlJson;
|
|
22267
|
+
const ExtKaminoIdl = ExtKaminoIdlJson;
|
|
22268
|
+
const ExtMarinadeIdl = ExtMarinadeIdlJson;
|
|
22269
|
+
const ExtStakePoolIdl = ExtStakePoolIdlJson;
|
|
22270
|
+
const ExtCctpIdl = ExtCctpIdlJson;
|
|
22271
|
+
function getGlamProtocolProgram(provider) {
|
|
22272
|
+
return new anchor.Program(GlamProtocolIdl, provider);
|
|
22273
|
+
}
|
|
22274
|
+
function getGlamMintProgram(provider) {
|
|
22275
|
+
return new anchor.Program(GlamMintIdl, provider);
|
|
22276
|
+
}
|
|
22277
|
+
function getGlamConfigProgram(provider) {
|
|
22278
|
+
return new anchor.Program(GlamConfigIdl, provider);
|
|
22279
|
+
}
|
|
22280
|
+
function getExtSplProgram(provider) {
|
|
22281
|
+
return new anchor.Program(ExtSplIdl, provider);
|
|
22282
|
+
}
|
|
22283
|
+
function getExtDriftProgram(provider) {
|
|
22284
|
+
return new anchor.Program(ExtDriftIdl, provider);
|
|
22285
|
+
}
|
|
22286
|
+
function getExtKaminoProgram(provider) {
|
|
22287
|
+
return new anchor.Program(ExtKaminoIdl, provider);
|
|
22288
|
+
}
|
|
22289
|
+
function getExtMarinadeProgram(provider) {
|
|
22290
|
+
return new anchor.Program(ExtMarinadeIdl, provider);
|
|
22291
|
+
}
|
|
22292
|
+
function getExtStakePoolProgram(provider) {
|
|
22293
|
+
return new anchor.Program(ExtStakePoolIdl, provider);
|
|
22294
|
+
}
|
|
22295
|
+
function getExtCctpProgram(provider) {
|
|
22296
|
+
return new anchor.Program(ExtCctpIdl, provider);
|
|
22297
|
+
}
|
|
22298
|
+
|
|
22299
|
+
const SEED_STATE = "state"; // protocol program
|
|
22300
|
+
const SEED_VAULT = "vault"; // protocol program
|
|
22301
|
+
const SEED_METADATA = "metadata"; // protocol program
|
|
22302
|
+
const SEED_MINT = "mint"; // mint program
|
|
22303
|
+
const SEED_ESCROW = "escrow"; // mint program
|
|
22304
|
+
const SEED_REQUEST_QUEUE = "request-queue"; // mint program
|
|
22305
|
+
const SEED_ACCOUNT_POLICY = "account-policy"; // policies program
|
|
22306
|
+
const SEED_EXTRA_ACCOUNT_METAS = "extra-account-metas"; // policies program
|
|
22307
|
+
const SEED_GLOBAL_CONFIG = "global-config";
|
|
22308
|
+
const SEED_INTEGRATION_AUTHORITY = "integration-authority";
|
|
22309
|
+
const STAKE_ACCOUNT_SIZE = 200;
|
|
22310
|
+
const METEORA_POSITION_SIZE = 8120;
|
|
22311
|
+
const KAMINO_OBTRIGATION_SIZE = 3344;
|
|
22312
|
+
const DRIFT_VAULT_DEPOSITOR_SIZE = 272;
|
|
22313
|
+
const JUPITER_API_DEFAULT = "https://lite-api.jup.ag";
|
|
22314
|
+
const JITO_TIP_DEFAULT = new web3_js.PublicKey("96gYZGLnJYVFmbjzopPSU6QiEV5fGqZNyN9nmNhvrZU5");
|
|
22315
|
+
const KAMINO_SCOPE_PRICES = new web3_js.PublicKey("3NJYftD5sjVfxSnUdZ1wVML8f3aC6mp1CXCL6L7TnU8C");
|
|
22316
|
+
const MARINADE_NATIVE_STAKE_AUTHORITY = new web3_js.PublicKey("stWirqFCf2Uts1JBL1Jsd3r6VBWhgnpdPxCTe1MFjrq");
|
|
22317
|
+
/**
|
|
22318
|
+
* Token mints. If no devnet version is defined, assume mainnet and devnet addresses are the same.
|
|
22319
|
+
*
|
|
22320
|
+
* Unless otherwise noted, all mints have 9 decimals.
|
|
22321
|
+
*/ const WSOL = new web3_js.PublicKey("So11111111111111111111111111111111111111112");
|
|
22322
|
+
const MSOL = new web3_js.PublicKey("mSoLzYCxHdYgdzU16g5QSh3i5K3z3KZK7ytfqcJm7So");
|
|
22323
|
+
// USDC, 6 decimals
|
|
22324
|
+
const USDC = new web3_js.PublicKey("EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v");
|
|
22325
|
+
const USDC_DEVNET = new web3_js.PublicKey("4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU");
|
|
22326
|
+
// JUP, 6 decimals
|
|
22327
|
+
const JUP = new web3_js.PublicKey("JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN");
|
|
22328
|
+
/**
|
|
22329
|
+
* Program IDs
|
|
22330
|
+
*/ const MARINADE_PROGRAM_ID = new web3_js.PublicKey("MarBmsSgKXdrN1egZf5sqe1TMai9K1rChYNDJgjq7aD");
|
|
22331
|
+
const DRIFT_PROGRAM_ID = new web3_js.PublicKey("dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH");
|
|
22332
|
+
const DRIFT_VAULTS_PROGRAM_ID = new web3_js.PublicKey("vAuLTsyrvSfZRuRB3XgvkPwNGgYSs9YRYymVebLKoxR");
|
|
22333
|
+
const DRIFT_DISTRIBUTOR_PROGRAM = new web3_js.PublicKey("E7HtfkEMhmn9uwL7EFNydcXBWy5WCYN1vFmKKjipEH1x");
|
|
22334
|
+
const JUPITER_PROGRAM_ID = new web3_js.PublicKey("JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4");
|
|
22335
|
+
const SANCTUM_STAKE_POOL_PROGRAM_ID = new web3_js.PublicKey("SP12tWFxD9oJsVWNavTTBZvMbA6gkAmxtVgxdqvyvhY");
|
|
22336
|
+
const GOVERNANCE_PROGRAM_ID = new web3_js.PublicKey("GovaE4iu227srtG2s3tZzB4RmWBzw8sTwrCLZz7kN7rY");
|
|
22337
|
+
const JUP_VOTE_PROGRAM = new web3_js.PublicKey("voTpe3tHQ7AjQHMapgSue2HJFAh2cGsdokqN3XqmVSj");
|
|
22338
|
+
const MERKLE_DISTRIBUTOR_PROGRAM = new web3_js.PublicKey("DiS3nNjFVMieMgmiQFm6wgJL7nevk4NrhXKLbtEH1Z2R");
|
|
22339
|
+
const TRANSFER_HOOK_PROGRAM = new web3_js.PublicKey("po1iCYakK3gHCLbuju4wGzFowTMpAJxkqK1iwUqMonY");
|
|
22340
|
+
const METEORA_DLMM_PROGRAM = new web3_js.PublicKey("LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo");
|
|
22341
|
+
const KAMINO_LENDING_PROGRAM = new web3_js.PublicKey("KLend2g3cP87fffoy8q1mQqGKjrxjC8boSyAYavgmjD");
|
|
22342
|
+
const KAMINO_VAULTS_PROGRAM = new web3_js.PublicKey("KvauGMspG5k6rtzrqqn7WNn3oZdyKqLKwK2XWQ8FLjd");
|
|
22343
|
+
const KAMINO_FARM_PROGRAM = new web3_js.PublicKey("FarmsPZpWu9i7Kky8tPN37rs2TpmMrAZrC7S7vJa91Hr");
|
|
22344
|
+
const MEMO_PROGRAM = new web3_js.PublicKey("MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr");
|
|
22345
|
+
const ALT_PROGRAM_ID = new web3_js.PublicKey("AddressLookupTab1e1111111111111111111111111");
|
|
22346
|
+
const TOKEN_MESSENGER_MINTER_V2 = new web3_js.PublicKey("CCTPV2vPZJS2u2BBsUoscuikbYjnpFmbFsvVuJdgUMQe");
|
|
22347
|
+
const MESSAGE_TRANSMITTER_V2 = new web3_js.PublicKey("CCTPV2Sm4AdWt5296sk4P66VBZ7bEhcARwFaaS9YPbeC");
|
|
22348
|
+
/**
|
|
22349
|
+
* Stake pools
|
|
22350
|
+
*/ const JITO_STAKE_POOL = new web3_js.PublicKey("Jito4APyf642JPZPx3hGc6WWJ8zPKtRbRs4P815Awbb");
|
|
22351
|
+
const JUPSOL_STAKE_POOL = new web3_js.PublicKey("8VpRhuxa7sUUepdY3kQiTmX9rS5vx4WgaXiAnXq4KCtr");
|
|
22352
|
+
/**
|
|
22353
|
+
* Referrers
|
|
22354
|
+
*/ const GLAM_REFERRER = new web3_js.PublicKey("GLAMrG37ZqioqvzBNQGCfCUueDz3tsr7MwMFyRk9PS89");
|
|
22355
|
+
/**
|
|
22356
|
+
* Integration program mapping
|
|
22357
|
+
*/ const INTEGRATION_MAPPING = {
|
|
22358
|
+
GM1NtvvnSXUptTrMCqbogAdZJydZSNv98DoU5AZVLmGh: {
|
|
22359
|
+
"0000000000000001": "GLAM Mint Protocol"
|
|
22360
|
+
},
|
|
22361
|
+
G1NTcMDYgNLpDwgnrpSZvoSKQuR9NXG7S3DmtNQCDmrK: {
|
|
22362
|
+
"0000000000000001": "CCTP"
|
|
22363
|
+
},
|
|
22364
|
+
G1NTsQ36mjPe89HtPYqxKsjY5HmYsDR6CbD2gd2U2pta: {
|
|
22365
|
+
"0000000000000001": "Token"
|
|
22366
|
+
},
|
|
22367
|
+
G1NTdrBmBpW43msRQmsf7qXSw3MFBNaqJcAkGiRmRq2F: {
|
|
22368
|
+
"0000000000000001": "Drift Protocol",
|
|
22369
|
+
"0000000000000010": "Drift Vaults"
|
|
22370
|
+
},
|
|
22371
|
+
G1NTkDEUR3pkEqGCKZtmtmVzCUEdYa86pezHkwYbLyde: {
|
|
22372
|
+
"0000000000000001": "Kamino Lending",
|
|
22373
|
+
"0000000000000010": "Kamino Vaults",
|
|
22374
|
+
"0000000000000100": "Kamino Farms"
|
|
22375
|
+
}
|
|
22376
|
+
};
|
|
22377
|
+
/**
|
|
22378
|
+
* CCTP domain to chain name mapping
|
|
22379
|
+
*/ const CCTP_DOMAIN_MAPPING = {
|
|
22380
|
+
0: "Ethereum",
|
|
22381
|
+
1: "Avalanche",
|
|
22382
|
+
2: "OP",
|
|
22383
|
+
3: "Arbitrum",
|
|
22384
|
+
5: "Solana",
|
|
22385
|
+
6: "Base",
|
|
22386
|
+
7: "Polygon PoS",
|
|
22387
|
+
10: "Unichain",
|
|
22388
|
+
11: "Linea",
|
|
22389
|
+
12: "Codex",
|
|
22390
|
+
13: "Sonic",
|
|
22391
|
+
14: "World Chain",
|
|
22392
|
+
16: "Sei",
|
|
22393
|
+
17: "BNB Smart Chain",
|
|
22394
|
+
18: "XDC",
|
|
22395
|
+
19: "HyperEVM",
|
|
22396
|
+
21: "Ink",
|
|
22397
|
+
22: "Plume"
|
|
22398
|
+
};
|
|
22399
|
+
/**
|
|
22400
|
+
* Pool ID to lending pool name mapping for Drift Protocol policies
|
|
22401
|
+
*/ const DRIFT_POOL_MAPPING = {
|
|
22402
|
+
0: "Main Market",
|
|
22403
|
+
1: "JLP Market",
|
|
22404
|
+
2: "LST Market",
|
|
22405
|
+
3: "Exponent Market"
|
|
22406
|
+
};
|
|
22407
|
+
// Permission mappings for each protocol - maps bit positions to permission names
|
|
22408
|
+
const PERMISSION_MAPPINGS = {
|
|
22409
|
+
// Kamino integration program
|
|
22410
|
+
G1NTkDEUR3pkEqGCKZtmtmVzCUEdYa86pezHkwYbLyde: {
|
|
22411
|
+
// Kamino Lending (protocol bitmask: 0000000000000001)
|
|
22412
|
+
"0000000000000001": {
|
|
22413
|
+
0: "Init",
|
|
22414
|
+
1: "Deposit",
|
|
22415
|
+
2: "Withdraw",
|
|
22416
|
+
3: "Borrow",
|
|
22417
|
+
4: "Repay"
|
|
22418
|
+
},
|
|
22419
|
+
// Kamino Vaults (protocol bitmask: 0000000000000010)
|
|
22420
|
+
"0000000000000010": {
|
|
22421
|
+
0: "Deposit",
|
|
22422
|
+
1: "Withdraw"
|
|
22423
|
+
},
|
|
22424
|
+
// Kamino Farms (protocol bitmask: 0000000000000100)
|
|
22425
|
+
"0000000000000100": {
|
|
22426
|
+
0: "Stake",
|
|
22427
|
+
1: "Unstake",
|
|
22428
|
+
2: "HarvestReward"
|
|
22429
|
+
}
|
|
22430
|
+
},
|
|
22431
|
+
// Drift integration program
|
|
22432
|
+
G1NTdrBmBpW43msRQmsf7qXSw3MFBNaqJcAkGiRmRq2F: {
|
|
22433
|
+
// Drift Protocol (protocol bitmask: 0000000000000001)
|
|
22434
|
+
"0000000000000001": {
|
|
22435
|
+
0: "InitUser",
|
|
22436
|
+
1: "UpdateUser",
|
|
22437
|
+
2: "DeleteUser",
|
|
22438
|
+
3: "Deposit",
|
|
22439
|
+
4: "Withdraw",
|
|
22440
|
+
5: "Borrow",
|
|
22441
|
+
6: "CreateModifyOrders",
|
|
22442
|
+
7: "CancelOrders",
|
|
22443
|
+
8: "PerpMarkets",
|
|
22444
|
+
9: "SpotMarkets"
|
|
22445
|
+
},
|
|
22446
|
+
// Drift Vaults (protocol bitmask: 0000000000000010)
|
|
22447
|
+
"0000000000000010": {
|
|
22448
|
+
0: "Deposit",
|
|
22449
|
+
1: "Withdraw"
|
|
22450
|
+
}
|
|
22451
|
+
},
|
|
22452
|
+
// Token integration program
|
|
22453
|
+
G1NTsQ36mjPe89HtPYqxKsjY5HmYsDR6CbD2gd2U2pta: {
|
|
22454
|
+
// Token (protocol bitmask: 0000000000000001)
|
|
22455
|
+
"0000000000000001": {
|
|
22456
|
+
0: "Transfer"
|
|
22457
|
+
}
|
|
22458
|
+
},
|
|
22459
|
+
// CCTP integration program
|
|
22460
|
+
G1NTcMDYgNLpDwgnrpSZvoSKQuR9NXG7S3DmtNQCDmrK: {
|
|
22461
|
+
// CCTP (protocol bitmask: 0000000000000001)
|
|
22462
|
+
"0000000000000001": {
|
|
22463
|
+
0: "Transfer"
|
|
22464
|
+
}
|
|
22465
|
+
}
|
|
22466
|
+
};
|
|
22467
|
+
|
|
22468
|
+
// Example response from Helius:
|
|
22469
|
+
// {
|
|
22470
|
+
// "jsonrpc": "2.0",
|
|
22471
|
+
// "id": "1",
|
|
22472
|
+
// "result": {
|
|
21087
22473
|
// "accounts": [
|
|
21088
22474
|
// {
|
|
21089
22475
|
// "pubkey": "CxELquR1gPP8wHe33gZ4QxqGB3sZ9RSwsJ2KshVewkFY",
|
|
@@ -21478,17 +22864,114 @@ MintPolicy._layout = borsh.struct([
|
|
|
21478
22864
|
borsh.option(borsh.vec(borsh.publicKey()), "allowlist"),
|
|
21479
22865
|
borsh.option(borsh.vec(borsh.publicKey()), "blocklist")
|
|
21480
22866
|
]);
|
|
21481
|
-
|
|
22867
|
+
class TransferPolicy {
|
|
22868
|
+
static decode(buffer) {
|
|
22869
|
+
const data = TransferPolicy._layout.decode(buffer);
|
|
22870
|
+
return data;
|
|
22871
|
+
}
|
|
22872
|
+
encode() {
|
|
22873
|
+
const header = Buffer.alloc(4);
|
|
22874
|
+
header.writeUInt32LE(this.allowlist.length, 0);
|
|
22875
|
+
const buffer = Buffer.alloc(this.allowlist.length * 32);
|
|
22876
|
+
for(let i = 0; i < this.allowlist.length; i++){
|
|
22877
|
+
this.allowlist[i].toBuffer().copy(buffer, i * 32);
|
|
22878
|
+
}
|
|
22879
|
+
return Buffer.concat([
|
|
22880
|
+
header,
|
|
22881
|
+
buffer
|
|
22882
|
+
]);
|
|
22883
|
+
}
|
|
22884
|
+
constructor(allowlist){
|
|
22885
|
+
this.allowlist = allowlist;
|
|
22886
|
+
}
|
|
22887
|
+
}
|
|
22888
|
+
TransferPolicy._layout = borsh.struct([
|
|
21482
22889
|
borsh.vec(borsh.publicKey(), "allowlist")
|
|
21483
22890
|
]);
|
|
21484
|
-
|
|
22891
|
+
class DriftVaultsPolicy {
|
|
22892
|
+
static decode(buffer) {
|
|
22893
|
+
const { vaultsAllowlist } = DriftVaultsPolicy._layout.decode(buffer);
|
|
22894
|
+
return new DriftVaultsPolicy(vaultsAllowlist);
|
|
22895
|
+
}
|
|
22896
|
+
encode() {
|
|
22897
|
+
const header = Buffer.alloc(4);
|
|
22898
|
+
header.writeUInt32LE(this.vaultsAllowlist.length, 0);
|
|
22899
|
+
const buffer = Buffer.alloc(this.vaultsAllowlist.length * 32);
|
|
22900
|
+
for(let i = 0; i < this.vaultsAllowlist.length; i++){
|
|
22901
|
+
this.vaultsAllowlist[i].toBuffer().copy(buffer, i * 32);
|
|
22902
|
+
}
|
|
22903
|
+
return Buffer.concat([
|
|
22904
|
+
header,
|
|
22905
|
+
buffer
|
|
22906
|
+
]);
|
|
22907
|
+
}
|
|
22908
|
+
constructor(allowlist){
|
|
22909
|
+
this.vaultsAllowlist = allowlist;
|
|
22910
|
+
}
|
|
22911
|
+
}
|
|
22912
|
+
DriftVaultsPolicy._layout = borsh.struct([
|
|
21485
22913
|
borsh.vec(borsh.publicKey(), "vaultsAllowlist")
|
|
21486
22914
|
]);
|
|
21487
|
-
|
|
22915
|
+
class DriftProtocolPolicy {
|
|
22916
|
+
static decode(buffer) {
|
|
22917
|
+
const { spotMarketsAllowlist, perpMarketsAllowlist, borrowAllowlist } = DriftProtocolPolicy._layout.decode(buffer);
|
|
22918
|
+
return new DriftProtocolPolicy(spotMarketsAllowlist, perpMarketsAllowlist, borrowAllowlist);
|
|
22919
|
+
}
|
|
22920
|
+
encode() {
|
|
22921
|
+
// Calculate buffer size needed
|
|
22922
|
+
// 4 bytes for spot markets length + 2 bytes per spot market
|
|
22923
|
+
// 4 bytes for perp markets length + 2 bytes per perp market
|
|
22924
|
+
// 4 bytes for borrow allowlist length + 32 bytes per pubkey
|
|
22925
|
+
const spotMarketsSize = 4 + this.spotMarketsAllowlist.length * 2;
|
|
22926
|
+
const perpMarketsSize = 4 + this.perpMarketsAllowlist.length * 2;
|
|
22927
|
+
const borrowAllowlistSize = 4 + this.borrowAllowlist.length * 32;
|
|
22928
|
+
const totalSize = spotMarketsSize + perpMarketsSize + borrowAllowlistSize;
|
|
22929
|
+
const buffer = Buffer.alloc(totalSize);
|
|
22930
|
+
DriftProtocolPolicy._layout.encode(this, buffer);
|
|
22931
|
+
return buffer;
|
|
22932
|
+
}
|
|
22933
|
+
constructor(spotMarketsAllowlist, perpMarketsAllowlist, borrowAllowlist){
|
|
22934
|
+
this.spotMarketsAllowlist = spotMarketsAllowlist;
|
|
22935
|
+
this.perpMarketsAllowlist = perpMarketsAllowlist;
|
|
22936
|
+
this.borrowAllowlist = borrowAllowlist;
|
|
22937
|
+
}
|
|
22938
|
+
}
|
|
22939
|
+
DriftProtocolPolicy._layout = borsh.struct([
|
|
21488
22940
|
borsh.vec(borsh.u16(), "spotMarketsAllowlist"),
|
|
21489
22941
|
borsh.vec(borsh.u16(), "perpMarketsAllowlist"),
|
|
21490
22942
|
borsh.vec(borsh.publicKey(), "borrowAllowlist")
|
|
21491
22943
|
]);
|
|
22944
|
+
class CctpPolicy {
|
|
22945
|
+
static decode(buffer) {
|
|
22946
|
+
const data = CctpPolicy._layout.decode(buffer);
|
|
22947
|
+
return new CctpPolicy(data.allowedDestinations);
|
|
22948
|
+
}
|
|
22949
|
+
encode() {
|
|
22950
|
+
const allowedDestinationsSize = 4 + this.allowedDestinations.length * 36; // 4 bytes (u32) + 32 bytes (Pubkey) = 36 bytes per destination
|
|
22951
|
+
const totalSize = allowedDestinationsSize;
|
|
22952
|
+
const buffer = Buffer.alloc(totalSize);
|
|
22953
|
+
CctpPolicy._layout.encode(this, buffer);
|
|
22954
|
+
return buffer;
|
|
22955
|
+
}
|
|
22956
|
+
get domainToAddressesMap() {
|
|
22957
|
+
const map = new Map();
|
|
22958
|
+
for (const { domain, address } of this.allowedDestinations){
|
|
22959
|
+
const keys = map.get(domain) || [];
|
|
22960
|
+
keys.push(address);
|
|
22961
|
+
map.set(domain, keys);
|
|
22962
|
+
}
|
|
22963
|
+
return map;
|
|
22964
|
+
}
|
|
22965
|
+
constructor(allowedDestinations){
|
|
22966
|
+
this.allowedDestinations = allowedDestinations;
|
|
22967
|
+
}
|
|
22968
|
+
}
|
|
22969
|
+
CctpPolicy._layout = borsh.struct([
|
|
22970
|
+
borsh.vec(borsh.struct([
|
|
22971
|
+
borsh.u32("domain"),
|
|
22972
|
+
borsh.publicKey("address")
|
|
22973
|
+
]), "allowedDestinations")
|
|
22974
|
+
]);
|
|
21492
22975
|
|
|
21493
22976
|
function getStatePda(stateModel, programId, owner) {
|
|
21494
22977
|
if (!stateModel?.created?.key && !stateModel?.name) {
|
|
@@ -23041,6 +24524,7 @@ class BaseClient {
|
|
|
23041
24524
|
this.extKaminoProgram = getExtKaminoProgram(this.provider);
|
|
23042
24525
|
this.extMarinadeProgram = getExtMarinadeProgram(this.provider);
|
|
23043
24526
|
this.extStakePoolProgram = getExtStakePoolProgram(this.provider);
|
|
24527
|
+
this.extCctpProgram = getExtCctpProgram(this.provider);
|
|
23044
24528
|
if (config?.statePda) {
|
|
23045
24529
|
this.statePda = config.statePda;
|
|
23046
24530
|
}
|
|
@@ -23685,7 +25169,18 @@ DriftVault._layout = borsh.struct([
|
|
|
23685
25169
|
// Final padding
|
|
23686
25170
|
borsh.array(borsh.u64(), 3, "padding")
|
|
23687
25171
|
]);
|
|
23688
|
-
|
|
25172
|
+
class DriftSpotMarket {
|
|
25173
|
+
static decode(buffer) {
|
|
25174
|
+
const data = DriftSpotMarket._layout.decode(buffer);
|
|
25175
|
+
const instance = new DriftSpotMarket();
|
|
25176
|
+
Object.assign(instance, data);
|
|
25177
|
+
return instance;
|
|
25178
|
+
}
|
|
25179
|
+
get nameStr() {
|
|
25180
|
+
return charsToName(this.name);
|
|
25181
|
+
}
|
|
25182
|
+
}
|
|
25183
|
+
DriftSpotMarket._layout = borsh.struct([
|
|
23689
25184
|
borsh.array(borsh.u8(), 8, "discriminator"),
|
|
23690
25185
|
borsh.publicKey("marketPda"),
|
|
23691
25186
|
borsh.publicKey("oracle"),
|
|
@@ -23701,7 +25196,33 @@ borsh.struct([
|
|
|
23701
25196
|
borsh.u32("decimals"),
|
|
23702
25197
|
borsh.u16("marketIndex"),
|
|
23703
25198
|
borsh.u8("padding3"),
|
|
23704
|
-
borsh.u8("oracleSource")
|
|
25199
|
+
borsh.u8("oracleSource"),
|
|
25200
|
+
borsh.array(borsh.u8(), 46, "padding4"),
|
|
25201
|
+
borsh.u8("tokenProgram"),
|
|
25202
|
+
borsh.u8("poolId"),
|
|
25203
|
+
borsh.array(borsh.u8(), 40, "padding5")
|
|
25204
|
+
]);
|
|
25205
|
+
class DriftPerpMarket {
|
|
25206
|
+
static decode(buffer) {
|
|
25207
|
+
const data = DriftPerpMarket._layout.decode(buffer);
|
|
25208
|
+
const instance = new DriftPerpMarket();
|
|
25209
|
+
Object.assign(instance, data);
|
|
25210
|
+
return instance;
|
|
25211
|
+
}
|
|
25212
|
+
get nameStr() {
|
|
25213
|
+
return charsToName(this.name);
|
|
25214
|
+
}
|
|
25215
|
+
}
|
|
25216
|
+
DriftPerpMarket._layout = borsh.struct([
|
|
25217
|
+
borsh.array(borsh.u8(), 8, "discriminator"),
|
|
25218
|
+
borsh.publicKey("marketPda"),
|
|
25219
|
+
borsh.publicKey("oracle"),
|
|
25220
|
+
borsh.array(borsh.u8(), 854, "padding1"),
|
|
25221
|
+
borsh.u8("oracleSource"),
|
|
25222
|
+
borsh.array(borsh.u8(), 73, "padding2"),
|
|
25223
|
+
borsh.array(borsh.u8(), 32, "name"),
|
|
25224
|
+
borsh.array(borsh.u8(), 128, "padding3"),
|
|
25225
|
+
borsh.u16("marketIndex")
|
|
23705
25226
|
]);
|
|
23706
25227
|
|
|
23707
25228
|
function readUnsignedBigInt64LE(buffer, offset) {
|
|
@@ -24035,8 +25556,6 @@ function decodeUser(buffer) {
|
|
|
24035
25556
|
};
|
|
24036
25557
|
}
|
|
24037
25558
|
|
|
24038
|
-
const DRIFT_DISTRIBUTOR_PROGRAM = new web3_js.PublicKey("E7HtfkEMhmn9uwL7EFNydcXBWy5WCYN1vFmKKjipEH1x");
|
|
24039
|
-
new web3_js.PublicKey("DriFtupJYLTosbwoN8koMbEYSx54aFAVLddWsbksjwg7");
|
|
24040
25559
|
const DRIFT_SIGNER = new web3_js.PublicKey("JCNCMFXo5M5qwUPg2Utu1u6YWp3MbygxqBsBeXXJfrw");
|
|
24041
25560
|
const DRIFT_MARGIN_PRECISION = 10000;
|
|
24042
25561
|
class DriftClient {
|
|
@@ -24097,45 +25616,30 @@ class DriftClient {
|
|
|
24097
25616
|
};
|
|
24098
25617
|
}
|
|
24099
25618
|
parsePerpMarket(data) {
|
|
24100
|
-
const
|
|
24101
|
-
const oracle = new web3_js.PublicKey(data.subarray(40, 72));
|
|
24102
|
-
const name = charsToName(data.subarray(1000, 1032));
|
|
24103
|
-
const oralceEnum = data.subarray(926, 927).readUint8();
|
|
24104
|
-
const oracleSource = OracleSource.get(oralceEnum);
|
|
24105
|
-
const marketIndex = data.subarray(1160, 1162).readUint16LE();
|
|
25619
|
+
const perpMarket = DriftPerpMarket.decode(data);
|
|
24106
25620
|
return {
|
|
24107
|
-
name,
|
|
24108
|
-
marketPda,
|
|
24109
|
-
marketIndex,
|
|
24110
|
-
oracle,
|
|
24111
|
-
oracleSource
|
|
25621
|
+
name: perpMarket.nameStr,
|
|
25622
|
+
marketPda: perpMarket.marketPda,
|
|
25623
|
+
marketIndex: perpMarket.marketIndex,
|
|
25624
|
+
oracle: perpMarket.oracle,
|
|
25625
|
+
oracleSource: OracleSource.get(perpMarket.oracleSource)
|
|
24112
25626
|
};
|
|
24113
25627
|
}
|
|
24114
25628
|
parseSpotMarket(data) {
|
|
24115
|
-
const
|
|
24116
|
-
const oracle = new web3_js.PublicKey(data.subarray(40, 72));
|
|
24117
|
-
const mint = new web3_js.PublicKey(data.subarray(72, 104));
|
|
24118
|
-
const vault = new web3_js.PublicKey(data.subarray(104, 136));
|
|
24119
|
-
const name = charsToName(data.subarray(136, 168));
|
|
24120
|
-
const cumulativeDepositInterest = new anchor.BN(data.subarray(464, 480), "le");
|
|
24121
|
-
const cumulativeBorrowInterest = new anchor.BN(data.subarray(480, 496), "le");
|
|
24122
|
-
const decimals = data.subarray(680, 684).readUint32LE();
|
|
24123
|
-
const marketIndex = data.subarray(684, 686).readUint16LE();
|
|
24124
|
-
const oralceEnum = data.subarray(687, 688).readUint8();
|
|
24125
|
-
const oracleSource = OracleSource.get(oralceEnum);
|
|
24126
|
-
const tokenProgram = data.subarray(734, 735).readUint8() == 0 ? splToken.TOKEN_PROGRAM_ID : splToken.TOKEN_2022_PROGRAM_ID;
|
|
25629
|
+
const driftSpotMarket = DriftSpotMarket.decode(data);
|
|
24127
25630
|
return {
|
|
24128
|
-
name,
|
|
24129
|
-
marketIndex,
|
|
24130
|
-
|
|
24131
|
-
|
|
24132
|
-
|
|
24133
|
-
|
|
24134
|
-
|
|
24135
|
-
|
|
24136
|
-
|
|
24137
|
-
|
|
24138
|
-
|
|
25631
|
+
name: driftSpotMarket.nameStr,
|
|
25632
|
+
marketIndex: driftSpotMarket.marketIndex,
|
|
25633
|
+
poolId: driftSpotMarket.poolId,
|
|
25634
|
+
marketPda: driftSpotMarket.marketPda,
|
|
25635
|
+
oracle: driftSpotMarket.oracle,
|
|
25636
|
+
oracleSource: OracleSource.get(driftSpotMarket.oracleSource),
|
|
25637
|
+
vault: driftSpotMarket.vault,
|
|
25638
|
+
mint: driftSpotMarket.mint,
|
|
25639
|
+
decimals: driftSpotMarket.decimals,
|
|
25640
|
+
tokenProgram: driftSpotMarket.tokenProgram === 0 ? splToken.TOKEN_PROGRAM_ID : splToken.TOKEN_2022_PROGRAM_ID,
|
|
25641
|
+
cumulativeDepositInterest: driftSpotMarket.cumulativeDepositInterest,
|
|
25642
|
+
cumulativeBorrowInterest: driftSpotMarket.cumulativeBorrowInterest
|
|
24139
25643
|
};
|
|
24140
25644
|
}
|
|
24141
25645
|
async calcSpotBalance(marketIndex, scaledBalance, scaledBalanceType) {
|
|
@@ -24254,6 +25758,7 @@ class DriftClient {
|
|
|
24254
25758
|
const spotMarkets = spot.map((m)=>({
|
|
24255
25759
|
name: m.symbol,
|
|
24256
25760
|
marketIndex: m.marketIndex,
|
|
25761
|
+
poolId: m.poolId,
|
|
24257
25762
|
marketPda: new web3_js.PublicKey(m.marketPDA),
|
|
24258
25763
|
vault: new web3_js.PublicKey(m.vaultPDA),
|
|
24259
25764
|
oracle: new web3_js.PublicKey(m.oracle),
|
|
@@ -24577,11 +26082,11 @@ class DriftClient {
|
|
|
24577
26082
|
const postInstructions = [];
|
|
24578
26083
|
// If drift user doesn't exist, prepend initialization ixs
|
|
24579
26084
|
if (!await this.fetchDriftUser(subAccountId)) {
|
|
24580
|
-
preInstructions.push(await this.initializeUserIx(glamSigner, subAccountId));
|
|
24581
26085
|
// Only add ix to initialize user stats if subAccountId is 0
|
|
24582
26086
|
if (subAccountId === 0) {
|
|
24583
26087
|
preInstructions.push(await this.initializeUserStatsIx(glamSigner));
|
|
24584
26088
|
}
|
|
26089
|
+
preInstructions.push(await this.initializeUserIx(glamSigner, subAccountId));
|
|
24585
26090
|
// If market name ends with "-N", it means we're depositing to an isolated pool
|
|
24586
26091
|
const isolatedPoolMatch = name.match(/-(\d+)$/);
|
|
24587
26092
|
if (isolatedPoolMatch) {
|
|
@@ -25390,6 +26895,12 @@ class VaultClient {
|
|
|
25390
26895
|
const tx = await this.unwrapTx(txOptions);
|
|
25391
26896
|
return await this.base.sendAndConfirm(tx);
|
|
25392
26897
|
}
|
|
26898
|
+
async bridgeUsdc(amount, domain, recipient, params, txOptions = {}) {
|
|
26899
|
+
const [tx, keypair] = await this.bridgeUsdcTx(new anchor.BN(amount), domain, recipient, params, txOptions);
|
|
26900
|
+
return await this.base.sendAndConfirm(tx, [
|
|
26901
|
+
keypair
|
|
26902
|
+
]);
|
|
26903
|
+
}
|
|
25393
26904
|
/**
|
|
25394
26905
|
* Transfers SOL from vault to another account
|
|
25395
26906
|
*
|
|
@@ -25556,15 +27067,86 @@ class VaultClient {
|
|
|
25556
27067
|
const tx = await this.base.extSplProgram.methods.tokenTransferChecked(new anchor.BN(amount), mintObj.decimals).accounts({
|
|
25557
27068
|
glamState: this.base.statePda,
|
|
25558
27069
|
glamSigner,
|
|
25559
|
-
from: this.base.getVaultAta(mint),
|
|
27070
|
+
from: this.base.getVaultAta(mint, tokenProgram),
|
|
25560
27071
|
to: toAta,
|
|
25561
27072
|
mint,
|
|
25562
27073
|
cpiProgram: tokenProgram
|
|
25563
27074
|
}).preInstructions(preInstructions).transaction();
|
|
25564
27075
|
return await this.base.intoVersionedTransaction(tx, txOptions);
|
|
25565
27076
|
}
|
|
27077
|
+
async bridgeUsdcTx(amount, domain, recipient, params, txOptions) {
|
|
27078
|
+
const signer = txOptions.signer || this.base.getSigner();
|
|
27079
|
+
const usdcAddress = this.base.isMainnet ? USDC : USDC_DEVNET;
|
|
27080
|
+
const pdas = this.getDepositForBurnPdas(MESSAGE_TRANSMITTER_V2, TOKEN_MESSENGER_MINTER_V2, usdcAddress, domain);
|
|
27081
|
+
const depositForBurnParams = {
|
|
27082
|
+
amount,
|
|
27083
|
+
destinationDomain: domain,
|
|
27084
|
+
mintRecipient: recipient,
|
|
27085
|
+
destinationCaller: web3_js.PublicKey.default,
|
|
27086
|
+
...params
|
|
27087
|
+
};
|
|
27088
|
+
const denylistAccount = web3_js.PublicKey.findProgramAddressSync([
|
|
27089
|
+
Buffer.from("denylist_account"),
|
|
27090
|
+
this.base.vaultPda.toBuffer()
|
|
27091
|
+
], TOKEN_MESSENGER_MINTER_V2)[0];
|
|
27092
|
+
const messageSentEventAccountKeypair = web3_js.Keypair.generate();
|
|
27093
|
+
const burnTokenAccount = this.base.getVaultAta(usdcAddress);
|
|
27094
|
+
const tx = await this.base.extCctpProgram.methods.depositForBurn(depositForBurnParams).accounts({
|
|
27095
|
+
glamState: this.base.statePda,
|
|
27096
|
+
glamSigner: signer,
|
|
27097
|
+
senderAuthorityPda: pdas.authorityPda,
|
|
27098
|
+
burnTokenAccount,
|
|
27099
|
+
denylistAccount,
|
|
27100
|
+
messageTransmitter: pdas.messageTransmitterAccount,
|
|
27101
|
+
tokenMessenger: pdas.tokenMessengerAccount,
|
|
27102
|
+
remoteTokenMessenger: pdas.remoteTokenMessengerKey,
|
|
27103
|
+
tokenMinter: pdas.tokenMinterAccount,
|
|
27104
|
+
localToken: pdas.localToken,
|
|
27105
|
+
burnTokenMint: usdcAddress,
|
|
27106
|
+
messageSentEventData: messageSentEventAccountKeypair.publicKey,
|
|
27107
|
+
eventAuthority: pdas.tokenMessengerEventAuthority
|
|
27108
|
+
}).transaction();
|
|
27109
|
+
return [
|
|
27110
|
+
await this.base.intoVersionedTransaction(tx, txOptions),
|
|
27111
|
+
messageSentEventAccountKeypair
|
|
27112
|
+
];
|
|
27113
|
+
}
|
|
25566
27114
|
constructor(base){
|
|
25567
27115
|
this.base = base;
|
|
27116
|
+
this.getDepositForBurnPdas = (messageTransmitterProgram, tokenMessengerMinterProgram, usdcAddress, destinationDomain)=>{
|
|
27117
|
+
const messageTransmitterAccount = web3_js.PublicKey.findProgramAddressSync([
|
|
27118
|
+
Buffer.from("message_transmitter")
|
|
27119
|
+
], messageTransmitterProgram)[0];
|
|
27120
|
+
const tokenMessengerAccount = web3_js.PublicKey.findProgramAddressSync([
|
|
27121
|
+
Buffer.from("token_messenger")
|
|
27122
|
+
], tokenMessengerMinterProgram)[0];
|
|
27123
|
+
const tokenMinterAccount = web3_js.PublicKey.findProgramAddressSync([
|
|
27124
|
+
Buffer.from("token_minter")
|
|
27125
|
+
], tokenMessengerMinterProgram)[0];
|
|
27126
|
+
const localToken = web3_js.PublicKey.findProgramAddressSync([
|
|
27127
|
+
Buffer.from("local_token"),
|
|
27128
|
+
usdcAddress.toBuffer()
|
|
27129
|
+
], tokenMessengerMinterProgram)[0];
|
|
27130
|
+
const remoteTokenMessengerKey = web3_js.PublicKey.findProgramAddressSync([
|
|
27131
|
+
Buffer.from("remote_token_messenger"),
|
|
27132
|
+
Buffer.from(destinationDomain.toString())
|
|
27133
|
+
], tokenMessengerMinterProgram)[0];
|
|
27134
|
+
const authorityPda = web3_js.PublicKey.findProgramAddressSync([
|
|
27135
|
+
Buffer.from("sender_authority")
|
|
27136
|
+
], tokenMessengerMinterProgram)[0];
|
|
27137
|
+
const tokenMessengerEventAuthority = web3_js.PublicKey.findProgramAddressSync([
|
|
27138
|
+
Buffer.from("__event_authority")
|
|
27139
|
+
], tokenMessengerMinterProgram)[0];
|
|
27140
|
+
return {
|
|
27141
|
+
messageTransmitterAccount,
|
|
27142
|
+
tokenMessengerAccount,
|
|
27143
|
+
tokenMinterAccount,
|
|
27144
|
+
localToken,
|
|
27145
|
+
remoteTokenMessengerKey,
|
|
27146
|
+
authorityPda,
|
|
27147
|
+
tokenMessengerEventAuthority
|
|
27148
|
+
};
|
|
27149
|
+
};
|
|
25568
27150
|
}
|
|
25569
27151
|
}
|
|
25570
27152
|
|
|
@@ -25964,8 +27546,8 @@ let TxBuilder$2 = class TxBuilder {
|
|
|
25964
27546
|
glamSigner,
|
|
25965
27547
|
baseAssetMint
|
|
25966
27548
|
}).transaction();
|
|
25967
|
-
const vTx = await this.base.intoVersionedTransaction(tx, txOptions);
|
|
25968
27549
|
this.base.statePda = statePda;
|
|
27550
|
+
const vTx = await this.base.intoVersionedTransaction(tx, txOptions);
|
|
25969
27551
|
return vTx;
|
|
25970
27552
|
}
|
|
25971
27553
|
async update(updated, txOptions) {
|
|
@@ -28693,15 +30275,40 @@ function getMarketOrderParams(params) {
|
|
|
28693
30275
|
return Object.assign({}, DefaultOrderParams, optionalOrderParams, overridingParams);
|
|
28694
30276
|
}
|
|
28695
30277
|
|
|
30278
|
+
const evmAddressToBytes32 = (address)=>`0x000000000000000000000000${address.replace("0x", "")}`;
|
|
30279
|
+
const hexToBytes = (hex)=>{
|
|
30280
|
+
if (hex.startsWith("0x")) hex = hex.slice(2);
|
|
30281
|
+
let bytes = [];
|
|
30282
|
+
for(let c = 0; c < hex.length; c += 2)bytes.push(parseInt(hex.slice(c, c + 2), 16));
|
|
30283
|
+
return bytes;
|
|
30284
|
+
};
|
|
30285
|
+
const evmAddressToPublicKey = (address)=>{
|
|
30286
|
+
return new web3_js.PublicKey(hexToBytes(evmAddressToBytes32(address)));
|
|
30287
|
+
};
|
|
30288
|
+
const bytesToHex = (bytes)=>{
|
|
30289
|
+
return Array.from(bytes).map((byte)=>byte.toString(16).padStart(2, "0")).join("");
|
|
30290
|
+
};
|
|
30291
|
+
const publicKeyToEvmAddress = (publicKey)=>{
|
|
30292
|
+
const bytes = publicKey.toBytes();
|
|
30293
|
+
const hex = bytesToHex(bytes);
|
|
30294
|
+
// EVM addresses are the last 20 bytes (40 hex characters) of the 32-byte public key
|
|
30295
|
+
const evmAddress = hex.slice(-40);
|
|
30296
|
+
return `0x${evmAddress}`;
|
|
30297
|
+
};
|
|
30298
|
+
|
|
28696
30299
|
exports.ALT_PROGRAM_ID = ALT_PROGRAM_ID;
|
|
28697
30300
|
exports.ASSETS_MAINNET = ASSETS_MAINNET;
|
|
28698
30301
|
exports.ASSETS_TESTS = ASSETS_TESTS;
|
|
28699
30302
|
exports.AssetTier = AssetTier;
|
|
28700
30303
|
exports.BaseClient = BaseClient;
|
|
30304
|
+
exports.CCTP_DOMAIN_MAPPING = CCTP_DOMAIN_MAPPING;
|
|
30305
|
+
exports.CctpPolicy = CctpPolicy;
|
|
28701
30306
|
exports.ClusterNetwork = ClusterNetwork;
|
|
28702
30307
|
exports.ContractTier = ContractTier;
|
|
28703
30308
|
exports.ContractType = ContractType;
|
|
28704
30309
|
exports.CreatedModel = CreatedModel;
|
|
30310
|
+
exports.DRIFT_DISTRIBUTOR_PROGRAM = DRIFT_DISTRIBUTOR_PROGRAM;
|
|
30311
|
+
exports.DRIFT_POOL_MAPPING = DRIFT_POOL_MAPPING;
|
|
28705
30312
|
exports.DRIFT_PROGRAM_ID = DRIFT_PROGRAM_ID;
|
|
28706
30313
|
exports.DRIFT_VAULTS_PROGRAM_ID = DRIFT_VAULTS_PROGRAM_ID;
|
|
28707
30314
|
exports.DRIFT_VAULT_DEPOSITOR_SIZE = DRIFT_VAULT_DEPOSITOR_SIZE;
|
|
@@ -28709,6 +30316,10 @@ exports.DefaultOrderParams = DefaultOrderParams;
|
|
|
28709
30316
|
exports.DelegateAcl = DelegateAcl;
|
|
28710
30317
|
exports.DepositDirection = DepositDirection;
|
|
28711
30318
|
exports.DepositExplanation = DepositExplanation;
|
|
30319
|
+
exports.DriftClient = DriftClient;
|
|
30320
|
+
exports.DriftProtocolPolicy = DriftProtocolPolicy;
|
|
30321
|
+
exports.DriftVaultsClient = DriftVaultsClient;
|
|
30322
|
+
exports.DriftVaultsPolicy = DriftVaultsPolicy;
|
|
28712
30323
|
exports.EmergencyAccessUpdateArgs = EmergencyAccessUpdateArgs;
|
|
28713
30324
|
exports.EmergencyUpdateMintArgs = EmergencyUpdateMintArgs;
|
|
28714
30325
|
exports.ExchangeStatus = ExchangeStatus;
|
|
@@ -28723,6 +30334,7 @@ exports.GlamMintIdlJson = GlamMintIdlJson;
|
|
|
28723
30334
|
exports.GlamPermissions = GlamPermissions;
|
|
28724
30335
|
exports.GlamProtocolIdl = GlamProtocolIdl;
|
|
28725
30336
|
exports.GlamProtocolIdlJson = GlamProtocolIdlJson;
|
|
30337
|
+
exports.INTEGRATION_MAPPING = INTEGRATION_MAPPING;
|
|
28726
30338
|
exports.InsuranceFundOperation = InsuranceFundOperation;
|
|
28727
30339
|
exports.IntegrationAcl = IntegrationAcl;
|
|
28728
30340
|
exports.IntegrationPermissions = IntegrationPermissions;
|
|
@@ -28746,6 +30358,7 @@ exports.MARINADE_NATIVE_STAKE_AUTHORITY = MARINADE_NATIVE_STAKE_AUTHORITY;
|
|
|
28746
30358
|
exports.MARINADE_PROGRAM_ID = MARINADE_PROGRAM_ID;
|
|
28747
30359
|
exports.MEMO_PROGRAM = MEMO_PROGRAM;
|
|
28748
30360
|
exports.MERKLE_DISTRIBUTOR_PROGRAM = MERKLE_DISTRIBUTOR_PROGRAM;
|
|
30361
|
+
exports.MESSAGE_TRANSMITTER_V2 = MESSAGE_TRANSMITTER_V2;
|
|
28749
30362
|
exports.METEORA_DLMM_PROGRAM = METEORA_DLMM_PROGRAM;
|
|
28750
30363
|
exports.METEORA_POSITION_SIZE = METEORA_POSITION_SIZE;
|
|
28751
30364
|
exports.MSOL = MSOL;
|
|
@@ -28754,6 +30367,7 @@ exports.MarketStatus = MarketStatus;
|
|
|
28754
30367
|
exports.MarketType = MarketType;
|
|
28755
30368
|
exports.MintIdlModel = MintIdlModel;
|
|
28756
30369
|
exports.MintModel = MintModel;
|
|
30370
|
+
exports.MintPolicy = MintPolicy;
|
|
28757
30371
|
exports.ModifyOrderPolicy = ModifyOrderPolicy;
|
|
28758
30372
|
exports.OracleSource = OracleSource;
|
|
28759
30373
|
exports.OracleSourceNum = OracleSourceNum;
|
|
@@ -28762,6 +30376,7 @@ exports.OrderActionExplanation = OrderActionExplanation;
|
|
|
28762
30376
|
exports.OrderStatus = OrderStatus;
|
|
28763
30377
|
exports.OrderTriggerCondition = OrderTriggerCondition;
|
|
28764
30378
|
exports.OrderType = OrderType;
|
|
30379
|
+
exports.PERMISSION_MAPPINGS = PERMISSION_MAPPINGS;
|
|
28765
30380
|
exports.PerpOperation = PerpOperation;
|
|
28766
30381
|
exports.PlaceAndTakeOrderSuccessCondition = PlaceAndTakeOrderSuccessCondition;
|
|
28767
30382
|
exports.PositionDirection = PositionDirection;
|
|
@@ -28799,17 +30414,23 @@ exports.StateIdlModel = StateIdlModel;
|
|
|
28799
30414
|
exports.StateModel = StateModel;
|
|
28800
30415
|
exports.SwapDirection = SwapDirection;
|
|
28801
30416
|
exports.SwapReduceOnly = SwapReduceOnly;
|
|
30417
|
+
exports.TOKEN_MESSENGER_MINTER_V2 = TOKEN_MESSENGER_MINTER_V2;
|
|
28802
30418
|
exports.TRANSFER_HOOK_PROGRAM = TRANSFER_HOOK_PROGRAM;
|
|
28803
30419
|
exports.TimeUnit = TimeUnit;
|
|
28804
30420
|
exports.TradeSide = TradeSide;
|
|
30421
|
+
exports.TransferPolicy = TransferPolicy;
|
|
28805
30422
|
exports.USDC = USDC;
|
|
30423
|
+
exports.USDC_DEVNET = USDC_DEVNET;
|
|
28806
30424
|
exports.USDC_ORACLE = USDC_ORACLE;
|
|
28807
30425
|
exports.UserStatus = UserStatus;
|
|
28808
30426
|
exports.VoteAuthorize = VoteAuthorize;
|
|
28809
30427
|
exports.WSOL = WSOL;
|
|
28810
30428
|
exports.ZERO = ZERO;
|
|
30429
|
+
exports.bytesToHex = bytesToHex;
|
|
28811
30430
|
exports.charsToName = charsToName;
|
|
28812
30431
|
exports.decodeUser = decodeUser;
|
|
30432
|
+
exports.evmAddressToBytes32 = evmAddressToBytes32;
|
|
30433
|
+
exports.evmAddressToPublicKey = evmAddressToPublicKey;
|
|
28813
30434
|
exports.fetchMeteoraPositions = fetchMeteoraPositions;
|
|
28814
30435
|
exports.fetchProgramLabels = fetchProgramLabels;
|
|
28815
30436
|
exports.fetchTokenPrices = fetchTokenPrices;
|
|
@@ -28818,6 +30439,7 @@ exports.findStakeAccounts = findStakeAccounts;
|
|
|
28818
30439
|
exports.formatBits = formatBits;
|
|
28819
30440
|
exports.getAccountPolicyPda = getAccountPolicyPda;
|
|
28820
30441
|
exports.getEscrowPda = getEscrowPda;
|
|
30442
|
+
exports.getExtCctpProgram = getExtCctpProgram;
|
|
28821
30443
|
exports.getExtDriftProgram = getExtDriftProgram;
|
|
28822
30444
|
exports.getExtKaminoProgram = getExtKaminoProgram;
|
|
28823
30445
|
exports.getExtMarinadeProgram = getExtMarinadeProgram;
|
|
@@ -28847,10 +30469,12 @@ exports.getTriggerLimitOrderParams = getTriggerLimitOrderParams;
|
|
|
28847
30469
|
exports.getTriggerMarketOrderParams = getTriggerMarketOrderParams;
|
|
28848
30470
|
exports.getVariant = getVariant;
|
|
28849
30471
|
exports.getVaultPda = getVaultPda;
|
|
30472
|
+
exports.hexToBytes = hexToBytes;
|
|
28850
30473
|
exports.isBrowser = isBrowser;
|
|
28851
30474
|
exports.isOneOfVariant = isOneOfVariant;
|
|
28852
30475
|
exports.isVariant = isVariant;
|
|
28853
30476
|
exports.nameToChars = nameToChars;
|
|
28854
30477
|
exports.parseMeteoraPosition = parseMeteoraPosition;
|
|
28855
30478
|
exports.parseProgramLogs = parseProgramLogs;
|
|
30479
|
+
exports.publicKeyToEvmAddress = publicKeyToEvmAddress;
|
|
28856
30480
|
exports.setsAreEqual = setsAreEqual;
|