pnp-sdk 0.2.10 → 0.2.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-SIMCEKAG.js → chunk-ITEBWEGS.js} +772 -24
- package/dist/chunk-ITEBWEGS.js.map +1 -0
- package/dist/cli.cjs +734 -28
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +1 -1
- package/dist/index.cjs +771 -23
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +83 -2
- package/dist/index.d.ts +83 -2
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-SIMCEKAG.js.map +0 -1
package/dist/cli.cjs
CHANGED
|
@@ -58,7 +58,7 @@ var import_anchor = require("@coral-xyz/anchor");
|
|
|
58
58
|
|
|
59
59
|
// src/idl/pnp_protocol_solana.json
|
|
60
60
|
var pnp_protocol_solana_default = {
|
|
61
|
-
address: "
|
|
61
|
+
address: "8PyE2dizL52ga7ytqLtqRyjwWp4yXEx8M5Z4BAHgHuTb",
|
|
62
62
|
metadata: {
|
|
63
63
|
name: "pnp_protocol_solana",
|
|
64
64
|
version: "0.1.0",
|
|
@@ -3826,6 +3826,357 @@ var pnp_protocol_solana_default = {
|
|
|
3826
3826
|
],
|
|
3827
3827
|
returns: "u64"
|
|
3828
3828
|
},
|
|
3829
|
+
{
|
|
3830
|
+
name: "redeem_creator_liquidity",
|
|
3831
|
+
docs: [
|
|
3832
|
+
"Redeems creator's locked liquidity after market settlement (V2 only)",
|
|
3833
|
+
"",
|
|
3834
|
+
"# Arguments",
|
|
3835
|
+
"* `ctx` - The context containing creator liquidity redemption accounts",
|
|
3836
|
+
"",
|
|
3837
|
+
"# Returns",
|
|
3838
|
+
"* Amount of collateral redeemed"
|
|
3839
|
+
],
|
|
3840
|
+
discriminator: [
|
|
3841
|
+
189,
|
|
3842
|
+
166,
|
|
3843
|
+
66,
|
|
3844
|
+
201,
|
|
3845
|
+
145,
|
|
3846
|
+
236,
|
|
3847
|
+
219,
|
|
3848
|
+
70
|
|
3849
|
+
],
|
|
3850
|
+
accounts: [
|
|
3851
|
+
{
|
|
3852
|
+
name: "creator",
|
|
3853
|
+
docs: [
|
|
3854
|
+
"Creator who is claiming locked liquidity"
|
|
3855
|
+
],
|
|
3856
|
+
writable: true,
|
|
3857
|
+
signer: true
|
|
3858
|
+
},
|
|
3859
|
+
{
|
|
3860
|
+
name: "market",
|
|
3861
|
+
docs: [
|
|
3862
|
+
"V2 Market account"
|
|
3863
|
+
],
|
|
3864
|
+
writable: true,
|
|
3865
|
+
pda: {
|
|
3866
|
+
seeds: [
|
|
3867
|
+
{
|
|
3868
|
+
kind: "const",
|
|
3869
|
+
value: [
|
|
3870
|
+
109,
|
|
3871
|
+
97,
|
|
3872
|
+
114,
|
|
3873
|
+
107,
|
|
3874
|
+
101,
|
|
3875
|
+
116,
|
|
3876
|
+
45,
|
|
3877
|
+
118,
|
|
3878
|
+
50
|
|
3879
|
+
]
|
|
3880
|
+
},
|
|
3881
|
+
{
|
|
3882
|
+
kind: "account",
|
|
3883
|
+
path: "market.id",
|
|
3884
|
+
account: "Market"
|
|
3885
|
+
}
|
|
3886
|
+
]
|
|
3887
|
+
}
|
|
3888
|
+
},
|
|
3889
|
+
{
|
|
3890
|
+
name: "yes_token_mint",
|
|
3891
|
+
docs: [
|
|
3892
|
+
"YES token mint"
|
|
3893
|
+
],
|
|
3894
|
+
writable: true
|
|
3895
|
+
},
|
|
3896
|
+
{
|
|
3897
|
+
name: "no_token_mint",
|
|
3898
|
+
docs: [
|
|
3899
|
+
"NO token mint"
|
|
3900
|
+
],
|
|
3901
|
+
writable: true
|
|
3902
|
+
},
|
|
3903
|
+
{
|
|
3904
|
+
name: "market_yes_token_vault",
|
|
3905
|
+
docs: [
|
|
3906
|
+
"Market vault holding creator's locked YES tokens (ATA owned by market PDA)"
|
|
3907
|
+
],
|
|
3908
|
+
writable: true,
|
|
3909
|
+
pda: {
|
|
3910
|
+
seeds: [
|
|
3911
|
+
{
|
|
3912
|
+
kind: "account",
|
|
3913
|
+
path: "market"
|
|
3914
|
+
},
|
|
3915
|
+
{
|
|
3916
|
+
kind: "account",
|
|
3917
|
+
path: "token_program_decision"
|
|
3918
|
+
},
|
|
3919
|
+
{
|
|
3920
|
+
kind: "account",
|
|
3921
|
+
path: "yes_token_mint"
|
|
3922
|
+
}
|
|
3923
|
+
],
|
|
3924
|
+
program: {
|
|
3925
|
+
kind: "const",
|
|
3926
|
+
value: [
|
|
3927
|
+
140,
|
|
3928
|
+
151,
|
|
3929
|
+
37,
|
|
3930
|
+
143,
|
|
3931
|
+
78,
|
|
3932
|
+
36,
|
|
3933
|
+
137,
|
|
3934
|
+
241,
|
|
3935
|
+
187,
|
|
3936
|
+
61,
|
|
3937
|
+
16,
|
|
3938
|
+
41,
|
|
3939
|
+
20,
|
|
3940
|
+
142,
|
|
3941
|
+
13,
|
|
3942
|
+
131,
|
|
3943
|
+
11,
|
|
3944
|
+
90,
|
|
3945
|
+
19,
|
|
3946
|
+
153,
|
|
3947
|
+
218,
|
|
3948
|
+
255,
|
|
3949
|
+
16,
|
|
3950
|
+
132,
|
|
3951
|
+
4,
|
|
3952
|
+
142,
|
|
3953
|
+
123,
|
|
3954
|
+
216,
|
|
3955
|
+
219,
|
|
3956
|
+
233,
|
|
3957
|
+
248,
|
|
3958
|
+
89
|
|
3959
|
+
]
|
|
3960
|
+
}
|
|
3961
|
+
}
|
|
3962
|
+
},
|
|
3963
|
+
{
|
|
3964
|
+
name: "market_no_token_vault",
|
|
3965
|
+
docs: [
|
|
3966
|
+
"Market vault holding creator's locked NO tokens (ATA owned by market PDA)"
|
|
3967
|
+
],
|
|
3968
|
+
writable: true,
|
|
3969
|
+
pda: {
|
|
3970
|
+
seeds: [
|
|
3971
|
+
{
|
|
3972
|
+
kind: "account",
|
|
3973
|
+
path: "market"
|
|
3974
|
+
},
|
|
3975
|
+
{
|
|
3976
|
+
kind: "account",
|
|
3977
|
+
path: "token_program_decision"
|
|
3978
|
+
},
|
|
3979
|
+
{
|
|
3980
|
+
kind: "account",
|
|
3981
|
+
path: "no_token_mint"
|
|
3982
|
+
}
|
|
3983
|
+
],
|
|
3984
|
+
program: {
|
|
3985
|
+
kind: "const",
|
|
3986
|
+
value: [
|
|
3987
|
+
140,
|
|
3988
|
+
151,
|
|
3989
|
+
37,
|
|
3990
|
+
143,
|
|
3991
|
+
78,
|
|
3992
|
+
36,
|
|
3993
|
+
137,
|
|
3994
|
+
241,
|
|
3995
|
+
187,
|
|
3996
|
+
61,
|
|
3997
|
+
16,
|
|
3998
|
+
41,
|
|
3999
|
+
20,
|
|
4000
|
+
142,
|
|
4001
|
+
13,
|
|
4002
|
+
131,
|
|
4003
|
+
11,
|
|
4004
|
+
90,
|
|
4005
|
+
19,
|
|
4006
|
+
153,
|
|
4007
|
+
218,
|
|
4008
|
+
255,
|
|
4009
|
+
16,
|
|
4010
|
+
132,
|
|
4011
|
+
4,
|
|
4012
|
+
142,
|
|
4013
|
+
123,
|
|
4014
|
+
216,
|
|
4015
|
+
219,
|
|
4016
|
+
233,
|
|
4017
|
+
248,
|
|
4018
|
+
89
|
|
4019
|
+
]
|
|
4020
|
+
}
|
|
4021
|
+
}
|
|
4022
|
+
},
|
|
4023
|
+
{
|
|
4024
|
+
name: "market_reserve_vault",
|
|
4025
|
+
docs: [
|
|
4026
|
+
"Market's collateral token vault (reserve)"
|
|
4027
|
+
],
|
|
4028
|
+
writable: true,
|
|
4029
|
+
pda: {
|
|
4030
|
+
seeds: [
|
|
4031
|
+
{
|
|
4032
|
+
kind: "account",
|
|
4033
|
+
path: "market"
|
|
4034
|
+
},
|
|
4035
|
+
{
|
|
4036
|
+
kind: "account",
|
|
4037
|
+
path: "token_program"
|
|
4038
|
+
},
|
|
4039
|
+
{
|
|
4040
|
+
kind: "account",
|
|
4041
|
+
path: "collateral_token_mint"
|
|
4042
|
+
}
|
|
4043
|
+
],
|
|
4044
|
+
program: {
|
|
4045
|
+
kind: "const",
|
|
4046
|
+
value: [
|
|
4047
|
+
140,
|
|
4048
|
+
151,
|
|
4049
|
+
37,
|
|
4050
|
+
143,
|
|
4051
|
+
78,
|
|
4052
|
+
36,
|
|
4053
|
+
137,
|
|
4054
|
+
241,
|
|
4055
|
+
187,
|
|
4056
|
+
61,
|
|
4057
|
+
16,
|
|
4058
|
+
41,
|
|
4059
|
+
20,
|
|
4060
|
+
142,
|
|
4061
|
+
13,
|
|
4062
|
+
131,
|
|
4063
|
+
11,
|
|
4064
|
+
90,
|
|
4065
|
+
19,
|
|
4066
|
+
153,
|
|
4067
|
+
218,
|
|
4068
|
+
255,
|
|
4069
|
+
16,
|
|
4070
|
+
132,
|
|
4071
|
+
4,
|
|
4072
|
+
142,
|
|
4073
|
+
123,
|
|
4074
|
+
216,
|
|
4075
|
+
219,
|
|
4076
|
+
233,
|
|
4077
|
+
248,
|
|
4078
|
+
89
|
|
4079
|
+
]
|
|
4080
|
+
}
|
|
4081
|
+
}
|
|
4082
|
+
},
|
|
4083
|
+
{
|
|
4084
|
+
name: "collateral_token_mint",
|
|
4085
|
+
docs: [
|
|
4086
|
+
"Collateral token mint"
|
|
4087
|
+
]
|
|
4088
|
+
},
|
|
4089
|
+
{
|
|
4090
|
+
name: "creator_collateral_token_account",
|
|
4091
|
+
docs: [
|
|
4092
|
+
"Creator's collateral token account (receives payout)"
|
|
4093
|
+
],
|
|
4094
|
+
writable: true,
|
|
4095
|
+
pda: {
|
|
4096
|
+
seeds: [
|
|
4097
|
+
{
|
|
4098
|
+
kind: "account",
|
|
4099
|
+
path: "creator"
|
|
4100
|
+
},
|
|
4101
|
+
{
|
|
4102
|
+
kind: "account",
|
|
4103
|
+
path: "token_program"
|
|
4104
|
+
},
|
|
4105
|
+
{
|
|
4106
|
+
kind: "account",
|
|
4107
|
+
path: "collateral_token_mint"
|
|
4108
|
+
}
|
|
4109
|
+
],
|
|
4110
|
+
program: {
|
|
4111
|
+
kind: "const",
|
|
4112
|
+
value: [
|
|
4113
|
+
140,
|
|
4114
|
+
151,
|
|
4115
|
+
37,
|
|
4116
|
+
143,
|
|
4117
|
+
78,
|
|
4118
|
+
36,
|
|
4119
|
+
137,
|
|
4120
|
+
241,
|
|
4121
|
+
187,
|
|
4122
|
+
61,
|
|
4123
|
+
16,
|
|
4124
|
+
41,
|
|
4125
|
+
20,
|
|
4126
|
+
142,
|
|
4127
|
+
13,
|
|
4128
|
+
131,
|
|
4129
|
+
11,
|
|
4130
|
+
90,
|
|
4131
|
+
19,
|
|
4132
|
+
153,
|
|
4133
|
+
218,
|
|
4134
|
+
255,
|
|
4135
|
+
16,
|
|
4136
|
+
132,
|
|
4137
|
+
4,
|
|
4138
|
+
142,
|
|
4139
|
+
123,
|
|
4140
|
+
216,
|
|
4141
|
+
219,
|
|
4142
|
+
233,
|
|
4143
|
+
248,
|
|
4144
|
+
89
|
|
4145
|
+
]
|
|
4146
|
+
}
|
|
4147
|
+
}
|
|
4148
|
+
},
|
|
4149
|
+
{
|
|
4150
|
+
name: "token_program",
|
|
4151
|
+
docs: [
|
|
4152
|
+
"Token program for collateral transfers (may be Token-2022)"
|
|
4153
|
+
]
|
|
4154
|
+
},
|
|
4155
|
+
{
|
|
4156
|
+
name: "token_program_decision",
|
|
4157
|
+
docs: [
|
|
4158
|
+
"Token program for decision token burns (always standard SPL Token)"
|
|
4159
|
+
],
|
|
4160
|
+
address: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
|
|
4161
|
+
},
|
|
4162
|
+
{
|
|
4163
|
+
name: "associated_token_program",
|
|
4164
|
+
docs: [
|
|
4165
|
+
"Associated token program"
|
|
4166
|
+
],
|
|
4167
|
+
address: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
|
|
4168
|
+
},
|
|
4169
|
+
{
|
|
4170
|
+
name: "system_program",
|
|
4171
|
+
docs: [
|
|
4172
|
+
"System program"
|
|
4173
|
+
],
|
|
4174
|
+
address: "11111111111111111111111111111111"
|
|
4175
|
+
}
|
|
4176
|
+
],
|
|
4177
|
+
args: [],
|
|
4178
|
+
returns: "u64"
|
|
4179
|
+
},
|
|
3829
4180
|
{
|
|
3830
4181
|
name: "redeem_position",
|
|
3831
4182
|
docs: [
|
|
@@ -5522,7 +5873,30 @@ var pnp_protocol_solana_default = {
|
|
|
5522
5873
|
docs: [
|
|
5523
5874
|
"V2 Market account to update"
|
|
5524
5875
|
],
|
|
5525
|
-
writable: true
|
|
5876
|
+
writable: true,
|
|
5877
|
+
pda: {
|
|
5878
|
+
seeds: [
|
|
5879
|
+
{
|
|
5880
|
+
kind: "const",
|
|
5881
|
+
value: [
|
|
5882
|
+
109,
|
|
5883
|
+
97,
|
|
5884
|
+
114,
|
|
5885
|
+
107,
|
|
5886
|
+
101,
|
|
5887
|
+
116,
|
|
5888
|
+
45,
|
|
5889
|
+
118,
|
|
5890
|
+
50
|
|
5891
|
+
]
|
|
5892
|
+
},
|
|
5893
|
+
{
|
|
5894
|
+
kind: "account",
|
|
5895
|
+
path: "market.id",
|
|
5896
|
+
account: "Market"
|
|
5897
|
+
}
|
|
5898
|
+
]
|
|
5899
|
+
}
|
|
5526
5900
|
},
|
|
5527
5901
|
{
|
|
5528
5902
|
name: "market_extension",
|
|
@@ -5621,20 +5995,20 @@ var pnp_protocol_solana_default = {
|
|
|
5621
5995
|
{
|
|
5622
5996
|
name: "creator",
|
|
5623
5997
|
docs: [
|
|
5624
|
-
"Original market creator (for
|
|
5998
|
+
"Original market creator (for validation)"
|
|
5625
5999
|
]
|
|
5626
6000
|
},
|
|
5627
6001
|
{
|
|
5628
|
-
name: "
|
|
6002
|
+
name: "market_yes_token_vault",
|
|
5629
6003
|
docs: [
|
|
5630
|
-
"
|
|
6004
|
+
"Market vault for creator's locked YES tokens (ATA owned by market PDA)"
|
|
5631
6005
|
],
|
|
5632
6006
|
writable: true,
|
|
5633
6007
|
pda: {
|
|
5634
6008
|
seeds: [
|
|
5635
6009
|
{
|
|
5636
6010
|
kind: "account",
|
|
5637
|
-
path: "
|
|
6011
|
+
path: "market"
|
|
5638
6012
|
},
|
|
5639
6013
|
{
|
|
5640
6014
|
kind: "account",
|
|
@@ -5685,16 +6059,16 @@ var pnp_protocol_solana_default = {
|
|
|
5685
6059
|
}
|
|
5686
6060
|
},
|
|
5687
6061
|
{
|
|
5688
|
-
name: "
|
|
6062
|
+
name: "market_no_token_vault",
|
|
5689
6063
|
docs: [
|
|
5690
|
-
"
|
|
6064
|
+
"Market vault for creator's locked NO tokens (ATA owned by market PDA)"
|
|
5691
6065
|
],
|
|
5692
6066
|
writable: true,
|
|
5693
6067
|
pda: {
|
|
5694
6068
|
seeds: [
|
|
5695
6069
|
{
|
|
5696
6070
|
kind: "account",
|
|
5697
|
-
path: "
|
|
6071
|
+
path: "market"
|
|
5698
6072
|
},
|
|
5699
6073
|
{
|
|
5700
6074
|
kind: "account",
|
|
@@ -6551,29 +6925,165 @@ var pnp_protocol_solana_default = {
|
|
|
6551
6925
|
{
|
|
6552
6926
|
name: "token_program",
|
|
6553
6927
|
docs: [
|
|
6554
|
-
"Token program for collateral (SPL or Token-2022)"
|
|
6555
|
-
]
|
|
6928
|
+
"Token program for collateral (SPL or Token-2022)"
|
|
6929
|
+
]
|
|
6930
|
+
},
|
|
6931
|
+
{
|
|
6932
|
+
name: "token_program_decision",
|
|
6933
|
+
docs: [
|
|
6934
|
+
"Token program for decision mints (SPL Token, auto-resolved)"
|
|
6935
|
+
],
|
|
6936
|
+
address: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
|
|
6937
|
+
},
|
|
6938
|
+
{
|
|
6939
|
+
name: "associated_token_program",
|
|
6940
|
+
docs: [
|
|
6941
|
+
"Associated token program"
|
|
6942
|
+
],
|
|
6943
|
+
address: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
|
|
6944
|
+
},
|
|
6945
|
+
{
|
|
6946
|
+
name: "system_program",
|
|
6947
|
+
docs: [
|
|
6948
|
+
"System program"
|
|
6949
|
+
],
|
|
6950
|
+
address: "11111111111111111111111111111111"
|
|
6951
|
+
}
|
|
6952
|
+
],
|
|
6953
|
+
args: [
|
|
6954
|
+
{
|
|
6955
|
+
name: "yes_winner",
|
|
6956
|
+
type: "bool"
|
|
6957
|
+
}
|
|
6958
|
+
],
|
|
6959
|
+
returns: {
|
|
6960
|
+
defined: {
|
|
6961
|
+
name: "WinningToken"
|
|
6962
|
+
}
|
|
6963
|
+
}
|
|
6964
|
+
},
|
|
6965
|
+
{
|
|
6966
|
+
name: "settle_market_v2",
|
|
6967
|
+
docs: [
|
|
6968
|
+
"Settles a V2 market with custom oracle support",
|
|
6969
|
+
"",
|
|
6970
|
+
"Unlike the original settle_market (which only accepts admin/global oracle),",
|
|
6971
|
+
"this instruction also accepts the per-market custom oracle from MarketExtension.",
|
|
6972
|
+
"",
|
|
6973
|
+
"# Arguments",
|
|
6974
|
+
"* `ctx` - The context containing V2 settlement accounts",
|
|
6975
|
+
"* `yes_winner` - If true, YES tokens win; if false, NO tokens win",
|
|
6976
|
+
"",
|
|
6977
|
+
"# Returns",
|
|
6978
|
+
"* The winning token type"
|
|
6979
|
+
],
|
|
6980
|
+
discriminator: [
|
|
6981
|
+
131,
|
|
6982
|
+
199,
|
|
6983
|
+
75,
|
|
6984
|
+
155,
|
|
6985
|
+
16,
|
|
6986
|
+
199,
|
|
6987
|
+
72,
|
|
6988
|
+
1
|
|
6989
|
+
],
|
|
6990
|
+
accounts: [
|
|
6991
|
+
{
|
|
6992
|
+
name: "settler",
|
|
6993
|
+
docs: [
|
|
6994
|
+
"Settler account \u2014 must be admin, global oracle, or custom oracle from extension"
|
|
6995
|
+
],
|
|
6996
|
+
writable: true,
|
|
6997
|
+
signer: true
|
|
6556
6998
|
},
|
|
6557
6999
|
{
|
|
6558
|
-
name: "
|
|
7000
|
+
name: "market",
|
|
6559
7001
|
docs: [
|
|
6560
|
-
"
|
|
7002
|
+
"V2 Market account"
|
|
6561
7003
|
],
|
|
6562
|
-
|
|
7004
|
+
writable: true,
|
|
7005
|
+
pda: {
|
|
7006
|
+
seeds: [
|
|
7007
|
+
{
|
|
7008
|
+
kind: "const",
|
|
7009
|
+
value: [
|
|
7010
|
+
109,
|
|
7011
|
+
97,
|
|
7012
|
+
114,
|
|
7013
|
+
107,
|
|
7014
|
+
101,
|
|
7015
|
+
116,
|
|
7016
|
+
45,
|
|
7017
|
+
118,
|
|
7018
|
+
50
|
|
7019
|
+
]
|
|
7020
|
+
},
|
|
7021
|
+
{
|
|
7022
|
+
kind: "account",
|
|
7023
|
+
path: "market.id",
|
|
7024
|
+
account: "Market"
|
|
7025
|
+
}
|
|
7026
|
+
]
|
|
7027
|
+
}
|
|
6563
7028
|
},
|
|
6564
7029
|
{
|
|
6565
|
-
name: "
|
|
7030
|
+
name: "market_extension",
|
|
6566
7031
|
docs: [
|
|
6567
|
-
"
|
|
7032
|
+
"Optional market extension \u2014 pass if market has custom oracle"
|
|
6568
7033
|
],
|
|
6569
|
-
|
|
7034
|
+
optional: true,
|
|
7035
|
+
pda: {
|
|
7036
|
+
seeds: [
|
|
7037
|
+
{
|
|
7038
|
+
kind: "const",
|
|
7039
|
+
value: [
|
|
7040
|
+
109,
|
|
7041
|
+
97,
|
|
7042
|
+
114,
|
|
7043
|
+
107,
|
|
7044
|
+
101,
|
|
7045
|
+
116,
|
|
7046
|
+
95,
|
|
7047
|
+
101,
|
|
7048
|
+
120,
|
|
7049
|
+
116
|
|
7050
|
+
]
|
|
7051
|
+
},
|
|
7052
|
+
{
|
|
7053
|
+
kind: "account",
|
|
7054
|
+
path: "market.id",
|
|
7055
|
+
account: "Market"
|
|
7056
|
+
}
|
|
7057
|
+
]
|
|
7058
|
+
}
|
|
6570
7059
|
},
|
|
6571
7060
|
{
|
|
6572
|
-
name: "
|
|
7061
|
+
name: "global_config",
|
|
6573
7062
|
docs: [
|
|
6574
|
-
"
|
|
7063
|
+
"Global configuration"
|
|
6575
7064
|
],
|
|
6576
|
-
|
|
7065
|
+
pda: {
|
|
7066
|
+
seeds: [
|
|
7067
|
+
{
|
|
7068
|
+
kind: "const",
|
|
7069
|
+
value: [
|
|
7070
|
+
103,
|
|
7071
|
+
108,
|
|
7072
|
+
111,
|
|
7073
|
+
98,
|
|
7074
|
+
97,
|
|
7075
|
+
108,
|
|
7076
|
+
95,
|
|
7077
|
+
99,
|
|
7078
|
+
111,
|
|
7079
|
+
110,
|
|
7080
|
+
102,
|
|
7081
|
+
105,
|
|
7082
|
+
103
|
|
7083
|
+
]
|
|
7084
|
+
}
|
|
7085
|
+
]
|
|
7086
|
+
}
|
|
6577
7087
|
}
|
|
6578
7088
|
],
|
|
6579
7089
|
args: [
|
|
@@ -6795,6 +7305,71 @@ var pnp_protocol_solana_default = {
|
|
|
6795
7305
|
type: "pubkey"
|
|
6796
7306
|
}
|
|
6797
7307
|
]
|
|
7308
|
+
},
|
|
7309
|
+
{
|
|
7310
|
+
name: "update_oracle",
|
|
7311
|
+
docs: [
|
|
7312
|
+
"Updates the oracle program address (admin-only)",
|
|
7313
|
+
"",
|
|
7314
|
+
"# Arguments",
|
|
7315
|
+
"* `ctx` - The context containing oracle update accounts",
|
|
7316
|
+
"* `new_oracle` - The new oracle program public key"
|
|
7317
|
+
],
|
|
7318
|
+
discriminator: [
|
|
7319
|
+
112,
|
|
7320
|
+
41,
|
|
7321
|
+
209,
|
|
7322
|
+
18,
|
|
7323
|
+
248,
|
|
7324
|
+
226,
|
|
7325
|
+
252,
|
|
7326
|
+
188
|
|
7327
|
+
],
|
|
7328
|
+
accounts: [
|
|
7329
|
+
{
|
|
7330
|
+
name: "authority",
|
|
7331
|
+
docs: [
|
|
7332
|
+
"The admin authority. ONLY the admin can update the oracle \u2014 NOT the oracle itself.",
|
|
7333
|
+
"This prevents a compromised oracle from locking out the protocol."
|
|
7334
|
+
],
|
|
7335
|
+
signer: true
|
|
7336
|
+
},
|
|
7337
|
+
{
|
|
7338
|
+
name: "global_config",
|
|
7339
|
+
docs: [
|
|
7340
|
+
"The global configuration account storing protocol settings"
|
|
7341
|
+
],
|
|
7342
|
+
writable: true,
|
|
7343
|
+
pda: {
|
|
7344
|
+
seeds: [
|
|
7345
|
+
{
|
|
7346
|
+
kind: "const",
|
|
7347
|
+
value: [
|
|
7348
|
+
103,
|
|
7349
|
+
108,
|
|
7350
|
+
111,
|
|
7351
|
+
98,
|
|
7352
|
+
97,
|
|
7353
|
+
108,
|
|
7354
|
+
95,
|
|
7355
|
+
99,
|
|
7356
|
+
111,
|
|
7357
|
+
110,
|
|
7358
|
+
102,
|
|
7359
|
+
105,
|
|
7360
|
+
103
|
|
7361
|
+
]
|
|
7362
|
+
}
|
|
7363
|
+
]
|
|
7364
|
+
}
|
|
7365
|
+
}
|
|
7366
|
+
],
|
|
7367
|
+
args: [
|
|
7368
|
+
{
|
|
7369
|
+
name: "new_oracle",
|
|
7370
|
+
type: "pubkey"
|
|
7371
|
+
}
|
|
7372
|
+
]
|
|
6798
7373
|
}
|
|
6799
7374
|
],
|
|
6800
7375
|
accounts: [
|
|
@@ -6904,6 +7479,19 @@ var pnp_protocol_solana_default = {
|
|
|
6904
7479
|
7
|
|
6905
7480
|
]
|
|
6906
7481
|
},
|
|
7482
|
+
{
|
|
7483
|
+
name: "CreatorLiquidityRedeemed",
|
|
7484
|
+
discriminator: [
|
|
7485
|
+
242,
|
|
7486
|
+
202,
|
|
7487
|
+
33,
|
|
7488
|
+
247,
|
|
7489
|
+
73,
|
|
7490
|
+
224,
|
|
7491
|
+
194,
|
|
7492
|
+
141
|
|
7493
|
+
]
|
|
7494
|
+
},
|
|
6907
7495
|
{
|
|
6908
7496
|
name: "CreatorRefundEvent",
|
|
6909
7497
|
discriminator: [
|
|
@@ -7112,6 +7700,19 @@ var pnp_protocol_solana_default = {
|
|
|
7112
7700
|
165
|
|
7113
7701
|
]
|
|
7114
7702
|
},
|
|
7703
|
+
{
|
|
7704
|
+
name: "SettleMarketV2Event",
|
|
7705
|
+
discriminator: [
|
|
7706
|
+
134,
|
|
7707
|
+
247,
|
|
7708
|
+
23,
|
|
7709
|
+
246,
|
|
7710
|
+
163,
|
|
7711
|
+
42,
|
|
7712
|
+
206,
|
|
7713
|
+
229
|
|
7714
|
+
]
|
|
7715
|
+
},
|
|
7115
7716
|
{
|
|
7116
7717
|
name: "SettleMarketV3Event",
|
|
7117
7718
|
discriminator: [
|
|
@@ -7124,6 +7725,19 @@ var pnp_protocol_solana_default = {
|
|
|
7124
7725
|
44,
|
|
7125
7726
|
100
|
|
7126
7727
|
]
|
|
7728
|
+
},
|
|
7729
|
+
{
|
|
7730
|
+
name: "UpdateOracleEvent",
|
|
7731
|
+
discriminator: [
|
|
7732
|
+
160,
|
|
7733
|
+
215,
|
|
7734
|
+
18,
|
|
7735
|
+
128,
|
|
7736
|
+
160,
|
|
7737
|
+
219,
|
|
7738
|
+
87,
|
|
7739
|
+
173
|
|
7740
|
+
]
|
|
7127
7741
|
}
|
|
7128
7742
|
],
|
|
7129
7743
|
errors: [
|
|
@@ -7260,6 +7874,34 @@ var pnp_protocol_solana_default = {
|
|
|
7260
7874
|
]
|
|
7261
7875
|
}
|
|
7262
7876
|
},
|
|
7877
|
+
{
|
|
7878
|
+
name: "CreatorLiquidityRedeemed",
|
|
7879
|
+
type: {
|
|
7880
|
+
kind: "struct",
|
|
7881
|
+
fields: [
|
|
7882
|
+
{
|
|
7883
|
+
name: "market_id",
|
|
7884
|
+
type: "u64"
|
|
7885
|
+
},
|
|
7886
|
+
{
|
|
7887
|
+
name: "market",
|
|
7888
|
+
type: "pubkey"
|
|
7889
|
+
},
|
|
7890
|
+
{
|
|
7891
|
+
name: "creator",
|
|
7892
|
+
type: "pubkey"
|
|
7893
|
+
},
|
|
7894
|
+
{
|
|
7895
|
+
name: "winning_tokens_burned",
|
|
7896
|
+
type: "u64"
|
|
7897
|
+
},
|
|
7898
|
+
{
|
|
7899
|
+
name: "collateral_redeemed",
|
|
7900
|
+
type: "u64"
|
|
7901
|
+
}
|
|
7902
|
+
]
|
|
7903
|
+
}
|
|
7904
|
+
},
|
|
7263
7905
|
{
|
|
7264
7906
|
name: "CreatorRefundEvent",
|
|
7265
7907
|
docs: [
|
|
@@ -7609,6 +8251,27 @@ var pnp_protocol_solana_default = {
|
|
|
7609
8251
|
{
|
|
7610
8252
|
name: "version",
|
|
7611
8253
|
type: "u8"
|
|
8254
|
+
},
|
|
8255
|
+
{
|
|
8256
|
+
name: "creator_yes_locked",
|
|
8257
|
+
docs: [
|
|
8258
|
+
"Amount of YES tokens locked in vault for creator (set during setMarketResolvableV2)"
|
|
8259
|
+
],
|
|
8260
|
+
type: "u64"
|
|
8261
|
+
},
|
|
8262
|
+
{
|
|
8263
|
+
name: "creator_no_locked",
|
|
8264
|
+
docs: [
|
|
8265
|
+
"Amount of NO tokens locked in vault for creator (set during setMarketResolvableV2)"
|
|
8266
|
+
],
|
|
8267
|
+
type: "u64"
|
|
8268
|
+
},
|
|
8269
|
+
{
|
|
8270
|
+
name: "creator_liquidity_claimed",
|
|
8271
|
+
docs: [
|
|
8272
|
+
"Whether the creator has already claimed locked liquidity"
|
|
8273
|
+
],
|
|
8274
|
+
type: "bool"
|
|
7612
8275
|
}
|
|
7613
8276
|
]
|
|
7614
8277
|
}
|
|
@@ -8302,6 +8965,26 @@ var pnp_protocol_solana_default = {
|
|
|
8302
8965
|
]
|
|
8303
8966
|
}
|
|
8304
8967
|
},
|
|
8968
|
+
{
|
|
8969
|
+
name: "SettleMarketV2Event",
|
|
8970
|
+
type: {
|
|
8971
|
+
kind: "struct",
|
|
8972
|
+
fields: [
|
|
8973
|
+
{
|
|
8974
|
+
name: "market",
|
|
8975
|
+
type: "pubkey"
|
|
8976
|
+
},
|
|
8977
|
+
{
|
|
8978
|
+
name: "market_id",
|
|
8979
|
+
type: "u64"
|
|
8980
|
+
},
|
|
8981
|
+
{
|
|
8982
|
+
name: "yes_winner",
|
|
8983
|
+
type: "bool"
|
|
8984
|
+
}
|
|
8985
|
+
]
|
|
8986
|
+
}
|
|
8987
|
+
},
|
|
8305
8988
|
{
|
|
8306
8989
|
name: "SettleMarketV3Event",
|
|
8307
8990
|
type: {
|
|
@@ -8347,6 +9030,31 @@ var pnp_protocol_solana_default = {
|
|
|
8347
9030
|
]
|
|
8348
9031
|
}
|
|
8349
9032
|
},
|
|
9033
|
+
{
|
|
9034
|
+
name: "UpdateOracleEvent",
|
|
9035
|
+
docs: [
|
|
9036
|
+
"Event emitted when the oracle program address is updated"
|
|
9037
|
+
],
|
|
9038
|
+
type: {
|
|
9039
|
+
kind: "struct",
|
|
9040
|
+
fields: [
|
|
9041
|
+
{
|
|
9042
|
+
name: "old_oracle",
|
|
9043
|
+
docs: [
|
|
9044
|
+
"The previous oracle program address"
|
|
9045
|
+
],
|
|
9046
|
+
type: "pubkey"
|
|
9047
|
+
},
|
|
9048
|
+
{
|
|
9049
|
+
name: "new_oracle",
|
|
9050
|
+
docs: [
|
|
9051
|
+
"The new oracle program address"
|
|
9052
|
+
],
|
|
9053
|
+
type: "pubkey"
|
|
9054
|
+
}
|
|
9055
|
+
]
|
|
9056
|
+
}
|
|
9057
|
+
},
|
|
8350
9058
|
{
|
|
8351
9059
|
name: "WinningToken",
|
|
8352
9060
|
docs: [
|
|
@@ -8505,6 +9213,7 @@ function constructAccountMetas(ixDef, accounts) {
|
|
|
8505
9213
|
const pubkey = accounts[name];
|
|
8506
9214
|
if (!pubkey) {
|
|
8507
9215
|
if (optional) {
|
|
9216
|
+
metas.push({ pubkey: PNP_PROGRAM_ID, isSigner: false, isWritable: false });
|
|
8508
9217
|
continue;
|
|
8509
9218
|
}
|
|
8510
9219
|
throw new Error(`Missing account for ${ixDef.name}: ${name}`);
|
|
@@ -8521,7 +9230,7 @@ function decodeAccount(accountName, data) {
|
|
|
8521
9230
|
|
|
8522
9231
|
// src/platform/client.ts
|
|
8523
9232
|
var MAINNET_PROGRAM_ID = PNP_PROGRAM_ID;
|
|
8524
|
-
var DEVNET_PROGRAM_ID = new import_web32.PublicKey("
|
|
9233
|
+
var DEVNET_PROGRAM_ID = new import_web32.PublicKey("8PyE2dizL52ga7ytqLtqRyjwWp4yXEx8M5Z4BAHgHuTb");
|
|
8525
9234
|
function isDevnetRpc(rpcUrl) {
|
|
8526
9235
|
const url = rpcUrl.toLowerCase();
|
|
8527
9236
|
return url.includes("devnet") || url.includes("dev.") || url.includes(":8899");
|
|
@@ -8920,9 +9629,6 @@ var MarketModule = class {
|
|
|
8920
9629
|
} else {
|
|
8921
9630
|
throw new Error("Could not extract market_id from market account. Market account missing 'id' field.");
|
|
8922
9631
|
}
|
|
8923
|
-
if (marketId === 0n) {
|
|
8924
|
-
throw new Error("Market ID is zero, which is invalid");
|
|
8925
|
-
}
|
|
8926
9632
|
const [globalConfig] = deriveGlobalConfigPda(this.client.programId);
|
|
8927
9633
|
const globalConfigInfo = await this.client.connection.getAccountInfo(globalConfig, this.client.commitment);
|
|
8928
9634
|
if (!globalConfigInfo) throw new Error("global_config not initialized on-chain");
|
|
@@ -9612,8 +10318,8 @@ var RedemptionModule = class {
|
|
|
9612
10318
|
var import_web311 = require("@solana/web3.js");
|
|
9613
10319
|
var import_bn2 = require("bn.js");
|
|
9614
10320
|
var anchor = __toESM(require("@coral-xyz/anchor"), 1);
|
|
9615
|
-
var MAINNET_PROGRAM_ID2 = new import_web311.PublicKey("
|
|
9616
|
-
var DEVNET_PROGRAM_ID2 = new import_web311.PublicKey("
|
|
10321
|
+
var MAINNET_PROGRAM_ID2 = new import_web311.PublicKey("8PyE2dizL52ga7ytqLtqRyjwWp4yXEx8M5Z4BAHgHuTb");
|
|
10322
|
+
var DEVNET_PROGRAM_ID2 = new import_web311.PublicKey("8PyE2dizL52ga7ytqLtqRyjwWp4yXEx8M5Z4BAHgHuTb");
|
|
9617
10323
|
var AnchorClient = class _AnchorClient {
|
|
9618
10324
|
constructor(connection, signer, idlOverride, programIdOverride) {
|
|
9619
10325
|
this.connection = connection;
|
|
@@ -10813,8 +11519,8 @@ Cause: ${err.message}`);
|
|
|
10813
11519
|
[Buffer.from("global_config")],
|
|
10814
11520
|
this.client.programId
|
|
10815
11521
|
);
|
|
10816
|
-
const
|
|
10817
|
-
const admin =
|
|
11522
|
+
const P2P_ADMIN = new import_web314.PublicKey("9joX7eXbU5N9t3ksw5Aj5mdoPvcjVcVvkzdiestDqbwf");
|
|
11523
|
+
const admin = P2P_ADMIN;
|
|
10818
11524
|
const creator = new import_web314.PublicKey(marketAccount.creator);
|
|
10819
11525
|
const yesTokenMint = new import_web314.PublicKey(marketAccount.yesTokenMint);
|
|
10820
11526
|
const noTokenMint = new import_web314.PublicKey(marketAccount.noTokenMint);
|