@jpool/bond-sdk 0.1.0-next.1 → 0.1.0-next.3
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/README.md +4 -124
- package/dist/index.d.mts +924 -0
- package/dist/index.d.ts +924 -0
- package/dist/index.js +1265 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +1254 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +8 -4
- package/.release-it.cjs +0 -1
- package/CHANGELOG.md +0 -21
- package/src/client.ts +0 -568
- package/src/common.ts +0 -2
- package/src/config.ts +0 -31
- package/src/helpers.ts +0 -7
- package/src/idl/jbond.json +0 -707
- package/src/index.ts +0 -8
- package/src/types/index.ts +0 -96
- package/src/types/jbond.ts +0 -713
- package/src/utils/wallet.ts +0 -45
- package/tsconfig.json +0 -39
- package/tsup.config.ts +0 -19
package/src/types/index.ts
DELETED
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import type { BN } from '@coral-xyz/anchor'
|
|
2
|
-
import type { PublicKey } from '@solana/web3.js'
|
|
3
|
-
|
|
4
|
-
export type Config = {
|
|
5
|
-
rpcUrl: string
|
|
6
|
-
programId: PublicKey
|
|
7
|
-
reserveAddress: PublicKey
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export type ValidatorBondAccount = {
|
|
11
|
-
identity: PublicKey
|
|
12
|
-
voteAccount: PublicKey
|
|
13
|
-
withdrawalAuthority?: string
|
|
14
|
-
totalWithdrawn: number
|
|
15
|
-
lastWithdrawalEpoch: number
|
|
16
|
-
isActive: boolean
|
|
17
|
-
createdAt: number
|
|
18
|
-
bump: number
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export type InitializeProps = {
|
|
22
|
-
authority: PublicKey
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export type RegisterValidatorProps = {
|
|
26
|
-
creator: PublicKey
|
|
27
|
-
identity: PublicKey
|
|
28
|
-
voteAccount: PublicKey
|
|
29
|
-
initialCollateral: number
|
|
30
|
-
withdrawalAuthority?: PublicKey
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export type TopUpCollateralProps = {
|
|
34
|
-
user: PublicKey
|
|
35
|
-
voteAccount: PublicKey
|
|
36
|
-
amount: number
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export type WithdrawCollateralProps = {
|
|
40
|
-
withdrawalAuthority: PublicKey
|
|
41
|
-
voteAccount: PublicKey
|
|
42
|
-
destination: PublicKey
|
|
43
|
-
amount: number
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export type WithdrawCompensationProps = {
|
|
47
|
-
authority: PublicKey
|
|
48
|
-
voteAccount: PublicKey
|
|
49
|
-
amount: number
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export type GetHistoryProps = {
|
|
53
|
-
voteAccount: PublicKey
|
|
54
|
-
options?: {
|
|
55
|
-
limit?: number
|
|
56
|
-
before?: string
|
|
57
|
-
until?: string
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export type GetHistoryGroupedProps = {
|
|
62
|
-
voteAccount: PublicKey
|
|
63
|
-
epochsCount?: number
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
export type GlobalState = {
|
|
67
|
-
authority: PublicKey
|
|
68
|
-
totalValidators: number
|
|
69
|
-
totalCollateral: BN
|
|
70
|
-
totalWithdrawn: BN
|
|
71
|
-
bump: number
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
export type EpochHistoryItem = {
|
|
75
|
-
epoch: number
|
|
76
|
-
deposits: number
|
|
77
|
-
withdrawals: number
|
|
78
|
-
balanceChange: number
|
|
79
|
-
signatures: string[]
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
export type TransactionHistoryItem = {
|
|
83
|
-
signature: string
|
|
84
|
-
slot: number
|
|
85
|
-
epoch: number
|
|
86
|
-
type: BondTransactionType
|
|
87
|
-
amount: number
|
|
88
|
-
beforeBalance?: number
|
|
89
|
-
afterBalance?: number
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
export enum BondTransactionType {
|
|
93
|
-
Deposit = 'deposit',
|
|
94
|
-
Withdrawal = 'withdrawal',
|
|
95
|
-
Compensation = 'compensation',
|
|
96
|
-
}
|