@glamsystems/glam-sdk 1.1.0-alpha.5 → 1.1.0

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.
Files changed (137) hide show
  1. package/LICENSE +201 -0
  2. package/buffer-layout.d.ts +88 -0
  3. package/index.cjs.d.ts +1 -0
  4. package/index.cjs.js +1 -92594
  5. package/index.esm.d.ts +1 -0
  6. package/index.esm.js +1 -92146
  7. package/package.json +29 -17
  8. package/src/assets.d.ts +39 -0
  9. package/src/client/access.d.ts +57 -0
  10. package/src/client/base.d.ts +234 -0
  11. package/src/client/bridge.d.ts +205 -0
  12. package/src/client/bridgeRegistry.d.ts +32 -0
  13. package/src/client/cctp.d.ts +164 -0
  14. package/src/client/epi.d.ts +228 -0
  15. package/src/client/fees.d.ts +33 -0
  16. package/src/client/invest.d.ts +37 -0
  17. package/src/client/jupiter-lend/borrow.d.ts +92 -0
  18. package/src/client/jupiter-lend/earn.d.ts +64 -0
  19. package/src/client/jupiter-lend/index.d.ts +3 -0
  20. package/src/client/jupiter-lend/shared.d.ts +129 -0
  21. package/src/client/jupiter.d.ts +53 -0
  22. package/src/client/kamino/farm.d.ts +39 -0
  23. package/src/client/kamino/index.d.ts +4 -0
  24. package/src/client/kamino/lending.d.ts +94 -0
  25. package/src/client/kamino/types.d.ts +56 -0
  26. package/src/client/kamino/vaults.d.ts +39 -0
  27. package/src/client/loopscale/borrow.d.ts +118 -0
  28. package/src/client/loopscale/core.d.ts +604 -0
  29. package/src/client/loopscale/index.d.ts +5 -0
  30. package/src/client/loopscale/lend.d.ts +123 -0
  31. package/src/client/loopscale/vault.d.ts +43 -0
  32. package/src/client/marinade.d.ts +42 -0
  33. package/src/client/mint.d.ts +143 -0
  34. package/src/client/orca.d.ts +255 -0
  35. package/src/client/phoenix.d.ts +214 -0
  36. package/src/client/price.d.ts +182 -0
  37. package/src/client/stake-pool.d.ts +39 -0
  38. package/src/client/stake.d.ts +34 -0
  39. package/src/client/state.d.ts +56 -0
  40. package/src/client/timelock.d.ts +31 -0
  41. package/src/client/vault.d.ts +98 -0
  42. package/src/client.d.ts +82 -0
  43. package/src/clientConfig.d.ts +32 -0
  44. package/src/constants.d.ts +111 -0
  45. package/src/deser/base.d.ts +18 -0
  46. package/src/deser/index.d.ts +4 -0
  47. package/src/deser/integrationPolicies.d.ts +195 -0
  48. package/src/deser/kaminoLayouts.d.ts +264 -0
  49. package/src/deser/loopscaleLayouts.d.ts +157 -0
  50. package/src/deser/tokenAclLayouts.d.ts +67 -0
  51. package/src/error.d.ts +29 -0
  52. package/src/glamExports.d.ts +6260 -0
  53. package/src/globalConfig.d.ts +27 -0
  54. package/src/index.d.ts +24 -0
  55. package/src/models/acl.d.ts +43 -0
  56. package/src/models/index.d.ts +8 -0
  57. package/src/models/mint.d.ts +57 -0
  58. package/src/models/state.d.ts +94 -0
  59. package/src/models/types.d.ts +28 -0
  60. package/src/protocols.d.ts +29 -0
  61. package/src/utils/accounts.d.ts +71 -0
  62. package/src/utils/bitmask.d.ts +53 -0
  63. package/src/utils/blockhash.d.ts +11 -0
  64. package/src/utils/common.d.ts +73 -0
  65. package/src/utils/computeBudget.d.ts +15 -0
  66. package/src/utils/evm.d.ts +10 -0
  67. package/src/utils/fraction.d.ts +29 -0
  68. package/src/utils/glamPDAs.d.ts +15 -0
  69. package/src/utils/helius.d.ts +66 -0
  70. package/src/utils/index.d.ts +17 -0
  71. package/src/utils/jupiterApi.d.ts +95 -0
  72. package/src/utils/lookupTables.d.ts +83 -0
  73. package/src/utils/phoenixApi.d.ts +146 -0
  74. package/src/utils/pkmap.d.ts +87 -0
  75. package/src/utils/pkset.d.ts +73 -0
  76. package/src/utils/positionCategorizer.d.ts +38 -0
  77. package/src/utils/rpc.d.ts +18 -0
  78. package/src/utils/timelock.d.ts +52 -0
  79. package/src/utils/transaction.d.ts +13 -0
  80. package/target/idl/ext_bridge-staging.json +2379 -0
  81. package/target/idl/ext_bridge.json +2379 -0
  82. package/target/idl/ext_drift.json +5464 -0
  83. package/target/idl/ext_epi-staging.json +2862 -0
  84. package/target/idl/ext_epi.json +2862 -0
  85. package/target/idl/ext_loopscale-staging.json +4708 -0
  86. package/target/idl/ext_loopscale.json +4708 -0
  87. package/target/idl/ext_marinade-staging.json +1587 -0
  88. package/target/idl/ext_phoenix-staging.json +3525 -0
  89. package/target/idl/ext_phoenix.json +3525 -0
  90. package/target/idl/mock_layerzero_endpoint.json +144 -0
  91. package/target/idl/mock_layerzero_oft.json +155 -0
  92. package/target/idl/mock_wormhole_verify_vaa_shim.json +58 -0
  93. package/target/types/ext_bridge-staging.d.ts +2385 -0
  94. package/target/types/ext_bridge-staging.ts +2385 -0
  95. package/target/types/ext_bridge.d.ts +2385 -0
  96. package/target/types/ext_bridge.ts +2385 -0
  97. package/target/types/ext_cctp-staging.d.ts +1268 -0
  98. package/target/types/ext_cctp.d.ts +1268 -0
  99. package/target/types/ext_drift.d.ts +5470 -0
  100. package/target/types/ext_drift.ts +5470 -0
  101. package/target/types/ext_epi-staging.d.ts +2868 -0
  102. package/target/types/ext_epi-staging.ts +2868 -0
  103. package/target/types/ext_epi.d.ts +2868 -0
  104. package/target/types/ext_epi.ts +2868 -0
  105. package/target/types/ext_jupiter-staging.d.ts +1966 -0
  106. package/target/types/ext_jupiter.d.ts +1966 -0
  107. package/target/types/ext_kamino-staging.d.ts +3433 -0
  108. package/target/types/ext_kamino.d.ts +3433 -0
  109. package/target/types/ext_loopscale-staging.d.ts +4714 -0
  110. package/target/types/ext_loopscale-staging.ts +4714 -0
  111. package/target/types/ext_loopscale.d.ts +4714 -0
  112. package/target/types/ext_loopscale.ts +4714 -0
  113. package/target/types/ext_marinade-staging.d.ts +1593 -0
  114. package/target/types/ext_marinade-staging.ts +1593 -0
  115. package/target/types/ext_marinade.d.ts +1593 -0
  116. package/target/types/ext_orca-staging.d.ts +2829 -0
  117. package/target/types/ext_orca.d.ts +2829 -0
  118. package/target/types/ext_phoenix-staging.d.ts +3531 -0
  119. package/target/types/ext_phoenix-staging.ts +3531 -0
  120. package/target/types/ext_phoenix.d.ts +3531 -0
  121. package/target/types/ext_phoenix.ts +3531 -0
  122. package/target/types/ext_spl-staging.d.ts +1274 -0
  123. package/target/types/ext_spl.d.ts +1274 -0
  124. package/target/types/ext_stake_pool-staging.d.ts +1622 -0
  125. package/target/types/ext_stake_pool.d.ts +1622 -0
  126. package/target/types/glam_config.d.ts +755 -0
  127. package/target/types/glam_mint-staging.d.ts +8802 -0
  128. package/target/types/glam_mint.d.ts +6349 -0
  129. package/target/types/glam_policies.d.ts +477 -0
  130. package/target/types/glam_protocol-staging.d.ts +3362 -0
  131. package/target/types/glam_protocol.d.ts +2783 -0
  132. package/target/types/mock_layerzero_endpoint.d.ts +150 -0
  133. package/target/types/mock_layerzero_endpoint.ts +150 -0
  134. package/target/types/mock_layerzero_oft.d.ts +161 -0
  135. package/target/types/mock_layerzero_oft.ts +161 -0
  136. package/target/types/mock_wormhole_verify_vaa_shim.d.ts +64 -0
  137. package/target/types/mock_wormhole_verify_vaa_shim.ts +64 -0
