@jpool/bond-sdk 0.11.0-next.17 → 0.11.0-next.18
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/index.d.mts +42 -1
- package/dist/index.d.ts +42 -1
- package/dist/index.js +44 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +44 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -520,6 +520,37 @@ type Jbond = {
|
|
|
520
520
|
}
|
|
521
521
|
];
|
|
522
522
|
},
|
|
523
|
+
{
|
|
524
|
+
"name": "bondRemove";
|
|
525
|
+
"docs": [
|
|
526
|
+
"Removes bond state"
|
|
527
|
+
];
|
|
528
|
+
"discriminator": [
|
|
529
|
+
121,
|
|
530
|
+
112,
|
|
531
|
+
246,
|
|
532
|
+
177,
|
|
533
|
+
181,
|
|
534
|
+
8,
|
|
535
|
+
18,
|
|
536
|
+
220
|
|
537
|
+
];
|
|
538
|
+
"accounts": [
|
|
539
|
+
{
|
|
540
|
+
"name": "bondState";
|
|
541
|
+
"writable": true;
|
|
542
|
+
},
|
|
543
|
+
{
|
|
544
|
+
"name": "authority";
|
|
545
|
+
"writable": true;
|
|
546
|
+
"signer": true;
|
|
547
|
+
"relations": [
|
|
548
|
+
"bondState"
|
|
549
|
+
];
|
|
550
|
+
}
|
|
551
|
+
];
|
|
552
|
+
"args": [];
|
|
553
|
+
},
|
|
523
554
|
{
|
|
524
555
|
"name": "bondSetWithdrawAuthority";
|
|
525
556
|
"docs": [
|
|
@@ -1933,6 +1964,11 @@ type BondFinishProps = {
|
|
|
1933
1964
|
bondType: BondType;
|
|
1934
1965
|
name: string;
|
|
1935
1966
|
};
|
|
1967
|
+
type BondRemoveProps = {
|
|
1968
|
+
bondType: BondType;
|
|
1969
|
+
name: string;
|
|
1970
|
+
authority?: PublicKey;
|
|
1971
|
+
};
|
|
1936
1972
|
|
|
1937
1973
|
type GetHistoryOpts = {
|
|
1938
1974
|
cluster?: Cluster;
|
|
@@ -2074,6 +2110,7 @@ declare class JBondClient {
|
|
|
2074
2110
|
* Finish crowdfunding bond session
|
|
2075
2111
|
*/
|
|
2076
2112
|
bondFinish(props: BondFinishProps): Promise<string | undefined>;
|
|
2113
|
+
bondRemove(props: BondRemoveProps): Promise<string | undefined>;
|
|
2077
2114
|
/**
|
|
2078
2115
|
* Build global state initialize instruction
|
|
2079
2116
|
*/
|
|
@@ -2142,6 +2179,10 @@ declare class JBondClient {
|
|
|
2142
2179
|
voteAccount: PublicKeyInitData;
|
|
2143
2180
|
payer: PublicKey;
|
|
2144
2181
|
}): Promise<TransactionInstruction>;
|
|
2182
|
+
/**
|
|
2183
|
+
* Build bond remove instruction
|
|
2184
|
+
*/
|
|
2185
|
+
getBondRemoveIx(props: BondRemoveProps): Promise<TransactionInstruction>;
|
|
2145
2186
|
/**
|
|
2146
2187
|
* Build test set last update epoch instruction
|
|
2147
2188
|
* NOTE!: This instruction is for testing purposes only.
|
|
@@ -2341,4 +2382,4 @@ declare const CROWDFUNDING_BOND_SEED = "crowdfunding";
|
|
|
2341
2382
|
*/
|
|
2342
2383
|
declare const ENV_PROGRAM_ID: Record<string, PublicKey>;
|
|
2343
2384
|
|
|
2344
|
-
export { BOND_STATE_SEED, type BondConfigureProps, type BondFinishProps, type BondInitializeProps, type BondLockFunds, type BondReleaseFunds, type BondStartProps, type BondState, type BondStateStats, type BondStateStatus, BondTransactionType, BondType, CROWDFUNDING_BOND_SEED, type ClaimAllProps, type ClaimProps, type CollateralType, ENV_PROGRAM_ID, type EpochHistoryItem, GLOBAL_STATE_SEED, type GetHistoryGroupedProps, type GetHistoryProps, type GlobalConfigureProps, type GlobalInitializeProps, type GlobalState, JBondClient, JBondClientEnv, type JBondClientOptions, type Jbond, NodeWallet, type RegisterValidatorProps, STANDARD_BOND_SEED, SessionStatus, type SetWithdrawAuthorityProps, type TopUpCollateralProps, type TransactionHistoryItem, VALIDATOR_BOND_SEED, type ValidatorBond, type WithdrawCollateralProps };
|
|
2385
|
+
export { BOND_STATE_SEED, type BondConfigureProps, type BondFinishProps, type BondInitializeProps, type BondLockFunds, type BondReleaseFunds, type BondRemoveProps, type BondStartProps, type BondState, type BondStateStats, type BondStateStatus, BondTransactionType, BondType, CROWDFUNDING_BOND_SEED, type ClaimAllProps, type ClaimProps, type CollateralType, ENV_PROGRAM_ID, type EpochHistoryItem, GLOBAL_STATE_SEED, type GetHistoryGroupedProps, type GetHistoryProps, type GlobalConfigureProps, type GlobalInitializeProps, type GlobalState, JBondClient, JBondClientEnv, type JBondClientOptions, type Jbond, NodeWallet, type RegisterValidatorProps, STANDARD_BOND_SEED, SessionStatus, type SetWithdrawAuthorityProps, type TopUpCollateralProps, type TransactionHistoryItem, VALIDATOR_BOND_SEED, type ValidatorBond, type WithdrawCollateralProps };
|
package/dist/index.d.ts
CHANGED
|
@@ -520,6 +520,37 @@ type Jbond = {
|
|
|
520
520
|
}
|
|
521
521
|
];
|
|
522
522
|
},
|
|
523
|
+
{
|
|
524
|
+
"name": "bondRemove";
|
|
525
|
+
"docs": [
|
|
526
|
+
"Removes bond state"
|
|
527
|
+
];
|
|
528
|
+
"discriminator": [
|
|
529
|
+
121,
|
|
530
|
+
112,
|
|
531
|
+
246,
|
|
532
|
+
177,
|
|
533
|
+
181,
|
|
534
|
+
8,
|
|
535
|
+
18,
|
|
536
|
+
220
|
|
537
|
+
];
|
|
538
|
+
"accounts": [
|
|
539
|
+
{
|
|
540
|
+
"name": "bondState";
|
|
541
|
+
"writable": true;
|
|
542
|
+
},
|
|
543
|
+
{
|
|
544
|
+
"name": "authority";
|
|
545
|
+
"writable": true;
|
|
546
|
+
"signer": true;
|
|
547
|
+
"relations": [
|
|
548
|
+
"bondState"
|
|
549
|
+
];
|
|
550
|
+
}
|
|
551
|
+
];
|
|
552
|
+
"args": [];
|
|
553
|
+
},
|
|
523
554
|
{
|
|
524
555
|
"name": "bondSetWithdrawAuthority";
|
|
525
556
|
"docs": [
|
|
@@ -1933,6 +1964,11 @@ type BondFinishProps = {
|
|
|
1933
1964
|
bondType: BondType;
|
|
1934
1965
|
name: string;
|
|
1935
1966
|
};
|
|
1967
|
+
type BondRemoveProps = {
|
|
1968
|
+
bondType: BondType;
|
|
1969
|
+
name: string;
|
|
1970
|
+
authority?: PublicKey;
|
|
1971
|
+
};
|
|
1936
1972
|
|
|
1937
1973
|
type GetHistoryOpts = {
|
|
1938
1974
|
cluster?: Cluster;
|
|
@@ -2074,6 +2110,7 @@ declare class JBondClient {
|
|
|
2074
2110
|
* Finish crowdfunding bond session
|
|
2075
2111
|
*/
|
|
2076
2112
|
bondFinish(props: BondFinishProps): Promise<string | undefined>;
|
|
2113
|
+
bondRemove(props: BondRemoveProps): Promise<string | undefined>;
|
|
2077
2114
|
/**
|
|
2078
2115
|
* Build global state initialize instruction
|
|
2079
2116
|
*/
|
|
@@ -2142,6 +2179,10 @@ declare class JBondClient {
|
|
|
2142
2179
|
voteAccount: PublicKeyInitData;
|
|
2143
2180
|
payer: PublicKey;
|
|
2144
2181
|
}): Promise<TransactionInstruction>;
|
|
2182
|
+
/**
|
|
2183
|
+
* Build bond remove instruction
|
|
2184
|
+
*/
|
|
2185
|
+
getBondRemoveIx(props: BondRemoveProps): Promise<TransactionInstruction>;
|
|
2145
2186
|
/**
|
|
2146
2187
|
* Build test set last update epoch instruction
|
|
2147
2188
|
* NOTE!: This instruction is for testing purposes only.
|
|
@@ -2341,4 +2382,4 @@ declare const CROWDFUNDING_BOND_SEED = "crowdfunding";
|
|
|
2341
2382
|
*/
|
|
2342
2383
|
declare const ENV_PROGRAM_ID: Record<string, PublicKey>;
|
|
2343
2384
|
|
|
2344
|
-
export { BOND_STATE_SEED, type BondConfigureProps, type BondFinishProps, type BondInitializeProps, type BondLockFunds, type BondReleaseFunds, type BondStartProps, type BondState, type BondStateStats, type BondStateStatus, BondTransactionType, BondType, CROWDFUNDING_BOND_SEED, type ClaimAllProps, type ClaimProps, type CollateralType, ENV_PROGRAM_ID, type EpochHistoryItem, GLOBAL_STATE_SEED, type GetHistoryGroupedProps, type GetHistoryProps, type GlobalConfigureProps, type GlobalInitializeProps, type GlobalState, JBondClient, JBondClientEnv, type JBondClientOptions, type Jbond, NodeWallet, type RegisterValidatorProps, STANDARD_BOND_SEED, SessionStatus, type SetWithdrawAuthorityProps, type TopUpCollateralProps, type TransactionHistoryItem, VALIDATOR_BOND_SEED, type ValidatorBond, type WithdrawCollateralProps };
|
|
2385
|
+
export { BOND_STATE_SEED, type BondConfigureProps, type BondFinishProps, type BondInitializeProps, type BondLockFunds, type BondReleaseFunds, type BondRemoveProps, type BondStartProps, type BondState, type BondStateStats, type BondStateStatus, BondTransactionType, BondType, CROWDFUNDING_BOND_SEED, type ClaimAllProps, type ClaimProps, type CollateralType, ENV_PROGRAM_ID, type EpochHistoryItem, GLOBAL_STATE_SEED, type GetHistoryGroupedProps, type GetHistoryProps, type GlobalConfigureProps, type GlobalInitializeProps, type GlobalState, JBondClient, JBondClientEnv, type JBondClientOptions, type Jbond, NodeWallet, type RegisterValidatorProps, STANDARD_BOND_SEED, SessionStatus, type SetWithdrawAuthorityProps, type TopUpCollateralProps, type TransactionHistoryItem, VALIDATOR_BOND_SEED, type ValidatorBond, type WithdrawCollateralProps };
|
package/dist/index.js
CHANGED
|
@@ -5268,6 +5268,37 @@ var jbond_default = {
|
|
|
5268
5268
|
}
|
|
5269
5269
|
]
|
|
5270
5270
|
},
|
|
5271
|
+
{
|
|
5272
|
+
name: "bond_remove",
|
|
5273
|
+
docs: [
|
|
5274
|
+
"Removes bond state"
|
|
5275
|
+
],
|
|
5276
|
+
discriminator: [
|
|
5277
|
+
121,
|
|
5278
|
+
112,
|
|
5279
|
+
246,
|
|
5280
|
+
177,
|
|
5281
|
+
181,
|
|
5282
|
+
8,
|
|
5283
|
+
18,
|
|
5284
|
+
220
|
|
5285
|
+
],
|
|
5286
|
+
accounts: [
|
|
5287
|
+
{
|
|
5288
|
+
name: "bond_state",
|
|
5289
|
+
writable: true
|
|
5290
|
+
},
|
|
5291
|
+
{
|
|
5292
|
+
name: "authority",
|
|
5293
|
+
writable: true,
|
|
5294
|
+
signer: true,
|
|
5295
|
+
relations: [
|
|
5296
|
+
"bond_state"
|
|
5297
|
+
]
|
|
5298
|
+
}
|
|
5299
|
+
],
|
|
5300
|
+
args: []
|
|
5301
|
+
},
|
|
5271
5302
|
{
|
|
5272
5303
|
name: "bond_set_withdraw_authority",
|
|
5273
5304
|
docs: [
|
|
@@ -6831,6 +6862,10 @@ var JBondClient = class _JBondClient {
|
|
|
6831
6862
|
const ix = await this.getBondSessionFinishIx(props);
|
|
6832
6863
|
return this.provider.sendAndConfirm?.(new web3_js.Transaction().add(ix));
|
|
6833
6864
|
}
|
|
6865
|
+
async bondRemove(props) {
|
|
6866
|
+
const ix = await this.getBondRemoveIx(props);
|
|
6867
|
+
return this.provider.sendAndConfirm?.(new web3_js.Transaction().add(ix));
|
|
6868
|
+
}
|
|
6834
6869
|
/**
|
|
6835
6870
|
* Build global state initialize instruction
|
|
6836
6871
|
*/
|
|
@@ -7132,6 +7167,15 @@ var JBondClient = class _JBondClient {
|
|
|
7132
7167
|
const [validatorBond, _] = this.pda.validatorBond(bondType, bondName, voteAccount);
|
|
7133
7168
|
return this.program.methods.bondUpdate().accountsPartial({ validatorBond, payer }).instruction();
|
|
7134
7169
|
}
|
|
7170
|
+
/**
|
|
7171
|
+
* Build bond remove instruction
|
|
7172
|
+
*/
|
|
7173
|
+
async getBondRemoveIx(props) {
|
|
7174
|
+
const { bondType, name } = props;
|
|
7175
|
+
const [bondState] = this.pda.bondState(bondType, name);
|
|
7176
|
+
const authority = props.authority ?? this.provider.wallet?.publicKey;
|
|
7177
|
+
return this.program.methods.bondRemove().accountsPartial({ bondState, authority }).instruction();
|
|
7178
|
+
}
|
|
7135
7179
|
/**
|
|
7136
7180
|
* Build test set last update epoch instruction
|
|
7137
7181
|
* NOTE!: This instruction is for testing purposes only.
|