@helium/welcome-pack-sdk 0.10.19

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 (46) hide show
  1. package/LICENSE +203 -0
  2. package/README.md +23 -0
  3. package/lib/cjs/constants.js +6 -0
  4. package/lib/cjs/constants.js.map +1 -0
  5. package/lib/cjs/functions/claimWelcomePack.js +79 -0
  6. package/lib/cjs/functions/claimWelcomePack.js.map +1 -0
  7. package/lib/cjs/functions/closeWelcomePack.js +55 -0
  8. package/lib/cjs/functions/closeWelcomePack.js.map +1 -0
  9. package/lib/cjs/functions/initializeWelcomePack.js +64 -0
  10. package/lib/cjs/functions/initializeWelcomePack.js.map +1 -0
  11. package/lib/cjs/index.js +62 -0
  12. package/lib/cjs/index.js.map +1 -0
  13. package/lib/cjs/pdas.js +16 -0
  14. package/lib/cjs/pdas.js.map +1 -0
  15. package/lib/cjs/resolvers.js +6 -0
  16. package/lib/cjs/resolvers.js.map +1 -0
  17. package/lib/esm/src/constants.js +3 -0
  18. package/lib/esm/src/constants.js.map +1 -0
  19. package/lib/esm/src/functions/claimWelcomePack.js +61 -0
  20. package/lib/esm/src/functions/claimWelcomePack.js.map +1 -0
  21. package/lib/esm/src/functions/closeWelcomePack.js +34 -0
  22. package/lib/esm/src/functions/closeWelcomePack.js.map +1 -0
  23. package/lib/esm/src/functions/initializeWelcomePack.js +44 -0
  24. package/lib/esm/src/functions/initializeWelcomePack.js.map +1 -0
  25. package/lib/esm/src/index.js +29 -0
  26. package/lib/esm/src/index.js.map +1 -0
  27. package/lib/esm/src/pdas.js +11 -0
  28. package/lib/esm/src/pdas.js.map +1 -0
  29. package/lib/esm/src/resolvers.js +3 -0
  30. package/lib/esm/src/resolvers.js.map +1 -0
  31. package/lib/esm/tsconfig.esm.tsbuildinfo +1 -0
  32. package/lib/types/src/constants.d.ts +3 -0
  33. package/lib/types/src/constants.d.ts.map +1 -0
  34. package/lib/types/src/functions/claimWelcomePack.d.ts +173 -0
  35. package/lib/types/src/functions/claimWelcomePack.d.ts.map +1 -0
  36. package/lib/types/src/functions/closeWelcomePack.d.ts +106 -0
  37. package/lib/types/src/functions/closeWelcomePack.d.ts.map +1 -0
  38. package/lib/types/src/functions/initializeWelcomePack.d.ts +186 -0
  39. package/lib/types/src/functions/initializeWelcomePack.d.ts.map +1 -0
  40. package/lib/types/src/index.d.ts +18 -0
  41. package/lib/types/src/index.d.ts.map +1 -0
  42. package/lib/types/src/pdas.d.ts +4 -0
  43. package/lib/types/src/pdas.d.ts.map +1 -0
  44. package/lib/types/src/resolvers.d.ts +2 -0
  45. package/lib/types/src/resolvers.d.ts.map +1 -0
  46. package/package.json +52 -0
