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
|
@@ -47,7 +47,7 @@ import { BorshCoder } from "@coral-xyz/anchor";
|
|
|
47
47
|
|
|
48
48
|
// src/idl/pnp_protocol_solana.json
|
|
49
49
|
var pnp_protocol_solana_default = {
|
|
50
|
-
address: "
|
|
50
|
+
address: "8PyE2dizL52ga7ytqLtqRyjwWp4yXEx8M5Z4BAHgHuTb",
|
|
51
51
|
metadata: {
|
|
52
52
|
name: "pnp_protocol_solana",
|
|
53
53
|
version: "0.1.0",
|
|
@@ -3815,6 +3815,357 @@ var pnp_protocol_solana_default = {
|
|
|
3815
3815
|
],
|
|
3816
3816
|
returns: "u64"
|
|
3817
3817
|
},
|
|
3818
|
+
{
|
|
3819
|
+
name: "redeem_creator_liquidity",
|
|
3820
|
+
docs: [
|
|
3821
|
+
"Redeems creator's locked liquidity after market settlement (V2 only)",
|
|
3822
|
+
"",
|
|
3823
|
+
"# Arguments",
|
|
3824
|
+
"* `ctx` - The context containing creator liquidity redemption accounts",
|
|
3825
|
+
"",
|
|
3826
|
+
"# Returns",
|
|
3827
|
+
"* Amount of collateral redeemed"
|
|
3828
|
+
],
|
|
3829
|
+
discriminator: [
|
|
3830
|
+
189,
|
|
3831
|
+
166,
|
|
3832
|
+
66,
|
|
3833
|
+
201,
|
|
3834
|
+
145,
|
|
3835
|
+
236,
|
|
3836
|
+
219,
|
|
3837
|
+
70
|
|
3838
|
+
],
|
|
3839
|
+
accounts: [
|
|
3840
|
+
{
|
|
3841
|
+
name: "creator",
|
|
3842
|
+
docs: [
|
|
3843
|
+
"Creator who is claiming locked liquidity"
|
|
3844
|
+
],
|
|
3845
|
+
writable: true,
|
|
3846
|
+
signer: true
|
|
3847
|
+
},
|
|
3848
|
+
{
|
|
3849
|
+
name: "market",
|
|
3850
|
+
docs: [
|
|
3851
|
+
"V2 Market account"
|
|
3852
|
+
],
|
|
3853
|
+
writable: true,
|
|
3854
|
+
pda: {
|
|
3855
|
+
seeds: [
|
|
3856
|
+
{
|
|
3857
|
+
kind: "const",
|
|
3858
|
+
value: [
|
|
3859
|
+
109,
|
|
3860
|
+
97,
|
|
3861
|
+
114,
|
|
3862
|
+
107,
|
|
3863
|
+
101,
|
|
3864
|
+
116,
|
|
3865
|
+
45,
|
|
3866
|
+
118,
|
|
3867
|
+
50
|
|
3868
|
+
]
|
|
3869
|
+
},
|
|
3870
|
+
{
|
|
3871
|
+
kind: "account",
|
|
3872
|
+
path: "market.id",
|
|
3873
|
+
account: "Market"
|
|
3874
|
+
}
|
|
3875
|
+
]
|
|
3876
|
+
}
|
|
3877
|
+
},
|
|
3878
|
+
{
|
|
3879
|
+
name: "yes_token_mint",
|
|
3880
|
+
docs: [
|
|
3881
|
+
"YES token mint"
|
|
3882
|
+
],
|
|
3883
|
+
writable: true
|
|
3884
|
+
},
|
|
3885
|
+
{
|
|
3886
|
+
name: "no_token_mint",
|
|
3887
|
+
docs: [
|
|
3888
|
+
"NO token mint"
|
|
3889
|
+
],
|
|
3890
|
+
writable: true
|
|
3891
|
+
},
|
|
3892
|
+
{
|
|
3893
|
+
name: "market_yes_token_vault",
|
|
3894
|
+
docs: [
|
|
3895
|
+
"Market vault holding creator's locked YES tokens (ATA owned by market PDA)"
|
|
3896
|
+
],
|
|
3897
|
+
writable: true,
|
|
3898
|
+
pda: {
|
|
3899
|
+
seeds: [
|
|
3900
|
+
{
|
|
3901
|
+
kind: "account",
|
|
3902
|
+
path: "market"
|
|
3903
|
+
},
|
|
3904
|
+
{
|
|
3905
|
+
kind: "account",
|
|
3906
|
+
path: "token_program_decision"
|
|
3907
|
+
},
|
|
3908
|
+
{
|
|
3909
|
+
kind: "account",
|
|
3910
|
+
path: "yes_token_mint"
|
|
3911
|
+
}
|
|
3912
|
+
],
|
|
3913
|
+
program: {
|
|
3914
|
+
kind: "const",
|
|
3915
|
+
value: [
|
|
3916
|
+
140,
|
|
3917
|
+
151,
|
|
3918
|
+
37,
|
|
3919
|
+
143,
|
|
3920
|
+
78,
|
|
3921
|
+
36,
|
|
3922
|
+
137,
|
|
3923
|
+
241,
|
|
3924
|
+
187,
|
|
3925
|
+
61,
|
|
3926
|
+
16,
|
|
3927
|
+
41,
|
|
3928
|
+
20,
|
|
3929
|
+
142,
|
|
3930
|
+
13,
|
|
3931
|
+
131,
|
|
3932
|
+
11,
|
|
3933
|
+
90,
|
|
3934
|
+
19,
|
|
3935
|
+
153,
|
|
3936
|
+
218,
|
|
3937
|
+
255,
|
|
3938
|
+
16,
|
|
3939
|
+
132,
|
|
3940
|
+
4,
|
|
3941
|
+
142,
|
|
3942
|
+
123,
|
|
3943
|
+
216,
|
|
3944
|
+
219,
|
|
3945
|
+
233,
|
|
3946
|
+
248,
|
|
3947
|
+
89
|
|
3948
|
+
]
|
|
3949
|
+
}
|
|
3950
|
+
}
|
|
3951
|
+
},
|
|
3952
|
+
{
|
|
3953
|
+
name: "market_no_token_vault",
|
|
3954
|
+
docs: [
|
|
3955
|
+
"Market vault holding creator's locked NO tokens (ATA owned by market PDA)"
|
|
3956
|
+
],
|
|
3957
|
+
writable: true,
|
|
3958
|
+
pda: {
|
|
3959
|
+
seeds: [
|
|
3960
|
+
{
|
|
3961
|
+
kind: "account",
|
|
3962
|
+
path: "market"
|
|
3963
|
+
},
|
|
3964
|
+
{
|
|
3965
|
+
kind: "account",
|
|
3966
|
+
path: "token_program_decision"
|
|
3967
|
+
},
|
|
3968
|
+
{
|
|
3969
|
+
kind: "account",
|
|
3970
|
+
path: "no_token_mint"
|
|
3971
|
+
}
|
|
3972
|
+
],
|
|
3973
|
+
program: {
|
|
3974
|
+
kind: "const",
|
|
3975
|
+
value: [
|
|
3976
|
+
140,
|
|
3977
|
+
151,
|
|
3978
|
+
37,
|
|
3979
|
+
143,
|
|
3980
|
+
78,
|
|
3981
|
+
36,
|
|
3982
|
+
137,
|
|
3983
|
+
241,
|
|
3984
|
+
187,
|
|
3985
|
+
61,
|
|
3986
|
+
16,
|
|
3987
|
+
41,
|
|
3988
|
+
20,
|
|
3989
|
+
142,
|
|
3990
|
+
13,
|
|
3991
|
+
131,
|
|
3992
|
+
11,
|
|
3993
|
+
90,
|
|
3994
|
+
19,
|
|
3995
|
+
153,
|
|
3996
|
+
218,
|
|
3997
|
+
255,
|
|
3998
|
+
16,
|
|
3999
|
+
132,
|
|
4000
|
+
4,
|
|
4001
|
+
142,
|
|
4002
|
+
123,
|
|
4003
|
+
216,
|
|
4004
|
+
219,
|
|
4005
|
+
233,
|
|
4006
|
+
248,
|
|
4007
|
+
89
|
|
4008
|
+
]
|
|
4009
|
+
}
|
|
4010
|
+
}
|
|
4011
|
+
},
|
|
4012
|
+
{
|
|
4013
|
+
name: "market_reserve_vault",
|
|
4014
|
+
docs: [
|
|
4015
|
+
"Market's collateral token vault (reserve)"
|
|
4016
|
+
],
|
|
4017
|
+
writable: true,
|
|
4018
|
+
pda: {
|
|
4019
|
+
seeds: [
|
|
4020
|
+
{
|
|
4021
|
+
kind: "account",
|
|
4022
|
+
path: "market"
|
|
4023
|
+
},
|
|
4024
|
+
{
|
|
4025
|
+
kind: "account",
|
|
4026
|
+
path: "token_program"
|
|
4027
|
+
},
|
|
4028
|
+
{
|
|
4029
|
+
kind: "account",
|
|
4030
|
+
path: "collateral_token_mint"
|
|
4031
|
+
}
|
|
4032
|
+
],
|
|
4033
|
+
program: {
|
|
4034
|
+
kind: "const",
|
|
4035
|
+
value: [
|
|
4036
|
+
140,
|
|
4037
|
+
151,
|
|
4038
|
+
37,
|
|
4039
|
+
143,
|
|
4040
|
+
78,
|
|
4041
|
+
36,
|
|
4042
|
+
137,
|
|
4043
|
+
241,
|
|
4044
|
+
187,
|
|
4045
|
+
61,
|
|
4046
|
+
16,
|
|
4047
|
+
41,
|
|
4048
|
+
20,
|
|
4049
|
+
142,
|
|
4050
|
+
13,
|
|
4051
|
+
131,
|
|
4052
|
+
11,
|
|
4053
|
+
90,
|
|
4054
|
+
19,
|
|
4055
|
+
153,
|
|
4056
|
+
218,
|
|
4057
|
+
255,
|
|
4058
|
+
16,
|
|
4059
|
+
132,
|
|
4060
|
+
4,
|
|
4061
|
+
142,
|
|
4062
|
+
123,
|
|
4063
|
+
216,
|
|
4064
|
+
219,
|
|
4065
|
+
233,
|
|
4066
|
+
248,
|
|
4067
|
+
89
|
|
4068
|
+
]
|
|
4069
|
+
}
|
|
4070
|
+
}
|
|
4071
|
+
},
|
|
4072
|
+
{
|
|
4073
|
+
name: "collateral_token_mint",
|
|
4074
|
+
docs: [
|
|
4075
|
+
"Collateral token mint"
|
|
4076
|
+
]
|
|
4077
|
+
},
|
|
4078
|
+
{
|
|
4079
|
+
name: "creator_collateral_token_account",
|
|
4080
|
+
docs: [
|
|
4081
|
+
"Creator's collateral token account (receives payout)"
|
|
4082
|
+
],
|
|
4083
|
+
writable: true,
|
|
4084
|
+
pda: {
|
|
4085
|
+
seeds: [
|
|
4086
|
+
{
|
|
4087
|
+
kind: "account",
|
|
4088
|
+
path: "creator"
|
|
4089
|
+
},
|
|
4090
|
+
{
|
|
4091
|
+
kind: "account",
|
|
4092
|
+
path: "token_program"
|
|
4093
|
+
},
|
|
4094
|
+
{
|
|
4095
|
+
kind: "account",
|
|
4096
|
+
path: "collateral_token_mint"
|
|
4097
|
+
}
|
|
4098
|
+
],
|
|
4099
|
+
program: {
|
|
4100
|
+
kind: "const",
|
|
4101
|
+
value: [
|
|
4102
|
+
140,
|
|
4103
|
+
151,
|
|
4104
|
+
37,
|
|
4105
|
+
143,
|
|
4106
|
+
78,
|
|
4107
|
+
36,
|
|
4108
|
+
137,
|
|
4109
|
+
241,
|
|
4110
|
+
187,
|
|
4111
|
+
61,
|
|
4112
|
+
16,
|
|
4113
|
+
41,
|
|
4114
|
+
20,
|
|
4115
|
+
142,
|
|
4116
|
+
13,
|
|
4117
|
+
131,
|
|
4118
|
+
11,
|
|
4119
|
+
90,
|
|
4120
|
+
19,
|
|
4121
|
+
153,
|
|
4122
|
+
218,
|
|
4123
|
+
255,
|
|
4124
|
+
16,
|
|
4125
|
+
132,
|
|
4126
|
+
4,
|
|
4127
|
+
142,
|
|
4128
|
+
123,
|
|
4129
|
+
216,
|
|
4130
|
+
219,
|
|
4131
|
+
233,
|
|
4132
|
+
248,
|
|
4133
|
+
89
|
|
4134
|
+
]
|
|
4135
|
+
}
|
|
4136
|
+
}
|
|
4137
|
+
},
|
|
4138
|
+
{
|
|
4139
|
+
name: "token_program",
|
|
4140
|
+
docs: [
|
|
4141
|
+
"Token program for collateral transfers (may be Token-2022)"
|
|
4142
|
+
]
|
|
4143
|
+
},
|
|
4144
|
+
{
|
|
4145
|
+
name: "token_program_decision",
|
|
4146
|
+
docs: [
|
|
4147
|
+
"Token program for decision token burns (always standard SPL Token)"
|
|
4148
|
+
],
|
|
4149
|
+
address: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
|
|
4150
|
+
},
|
|
4151
|
+
{
|
|
4152
|
+
name: "associated_token_program",
|
|
4153
|
+
docs: [
|
|
4154
|
+
"Associated token program"
|
|
4155
|
+
],
|
|
4156
|
+
address: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
|
|
4157
|
+
},
|
|
4158
|
+
{
|
|
4159
|
+
name: "system_program",
|
|
4160
|
+
docs: [
|
|
4161
|
+
"System program"
|
|
4162
|
+
],
|
|
4163
|
+
address: "11111111111111111111111111111111"
|
|
4164
|
+
}
|
|
4165
|
+
],
|
|
4166
|
+
args: [],
|
|
4167
|
+
returns: "u64"
|
|
4168
|
+
},
|
|
3818
4169
|
{
|
|
3819
4170
|
name: "redeem_position",
|
|
3820
4171
|
docs: [
|
|
@@ -5511,7 +5862,30 @@ var pnp_protocol_solana_default = {
|
|
|
5511
5862
|
docs: [
|
|
5512
5863
|
"V2 Market account to update"
|
|
5513
5864
|
],
|
|
5514
|
-
writable: true
|
|
5865
|
+
writable: true,
|
|
5866
|
+
pda: {
|
|
5867
|
+
seeds: [
|
|
5868
|
+
{
|
|
5869
|
+
kind: "const",
|
|
5870
|
+
value: [
|
|
5871
|
+
109,
|
|
5872
|
+
97,
|
|
5873
|
+
114,
|
|
5874
|
+
107,
|
|
5875
|
+
101,
|
|
5876
|
+
116,
|
|
5877
|
+
45,
|
|
5878
|
+
118,
|
|
5879
|
+
50
|
|
5880
|
+
]
|
|
5881
|
+
},
|
|
5882
|
+
{
|
|
5883
|
+
kind: "account",
|
|
5884
|
+
path: "market.id",
|
|
5885
|
+
account: "Market"
|
|
5886
|
+
}
|
|
5887
|
+
]
|
|
5888
|
+
}
|
|
5515
5889
|
},
|
|
5516
5890
|
{
|
|
5517
5891
|
name: "market_extension",
|
|
@@ -5610,20 +5984,20 @@ var pnp_protocol_solana_default = {
|
|
|
5610
5984
|
{
|
|
5611
5985
|
name: "creator",
|
|
5612
5986
|
docs: [
|
|
5613
|
-
"Original market creator (for
|
|
5987
|
+
"Original market creator (for validation)"
|
|
5614
5988
|
]
|
|
5615
5989
|
},
|
|
5616
5990
|
{
|
|
5617
|
-
name: "
|
|
5991
|
+
name: "market_yes_token_vault",
|
|
5618
5992
|
docs: [
|
|
5619
|
-
"
|
|
5993
|
+
"Market vault for creator's locked YES tokens (ATA owned by market PDA)"
|
|
5620
5994
|
],
|
|
5621
5995
|
writable: true,
|
|
5622
5996
|
pda: {
|
|
5623
5997
|
seeds: [
|
|
5624
5998
|
{
|
|
5625
5999
|
kind: "account",
|
|
5626
|
-
path: "
|
|
6000
|
+
path: "market"
|
|
5627
6001
|
},
|
|
5628
6002
|
{
|
|
5629
6003
|
kind: "account",
|
|
@@ -5674,16 +6048,16 @@ var pnp_protocol_solana_default = {
|
|
|
5674
6048
|
}
|
|
5675
6049
|
},
|
|
5676
6050
|
{
|
|
5677
|
-
name: "
|
|
6051
|
+
name: "market_no_token_vault",
|
|
5678
6052
|
docs: [
|
|
5679
|
-
"
|
|
6053
|
+
"Market vault for creator's locked NO tokens (ATA owned by market PDA)"
|
|
5680
6054
|
],
|
|
5681
6055
|
writable: true,
|
|
5682
6056
|
pda: {
|
|
5683
6057
|
seeds: [
|
|
5684
6058
|
{
|
|
5685
6059
|
kind: "account",
|
|
5686
|
-
path: "
|
|
6060
|
+
path: "market"
|
|
5687
6061
|
},
|
|
5688
6062
|
{
|
|
5689
6063
|
kind: "account",
|
|
@@ -6551,18 +6925,154 @@ var pnp_protocol_solana_default = {
|
|
|
6551
6925
|
address: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
|
|
6552
6926
|
},
|
|
6553
6927
|
{
|
|
6554
|
-
name: "associated_token_program",
|
|
6928
|
+
name: "associated_token_program",
|
|
6929
|
+
docs: [
|
|
6930
|
+
"Associated token program"
|
|
6931
|
+
],
|
|
6932
|
+
address: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
|
|
6933
|
+
},
|
|
6934
|
+
{
|
|
6935
|
+
name: "system_program",
|
|
6936
|
+
docs: [
|
|
6937
|
+
"System program"
|
|
6938
|
+
],
|
|
6939
|
+
address: "11111111111111111111111111111111"
|
|
6940
|
+
}
|
|
6941
|
+
],
|
|
6942
|
+
args: [
|
|
6943
|
+
{
|
|
6944
|
+
name: "yes_winner",
|
|
6945
|
+
type: "bool"
|
|
6946
|
+
}
|
|
6947
|
+
],
|
|
6948
|
+
returns: {
|
|
6949
|
+
defined: {
|
|
6950
|
+
name: "WinningToken"
|
|
6951
|
+
}
|
|
6952
|
+
}
|
|
6953
|
+
},
|
|
6954
|
+
{
|
|
6955
|
+
name: "settle_market_v2",
|
|
6956
|
+
docs: [
|
|
6957
|
+
"Settles a V2 market with custom oracle support",
|
|
6958
|
+
"",
|
|
6959
|
+
"Unlike the original settle_market (which only accepts admin/global oracle),",
|
|
6960
|
+
"this instruction also accepts the per-market custom oracle from MarketExtension.",
|
|
6961
|
+
"",
|
|
6962
|
+
"# Arguments",
|
|
6963
|
+
"* `ctx` - The context containing V2 settlement accounts",
|
|
6964
|
+
"* `yes_winner` - If true, YES tokens win; if false, NO tokens win",
|
|
6965
|
+
"",
|
|
6966
|
+
"# Returns",
|
|
6967
|
+
"* The winning token type"
|
|
6968
|
+
],
|
|
6969
|
+
discriminator: [
|
|
6970
|
+
131,
|
|
6971
|
+
199,
|
|
6972
|
+
75,
|
|
6973
|
+
155,
|
|
6974
|
+
16,
|
|
6975
|
+
199,
|
|
6976
|
+
72,
|
|
6977
|
+
1
|
|
6978
|
+
],
|
|
6979
|
+
accounts: [
|
|
6980
|
+
{
|
|
6981
|
+
name: "settler",
|
|
6982
|
+
docs: [
|
|
6983
|
+
"Settler account \u2014 must be admin, global oracle, or custom oracle from extension"
|
|
6984
|
+
],
|
|
6985
|
+
writable: true,
|
|
6986
|
+
signer: true
|
|
6987
|
+
},
|
|
6988
|
+
{
|
|
6989
|
+
name: "market",
|
|
6990
|
+
docs: [
|
|
6991
|
+
"V2 Market account"
|
|
6992
|
+
],
|
|
6993
|
+
writable: true,
|
|
6994
|
+
pda: {
|
|
6995
|
+
seeds: [
|
|
6996
|
+
{
|
|
6997
|
+
kind: "const",
|
|
6998
|
+
value: [
|
|
6999
|
+
109,
|
|
7000
|
+
97,
|
|
7001
|
+
114,
|
|
7002
|
+
107,
|
|
7003
|
+
101,
|
|
7004
|
+
116,
|
|
7005
|
+
45,
|
|
7006
|
+
118,
|
|
7007
|
+
50
|
|
7008
|
+
]
|
|
7009
|
+
},
|
|
7010
|
+
{
|
|
7011
|
+
kind: "account",
|
|
7012
|
+
path: "market.id",
|
|
7013
|
+
account: "Market"
|
|
7014
|
+
}
|
|
7015
|
+
]
|
|
7016
|
+
}
|
|
7017
|
+
},
|
|
7018
|
+
{
|
|
7019
|
+
name: "market_extension",
|
|
6555
7020
|
docs: [
|
|
6556
|
-
"
|
|
7021
|
+
"Optional market extension \u2014 pass if market has custom oracle"
|
|
6557
7022
|
],
|
|
6558
|
-
|
|
7023
|
+
optional: true,
|
|
7024
|
+
pda: {
|
|
7025
|
+
seeds: [
|
|
7026
|
+
{
|
|
7027
|
+
kind: "const",
|
|
7028
|
+
value: [
|
|
7029
|
+
109,
|
|
7030
|
+
97,
|
|
7031
|
+
114,
|
|
7032
|
+
107,
|
|
7033
|
+
101,
|
|
7034
|
+
116,
|
|
7035
|
+
95,
|
|
7036
|
+
101,
|
|
7037
|
+
120,
|
|
7038
|
+
116
|
|
7039
|
+
]
|
|
7040
|
+
},
|
|
7041
|
+
{
|
|
7042
|
+
kind: "account",
|
|
7043
|
+
path: "market.id",
|
|
7044
|
+
account: "Market"
|
|
7045
|
+
}
|
|
7046
|
+
]
|
|
7047
|
+
}
|
|
6559
7048
|
},
|
|
6560
7049
|
{
|
|
6561
|
-
name: "
|
|
7050
|
+
name: "global_config",
|
|
6562
7051
|
docs: [
|
|
6563
|
-
"
|
|
7052
|
+
"Global configuration"
|
|
6564
7053
|
],
|
|
6565
|
-
|
|
7054
|
+
pda: {
|
|
7055
|
+
seeds: [
|
|
7056
|
+
{
|
|
7057
|
+
kind: "const",
|
|
7058
|
+
value: [
|
|
7059
|
+
103,
|
|
7060
|
+
108,
|
|
7061
|
+
111,
|
|
7062
|
+
98,
|
|
7063
|
+
97,
|
|
7064
|
+
108,
|
|
7065
|
+
95,
|
|
7066
|
+
99,
|
|
7067
|
+
111,
|
|
7068
|
+
110,
|
|
7069
|
+
102,
|
|
7070
|
+
105,
|
|
7071
|
+
103
|
|
7072
|
+
]
|
|
7073
|
+
}
|
|
7074
|
+
]
|
|
7075
|
+
}
|
|
6566
7076
|
}
|
|
6567
7077
|
],
|
|
6568
7078
|
args: [
|
|
@@ -6784,6 +7294,71 @@ var pnp_protocol_solana_default = {
|
|
|
6784
7294
|
type: "pubkey"
|
|
6785
7295
|
}
|
|
6786
7296
|
]
|
|
7297
|
+
},
|
|
7298
|
+
{
|
|
7299
|
+
name: "update_oracle",
|
|
7300
|
+
docs: [
|
|
7301
|
+
"Updates the oracle program address (admin-only)",
|
|
7302
|
+
"",
|
|
7303
|
+
"# Arguments",
|
|
7304
|
+
"* `ctx` - The context containing oracle update accounts",
|
|
7305
|
+
"* `new_oracle` - The new oracle program public key"
|
|
7306
|
+
],
|
|
7307
|
+
discriminator: [
|
|
7308
|
+
112,
|
|
7309
|
+
41,
|
|
7310
|
+
209,
|
|
7311
|
+
18,
|
|
7312
|
+
248,
|
|
7313
|
+
226,
|
|
7314
|
+
252,
|
|
7315
|
+
188
|
|
7316
|
+
],
|
|
7317
|
+
accounts: [
|
|
7318
|
+
{
|
|
7319
|
+
name: "authority",
|
|
7320
|
+
docs: [
|
|
7321
|
+
"The admin authority. ONLY the admin can update the oracle \u2014 NOT the oracle itself.",
|
|
7322
|
+
"This prevents a compromised oracle from locking out the protocol."
|
|
7323
|
+
],
|
|
7324
|
+
signer: true
|
|
7325
|
+
},
|
|
7326
|
+
{
|
|
7327
|
+
name: "global_config",
|
|
7328
|
+
docs: [
|
|
7329
|
+
"The global configuration account storing protocol settings"
|
|
7330
|
+
],
|
|
7331
|
+
writable: true,
|
|
7332
|
+
pda: {
|
|
7333
|
+
seeds: [
|
|
7334
|
+
{
|
|
7335
|
+
kind: "const",
|
|
7336
|
+
value: [
|
|
7337
|
+
103,
|
|
7338
|
+
108,
|
|
7339
|
+
111,
|
|
7340
|
+
98,
|
|
7341
|
+
97,
|
|
7342
|
+
108,
|
|
7343
|
+
95,
|
|
7344
|
+
99,
|
|
7345
|
+
111,
|
|
7346
|
+
110,
|
|
7347
|
+
102,
|
|
7348
|
+
105,
|
|
7349
|
+
103
|
|
7350
|
+
]
|
|
7351
|
+
}
|
|
7352
|
+
]
|
|
7353
|
+
}
|
|
7354
|
+
}
|
|
7355
|
+
],
|
|
7356
|
+
args: [
|
|
7357
|
+
{
|
|
7358
|
+
name: "new_oracle",
|
|
7359
|
+
type: "pubkey"
|
|
7360
|
+
}
|
|
7361
|
+
]
|
|
6787
7362
|
}
|
|
6788
7363
|
],
|
|
6789
7364
|
accounts: [
|
|
@@ -6893,6 +7468,19 @@ var pnp_protocol_solana_default = {
|
|
|
6893
7468
|
7
|
|
6894
7469
|
]
|
|
6895
7470
|
},
|
|
7471
|
+
{
|
|
7472
|
+
name: "CreatorLiquidityRedeemed",
|
|
7473
|
+
discriminator: [
|
|
7474
|
+
242,
|
|
7475
|
+
202,
|
|
7476
|
+
33,
|
|
7477
|
+
247,
|
|
7478
|
+
73,
|
|
7479
|
+
224,
|
|
7480
|
+
194,
|
|
7481
|
+
141
|
|
7482
|
+
]
|
|
7483
|
+
},
|
|
6896
7484
|
{
|
|
6897
7485
|
name: "CreatorRefundEvent",
|
|
6898
7486
|
discriminator: [
|
|
@@ -7101,6 +7689,19 @@ var pnp_protocol_solana_default = {
|
|
|
7101
7689
|
165
|
|
7102
7690
|
]
|
|
7103
7691
|
},
|
|
7692
|
+
{
|
|
7693
|
+
name: "SettleMarketV2Event",
|
|
7694
|
+
discriminator: [
|
|
7695
|
+
134,
|
|
7696
|
+
247,
|
|
7697
|
+
23,
|
|
7698
|
+
246,
|
|
7699
|
+
163,
|
|
7700
|
+
42,
|
|
7701
|
+
206,
|
|
7702
|
+
229
|
|
7703
|
+
]
|
|
7704
|
+
},
|
|
7104
7705
|
{
|
|
7105
7706
|
name: "SettleMarketV3Event",
|
|
7106
7707
|
discriminator: [
|
|
@@ -7113,6 +7714,19 @@ var pnp_protocol_solana_default = {
|
|
|
7113
7714
|
44,
|
|
7114
7715
|
100
|
|
7115
7716
|
]
|
|
7717
|
+
},
|
|
7718
|
+
{
|
|
7719
|
+
name: "UpdateOracleEvent",
|
|
7720
|
+
discriminator: [
|
|
7721
|
+
160,
|
|
7722
|
+
215,
|
|
7723
|
+
18,
|
|
7724
|
+
128,
|
|
7725
|
+
160,
|
|
7726
|
+
219,
|
|
7727
|
+
87,
|
|
7728
|
+
173
|
|
7729
|
+
]
|
|
7116
7730
|
}
|
|
7117
7731
|
],
|
|
7118
7732
|
errors: [
|
|
@@ -7249,6 +7863,34 @@ var pnp_protocol_solana_default = {
|
|
|
7249
7863
|
]
|
|
7250
7864
|
}
|
|
7251
7865
|
},
|
|
7866
|
+
{
|
|
7867
|
+
name: "CreatorLiquidityRedeemed",
|
|
7868
|
+
type: {
|
|
7869
|
+
kind: "struct",
|
|
7870
|
+
fields: [
|
|
7871
|
+
{
|
|
7872
|
+
name: "market_id",
|
|
7873
|
+
type: "u64"
|
|
7874
|
+
},
|
|
7875
|
+
{
|
|
7876
|
+
name: "market",
|
|
7877
|
+
type: "pubkey"
|
|
7878
|
+
},
|
|
7879
|
+
{
|
|
7880
|
+
name: "creator",
|
|
7881
|
+
type: "pubkey"
|
|
7882
|
+
},
|
|
7883
|
+
{
|
|
7884
|
+
name: "winning_tokens_burned",
|
|
7885
|
+
type: "u64"
|
|
7886
|
+
},
|
|
7887
|
+
{
|
|
7888
|
+
name: "collateral_redeemed",
|
|
7889
|
+
type: "u64"
|
|
7890
|
+
}
|
|
7891
|
+
]
|
|
7892
|
+
}
|
|
7893
|
+
},
|
|
7252
7894
|
{
|
|
7253
7895
|
name: "CreatorRefundEvent",
|
|
7254
7896
|
docs: [
|
|
@@ -7598,6 +8240,27 @@ var pnp_protocol_solana_default = {
|
|
|
7598
8240
|
{
|
|
7599
8241
|
name: "version",
|
|
7600
8242
|
type: "u8"
|
|
8243
|
+
},
|
|
8244
|
+
{
|
|
8245
|
+
name: "creator_yes_locked",
|
|
8246
|
+
docs: [
|
|
8247
|
+
"Amount of YES tokens locked in vault for creator (set during setMarketResolvableV2)"
|
|
8248
|
+
],
|
|
8249
|
+
type: "u64"
|
|
8250
|
+
},
|
|
8251
|
+
{
|
|
8252
|
+
name: "creator_no_locked",
|
|
8253
|
+
docs: [
|
|
8254
|
+
"Amount of NO tokens locked in vault for creator (set during setMarketResolvableV2)"
|
|
8255
|
+
],
|
|
8256
|
+
type: "u64"
|
|
8257
|
+
},
|
|
8258
|
+
{
|
|
8259
|
+
name: "creator_liquidity_claimed",
|
|
8260
|
+
docs: [
|
|
8261
|
+
"Whether the creator has already claimed locked liquidity"
|
|
8262
|
+
],
|
|
8263
|
+
type: "bool"
|
|
7601
8264
|
}
|
|
7602
8265
|
]
|
|
7603
8266
|
}
|
|
@@ -8291,6 +8954,26 @@ var pnp_protocol_solana_default = {
|
|
|
8291
8954
|
]
|
|
8292
8955
|
}
|
|
8293
8956
|
},
|
|
8957
|
+
{
|
|
8958
|
+
name: "SettleMarketV2Event",
|
|
8959
|
+
type: {
|
|
8960
|
+
kind: "struct",
|
|
8961
|
+
fields: [
|
|
8962
|
+
{
|
|
8963
|
+
name: "market",
|
|
8964
|
+
type: "pubkey"
|
|
8965
|
+
},
|
|
8966
|
+
{
|
|
8967
|
+
name: "market_id",
|
|
8968
|
+
type: "u64"
|
|
8969
|
+
},
|
|
8970
|
+
{
|
|
8971
|
+
name: "yes_winner",
|
|
8972
|
+
type: "bool"
|
|
8973
|
+
}
|
|
8974
|
+
]
|
|
8975
|
+
}
|
|
8976
|
+
},
|
|
8294
8977
|
{
|
|
8295
8978
|
name: "SettleMarketV3Event",
|
|
8296
8979
|
type: {
|
|
@@ -8336,6 +9019,31 @@ var pnp_protocol_solana_default = {
|
|
|
8336
9019
|
]
|
|
8337
9020
|
}
|
|
8338
9021
|
},
|
|
9022
|
+
{
|
|
9023
|
+
name: "UpdateOracleEvent",
|
|
9024
|
+
docs: [
|
|
9025
|
+
"Event emitted when the oracle program address is updated"
|
|
9026
|
+
],
|
|
9027
|
+
type: {
|
|
9028
|
+
kind: "struct",
|
|
9029
|
+
fields: [
|
|
9030
|
+
{
|
|
9031
|
+
name: "old_oracle",
|
|
9032
|
+
docs: [
|
|
9033
|
+
"The previous oracle program address"
|
|
9034
|
+
],
|
|
9035
|
+
type: "pubkey"
|
|
9036
|
+
},
|
|
9037
|
+
{
|
|
9038
|
+
name: "new_oracle",
|
|
9039
|
+
docs: [
|
|
9040
|
+
"The new oracle program address"
|
|
9041
|
+
],
|
|
9042
|
+
type: "pubkey"
|
|
9043
|
+
}
|
|
9044
|
+
]
|
|
9045
|
+
}
|
|
9046
|
+
},
|
|
8339
9047
|
{
|
|
8340
9048
|
name: "WinningToken",
|
|
8341
9049
|
docs: [
|
|
@@ -8494,6 +9202,7 @@ function constructAccountMetas(ixDef, accounts) {
|
|
|
8494
9202
|
const pubkey = accounts[name];
|
|
8495
9203
|
if (!pubkey) {
|
|
8496
9204
|
if (optional) {
|
|
9205
|
+
metas.push({ pubkey: PNP_PROGRAM_ID, isSigner: false, isWritable: false });
|
|
8497
9206
|
continue;
|
|
8498
9207
|
}
|
|
8499
9208
|
throw new Error(`Missing account for ${ixDef.name}: ${name}`);
|
|
@@ -8510,7 +9219,7 @@ function decodeAccount(accountName, data) {
|
|
|
8510
9219
|
|
|
8511
9220
|
// src/platform/client.ts
|
|
8512
9221
|
var MAINNET_PROGRAM_ID = PNP_PROGRAM_ID;
|
|
8513
|
-
var DEVNET_PROGRAM_ID = new PublicKey2("
|
|
9222
|
+
var DEVNET_PROGRAM_ID = new PublicKey2("8PyE2dizL52ga7ytqLtqRyjwWp4yXEx8M5Z4BAHgHuTb");
|
|
8514
9223
|
function isDevnetRpc(rpcUrl) {
|
|
8515
9224
|
const url = rpcUrl.toLowerCase();
|
|
8516
9225
|
return url.includes("devnet") || url.includes("dev.") || url.includes(":8899");
|
|
@@ -8547,11 +9256,17 @@ __export(pdas_exports, {
|
|
|
8547
9256
|
deriveCreatorFeeTreasuryPda: () => deriveCreatorFeeTreasuryPda,
|
|
8548
9257
|
deriveCreatorFeeTreasuryPdaLegacy: () => deriveCreatorFeeTreasuryPdaLegacy,
|
|
8549
9258
|
deriveGlobalConfigPda: () => deriveGlobalConfigPda,
|
|
9259
|
+
deriveMarketExtensionPda: () => deriveMarketExtensionPda,
|
|
8550
9260
|
deriveMarketPda: () => deriveMarketPda,
|
|
8551
9261
|
deriveMarketPdaFromMints: () => deriveMarketPdaFromMints,
|
|
9262
|
+
deriveMarketV2Pda: () => deriveMarketV2Pda,
|
|
9263
|
+
deriveMarketV3ExtensionPda: () => deriveMarketV3ExtensionPda,
|
|
9264
|
+
deriveMarketV3Pda: () => deriveMarketV3Pda,
|
|
8552
9265
|
deriveNoTokenMint: () => deriveNoTokenMint,
|
|
8553
9266
|
derivePositionPda: () => derivePositionPda,
|
|
8554
9267
|
deriveTokenMetadataPda: () => deriveTokenMetadataPda,
|
|
9268
|
+
deriveV3NoTokenMint: () => deriveV3NoTokenMint,
|
|
9269
|
+
deriveV3YesTokenMint: () => deriveV3YesTokenMint,
|
|
8555
9270
|
deriveYesTokenMint: () => deriveYesTokenMint
|
|
8556
9271
|
});
|
|
8557
9272
|
import { PublicKey as PublicKey3 } from "@solana/web3.js";
|
|
@@ -8616,6 +9331,42 @@ function deriveNoTokenMint(globalId, programId) {
|
|
|
8616
9331
|
u64LeBuffer(globalId)
|
|
8617
9332
|
], programId);
|
|
8618
9333
|
}
|
|
9334
|
+
function deriveMarketV2Pda(globalId, programId) {
|
|
9335
|
+
return PublicKey3.findProgramAddressSync([
|
|
9336
|
+
Buffer.from("market-v2"),
|
|
9337
|
+
u64LeBuffer(globalId)
|
|
9338
|
+
], programId);
|
|
9339
|
+
}
|
|
9340
|
+
function deriveMarketV3Pda(globalId, programId) {
|
|
9341
|
+
return PublicKey3.findProgramAddressSync([
|
|
9342
|
+
Buffer.from("market-v3"),
|
|
9343
|
+
u64LeBuffer(globalId)
|
|
9344
|
+
], programId);
|
|
9345
|
+
}
|
|
9346
|
+
function deriveV3YesTokenMint(globalId, programId) {
|
|
9347
|
+
return PublicKey3.findProgramAddressSync([
|
|
9348
|
+
Buffer.from("v3-yes-token"),
|
|
9349
|
+
u64LeBuffer(globalId)
|
|
9350
|
+
], programId);
|
|
9351
|
+
}
|
|
9352
|
+
function deriveV3NoTokenMint(globalId, programId) {
|
|
9353
|
+
return PublicKey3.findProgramAddressSync([
|
|
9354
|
+
Buffer.from("v3-no-token"),
|
|
9355
|
+
u64LeBuffer(globalId)
|
|
9356
|
+
], programId);
|
|
9357
|
+
}
|
|
9358
|
+
function deriveMarketExtensionPda(marketId, programId) {
|
|
9359
|
+
return PublicKey3.findProgramAddressSync([
|
|
9360
|
+
Buffer.from("market_ext"),
|
|
9361
|
+
u64LeBuffer(marketId)
|
|
9362
|
+
], programId);
|
|
9363
|
+
}
|
|
9364
|
+
function deriveMarketV3ExtensionPda(marketId, programId) {
|
|
9365
|
+
return PublicKey3.findProgramAddressSync([
|
|
9366
|
+
Buffer.from("market_v3_ext"),
|
|
9367
|
+
u64LeBuffer(marketId)
|
|
9368
|
+
], programId);
|
|
9369
|
+
}
|
|
8619
9370
|
function deriveTokenMetadataPda(mint, metadataProgramId) {
|
|
8620
9371
|
return PublicKey3.findProgramAddressSync([
|
|
8621
9372
|
Buffer.from("metadata"),
|
|
@@ -8934,9 +9685,6 @@ var MarketModule = class {
|
|
|
8934
9685
|
} else {
|
|
8935
9686
|
throw new Error("Could not extract market_id from market account. Market account missing 'id' field.");
|
|
8936
9687
|
}
|
|
8937
|
-
if (marketId === 0n) {
|
|
8938
|
-
throw new Error("Market ID is zero, which is invalid");
|
|
8939
|
-
}
|
|
8940
9688
|
const [globalConfig] = deriveGlobalConfigPda(this.client.programId);
|
|
8941
9689
|
const globalConfigInfo = await this.client.connection.getAccountInfo(globalConfig, this.client.commitment);
|
|
8942
9690
|
if (!globalConfigInfo) throw new Error("global_config not initialized on-chain");
|
|
@@ -9649,8 +10397,8 @@ var NodeKeypairSigner = class {
|
|
|
9649
10397
|
import { PublicKey as PublicKey11 } from "@solana/web3.js";
|
|
9650
10398
|
import { BN as BN2 } from "bn.js";
|
|
9651
10399
|
import * as anchor from "@coral-xyz/anchor";
|
|
9652
|
-
var MAINNET_PROGRAM_ID2 = new PublicKey11("
|
|
9653
|
-
var DEVNET_PROGRAM_ID2 = new PublicKey11("
|
|
10400
|
+
var MAINNET_PROGRAM_ID2 = new PublicKey11("8PyE2dizL52ga7ytqLtqRyjwWp4yXEx8M5Z4BAHgHuTb");
|
|
10401
|
+
var DEVNET_PROGRAM_ID2 = new PublicKey11("8PyE2dizL52ga7ytqLtqRyjwWp4yXEx8M5Z4BAHgHuTb");
|
|
9654
10402
|
var AnchorClient = class _AnchorClient {
|
|
9655
10403
|
constructor(connection, signer, idlOverride, programIdOverride) {
|
|
9656
10404
|
this.connection = connection;
|
|
@@ -10863,8 +11611,8 @@ Cause: ${err.message}`);
|
|
|
10863
11611
|
[Buffer.from("global_config")],
|
|
10864
11612
|
this.client.programId
|
|
10865
11613
|
);
|
|
10866
|
-
const
|
|
10867
|
-
const admin =
|
|
11614
|
+
const P2P_ADMIN = new PublicKey14("9joX7eXbU5N9t3ksw5Aj5mdoPvcjVcVvkzdiestDqbwf");
|
|
11615
|
+
const admin = P2P_ADMIN;
|
|
10868
11616
|
const creator = new PublicKey14(marketAccount.creator);
|
|
10869
11617
|
const yesTokenMint = new PublicKey14(marketAccount.yesTokenMint);
|
|
10870
11618
|
const noTokenMint = new PublicKey14(marketAccount.noTokenMint);
|
|
@@ -11794,4 +12542,4 @@ export {
|
|
|
11794
12542
|
RedemptionModule,
|
|
11795
12543
|
PNPClient
|
|
11796
12544
|
};
|
|
11797
|
-
//# sourceMappingURL=chunk-
|
|
12545
|
+
//# sourceMappingURL=chunk-ITEBWEGS.js.map
|