- Preparing search index...
- The search index is not available
@gumhq/sdk
Methods
create
- create(metadataUri: string, profileAccount: PublicKey, owner: PublicKey, payer?: PublicKey): Promise<{
instructionMethodBuilder: MethodsBuilder<GplCore, Object>;
postPDA: PublicKey;
}>
-
Parameters
-
metadataUri: string
-
profileAccount: PublicKey
-
owner: PublicKey
-
payer: PublicKey = owner
Returns Promise<{
instructionMethodBuilder: MethodsBuilder<GplCore, Object>;
postPDA: PublicKey;
}>
createWithSession
- createWithSession(metadataUri: string, profileAccount: PublicKey, sessionPublicKey: PublicKey, sessionTokenAccount: PublicKey, payer?: PublicKey): Promise<{
instructionMethodBuilder: MethodsBuilder<GplCore, Object>;
postPDA: PublicKey;
}>
-
Parameters
-
metadataUri: string
-
profileAccount: PublicKey
-
sessionPublicKey: PublicKey
-
sessionTokenAccount: PublicKey
-
payer: PublicKey = sessionPublicKey
Returns Promise<{
instructionMethodBuilder: MethodsBuilder<GplCore, Object>;
postPDA: PublicKey;
}>
delete
- delete(postAccount: PublicKey, profileAccount: PublicKey, owner: PublicKey, refundReceiver?: PublicKey): MethodsBuilder<GplCore, Object>
-
Parameters
-
postAccount: PublicKey
-
profileAccount: PublicKey
-
owner: PublicKey
-
refundReceiver: PublicKey = owner
Returns MethodsBuilder<GplCore, Object>
deleteWithSession
- deleteWithSession(postAccount: PublicKey, profileAccount: PublicKey, sessionPublicKey: PublicKey, sessionTokenAccount: PublicKey, refundReceiver?: PublicKey): MethodsBuilder<GplCore, Object>
-
Parameters
-
postAccount: PublicKey
-
profileAccount: PublicKey
-
sessionPublicKey: PublicKey
-
sessionTokenAccount: PublicKey
-
refundReceiver: PublicKey = sessionPublicKey
Returns MethodsBuilder<GplCore, Object>
get
- get(postAccount: PublicKey): Promise<DecodeStruct<{
fields: [{
name: "issuer";
type: "publicKey";
}, {
name: "holder";
type: "publicKey";
}, {
name: "updateAuthority";
type: "publicKey";
}, {
name: "schema";
type: "publicKey";
}, {
name: "metadataUri";
type: "string";
}];
kind: "struct";
} | {
fields: [{
name: "authority";
type: "publicKey";
}, {
name: "verified";
type: "bool";
}];
kind: "struct";
} | {
fields: [{
name: "authority";
type: "publicKey";
}, {
name: "metadataUri";
type: "string";
}, {
name: "randomHash";
type: {
array: ["u8", 32];
};
}];
kind: "struct";
} | {
fields: [{
name: "fromProfile";
type: "publicKey";
}, {
name: "toProfile";
type: "publicKey";
}];
kind: "struct";
} | {
fields: [{
name: "profile";
type: "publicKey";
}, {
name: "metadataUri";
type: "string";
}, {
name: "randomHash";
type: {
array: ["u8", 32];
};
}, {
name: "replyTo";
type: {
option: "publicKey";
};
}];
kind: "struct";
} | {
fields: [{
name: "authority";
type: "publicKey";
}, {
name: "metadataUri";
type: "string";
}, {
name: "screenName";
type: "publicKey";
}, {
name: "randomHash";
type: {
array: ["u8", 32];
};
}];
kind: "struct";
} | {
fields: [{
name: "fromProfile";
type: "publicKey";
}, {
name: "toPost";
type: "publicKey";
}, {
name: "reactionType";
type: "string";
}];
kind: "struct";
}, DecodedHelper<[{
name: "PostError";
type: {
kind: "enum";
variants: [{
name: "URITooLong";
}];
};
}, {
name: "ProfileMetadataError";
type: {
kind: "enum";
variants: [{
name: "URITooLong";
}];
};
}, {
name: "ConnectionError";
type: {
kind: "enum";
variants: [{
name: "CannotConnectToSelf";
}];
};
}], EmptyDefined>>>
-
Returns Promise<DecodeStruct<{
fields: [{
name: "issuer";
type: "publicKey";
}, {
name: "holder";
type: "publicKey";
}, {
name: "updateAuthority";
type: "publicKey";
}, {
name: "schema";
type: "publicKey";
}, {
name: "metadataUri";
type: "string";
}];
kind: "struct";
} | {
fields: [{
name: "authority";
type: "publicKey";
}, {
name: "verified";
type: "bool";
}];
kind: "struct";
} | {
fields: [{
name: "authority";
type: "publicKey";
}, {
name: "metadataUri";
type: "string";
}, {
name: "randomHash";
type: {
array: ["u8", 32];
};
}];
kind: "struct";
} | {
fields: [{
name: "fromProfile";
type: "publicKey";
}, {
name: "toProfile";
type: "publicKey";
}];
kind: "struct";
} | {
fields: [{
name: "profile";
type: "publicKey";
}, {
name: "metadataUri";
type: "string";
}, {
name: "randomHash";
type: {
array: ["u8", 32];
};
}, {
name: "replyTo";
type: {
option: "publicKey";
};
}];
kind: "struct";
} | {
fields: [{
name: "authority";
type: "publicKey";
}, {
name: "metadataUri";
type: "string";
}, {
name: "screenName";
type: "publicKey";
}, {
name: "randomHash";
type: {
array: ["u8", 32];
};
}];
kind: "struct";
} | {
fields: [{
name: "fromProfile";
type: "publicKey";
}, {
name: "toPost";
type: "publicKey";
}, {
name: "reactionType";
type: "string";
}];
kind: "struct";
}, DecodedHelper<[{
name: "PostError";
type: {
kind: "enum";
variants: [{
name: "URITooLong";
}];
};
}, {
name: "ProfileMetadataError";
type: {
kind: "enum";
variants: [{
name: "URITooLong";
}];
};
}, {
name: "ConnectionError";
type: {
kind: "enum";
variants: [{
name: "CannotConnectToSelf";
}];
};
}], EmptyDefined>>>
getFeedsByFollowedUsers
- getFeedsByFollowedUsers(profileAccount: PublicKey): Promise<GraphQLFeed[]>
-
Parameters
-
profileAccount: PublicKey
getPostsByAuthority
- getPostsByAuthority(authorityPubKey: PublicKey): Promise<GraphQLPost[]>
-
Parameters
-
authorityPubKey: PublicKey
getPostsByProfile
- getPostsByProfile(profilePubKey: PublicKey): Promise<GraphQLPost[]>
-
reply
- reply(replyToPostAccount: PublicKey, metadataUri: String, profileAccount: PublicKey, owner: PublicKey, payer?: PublicKey): Promise<{
instructionMethodBuilder: MethodsBuilder<GplCore, Object>;
postPDA: PublicKey;
}>
-
Parameters
-
replyToPostAccount: PublicKey
-
metadataUri: String
-
profileAccount: PublicKey
-
owner: PublicKey
-
payer: PublicKey = owner
Returns Promise<{
instructionMethodBuilder: MethodsBuilder<GplCore, Object>;
postPDA: PublicKey;
}>
replyWithSession
- replyWithSession(replyToPostAccount: PublicKey, metadataUri: String, profileAccount: PublicKey, sessionPublicKey: PublicKey, sessionTokenAccount: PublicKey, payer?: PublicKey): Promise<{
instructionMethodBuilder: MethodsBuilder<GplCore, Object>;
postPDA: PublicKey;
}>
-
Parameters
-
replyToPostAccount: PublicKey
-
metadataUri: String
-
profileAccount: PublicKey
-
sessionPublicKey: PublicKey
-
sessionTokenAccount: PublicKey
-
payer: PublicKey = sessionPublicKey
Returns Promise<{
instructionMethodBuilder: MethodsBuilder<GplCore, Object>;
postPDA: PublicKey;
}>
update
- update(newMetadataUri: string, postAccount: PublicKey, profileAccount: PublicKey, owner: PublicKey): Promise<MethodsBuilder<GplCore, Object>>
-
Parameters
-
newMetadataUri: string
-
postAccount: PublicKey
-
profileAccount: PublicKey
-
owner: PublicKey
Returns Promise<MethodsBuilder<GplCore, Object>>
updateWithSession
- updateWithSession(newMetadataUri: string, postAccount: PublicKey, profileAccount: PublicKey, sessionPublicKey: PublicKey, sessionTokenAccount: PublicKey): Promise<MethodsBuilder<GplCore, Object>>
-
Parameters
-
newMetadataUri: string
-
postAccount: PublicKey
-
profileAccount: PublicKey
-
sessionPublicKey: PublicKey
-
sessionTokenAccount: PublicKey
Returns Promise<MethodsBuilder<GplCore, Object>>