@@ -0,0 +1,173 @@
1
+ /// <reference types="node" />
2
+ import { IdlTypes, Program } from "@coral-xyz/anchor";
3
+ import { WelcomePack } from "@helium/idls/lib/types/welcome_pack";
4
+ import { Asset, AssetProof } from "@helium/spl-utils";
5
+ import { Tuktuk } from "@helium/tuktuk-idls/lib/types/tuktuk";
6
+ import { PublicKey } from "@solana/web3.js";
7
+ import { ClaimApprovalV0 } from "..";
8
+ export type RewardSplit = IdlTypes<WelcomePack>["miniFanoutShareArgV0"];
9
+ export declare function claimWelcomePack({ program, tuktukProgram, assetEndpoint, claimApproval, claimApprovalSignature, claimer, taskQueue, payer, ...rest }: {
10
+ claimer: PublicKey;
11
+ tuktukProgram: Program<Tuktuk>;
12
+ claimApproval: ClaimApprovalV0;
13
+ claimApprovalSignature: Buffer;
14
+ program: Program<WelcomePack>;
15
+ payer?: PublicKey;
16
+ taskQueue: PublicKey;
17
+ assetEndpoint?: string;
18
+ getAssetFn?: (url: string, assetId: PublicKey) => Promise<Asset | undefined>;
19
+ getAssetProofFn?: (url: string, assetId: PublicKey) => Promise<AssetProof | undefined>;
20
+ }): Promise<import("@coral-xyz/anchor/dist/cjs/program/namespace/methods").MethodsBuilder<WelcomePack, {
21
+ name: "claimWelcomePackV0";
22
+ discriminator: [193, 189, 189, 219, 97, 176, 82, 231];
23
+ accounts: [{
24
+ name: "claimer";
25
+ writable: true;
26
+ signer: true;
27
+ }, {
28
+ name: "rentRefund";
29
+ writable: true;
30
+ }, {
31
+ name: "assetReturnAddress";
32
+ }, {
33
+ name: "owner";
34
+ relations: ["welcomePack"];
35
+ }, {
36
+ name: "welcomePack";
37
+ writable: true;
38
+ }, {
39
+ name: "rewardsMint";
40
+ relations: ["welcomePack"];
41
+ }, {
42
+ name: "recipient";
43
+ writable: true;
44
+ }, {
45
+ name: "rewardsRecipient";
46
+ writable: true;
47
+ }, {
48
+ name: "tokenAccount";
49
+ writable: true;
50
+ }, {
51
+ name: "queueAuthority";
52
+ }, {
53
+ name: "taskQueue";
54
+ writable: true;
55
+ }, {
56
+ name: "taskQueueAuthority";
57
+ }, {
58
+ name: "task";
59
+ writable: true;
60
+ }, {
61
+ name: "treeAuthority";
62
+ }, {
63
+ name: "merkleTree";
64
+ writable: true;
65
+ }, {
66
+ name: "logWrapper";
67
+ address: "noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV";
68
+ }, {
69
+ name: "compressionProgram";
70
+ address: "cmtDvXumGCrqC1Age74AVPhSRVXJMd8PJS91L8KbNCK";
71
+ }, {
72
+ name: "systemProgram";
73
+ address: "11111111111111111111111111111111";
74
+ }, {
75
+ name: "miniFanoutProgram";
76
+ address: "mfanLprNnaiP4RX9Zz1BMcDosYHCqnG24H1fMEbi9Gn";
77
+ }, {
78
+ name: "associatedTokenProgram";
79
+ address: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL";
80
+ }, {
81
+ name: "tokenProgram";
82
+ address: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
83
+ }, {
84
+ name: "bubblegumProgram";
85
+ address: "BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY";
86
+ }, {
87
+ name: "tuktukProgram";
88
+ address: "tuktukUrfhXT6ZT77QTU8RQtvgL967uRuVagWF57zVA";
89
+ }, {
90
+ name: "lazyDistributorProgram";
91
+ address: "1azyuavdMyvsivtNxPoz6SucD18eDHeXzFCUPq5XU7w";
92
+ }];
93
+ args: [{
94
+ name: "args";
95
+ type: {
96
+ defined: {
97
+ name: "claimWelcomePackArgsV0";
98
+ };
99
+ };
100
+ }];
101
+ } & {
102
+ name: "claimWelcomePackV0";
103
+ }, {
104
+ name: "claimer";
105
+ writable: true;
106
+ signer: true;
107
+ } | {
108
+ name: "rentRefund";
109
+ writable: true;
110
+ } | {
111
+ name: "assetReturnAddress";
112
+ } | {
113
+ name: "owner";
114
+ relations: ["welcomePack"];
115
+ } | {
116
+ name: "welcomePack";
117
+ writable: true;
118
+ } | {
119
+ name: "rewardsMint";
120
+ relations: ["welcomePack"];
121
+ } | {
122
+ name: "recipient";
123
+ writable: true;
124
+ } | {
125
+ name: "rewardsRecipient";
126
+ writable: true;
127
+ } | {
128
+ name: "tokenAccount";
129
+ writable: true;
130
+ } | {
131
+ name: "queueAuthority";
132
+ } | {
133
+ name: "taskQueue";
134
+ writable: true;
135
+ } | {
136
+ name: "taskQueueAuthority";
137
+ } | {
138
+ name: "task";
139
+ writable: true;
140
+ } | {
141
+ name: "treeAuthority";
142
+ } | {
143
+ name: "merkleTree";
144
+ writable: true;
145
+ } | {
146
+ name: "logWrapper";
147
+ address: "noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV";
148
+ } | {
149
+ name: "compressionProgram";
150
+ address: "cmtDvXumGCrqC1Age74AVPhSRVXJMd8PJS91L8KbNCK";
151
+ } | {
152
+ name: "systemProgram";
153
+ address: "11111111111111111111111111111111";
154
+ } | {
155
+ name: "miniFanoutProgram";
156
+ address: "mfanLprNnaiP4RX9Zz1BMcDosYHCqnG24H1fMEbi9Gn";
157
+ } | {
158
+ name: "associatedTokenProgram";
159
+ address: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL";
160
+ } | {
161
+ name: "tokenProgram";
162
+ address: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
163
+ } | {
164
+ name: "bubblegumProgram";
165
+ address: "BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY";
166
+ } | {
167
+ name: "tuktukProgram";
168
+ address: "tuktukUrfhXT6ZT77QTU8RQtvgL967uRuVagWF57zVA";
169
+ } | {
170
+ name: "lazyDistributorProgram";
171
+ address: "1azyuavdMyvsivtNxPoz6SucD18eDHeXzFCUPq5XU7w";
172
+ }>>;
173
+ //# sourceMappingURL=claimWelcomePack.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"claimWelcomePack.d.ts","sourceRoot":"","sources":["../../../../src/functions/claimWelcomePack.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAGlE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAwB,MAAM,mBAAmB,CAAC;AAC5E,OAAO,EAAE,MAAM,EAAE,MAAM,sCAAsC,CAAC;AAI9D,OAAO,EAAE,SAAS,EAAiB,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,IAAI,CAAC;AAGrC,MAAM,MAAM,WAAW,GAAG,QAAQ,CAAC,WAAW,CAAC,CAAC,sBAAsB,CAAC,CAAC;AAExE,wBAAsB,gBAAgB,CAAC,EACrC,OAAO,EACP,aAAa,EACb,aAAa,EACb,aAAa,EACb,sBAAsB,EACtB,OAAO,EACP,SAAS,EAET,KAAyC,EACzC,GAAG,IAAI,EACR,EAAE;IACD,OAAO,EAAE,SAAS,CAAC;IACnB,aAAa,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IAC/B,aAAa,EAAE,eAAe,CAAC;IAC/B,sBAAsB,EAAE,MAAM,CAAC;IAC/B,OAAO,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;IAC9B,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,SAAS,EAAE,SAAS,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,KAAK,OAAO,CAAC,KAAK,GAAG,SAAS,CAAC,CAAC;IAC7E,eAAe,CAAC,EAAE,CAChB,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,SAAS,KACf,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC,CAAC;CACtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAyDA"}
@@ -0,0 +1,106 @@
1
+ import { IdlTypes, Program } from "@coral-xyz/anchor";
2
+ import { WelcomePack } from "@helium/idls/lib/types/welcome_pack";
3
+ import { Asset, AssetProof } from "@helium/spl-utils";
4
+ import { PublicKey } from "@solana/web3.js";
5
+ export type RewardSplit = IdlTypes<WelcomePack>["miniFanoutShareArgV0"];
6
+ export declare function closeWelcomePack({ program, welcomePack, assetEndpoint, payer, ...rest }: {
7
+ welcomePack: PublicKey;
8
+ program: Program<WelcomePack>;
9
+ payer?: PublicKey;
10
+ assetEndpoint?: string;
11
+ getAssetFn?: (url: string, assetId: PublicKey) => Promise<Asset | undefined>;
12
+ getAssetProofFn?: (url: string, assetId: PublicKey) => Promise<AssetProof | undefined>;
13
+ }): Promise<import("@coral-xyz/anchor/dist/cjs/program/namespace/methods").MethodsBuilder<WelcomePack, {
14
+ name: "closeWelcomePackV0";
15
+ discriminator: [220, 222, 184, 125, 100, 243, 243, 172];
16
+ accounts: [{
17
+ name: "owner";
18
+ signer: true;
19
+ relations: ["welcomePack"];
20
+ }, {
21
+ name: "welcomePack";
22
+ writable: true;
23
+ }, {
24
+ name: "userWelcomePacks";
25
+ }, {
26
+ name: "rentRefund";
27
+ writable: true;
28
+ }, {
29
+ name: "merkleTree";
30
+ writable: true;
31
+ }, {
32
+ name: "treeAuthority";
33
+ pda: {
34
+ seeds: [{
35
+ kind: "account";
36
+ path: "merkleTree";
37
+ }];
38
+ program: {
39
+ kind: "const";
40
+ value: [152, 139, 128, 235, 121, 53, 40, 105, 178, 36, 116, 95, 89, 221, 191, 138, 38, 88, 202, 19, 220, 104, 129, 33, 38, 53, 28, 174, 7, 193, 165, 165];
41
+ };
42
+ };
43
+ }, {
44
+ name: "logWrapper";
45
+ address: "noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV";
46
+ }, {
47
+ name: "compressionProgram";
48
+ address: "cmtDvXumGCrqC1Age74AVPhSRVXJMd8PJS91L8KbNCK";
49
+ }, {
50
+ name: "systemProgram";
51
+ address: "11111111111111111111111111111111";
52
+ }, {
53
+ name: "bubblegumProgram";
54
+ address: "BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY";
55
+ }];
56
+ args: [{
57
+ name: "args";
58
+ type: {
59
+ defined: {
60
+ name: "closeWelcomePackArgsV0";
61
+ };
62
+ };
63
+ }];
64
+ } & {
65
+ name: "closeWelcomePackV0";
66
+ }, {
67
+ name: "owner";
68
+ signer: true;
69
+ relations: ["welcomePack"];
70
+ } | {
71
+ name: "welcomePack";
72
+ writable: true;
73
+ } | {
74
+ name: "userWelcomePacks";
75
+ } | {
76
+ name: "rentRefund";
77
+ writable: true;
78
+ } | {
79
+ name: "merkleTree";
80
+ writable: true;
81
+ } | {
82
+ name: "treeAuthority";
83
+ pda: {
84
+ seeds: [{
85
+ kind: "account";
86
+ path: "merkleTree";
87
+ }];
88
+ program: {
89
+ kind: "const";
90
+ value: [152, 139, 128, 235, 121, 53, 40, 105, 178, 36, 116, 95, 89, 221, 191, 138, 38, 88, 202, 19, 220, 104, 129, 33, 38, 53, 28, 174, 7, 193, 165, 165];
91
+ };
92
+ };
93
+ } | {
94
+ name: "logWrapper";
95
+ address: "noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV";
96
+ } | {
97
+ name: "compressionProgram";
98
+ address: "cmtDvXumGCrqC1Age74AVPhSRVXJMd8PJS91L8KbNCK";
99
+ } | {
100
+ name: "systemProgram";
101
+ address: "11111111111111111111111111111111";
102
+ } | {
103
+ name: "bubblegumProgram";
104
+ address: "BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY";
105
+ }>>;
106
+ //# sourceMappingURL=closeWelcomePack.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"closeWelcomePack.d.ts","sourceRoot":"","sources":["../../../../src/functions/closeWelcomePack.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAClE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAwB,MAAM,mBAAmB,CAAC;AAE5E,OAAO,EAAE,SAAS,EAAiB,MAAM,iBAAiB,CAAC;AAI3D,MAAM,MAAM,WAAW,GAAG,QAAQ,CAAC,WAAW,CAAC,CAAC,sBAAsB,CAAC,CAAC;AAExE,wBAAsB,gBAAgB,CAAC,EACrC,OAAO,EACP,WAAW,EACX,aAAa,EAEb,KAAyC,EACzC,GAAG,IAAI,EACR,EAAE;IACD,WAAW,EAAE,SAAS,CAAC;IACvB,OAAO,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;IAC9B,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,KAAK,OAAO,CAAC,KAAK,GAAG,SAAS,CAAC,CAAC;IAC7E,eAAe,CAAC,EAAE,CAChB,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,SAAS,KACf,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC,CAAC;CACtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA8BA"}
@@ -0,0 +1,186 @@
1
+ /// <reference types="bn.js" />
2
+ import { BN, IdlTypes, Program } from "@coral-xyz/anchor";
3
+ import { WelcomePack } from "@helium/idls/lib/types/welcome_pack";
4
+ import { Asset, AssetProof } from "@helium/spl-utils";
5
+ import { PublicKey } from "@solana/web3.js";
6
+ export type RewardSplit = IdlTypes<WelcomePack>["miniFanoutShareArgV0"];
7
+ export declare const BUBBLEGUM_PROGRAM_ID: PublicKey;
8
+ export declare const NOOP_PROGRAM_ID: PublicKey;
9
+ export declare function initializeWelcomePack({ program, assetId, lazyDistributor, assetEndpoint, solAmount, rewardsSplit, rewardsSchedule, rentRefund, assetReturnAddress, owner, payer, ...rest }: {
10
+ owner: PublicKey;
11
+ solAmount: BN;
12
+ rentRefund: PublicKey;
13
+ assetReturnAddress: PublicKey;
14
+ rewardsSplit: RewardSplit[];
15
+ rewardsSchedule: string;
16
+ program: Program<WelcomePack>;
17
+ assetId: PublicKey;
18
+ lazyDistributor: PublicKey;
19
+ payer?: PublicKey;
20
+ assetEndpoint?: string;
21
+ getAssetFn?: (url: string, assetId: PublicKey) => Promise<Asset | undefined>;
22
+ getAssetProofFn?: (url: string, assetId: PublicKey) => Promise<AssetProof | undefined>;
23
+ }): Promise<import("@coral-xyz/anchor/dist/cjs/program/namespace/methods").MethodsBuilder<WelcomePack, {
24
+ name: "initializeWelcomePackV0";
25
+ discriminator: [30, 11, 218, 24, 48, 198, 32, 90];
26
+ accounts: [{
27
+ name: "owner";
28
+ signer: true;
29
+ }, {
30
+ name: "payer";
31
+ writable: true;
32
+ signer: true;
33
+ }, {
34
+ name: "rentRefund";
35
+ }, {
36
+ name: "lazyDistributor";
37
+ relations: ["recipient"];
38
+ }, {
39
+ name: "recipient";
40
+ }, {
41
+ name: "assetReturnAddress";
42
+ }, {
43
+ name: "userWelcomePacks";
44
+ writable: true;
45
+ pda: {
46
+ seeds: [{
47
+ kind: "const";
48
+ value: [117, 115, 101, 114, 95, 119, 101, 108, 99, 111, 109, 101, 95, 112, 97, 99, 107, 115];
49
+ }, {
50
+ kind: "account";
51
+ path: "owner";
52
+ }];
53
+ };
54
+ }, {
55
+ name: "welcomePack";
56
+ writable: true;
57
+ pda: {
58
+ seeds: [{
59
+ kind: "const";
60
+ value: [119, 101, 108, 99, 111, 109, 101, 95, 112, 97, 99, 107];
61
+ }, {
62
+ kind: "account";
63
+ path: "owner";
64
+ }, {
65
+ kind: "account";
66
+ path: "user_welcome_packs.next_id";
67
+ account: "userWelcomePacksV0";
68
+ }];
69
+ };
70
+ }, {
71
+ name: "treeAuthority";
72
+ pda: {
73
+ seeds: [{
74
+ kind: "account";
75
+ path: "merkleTree";
76
+ }];
77
+ program: {
78
+ kind: "const";
79
+ value: [152, 139, 128, 235, 121, 53, 40, 105, 178, 36, 116, 95, 89, 221, 191, 138, 38, 88, 202, 19, 220, 104, 129, 33, 38, 53, 28, 174, 7, 193, 165, 165];
80
+ };
81
+ };
82
+ }, {
83
+ name: "leafOwner";
84
+ signer: true;
85
+ }, {
86
+ name: "merkleTree";
87
+ writable: true;
88
+ }, {
89
+ name: "logWrapper";
90
+ address: "noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV";
91
+ }, {
92
+ name: "compressionProgram";
93
+ address: "cmtDvXumGCrqC1Age74AVPhSRVXJMd8PJS91L8KbNCK";
94
+ }, {
95
+ name: "systemProgram";
96
+ address: "11111111111111111111111111111111";
97
+ }, {
98
+ name: "bubblegumProgram";
99
+ address: "BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY";
100
+ }];
101
+ args: [{
102
+ name: "args";
103
+ type: {
104
+ defined: {
105
+ name: "initializeWelcomePackArgsV0";
106
+ };
107
+ };
108
+ }];
109
+ } & {
110
+ name: "initializeWelcomePackV0";
111
+ }, {
112
+ name: "owner";
113
+ signer: true;
114
+ } | {
115
+ name: "payer";
116
+ writable: true;
117
+ signer: true;
118
+ } | {
119
+ name: "rentRefund";
120
+ } | {
121
+ name: "lazyDistributor";
122
+ relations: ["recipient"];
123
+ } | {
124
+ name: "recipient";
125
+ } | {
126
+ name: "assetReturnAddress";
127
+ } | {
128
+ name: "userWelcomePacks";
129
+ writable: true;
130
+ pda: {
131
+ seeds: [{
132
+ kind: "const";
133
+ value: [117, 115, 101, 114, 95, 119, 101, 108, 99, 111, 109, 101, 95, 112, 97, 99, 107, 115];
134
+ }, {
135
+ kind: "account";
136
+ path: "owner";
137
+ }];
138
+ };
139
+ } | {
140
+ name: "welcomePack";
141
+ writable: true;
142
+ pda: {
143
+ seeds: [{
144
+ kind: "const";
145
+ value: [119, 101, 108, 99, 111, 109, 101, 95, 112, 97, 99, 107];
146
+ }, {
147
+ kind: "account";
148
+ path: "owner";
149
+ }, {
150
+ kind: "account";
151
+ path: "user_welcome_packs.next_id";
152
+ account: "userWelcomePacksV0";
153
+ }];
154
+ };
155
+ } | {
156
+ name: "treeAuthority";
157
+ pda: {
158
+ seeds: [{
159
+ kind: "account";
160
+ path: "merkleTree";
161
+ }];
162
+ program: {
163
+ kind: "const";
164
+ value: [152, 139, 128, 235, 121, 53, 40, 105, 178, 36, 116, 95, 89, 221, 191, 138, 38, 88, 202, 19, 220, 104, 129, 33, 38, 53, 28, 174, 7, 193, 165, 165];
165
+ };
166
+ };
167
+ } | {
168
+ name: "leafOwner";
169
+ signer: true;
170
+ } | {
171
+ name: "merkleTree";
172
+ writable: true;
173
+ } | {
174
+ name: "logWrapper";
175
+ address: "noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV";
176
+ } | {
177
+ name: "compressionProgram";
178
+ address: "cmtDvXumGCrqC1Age74AVPhSRVXJMd8PJS91L8KbNCK";
179
+ } | {
180
+ name: "systemProgram";
181
+ address: "11111111111111111111111111111111";
182
+ } | {
183
+ name: "bubblegumProgram";
184
+ address: "BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY";
185
+ }>>;
186
+ //# sourceMappingURL=initializeWelcomePack.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"initializeWelcomePack.d.ts","sourceRoot":"","sources":["../../../../src/functions/initializeWelcomePack.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE1D,OAAO,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAClE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAwB,MAAM,mBAAmB,CAAC;AAC5E,OAAO,EAAE,SAAS,EAAiB,MAAM,iBAAiB,CAAC;AAK3D,MAAM,MAAM,WAAW,GAAG,QAAQ,CAAC,WAAW,CAAC,CAAC,sBAAsB,CAAC,CAAC;AACxE,eAAO,MAAM,oBAAoB,WAAgE,CAAC;AAClG,eAAO,MAAM,eAAe,WAA+D,CAAC;AAE5F,wBAAsB,qBAAqB,CAAC,EAC1C,OAAO,EACP,OAAO,EACP,eAAe,EACf,aAAa,EACb,SAAS,EACT,YAAY,EACZ,eAAe,EACf,UAAU,EACV,kBAAkB,EAClB,KAAK,EAEL,KAAyC,EACzC,GAAG,IAAI,EACR,EAAE;IACD,KAAK,EAAE,SAAS,CAAC;IACjB,SAAS,EAAE,EAAE,CAAC;IACd,UAAU,EAAE,SAAS,CAAC;IACtB,kBAAkB,EAAE,SAAS,CAAC;IAC9B,YAAY,EAAE,WAAW,EAAE,CAAC;IAC5B,eAAe,EAAE,MAAM,CAAC;IACxB,OAAO,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;IAC9B,OAAO,EAAE,SAAS,CAAC;IACnB,eAAe,EAAE,SAAS,CAAC;IAC3B,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,KAAK,OAAO,CAAC,KAAK,GAAG,SAAS,CAAC,CAAC;IAC7E,eAAe,CAAC,EAAE,CAChB,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,SAAS,KACf,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC,CAAC;CACtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA0CA"}
@@ -0,0 +1,18 @@
1
+ /// <reference types="bn.js" />
2
+ /// <reference types="node" />
3
+ import { AnchorProvider, BN, Idl, Program } from "@coral-xyz/anchor";
4
+ import { Keypair, PublicKey } from "@solana/web3.js";
5
+ import { WelcomePack } from "@helium/idls/lib/types/welcome_pack";
6
+ export type ClaimApprovalV0 = {
7
+ welcomePack: PublicKey;
8
+ expirationTimestamp: BN;
9
+ };
10
+ export { initializeWelcomePack } from "./functions/initializeWelcomePack";
11
+ export { claimWelcomePack } from "./functions/claimWelcomePack";
12
+ export { closeWelcomePack } from "./functions/closeWelcomePack";
13
+ export declare function claimApprovalSignature(claimApproval: ClaimApprovalV0, approver: Keypair): Buffer;
14
+ export declare function init(provider: AnchorProvider, programId?: PublicKey, idl?: Idl | null): Promise<Program<WelcomePack>>;
15
+ export * from "./constants";
16
+ export * from "./pdas";
17
+ export * from "./resolvers";
18
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":";;AAAA,OAAO,EAAE,cAAc,EAAE,EAAE,EAAE,GAAG,EAAyB,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAC3F,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAGpD,OAAO,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAA;AAKjE,MAAM,MAAM,eAAe,GAAG;IAC5B,WAAW,EAAE,SAAS,CAAC;IACvB,mBAAmB,EAAE,EAAE,CAAC;CACzB,CAAA;AAED,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAA;AACzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAA;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAA;AAE/D,wBAAgB,sBAAsB,CACpC,aAAa,EAAE,eAAe,EAC9B,QAAQ,EAAE,OAAO,UASlB;AAED,wBAAsB,IAAI,CACxB,QAAQ,EAAE,cAAc,EACxB,SAAS,GAAE,SAAsB,EACjC,GAAG,CAAC,EAAE,GAAG,GAAG,IAAI,GACf,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAc/B;AAED,cAAc,aAAa,CAAA;AAC3B,cAAc,QAAQ,CAAA;AACtB,cAAc,aAAa,CAAA"}
@@ -0,0 +1,4 @@
1
+ import { PublicKey } from "@solana/web3.js";
2
+ export declare function welcomePackKey(authority: PublicKey, id: number, programId?: PublicKey): [PublicKey, number];
3
+ export declare function userWelcomePacksKey(authority: PublicKey, programId?: PublicKey): [PublicKey, number];
4
+ //# sourceMappingURL=pdas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pdas.d.ts","sourceRoot":"","sources":["../../../src/pdas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAG3C,wBAAgB,cAAc,CAC5B,SAAS,EAAE,SAAS,EACpB,EAAE,EAAE,MAAM,EACV,SAAS,GAAE,SAAsB,GAChC,CAAC,SAAS,EAAE,MAAM,CAAC,CAOrB;AAED,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,SAAS,EACpB,SAAS,GAAE,SAAsB,GAChC,CAAC,SAAS,EAAE,MAAM,CAAC,CAErB"}
@@ -0,0 +1,2 @@
1
+ export declare const welcomePackResolvers: import("@coral-xyz/anchor").CustomAccountResolver<import("@coral-xyz/anchor").Idl>;
2
+ //# sourceMappingURL=resolvers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolvers.d.ts","sourceRoot":"","sources":["../../../src/resolvers.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,oBAAoB,oFAEhC,CAAA"}
package/package.json ADDED
@@ -0,0 +1,52 @@
1
+ {
2
+ "name": "@helium/welcome-pack-sdk",
3
+ "publishConfig": {
4
+ "access": "public",
5
+ "registry": "https://registry.npmjs.org/"
6
+ },
7
+ "license": "Apache-2.0",
8
+ "version": "0.10.19",
9
+ "description": "Interface to the welcome-pack smart contract",
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "https://github.com/helium/helium-program-libary"
13
+ },
14
+ "main": "./lib/cjs/index.js",
15
+ "module": "./lib/esm/src/index.js",
16
+ "types": "./lib/types/src/index.d.ts",
17
+ "sideEffects": false,
18
+ "files": [
19
+ "lib"
20
+ ],
21
+ "exports": {
22
+ "import": "./lib/esm/src/index.js",
23
+ "require": "./lib/cjs/index.js",
24
+ "types": "./lib/types/src/index.d.ts"
25
+ },
26
+ "scripts": {
27
+ "format": "prettier --write \"src/**/*.{ts,tsx}\"",
28
+ "precommit": "npx git-format-staged -f 'prettier --ignore-unknown --stdin --stdin-filepath \"{}\"' .",
29
+ "clean": "npx shx mkdir -p lib && npx shx rm -rf lib",
30
+ "package": "npx shx mkdir -p lib/cjs lib/esm",
31
+ "prebuild": "npm run clean && npm run package"
32
+ },
33
+ "dependencies": {
34
+ "@coral-xyz/anchor": "^0.31.0",
35
+ "@helium/anchor-resolvers": "^0.10.19",
36
+ "@helium/idls": "^0.10.19",
37
+ "@helium/lazy-distributor-sdk": "^0.10.19",
38
+ "@helium/mini-fanout-sdk": "^0.10.19",
39
+ "@helium/spl-utils": "^0.10.19",
40
+ "@helium/tuktuk-sdk": "^0.0.9",
41
+ "@solana/spl-token": "^0.4.10",
42
+ "bn.js": "^5.2.0",
43
+ "bs58": "^4.0.1"
44
+ },
45
+ "devDependencies": {
46
+ "git-format-staged": "^2.1.3",
47
+ "ts-loader": "^9.2.3",
48
+ "ts-node": "^10.9.1",
49
+ "typescript": "^5.2.2"
50
+ },
51
+ "gitHead": "09cf69aed606fe79618497bb5ce9f133ce728e4e"
52
+ }