@glamsystems/glam-sdk 1.0.9 → 1.0.10
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 +497 -24
- package/index.esm.js +497 -24
- package/package.json +1 -1
- package/src/client/cctp.d.ts +6 -6
- package/src/glamExports.d.ts +1 -5
- package/src/models/state.d.ts +5 -0
- package/src/react/glam.d.ts +1 -1
- package/target/idl/ext_cctp.json +3 -0
- package/target/idl/ext_drift-staging.json +3 -0
- package/target/idl/ext_drift.json +3 -0
- package/target/idl/ext_kamino-staging.json +3 -0
- package/target/idl/ext_kamino.json +3 -0
- package/target/idl/ext_marinade.json +3 -0
- package/target/idl/ext_spl-staging.json +3 -0
- package/target/idl/ext_spl.json +3 -0
- package/target/idl/ext_stake_pool-staging.json +3 -0
- package/target/idl/ext_stake_pool.json +3 -0
- package/target/idl/glam_config.json +63 -0
- package/target/idl/glam_mint-staging.json +178 -2
- package/target/idl/glam_mint.json +178 -2
- package/target/idl/glam_protocol-staging.json +4 -1
- package/target/idl/glam_protocol.json +4 -1
- package/target/types/ext_cctp.d.ts +3 -0
- package/target/types/ext_cctp.ts +3 -0
- package/target/types/ext_drift-staging.ts +3 -0
- package/target/types/ext_drift.d.ts +3 -0
- package/target/types/ext_drift.ts +3 -0
- package/target/types/ext_kamino-staging.ts +3 -0
- package/target/types/ext_kamino.d.ts +3 -0
- package/target/types/ext_kamino.ts +3 -0
- package/target/types/ext_marinade.d.ts +3 -0
- package/target/types/ext_marinade.ts +3 -0
- package/target/types/ext_spl-staging.ts +3 -0
- package/target/types/ext_spl.d.ts +3 -0
- package/target/types/ext_spl.ts +3 -0
- package/target/types/ext_stake_pool-staging.ts +3 -0
- package/target/types/ext_stake_pool.d.ts +3 -0
- package/target/types/ext_stake_pool.ts +3 -0
- package/target/types/glam_config.d.ts +63 -0
- package/target/types/glam_config.ts +63 -0
- package/target/types/glam_mint-staging.ts +178 -2
- package/target/types/glam_mint.d.ts +178 -2
- package/target/types/glam_mint.ts +178 -2
- package/target/types/glam_protocol-staging.ts +4 -1
- package/target/types/glam_protocol.d.ts +4 -1
- package/target/types/glam_protocol.ts +4 -1
package/package.json
CHANGED
package/src/client/cctp.d.ts
CHANGED
|
@@ -21,12 +21,12 @@ declare class TxBuilder extends BaseTxBuilder<CctpClient> {
|
|
|
21
21
|
* Returns a transaction that calls CCTP's `depositForBurn` instruction that bridges USDC to another chain.
|
|
22
22
|
* A keypair is generated for the message sent event account, which must be included as a transaction signer.
|
|
23
23
|
*/
|
|
24
|
-
bridgeUsdcIx(amount: BN, domain: number,
|
|
24
|
+
bridgeUsdcIx(amount: BN, domain: number, destinationAddress: PublicKey, params: {
|
|
25
25
|
maxFee: BN;
|
|
26
26
|
minFinalityThreshold: number;
|
|
27
27
|
destinationCaller?: PublicKey;
|
|
28
28
|
}, glamSigner: PublicKey): Promise<[TransactionInstruction, Keypair]>;
|
|
29
|
-
bridgeUsdcTx(amount: BN, domain: number,
|
|
29
|
+
bridgeUsdcTx(amount: BN, domain: number, destinationAddress: PublicKey, params: {
|
|
30
30
|
maxFee: BN;
|
|
31
31
|
minFinalityThreshold: number;
|
|
32
32
|
destinationCaller?: PublicKey;
|
|
@@ -46,11 +46,11 @@ export declare class CctpClient {
|
|
|
46
46
|
*
|
|
47
47
|
* @param amount Amount of USDC to bridge (in smallest units)
|
|
48
48
|
* @param domain Destination domain (e.g., 0 for Ethereum, 1 for Avalanche)
|
|
49
|
-
* @param
|
|
49
|
+
* @param destinationAddress Destination address on target chain (EVM address as PublicKey)
|
|
50
50
|
* @param params Additional parameters (maxFee, minFinalityThreshold)
|
|
51
51
|
* @param txOptions Transaction options
|
|
52
52
|
*/
|
|
53
|
-
bridgeUsdc(amount: BN | number, domain: number,
|
|
53
|
+
bridgeUsdc(amount: BN | number, domain: number, destinationAddress: PublicKey, params: {
|
|
54
54
|
maxFee: BN;
|
|
55
55
|
minFinalityThreshold: number;
|
|
56
56
|
destinationCaller?: PublicKey;
|
|
@@ -99,11 +99,11 @@ export declare class CctpClient {
|
|
|
99
99
|
tokenMessengerEventAuthority: PublicKey;
|
|
100
100
|
};
|
|
101
101
|
/**
|
|
102
|
-
* Find all message accounts onchain for a given sender
|
|
102
|
+
* Find all message accounts onchain for a given sender wallet
|
|
103
103
|
*
|
|
104
104
|
* TODO: filter by burned token mint
|
|
105
105
|
*/
|
|
106
|
-
findV2Messages(
|
|
106
|
+
findV2Messages(senderWallet: PublicKey, options: {
|
|
107
107
|
commitment?: Commitment;
|
|
108
108
|
minSlot?: number;
|
|
109
109
|
}): Promise<PublicKey[]>;
|
package/src/glamExports.d.ts
CHANGED
|
@@ -2291,10 +2291,7 @@ export declare function getGlamMintIdl(): {
|
|
|
2291
2291
|
type: string;
|
|
2292
2292
|
} | {
|
|
2293
2293
|
name: string;
|
|
2294
|
-
|
|
2295
|
-
docs?: undefined;
|
|
2296
|
-
} | {
|
|
2297
|
-
name: string;
|
|
2294
|
+
docs: string[];
|
|
2298
2295
|
type: {
|
|
2299
2296
|
vec: {
|
|
2300
2297
|
defined: {
|
|
@@ -2302,7 +2299,6 @@ export declare function getGlamMintIdl(): {
|
|
|
2302
2299
|
};
|
|
2303
2300
|
};
|
|
2304
2301
|
};
|
|
2305
|
-
docs?: undefined;
|
|
2306
2302
|
})[];
|
|
2307
2303
|
variants?: undefined;
|
|
2308
2304
|
};
|
package/src/models/state.d.ts
CHANGED
|
@@ -88,6 +88,9 @@ export declare class StateAccountType {
|
|
|
88
88
|
static readonly MINT: {
|
|
89
89
|
mint: {};
|
|
90
90
|
};
|
|
91
|
+
static readonly SINGLE_ASSET_VAULT: {
|
|
92
|
+
singleAssetVault: {};
|
|
93
|
+
};
|
|
91
94
|
static equals(a: StateAccountType, b: StateAccountType): boolean;
|
|
92
95
|
static from(s: string): {
|
|
93
96
|
vault: {};
|
|
@@ -95,5 +98,7 @@ export declare class StateAccountType {
|
|
|
95
98
|
tokenizedVault: {};
|
|
96
99
|
} | {
|
|
97
100
|
mint: {};
|
|
101
|
+
} | {
|
|
102
|
+
singleAssetVault: {};
|
|
98
103
|
};
|
|
99
104
|
}
|
package/src/react/glam.d.ts
CHANGED
|
@@ -41,7 +41,7 @@ interface GlamStateCache {
|
|
|
41
41
|
owner: PublicKey;
|
|
42
42
|
sparkleKey: string;
|
|
43
43
|
name: string;
|
|
44
|
-
product: "Mint" | "Vault" | "TokenizedVault";
|
|
44
|
+
product: "Mint" | "Vault" | "TokenizedVault" | "SingleAssetVault";
|
|
45
45
|
}
|
|
46
46
|
export declare function GlamProvider({ children, }: Readonly<{
|
|
47
47
|
children: React.ReactNode;
|
package/target/idl/ext_cctp.json
CHANGED
package/target/idl/ext_spl.json
CHANGED
|
@@ -227,6 +227,57 @@
|
|
|
227
227
|
}
|
|
228
228
|
]
|
|
229
229
|
},
|
|
230
|
+
{
|
|
231
|
+
"name": "update_fee_authority",
|
|
232
|
+
"discriminator": [
|
|
233
|
+
31,
|
|
234
|
+
223,
|
|
235
|
+
200,
|
|
236
|
+
21,
|
|
237
|
+
114,
|
|
238
|
+
158,
|
|
239
|
+
65,
|
|
240
|
+
61
|
|
241
|
+
],
|
|
242
|
+
"accounts": [
|
|
243
|
+
{
|
|
244
|
+
"name": "global_config",
|
|
245
|
+
"writable": true,
|
|
246
|
+
"pda": {
|
|
247
|
+
"seeds": [
|
|
248
|
+
{
|
|
249
|
+
"kind": "const",
|
|
250
|
+
"value": [
|
|
251
|
+
103,
|
|
252
|
+
108,
|
|
253
|
+
111,
|
|
254
|
+
98,
|
|
255
|
+
97,
|
|
256
|
+
108,
|
|
257
|
+
45,
|
|
258
|
+
99,
|
|
259
|
+
111,
|
|
260
|
+
110,
|
|
261
|
+
102,
|
|
262
|
+
105,
|
|
263
|
+
103
|
|
264
|
+
]
|
|
265
|
+
}
|
|
266
|
+
]
|
|
267
|
+
}
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
"name": "fee_authority",
|
|
271
|
+
"signer": true
|
|
272
|
+
}
|
|
273
|
+
],
|
|
274
|
+
"args": [
|
|
275
|
+
{
|
|
276
|
+
"name": "fee_authority",
|
|
277
|
+
"type": "pubkey"
|
|
278
|
+
}
|
|
279
|
+
]
|
|
280
|
+
},
|
|
230
281
|
{
|
|
231
282
|
"name": "update_protocol_fees",
|
|
232
283
|
"discriminator": [
|
|
@@ -509,18 +560,30 @@
|
|
|
509
560
|
},
|
|
510
561
|
{
|
|
511
562
|
"name": "referrer",
|
|
563
|
+
"docs": [
|
|
564
|
+
"Default GLAM referrer"
|
|
565
|
+
],
|
|
512
566
|
"type": "pubkey"
|
|
513
567
|
},
|
|
514
568
|
{
|
|
515
569
|
"name": "base_fee_bps",
|
|
570
|
+
"docs": [
|
|
571
|
+
"Default protocol base fee applied to all vaults"
|
|
572
|
+
],
|
|
516
573
|
"type": "u16"
|
|
517
574
|
},
|
|
518
575
|
{
|
|
519
576
|
"name": "flow_fee_bps",
|
|
577
|
+
"docs": [
|
|
578
|
+
"Default protocol flow fee applied to all vaults"
|
|
579
|
+
],
|
|
520
580
|
"type": "u16"
|
|
521
581
|
},
|
|
522
582
|
{
|
|
523
583
|
"name": "asset_metas",
|
|
584
|
+
"docs": [
|
|
585
|
+
"List of assets and their oracle configs supported by the protocol"
|
|
586
|
+
],
|
|
524
587
|
"type": {
|
|
525
588
|
"vec": {
|
|
526
589
|
"defined": {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"address": "gstgm1M39mhgnvgyScGUDRwNn5kNVSd97hTtyow1Et5",
|
|
3
3
|
"metadata": {
|
|
4
4
|
"name": "glam_mint",
|
|
5
|
-
"version": "1.0.
|
|
5
|
+
"version": "1.0.2",
|
|
6
6
|
"spec": "0.1.0",
|
|
7
7
|
"description": "GLAM mint program"
|
|
8
8
|
},
|
|
@@ -2818,6 +2818,167 @@
|
|
|
2818
2818
|
}
|
|
2819
2819
|
]
|
|
2820
2820
|
},
|
|
2821
|
+
{
|
|
2822
|
+
"name": "price_single_asset_vault",
|
|
2823
|
+
"docs": [
|
|
2824
|
+
"Prices a single asset vault."
|
|
2825
|
+
],
|
|
2826
|
+
"discriminator": [
|
|
2827
|
+
93,
|
|
2828
|
+
213,
|
|
2829
|
+
219,
|
|
2830
|
+
25,
|
|
2831
|
+
38,
|
|
2832
|
+
74,
|
|
2833
|
+
9,
|
|
2834
|
+
167
|
|
2835
|
+
],
|
|
2836
|
+
"accounts": [
|
|
2837
|
+
{
|
|
2838
|
+
"name": "glam_state",
|
|
2839
|
+
"writable": true
|
|
2840
|
+
},
|
|
2841
|
+
{
|
|
2842
|
+
"name": "glam_vault",
|
|
2843
|
+
"pda": {
|
|
2844
|
+
"seeds": [
|
|
2845
|
+
{
|
|
2846
|
+
"kind": "const",
|
|
2847
|
+
"value": [
|
|
2848
|
+
118,
|
|
2849
|
+
97,
|
|
2850
|
+
117,
|
|
2851
|
+
108,
|
|
2852
|
+
116
|
|
2853
|
+
]
|
|
2854
|
+
},
|
|
2855
|
+
{
|
|
2856
|
+
"kind": "account",
|
|
2857
|
+
"path": "glam_state"
|
|
2858
|
+
}
|
|
2859
|
+
],
|
|
2860
|
+
"program": {
|
|
2861
|
+
"kind": "const",
|
|
2862
|
+
"value": [
|
|
2863
|
+
10,
|
|
2864
|
+
55,
|
|
2865
|
+
49,
|
|
2866
|
+
193,
|
|
2867
|
+
142,
|
|
2868
|
+
247,
|
|
2869
|
+
75,
|
|
2870
|
+
193,
|
|
2871
|
+
33,
|
|
2872
|
+
61,
|
|
2873
|
+
5,
|
|
2874
|
+
218,
|
|
2875
|
+
254,
|
|
2876
|
+
219,
|
|
2877
|
+
143,
|
|
2878
|
+
206,
|
|
2879
|
+
156,
|
|
2880
|
+
138,
|
|
2881
|
+
14,
|
|
2882
|
+
32,
|
|
2883
|
+
89,
|
|
2884
|
+
232,
|
|
2885
|
+
248,
|
|
2886
|
+
173,
|
|
2887
|
+
46,
|
|
2888
|
+
77,
|
|
2889
|
+
46,
|
|
2890
|
+
206,
|
|
2891
|
+
189,
|
|
2892
|
+
171,
|
|
2893
|
+
68,
|
|
2894
|
+
237
|
|
2895
|
+
]
|
|
2896
|
+
}
|
|
2897
|
+
}
|
|
2898
|
+
},
|
|
2899
|
+
{
|
|
2900
|
+
"name": "signer",
|
|
2901
|
+
"writable": true,
|
|
2902
|
+
"signer": true
|
|
2903
|
+
},
|
|
2904
|
+
{
|
|
2905
|
+
"name": "base_asset_ata"
|
|
2906
|
+
},
|
|
2907
|
+
{
|
|
2908
|
+
"name": "integration_authority",
|
|
2909
|
+
"pda": {
|
|
2910
|
+
"seeds": [
|
|
2911
|
+
{
|
|
2912
|
+
"kind": "const",
|
|
2913
|
+
"value": [
|
|
2914
|
+
105,
|
|
2915
|
+
110,
|
|
2916
|
+
116,
|
|
2917
|
+
101,
|
|
2918
|
+
103,
|
|
2919
|
+
114,
|
|
2920
|
+
97,
|
|
2921
|
+
116,
|
|
2922
|
+
105,
|
|
2923
|
+
111,
|
|
2924
|
+
110,
|
|
2925
|
+
45,
|
|
2926
|
+
97,
|
|
2927
|
+
117,
|
|
2928
|
+
116,
|
|
2929
|
+
104,
|
|
2930
|
+
111,
|
|
2931
|
+
114,
|
|
2932
|
+
105,
|
|
2933
|
+
116,
|
|
2934
|
+
121
|
|
2935
|
+
]
|
|
2936
|
+
}
|
|
2937
|
+
]
|
|
2938
|
+
}
|
|
2939
|
+
},
|
|
2940
|
+
{
|
|
2941
|
+
"name": "glam_protocol",
|
|
2942
|
+
"address": "gstgptmbgJVi5f8ZmSRVZjZkDQwqKa3xWuUtD5WmJHz"
|
|
2943
|
+
},
|
|
2944
|
+
{
|
|
2945
|
+
"name": "event_authority",
|
|
2946
|
+
"optional": true,
|
|
2947
|
+
"pda": {
|
|
2948
|
+
"seeds": [
|
|
2949
|
+
{
|
|
2950
|
+
"kind": "const",
|
|
2951
|
+
"value": [
|
|
2952
|
+
95,
|
|
2953
|
+
95,
|
|
2954
|
+
101,
|
|
2955
|
+
118,
|
|
2956
|
+
101,
|
|
2957
|
+
110,
|
|
2958
|
+
116,
|
|
2959
|
+
95,
|
|
2960
|
+
97,
|
|
2961
|
+
117,
|
|
2962
|
+
116,
|
|
2963
|
+
104,
|
|
2964
|
+
111,
|
|
2965
|
+
114,
|
|
2966
|
+
105,
|
|
2967
|
+
116,
|
|
2968
|
+
121
|
|
2969
|
+
]
|
|
2970
|
+
}
|
|
2971
|
+
]
|
|
2972
|
+
}
|
|
2973
|
+
},
|
|
2974
|
+
{
|
|
2975
|
+
"name": "event_program",
|
|
2976
|
+
"optional": true,
|
|
2977
|
+
"address": "gstgm1M39mhgnvgyScGUDRwNn5kNVSd97hTtyow1Et5"
|
|
2978
|
+
}
|
|
2979
|
+
],
|
|
2980
|
+
"args": []
|
|
2981
|
+
},
|
|
2821
2982
|
{
|
|
2822
2983
|
"name": "price_stake_accounts",
|
|
2823
2984
|
"discriminator": [
|
|
@@ -4630,6 +4791,9 @@
|
|
|
4630
4791
|
},
|
|
4631
4792
|
{
|
|
4632
4793
|
"name": "Mint"
|
|
4794
|
+
},
|
|
4795
|
+
{
|
|
4796
|
+
"name": "SingleAssetVault"
|
|
4633
4797
|
}
|
|
4634
4798
|
]
|
|
4635
4799
|
}
|
|
@@ -4705,7 +4869,7 @@
|
|
|
4705
4869
|
},
|
|
4706
4870
|
{
|
|
4707
4871
|
"name": "priority",
|
|
4708
|
-
"type": "
|
|
4872
|
+
"type": "i8"
|
|
4709
4873
|
},
|
|
4710
4874
|
{
|
|
4711
4875
|
"name": "padding",
|
|
@@ -5200,18 +5364,30 @@
|
|
|
5200
5364
|
},
|
|
5201
5365
|
{
|
|
5202
5366
|
"name": "referrer",
|
|
5367
|
+
"docs": [
|
|
5368
|
+
"Default GLAM referrer"
|
|
5369
|
+
],
|
|
5203
5370
|
"type": "pubkey"
|
|
5204
5371
|
},
|
|
5205
5372
|
{
|
|
5206
5373
|
"name": "base_fee_bps",
|
|
5374
|
+
"docs": [
|
|
5375
|
+
"Default protocol base fee applied to all vaults"
|
|
5376
|
+
],
|
|
5207
5377
|
"type": "u16"
|
|
5208
5378
|
},
|
|
5209
5379
|
{
|
|
5210
5380
|
"name": "flow_fee_bps",
|
|
5381
|
+
"docs": [
|
|
5382
|
+
"Default protocol flow fee applied to all vaults"
|
|
5383
|
+
],
|
|
5211
5384
|
"type": "u16"
|
|
5212
5385
|
},
|
|
5213
5386
|
{
|
|
5214
5387
|
"name": "asset_metas",
|
|
5388
|
+
"docs": [
|
|
5389
|
+
"List of assets and their oracle configs supported by the protocol"
|
|
5390
|
+
],
|
|
5215
5391
|
"type": {
|
|
5216
5392
|
"vec": {
|
|
5217
5393
|
"defined": {
|