@@ -0,0 +1,144 @@
1
+ {
2
+ "address": "7VCSNNGUmS4f1qDE73PmkSWbV3kBhRPJko1g7t9YTSbM",
3
+ "metadata": {
4
+ "name": "mock_layerzero_endpoint",
5
+ "version": "1.0.0",
6
+ "spec": "0.1.0"
7
+ },
8
+ "instructions": [
9
+ {
10
+ "name": "advance_nonce",
11
+ "discriminator": [
12
+ 20,
13
+ 17,
14
+ 71,
15
+ 131,
16
+ 103,
17
+ 35,
18
+ 92,
19
+ 6
20
+ ],
21
+ "accounts": [
22
+ {
23
+ "name": "nonce",
24
+ "writable": true,
25
+ "pda": {
26
+ "seeds": [
27
+ {
28
+ "kind": "const",
29
+ "value": [
30
+ 78,
31
+ 111,
32
+ 110,
33
+ 99,
34
+ 101
35
+ ]
36
+ },
37
+ {
38
+ "kind": "arg",
39
+ "path": "sender"
40
+ },
41
+ {
42
+ "kind": "arg",
43
+ "path": "dst_eid"
44
+ },
45
+ {
46
+ "kind": "arg",
47
+ "path": "receiver"
48
+ }
49
+ ]
50
+ }
51
+ }
52
+ ],
53
+ "args": [
54
+ {
55
+ "name": "_sender",
56
+ "type": "pubkey"
57
+ },
58
+ {
59
+ "name": "_dst_eid",
60
+ "type": "u32"
61
+ },
62
+ {
63
+ "name": "_receiver",
64
+ "type": "pubkey"
65
+ }
66
+ ]
67
+ },
68
+ {
69
+ "name": "initialize_nonce",
70
+ "discriminator": [
71
+ 64,
72
+ 206,
73
+ 214,
74
+ 231,
75
+ 20,
76
+ 15,
77
+ 231,
78
+ 41
79
+ ],
80
+ "accounts": [
81
+ {
82
+ "name": "payer",
83
+ "writable": true,
84
+ "signer": true
85
+ },
86
+ {
87
+ "name": "nonce",
88
+ "writable": true,
89
+ "pda": {
90
+ "seeds": [
91
+ {
92
+ "kind": "const",
93
+ "value": [
94
+ 78,
95
+ 111,
96
+ 110,
97
+ 99,
98
+ 101
99
+ ]
100
+ },
101
+ {
102
+ "kind": "arg",
103
+ "path": "sender"
104
+ },
105
+ {
106
+ "kind": "arg",
107
+ "path": "dst_eid"
108
+ },
109
+ {
110
+ "kind": "arg",
111
+ "path": "receiver"
112
+ }
113
+ ]
114
+ }
115
+ },
116
+ {
117
+ "name": "system_program",
118
+ "address": "11111111111111111111111111111111"
119
+ }
120
+ ],
121
+ "args": [
122
+ {
123
+ "name": "_sender",
124
+ "type": "pubkey"
125
+ },
126
+ {
127
+ "name": "_dst_eid",
128
+ "type": "u32"
129
+ },
130
+ {
131
+ "name": "_receiver",
132
+ "type": "pubkey"
133
+ }
134
+ ]
135
+ }
136
+ ],
137
+ "errors": [
138
+ {
139
+ "code": 6000,
140
+ "name": "InvalidNonceAccount",
141
+ "msg": "The nonce account layout is invalid"
142
+ }
143
+ ]
144
+ }
@@ -0,0 +1,155 @@
1
+ {
2
+ "address": "G6cLMyeKew7B7RR1eAsYhKViYNcknwfwJ4ZbSDwWSS4z",
3
+ "metadata": {
4
+ "name": "mock_layerzero_oft",
5
+ "version": "1.0.0",
6
+ "spec": "0.1.0"
7
+ },
8
+ "instructions": [
9
+ {
10
+ "name": "send",
11
+ "discriminator": [
12
+ 102,
13
+ 251,
14
+ 20,
15
+ 187,
16
+ 65,
17
+ 75,
18
+ 12,
19
+ 69
20
+ ],
21
+ "accounts": [
22
+ {
23
+ "name": "payer",
24
+ "writable": true,
25
+ "signer": true
26
+ },
27
+ {
28
+ "name": "placeholder_0"
29
+ },
30
+ {
31
+ "name": "oft_store"
32
+ },
33
+ {
34
+ "name": "placeholder_1"
35
+ },
36
+ {
37
+ "name": "from",
38
+ "writable": true
39
+ },
40
+ {
41
+ "name": "custody",
42
+ "writable": true
43
+ },
44
+ {
45
+ "name": "mint"
46
+ },
47
+ {
48
+ "name": "token_program"
49
+ },
50
+ {
51
+ "name": "placeholder_2"
52
+ },
53
+ {
54
+ "name": "placeholder_3"
55
+ },
56
+ {
57
+ "name": "mock_layerzero_endpoint_program",
58
+ "address": "7VCSNNGUmS4f1qDE73PmkSWbV3kBhRPJko1g7t9YTSbM"
59
+ },
60
+ {
61
+ "name": "oft_store_duplicate"
62
+ },
63
+ {
64
+ "name": "placeholder_4"
65
+ },
66
+ {
67
+ "name": "placeholder_5"
68
+ },
69
+ {
70
+ "name": "placeholder_6"
71
+ },
72
+ {
73
+ "name": "placeholder_7"
74
+ },
75
+ {
76
+ "name": "placeholder_8"
77
+ },
78
+ {
79
+ "name": "nonce",
80
+ "writable": true
81
+ },
82
+ {
83
+ "name": "system_program",
84
+ "address": "11111111111111111111111111111111"
85
+ }
86
+ ],
87
+ "args": [
88
+ {
89
+ "name": "args",
90
+ "type": {
91
+ "defined": {
92
+ "name": "SendArgs"
93
+ }
94
+ }
95
+ }
96
+ ]
97
+ }
98
+ ],
99
+ "errors": [
100
+ {
101
+ "code": 6000,
102
+ "name": "InvalidStoreDuplicate",
103
+ "msg": "The duplicated store account does not match"
104
+ }
105
+ ],
106
+ "types": [
107
+ {
108
+ "name": "SendArgs",
109
+ "type": {
110
+ "kind": "struct",
111
+ "fields": [
112
+ {
113
+ "name": "dst_eid",
114
+ "type": "u32"
115
+ },
116
+ {
117
+ "name": "to",
118
+ "type": {
119
+ "array": [
120
+ "u8",
121
+ 32
122
+ ]
123
+ }
124
+ },
125
+ {
126
+ "name": "amount_ld",
127
+ "type": "u64"
128
+ },
129
+ {
130
+ "name": "min_amount_ld",
131
+ "type": "u64"
132
+ },
133
+ {
134
+ "name": "options",
135
+ "type": "bytes"
136
+ },
137
+ {
138
+ "name": "compose_msg",
139
+ "type": {
140
+ "option": "bytes"
141
+ }
142
+ },
143
+ {
144
+ "name": "native_fee",
145
+ "type": "u64"
146
+ },
147
+ {
148
+ "name": "lz_token_fee",
149
+ "type": "u64"
150
+ }
151
+ ]
152
+ }
153
+ }
154
+ ]
155
+ }
@@ -0,0 +1,58 @@
1
+ {
2
+ "address": "EFaNWErqAtVWufdNb7yofSHHfWFos843DFpu4JBw24at",
3
+ "metadata": {
4
+ "name": "mock_wormhole_verify_vaa_shim",
5
+ "version": "1.0.0",
6
+ "spec": "0.1.0"
7
+ },
8
+ "instructions": [
9
+ {
10
+ "name": "verify_hash",
11
+ "discriminator": [
12
+ 22,
13
+ 152,
14
+ 160,
15
+ 69,
16
+ 241,
17
+ 148,
18
+ 14,
19
+ 124
20
+ ],
21
+ "accounts": [
22
+ {
23
+ "name": "guardian_set"
24
+ },
25
+ {
26
+ "name": "guardian_signatures"
27
+ }
28
+ ],
29
+ "args": [
30
+ {
31
+ "name": "guardian_set_bump",
32
+ "type": "u8"
33
+ },
34
+ {
35
+ "name": "digest",
36
+ "type": {
37
+ "array": [
38
+ "u8",
39
+ 32
40
+ ]
41
+ }
42
+ }
43
+ ]
44
+ }
45
+ ],
46
+ "errors": [
47
+ {
48
+ "code": 6000,
49
+ "name": "InvalidGuardianSetBump",
50
+ "msg": "guardian set bump must be non-zero"
51
+ },
52
+ {
53
+ "code": 6001,
54
+ "name": "InvalidDigest",
55
+ "msg": "digest must be non-zero"
56
+ }
57
+ ]
58
+ }